Updates to compile on non-intel systems

This commit is contained in:
Michiel Broek 2003-12-18 20:19:40 +00:00
parent bd3d44e8b5
commit 35ffac561e
4 changed files with 43 additions and 19 deletions

View File

@ -36,6 +36,5 @@ JOELIB = @joelib@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
LIBS = @LIBS@ LIBS = @LIBS@
PTLIBS = @PTLIBS@ PTLIBS = @PTLIBS@
LDFLAGS = @LDFLAGS@
DEFS = @DEFS@ DEFS = @DEFS@

13
configure vendored
View File

@ -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" SUBDIRS="lib mbcico mbfido mbmon mbsebbs mbtask mbsetup unix lang examples html script"
ac_aux_dir= ac_aux_dir=
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
if test -f $ac_dir/install-sh; then if test -f $ac_dir/install-sh; then
@ -1384,8 +1383,6 @@ test -n "$target_alias" &&
NONENONEs,x,x, && NONENONEs,x,x, &&
program_prefix=${target_alias}- program_prefix=${target_alias}-
echo "$host_cpu $host_os"
PACKAGE="mbsebbs" PACKAGE="mbsebbs"
MAJOR="0" MAJOR="0"
MINOR="39" MINOR="39"
@ -1428,7 +1425,6 @@ cat >>confdefs.h <<_ACEOF
_ACEOF _ACEOF
SYSTEM="`uname -s`" SYSTEM="`uname -s`"
CPU="`uname -m`" CPU="`uname -m`"
@ -3034,7 +3030,6 @@ if test "$experiment" = "yes"; then
_ACEOF _ACEOF
fi fi
# Check whether --enable-debugging or --disable-debugging was given. # Check whether --enable-debugging or --disable-debugging was given.
if test "${enable_debugging+set}" = set; then if test "${enable_debugging+set}" = set; then
enableval="$enable_debugging" enableval="$enable_debugging"
@ -3045,10 +3040,13 @@ fi;
if test "$debugging" = "yes"; then if test "$debugging" = "yes"; then
CFLAGS="-O -g -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes" CFLAGS="-O -g -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes"
else else
CFLAGS="${CFLAGS} -march=${target_cpu} -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes" CFLAGS="-O3 -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes"
fi fi
if test "$SYSTEM" = "NetBSD"; then
CFLAGS="$CFLAGS -I /usr/pkg/include"
fi
if test "$SYSTEM" = "FreeBSD"; then if test "$SYSTEM" = "FreeBSD"; then
CFLAGS="-pthread $CFLAGS" CFLAGS="-pthread $CFLAGS"
@ -3058,6 +3056,7 @@ else
fi fi
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
#define RESTAMP_OLD_POSTINGS 21 #define RESTAMP_OLD_POSTINGS 21
_ACEOF _ACEOF
@ -4674,6 +4673,7 @@ done
fi fi
ZLIBSUP=No ZLIBSUP=No
echo "$as_me:$LINENO: checking for compress2 in -lz" >&5 echo "$as_me:$LINENO: checking for compress2 in -lz" >&5
echo $ECHO_N "checking for compress2 in -lz... $ECHO_C" >&6 echo $ECHO_N "checking for compress2 in -lz... $ECHO_C" >&6
@ -5091,6 +5091,7 @@ done
fi fi
echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
if test "${ac_cv_header_stdc+set}" = set; then if test "${ac_cv_header_stdc+set}" = set; then

View File

