X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=configure.ac;h=df1a1037595bbcb037339b18a52df362793b8299;hb=a0f552ce505ff64d43269842da6a9db4db0e7f0e;hp=311ae15339e907e5f3295adb298dd25659d8d15a;hpb=9149f18ce0f0f2910ab79e4ce75ff08e1de48790;p=ctsim.git diff --git a/configure.ac b/configure.ac index 311ae15..df1a103 100644 --- a/configure.ac +++ b/configure.ac @@ -5,7 +5,7 @@ dnl CDPATH= AC_INIT AC_CONFIG_SRCDIR([src/ctsim.cpp]) -AM_INIT_AUTOMAKE(ctsim,3.5.0) +AM_INIT_AUTOMAKE(ctsim,3.5.6) AM_CONFIG_HEADER(config.h) dnl Checks for programs. @@ -40,13 +40,14 @@ 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.2, main, [wxwin=true; wx_gtk=true; AC_DEFINE(HAVE_WXWINDOWS,1,[wxwindows library])]) +AC_CHECK_LIB(wx_gtk-2.3, main, [wxwin=true; wx_gtk=true; AC_DEFINE(HAVE_WXWINDOWS,1,[wxwindows library])]) +AC_CHECK_LIB(wx_mac-2.3, main, [wxwin=true; wx_gtk=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(pthread, main, [pthread=true], [pthread=false]) if test "$zlib" = "true" ; then - AC_CHECK_LIB(png, main, [png=true ; AC_DEFINE(HAVE_PNG,1,[PNG library])], [png=false]) + AC_CHECK_LIB(png, main, [png=true ; AC_DEFINE(HAVE_PNG,1,[PNG library])], [png=false], [-lz -lm]) fi dnl Checks for header files. @@ -118,12 +119,12 @@ if test "$debug" = "true" ; then CFLAGS="$CFLAGS -g -DDEBUG" AC_DEFINE(DEBUG,1,[turn on debugging]) else - CFLAGS="$CFLAGS -O3 -DNDEBUG -fomit-frame-pointer" + CFLAGS="$CFLAGS -O3 -DNDEBUG -fomit-frame-pointer -funroll-loops" AC_DEFINE(NDEBUG,1,[no debugging]) fi if test "${pthread}" = "true" ; then - CFLAGS="$FLAGS -pthread -D_REENTRANT" +dnl CFLAGS="$CFLAGS -D_REENTRANT" AC_DEFINE(HAVE_WXTHREADS,1,[have wxthreads library]) fi @@ -209,30 +210,34 @@ AC_ARG_WITH(ctn, fi ] ) -if test "$withval" != "no" ; then - if test "$prefix" != "NONE" ; then - tryctndir="$tryctndir $prefix" - fi - +if test "$withval" == "no" -o "$withval" == "NONE" ; then AC_MSG_CHECKING([for CTN DICOM installation]) - for testctndir in "." $tryctndir /usr/local /usr/local/ctn /usr /usr/ctn /opt /opt/ctn ; do - if test -f "$testctndir/lib/libctn.a" ; then - if test "$testctndir" != "/usr"; then - LDFLAGS="$LDFLAGS -L$testctndir/lib" - CFLAGS="$CFLAGS -I$testctndir/include" - fi - ctndir="$testctndir" - ctn="true" - AC_DEFINE(HAVE_CTN_DICOM,1,[ctn dicom library]) + AC_MSG_RESULT([disabled]) +else + AC_MSG_CHECKING([for CTN DICOM installation]) + for testctndir in $tryctndir/lib /usr/local/lib /usr/local/ctn/lib /usr/lib /usr/ctn/lib /usr/lib/ctn /opt/ctn/lib ; do + if test -f "$testctndir/libctn.a" ; then + LDFLAGS="$LDFLAGS -L$testctndir" + ctnlib="true" break fi done - AC_MSG_RESULT($ctndir) -else - AC_MSG_RESULT([no]) + for testctndir in $tryctndir/include /usr/local/include /usr/local/ctn/include /usr/include /usr/include/ctn /usr/ctn/include /opt/ctn/include ; do + if test -f "$testctndir/ctn_os.h" ; then + CFLAGS="$CFLAGS -I$testctndir" + ctninclude="true" + break + fi + done + if test "$ctnlib" == "true" -a "$ctninclude" == "true" ; then + ctn="true" + AC_DEFINE(HAVE_CTN_DICOM,1,[ctn dicom library]) + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi fi - AC_MSG_CHECKING([for web access]) dnl Set cgi-bin directory AC_ARG_WITH(cgibin-dir, [ --with-cgibin-dir=PATH Set path of CGI binaries directory ], @@ -312,19 +317,6 @@ 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 Check in -lXext for double buffering extensions to X11, and check -dnl whether appropriate header files are present. (Some systems have one -dnl but not the other.) -our_saved_LDFLAGS="$LDFLAGS" -LDFLAGS="$X_LIBS $LDFLAGS" -AC_CHECK_LIB(Xext, XdbeQueryExtension, AC_DEFINE(HAVE_DBE_SUPPORT,1,[x dbe support]), , -lX11 "$X_EXTRA_LIBS") -AC_CHECK_LIB(Xext, XmbufQueryExtension, AC_DEFINE(HAVE_MBX_SUPPORT,1,[x mbx support]), , -lX11 "$X_EXTRA_LIBS") -LDFLAGS="$our_saved_LDFLAGS" -our_saved_CPPFLAGS="$CPPFLAGS" -CPPFLAGS="$X_CFLAGS $CPPFLAGS" -AC_CHECK_HEADERS(X11/extensions/Xdbe.h X11/extensions/multibuf.h) -CPPFLAGS="$our_saved_CPPFLAGS" - 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") @@ -344,7 +336,7 @@ if test "$no_x" != "yes" ; then if test "$libgl" = "true" ; then ctlib_graphics="$ctlib_graphics -lglut -lGL -lGLU" if test "$wxwin" = "true" ; then - ctlib_graphics="$ctlib_graphics -lwx_gtk_gl-2.2" + ctlib_graphics="$ctlib_graphics -lwx_gtk_gl-2.3" fi fi if test "$wxwin" = "true" ; then @@ -443,5 +435,6 @@ fi CXXFLAGS="$CFLAGS" -AC_CONFIG_FILES([Makefile libctgraphics/Makefile libctsupport/Makefile libctsim/Makefile Makefile man/Makefile cgi-bin/ctsim.cgi cgi-bin/Makefile html/simulate.html html/Makefile include/Makefile getopt/Makefile tools/sample-ctsim.sh cgi-bin/ctsim.conf tools/Makefile src/Makefile helical/Makefile helical/sample-helical.sh]) +AC_CONFIG_FILES([Makefile libctgraphics/Makefile libctsupport/Makefile libctsim/Makefile man/Makefile cgi-bin/ctsim.cgi cgi-bin/Makefile html/simulate.html html/Makefile include/Makefile getopt/Makefile tools/sample-ctsim.sh cgi-bin/ctsim.conf tools/Makefile src/Makefile helical/Makefile helical/sample-helical.sh]) + AC_OUTPUT