X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=configure.ac;h=7f482726bc493e146cf321a5439a6582f8aad832;hp=4de3646c4e139b615a10e76a1510212dfc52e2d5;hb=f7ee98f7d964ed361068179f0e7ea4475ed1abdf;hpb=e99ef5538ce4756a0b3e77d347076ef5c041c629 diff --git a/configure.ac b/configure.ac index 4de3646..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.0x) +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 [ ! "$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]) @@ -273,20 +273,20 @@ AC_ARG_WITH(webdata-url, [ --with-webdata-url=PATH Set URL path of webdata], [ webdataurl=$withval ; AC_SUBST(webdataurl) ] ) AC_ARG_WITH(html-dir, [ --with-html-dir=PATH Set directory of html files], -[ htmldir=$withval ; AC_SUBST(htmldir) ] ) +[ html_%dir=$withval ; AC_SUBST(htmldir) ] ) if test -n "$cgibindir" -o -n "$cgibinurl" ; then cgiprograms="ctsim.cgi ctsim.conf" AC_SUBST(cgiprograms) fi -if test -n "$htmldir" ; then +if test -n "$html_dir" ; then htmldata=simulate.html AC_SUBST(htmldata) fi -AM_CONDITIONAL(USE_HTML, test -n "$htmldir") +AM_CONDITIONAL(USE_HTML, test -n "$html_dir") -if test -n "$cgibindir" -o -n "$cgibinurl" -o -n "$webdatadir" -o -n "$webdataurl" -o -n "$htmldir" ; then +if test -n "$cgibindir" -o -n "$cgibinurl" -o -n "$webdatadir" -o -n "$webdataurl" -o -n "$html_dir" ; then webenabled=true AC_SUBST(webenabled) AC_MSG_RESULT([yes]) @@ -298,7 +298,7 @@ if test -n "$cgibindir" -o -n "$cgibinurl" -o -n "$webdatadir" -o -n "$webdataur AC_MSG_ERROR([--with-webdata-dir not set for web access]) elif test -z "$webdataurl" ; then AC_MSG_ERROR([--with-webdata-url not set for web access]) - elif test -z "$htmldir" ; then + elif test -z "$html_dir" ; then AC_MSG_ERROR([--with-html-dir not set for web access]) fi else @@ -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 `wx-config --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"