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
|
AC_PREREQ(2.53)
AC_INIT(aclocal.m4)
AC_CANONICAL_SYSTEM
AM_OPTIONS_WXCONFIG
AC_PROG_CXX
AC_ARG_ENABLE(debug,
[ --enable-debug Enable debugging information],
USE_DEBUG="$enableval", USE_DEBUG="no")
if test $USE_DEBUG = yes ; then
DEBUG=1
FINAL=0
dnl Bakefile doesn't touch {C,CPP,CXX,LD}FLAGS in autoconf format, we
dnl have to do it ourselves. (Incorrectly) assuming GCC here:
CFLAGS="$CFLAGS -g"
else
DEBUG=0
FINAL=1
fi
# Check for wxWindows
AM_PATH_WXCONFIG([2.6.0], [], [
AC_MSG_ERROR([
wxWindows must be installed on your system
but wx-config script couldn't be found.
Please check that wx-config is in path, the directory
where wxWindows libraries are installed (returned by
'wx-config --libs' command) is in LD_LIBRARY_PATH or
equivalent variable and wxWindows version is 2.6.0 or above.
])], [stc,std])
CPPFLAGS="$CPPFLAGS $WX_CXXFLAGS"
LDFLAGS="$LDFLAGS $WX_LDFLAGS $WX_LIBS"
AC_BAKEFILE([m4_include(autoconf_inc.m4)])
if test $GCC_PCH = 1 ; then
CPPFLAGS="$CPPFLAGS -DWX_PRECOMP"
fi
dnl -----------------------------------------------------------------------
dnl install prefix
dnl -----------------------------------------------------------------------
if test "x$prefix" != "xNONE"; then
FR_PREFIX=$prefix
else
FR_PREFIX=$ac_default_prefix
fi
AC_DEFINE_UNQUOTED(FR_INSTALL_PREFIX, "$FR_PREFIX")
dnl -----------------------------------------------------------------------
dnl wxWidgets include directories to find wx.rc
dnl -----------------------------------------------------------------------
WX_INCLUDES=""
for opt in $WX_CPPFLAGS
do
case "$opt" in
-I*)
WX_INCLUDES="$WX_INCLUDES --include-dir `echo "$opt" | sed 's/^-I//'`"
;;
esac
done
AC_SUBST(WX_INCLUDES)
AC_CONFIG_HEADERS([ frconfig.h:frconfig.h.in ])
AC_CONFIG_FILES([ Makefile ])
AC_OUTPUT
|