2
dnl Copyright (C) 1999 Walter Hofmann
4
dnl This program is free software; you can redistribute it and/or modify
5
dnl it under the terms of the GNU General Public License version 2 as
6
dnl published by the Free Software Foundation.
8
dnl This program is distributed in the hope that it will be useful,
9
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
10
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
dnl GNU General Public License for more details.
13
dnl You should have received a copy of the GNU General Public License
14
dnl along with this program; if not, write to the Free Software
15
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
dnl Process this file with autoconf to produce a configure script.
19
AC_INIT([CoreWars], [0.9.13], [walterh@gmx.de], [corewars])
21
AC_CONFIG_AUX_DIR([build])
22
AC_CONFIG_SRCDIR([src/main.h])
25
AM_CONFIG_HEADER(config.h)
27
if test "$CFLAGS"; then
31
dnl Checks for programs.
39
AM_PATH_GLIB(1.2.0,,COREWARS=;AC_MSG_ERROR([
41
************************************************************************
42
*** GLIB >= 1.2.0 not installed - cannot build GUI client without it ***
43
************************************************************************
45
AM_PATH_GTK(1.2.0,,COREWARS=;AC_MSG_ERROR([
47
************************************************************************
48
*** GTK+ >= 1.2.0 not installed - cannot build GUI client without it ***
49
************************************************************************
52
LIBS="$LIBS $GTK_LIBS"
53
GTK_INCLUDE=`gtk-config --cflags`
55
INCLUDES="$INCLUDES $GTK_INCLUDE"
57
dnl Checks for header files.
60
AC_CHECK_HEADERS(limits.h malloc.h string.h unistd.h)
62
dnl Check for libc >= 2.1
64
AC_CHECK_HEADERS(argp.h,COREWARSCMD=corewars-cmd,AC_MSG_WARN([
66
********************************************************************************
67
*** glibc >= 2.1 not installed - cannot build command line client without it ***
68
*** (but this is ok if you want the GTK+ client only) ***
69
********************************************************************************
72
dnl Checks for typedefs, structures, and compiler characteristics.
75
dnl Checks for library functions.
77
AC_CHECK_FUNCS(get_current_dir_name strdup)
83
dnl if test -z "$COREWARS"; then
84
dnl if test -z "$COREWARSCMD"; then
85
dnl { echo "configure: error: nothing left that could be built" 1>&2; exit 1; }
89
dnl Use option --enable-gcc-debug to enable the GCC debug code.
90
AC_ARG_ENABLE(gcc-debug,
91
[ --enable-gcc-debug enable the GCC DEBUG code],
92
[enable_gcc_debug=yes],
93
[enable_gcc_debug=no])
94
if test "$enable_gcc_debug" = "yes" && (test "$GCC" = "yes"); then
95
if test -z "$CFLAGS_CUSTOM"; then
100
AC_MSG_RESULT([Enabling GCC DEBUG support...])
102
if test -z "$CFLAGS_CUSTOM" && (test "$GCC" = "yes"); then
107
AC_CONFIG_FILES([Makefile programs/Makefile contrib/Makefile
108
doc/Makefile src/Makefile])