separate $LEXLIBS because ee and virus do not need lex and will not build without a yylex() stub

This commit is contained in:
fstd 2016-01-23 05:20:53 +01:00
parent 673255a5d0
commit ee7b703453
2 changed files with 8 additions and 5 deletions

View File

@ -9,6 +9,7 @@ mandir = @mandir@
CC = @CC@ CC = @CC@
LIBS = @LIBS@ LIBS = @LIBS@
LEXLIBS = @LEXLIBS@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
INSTALL = @INSTALL@ INSTALL = @INSTALL@
LEX = @LEX@ LEX = @LEX@
@ -30,7 +31,7 @@ OBJS = $(SRCS:.c=.o)
all: .depend $(NAME) $(EDITORS) all: .depend $(NAME) $(EDITORS)
$(NAME): $(OBJS) $(NAME): $(OBJS)
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(LEXLIBS)
ee: ee.c ee: ee.c
$(CC) $(CFLAGS) -o $@ $< $(LIBS) $(CC) $(CFLAGS) -o $@ $< $(LIBS)

View File

@ -15,7 +15,7 @@ if test -z "$LEX"; then
AC_MSG_ERROR([lex or flex not found.]) AC_MSG_ERROR([lex or flex not found.])
fi fi
LIBS="$LIBS $LEXLIB" LEXLIBS="$LEXLIB"
AC_CHECK_LIB(pthread, pthread_create, [], [AC_MSG_ERROR([need pthreads])]) AC_CHECK_LIB(pthread, pthread_create, [], [AC_MSG_ERROR([need pthreads])])
@ -26,7 +26,7 @@ fi
case "$(uname -s)" in case "$(uname -s)" in
Linux | *BSD) Linux | *BSD)
LIBS="$LIBS -lutil -lcrypt" MY_LIBS="$MY_LIBS -lutil -lcrypt"
AC_DEFINE(NOSTREAMS, 1, [Don't use SVR4 streams support in ttyrec.]) AC_DEFINE(NOSTREAMS, 1, [Don't use SVR4 streams support in ttyrec.])
;; ;;
esac esac
@ -108,7 +108,7 @@ AC_ARG_WITH(sqlite-db,
if test "$enable_sqlite" = yes; then if test "$enable_sqlite" = yes; then
AC_MSG_RESULT([Using SQLite for the database, located at $dgl_sqlite_db]) AC_MSG_RESULT([Using SQLite for the database, located at $dgl_sqlite_db])
AC_DEFINE(USE_SQLITE3,1,[Use SQLite for the database instead of flat text file.]) AC_DEFINE(USE_SQLITE3,1,[Use SQLite for the database instead of flat text file.])
LIBS="$LIBS -lsqlite3" MY_LIBS="$MY_LIBS -lsqlite3"
AC_DEFINE_UNQUOTED(USE_SQLITE_DB, "$dgl_sqlite_db", [Path and filename of the SQLite database.]) AC_DEFINE_UNQUOTED(USE_SQLITE_DB, "$dgl_sqlite_db", [Path and filename of the SQLite database.])
fi fi
@ -158,7 +158,7 @@ if test "$enable_shmem" = yes; then
AC_CHECK_HEADERS([sys/shm.h], [], [AC_MSG_ERROR([sys/shm.h not found.])], []) AC_CHECK_HEADERS([sys/shm.h], [], [AC_MSG_ERROR([sys/shm.h not found.])], [])
AC_MSG_RESULT([Enabled showing number of watchers.]) AC_MSG_RESULT([Enabled showing number of watchers.])
AC_DEFINE(USE_SHMEM,1,[Use shared memory block]) AC_DEFINE(USE_SHMEM,1,[Use shared memory block])
LIBS="$LIBS -lrt" MY_LIBS="$MY_LIBS -lrt"
# or -pthread? # or -pthread?
fi fi
@ -184,8 +184,10 @@ else
fi fi
LIBS="$LIBS $MY_LIBS"
AC_SUBST(SETPROCTITLE_C) AC_SUBST(SETPROCTITLE_C)
AC_SUBST(LEXLIBS)
AC_CONFIG_FILES(Makefile) AC_CONFIG_FILES(Makefile)
AC_OUTPUT AC_OUTPUT