diff --git a/Makefile.global.in b/Makefile.global.in index 8407c19a..35922c82 100644 --- a/Makefile.global.in +++ b/Makefile.global.in @@ -36,6 +36,5 @@ JOELIB = @joelib@ CFLAGS = @CFLAGS@ LIBS = @LIBS@ PTLIBS = @PTLIBS@ -LDFLAGS = @LDFLAGS@ DEFS = @DEFS@ diff --git a/configure b/configure index c75097b1..1040aa7b 100755 --- a/configure +++ b/configure @@ -1275,7 +1275,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SUBDIRS="lib mbcico mbfido mbmon mbsebbs mbtask mbsetup unix lang examples html script" - ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then @@ -1384,8 +1383,6 @@ test -n "$target_alias" && NONENONEs,x,x, && program_prefix=${target_alias}- -echo "$host_cpu $host_os" - PACKAGE="mbsebbs" MAJOR="0" MINOR="39" @@ -1428,7 +1425,6 @@ cat >>confdefs.h <<_ACEOF _ACEOF - SYSTEM="`uname -s`" CPU="`uname -m`" @@ -3034,7 +3030,6 @@ if test "$experiment" = "yes"; then _ACEOF fi - # Check whether --enable-debugging or --disable-debugging was given. if test "${enable_debugging+set}" = set; then enableval="$enable_debugging" @@ -3045,10 +3040,13 @@ fi; if test "$debugging" = "yes"; then CFLAGS="-O -g -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes" else - CFLAGS="${CFLAGS} -march=${target_cpu} -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes" + CFLAGS="-O3 -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes" fi +if test "$SYSTEM" = "NetBSD"; then + CFLAGS="$CFLAGS -I /usr/pkg/include" +fi if test "$SYSTEM" = "FreeBSD"; then CFLAGS="-pthread $CFLAGS" @@ -3058,6 +3056,7 @@ else fi + cat >>confdefs.h <<_ACEOF #define RESTAMP_OLD_POSTINGS 21 _ACEOF @@ -4674,6 +4673,7 @@ done fi + ZLIBSUP=No echo "$as_me:$LINENO: checking for compress2 in -lz" >&5 echo $ECHO_N "checking for compress2 in -lz... $ECHO_C" >&6 @@ -5091,6 +5091,7 @@ done fi + echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then diff --git a/configure.in b/configure.in index dfaea316..84523b69 100644 --- a/configure.in +++ b/configure.in @@ -5,13 +5,12 @@ AC_INIT(lib/libs.h) AM_CONFIG_HEADER(config.h) SUBDIRS="lib mbcico mbfido mbmon mbsebbs mbtask mbsetup unix lang examples html script" AC_SUBST(SUBDIRS) - AC_CANONICAL_TARGET -echo "$host_cpu $host_os" - +dnl dnl General settings for MBSE BBS dnl After changeing the version number, run autoconf! +dnl PACKAGE="mbsebbs" MAJOR="0" MINOR="39" @@ -36,12 +35,13 @@ AC_DEFINE_UNQUOTED(VERSION_REVISION, $REVISION) AC_DEFINE_UNQUOTED(COPYRIGHT, "$COPYRIGHT") AC_DEFINE_UNQUOTED(SHORTRIGHT, "$SHORTRIGHT") AC_SUBST(VERSION) - SYSTEM="`uname -s`" CPU="`uname -m`" +dnl dnl Checks for programs. dnl Try to find GNU make +dnl AC_CHECK_PROG(MAKE, gmake, gmake) AC_CHECK_PROG(MAKE, make, make) dnl Alternate awk check, I skip mawk because it doesn't work for MBSE. @@ -61,20 +61,27 @@ AC_C_BIGENDIAN AC_SYS_LONG_FILE_NAMES +dnl dnl Additional commandline switches +dnl AC_ARG_ENABLE(experiment, [ --enable-experiment Compile experimental code], [ experiment=$enableval ], [ experiment=no ]) if test "$experiment" = "yes"; then AC_DEFINE(USE_EXPERIMENT) fi - AC_ARG_ENABLE(debugging, [ --enable-debugging Compile for debugging], [ debugging=$enableval ], [ debugging=no ]) if test "$debugging" = "yes"; then CFLAGS="-O -g -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes" else - CFLAGS="${CFLAGS} -march=${target_cpu} -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes" + CFLAGS="-O3 -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes" fi +dnl +dnl On NetBSD we need to add the pkg dirs +dnl +if test "$SYSTEM" = "NetBSD"; then + CFLAGS="$CFLAGS -I /usr/pkg/include" +fi dnl dnl For FreeBSD we need -pthread for GCC @@ -87,11 +94,16 @@ else fi AC_SUBST(PTLIBS) + +dnl dnl Defines for MBSE BBS (must use tests or --enable-stuff later) +dnl AC_DEFINE_UNQUOTED(RESTAMP_OLD_POSTINGS, 21) AC_DEFINE(RESTAMP_FUTURE_POSTINGS) -dnl Checks for libraries. +dnl +dnl Checks for libraries and functions. +dnl AC_CHECK_LIB(compat,re_comp,result=yes,result=no) if test "$result" = "yes"; then LIBS="$LIBS -lcompat" @@ -157,6 +169,10 @@ if test "$result" = "yes"; then AC_CHECK_HEADERS(sys/types.h) fi + +dnl +dnl Support for zlib transfers compression +dnl ZLIBSUP=No AC_CHECK_LIB(z,compress2,result=yes,result=no) if test "$result" = "yes"; then @@ -164,13 +180,19 @@ if test "$result" = "yes"; then AC_CHECK_HEADERS(zlib.h,ZLIBSUP=Yes,ZLIBSUP=No) fi +dnl +dnl POSIX threads +dnl PTHREADS=No AC_CHECK_LIB(pthread,pthread_create,result=yes,result=no) if test "$result" = "yes"; then AC_CHECK_HEADERS(pthread.h,PTHREADS=Yes,PTHREADS=No) fi + +dnl dnl Checks for header files. +dnl AC_HEADER_STDC AC_HEADER_DIRENT AC_HEADER_TIME @@ -180,7 +202,9 @@ AC_CHECK_HEADERS(sys/resource.h usersec.h utime.h ulimit.h gshadow.h shadow.h) AC_CHECK_HEADERS(limits.h utmp.h utmpx.h lastlog.h rpc/key_prot.h) AC_STRUCT_TIMEZONE +dnl dnl Checks for typedefs, structures, and compiler characteristics. +dnl AC_C_CONST AC_TYPE_UID_T AC_TYPE_OFF_T @@ -191,7 +215,9 @@ AC_STRUCT_ST_BLKSIZE AC_HEADER_STAT AC_STRUCT_TM +dnl dnl Checks for library functions. +dnl AC_CHECK_FUNCS(c64i a64l fchmod fchown fdatasync fsync lckpwdf strcasestr putpwent) AC_PROG_GCC_TRADITIONAL AC_FUNC_MEMCMP @@ -203,7 +229,9 @@ AC_FUNC_VPRINTF AC_CHECK_FUNCS(gettimeofday re_comp select socket uname) AC_CHECK_FUNCS(getspnam initgroups updwtmp updwtmpx) -dnl Check for external programs +dnl +dnl Check for usefull external programs +dnl AC_PATH_PROG(COMPRESS,compress,no-compress-found-during-configure) AC_PATH_PROG(GZIP,gzip,no-gzip-found-during-configure) AC_PATH_PROG(ARC,arc) diff --git a/lib/libs.h b/lib/libs.h index f7d2d548..668ae381 100644 --- a/lib/libs.h +++ b/lib/libs.h @@ -83,10 +83,6 @@ #include #include #include -#include -#ifdef HAVE_ICONV_H -#include -#endif #ifdef HAVE_ZLIB_H #include #endif