dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.12) AC_INIT(citserver.c) AC_PREFIX_DEFAULT(/usr/local/citadel) if test "$prefix" = NONE; then AC_DEFINE_UNQUOTED(BBSDIR, "$ac_default_prefix") else AC_DEFINE_UNQUOTED(BBSDIR, "$prefix") fi AC_ARG_ENABLE(autologin, [ --disable-autologin disable autologin (default is enabled)],[if test "$enableval" = yes; then AC_DEFINE(ENABLE_AUTOLOGIN) fi],AC_DEFINE(ENABLE_AUTOLOGIN)) AC_ARG_ENABLE(ansi-color, [ --enable-ansi-color enable ANSI color (default is disabled)],[if test "$enableval" = yes; then AC_DEFINE(ANSI_COLOR) fi]) AC_CANONICAL_HOST case "$host" in alpha*-dec-osf*) dnl We can't use gcc on Digital UNIX due to header file probs if test -z "$CC"; then CC=cc fi ;; esac dnl Checks for programs. AC_PROG_CC if test "$GCC" = yes; then CFLAGS="$CFLAGS -Wall -Wstrict-prototypes" SERVER_LDFLAGS=-rdynamic fi AC_PROG_RANLIB TARGETS=client dnl Checks for libraries. AC_CHECK_LIB(crypt, crypt) AC_CHECK_LIB(dl, dlopen) AC_CHECK_LIB(gdbm, gdbm_open) AC_CHECK_LIB(curses, initscr, CURSES=-lcurses) AC_CHECK_LIB(pthread, pthread_create, [LIBS="$LIBS -lpthread" TARGETS="client server utils serv_modules"]) AC_CHECK_LIB(pthreads, pthread_create, [LIBS="$LIBS -lpthreads" TARGETS="client server utils serv_modules"]) dnl Checks for header files. AC_HEADER_DIRENT AC_HEADER_STDC AC_HEADER_SYS_WAIT 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) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_PID_T AC_TYPE_SIZE_T AC_HEADER_TIME AC_STRUCT_TM dnl Checks for library functions. AC_FUNC_GETPGRP AC_PROG_GCC_TRADITIONAL AC_TYPE_SIGNAL AC_FUNC_VPRINTF AC_CHECK_FUNCS(mkdir mktime rmdir select socket strerror) AC_SUBST(CURSES) AC_SUBST(TARGETS) AC_SUBST(SERVER_LDFLAGS) AC_CONFIG_HEADER(sysdep.h) AC_OUTPUT(Makefile)