161 lines
4.2 KiB
Plaintext
161 lines
4.2 KiB
Plaintext
|
dnl Process this file with autoconf to produce a configure script.
|
||
|
AC_INIT(lib/libs.h)
|
||
|
AM_CONFIG_HEADER(config.h)
|
||
|
SUBDIRS=". lib mbcico mbfido mbftpd mbmon mbsebbs mbtask mbsetup fbutil import lang examples html script"
|
||
|
AC_SUBST(SUBDIRS)
|
||
|
|
||
|
dnl General settings for MBSE BBS
|
||
|
MBSE_PACKAGE=mbsebbs
|
||
|
MBSE_VERSION=0.33.17
|
||
|
AC_SUBST(PACKAGE, $MBSE_PACKAGE)
|
||
|
AC_SUBST(VERSION, $MBSE_VERSION)
|
||
|
AM_INIT_AUTOMAKE($MBSE_PACKAGE, $MBSE_VERSION)
|
||
|
AC_PREFIX_DEFAULT(/opt/mbse)
|
||
|
GROUP="bbs"
|
||
|
OWNER="mbse"
|
||
|
AC_SUBST(GROUP)
|
||
|
AC_SUBST(OWNER)
|
||
|
|
||
|
dnl Checks for programs.
|
||
|
AC_PROG_CC
|
||
|
dnl ALternate awk check, I skip mawk because it doesn't work for MBSE.
|
||
|
AC_CHECK_PROG(AWK, gawk, gawk)
|
||
|
AC_CHECK_PROG(AWK, nawk, nawk)
|
||
|
AC_CHECK_PROG(AWK, awk, awk)
|
||
|
AC_PROG_INSTALL
|
||
|
AC_PROG_MAKE_SET
|
||
|
AC_PROG_RANLIB
|
||
|
AC_PROG_YACC
|
||
|
AM_PROG_LEX
|
||
|
CFLAGS="$CFLAGS -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes -pipe"
|
||
|
|
||
|
dnl Additional commandline switches
|
||
|
AC_ARG_ENABLE(memwatch, [ --enable-memwatch MEMWATCH debugging], [ memwatch=$enableval ], [ memwatch=no ])
|
||
|
AC_ARG_ENABLE(fsc0070, [ --enable-fsc-0070 Enable FSC 0070], [ fsc0070=$enableval ], [ fsc0070=no ])
|
||
|
AC_ARG_ENABLE(addpid, [ --enable-add-pid Enable add PID], [ addpid=$enableval ], [ addpid=no ])
|
||
|
|
||
|
if test "$memwatch" = "yes"; then
|
||
|
AC_DEFINE(MEMWATCH)
|
||
|
fi
|
||
|
if test "$fsc0070" = "yes"; then
|
||
|
AC_DEFINE(FSC_0070)
|
||
|
fi
|
||
|
if test "$addpid" = "yes"; then
|
||
|
AC_DEFINE(ADD_PID)
|
||
|
fi
|
||
|
|
||
|
dnl Defines for MBSE BBS (must use tests or --enable-stuff later)
|
||
|
AC_DEFINE_UNQUOTED(RESTAMP_OLD_POSTINGS, 21)
|
||
|
AC_DEFINE(RESTAMP_FUTURE_POSTINGS)
|
||
|
|
||
|
dnl Checks for libraries.
|
||
|
AC_CHECK_LIB(shadow,setspent,result=yes,result=no)
|
||
|
if test "$result" = "yes"; then
|
||
|
LIBS="$LIBS -lshadow"
|
||
|
SHADOW_PASSWORD=1
|
||
|
LIBSHADOW=1
|
||
|
else
|
||
|
AC_CHECK_LIB(shadow,getspnam,result=yes,result=no)
|
||
|
if test "$result" = "yes"; then
|
||
|
LIBS="$LIBS -lshadow"
|
||
|
SHADOW_PASSWORD=1
|
||
|
LIBSHADOW=1
|
||
|
else
|
||
|
dnl some libc's (glibc 2.x) keep shadow functions in -lc
|
||
|
AC_CHECK_LIB(c,setspent,result=yes,result=no)
|
||
|
if test "$result" = "yes"; then
|
||
|
if test -f /etc/shadow; then
|
||
|
SHADOW_PASSWORD=1
|
||
|
fi
|
||
|
fi
|
||
|
fi
|
||
|
fi
|
||
|
if test "$SHADOW_PASSWORD" = "1"; then
|
||
|
if test "$ac_cv_func_fgetspent" != "yes"; then
|
||
|
AC_CHECK_LIB(shadow,fgetspent,result=yes,result=no)
|
||
|
if test "$result" = "yes"; then
|
||
|
if test "$LIBSHADOW" != "1"; then
|
||
|
LIBS="$LIBS -lshadow"
|
||
|
fi
|
||
|
fi
|
||
|
fi
|
||
|
AC_DEFINE(SHADOW_PASSWORD)
|
||
|
fi
|
||
|
AC_CHECK_LIB(crypt,crypt,result=yes,result=no)
|
||
|
if test "$result" = "yes"; then
|
||
|
LIBS="$LIBS -lcrypt"
|
||
|
AC_CHECK_HEADERS(crypt.h)
|
||
|
fi
|
||
|
|
||
|
dnl Checks for header files.
|
||
|
AC_HEADER_DIRENT
|
||
|
AC_HEADER_STDC
|
||
|
AC_HEADER_SYS_WAIT
|
||
|
AC_CHECK_HEADERS(fcntl.h malloc.h sys/file.h sys/ioctl.h sys/time.h syslog.h termio.h unistd.h netinet/in.h)
|
||
|
AC_STRUCT_TIMEZONE
|
||
|
|
||
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
||
|
AC_C_CONST
|
||
|
AC_TYPE_UID_T
|
||
|
AC_TYPE_OFF_T
|
||
|
AC_TYPE_PID_T
|
||
|
AC_TYPE_SIZE_T
|
||
|
AC_STRUCT_ST_BLKSIZE
|
||
|
AC_HEADER_TIME
|
||
|
AC_STRUCT_TM
|
||
|
|
||
|
dnl Checks for library functions.
|
||
|
AC_CHECK_FUNCS(c64i a64l fchmod fchown fsync lckpwdf strcasestr mkstemp)
|
||
|
AC_FUNC_FNMATCH
|
||
|
AC_PROG_GCC_TRADITIONAL
|
||
|
AC_FUNC_MEMCMP
|
||
|
AC_FUNC_SETPGRP
|
||
|
AC_TYPE_SIGNAL
|
||
|
AC_FUNC_STRFTIME
|
||
|
AC_FUNC_UTIME_NULL
|
||
|
AC_FUNC_VFORK
|
||
|
AC_FUNC_VPRINTF
|
||
|
AC_CHECK_FUNCS(getcwd gethostname gettimeofday getwd mkdir mktime putenv re_comp regcmp regcomp rmdir select socket strcspn strdup strerror strspn strstr strtol strtoul uname)
|
||
|
|
||
|
dnl Check for external programs
|
||
|
AC_PATH_PROG(COMPRESS,compress,no-compress-found-during-configure)
|
||
|
AC_PATH_PROGS(GZIP,gzip,no-gzip-found-during-configure)
|
||
|
dnl
|
||
|
AC_ARG_WITH(log-compress,[ --with-log-compress=METHOD Log compression method (default gzip)], LOG_COMPRESS=$with_log_compress, LOG_COMPRESS=gzip)
|
||
|
case "$LOG_COMPRESS" in
|
||
|
gzip)
|
||
|
LOG_COMPRESS=$GZIP
|
||
|
LOG_COMPRESSEXT=".gz" ;;
|
||
|
compress)
|
||
|
LOG_COMPRESS=$COMPRESS
|
||
|
LOG_COMPRESSEXT=".Z" ;;
|
||
|
*)
|
||
|
LOG_COMPRESS=$LOG_COMPRESS
|
||
|
LOG_COMPRESSEXT=".unknown" ;;
|
||
|
esac
|
||
|
AC_SUBST(LOG_COMPRESS)
|
||
|
AC_SUBST(LOG_COMPRESSEXT)
|
||
|
dnl
|
||
|
|
||
|
AC_OUTPUT(
|
||
|
Makefile
|
||
|
lib/Makefile
|
||
|
mbcico/Makefile
|
||
|
mbfido/Makefile
|
||
|
mbfido/paths.h
|
||
|
mbftpd/Makefile
|
||
|
mbmon/Makefile
|
||
|
mbsebbs/Makefile
|
||
|
mbtask/Makefile
|
||
|
mbsetup/Makefile
|
||
|
fbutil/Makefile
|
||
|
script/Makefile
|
||
|
import/Makefile
|
||
|
lang/Makefile
|
||
|
examples/Makefile
|
||
|
html/Makefile
|
||
|
INSTALL
|
||
|
FILE_ID.DIZ
|
||
|
)
|
||
|
|