dnl --------------------------------------------------------------------------- dnl Process this file with autoconf to produce a configure script. dnl $Id$ dnl --------------------------------------------------------------------------- AC_INIT(grun.c) GRUN_VERSION=0.8.1 dnl --------------------------------------------------------------------------- dnl for automake: dnl --------------------------------------------------------------------------- AUTOMAKE_OPTIONS=no-dependencies VERSION=$GRUN_VERSION PACKAGE=grun dnl --------------------------------------------------------------------------- dnl Initialize automake now dnl --------------------------------------------------------------------------- AM_INIT_AUTOMAKE($PACKAGE, $VERSION) AC_SUBST(GRUN_VERSION) dnl --------------------------------------------------------------------------- dnl checks for needed compilers dnl --------------------------------------------------------------------------- dnl CFLAGS="" dnl if test x${CFLAGS+set} = xset ; then dnl : dnl else dnl CFLAGS="-O2 -g" dnl fi AC_PROG_CC dnl AC_PROG_CXX dnl AC_PROG_RANLIB dnl --------------------------------------------------------------------------- dnl clean compiles dnl --------------------------------------------------------------------------- compiler_warnings=yes AC_ARG_ENABLE( warnings, [ --disable-warnings turn OFF gcc compiler warnings (not recommended)], [if test $enableval = no; then compiler_warnings=no fi] ) dnl --------------------------------------------------------------------------- dnl now some other stuff dnl AC_CANONICAL_HOST ... needs config.guess dnl --------------------------------------------------------------------------- AM_CONFIG_HEADER(config.h) AM_SANITY_CHECK dnl --------------------------------------------------------------------------- dnl check for GTK dnl --------------------------------------------------------------------------- AM_PATH_GTK(1.0.1, [LIBS="$LIBS $GTK_LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS"], AC_MSG_ERROR(Cannot find GTK+: Is gtk-config in executable path?)) dnl --------------------------------------------------------------------------- dnl enable GUI/console type checking dnl --------------------------------------------------------------------------- use_testfile=no AC_ARG_ENABLE( testfile, [ --enable-testfile enable testfile code yes/no (default=no) ], [if test $enableval = yes; then AC_DEFINE(TESTFILE) use_testfile=yes fi] ) def_xterm=xterm AC_ARG_WITH( default_xterm, [ --with-default-xterm=X set default xterm (only for testfile) default=xterm ], [if test x$with_default_xterm != x; then def_xterm=$with_default_xterm fi] ) if test $use_testfile = yes; then AC_DEFINE_UNQUOTED(XTERM, "$def_xterm") fi dnl --------------------------------------------------------------------------- dnl enable file extension associations dnl --------------------------------------------------------------------------- AC_ARG_ENABLE( associations, [ --enable-associations enable associations code yes/no (default=no) ], [if test $enableval = yes; then AC_DEFINE(ASSOC) fi] ) dnl --------------------------------------------------------------------------- dnl Pass default prefix into grun dnl --------------------------------------------------------------------------- if test x$prefix != xNONE; then AC_DEFINE_UNQUOTED(PREFIX, "${prefix}") else AC_DEFINE_UNQUOTED(PREFIX, "${ac_default_prefix}") fi dnl --------------------------------------------------------------------------- dnl checks for correctly defined types dnl --------------------------------------------------------------------------- AC_TYPE_SIZE_T dnl --------------------------------------------------------------------------- dnl checks for header files & functions dnl --------------------------------------------------------------------------- AC_CHECK_HEADERS(string.h unistd.h) dnl --------------------------------------------------------------------------- dnl Makefiles to create: dnl --------------------------------------------------------------------------- AC_OUTPUT(Makefile)