X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=configure.ac;h=cdfef2443973215ac0478cae54f5a158c357c3e7;hp=b46a7f50984fe0508032a62a16d6c452b048e720;hb=56419be0eb2d7673daf2bedf1775f21cd6d8880e;hpb=40ef0ef58e4d5617d7ddb7b1d145e8981b61215f diff --git a/configure.ac b/configure.ac index b46a7f5..cdfef24 100644 --- a/configure.ac +++ b/configure.ac @@ -5,7 +5,8 @@ dnl CDPATH= AC_INIT AC_CONFIG_SRCDIR([src/ctsim.cpp]) -AM_INIT_AUTOMAKE(ctsim,4.2.1) +AM_MAINTAINER_MODE +AM_INIT_AUTOMAKE(ctsim,4.3.1) AM_CONFIG_HEADER(config.h) dnl Checks for programs. @@ -40,10 +41,10 @@ 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])]) +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(fftw, fftw_one, [fftw=true; AC_DEFINE(HAVE_FFTW,1,[FFTW library])], [fftw=false]) -AC_CHECK_LIB(GL, main, [libgl=true], [libgl=false], [-L/usr/X11R6/lib -lXt -lXext]) +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 -lXt -lXext]) AC_CHECK_LIB(pthread, main, [pthread=true], [pthread=false]) if test "$zlib" = "true" ; then @@ -62,7 +63,7 @@ AC_STRUCT_TM dnl Checks for library functions. AC_FUNC_VPRINTF -AC_CHECK_FUNCS(strtod strtol snprintf htonl usleep vsprintf vsnprintf) +AC_CHECK_FUNCS(strtod strtol snprintf htonl usleep vsprintf vsnprintf basename setjmp setpriority time gettimeofday getenv) AC_CHECK_FUNC(basename) AC_CHECK_FUNC(setjmp) AC_CHECK_FUNC(setpriority) @@ -81,8 +82,9 @@ if test "${getopt_long}" = "false" ; then AC_DEFINE(HAVE_GETOPT_LONG,1,[getopt_long library]) ctlibs_base="$ctlibs_base -lgetopt" LDFLAGS="$LDFLAGS -L../getopt" - AM_CONDITIONAL(INCLUDED_GETOPT_LONG, test 1==1) + GETOPTLONG=1 fi +AM_CONDITIONAL(INCLUDED_GETOPT_LONG, test "$GETOPTLONG"="1") if test "${readline}" = "true" ; then ctlibs_base="$ctlibs_base -lreadline" @@ -120,7 +122,7 @@ if test "$debug" = "true" ; then CFLAGS="$CFLAGS -g -DDEBUG" AC_DEFINE(DEBUG,1,[turn on debugging]) else - CFLAGS="$CFLAGS -O3 -DNDEBUG -fomit-frame-pointer -funroll-loops" + CFLAGS="$CFLAGS -O2 -DNDEBUG -fomit-frame-pointer" AC_DEFINE(NDEBUG,1,[no debugging]) fi @@ -344,7 +346,7 @@ LDFLAGS="$LDFLAGS -L/usr/local/lib" AC_MSG_CHECKING([for X]) if test "$no_x" != "yes" ; then AC_DEFINE(HAVE_X11,1,[X11 system]) - LDFLAGS="$LDFLAGS -L../libctgraphics -L/usr/X11R6/lib" + LDFLAGS="$LDFLAGS -L../libctgraphics -L/usr/X11R6/lib -L/usr/X11R6/lib64" my_includes="$my_includes -I/usr/X11R6/include" ctlib_graphics="$ctlibs_base -lctgraphics" AC_MSG_RESULT(yes) @@ -354,7 +356,7 @@ if test "$no_x" != "yes" ; then ctlib_graphics="$ctlib_graphics -lGL -lGLU" if test "$wxwin" = "true" ; then if [ "$wx_gtk" ]; then - ctlib_graphics="$ctlib_graphics -lwx_gtk_gl-2.4" + ctlib_graphics="$ctlib_graphics `wx-config --libs` -lwx_gtk_gl-2.4 `gtk-config --libs` `glib-config --libs glib gmodule gthread`" elif [ "$wx_mac" ]; then ctlib_graphics="$ctlib_graphics -lwx_mac_gl-2.4" fi @@ -362,12 +364,13 @@ if test "$no_x" != "yes" ; then fi if test "$wxwin" = "true" ; then AC_DEFINE(HAVE_SGP,1,[use sgp library]) - AM_CONDITIONAL(HAVE_SGP, test 1==1) fi else AC_MSG_RESULT(no) fi +AM_CONDITIONAL(HAVE_SGP, test "$wxwin" = "true") + if test "$png" = "true" ; then ctlibs_tools="$ctlibs_tools -lpng" fi @@ -375,7 +378,7 @@ if test "$zlib" = "true" ; then ctlibs_tools="$ctlibs_tools -lz" fi if test "$fftw" = "true" ; then - ctlibs_tools="$ctlibs_tools -lrfftw -lfftw" + ctlibs_tools="$ctlibs_tools -lfftw3" fi if test "$ctn" = "true"; then ctlibs_tools="$ctlibs_tools -lctn" @@ -437,10 +440,10 @@ if test "$wxwin" = "true" ; then fi CFLAGS="$CFLAGS -I../include $wxcflags" ctlib_graphics="$ctlib_graphics $wxlibs" - AM_CONDITIONAL(HAVE_WXWINDOWS, test 1==1 ) fi AC_SUBST(wxcflags) AC_SUBST(wxlibs) +AM_CONDITIONAL(HAVE_WXWINDOWS, test "$wxwin"="true") dnl Setting projet libraries and includes LDFLAGS="$LDFLAGS -L../libctsupport -L../libctsim"