This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
deb-mbse/configure.in

211 lines
6.0 KiB
Plaintext
Raw Normal View History

2001-08-17 05:46:24 +00:00
dnl Process this file with autoconf to produce a configure script.
2001-11-03 22:45:03 +00:00
dnl $Id$
2001-11-03 21:57:45 +00:00
2001-08-17 05:46:24 +00:00
AC_INIT(lib/libs.h)
AM_CONFIG_HEADER(config.h)
2002-01-05 13:57:10 +00:00
SUBDIRS="lib mbcico mbfido mbmon mbsebbs mbtask mbsetup unix import lang examples html script"
2001-08-17 05:46:24 +00:00
AC_SUBST(SUBDIRS)
dnl General settings for MBSE BBS
2001-11-08 22:18:03 +00:00
dnl After changeing the version number, run autoconf!
2001-11-03 21:57:45 +00:00
PACKAGE="mbsebbs"
VERSION="0.33.19"
2002-01-02 22:27:48 +00:00
COPYRIGHT="Copyright (C) 1997-2002 Michiel Broek, All Rights Reserved"
SHORTRIGHT="Copyright (C) 1997-2002 M. Broek"
2001-08-17 05:46:24 +00:00
GROUP="bbs"
OWNER="mbse"
2002-01-05 13:57:10 +00:00
ROOT="root"
RGROUP="`id -gn`"
2001-11-03 21:57:45 +00:00
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
AC_SUBST(COPYRIGHT)
2001-08-17 05:46:24 +00:00
AC_SUBST(GROUP)
AC_SUBST(OWNER)
2001-11-03 21:57:45 +00:00
AC_PREFIX_DEFAULT(/opt/mbse)
AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
AC_DEFINE_UNQUOTED(COPYRIGHT, "$COPYRIGHT")
AC_DEFINE_UNQUOTED(SHORTRIGHT, "$SHORTRIGHT")
2001-08-17 05:46:24 +00:00
dnl Checks for programs.
AC_PROG_CC
2001-11-03 21:57:45 +00:00
dnl Alternate awk check, I skip mawk because it doesn't work for MBSE.
2001-08-17 05:46:24 +00:00
AC_CHECK_PROG(AWK, gawk, gawk)
AC_CHECK_PROG(AWK, nawk, nawk)
AC_CHECK_PROG(AWK, awk, awk)
2001-11-03 21:57:45 +00:00
dnl Try to find GNU install
AC_CHECK_PROG(INSTALL, ginstall, ginstall)
AC_CHECK_PROG(INSTALL, install, install)
2001-08-17 05:46:24 +00:00
AC_PROG_MAKE_SET
AC_PROG_RANLIB
2001-10-29 12:06:36 +00:00
AC_PROG_YACC
dnl AC_PROG_LEX
2001-11-03 21:57:45 +00:00
AC_CHECK_PROG(TAR, tar, tar)
AC_CHECK_PROG(ZIP, zip, zip)
dnl AM_PROG_LEX
2001-08-25 19:53:11 +00:00
AC_PATH_PROG(CHOWN, chown, chown, /bin:/sbin:/usr/bin:/usr/sbin:)
2001-11-08 22:18:03 +00:00
CFLAGS="$CFLAGS -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes"
2001-08-17 05:46:24 +00:00
dnl Additional commandline switches
AC_ARG_ENABLE(memwatch, [ --enable-memwatch MEMWATCH debugging], [ memwatch=$enableval ], [ memwatch=no ])
if test "$memwatch" = "yes"; then
AC_DEFINE(MEMWATCH)
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.
2001-08-25 19:53:11 +00:00
AC_CHECK_LIB(compat,re_comp,result=yes,result=no)
if test "$result" = "yes"; then
LIBS="$LIBS -lcompat"
fi
AC_CACHE_CHECK(for pw_age in struct passwd, ac_cv_struct_passwd_pw_age, AC_TRY_COMPILE([#include <pwd.h>],
[ struct passwd pw; pw.pw_age = ""; ], ac_cv_struct_passwd_pw_age=yes, ac_cv_struct_passwd_pw_age=no))
if test "$ac_cv_struct_passwd_pw_age" = "yes"; then
AC_DEFINE(ATT_AGE)
fi
AC_CACHE_CHECK(for pw_comment in struct passwd, ac_cv_struct_passwd_pw_comment, AC_TRY_COMPILE([#include <pwd.h>],
[ struct passwd pw; pw.pw_comment = ""; ], ac_cv_struct_passwd_pw_comment=yes, ac_cv_struct_passwd_pw_comment=no))
if test "$ac_cv_struct_passwd_pw_comment" = "yes"; then
AC_DEFINE(ATT_COMMENT)
fi
2001-08-17 05:46:24 +00:00
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
2001-08-25 19:53:11 +00:00
2001-08-17 05:46:24 +00:00
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
2001-08-25 19:53:11 +00:00
2001-08-17 05:46:24 +00:00
AC_CHECK_LIB(crypt,crypt,result=yes,result=no)
if test "$result" = "yes"; then
LIBS="$LIBS -lcrypt"
AC_CHECK_HEADERS(crypt.h)
fi
2002-01-06 13:24:23 +00:00
AC_CHECK_LIB(util,login,result=yes,result=no)
if test "$result" = "yes"; then
LIBS="$LIBS -lutil"
2002-01-11 21:47:22 +00:00
AC_CHECK_HEADERS(util.h)
2002-01-06 13:24:23 +00:00
AC_CHECK_HEADERS(libutil.h)
2002-01-11 21:47:22 +00:00
AC_CHECK_HEADERS(sys/types.h)
2002-01-06 13:24:23 +00:00
fi
2001-08-17 05:46:24 +00:00
dnl Checks for header files.
AC_HEADER_STDC
2001-11-03 21:57:45 +00:00
AC_HEADER_DIRENT
AC_HEADER_TIME
2001-08-17 05:46:24 +00:00
AC_HEADER_SYS_WAIT
2001-08-25 19:53:11 +00:00
AC_CHECK_HEADERS(fcntl.h malloc.h sys/file.h sys/ioctl.h sys/time.h termios.h syslog.h sys/vfs.h unistd.h netinet/in.h regex.h)
AC_CHECK_HEADERS(sys/resource.h usersec.h utime.h ulimit.h gshadow.h shadow.h)
2002-01-04 21:38:54 +00:00
AC_CHECK_HEADERS(limits.h utmp.h utmpx.h lastlog.h rpc/key_prot.h)
2001-08-17 05:46:24 +00:00
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
2001-08-25 19:53:11 +00:00
AC_TYPE_MODE_T
2001-08-17 05:46:24 +00:00
AC_TYPE_SIZE_T
AC_STRUCT_ST_BLKSIZE
2001-08-25 19:53:11 +00:00
AC_HEADER_STAT
2001-08-17 05:46:24 +00:00
AC_STRUCT_TM
dnl Checks for library functions.
2001-08-25 19:53:11 +00:00
AC_CHECK_FUNCS(c64i a64l fchmod fchown fdatasync fsync lckpwdf strcasestr mkstemp putpwent)
2001-08-17 05:46:24 +00:00
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)
2002-01-04 21:38:54 +00:00
AC_CHECK_FUNCS(getspnam getutent initgroups updwtmp updwtmpx)
2001-08-17 05:46:24 +00:00
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
2002-01-02 22:17:58 +00:00
AC_MSG_CHECKING(location of utmp)
for utmpdir in /var/run /var/adm /usr/adm /etc NONE; do
if test "$utmpdir" = "NONE"; then
AC_MSG_WARN(utmp file not found)
elif test -f $utmpdir/utmp; then
AC_DEFINE_UNQUOTED(_UTMP_FILE, "$utmpdir/utmp")
AC_MSG_RESULT($utmpdir)
break
fi
done
2002-01-04 21:38:54 +00:00
AC_MSG_CHECKING(location of lastlog/wtmp)
2002-01-02 22:17:58 +00:00
for logdir in /var/log /var/adm /usr/adm /etc; do
if test -d $logdir; then
AC_DEFINE_UNQUOTED(_WTMP_FILE, "$logdir/wtmp")
AC_DEFINE_UNQUOTED(LASTLOG_FILE, "$logdir/lastlog")
AC_MSG_RESULT($logdir)
break
fi
done
2001-08-17 05:46:24 +00:00
AC_OUTPUT(
2001-11-03 21:57:45 +00:00
Makefile.global
2001-08-17 05:46:24 +00:00
mbfido/paths.h
2002-01-05 13:57:10 +00:00
unix/login.defs
2001-08-17 05:46:24 +00:00
INSTALL
FILE_ID.DIZ
)