1 dnl Process this file with autoconf to produce a configure script.
4 AC_PREFIX_DEFAULT(/usr/local/citadel)
5 if test "$prefix" = NONE; then
6 AC_DEFINE_UNQUOTED(BBSDIR, "$ac_default_prefix")
8 AC_DEFINE_UNQUOTED(BBSDIR, "$prefix")
11 AC_ARG_ENABLE(autologin, [ --enable-autologin enable autologin (default is disabled)],[if test "$enableval" = yes; then
12 AC_DEFINE(ENABLE_AUTOLOGIN)
15 AC_ARG_ENABLE(ansi-color, [ --enable-ansi-color enable ANSI color (default is disabled)],[if test "$enableval" = yes; then
24 dnl We can't use gcc on Digital UNIX due to header file probs
25 if test -z "$CC"; then
28 SERVER_LDFLAGS=-pthread
29 TARGETS="client server utils serv_modules"
33 dnl Checks for programs.
35 if test "$GCC" = yes; then
36 CFLAGS="$CFLAGS -Wall -Wstrict-prototypes"
37 SERVER_LDFLAGS=-rdynamic
41 dnl Checks for libraries.
42 AC_CHECK_LIB(crypt, crypt)
43 AC_CHECK_LIB(dl, dlopen)
44 AC_CHECK_LIB(gdbm, gdbm_open)
45 AC_CHECK_LIB(curses, initscr, CURSES=-lcurses)
46 if test "$SERVER_LDFLAGS" != -pthread; then
47 AC_CHECK_LIB(pthread, pthread_create, [LIBS="$LIBS -lpthread"
48 TARGETS="client server utils serv_modules"])
49 AC_CHECK_LIB(pthreads, pthread_create, [LIBS="$LIBS -lpthreads"
50 TARGETS="client server utils serv_modules"])
53 dnl Checks for header files.
57 AC_CHECK_HEADERS(curses.h fcntl.h limits.h termios.h strings.h sys/ioctl.h sys/select.h sys/time.h syslog.h unistd.h)
59 dnl Checks for typedefs, structures, and compiler characteristics.
66 dnl Checks for library functions.
68 AC_PROG_GCC_TRADITIONAL
71 AC_CHECK_FUNCS(snprintf mkdir mktime rmdir select socket strerror)
73 if test "$ac_cv_func_snprintf" = no; then
79 AC_SUBST(SERVER_LDFLAGS)
81 AC_CONFIG_HEADER(sysdep.h)