1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
|
dnl Process this file with autoconf to produce a configure script.
AC_INIT(bezerk.c)
BEZERK_MAJOR_VERSION=0
BEZERK_MINOR_VERSION=3
BEZERK_MICRO_VERSION=2
BEZERK_VERSION=$BEZERK_MAJOR_VERSION.$BEZERK_MINOR_VERSION.$BEZERK_MICRO_VERSION
VERSION=$BEZERK_VERSION
PACKAGE=bezerk
AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
# Specify a configuration file
AM_CONFIG_HEADER(config.h)
AC_ARG_ENABLE(tcl, [ --enable-tcl enable tcl scripting [default=no]],
, enable_tcl="no")
dnl Enable maintainer mode
AM_MAINTAINER_MODE
dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_MAKE_SET
#AC_STDC_HEADERS
AC_ARG_PROGRAM
AM_PATH_GTK(1.0.4,,
AC_MSG_ERROR(Cannot find correct version of GTK - is gtk-config in path?))
if test "x$GCC" = "xyes"; then
if test -z "`echo "$CFLAGS" | grep "\-Wall" 2> /dev/null`" ; then
CFLAGS="$CFLAGS -Wall"
fi
if test "x$enable_ansi" = "xyes"; then
if test -z "`echo "$CFLAGS" | grep "\-ansi" 2> /dev/null`" ; then
CFLAGS="$CFLAGS -ansi"
fi
if test -z "`echo "$CFLAGS" | grep "\-pedantic" 2> /dev/null`" ; then
CFLAGS="$CFLAGS -pedantic"
fi
fi
fi
dnl Checks for libraries.
dnl Replace `main' with a function in -lm:
dnl AC_CHECK_LIB(nsl, gethostbyaddr)
dnl AC_CHECK_LIB(socket, socket)
if test "x$enable_tcl" = "xyes"; then
# Check for the TCL library
AC_CHECK_LIB(tcl, Tcl_CreateInterp,
LIBS="-ltcl8.0 -ldl -lm $LIBS"
AC_DEFINE(HAVE_TCL) , ,[-ldl -lm])
fi
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h unistd.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_HEADER_TIME
AC_TYPE_UID_T
dnl Find the X11 include and library directories
AC_PATH_X
AC_PATH_XTRA
dnl Checks for library functions.
AC_CHECK_FUNCS(gethostname gettimeofday mkdir socket strerror strtol vsnprintf)
AC_OUTPUT(Makefile version.h)
|