From 37d0a9642338bd25e4185f8c96fbef445d6988ff Mon Sep 17 00:00:00 2001 From: Kevin Rosenberg Date: Sat, 1 Aug 2009 11:08:38 -0600 Subject: [PATCH] changes to configure.ac for wx2.8 --- configure.ac | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/configure.ac b/configure.ac index 78bcb8a..7f48272 100644 --- a/configure.ac +++ b/configure.ac @@ -6,9 +6,12 @@ dnl CDPATH= AC_INIT AC_CONFIG_SRCDIR([src/ctsim.cpp]) AM_MAINTAINER_MODE -AM_INIT_AUTOMAKE(ctsim,4.5.2) +AM_INIT_AUTOMAKE(ctsim,5.0.0) AM_CONFIG_HEADER(config.h) +CFLAGS="" +CXXFLAGS="" + dnl Checks for programs. AC_PROG_AWK AC_PROG_INSTALL @@ -19,10 +22,7 @@ AC_PROG_CC AC_PROG_CXX AC_C_BIGENDIAN -AC_PATH_PROG(wxconfig,wxgtk-2.4-config) -if test -z "$wxconfig" ; then - AC_PATH_PROG(wxconfig,wx-config) -fi +AC_PATH_PROG(wxconfig,wx-config) dnl Check for C operation AC_CANONICAL_HOST @@ -44,8 +44,8 @@ AC_CHECK_LIB(readline, main, [readline=true; AC_DEFINE([HAVE_READLINE],1,[Readline library])], [readline=false], [-lcurses]) wxwin=false -AC_CHECK_LIB(wx_gtk-2.4, main, [wxwin=true; wx_gtk=true; AC_DEFINE(HAVE_WXWINDOWS,1,[wxwindows library])], [], [-L/usr/lib64 -L/usr/lib `gtk-config --libs` `glib-config --libs glib gmodule gthread` ]) -AC_CHECK_LIB(wx_mac-2.4, main, [wxwin=true; wx_mac=true; AC_DEFINE(HAVE_WXWINDOWS,1,[wxwindows library])]) +AC_CHECK_LIB(wx_gtk2u_core-2.8, main, [wxwin=true; wx_gtk=true; AC_DEFINE(HAVE_WXWINDOWS,1,[wxwindows library])], [], [-L/usr/lib64 -L/usr/lib `gtk-config --libs` `glib-config --libs glib gmodule gthread` ]) +AC_CHECK_LIB(wx_mac-2.8, main, [wxwin=true; wx_mac=true; AC_DEFINE(HAVE_WXWINDOWS,1,[wxwindows library])]) AC_CHECK_LIB(fftw3, fftw_malloc, [fftw=true; AC_DEFINE(HAVE_FFTW,1,[FFTW library])], [fftw=false], [-L/usr/lib64 -L/usr/lib]) AC_CHECK_LIB(GL, main, [libgl=true], [libgl=false], [-L/usr/X11R6/lib -L/usr/X11R6/lib64]) AC_CHECK_LIB(pthread, main, [pthread=true], [pthread=false]) @@ -103,10 +103,10 @@ AC_MSG_CHECKING([debug]) AC_ARG_ENABLE(debug, [ --enable-debug Turn on debugging], [case "${enableval}" in - yes) debug=true + yes) debug="true" AC_MSG_RESULT(yes) ;; - no) debug=false + no) debug="false" AC_MSG_RESULT(no) ;; *) AC_MSG_RESULT([bad value ${enableval} for --enable-debug]) @@ -337,10 +337,14 @@ if test "$with_x" != "no" && test "$wxwin" = "true"; then # Removed "-lglut" for Mac OS X compilation ctlib_graphics="$ctlib_graphics -lGL -lGLU" if test "$wxwin" = "true" ; then + wxdebug="" + if test "$debug" = "true"; then + wxdebug="--debug" + fi if [ "$wx_gtk" ]; then - ctlib_graphics="$ctlib_graphics `$wxconfig --libs` -lwx_gtk_gl-2.4 `gtk-config --libs` `glib-config --libs glib gmodule gthread`" + ctlib_graphics="$ctlib_graphics `$wxconfig $wxdebug --libs --version=2.8` -lwx_gtk2u_gl-2.8 `gtk-config --libs` `glib-config --libs glib gmodule gthread`" elif [ "$wx_mac" ]; then - ctlib_graphics="$ctlib_graphics -lwx_mac_gl-2.4" + ctlib_graphics="$ctlib_graphics -lwx_mac_gl-2.8" fi fi fi @@ -413,9 +417,9 @@ if test "$efence" = "true" -a "$useefence" = "true" ; then fi if test "$wxwin" = "true" ; then - if [ "$wx_gtk" = "true" ] || [ "$wx_mac" == "true" ] ; then - wxcflags=`$wxconfig --cflags` - wxlibs=`$wxconfig --libs` + if [ "$wx_gtk" = "true" ] || [ "$wx_mac" = "true" ] ; then + wxcflags=`$wxconfig $wxdebug --cxxflags --version=2.8` + #wxlibs=`$wxconfig --libs` else wxcflags="-D__WXMSW__ -D__WIN32__ -D__GNUWIN32__" wxlibs="-lwx -lglui -ljpeg -lxpm -lzlib -ltiff" -- 2.34.1