dnl Process this file with autoconf to produce a configure script. AC_INIT(src/kserver.c) AM_INIT_AUTOMAKE(koth, 0.8.0) AM_CONFIG_HEADER(config.h) AC_PROG_MAKE_SET USER_CFLAGS=$CFLAGS dnl Checks for programs. AC_PROG_CC AC_ISC_POSIX AC_PROG_RANLIB CFLAGS="-g -O2 -Wall -Wimplicit $USER_CFLAGS" dnl Checks for library functions. AC_ARG_ENABLE(client, [ --disable-client disable libggi detection (can only build server)], if test $enableval == no; then AC_MSG_RESULT([Skipping libggi detection - you will only be able to build the server!]) DO_USE_GGI=0 else DO_USE_GGI=1 fi, DO_USE_GGI=1) if test $DO_USE_GGI = 1; then AC_CHECK_LIB(ggi, ggiInit, CLIENTLIBS=" -lggi $CLIENTLIBS", AC_MSG_RESULT([*** Error! needs LibGGI to compile ***]) AC_MSG_RESULT([please download and install LibGGI and LibGII from]) AC_MSG_RESULT([ftp://ftp.ggi-project.org/pub/ggi/ggi/current/ and try again]) exit) fi AM_CONDITIONAL(BUILD_CLIENT, test x$DO_USE_GGI = x1) AC_CHECK_LIB(m, cos, REQLIBS=" -lm $REQLIBS", AC_MSG_ERROR("You do not have a math library??? KOTH cannot continue\!")) AC_CHECK_LIB(socket, socket) AC_CHECK_LIB(nsl, gethostbyname) dnl Checks for header files. AC_STDC_HEADERS AC_CHECK_HEADERS(sys/select.h) dnl checks for type sizes AC_CHECK_SIZEOF(char, 1) AC_CHECK_SIZEOF(short int, 2) AC_CHECK_SIZEOF(int, 4) AC_SUBST(CLIENTLIBS) AC_SUBST(REQLIBS) AC_OUTPUT(Makefile src/Makefile src/baseimages/Makefile src/weapons/Makefile doc/Makefile)