X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=configure.ac;h=f206d6574eef5def6da78e619a415a7a79b15cbb;hp=cdfef2443973215ac0478cae54f5a158c357c3e7;hb=b3db4c787d9180525a56306d8e91553d81def8b8;hpb=56419be0eb2d7673daf2bedf1775f21cd6d8880e diff --git a/configure.ac b/configure.ac index cdfef24..f206d65 100644 --- a/configure.ac +++ b/configure.ac @@ -6,7 +6,7 @@ dnl CDPATH= AC_INIT AC_CONFIG_SRCDIR([src/ctsim.cpp]) AM_MAINTAINER_MODE -AM_INIT_AUTOMAKE(ctsim,4.3.1) +AM_INIT_AUTOMAKE(ctsim,4.5.1) AM_CONFIG_HEADER(config.h) dnl Checks for programs. @@ -19,7 +19,10 @@ AC_PROG_CC AC_PROG_CXX AC_C_BIGENDIAN -AC_PATH_PROG(wxconfig,wx-config) +AC_PATH_PROG(wxconfig,wxgtk-2.4-config) +if [ ! "$wxconfig" ]; then + AC_PATH_PROG(wxconfig,wx-config) +fi dnl Check for C operation AC_CANONICAL_HOST @@ -44,7 +47,7 @@ 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(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(GL, main, [libgl=true], [libgl=false], [-L/usr/X11R6/lib -L/usr/X11R6/lib64]) AC_CHECK_LIB(pthread, main, [pthread=true], [pthread=false]) if test "$zlib" = "true" ; then @@ -304,17 +307,6 @@ fi AM_CONDITIONAL(USE_LAM, test -n "$lamdir") -dnl Prepare to support X. If the user gave the command-line option -dnl --without-x, AC_PATH_XTRA will set no_x to "yes". Otherwise, it will -dnl add appropriate preprocessor flags to X_CFLAGS, and appropriate linker -dnl flags to X_LIBS. It also checks for system-specific X libraries, and -dnl adds them to X_PRE_LIBS or X_EXTRA_LIBS, as appropriate. (The former -dnl is where "-lSM -lICE" goes, in X11R6.) We define the X_TOOLKIT_LIBS -dnl and X_BASIC_LIBS argument vectors ourselves, and if X is to be -dnl supported, we'll concatenate the whole lot of these into a command line -dnl for libtool. See, e.g., the libplot_la_LIBADD line in -dnl libplot/Makefile.am. - AC_PATH_XTRA AC_SUBST(X_CFLAGS) dnl Following five are concatenated together into a linker specification. @@ -324,19 +316,9 @@ AC_SUBST(X_PRE_LIBS) AC_SUBST(X_BASIC_LIBS) AC_SUBST(X_EXTRA_LIBS) -X_TOOLKIT_LIBS="-lXt" -X_BASIC_LIBS="-lXext -lX11 -lXmu" - -dnl Check whether libXt has thread support. Some platforms may have -dnl pthread support in libc, but no thread support in libXt/libX11. -our_saved_LDFLAGS="$LDFLAGS" -LDFLAGS="$X_LIBS $LDFLAGS" -AC_CHECK_LIB(Xt, XtToolkitThreadInitialize, AC_DEFINE(X_THREAD_SUPPORT,1,[x thread supported]), , $X_PRE_LIBS $X_BASIC_LIBS $X_EXTRA_LIBS) -LDFLAGS="$our_saved_LDFLAGS" - dnl Our Makefile.am files test the automake variable NO_X to determine dnl whether X should be supported. -AM_CONDITIONAL(NO_X, test "x$no_x" = "xyes") +AM_CONDITIONAL(NO_X, test "x$with_x" = "xno") my_includes="$my_includes -I../include -I.. -I/usr/local/include" AC_SUBST(my_includes) @@ -344,7 +326,7 @@ AC_SUBST(my_includes) LDFLAGS="$LDFLAGS -L/usr/local/lib" AC_MSG_CHECKING([for X]) -if test "$no_x" != "yes" ; then +if test "$with_x" != "no" && test "$wxwin" = "true"; then AC_DEFINE(HAVE_X11,1,[X11 system]) LDFLAGS="$LDFLAGS -L../libctgraphics -L/usr/X11R6/lib -L/usr/X11R6/lib64" my_includes="$my_includes -I/usr/X11R6/include"