+ dnl add extra odbc libs if we have compiled in odbc
+ if test "$wxUSE_ODBC" = "yes" ; then
+ LIBS="$LIBS -lodbc32 -lole32 -loleaut32"
+ fi
+
+ dnl -mwindows is needed to avoid that spawning of a console window
+ if test "$wxUSE_MINGW" = 1; then
+ LDFLAGS="$LDFLAGS -mwindows"
+ fi
+
+ TOOLKIT=MSW
+ GUIDIST=MSW_DIST
+
+ dnl we should calculate these
+ RCINCSWITCH="--include-dir"
+ RCDEFSWITCH="--define"
+ RCPREPROCESSOR="--preprocessor \"\$(CC) -c -E -xc-header -DRC_INVOKED\""
+ RCINPUTSWITCH="-i"
+ RCOUTPUTSWITCH="-o"
+ RESFLAGS="$RCPREPROCESSOR $RCINCSWITCH \$(top_srcdir)/include $RCINCSWITCH \$(top_srcdir)/\$(program_dir) $RCDEFSWITCH __WIN32__ $RCDEFSWITCH __WIN95__ $RCDEFSWITCH __GNUWIN32__"
+
+ dnl set optinal RES_PROGRAM_OPT to RES_PROGRAM
+ RESPROGRAM="\$(RES_PROGRAM)"
+ fi
+
+ if test "$wxUSE_GTK" = 1; then
+ AC_MSG_CHECKING([for GTK+ version])
+
+ gtk_version_cached=1
+ AC_CACHE_VAL(wx_cv_lib_gtk,
+ [
+ dnl stupid GTK+ AM macros produce their own messages, so we
+ dnl have to pass to the next line
+ gtk_version_cached=0
+ AC_MSG_RESULT("")
+
+ wx_cv_lib_gtk=
+ if test "x$wxUSE_GTK2" = "xyes"; then
+ AM_PATH_GTK_2_0(1.3.1, wx_cv_lib_gtk=2.0, gthread)
+ fi
+
+ if test -z "$wx_cv_lib_gtk"; then
+ AM_PATH_GTK(1.2.7, wx_cv_lib_gtk=1.2.7)
+ fi
+
+ if test -z "$wx_cv_lib_gtk"; then
+ AM_PATH_GTK(1.2.3, wx_cv_lib_gtk=1.2.3)
+ fi
+
+ if test -z "$wx_cv_lib_gtk"; then
+ dnl looks better in AC_MSG_RESULT
+ wx_cv_lib_gtk=none
+ else
+ dnl we need to cache GTK_CFLAGS and GTK_LIBS for the
+ dnl subsequent runs
+ wx_cv_cflags_gtk=$GTK_CFLAGS
+ wx_cv_libs_gtk=$GTK_LIBS
+ fi
+ ]
+ )
+
+ dnl if it wasn't cached, the messages from AM_PATH_GTK() above are
+ dnl enough
+ if test "$gtk_version_cached" = 1; then
+ AC_MSG_RESULT($wx_cv_lib_gtk)
+ fi
+
+ case "$wx_cv_lib_gtk" in
+ 2.0) WXGTK20=1
+ ;;
+ 1.2.7) WXGTK127=1
+ WXGTK12=1
+ ;;
+ 1.2.3) WXGTK12=1
+ ;;
+ *) AC_MSG_ERROR([
+Please check that gtk-config is in path, the directory
+where GTK+ libraries are installed (returned by
+'gtk-config --libs' command) is in LD_LIBRARY_PATH or
+equivalent variable and GTK+ is version 1.2.3 or above.
+ ])
+ ;;
+ esac
+
+ TOOLKIT_INCLUDE="$wx_cv_cflags_gtk"
+ GUI_TK_LIBRARY="$wx_cv_libs_gtk"
+
+ AFMINSTALL=afminstall
+ TOOLKIT=GTK
+ GUIDIST=GTK_DIST
+
+ dnl test for XIM support in libgdk
+ AC_CHECK_LIB(gdk, gdk_im_open, AC_DEFINE(HAVE_XIM))
+ fi
+
+ if test "$wxUSE_MGL" = 1; then
+ dnl FIXME_MGL - test for MGL's variants for freebsd etc.
+
+ AC_MSG_CHECKING(for SciTech MGL library)
+ if test "x$MGL_ROOT" = x ; then
+ AC_MSG_RESULT(not found)
+ AC_MSG_ERROR([Cannot find MGL library. Make sure MGL_ROOT is set.])
+ else
+ AC_MSG_RESULT($MGL_ROOT)
+ fi
+
+ MGL_OS=linux/gcc/glibc
+ MGL_LIB_TYPE=""
+
+ if test "$wxUSE_DEBUG_FLAG" = yes ; then
+ if test -f $MGL_ROOT/lib/debug/$MGL_OS/libmgl.a ; then
+ MGL_LIB_TYPE=debug
+ fi
+ fi
+ if test "x$MGL_LIB_TYPE" = x ; then
+ if test -f $MGL_ROOT/lib/release/$MGL_OS/libmgl.a ; then
+ MGL_LIB_TYPE=release
+ else
+ AC_MSG_ERROR([Cannot find MGL libraries, make sure they are compiled.])
+ fi
+ fi
+
+ TOOLKIT_INCLUDE="-I$MGL_ROOT/include"
+ GUI_TK_LIBRARY="-L$MGL_ROOT/lib/$MGL_LIB_TYPE/$MGL_OS -lmgl -lmglcpp -lpm"
+
+ AFMINSTALL=afminstall
+ TOOLKIT=MGL
+ GUIDIST=MGL_DIST
+ fi
+
+ if test "$wxUSE_WINE" = 1; then
+ AC_MSG_CHECKING(for WINE includes)