X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=configure.ac;h=b46a7f50984fe0508032a62a16d6c452b048e720;hp=80bd7ea47436dc09617aadb4b2fc347fb3614192;hb=40ef0ef58e4d5617d7ddb7b1d145e8981b61215f;hpb=bcc0f3056ec84efcef9559f23b5513f7ed61f9c3 diff --git a/configure.ac b/configure.ac index 80bd7ea..b46a7f5 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.7.0) +AM_INIT_AUTOMAKE(ctsim,4.2.1) AM_CONFIG_HEADER(config.h) dnl Checks for programs. @@ -41,7 +41,7 @@ AC_CHECK_LIB(readline, main, [readline=true; [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_mac-2.4, main, [wxwin=true; wx_gtk=true; AC_DEFINE(HAVE_WXWINDOWS,1,[wxwindows library])]) +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(pthread, main, [pthread=true], [pthread=false]) @@ -68,6 +68,7 @@ AC_CHECK_FUNC(setjmp) AC_CHECK_FUNC(setpriority) AC_CHECK_FUNC(time) AC_CHECK_FUNC(gettimeofday) +AC_CHECK_FUNC(getopt, [ getopt=true ], [ getopt=false ]) if test "${OSTYPE}" = "cygwin" ; then getopt_long=false @@ -132,10 +133,11 @@ AC_MSG_CHECKING(sstream) if [ test -f /usr/include/sstream || test -f /usr/include/g++/sstream || test -f /usr/include/g++-2/sstream || test -f /usr/include/g++-3/sstream || test -f /usr/include/gcc/darwin/3.1/g++-v3/sstream ]; then - AC_DEFINE(HAVE_SSTREAM,1,[sstream header]) - AC_MSG_RESULT(yes) -fi -AC_MSG_RESULT(no) + AC_DEFINE(HAVE_SSTREAM,1,[sstream header]) + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + fi CFLAGS="$CFLAGS -Wall" @@ -157,7 +159,7 @@ AC_ARG_ENABLE(verbose-warnings, AC_MSG_CHECKING(static executables) AC_ARG_ENABLE(static, [ --enable-static - Enable static executables.], + Enable static executables.], [ case "$enableval" in yes) AC_MSG_RESULT(yes) @@ -171,7 +173,7 @@ AC_ARG_ENABLE(static, dnl Set LAM path AC_ARG_WITH(lam, -[ --with-lam[=PATH] Set path of LAM MPI ], +[ --with-lam[=PATH] Set path of LAM MPI ], [ if test "$withval" != "no" ; then trylamdir=$withval fi ] @@ -205,7 +207,7 @@ fi dnl Set CTN path AC_ARG_WITH(ctn, -[ --with-ctn[=PATH] Set path of CTN DICOM library ], +[ --with-ctn[=PATH] Set path of CTN DICOM library ], [ if test "$withval" != "no" ; then tryctndir=$withval fi ] @@ -239,6 +241,18 @@ else fi fi +dnl Set CPU +AC_MSG_CHECKING([for CPU specification]) +AC_ARG_WITH(mcpu, +[ --with-mcpu[=CPU] Set name of CPU for gcc -mcpu]) + +if test "$withval" == "no" -o "$withval" == "yes" -o "$withval" == ""; then + AC_MSG_RESULT([no]) +else + AC_MSG_RESULT([$withval]) + CFLAGS="$CFLAGS -mcpu=$withval" +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 ], @@ -336,9 +350,14 @@ if test "$no_x" != "yes" ; then AC_MSG_RESULT(yes) ctlib_graphics="$ctlib_graphics $X_BASIC_LIBS $X_TOOLKIT_LIBS" if test "$libgl" = "true" ; then - ctlib_graphics="$ctlib_graphics -lglut -lGL -lGLU" + # Removed "-lglut" for Mac OS X compilation + ctlib_graphics="$ctlib_graphics -lGL -lGLU" if test "$wxwin" = "true" ; then - ctlib_graphics="$ctlib_graphics -lwx_gtk_gl-2.4" + if [ "$wx_gtk" ]; then + ctlib_graphics="$ctlib_graphics -lwx_gtk_gl-2.4" + elif [ "$wx_mac" ]; then + ctlib_graphics="$ctlib_graphics -lwx_mac_gl-2.4" + fi fi fi if test "$wxwin" = "true" ; then @@ -409,12 +428,12 @@ if test "$efence" = "true" -a "$useefence" = "true" ; then fi if test "$wxwin" = "true" ; then - if test "$wx_gtk" = "true" ; then + if [ "$wx_gtk" = "true" ] || [ "$wx_mac" == "true" ] ; then wxcflags=`$wxconfig --cflags` wxlibs=`$wxconfig --libs` else wxcflags="-D__WXMSW__ -D__WIN32__ -D__GNUWIN32__" - wxlibs="-lwx -lglui -ljpeg -lxpm -lzlib -ltiff" + wxlibs="-lwx -lglui -ljpeg -lxpm -lzlib -ltiff" fi CFLAGS="$CFLAGS -I../include $wxcflags" ctlib_graphics="$ctlib_graphics $wxlibs"