From c4af77faf7f216b936f0782e918634d34980c63f Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Sun, 23 Jul 2000 01:49:03 +0000 Subject: [PATCH] r160: *** empty log message *** --- ChangeLog | 3 + INSTALL | 3 + Makefile.am | 3 +- acconfig.h | 3 + config.h.in | 3 + configure | 491 +++++++++++++++++++---------------- configure.in | 26 +- doc/ctsim.tex | 6 + include/ct.h | 5 +- libctgraphics/driver_x11.cpp | 286 -------------------- libctsim/array2dfile.cpp | 4 +- libctsim/backprojectors.cpp | 6 +- libctsim/filter.cpp | 22 +- libctsupport/clip.cpp | 8 +- src/ctsim.cpp | 15 +- src/ctsim.h | 10 +- src/dialogs.cpp | 3 +- tools/phm2if.cpp | 51 ++-- tools/phm2pj.cpp | 5 +- 19 files changed, 380 insertions(+), 573 deletions(-) delete mode 100644 libctgraphics/driver_x11.cpp diff --git a/ChangeLog b/ChangeLog index ff04082..d38aa60 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2.0.0-b7 - 7/25/00 + Finished support for dmallocxx library + 2.0.0-b6 - 7/22/00 ctsim program: improved initial size and scroll area for image and projection files diff --git a/INSTALL b/INSTALL index ad46616..d797072 100644 --- a/INSTALL +++ b/INSTALL @@ -29,6 +29,9 @@ lam (http://www.mpi.nd.edu/lam/) There is support is MPI clustering. I use this code at home for my beowulf cluster. +dmalloc (http://www.dmalloc.com) + This adds debugging to memory allocation routines + perl (http://www.perl.org) apache (http://www.apache.org) There is support for web-driven CT Simulation. To use this, the diff --git a/Makefile.am b/Makefile.am index 682436f..7dcde91 100644 --- a/Makefile.am +++ b/Makefile.am @@ -16,7 +16,8 @@ else EXTRA_DIRS3= endif -SUBDIRS=$(EXTRA_DIRS1) $(EXTRA_DIRS2) libctsupport libctsim man doc html cgi-bin include tools $(EXTRA_DIRS3) +SUBDIRS=$(EXTRA_DIRS1) $(EXTRA_DIRS2) libctsupport libctsim man doc html cgi-bin include tools $(EXTRA_DIRS3) + EXTRA_DIST=acsite.m4 make.bat diff --git a/acconfig.h b/acconfig.h index 98381e4..9c06cd5 100644 --- a/acconfig.h +++ b/acconfig.h @@ -69,5 +69,8 @@ #undef NDEBUG +/* Define if have dmalloc library */ +#undef HAVE_DMALLOC + /* Define for HDF5 library */ #undef HAVE_HDF5 diff --git a/config.h.in b/config.h.in index a4a5146..31cc9fd 100644 --- a/config.h.in +++ b/config.h.in @@ -60,6 +60,9 @@ #undef NDEBUG +/* Define if have dmalloc library */ +#undef HAVE_DMALLOC + /* The number of bytes in a double. */ #undef SIZEOF_DOUBLE diff --git a/configure b/configure index a4c71aa..c011a92 100755 --- a/configure +++ b/configure @@ -30,6 +30,8 @@ ac_help="$ac_help --with-html-dir=PATH Set directory of html files" ac_help="$ac_help --with-x use the X Window System" +ac_help="$ac_help + --enable-dmalloc Use dmalloc memory allocation" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -571,7 +573,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:575: checking for a BSD compatible install" >&5 +echo "configure:577: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -624,7 +626,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:628: checking whether build environment is sane" >&5 +echo "configure:630: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -681,7 +683,7 @@ test "$program_suffix" != NONE && test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:685: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:687: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -710,7 +712,7 @@ fi PACKAGE=ctsim -VERSION=2.0.0-b6 +VERSION=2.0.0-b7 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } @@ -727,7 +729,7 @@ EOF missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:731: checking for working aclocal" >&5 +echo "configure:733: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -740,7 +742,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:744: checking for working autoconf" >&5 +echo "configure:746: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -753,7 +755,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:757: checking for working automake" >&5 +echo "configure:759: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -766,7 +768,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:770: checking for working autoheader" >&5 +echo "configure:772: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -779,7 +781,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:783: checking for working makeinfo" >&5 +echo "configure:785: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -801,7 +803,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:805: checking for $ac_word" >&5 +echo "configure:807: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -842,7 +844,7 @@ done # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:846: checking for a BSD compatible install" >&5 +echo "configure:848: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -895,7 +897,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:899: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:901: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -924,7 +926,7 @@ fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:928: checking for $ac_word" >&5 +echo "configure:930: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -954,7 +956,7 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:958: checking for $ac_word" >&5 +echo "configure:960: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -984,7 +986,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:988: checking for $ac_word" >&5 +echo "configure:990: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1035,7 +1037,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1039: checking for $ac_word" >&5 +echo "configure:1041: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1067,7 +1069,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1071: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1073: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1078,12 +1080,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1082 "configure" +#line 1084 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1109,12 +1111,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1113: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1115: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1118: checking whether we are using GNU C" >&5 +echo "configure:1120: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1123,7 +1125,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1127: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1129: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1142,7 +1144,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1146: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1148: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1178,7 +1180,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1182: checking for $ac_word" >&5 +echo "configure:1184: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1210,7 +1212,7 @@ test -n "$CXX" || CXX="gcc" echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1214: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 +echo "configure:1216: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1221,12 +1223,12 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext << EOF -#line 1225 "configure" +#line 1227 "configure" #include "confdefs.h" int main(){return(0);} EOF -if { (eval echo configure:1230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cxx_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1252,12 +1254,12 @@ if test $ac_cv_prog_cxx_works = no; then { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1256: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1258: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 -echo "configure:1261: checking whether we are using GNU C++" >&5 +echo "configure:1263: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1266,7 +1268,7 @@ else yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1272: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no @@ -1285,7 +1287,7 @@ ac_test_CXXFLAGS="${CXXFLAGS+set}" ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 -echo "configure:1289: checking whether ${CXX-g++} accepts -g" >&5 +echo "configure:1291: checking whether ${CXX-g++} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1319,7 +1321,7 @@ fi # Extract the first word of "wx-config", so it can be a program name with args. set dummy wx-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1323: checking for $ac_word" >&5 +echo "configure:1325: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_wxconfig'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1360,7 +1362,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:1364: checking host system type" >&5 +echo "configure:1366: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -1381,21 +1383,21 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:1385: checking for inline" >&5 +echo "configure:1387: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -1421,7 +1423,7 @@ EOF esac echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:1425: checking size of short" >&5 +echo "configure:1427: checking size of short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1429,7 +1431,7 @@ else ac_cv_sizeof_short=2 else cat > conftest.$ac_ext < main() @@ -1440,7 +1442,7 @@ main() exit(0); } EOF -if { (eval echo configure:1444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_short=`cat conftestval` else @@ -1460,7 +1462,7 @@ EOF echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:1464: checking size of int" >&5 +echo "configure:1466: checking size of int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1468,7 +1470,7 @@ else ac_cv_sizeof_int=4 else cat > conftest.$ac_ext < main() @@ -1479,7 +1481,7 @@ main() exit(0); } EOF -if { (eval echo configure:1483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int=`cat conftestval` else @@ -1499,7 +1501,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:1503: checking size of long" >&5 +echo "configure:1505: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1507,7 +1509,7 @@ else ac_cv_sizeof_long=4 else cat > conftest.$ac_ext < main() @@ -1518,7 +1520,7 @@ main() exit(0); } EOF -if { (eval echo configure:1522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long=`cat conftestval` else @@ -1538,7 +1540,7 @@ EOF echo $ac_n "checking size of float""... $ac_c" 1>&6 -echo "configure:1542: checking size of float" >&5 +echo "configure:1544: checking size of float" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1546,7 +1548,7 @@ else ac_cv_sizeof_float=4 else cat > conftest.$ac_ext < main() @@ -1557,7 +1559,7 @@ main() exit(0); } EOF -if { (eval echo configure:1561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_float=`cat conftestval` else @@ -1577,7 +1579,7 @@ EOF echo $ac_n "checking size of double""... $ac_c" 1>&6 -echo "configure:1581: checking size of double" >&5 +echo "configure:1583: checking size of double" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1585,7 +1587,7 @@ else ac_cv_sizeof_double=8 else cat > conftest.$ac_ext < main() @@ -1596,7 +1598,7 @@ main() exit(0); } EOF -if { (eval echo configure:1600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_double=`cat conftestval` else @@ -1620,14 +1622,14 @@ EOF echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:1624: checking whether byte ordering is bigendian" >&5 +echo "configure:1626: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -1638,11 +1640,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:1642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -1653,7 +1655,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:1657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1659: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -1673,7 +1675,7 @@ if test "$cross_compiling" = yes; then ac_cv_c_bigendian=unknown else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -1716,7 +1718,7 @@ fi echo $ac_n "checking for main in -lz""... $ac_c" 1>&6 -echo "configure:1720: checking for main in -lz" >&5 +echo "configure:1722: checking for main in -lz" >&5 ac_lib_var=`echo z'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1724,14 +1726,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lz $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1753,7 +1755,7 @@ else fi echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 -echo "configure:1757: checking for main in -lm" >&5 +echo "configure:1759: checking for main in -lm" >&5 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1761,14 +1763,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1796,7 +1798,7 @@ else fi echo $ac_n "checking for main in -lcurses""... $ac_c" 1>&6 -echo "configure:1800: checking for main in -lcurses" >&5 +echo "configure:1802: checking for main in -lcurses" >&5 ac_lib_var=`echo curses'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1804,14 +1806,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lcurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1833,7 +1835,7 @@ curses=false fi echo $ac_n "checking for main in -lncurses""... $ac_c" 1>&6 -echo "configure:1837: checking for main in -lncurses" >&5 +echo "configure:1839: checking for main in -lncurses" >&5 ac_lib_var=`echo ncurses'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1841,14 +1843,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1870,7 +1872,7 @@ ncurses=false fi echo $ac_n "checking for main in -lg2""... $ac_c" 1>&6 -echo "configure:1874: checking for main in -lg2" >&5 +echo "configure:1876: checking for main in -lg2" >&5 ac_lib_var=`echo g2'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1878,14 +1880,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lg2 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1908,7 +1910,7 @@ fi wxwin=false echo $ac_n "checking for main in -lwx_gtk""... $ac_c" 1>&6 -echo "configure:1912: checking for main in -lwx_gtk" >&5 +echo "configure:1914: checking for main in -lwx_gtk" >&5 ac_lib_var=`echo wx_gtk'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1916,14 +1918,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lwx_gtk $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1947,7 +1949,7 @@ else fi echo $ac_n "checking for main in -lwx_msw""... $ac_c" 1>&6 -echo "configure:1951: checking for main in -lwx_msw" >&5 +echo "configure:1953: checking for main in -lwx_msw" >&5 ac_lib_var=`echo wx_msw'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1955,14 +1957,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lwx_msw $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1985,45 +1987,8 @@ else echo "$ac_t""no" 1>&6 fi -echo $ac_n "checking for main in -ldmallocxx""... $ac_c" 1>&6 -echo "configure:1990: checking for main in -ldmallocxx" >&5 -ac_lib_var=`echo dmallocxx'_'main | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-ldmallocxx $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - dmalloc=true -else - echo "$ac_t""no" 1>&6 -dmalloc=false -fi - echo $ac_n "checking for main in -lhdf5""... $ac_c" 1>&6 -echo "configure:2027: checking for main in -lhdf5" >&5 +echo "configure:1992: checking for main in -lhdf5" >&5 ac_lib_var=`echo hdf5'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2031,14 +1996,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lhdf5 -lz $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2060,7 +2025,7 @@ hdf5=false fi echo $ac_n "checking for main in -lfftw""... $ac_c" 1>&6 -echo "configure:2064: checking for main in -lfftw" >&5 +echo "configure:2029: checking for main in -lfftw" >&5 ac_lib_var=`echo fftw'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2068,14 +2033,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lfftw $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2102,7 +2067,7 @@ fi if test "$zlib" = "true" ; then echo $ac_n "checking for main in -lpng""... $ac_c" 1>&6 -echo "configure:2106: checking for main in -lpng" >&5 +echo "configure:2071: checking for main in -lpng" >&5 ac_lib_var=`echo png'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2110,14 +2075,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lpng $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2144,7 +2109,7 @@ fi fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:2148: checking how to run the C preprocessor" >&5 +echo "configure:2113: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2159,13 +2124,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2169: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2176,13 +2141,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2186: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2151: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2193,13 +2158,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2168: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2224,12 +2189,12 @@ fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2228: checking for ANSI C header files" >&5 +echo "configure:2193: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2237,7 +2202,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2254,7 +2219,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2272,7 +2237,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2293,7 +2258,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2304,7 +2269,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -2331,17 +2296,17 @@ for ac_hdr in fcntl.h unistd.h getopt.h sys/fcntl.h setjmp.h stdarg.h stddef.h s do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2335: checking for $ac_hdr" >&5 +echo "configure:2300: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2369,12 +2334,12 @@ done echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2373: checking for working const" >&5 +echo "configure:2338: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2444,12 +2409,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:2448: checking for off_t" >&5 +echo "configure:2413: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2477,12 +2442,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:2481: checking for size_t" >&5 +echo "configure:2446: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2510,12 +2475,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:2514: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:2479: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2523,7 +2488,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:2527: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2492: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -2545,12 +2510,12 @@ fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:2549: checking for vprintf" >&5 +echo "configure:2514: checking for vprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -2597,12 +2562,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:2601: checking for _doprnt" >&5 +echo "configure:2566: checking for _doprnt" >&5 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -2652,12 +2617,12 @@ fi for ac_func in strtod strtol snprintf htonl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2656: checking for $ac_func" >&5 +echo "configure:2621: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2705,12 +2670,12 @@ fi done echo $ac_n "checking for basename""... $ac_c" 1>&6 -echo "configure:2709: checking for basename" >&5 +echo "configure:2674: checking for basename" >&5 if eval "test \"`echo '$''{'ac_cv_func_basename'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_basename=yes" else @@ -2753,12 +2718,12 @@ else fi echo $ac_n "checking for setjmp""... $ac_c" 1>&6 -echo "configure:2757: checking for setjmp" >&5 +echo "configure:2722: checking for setjmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_setjmp'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_setjmp=yes" else @@ -2804,12 +2769,12 @@ if test "${OSTYPE}" = "cygwin" ; then getopt_long=false else echo $ac_n "checking for getopt_long""... $ac_c" 1>&6 -echo "configure:2808: checking for getopt_long" >&5 +echo "configure:2773: checking for getopt_long" >&5 if eval "test \"`echo '$''{'ac_cv_func_getopt_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_getopt_long=yes" else @@ -2878,7 +2843,7 @@ fi fi echo $ac_n "checking whether to enable verbose warnings""... $ac_c" 1>&6 -echo "configure:2882: checking whether to enable verbose warnings" >&5 +echo "configure:2847: checking whether to enable verbose warnings" >&5 # Check whether --enable-verbose-warnings or --disable-verbose-warnings was given. if test "${enable_verbose_warnings+set}" = set; then enableval="$enable_verbose_warnings" @@ -2928,7 +2893,7 @@ fi echo $ac_n "checking debug""... $ac_c" 1>&6 -echo "configure:2932: checking debug" >&5 +echo "configure:2897: checking debug" >&5 # Check whether --enable-debug or --disable-debug was given. if test "${enable_debug+set}" = set; then enableval="$enable_debug" @@ -2994,7 +2959,7 @@ if test "$withval" != "no" ; then fi echo $ac_n "checking for LAM MPI installation""... $ac_c" 1>&6 -echo "configure:2998: checking for LAM MPI installation" >&5 +echo "configure:2963: checking for LAM MPI installation" >&5 for testlamdir in "." $trylamdir /usr/local /usr/local/lam /usr /usr/lam /opt /opt/lam ; do if test -x "$testlamdir/bin/hcc" ; then LDFLAGS="$LDFLAGS -L$testlamdir/lib" @@ -3012,7 +2977,7 @@ else fi echo $ac_n "checking for web access""... $ac_c" 1>&6 -echo "configure:3016: checking for web access" >&5 +echo "configure:2981: checking for web access" >&5 # Check whether --with-cgibin-dir or --without-cgibin-dir was given. if test "${with_cgibin_dir+set}" = set; then withval="$with_cgibin_dir" @@ -3102,7 +3067,7 @@ fi # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:3106: checking for X" >&5 +echo "configure:3071: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -3164,12 +3129,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3138: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3238,14 +3203,14 @@ if test "$ac_x_libraries" = NO; then ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -3351,17 +3316,17 @@ else case "`(uname -sr) 2>/dev/null`" in "SunOS 5"*) echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 -echo "configure:3355: checking whether -R must be followed by a space" >&5 +echo "configure:3320: checking whether -R must be followed by a space" >&5 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else @@ -3377,14 +3342,14 @@ rm -f conftest* else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else @@ -3416,7 +3381,7 @@ rm -f conftest* # libraries were built with DECnet support. And karl@cs.umb.edu says # the Alpha needs dnet_stub (dnet does not exist). echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:3420: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:3385: checking for dnet_ntoa in -ldnet" >&5 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3424,7 +3389,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3457,7 +3422,7 @@ fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 -echo "configure:3461: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:3426: checking for dnet_ntoa in -ldnet_stub" >&5 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3465,7 +3430,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3505,12 +3470,12 @@ fi # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:3509: checking for gethostbyname" >&5 +echo "configure:3474: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -3554,7 +3519,7 @@ fi if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:3558: checking for gethostbyname in -lnsl" >&5 +echo "configure:3523: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3562,7 +3527,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3603,12 +3568,12 @@ fi # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:3607: checking for connect" >&5 +echo "configure:3572: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -3652,7 +3617,7 @@ fi if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:3656: checking for connect in -lsocket" >&5 +echo "configure:3621: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3660,7 +3625,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3695,12 +3660,12 @@ fi # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. echo $ac_n "checking for remove""... $ac_c" 1>&6 -echo "configure:3699: checking for remove" >&5 +echo "configure:3664: checking for remove" >&5 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_remove=yes" else @@ -3744,7 +3709,7 @@ fi if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:3748: checking for remove in -lposix" >&5 +echo "configure:3713: checking for remove in -lposix" >&5 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3752,7 +3717,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3787,12 +3752,12 @@ fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:3791: checking for shmat" >&5 +echo "configure:3756: checking for shmat" >&5 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_shmat=yes" else @@ -3836,7 +3801,7 @@ fi if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:3840: checking for shmat in -lipc" >&5 +echo "configure:3805: checking for shmat in -lipc" >&5 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3844,7 +3809,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lipc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3888,7 +3853,7 @@ fi # libraries we check for below, so use a different variable. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 -echo "configure:3892: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:3857: checking for IceConnectionNumber in -lICE" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3896,7 +3861,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3944,7 +3909,7 @@ X_BASIC_LIBS="-lXext -lX11" our_saved_LDFLAGS="$LDFLAGS" LDFLAGS="$X_LIBS $LDFLAGS" echo $ac_n "checking for XtToolkitThreadInitialize in -lXt""... $ac_c" 1>&6 -echo "configure:3948: checking for XtToolkitThreadInitialize in -lXt" >&5 +echo "configure:3913: checking for XtToolkitThreadInitialize in -lXt" >&5 ac_lib_var=`echo Xt'_'XtToolkitThreadInitialize | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3952,7 +3917,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXt $X_PRE_LIBS $X_BASIC_LIBS $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3991,7 +3956,7 @@ LDFLAGS="$our_saved_LDFLAGS" our_saved_LDFLAGS="$LDFLAGS" LDFLAGS="$X_LIBS $LDFLAGS" echo $ac_n "checking for XdbeQueryExtension in -lXext""... $ac_c" 1>&6 -echo "configure:3995: checking for XdbeQueryExtension in -lXext" >&5 +echo "configure:3960: checking for XdbeQueryExtension in -lXext" >&5 ac_lib_var=`echo Xext'_'XdbeQueryExtension | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3999,7 +3964,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXext -lX11 "$X_EXTRA_LIBS" $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4034,7 +3999,7 @@ else fi echo $ac_n "checking for XmbufQueryExtension in -lXext""... $ac_c" 1>&6 -echo "configure:4038: checking for XmbufQueryExtension in -lXext" >&5 +echo "configure:4003: checking for XmbufQueryExtension in -lXext" >&5 ac_lib_var=`echo Xext'_'XmbufQueryExtension | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4042,7 +4007,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXext -lX11 "$X_EXTRA_LIBS" $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4083,17 +4048,17 @@ for ac_hdr in X11/extensions/Xdbe.h X11/extensions/multibuf.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4087: checking for $ac_hdr" >&5 +echo "configure:4052: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4097: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4062: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4135,7 +4100,7 @@ my_includes="$my_includes -I../include -I.." echo $ac_n "checking interactive graphics""... $ac_c" 1>&6 -echo "configure:4139: checking interactive graphics" >&5 +echo "configure:4104: checking interactive graphics" >&5 if test "$no_x" != "yes" ; then cat >> confdefs.h <<\EOF #define HAVE_X11 1 @@ -4175,6 +4140,72 @@ if test "$fftw" = "true" ; then ctlibs_tools="$ctlibs_tools -lrfftw -lfftw" fi +echo $ac_n "checking for main in -ldmallocxx""... $ac_c" 1>&6 +echo "configure:4145: checking for main in -ldmallocxx" >&5 +ac_lib_var=`echo dmallocxx'_'main | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldmallocxx $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + dmallocxx=true +else + echo "$ac_t""no" 1>&6 +dmallocxx=false +fi + +echo $ac_n "checking for enable-dmalloc""... $ac_c" 1>&6 +echo "configure:4182: checking for enable-dmalloc" >&5 +# Check whether --enable-dmalloc or --disable-dmalloc was given. +if test "${enable_dmalloc+set}" = set; then + enableval="$enable_dmalloc" + case "${enableval}" in + yes) usedmalloc=true + echo "$ac_t""yes" 1>&6 + ;; + no) usedmalloc=false + echo "$ac_t""no" 1>&6 + ;; + *) echo "$ac_t""bad value ${enableval} for --enable-dmalloc" 1>&6 + ;; +esac +else + usedmalloc=false; echo "$ac_t""no" 1>&6 +fi + + +if test "$dmallocxx" = "true" -a "$usedmalloc" = "true" ; then + ctlibs_tools="$ctlibs_tools -ldmallocxx" + cat >> confdefs.h <<\EOF +#define HAVE_DMALLOC 1 +EOF + + echo "$ac_t""Using dmalloc" 1>&6 +fi + LDFLAGS="$LDFLAGS -L../libctsupport -L../libctsim" ctlibs="$ctlibs_base -lctsim $ctlibs_graphics -lctsupport $ctlibs_tools" diff --git a/configure.in b/configure.in index 76052e7..e2c9244 100644 --- a/configure.in +++ b/configure.in @@ -4,7 +4,7 @@ dnl Must reset CDPATH so that bash's cd does not print to stdout dnl CDPATH= AC_INIT(src/ctsim.cpp) -AM_INIT_AUTOMAKE(ctsim,2.0.0-b6) +AM_INIT_AUTOMAKE(ctsim,2.0.0-b7) AM_CONFIG_HEADER(config.h) dnl Checks for programs. @@ -80,7 +80,6 @@ AC_CHECK_LIB(g2, main, [g2=true], [g2=false]) wxwin=false AC_CHECK_LIB(wx_gtk, main, [wxwin=true; wx_gtk=true; AC_DEFINE(HAVE_WXWINDOWS)]) AC_CHECK_LIB(wx_msw, main, [wxwin=true; wx_msw=true; AC_DEFINE(HAVE_WXWINDOWS)]) -AC_CHECK_LIB(dmallocxx, main, [dmalloc=true], [dmalloc=false]) AC_CHECK_LIB(hdf5, main, [hdf5=true], [hdf5=false], -lz) AC_CHECK_LIB(fftw, main, [fftw=true; AC_DEFINE(HAVE_FFTW)], [fftw=false]) @@ -318,6 +317,29 @@ if test "$fftw" = "true" ; then ctlibs_tools="$ctlibs_tools -lrfftw -lfftw" fi +dnl Check for dmalloc +AC_CHECK_LIB(dmallocxx, main, [dmallocxx=true], [dmallocxx=false]) +AC_MSG_CHECKING([for enable-dmalloc]) +AC_ARG_ENABLE(dmalloc, +[ --enable-dmalloc Use dmalloc memory allocation], +[case "${enableval}" in + yes) usedmalloc=true + AC_MSG_RESULT(yes) + ;; + no) usedmalloc=false + AC_MSG_RESULT(no) + ;; + *) AC_MSG_RESULT([bad value ${enableval} for --enable-dmalloc]) + ;; +esac], +[usedmalloc=false; AC_MSG_RESULT(no)]) + +if test "$dmallocxx" = "true" -a "$usedmalloc" = "true" ; then + ctlibs_tools="$ctlibs_tools -ldmallocxx" + AC_DEFINE(HAVE_DMALLOC) + AC_MSG_RESULT(Using dmalloc) +fi + dnl Setting projet libraries and includes LDFLAGS="$LDFLAGS -L../libctsupport -L../libctsim" ctlibs="$ctlibs_base -lctsim $ctlibs_graphics -lctsupport $ctlibs_tools" diff --git a/doc/ctsim.tex b/doc/ctsim.tex index d4207ff..6ea58a7 100644 --- a/doc/ctsim.tex +++ b/doc/ctsim.tex @@ -9,6 +9,12 @@ Welcome to CT. \section{Theory} Theory of CT. \chapter{The Programs} +\section{ctsim - The Graphical User Interface} +{\program ctsim} is the graphical shell for the CTSim project. {\program ctsim} has most of the capabilities of the CTSim project. There are still functions that are only available to the command line tools. +\section{tools - The Command Line Lnterface} +\subsection{phm2pj} +\subsection{pjrec} +\subsection{phm2if} \centerline{This is a centered line} \begin{center} This is a diff --git a/include/ct.h b/include/ct.h index 07a76ef..b5ca948 100644 --- a/include/ct.h +++ b/include/ct.h @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: ct.h,v 1.27 2000/07/09 08:16:17 kevin Exp $ +** $Id: ct.h,v 1.28 2000/07/23 01:49:03 kevin Exp $ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -41,6 +41,9 @@ #ifdef HAVE_CONFIG_H #include #endif +#ifdef HAVE_DMALLOC +#include +#endif #ifdef HAVE_PNG #include "png.h" #endif diff --git a/libctgraphics/driver_x11.cpp b/libctgraphics/driver_x11.cpp deleted file mode 100644 index 7992ee6..0000000 --- a/libctgraphics/driver_x11.cpp +++ /dev/null @@ -1,286 +0,0 @@ -/***************************************************************************** -** This is part of the CTSim program -** Copyright (C) 1983-2000 Kevin Rosenberg -** -** $Id: driver_x11.cpp,v 1.2 2000/06/19 19:04:05 kevin Exp $ -** $Log: driver_x11.cpp,v $ -** Revision 1.2 2000/06/19 19:04:05 kevin -** reorganized header files -** -** Revision 1.1 2000/06/19 18:05:03 kevin -** initial cvs import -** -** Revision 1.1 2000/05/08 20:08:15 kevin -** *** empty log message *** -** -** -** This program is free software; you can redistribute it and/or modify -** it under the terms of the GNU General Public License (version 2) as -** published by the Free Software Foundation. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program; if not, write to the Free Software -** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -******************************************************************************/ - -#include -#include -#include -#include "ctsupport.h" -#include "sgp.h" - -#include -#include - -struct sgp_x11_driver { - Display *theDisplay; - int theScreen; - int theDepth; -}; - -typedef struct sgp_x11_driver SGP_X11_DRIVER; - -SGP_X11_DRIVER sgp_x11; - -sgpdrv_X11_init() -{ - int i; - - sgp_x11.theDisplay = NULL; - for (i = 0; i < 2 && theDisplay == NULL; i++) - sgp_x11.theDisplay = XOpenDisplay( NULL ); - - if ( sgp_x11.theDisplay == NULL ) { - fprintf( stderr, "ERROR: Cannot establish a connection to the X Server %s\n", XDisplayName( NULL )); - exit( 1 ); - } - - sgp_x11.theScreen = DefaultScreen( sgp_x11.theDisplay ); - sgp_x11.theDepth = DefaultDepth( sgp_x11.theDisplay, sgp_x11.theScreen ); -} - -sgpdrv_X11_info() -{ - printf("%s version %d of the X Window System, X%d R%d\n", - ServerVendor( sgp_x11.theDisplay ), - VendorRelease( sgp_x11.theDisplay ), - ProtocolVersion( sgp_x11.theDisplay ), - ProtocolRevision( sgp_x11.theDisplay ) ); - - if ( sgp_x11.theDepth == 1) - printf( "Color plane depth....................%d (monochrome)\n", sgp_x11.theDepth ); - else - printf( "Color plane depth....................%d\n", sgp_x11.theDepth); - - printf( "Display Width........................%d\n", - DisplayWidth( sgp_x11.theDisplay, sgp_x11.theScreen )); - printf( "Display Height.......................%d\n", - DisplayHeight( theDisplay, theScreen )); - printf( "The display %s\n", XDisplayName( sgp_x11.theDisplay )); -} - - - -setlinestyle (LS_SOLID); -setcolor (1); -settext (XCHARSIZ, YCHARSIZ, 0.0, 0); -setbackg (0); -settextclr (1, 0); -gp_set_aspect (CRTDEV, CRTASPT); -gp_set_aspect (PRTDEV, 1.0); -state.xndc = 10.; /* to guarntee a move */ -stylus (0.0,0.0,0); /* move to starting corner */ - - -int -initdevice (int dev, int mode, int xsize, int ysize) -{ - // crt.dotfunc = crt_wdot; - // crt.linefunc = crt_line; - crt.xmin = 0; - crt.ymin = 0; - crt.xmax = 319; - crt.xsize = 320; -} - - -/* NAME - * gp_closedev Close device for output - * - * SYNOPSIS - * gp_closedev (dev) - * int dev Device handle - * - * DESCRIPTION - * Temporarily suspends output from going to a device - */ - -void sgpdrv_x11_term() -{ -} - -void sgpdrv_x11_line() -{ -} - -void sgpdrive_x11_point() -{ -} - -void -sgpdrv_x11_linestyle (int style) -{ - - state.linestyle = style; - - // crt_line_style (crt.style); -} - -void -sgpdrv_x11_linewidth (int wid) -{ - state.linewidth = wid; -} - -void -sgpdrv_x11_textparam ( - double width, - double height, /* size of character in NDC */ - double textangle, /* text angle */ - int font /* text font */ -) -{ - double temp; - - CLIP(height, 0.0, 1.0); - CLIP(width, 0.0, 1.0); -/* textangle = textangle - (2 * PI * (int) (textangle / (2 * PI))); -*/ - cspec.width = width; - cspec.height = height; - cspec.textangle = textangle; - cspec.font = font; - - if (textangle > - HALFPI / 2 && textangle < HALFPI / 2) { - cspec.updir = YPLUS; - cspec.textdir = XPLUS; - } else if (textangle > HALFPI / 2 && textangle < 3 * HALFPI / 2) { - cspec.updir = XMINUS; - cspec.textdir = YPLUS; - } else if (textangle > 3 * HALFPI / 2 && textangle < 5 * HALFPI / 2) { - cspec.updir = YMINUS; - cspec.textdir = XMINUS; - } else if (textangle > 5 * HALFPI / 2 && textangle < 7 * HALFPI / 2) { - cspec.updir = XPLUS; - cspec.textdir = YMINUS; - } else { - cspec.updir = YPLUS; - cspec.textdir = XPLUS; - } - - if (cspec.updir == XMINUS || cspec.updir == XPLUS) { - temp = height; - height = width; - width = temp; - } - - crt.icwidth = width * crt.xsize + 0.5; - crt.icheight = height * crt.ysize + 0.5; - crt.icwidth = iclip (crt.icwidth, 8, crt.xsize); - crt.icheight = iclip (crt.icheight, 8, crt.ysize); - - prt.icwidth = width * prt.xsize + 0.5; - prt.icheight = height * prt.ysize + 0.5; - prt.icwidth = iclip (prt.icwidth, 8, prt.xsize); - prt.icheight = iclip (prt.icheight, 8, prt.ysize); -} - -void -sgpdrv_textcolor (int fore, int back) -{ - cspec.fore = fore; - cspec.back = back; - crt.cfore = fore; - crt.cback = back; - prt.cfore = iclip (fore, 0, prt.colormax); - prt.cback = back; -} - -void -sgpdrv_color (int fore) -{ - int back; - - state.foregnd = fore; - back = state.backgnd; - crtcolor (crt.mode, &fore, &back); /* set colors on crt */ -} - -void -sgpdrv_backgroundg (int back) -{ - int fore; - - state.backgnd = back; - fore = state.foregnd; - crtcolor (crt.mode, &fore, &back); -} - -/* - * INITMARKER () - * - * Sets the current marker symbol (cross, square, diamond..) - */ -void sgpdrv_marker (int marker, int color) -{ - if (marker > NMARKERS || marker < 0) - return(-1); - else { - state.marktype = marker; - state.markcolor = color; - } - return(0); -} /* end initmarker */ - -/* - * SETCHARDIR ( ) - * - * indicates in which direction a string should be printed, e.g.: - * direction = YPLUS -> print on the horizontal from left to right - * direction = YMINUS -> print upside-down characters from right to left - * direction = XMINUS -> print on the vertical from down to up - * direction = XPLUS -> print on the vertical from up to down - */ -void sgpdrv_x11_textdir ( - int direction /* direction flag */ -) -{ - if (direction != XPLUS && - direction != XMINUS && - direction != YPLUS && - direction != YMINUS ) { - printf("Error in character direction: %d\n", direction); - return(-1); - } - cspec.textdir = direction; - charsize (cspec.width, cspec.height); -} - -int -void sgpdrv_x11_charsize (double wid, double height) -{ - settext (wid, height, cspec.textangle, cspec.font); -} - -void -sgpdrv_x11_textangle (double angle) -{ - settext (cspec.width, cspec.height, angle, cspec.font); -} - - diff --git a/libctsim/array2dfile.cpp b/libctsim/array2dfile.cpp index ed04a7c..f0f19ab 100644 --- a/libctsim/array2dfile.cpp +++ b/libctsim/array2dfile.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: array2dfile.cpp,v 1.6 2000/07/13 07:03:21 kevin Exp $ +** $Id: array2dfile.cpp,v 1.7 2000/07/23 01:49:03 kevin Exp $ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -170,7 +170,7 @@ Array2dFile::~Array2dFile (void) { freeArray (); for (labelIterator l = m_labels.begin(); l != m_labels.end(); l++) - delete *l; + delete *l; } Array2dFile::Array2dFile (void) diff --git a/libctsim/backprojectors.cpp b/libctsim/backprojectors.cpp index 4983256..7a1c55b 100644 --- a/libctsim/backprojectors.cpp +++ b/libctsim/backprojectors.cpp @@ -8,7 +8,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: backprojectors.cpp,v 1.10 2000/07/22 15:45:33 kevin Exp $ +** $Id: backprojectors.cpp,v 1.11 2000/07/23 01:49:03 kevin Exp $ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -440,7 +440,7 @@ BackprojectDiff::BackprojectView (const double* const filteredProj, const double for (int iy = 0; iy < ny; iy++, curDetPos += det_dy) { #ifdef DEBUG - printf ("[%2d,%2d]: %8.5lf ", ix, iy, curDetPos); + printf ("[%2d,%2d]: %8.5f ", ix, iy, curDetPos); #endif if (interpType == Backprojector::INTERP_NEAREST) { int iDetPos = iDetCenter + nearest(curDetPos / detInc); // calc index in the filtered raysum vector @@ -491,7 +491,7 @@ BackprojectDiff2::BackprojectView (const double* const filteredProj, const doubl for (int iy = 0; iy < ny; iy++, curDetPos += det_dy) { #ifdef DEBUG - printf ("[%2d,%2d]: %8.5f %8.5f\n", ix, iy, curDetPos, filteredProj[iDetCenter + nearest(L))]); + printf ("[%2d,%2d]: %8.5f %8.5f\n", ix, iy, curDetPos, filteredProj[iDetCenter + nearest(curDetPos)]); #endif if (interpType == Backprojector::INTERP_NEAREST) { int iDetPos = iDetCenter + nearest (curDetPos); // calc index in the filtered raysum vector diff --git a/libctsim/filter.cpp b/libctsim/filter.cpp index 48ae612..544afec 100644 --- a/libctsim/filter.cpp +++ b/libctsim/filter.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: filter.cpp,v 1.21 2000/07/22 16:14:49 kevin Exp $ +** $Id: filter.cpp,v 1.22 2000/07/23 01:49:03 kevin Exp $ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -136,10 +136,8 @@ const int SignalFilter::s_iDomainCount = sizeof(s_aszDomainName) / sizeof(const */ SignalFilter::SignalFilter (const char* filterName, const char* filterMethodName, double bw, double signalIncrement, int nSignalPoints, double param, const char* domainName, int zeropad = 0, int preinterpolationFactor = 1) + : m_vecFilter(NULL), m_vecFourierCosTable(NULL), m_vecFourierSinTable(NULL), m_fail(false) { - m_vecFilter = NULL; - m_vecFourierCosTable = NULL; - m_vecFourierSinTable = NULL; m_idFilter = convertFilterNameToID (filterName); if (m_idFilter == FILTER_INVALID) { m_fail = true; @@ -165,18 +163,17 @@ SignalFilter::SignalFilter (const char* filterName, const char* filterMethodName } SignalFilter::SignalFilter (const int filterID, const int filterMethodID, double bw, double signalIncrement, int nSignalPoints, double param, const int domainID, int zeropad = 0, int preinterpolationFactor = 1) + : m_vecFilter(NULL), m_vecFourierCosTable(NULL), m_vecFourierSinTable(NULL), m_fail(false) { init (filterID, filterMethodID, bw, signalIncrement, nSignalPoints, param, domainID, zeropad, preinterpolationFactor); } SignalFilter::SignalFilter (const char* filterName, const char* domainName, double bw, double param) + : m_vecFilter(NULL), m_vecFourierCosTable(NULL), m_vecFourierSinTable(NULL), m_fail(false) { m_bw = bw; m_nSignalPoints = 0; m_nFilterPoints = 0; - m_vecFilter = NULL; - m_vecFourierCosTable = NULL; - m_vecFourierSinTable = NULL; m_filterParam = param; m_idFilter = convertFilterNameToID (filterName); if (m_idFilter == FILTER_INVALID) { @@ -209,7 +206,6 @@ SignalFilter::init (const int filterID, const int filterMethodID, double bw, dou m_nameFilter = convertFilterIDToName (m_idFilter); m_nameDomain = convertDomainIDToName (m_idDomain); m_nameFilterMethod = convertFilterMethodIDToName (m_idFilterMethod); - m_fail = false; m_nSignalPoints = nSignalPoints; m_signalInc = signalIncrement; m_filterParam = filterParam; @@ -363,10 +359,10 @@ SignalFilter::convertFilterNameToID (const char *filterName) int filterID = FILTER_INVALID; for (int i = 0; i < s_iFilterCount; i++) - if (strcasecmp (filterName, s_aszFilterName[i]) == 0) { - filterID = i; - break; - } + if (strcasecmp (filterName, s_aszFilterName[i]) == 0) { + filterID = i; + break; + } return (filterID); } @@ -413,7 +409,7 @@ SignalFilter::convertFilterMethodIDToName (const int fmID) static const char *name = ""; if (fmID >= 0 && fmID < s_iFilterMethodCount) - return (s_aszFilterName [fmID]); + return (s_aszFilterMethodName [fmID]); return (name); } diff --git a/libctsupport/clip.cpp b/libctsupport/clip.cpp index ebf94c2..f99c20f 100644 --- a/libctsupport/clip.cpp +++ b/libctsupport/clip.cpp @@ -14,7 +14,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: clip.cpp,v 1.3 2000/06/22 10:17:28 kevin Exp $ +** $Id: clip.cpp,v 1.4 2000/07/23 01:49:03 kevin Exp $ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -251,8 +251,7 @@ clip_triangle (double& x1, double& y1, double& x2, double& y2, const double u, c int c2 = tcode (x2, y2, m, b, clip_xaxis); #ifdef DEBUG - crt_set_cpos (1,1); - printf ("x1:%6.2f y1:%6.2f code1:%2d x2:%6.2f y2:%6.2f code2:%2d", + printf ("x1:%6.2f y1:%6.2f code1:%2d x2:%6.2f y2:%6.2f code2:%2d\n", x1, y1, c1, x2, y2, c2); #endif while ( c1 || c2 ) { @@ -294,8 +293,7 @@ clip_triangle (double& x1, double& y1, double& x2, double& y2, const double u, c x2=x; y2=y; c2=tcode (x2,y2,m,b,clip_xaxis); } #ifdef DEBUG - crt_set_cpos (1,1); - printf ("x1:%6.2f y1:%6.2f code1:%2d x2:%6.2f y2:%6.2f code2:%2d", x1, y1, c1, x2, y2, c2); + printf ("x1:%6.2f y1:%6.2f code1:%2d x2:%6.2f y2:%6.2f code2:%2d\n", x1, y1, c1, x2, y2, c2); #endif } diff --git a/src/ctsim.cpp b/src/ctsim.cpp index 533f324..bb3b841 100644 --- a/src/ctsim.cpp +++ b/src/ctsim.cpp @@ -1,15 +1,15 @@ /***************************************************************************** ** FILE IDENTIFICATION ** -** Name: ctsim.h -** Purpose: Header file for top-level routines of CTSim program +** Name: ctsim.cpp +** Purpose: Top-level routines of CTSim program ** Programmer: Kevin Rosenberg ** Date Started: July 2000 ** ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: ctsim.cpp,v 1.8 2000/07/22 15:45:33 kevin Exp $ +** $Id: ctsim.cpp,v 1.9 2000/07/23 01:49:03 kevin Exp $ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -53,12 +53,14 @@ #include #endif +static const char* rcsindent = "$Id"; class CTSimApp* theApp = NULL; struct option CTSimApp::ctsimOptions[] = { {"help", 0, 0, O_HELP}, + {"version", 0, 0, O_VERSION}, {0, 0, 0, 0} }; @@ -80,6 +82,9 @@ CTSimApp::OnInit(void) break; switch (c) { + case O_VERSION: + cout << rcsindent << endl; + exit(0); case O_HELP: case '?': usage (argv[0]); @@ -144,6 +149,7 @@ CTSimApp::usage(const char* program) cout << "usage: " << fileBasename(program) << " [files-to-open...] [OPTIONS]\n"; cout << "Computed Tomography Simulator (Graphical Shell)\n"; cout << "\n"; + cout << " --version Display version\n"; cout << " --help Display this help message\n"; } @@ -151,6 +157,9 @@ int CTSimApp::OnExit(void) { delete m_docManager; +#ifdef HAVE_DMALLOC + dmalloc_shutdown(); +#endif return 0; } diff --git a/src/ctsim.h b/src/ctsim.h index c240096..c013a34 100644 --- a/src/ctsim.h +++ b/src/ctsim.h @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: ctsim.h,v 1.3 2000/07/18 03:14:35 kevin Exp $ +** $Id: ctsim.h,v 1.4 2000/07/23 01:49:03 kevin Exp $ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -29,6 +29,12 @@ #define __CTSIMH__ #include "wx/docview.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#ifdef HAVE_DMALLOC +#include +#endif // Define a new frame class MainFrame: public wxDocParentFrame @@ -75,7 +81,7 @@ private: static struct option ctsimOptions[]; - enum { O_HELP }; + enum { O_HELP, O_VERSION }; }; DECLARE_APP(CTSimApp) diff --git a/src/dialogs.cpp b/src/dialogs.cpp index 38db188..79913b4 100644 --- a/src/dialogs.cpp +++ b/src/dialogs.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: dialogs.cpp,v 1.6 2000/07/22 16:14:49 kevin Exp $ +** $Id: dialogs.cpp,v 1.7 2000/07/23 01:49:03 kevin Exp $ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -49,6 +49,7 @@ #include "dialogs.h" #include #include "ctsupport.h" +#include "ctsim.h" #include "scanner.h" #include "phantom.h" #include "filter.h" diff --git a/tools/phm2if.cpp b/tools/phm2if.cpp index 1e6992e..b027975 100644 --- a/tools/phm2if.cpp +++ b/tools/phm2if.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: phm2if.cpp,v 1.3 2000/07/22 15:45:33 kevin Exp $ +** $Id: phm2if.cpp,v 1.4 2000/07/23 01:49:03 kevin Exp $ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -98,13 +98,13 @@ phm2if_usage (const char *program) } #ifdef HAVE_MPI -void mpi_gather_image (MPIWorld& mpiWorld, ImageFile* imGlobal, ImageFile* imLocal, const int opt_debug); +void mpi_gather_image (MPIWorld& mpiWorld, ImageFile* pImGlobal, ImageFile* pImLocal, const int opt_debug); #endif int phm2if_main (int argc, char* argv[]) { - ImageFile* imGlobal = NULL; + ImageFile* pImGlobal = NULL; Phantom phm; int opt_nx = 0, opt_ny = 0; int opt_nsample = 1; @@ -121,7 +121,7 @@ phm2if_main (int argc, char* argv[]) int opt_trace = TRACE_NONE; bool opt_verbose = false; #ifdef HAVE_MPI - ImageFile* imLocal = NULL; + ImageFile* pImLocal = NULL; MPIWorld mpiWorld (argc, argv); #endif @@ -296,17 +296,17 @@ phm2if_main (int argc, char* argv[]) phm.createFromPhantom (optPhmName.c_str()); if (mpiWorld.getRank() == 0) { - imGlobal = new ImageFile (opt_nx, opt_ny); + pImGlobal = new ImageFile (opt_nx, opt_ny); } - imLocal = new ImageFile (opt_nx, opt_ny); + pImLocal = new ImageFile (opt_nx, opt_ny); #else - imGlobal = new ImageFile (opt_nx, opt_ny); + pImGlobal = new ImageFile (opt_nx, opt_ny); #endif ImageFileArray v; #ifdef HAVE_MPI if (mpiWorld.getRank() == 0) - v = imGlobal->getArray (); + v = pImGlobal->getArray (); if (phm.getComposition() == P_UNIT_PULSE) { if (mpiWorld.getRank() == 0) { @@ -314,31 +314,31 @@ phm2if_main (int argc, char* argv[]) } } else if (optFilterName != "") { if (mpiWorld.getRank() == 0) { - imGlobal->filterResponse (optDomainName.c_str(), opt_filter_bw, optFilterName.c_str(), opt_filter_param); + pImGlobal->filterResponse (optDomainName.c_str(), opt_filter_bw, optFilterName.c_str(), opt_filter_param); } } else { TimerCollectiveMPI timerRasterize (mpiWorld.getComm()); - phm.convertToImagefile (*imLocal, opt_nsample, opt_trace, mpiWorld.getMyStartWorkUnit(), mpiWorld.getMyLocalWorkUnits()); + phm.convertToImagefile (*pImLocal, opt_nsample, opt_trace, mpiWorld.getMyStartWorkUnit(), mpiWorld.getMyLocalWorkUnits()); if (opt_verbose) timerRasterize.timerEndAndReport ("Time to rasterize phantom"); TimerCollectiveMPI timerGather (mpiWorld.getComm()); - mpi_gather_image (mpiWorld, imGlobal, imLocal, opt_debug); + mpi_gather_image (mpiWorld, pImGlobal, pImLocal, opt_debug); if (opt_verbose) timerGather.timerEndAndReport ("Time to gather image"); } #else - v = imGlobal->getArray (); + v = pImGlobal->getArray (); if (phm.getComposition() == P_UNIT_PULSE) { v[opt_nx/2][opt_ny/2] = 1.; } else if (optFilterName != "") { - imGlobal->filterResponse (optDomainName.c_str(), opt_filter_bw, optFilterName.c_str(), opt_filter_param); + pImGlobal->filterResponse (optDomainName.c_str(), opt_filter_bw, optFilterName.c_str(), opt_filter_param); } else { #if HAVE_SGP if (opt_trace >= TRACE_PHM) phm.show(); #endif - phm.convertToImagefile (*imGlobal, opt_nsample, opt_trace); + phm.convertToImagefile (*pImGlobal, opt_nsample, opt_trace); } #endif @@ -347,8 +347,8 @@ phm2if_main (int argc, char* argv[]) #endif { double calctime = timerProgram.timerEnd (); - imGlobal->labelAdd (Array2dFileLabel::L_HISTORY, opt_desc.c_str(), calctime); - imGlobal->fileWrite (opt_outfile); + pImGlobal->labelAdd (Array2dFileLabel::L_HISTORY, opt_desc.c_str(), calctime); + pImGlobal->fileWrite (opt_outfile); if (opt_verbose) cout << "Time to rasterized phantom: " << calctime << " seconds" << endl; @@ -360,33 +360,38 @@ phm2if_main (int argc, char* argv[]) scanf ("%d", &nscale); printf ("Enter minimum and maximum densities (min, max): "); scanf ("%lf %lf", &dmin, &dmax); - imGlobal->displayScaling (nscale, dmin, dmax); + pImGlobal->displayScaling (nscale, dmin, dmax); } } + delete pImGlobal; +#ifdef HAVE_MPI + delete pImLocal; +#endif + return (0); } #ifdef HAVE_MPI -void mpi_gather_image (MPIWorld& mpiWorld, ImageFile* imGlobal, ImageFile* imLocal, const int opt_debug) +void mpi_gather_image (MPIWorld& mpiWorld, ImageFile* pImGlobal, ImageFile* pImLocal, const int opt_debug) { - ImageFileArray vLocal = imLocal->getArray(); + ImageFileArray vLocal = pImLocal->getArray(); ImageFileArray vGlobal = NULL; - int nyLocal = imLocal->ny(); + int nyLocal = pImLocal->ny(); if (mpiWorld.getRank() == 0) - vGlobal = imGlobal->getArray(); + vGlobal = pImGlobal->getArray(); for (int iw = 0; iw < mpiWorld.getMyLocalWorkUnits(); iw++) - mpiWorld.getComm().Send(vLocal[iw], nyLocal, imLocal->getMPIDataType(), 0, 0); + mpiWorld.getComm().Send(vLocal[iw], nyLocal, pImLocal->getMPIDataType(), 0, 0); if (mpiWorld.getRank() == 0) { for (int iProc = 0; iProc < mpiWorld.getNumProcessors(); iProc++) { for (int iw = mpiWorld.getStartWorkUnit(iProc); iw <= mpiWorld.getEndWorkUnit(iProc); iw++) { MPI::Status status; - mpiWorld.getComm().Recv(vGlobal[iw], nyLocal, imLocal->getMPIDataType(), iProc, 0, status); + mpiWorld.getComm().Recv(vGlobal[iw], nyLocal, pImLocal->getMPIDataType(), iProc, 0, status); } } } diff --git a/tools/phm2pj.cpp b/tools/phm2pj.cpp index b494aa2..4624611 100644 --- a/tools/phm2pj.cpp +++ b/tools/phm2pj.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: phm2pj.cpp,v 1.3 2000/07/22 15:45:33 kevin Exp $ +** $Id: phm2pj.cpp,v 1.4 2000/07/23 01:49:03 kevin Exp $ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -358,6 +358,9 @@ main (int argc, char* argv[]) try { retval = phm2pj_main(argc, argv); +#if HAVE_DMALLOC + // dmalloc_shutdown(); +#endif } catch (exception e) { cerr << "Exception: " << e.what() << endl; } catch (...) { -- 2.34.1