AC_INIT
AC_CONFIG_SRCDIR([src/ctsim.cpp])
AM_MAINTAINER_MODE
-AM_INIT_AUTOMAKE(ctsim,4.2.4)
+AM_INIT_AUTOMAKE(ctsim,4.3.1)
AM_CONFIG_HEADER(config.h)
dnl Checks for programs.
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
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)
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"
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)
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
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
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"
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"