@ -5,13 +5,12 @@ AC_INIT(lib/libs.h)
AM_CONFIG_HEADER(config.h) AM_CONFIG_HEADER(config.h)
SUBDIRS="lib mbcico mbfido mbmon mbsebbs mbtask mbsetup unix lang examples html script" SUBDIRS="lib mbcico mbfido mbmon mbsebbs mbtask mbsetup unix lang examples html script"
AC_SUBST(SUBDIRS) AC_SUBST(SUBDIRS)
AC_CANONICAL_TARGET AC_CANONICAL_TARGET
echo "$host_cpu $host_os" dnl
dnl General settings for MBSE BBS dnl General settings for MBSE BBS
dnl After changeing the version number, run autoconf! dnl After changeing the version number, run autoconf!
dnl
PACKAGE="mbsebbs" PACKAGE="mbsebbs"
MAJOR="0" MAJOR="0"
MINOR="39" MINOR="39"
@ -36,12 +35,13 @@ AC_DEFINE_UNQUOTED(VERSION_REVISION, $REVISION)
AC_DEFINE_UNQUOTED(COPYRIGHT, "$COPYRIGHT") AC_DEFINE_UNQUOTED(COPYRIGHT, "$COPYRIGHT")
AC_DEFINE_UNQUOTED(SHORTRIGHT, "$SHORTRIGHT") AC_DEFINE_UNQUOTED(SHORTRIGHT, "$SHORTRIGHT")
AC_SUBST(VERSION) AC_SUBST(VERSION)
SYSTEM="`uname -s`" SYSTEM="`uname -s`"
CPU="`uname -m`" CPU="`uname -m`"
dnl
dnl Checks for programs. dnl Checks for programs.
dnl Try to find GNU make dnl Try to find GNU make
dnl
AC_CHECK_PROG(MAKE, gmake, gmake) AC_CHECK_PROG(MAKE, gmake, gmake)
AC_CHECK_PROG(MAKE, make, make) AC_CHECK_PROG(MAKE, make, make)
dnl Alternate awk check, I skip mawk because it doesn't work for MBSE. 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 AC_SYS_LONG_FILE_NAMES
dnl
dnl Additional commandline switches dnl Additional commandline switches
dnl
AC_ARG_ENABLE(experiment, [ --enable-experiment Compile experimental code], [ experiment=$enableval ], [ experiment=no ]) AC_ARG_ENABLE(experiment, [ --enable-experiment Compile experimental code], [ experiment=$enableval ], [ experiment=no ])
if test "$experiment" = "yes"; then if test "$experiment" = "yes"; then
AC_DEFINE(USE_EXPERIMENT) AC_DEFINE(USE_EXPERIMENT)
fi fi
AC_ARG_ENABLE(debugging, [ --enable-debugging Compile for debugging], [ debugging=$enableval ], [ debugging=no ]) AC_ARG_ENABLE(debugging, [ --enable-debugging Compile for debugging], [ debugging=$enableval ], [ debugging=no ])
if test "$debugging" = "yes"; then if test "$debugging" = "yes"; then
CFLAGS="-O -g -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes" CFLAGS="-O -g -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes"
else else
CFLAGS="${CFLAGS} -march=${target_cpu} -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes" CFLAGS="-O3 -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes"
fi 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
dnl For FreeBSD we need -pthread for GCC dnl For FreeBSD we need -pthread for GCC
@ -87,11 +94,16 @@ else
fi fi
AC_SUBST(PTLIBS) AC_SUBST(PTLIBS)
dnl
dnl Defines for MBSE BBS (must use tests or --enable-stuff later) dnl Defines for MBSE BBS (must use tests or --enable-stuff later)
dnl
AC_DEFINE_UNQUOTED(RESTAMP_OLD_POSTINGS, 21) AC_DEFINE_UNQUOTED(RESTAMP_OLD_POSTINGS, 21)
AC_DEFINE(RESTAMP_FUTURE_POSTINGS) 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) AC_CHECK_LIB(compat,re_comp,result=yes,result=no)
if test "$result" = "yes"; then if test "$result" = "yes"; then
LIBS="$LIBS -lcompat" LIBS="$LIBS -lcompat"
@ -157,6 +169,10 @@ if test "$result" = "yes"; then
AC_CHECK_HEADERS(sys/types.h) AC_CHECK_HEADERS(sys/types.h)
fi fi
dnl
dnl Support for zlib transfers compression
dnl
ZLIBSUP=No ZLIBSUP=No
AC_CHECK_LIB(z,compress2,result=yes,result=no) AC_CHECK_LIB(z,compress2,result=yes,result=no)
if test "$result" = "yes"; then if test "$result" = "yes"; then
@ -164,13 +180,19 @@ if test "$result" = "yes"; then
AC_CHECK_HEADERS(zlib.h,ZLIBSUP=Yes,ZLIBSUP=No) AC_CHECK_HEADERS(zlib.h,ZLIBSUP=Yes,ZLIBSUP=No)
fi fi
dnl
dnl POSIX threads
dnl
PTHREADS=No PTHREADS=No
AC_CHECK_LIB(pthread,pthread_create,result=yes,result=no) AC_CHECK_LIB(pthread,pthread_create,result=yes,result=no)
if test "$result" = "yes"; then if test "$result" = "yes"; then
AC_CHECK_HEADERS(pthread.h,PTHREADS=Yes,PTHREADS=No) AC_CHECK_HEADERS(pthread.h,PTHREADS=Yes,PTHREADS=No)
fi fi
dnl
dnl Checks for header files. dnl Checks for header files.
dnl
AC_HEADER_STDC AC_HEADER_STDC
AC_HEADER_DIRENT AC_HEADER_DIRENT
AC_HEADER_TIME 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_CHECK_HEADERS(limits.h utmp.h utmpx.h lastlog.h rpc/key_prot.h)
AC_STRUCT_TIMEZONE AC_STRUCT_TIMEZONE
dnl
dnl Checks for typedefs, structures, and compiler characteristics. dnl Checks for typedefs, structures, and compiler characteristics.
dnl
AC_C_CONST AC_C_CONST
AC_TYPE_UID_T AC_TYPE_UID_T
AC_TYPE_OFF_T AC_TYPE_OFF_T
@ -191,7 +215,9 @@ AC_STRUCT_ST_BLKSIZE
AC_HEADER_STAT AC_HEADER_STAT
AC_STRUCT_TM AC_STRUCT_TM
dnl
dnl Checks for library functions. dnl Checks for library functions.
dnl
AC_CHECK_FUNCS(c64i a64l fchmod fchown fdatasync fsync lckpwdf strcasestr putpwent) AC_CHECK_FUNCS(c64i a64l fchmod fchown fdatasync fsync lckpwdf strcasestr putpwent)
AC_PROG_GCC_TRADITIONAL AC_PROG_GCC_TRADITIONAL
AC_FUNC_MEMCMP AC_FUNC_MEMCMP
@ -203,7 +229,9 @@ AC_FUNC_VPRINTF
AC_CHECK_FUNCS(gettimeofday re_comp select socket uname) AC_CHECK_FUNCS(gettimeofday re_comp select socket uname)
AC_CHECK_FUNCS(getspnam initgroups updwtmp updwtmpx) 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(COMPRESS,compress,no-compress-found-during-configure)
AC_PATH_PROG(GZIP,gzip,no-gzip-found-during-configure) AC_PATH_PROG(GZIP,gzip,no-gzip-found-during-configure)
AC_PATH_PROG(ARC,arc) AC_PATH_PROG(ARC,arc)

View File

@ -83,10 +83,6 @@
#include <setjmp.h> #include <setjmp.h>
#include <grp.h> #include <grp.h>
#include <sys/resource.h> #include <sys/resource.h>
#include <pthread.h>
#ifdef HAVE_ICONV_H
#include <iconv.h>
#endif
#ifdef HAVE_ZLIB_H #ifdef HAVE_ZLIB_H
#include <zlib.h> #include <zlib.h>
#endif #endif