gmrun/configure.in

86 lines
2.0 KiB
Plaintext
Raw Normal View History

2001-02-23 07:48:14 +00:00
dnl Process this file with autoconf to produce a configure script.
AC_INIT(configure.in)
2002-08-17 13:17:55 +00:00
AM_INIT_AUTOMAKE(gmrun, 0.8.1)
2001-02-23 07:48:14 +00:00
AM_CONFIG_HEADER(config.h)
AC_ARG_ENABLE(debug,
[ --enable-debug=[no/yes] Debugging information == no <--> optimization == yes],,
enable_debug=no)
if [ ! test "x$enable_debug" != "xyes"]; then
CFLAGS="-g3 -O0 -DDEBUG"
CXXFLAGS="-g3 -O0 -DDEBUG"
fi
AC_ARG_ENABLE(system,
[ --enable-system=[yes/no] Use "system" libc function to run commands ],,
enable_system=no)
if [ ! test "x$enable_system" != "xyes"]; then
CFLAGS="$CFLAGS -DUSE_SYSTEM"
CXXFLAGS="$CXXFLAGS -DUSE_SYSTEM"
fi
2002-08-17 13:17:55 +00:00
AC_ARG_ENABLE(mtrace,
[ --enable-mtrace=[no/yes] Trace memory (de)allocation calls to detect memory leaks ],,
enable_mtrace=no)
if [ ! test "x$enable_mtrace" != "xyes"]; then
CFLAGS="$CFLAGS -DMTRACE"
CXXFLAGS="$CXXFLAGS -DMTRACE"
fi
2001-02-23 07:48:14 +00:00
AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_PROG_CXX
AC_PATH_STLPORT_LIB
AC_PATH_STLPORT_INC
2001-02-23 07:48:14 +00:00
AM_PATH_GTK(1.2.6, ,
AC_MSG_ERROR(Cannot find GTK: Is gtk-config in path?))
dnl Set PACKAGE_DATA_DIR in config.h.
if test "x${datadir}" = 'x${prefix}/share'; then
if test "x${prefix}" = "xNONE"; then
prefix=/usr/local
2001-02-23 07:48:14 +00:00
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}")
PACKAGE_DATA_DIR="${ac_default_prefix}/share/${PACKAGE}"
2001-02-23 07:48:14 +00:00
else
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}")
PACKAGE_DATA_DIR="${prefix}/share/${PACKAGE}"
2001-02-23 07:48:14 +00:00
fi
else
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${datadir}/${PACKAGE}")
PACKAGE_DATA_DIR="${datadir}/${PACKAGE}"
2001-02-23 07:48:14 +00:00
fi
AC_SUBST(PACKAGE_DATA_DIR)
2001-02-23 07:48:14 +00:00
PREFIX=${prefix}
AC_SUBST(PREFIX)
2001-02-23 07:48:14 +00:00
dnl Set PACKAGE_SOURCE_DIR in config.h.
packagesrcdir=`cd $srcdir && pwd`
AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}")
dnl Use -Wall if we have gcc.
changequote(,)dnl
if test "x$GCC" = "xyes"; then
case " $CFLAGS " in
*[\ \ ]-Wall[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wall" ;;
esac
fi
changequote([,])dnl
AC_OUTPUT([
Makefile
src/Makefile
config/Makefile
2001-07-30 15:07:11 +00:00
gmrun.spec
2001-02-23 07:48:14 +00:00
])