dnl Process this file with autoconf to produce a configure script. AC_INIT(sources/libgambit/libgambit.h) AM_INIT_AUTOMAKE(gambit, 0.2007.01.30) dnl AM_CONFIG_HEADER(config.h) dnl User-specified options dnl By default, we build the GUI WITH_GUI=1 AC_ARG_ENABLE(gui, [ --disable-gui Don't build graphical interface ], WITH_GUI=0 GUI_DIRS="" ) dnl Checks for programs. AC_PROG_CC AC_PROG_CXX AC_PROG_LIBTOOL dnl A number of the following checks are currently commented out. dnl These are checks for functions and headers we do actually use, dnl but for which we don't have any workarounds should they be missing. dnl Checks for header files. dnl AC_HEADER_STDC dnl AC_CHECK_HEADERS(fcntl.h limits.h malloc.h sys/time.h unistd.h) dnl Checks for typedefs, structures, and compiler characteristics. dnl AC_C_CONST dnl AC_C_INLINE dnl AC_TYPE_PID_T dnl AC_TYPE_SIZE_T dnl AC_STRUCT_TM dnl Checks for library functions. dnl AC_FUNC_MEMCMP dnl AC_TYPE_SIGNAL dnl AC_CHECK_FUNCS(ftime putenv strdup strstr strtod strtol) AC_CHECK_FUNCS(bcmp srand48 drand48) if test "${WITH_GUI}" == 1; then dnl------------------------ dnl Checking for wxWidgets dnl------------------------ dnl check for wx-config WX_PATH_WXCONFIG(2.6.0, WXCONFIG=1) if test "$WXCONFIG" != 1; then AC_MSG_WARN([ Did not find a version of wxWidgets; disabling build of graphical interface. If you want to build the graphical interface, please check that wx-config is in path, the directory where wxWidgets libraries are installed (returned by 'wx-config --libs' command) is in LD_LIBRARY_PATH or equivalent variable and wxWidgets is version 2.6.0 or above. ]) GUI_DIRS="" fi AC_MSG_CHECKING(for wxWidgets port) if test `echo ${WX_CXXFLAGS} | grep -c __WXX11__` -eq 1; then AC_MSG_RESULT(universal) AC_MSG_WARN([ Found universal port of wxWidgets; disabling build of graphical interface. The graphical interface cannot be built with this port because this port does not implement drag-and-drop capability. Gambit recommends the GTK port of wxWidgets for best results. ]) GUI_DIRS="" fi if test `echo ${WX_CXXFLAGS} | grep -c __WXMOTIF__` -eq 1; then AC_MSG_RESULT(Motif) AC_MSG_WARN([ Found Motif port of wxWidgets; disabling build of graphical interface. The graphical interface cannot be built with this port because this port does not implement drag-and-drop capability. Gambit recommends the GTK port of wxWidgets for best results. ]) GUI_DIRS="" fi if test `echo ${WX_CXXFLAGS} | grep -c __WXGTK__` -eq 1; then AC_MSG_RESULT(GTK) WXPORT="GTK" GUI_DIRS="labenski gui" fi if test `echo ${WX_CXXFLAGS} | grep -c __WXMSW__` -eq 1; then AC_MSG_RESULT(Windows) WXPORT="MSW" GUI_DIRS="labenski gui" dnl Windows uses the resources file RC_OBJECT="gambitrc.o" RC_OBJECT_PATH="bitmaps/gambitrc.o" AC_SUBST(RC_OBJECT) AC_SUBST(RC_OBJECT_PATH) fi if test `echo ${WX_CXXFLAGS} | grep -c __WXMAC__` -eq 1; then AC_MSG_RESULT(Macintosh) WXPORT="MAC" GUI_DIRS="labenski gui" fi if test -z "$WXPORT"; then AC_MSG_WARN([ Could not identify wxWidgets port. Disabling build of Gambit graphical interface. ]) GUI_DIRS="" fi fi AC_SUBST(GUI_DIRS) AC_SUBST(WX_CXXFLAGS) AC_SUBST(WX_LIBS) REZFLAGS=`echo $CXXFLAGS $WX_CXXFLAGS | sed 's/-mthreads//g' | sed 's/-g//g' | sed 's/-O. / /g' | sed 's/-I/--include-dir /g'` AC_SUBST(REZFLAGS) AC_OUTPUT(Makefile sources/Makefile \ sources/libgambit/Makefile \ sources/tools/Makefile \ sources/tools/convert/Makefile \ sources/tools/enummixed/Makefile \ sources/tools/enumpoly/Makefile \ sources/tools/enumpure/Makefile \ sources/tools/gt/Makefile \ sources/tools/lcp/Makefile \ sources/tools/liap/Makefile \ sources/tools/logit/Makefile \ sources/tools/lp/Makefile \ sources/tools/simpdiv/Makefile \ sources/labenski/Makefile \ sources/labenski/art/Makefile \ sources/labenski/include/Makefile \ sources/labenski/include/wx/Makefile \ sources/labenski/include/wx/wxthings/bitmaps/Makefile \ sources/labenski/include/wx/wxthings/Makefile \ sources/labenski/include/wx/sheet/Makefile \ sources/labenski/include/wx/plotctrl/Makefile \ sources/labenski/src/Makefile \ sources/labenski/doc/Makefile \ sources/gui/bitmaps/Makefile \ sources/gui/Makefile \ doc/Makefile efg/Makefile nfg/Makefile)