r369: Improvements in ctsimtext
authorKevin M. Rosenberg <kevin@rosenberg.net>
Tue, 9 Jan 2001 22:31:47 +0000 (22:31 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Tue, 9 Jan 2001 22:31:47 +0000 (22:31 +0000)
13 files changed:
INSTALL
acconfig.h
config.h.in
configure
configure.in
include/ct.h
tools/Makefile.am
tools/Makefile.in
tools/ctsimtext.cpp
tools/if2.cpp
tools/ifexport.cpp
tools/phm2if.cpp
tools/phm2pj.cpp

diff --git a/INSTALL b/INSTALL
index 160aa2d35bcb98d606c32f47051fc80d08edf89f..265eccec0f2741c8d06443e1abee751ba9f6327f 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -38,6 +38,9 @@ apache (http://www.apache.org)
   --with-cgibin-dir=..., --with-cgibin-url=..., --with-webdata-dir=...,
   --with-webdata-url=..., and --with-html-dir=...  must be set.
 
+readline (http://www.gnu.org)
+  Used for provide command-line editing in ctsimtext shell
+
 
 CTSim Specific Configuration Help
 ---------------------------------
index 437d66db3ad99e9c3cf654c1475081065f5b058f..95e2f28e1150d0dbc4d062fc39b9eba47dc1aa18 100644 (file)
@@ -55,9 +55,6 @@
 /* Define is have interactive graphics */
 #undef HAVE_SGP
 
-/* Define for G2 library */
-#undef HAVE_G2_H
-
 /* Define for X11 library */
 #undef HAVE_X11
 
@@ -80,3 +77,5 @@
 #undef HAVE_SSTREAM
 
 #undef HAVE_READLINE
+
+#undef HAVE_G2
index a1b85bea12a54880de398a10f8eb090c6c33f095..5b65651b7d954533f983d2c385ea62ea0f07e009 100644 (file)
@@ -49,9 +49,6 @@
 /* Define is have interactive graphics */
 #undef HAVE_SGP
 
-/* Define for G2 library */
-#undef HAVE_G2_H
-
 /* Define for X11 library */
 #undef HAVE_X11
 
 
 #undef HAVE_SSTREAM
 
+#undef HAVE_READLINE
+
+#undef HAVE_G2
+
 /* The number of bytes in a double.  */
 #undef SIZEOF_DOUBLE
 
 /* Define if you have the <netinet/in.h> header file.  */
 #undef HAVE_NETINET_IN_H
 
+/* Define if you have the <readline.h> header file.  */
+#undef HAVE_READLINE_H
+
+/* Define if you have the <readline/readline.h> header file.  */
+#undef HAVE_READLINE_READLINE_H
+
 /* Define if you have the <setjmp.h> header file.  */
 #undef HAVE_SETJMP_H
 
 /* Version number of package */
 #undef VERSION
 
-#undef HAVE_READLINE
index 663e7f5e3fbd9486dcf6c5d30c413f9f37a1f693..e6fe3509bcaa24d02ca8952630eac3cedcd71c6c 100755 (executable)
--- a/configure
+++ b/configure
@@ -715,7 +715,7 @@ fi
 
 PACKAGE=ctsim
 
-VERSION=3.0.0alpha3
+VERSION=3.0.0alpha4
 
 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; }
@@ -1914,9 +1914,49 @@ else
 g2=false
 fi
 
+echo $ac_n "checking for main in -lreadline""... $ac_c" 1>&6
+echo "configure:1919: checking for main in -lreadline" >&5
+ac_lib_var=`echo readline'_'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="-lreadline  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1927 "configure"
+#include "confdefs.h"
+
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:1934: \"$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
+  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
+  readline=true; cat >> confdefs.h <<\EOF
+#define HAVE_READLINE 1
+EOF
+
+else
+  echo "$ac_t""no" 1>&6
+readline=false
+fi
+
 wxwin=false
 echo $ac_n "checking for main in -lwx_gtk""... $ac_c" 1>&6
-echo "configure:1920: checking for main in -lwx_gtk" >&5
+echo "configure:1960: 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
@@ -1924,14 +1964,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lwx_gtk  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1928 "configure"
+#line 1968 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:1935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1975: \"$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
@@ -1955,7 +1995,7 @@ else
 fi
 
 echo $ac_n "checking for main in -lwx""... $ac_c" 1>&6
-echo "configure:1959: checking for main in -lwx" >&5
+echo "configure:1999: checking for main in -lwx" >&5
 ac_lib_var=`echo wx'_'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
@@ -1963,14 +2003,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lwx  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1967 "configure"
+#line 2007 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:1974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2014: \"$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
@@ -1994,7 +2034,7 @@ else
 fi
 
 echo $ac_n "checking for main in -lhdf5""... $ac_c" 1>&6
-echo "configure:1998: checking for main in -lhdf5" >&5
+echo "configure:2038: 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
@@ -2002,14 +2042,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lhdf5 -lz $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2006 "configure"
+#line 2046 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:2013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2053: \"$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
@@ -2031,7 +2071,7 @@ hdf5=false
 fi
 
 echo $ac_n "checking for fftw_one in -lfftw""... $ac_c" 1>&6
-echo "configure:2035: checking for fftw_one in -lfftw" >&5
+echo "configure:2075: checking for fftw_one in -lfftw" >&5
 ac_lib_var=`echo fftw'_'fftw_one | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2039,7 +2079,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lfftw  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2043 "configure"
+#line 2083 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2050,7 +2090,7 @@ int main() {
 fftw_one()
 ; return 0; }
 EOF
-if { (eval echo configure:2054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2094: \"$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
@@ -2077,7 +2117,7 @@ fi
 
 if test "$zlib" = "true" ; then
   echo $ac_n "checking for main in -lpng""... $ac_c" 1>&6
-echo "configure:2081: checking for main in -lpng" >&5
+echo "configure:2121: 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
@@ -2085,14 +2125,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpng  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2089 "configure"
+#line 2129 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:2096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2136: \"$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
@@ -2119,7 +2159,7 @@ fi
 fi
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2123: checking how to run the C preprocessor" >&5
+echo "configure:2163: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -2134,13 +2174,13 @@ else
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 2138 "configure"
+#line 2178 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2144: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2184: \"$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
   :
@@ -2151,13 +2191,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 2155 "configure"
+#line 2195 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2201: \"$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
   :
@@ -2168,13 +2208,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 2172 "configure"
+#line 2212 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2218: \"$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
   :
@@ -2199,12 +2239,12 @@ fi
 echo "$ac_t""$CPP" 1>&6
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2203: checking for ANSI C header files" >&5
+echo "configure:2243: 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 <<EOF
-#line 2208 "configure"
+#line 2248 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -2212,7 +2252,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2216: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2256: \"$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*
@@ -2229,7 +2269,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
-#line 2233 "configure"
+#line 2273 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -2247,7 +2287,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
-#line 2251 "configure"
+#line 2291 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -2268,7 +2308,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 2272 "configure"
+#line 2312 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -2279,7 +2319,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:2283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -2302,21 +2342,21 @@ EOF
 
 fi
 
-for ac_hdr in fcntl.h unistd.h getopt.h sys/fcntl.h setjmp.h stdarg.h stddef.h sys/types.h sys/stat.h string.h ctype.h math.h stdio.h netinet/in.h inttypes.h sys/param.h stdint.h stdlib.h g2.h assert.h sys/time.h sys/resource.h sys/time.h
+for ac_hdr in fcntl.h unistd.h getopt.h sys/fcntl.h setjmp.h stdarg.h stddef.h sys/types.h sys/stat.h string.h ctype.h math.h stdio.h netinet/in.h inttypes.h sys/param.h stdint.h stdlib.h g2.h assert.h sys/time.h sys/resource.h sys/time.h readline.h readline/readline.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2310: checking for $ac_hdr" >&5
+echo "configure:2350: 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
-#line 2315 "configure"
+#line 2355 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2360: \"$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*
@@ -2344,12 +2384,12 @@ done
 
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:2348: checking for working const" >&5
+echo "configure:2388: 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 <<EOF
-#line 2353 "configure"
+#line 2393 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -2398,7 +2438,7 @@ ccp = (char const *const *) p;
 
 ; return 0; }
 EOF
-if { (eval echo configure:2402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -2419,12 +2459,12 @@ EOF
 fi
 
 echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:2423: checking for off_t" >&5
+echo "configure:2463: 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 <<EOF
-#line 2428 "configure"
+#line 2468 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -2452,12 +2492,12 @@ EOF
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:2456: checking for size_t" >&5
+echo "configure:2496: 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 <<EOF
-#line 2461 "configure"
+#line 2501 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -2485,12 +2525,12 @@ EOF
 fi
 
 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
-echo "configure:2489: checking whether struct tm is in sys/time.h or time.h" >&5
+echo "configure:2529: 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 <<EOF
-#line 2494 "configure"
+#line 2534 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <time.h>
@@ -2498,7 +2538,7 @@ int main() {
 struct tm *tp; tp->tm_sec;
 ; return 0; }
 EOF
-if { (eval echo configure:2502: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_tm=time.h
 else
@@ -2520,12 +2560,12 @@ fi
 
 
 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
-echo "configure:2524: checking for vprintf" >&5
+echo "configure:2564: 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 <<EOF
-#line 2529 "configure"
+#line 2569 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char vprintf(); below.  */
@@ -2548,7 +2588,7 @@ vprintf();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2592: \"$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
@@ -2572,12 +2612,12 @@ fi
 
 if test "$ac_cv_func_vprintf" != yes; then
 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
-echo "configure:2576: checking for _doprnt" >&5
+echo "configure:2616: 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 <<EOF
-#line 2581 "configure"
+#line 2621 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char _doprnt(); below.  */
@@ -2600,7 +2640,7 @@ _doprnt();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2644: \"$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
@@ -2627,12 +2667,12 @@ fi
 for ac_func in strtod strtol snprintf htonl usleep vsprintf vsnprintf
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2631: checking for $ac_func" >&5
+echo "configure:2671: 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 <<EOF
-#line 2636 "configure"
+#line 2676 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2655,7 +2695,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2699: \"$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
@@ -2680,12 +2720,12 @@ fi
 done
 
 echo $ac_n "checking for basename""... $ac_c" 1>&6
-echo "configure:2684: checking for basename" >&5
+echo "configure:2724: 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 <<EOF
-#line 2689 "configure"
+#line 2729 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char basename(); below.  */
@@ -2708,7 +2748,7 @@ basename();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2752: \"$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
@@ -2728,12 +2768,12 @@ else
 fi
 
 echo $ac_n "checking for setjmp""... $ac_c" 1>&6
-echo "configure:2732: checking for setjmp" >&5
+echo "configure:2772: 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 <<EOF
-#line 2737 "configure"
+#line 2777 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char setjmp(); below.  */
@@ -2756,7 +2796,7 @@ setjmp();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2800: \"$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
@@ -2776,12 +2816,12 @@ else
 fi
 
 echo $ac_n "checking for setpriority""... $ac_c" 1>&6
-echo "configure:2780: checking for setpriority" >&5
+echo "configure:2820: checking for setpriority" >&5
 if eval "test \"`echo '$''{'ac_cv_func_setpriority'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2785 "configure"
+#line 2825 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char setpriority(); below.  */
@@ -2804,7 +2844,7 @@ setpriority();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_setpriority=yes"
 else
@@ -2824,12 +2864,12 @@ else
 fi
 
 echo $ac_n "checking for time""... $ac_c" 1>&6
-echo "configure:2828: checking for time" >&5
+echo "configure:2868: checking for time" >&5
 if eval "test \"`echo '$''{'ac_cv_func_time'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2833 "configure"
+#line 2873 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char time(); below.  */
@@ -2852,7 +2892,7 @@ time();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_time=yes"
 else
@@ -2872,12 +2912,12 @@ else
 fi
 
 echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
-echo "configure:2876: checking for gettimeofday" >&5
+echo "configure:2916: checking for gettimeofday" >&5
 if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2881 "configure"
+#line 2921 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gettimeofday(); below.  */
@@ -2900,7 +2940,7 @@ gettimeofday();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_gettimeofday=yes"
 else
@@ -2924,12 +2964,12 @@ if test "${OSTYPE}" = "cygwin" ; then
   getopt_long=false
 else
   echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
-echo "configure:2928: checking for getopt_long" >&5
+echo "configure:2968: 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 <<EOF
-#line 2933 "configure"
+#line 2973 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char getopt_long(); below.  */
@@ -2952,7 +2992,7 @@ getopt_long();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2996: \"$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
@@ -2993,8 +3033,12 @@ else
 fi
 fi
 
+if test "${readline}" = "true" ; then
+  ctlibs_base="$ctlibs_base -lreadline"
+fi
+
 echo $ac_n "checking debug""... $ac_c" 1>&6
-echo "configure:2998: checking debug" >&5
+echo "configure:3042: checking debug" >&5
 # Check whether --enable-debug or --disable-debug was given.
 if test "${enable_debug+set}" = set; then
   enableval="$enable_debug"
@@ -3029,7 +3073,7 @@ if test "$debug" = "true" ; then
 EOF
 
 else
-  CFLAGS="-g -O3 -DNDEBUG"
+  CFLAGS="-O3 -DNDEBUG"
   cat >> confdefs.h <<\EOF
 #define NDEBUG 1
 EOF
@@ -3037,7 +3081,7 @@ EOF
 fi
 
 echo $ac_n "checking sstream""... $ac_c" 1>&6
-echo "configure:3041: checking sstream" >&5
+echo "configure:3085: checking sstream" >&5
  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 ; then
   cat >> confdefs.h <<\EOF
@@ -3055,7 +3099,7 @@ echo "$ac_t""no" 1>&6
  fi
  
 echo $ac_n "checking whether to enable verbose warnings""... $ac_c" 1>&6
-echo "configure:3059: checking whether to enable verbose warnings" >&5
+echo "configure:3103: 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"
@@ -3105,7 +3149,7 @@ fi
 
 
 echo $ac_n "checking static executables""... $ac_c" 1>&6
-echo "configure:3109: checking static executables" >&5
+echo "configure:3153: checking static executables" >&5
 # Check whether --enable-static or --disable-static was given.
 if test "${enable_static+set}" = set; then
   enableval="$enable_static"
@@ -3144,7 +3188,7 @@ if test "$withval" != "no" ; then
   fi
 
   echo $ac_n "checking for LAM MPI installation""... $ac_c" 1>&6
-echo "configure:3148: checking for LAM MPI installation" >&5
+echo "configure:3192: 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/hcp" ; then
       if test "$testlamdir" != "/usr"; then    
@@ -3165,7 +3209,7 @@ else
 fi
 
 echo $ac_n "checking for web access""... $ac_c" 1>&6
-echo "configure:3169: checking for web access" >&5
+echo "configure:3213: 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"
@@ -3255,7 +3299,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:3259: checking for X" >&5
+echo "configure:3303: checking for X" >&5
 
 # Check whether --with-x or --without-x was given.
 if test "${with_x+set}" = set; then
@@ -3317,12 +3361,12 @@ if test "$ac_x_includes" = NO; then
 
   # First, try using that file with no special directory specified.
 cat > conftest.$ac_ext <<EOF
-#line 3321 "configure"
+#line 3365 "configure"
 #include "confdefs.h"
 #include <$x_direct_test_include>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3326: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3370: \"$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*
@@ -3391,14 +3435,14 @@ if test "$ac_x_libraries" = NO; then
   ac_save_LIBS="$LIBS"
   LIBS="-l$x_direct_test_library $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3395 "configure"
+#line 3439 "configure"
 #include "confdefs.h"
 
 int main() {
 ${x_direct_test_function}()
 ; return 0; }
 EOF
-if { (eval echo configure:3402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3446: \"$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.
@@ -3504,17 +3548,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:3508: checking whether -R must be followed by a space" >&5
+echo "configure:3552: checking whether -R must be followed by a space" >&5
       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
       cat > conftest.$ac_ext <<EOF
-#line 3511 "configure"
+#line 3555 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:3518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_R_nospace=yes
 else
@@ -3530,14 +3574,14 @@ rm -f conftest*
       else
        LIBS="$ac_xsave_LIBS -R $x_libraries"
        cat > conftest.$ac_ext <<EOF
-#line 3534 "configure"
+#line 3578 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:3541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_R_space=yes
 else
@@ -3569,7 +3613,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:3573: checking for dnet_ntoa in -ldnet" >&5
+echo "configure:3617: 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
@@ -3577,7 +3621,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldnet  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3581 "configure"
+#line 3625 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3588,7 +3632,7 @@ int main() {
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:3592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3636: \"$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
@@ -3610,7 +3654,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:3614: checking for dnet_ntoa in -ldnet_stub" >&5
+echo "configure:3658: 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
@@ -3618,7 +3662,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldnet_stub  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3622 "configure"
+#line 3666 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3629,7 +3673,7 @@ int main() {
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:3633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3677: \"$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
@@ -3658,12 +3702,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:3662: checking for gethostbyname" >&5
+echo "configure:3706: 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 <<EOF
-#line 3667 "configure"
+#line 3711 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname(); below.  */
@@ -3686,7 +3730,7 @@ gethostbyname();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3734: \"$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
@@ -3707,7 +3751,7 @@ fi
 
     if test $ac_cv_func_gethostbyname = no; then
       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:3711: checking for gethostbyname in -lnsl" >&5
+echo "configure:3755: 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
@@ -3715,7 +3759,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3719 "configure"
+#line 3763 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3726,7 +3770,7 @@ int main() {
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:3730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3774: \"$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
@@ -3756,12 +3800,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:3760: checking for connect" >&5
+echo "configure:3804: 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 <<EOF
-#line 3765 "configure"
+#line 3809 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char connect(); below.  */
@@ -3784,7 +3828,7 @@ connect();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3832: \"$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
@@ -3805,7 +3849,7 @@ fi
 
     if test $ac_cv_func_connect = no; then
       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
-echo "configure:3809: checking for connect in -lsocket" >&5
+echo "configure:3853: 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
@@ -3813,7 +3857,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3817 "configure"
+#line 3861 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3824,7 +3868,7 @@ int main() {
 connect()
 ; return 0; }
 EOF
-if { (eval echo configure:3828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3872: \"$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
@@ -3848,12 +3892,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:3852: checking for remove" >&5
+echo "configure:3896: 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 <<EOF
-#line 3857 "configure"
+#line 3901 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char remove(); below.  */
@@ -3876,7 +3920,7 @@ remove();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3924: \"$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
@@ -3897,7 +3941,7 @@ fi
 
     if test $ac_cv_func_remove = no; then
       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
-echo "configure:3901: checking for remove in -lposix" >&5
+echo "configure:3945: 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
@@ -3905,7 +3949,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lposix  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3909 "configure"
+#line 3953 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3916,7 +3960,7 @@ int main() {
 remove()
 ; return 0; }
 EOF
-if { (eval echo configure:3920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3964: \"$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
@@ -3940,12 +3984,12 @@ fi
 
     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
     echo $ac_n "checking for shmat""... $ac_c" 1>&6
-echo "configure:3944: checking for shmat" >&5
+echo "configure:3988: 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 <<EOF
-#line 3949 "configure"
+#line 3993 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char shmat(); below.  */
@@ -3968,7 +4012,7 @@ shmat();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4016: \"$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
@@ -3989,7 +4033,7 @@ fi
 
     if test $ac_cv_func_shmat = no; then
       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
-echo "configure:3993: checking for shmat in -lipc" >&5
+echo "configure:4037: 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
@@ -3997,7 +4041,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lipc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4001 "configure"
+#line 4045 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4008,7 +4052,7 @@ int main() {
 shmat()
 ; return 0; }
 EOF
-if { (eval echo configure:4012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4056: \"$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
@@ -4041,7 +4085,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:4045: checking for IceConnectionNumber in -lICE" >&5
+echo "configure:4089: 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
@@ -4049,7 +4093,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4053 "configure"
+#line 4097 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4060,7 +4104,7 @@ int main() {
 IceConnectionNumber()
 ; return 0; }
 EOF
-if { (eval echo configure:4064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4108: \"$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
@@ -4097,7 +4141,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:4101: checking for XtToolkitThreadInitialize in -lXt" >&5
+echo "configure:4145: 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
@@ -4105,7 +4149,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXt $X_PRE_LIBS $X_BASIC_LIBS $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4109 "configure"
+#line 4153 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4116,7 +4160,7 @@ int main() {
 XtToolkitThreadInitialize()
 ; return 0; }
 EOF
-if { (eval echo configure:4120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4164: \"$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
@@ -4144,7 +4188,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:4148: checking for XdbeQueryExtension in -lXext" >&5
+echo "configure:4192: 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
@@ -4152,7 +4196,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXext -lX11 "$X_EXTRA_LIBS" $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4156 "configure"
+#line 4200 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4163,7 +4207,7 @@ int main() {
 XdbeQueryExtension()
 ; return 0; }
 EOF
-if { (eval echo configure:4167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4211: \"$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
@@ -4187,7 +4231,7 @@ else
 fi
 
 echo $ac_n "checking for XmbufQueryExtension in -lXext""... $ac_c" 1>&6
-echo "configure:4191: checking for XmbufQueryExtension in -lXext" >&5
+echo "configure:4235: 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
@@ -4195,7 +4239,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXext -lX11 "$X_EXTRA_LIBS" $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4199 "configure"
+#line 4243 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4206,7 +4250,7 @@ int main() {
 XmbufQueryExtension()
 ; return 0; }
 EOF
-if { (eval echo configure:4210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4254: \"$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
@@ -4236,17 +4280,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:4240: checking for $ac_hdr" >&5
+echo "configure:4284: 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
-#line 4245 "configure"
+#line 4289 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4250: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4294: \"$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*
@@ -4290,7 +4334,7 @@ my_includes="$my_includes -I../include -I.. -I/usr/local/include"
 LDFLAGS="$LDFLAGS -L/usr/local/lib"
 
 echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:4294: checking for X" >&5
+echo "configure:4338: checking for X" >&5
 if test "$no_x" != "yes" ; then
   cat >> confdefs.h <<\EOF
 #define HAVE_SGP 1
@@ -4350,7 +4394,7 @@ if test "$fftw" = "true" ; then
 fi
 
 echo $ac_n "checking for main in -ldmallocxx""... $ac_c" 1>&6
-echo "configure:4354: checking for main in -ldmallocxx" >&5
+echo "configure:4398: 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
@@ -4358,14 +4402,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldmallocxx  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4362 "configure"
+#line 4406 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:4369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4413: \"$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
@@ -4387,7 +4431,7 @@ dmallocxx=false
 fi
 
 echo $ac_n "checking for enable-dmalloc""... $ac_c" 1>&6
-echo "configure:4391: checking for enable-dmalloc" >&5
+echo "configure:4435: checking for enable-dmalloc" >&5
 # Check whether --enable-dmalloc or --disable-dmalloc was given.
 if test "${enable_dmalloc+set}" = set; then
   enableval="$enable_dmalloc"
@@ -4443,7 +4487,7 @@ ctlibs="$ctlibs_base -lctsim $ctlibs_graphics -lctsupport $ctlibs_tools"
 
 
 if test -n "$lamdir" ; then
-  lamprograms="pjrec-lam phm2if-lam phm2pj-lam"
+  lamprograms="ctsimtext-lam"
   
   lamdefs="$CFLAGS"
   
index 511304efd77251b95a52bcaf278d154587a0add9..79f48747ab3558478ae469199dab5a27b10fbe61 100644 (file)
@@ -39,7 +39,7 @@ AC_CHECK_LIB(m, sin)
 AC_CHECK_LIB(curses, main, [curses=true], [curses=false])
 AC_CHECK_LIB(ncurses, main, [ncurses=true], [ncurses=false])
 AC_CHECK_LIB(g2, main, [g2=true], [g2=false])
-AC_CHECK_LIB(readline, main, [readline=true; AC_DEFINE(HAVE_READLINE)], readline=false)
+AC_CHECK_LIB(readline, main, [readline=true; AC_DEFINE(HAVE_READLINE)], [readline=false])
 wxwin=false
 AC_CHECK_LIB(wx_gtk, main, [wxwin=true; wx_gtk=true; AC_DEFINE(HAVE_WXWINDOWS)])
 AC_CHECK_LIB(wx, main, [wxwin=true; wx_msw=true; AC_DEFINE(HAVE_WXWINDOWS)])
@@ -52,7 +52,7 @@ fi
 
 dnl Checks for header files.
 AC_HEADER_STDC
-AC_CHECK_HEADERS(fcntl.h unistd.h getopt.h sys/fcntl.h setjmp.h stdarg.h stddef.h sys/types.h sys/stat.h string.h ctype.h math.h stdio.h netinet/in.h inttypes.h sys/param.h stdint.h stdlib.h g2.h assert.h sys/time.h sys/resource.h sys/time.h)
+AC_CHECK_HEADERS(fcntl.h unistd.h getopt.h sys/fcntl.h setjmp.h stdarg.h stddef.h sys/types.h sys/stat.h string.h ctype.h math.h stdio.h netinet/in.h inttypes.h sys/param.h stdint.h stdlib.h g2.h assert.h sys/time.h sys/resource.h sys/time.h readline.h readline/readline.h)
 
 dnl Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
@@ -83,6 +83,10 @@ if test "${getopt_long}" = "false" ; then
   AM_CONDITIONAL(INCLUDED_GETOPT_LONG, test 1==1)
 fi
 
+if test "${readline}" = "true" ; then
+  ctlibs_base="$ctlibs_base -lreadline"
+fi
+
 dnl Check for debug mode
 AC_MSG_CHECKING([debug])
 AC_ARG_ENABLE(debug,
@@ -365,7 +369,7 @@ ctlibs="$ctlibs_base -lctsim $ctlibs_graphics -lctsupport $ctlibs_tools"
 AC_SUBST(ctlibs)
 
 if test -n "$lamdir" ; then
-  lamprograms="pjrec-lam phm2if-lam phm2pj-lam"
+  lamprograms="ctsimtext-lam"
   AC_SUBST(lamprograms)
   lamdefs="$CFLAGS"
   AC_SUBST(lamdefs)
index 2172063b6d2d717c098776a4825b0edf8f542161..62a6976b50ddace350fbdf66cee2ecae524da361 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: ct.h,v 1.50 2001/01/03 22:00:46 kevin Exp $
+**  $Id: ct.h,v 1.51 2001/01/09 22:31:47 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
@@ -28,6 +28,8 @@
 #ifndef CT_H
 #define CT_H
 
+#define NO_MAIN 1    // filter out all old main blocks
+
 #ifdef MSVC
 #include "msvc_compat.h"
 #endif
index 8c8e2160ab2ed2e93fe19e38c45cb1475e01a47b..b64692bd0ef838f96698dae74df56e53e784f2fb 100644 (file)
@@ -1,8 +1,7 @@
-bin_PROGRAMS = pjrec phm2pj pj2if @lamprograms@  ifinfo phm2if if1 if2 ifexport pjinfo 
+bin_PROGRAMS = @lamprograms@  ctsimtext 
 bin_SCRIPTS = sample-ctsim.sh
-EXTRA_PROGRAMS = pjrec-lam phm2pj-lam phm2if-lam ctsimtext ctsimtext-mpi
+EXTRA_PROGRAMS = ctsimtext-lam
 INCLUDES=@my_includes@
-EXTRA_DIST=Makefile.nt mpiworld.cpp
 
 if HAVE_SGP
 SOURCE_DEPEND=../include/ct.h ../libctsim/libctsim.a ../libctsupport/libctsupport.a ../libctgraphics/libctgraphics.a
@@ -10,67 +9,28 @@ else
 SOURCE_DEPEND=../include/ct.h ../libctsim/libctsim.a ../libctsupport/libctsupport.a
 endif
 
-pjrec_SOURCES = pjrec.cpp  
-pjrec_LDADD=@ctlibs@
-pjrec_DEPENDENCIES=$(SOURCE_DEPEND)
-phm2pj_SOURCES=phm2pj.cpp 
-phm2pj_LDADD=@ctlibs@
-phm2pj_DEPENDENCIES=$(SOURCE_DEPEND)
-phm2if_SOURCES = phm2if.cpp
-phm2if_LDADD=@ctlibs@
-phm2if_DEPENDENCIES=$(SOURCE_DEPEND)
-ifexport_SOURCES = ifexport.cpp
-ifexport_LDADD=@ctlibs@
-ifexport_DEPENDENCIES=$(SOURCE_DEPEND)
-pj2if_SOURCES = pj2if.cpp
-pj2if_LDADD=@ctlibs@
-pj2if_DEPENDENCIES=$(SOURCE_DEPEND)
-pjinfo_SOURCES = pjinfo.cpp
-pjinfo_LDADD=@ctlibs@
-pjinfo_DEPENDENCIES=$(SOURCE_DEPEND)
-if1_SOURCES=if1.cpp 
-if1_LDADD=@ctlibs@
-if1_DEPENDENCIES=$(SOURCE_DEPEND)
-if2_SOURCES=if2.cpp 
-if2_LDADD=@ctlibs@
-if2_DEPENDENCIES=$(SOURCE_DEPEND)
-ifinfo_SOURCES = ifinfo.cpp
-ifinfo_LDADD=@ctlibs@
-ifinfo_DEPENDENCIES=$(SOURCE_DEPEND)
+install-exec-hook:
+       ln -s $(bindir)/ctsimtext $(bindir)/ifinfo
 
-#ctsimtext_SOURCES = ctsimtext.cpp if1.cpp if2.cpp ifinfo.cpp ifexport.cpp phm2if.cpp phm2pj.cpp pj2if.cpp pjinfo.cpp pjrec.cpp
-#ctsimtext_LDADD=@ctlibs@
-#ctsim_DEPENDENCIES=$(SOURCE_DEPEND)
-
-pjrec_lam_SOURCES=pjrec.cpp
-pjrec_lam_LDADD=@ctlamlibs@
-phm2if_lam_SOURCES=phm2if.cpp
-phm2if_lam_LDADD=@ctlamlibs@
-phm2pj_lam_SOURCES=phm2pj.cpp
-phm2pj_lam_LDADD=@ctlamlibs@
-
-ctsimtext: ctsimtext.cpp if1.cpp if2.cpp ifinfo.cpp ifexport.cpp phm2if.cpp phm2pj.cpp pj2if.cpp pjinfo.cpp pjrec.cpp mpiworld.cpp ../include/ct.h  ../libctsim/libctsim.a ../libctsupport/libctsupport.a
-       $(CC) -DHAVE_CONFIG_H $(CFLAGS) $(INCLUDES) -DNO_MAIN ctsimtext.cpp if1.cpp if2.cpp ifinfo.cpp ifexport.cpp phm2if.cpp phm2pj.cpp pj2if.cpp pjinfo.cpp pjrec.cpp -o ctsimtext-lam $(LDFLAGS) $(LAM_EXTRA_SRC) @ctlibs@
+ctsimtext_SOURCES = ctsimtext.cpp if1.cpp if2.cpp ifinfo.cpp ifexport.cpp phm2if.cpp phm2pj.cpp pj2if.cpp pjinfo.cpp pjrec.cpp
+ctsimtext_LDADD=@ctlibs@
+ctsimtext_DEPENDENCIES=$(SOURCE_DEPEND)
 
 realclean:
        rm -f *.pgm *.if *~ *.pj
 
+ctsimtext_lam_SOURCES = ctsimtext.cpp if1.cpp if2.cpp ifinfo.cpp ifexport.cpp phm2if.cpp phm2pj.cpp pj2if.cpp pjinfo.cpp pjrec.cpp mpiworld.cpp
+ctsimtext_lam_LDADD=@ctlamlibs@
+
 if USE_LAM
 CC_LAM = $(lamdir)/bin/hcp
 LAM_EXTRA_SRC = mpiworld.cpp
 
+ctsimtext_lam_DEPENDENCIES=$(SOURCE_DEPEND)
+
 ctsimtext-lam: ctsimtext.cpp if1.cpp if2.cpp ifinfo.cpp ifexport.cpp phm2if.cpp phm2pj.cpp pj2if.cpp pjinfo.cpp pjrec.cpp mpiworld.cpp ../include/ct.h  ../libctsim/libctsim.a ../libctsupport/libctsupport.a
        $(CC_LAM) @DEFS@ @lamdefs@ $(CFLAGS) $(INCLUDES) -DHAVE_MPI -DNO_MAIN ctsimtext.cpp if1.cpp if2.cpp ifinfo.cpp ifexport.cpp phm2if.cpp phm2pj.cpp pj2if.cpp pjinfo.cpp pjrec.cpp -o ctsimtext-lam $(LDFLAGS) $(LAM_EXTRA_SRC) @ctlibs@
 
-pjrec-lam: pjrec.cpp mpiworld.cpp ../include/ct.h  ../libctsim/libctsim.a ../libctsupport/libctsupport.a
-       $(CC_LAM) @DEFS@ @lamdefs@ $(CFLAGS) $(INCLUDES) -DHAVE_MPI pjrec.cpp -o pjrec-lam $(LDFLAGS) $(LAM_EXTRA_SRC) @ctlibs@
-
-phm2pj-lam: phm2pj.cpp mpiworld.cpp ../include/ct.h ../libctsim/libctsim.a ../libctsupport/libctsupport.a
-       $(CC_LAM) @DEFS@ @lamdefs@ $(CFLAGS) $(INCLUDES) -DHAVE_MPI phm2pj.cpp -o phm2pj-lam $(LDFLAGS) $(LAM_EXTRA_SRC) @ctlibs@
-
-phm2if-lam: phm2if.cpp mpiworld.cpp ../include/ct.h ../libctsim/libctsim.a ../libctsupport/libctsupport.a
-       $(CC_LAM) @DEFS@ @lamdefs@ $(CFLAGS) $(INCLUDES) -DHAVE_MPI phm2if.cpp -o phm2if-lam $(LDFLAGS) $(LAM_EXTRA_SRC) @ctlibs@
-
 endif
 
 
index 550e9e1097bb60d96cda562b47fcab2662edebce..5dfc5b8d9867b77c222e96519496df8a4e1c878f 100644 (file)
@@ -90,51 +90,24 @@ wxcflags = @wxcflags@
 wxconfig = @wxconfig@
 wxlibs = @wxlibs@
 
-bin_PROGRAMS = pjrec phm2pj pj2if @lamprograms@  ifinfo phm2if if1 if2 ifexport pjinfo
+bin_PROGRAMS = @lamprograms@  ctsimtext 
 bin_SCRIPTS = sample-ctsim.sh
-EXTRA_PROGRAMS = pjrec-lam phm2pj-lam phm2if-lam
+EXTRA_PROGRAMS = ctsimtext-lam
 INCLUDES = @my_includes@
-EXTRA_DIST = Makefile.nt mpiworld.cpp
 @HAVE_SGP_TRUE@SOURCE_DEPEND = ../include/ct.h ../libctsim/libctsim.a ../libctsupport/libctsupport.a ../libctgraphics/libctgraphics.a
 @HAVE_SGP_FALSE@SOURCE_DEPEND = ../include/ct.h ../libctsim/libctsim.a ../libctsupport/libctsupport.a
 
-pjrec_SOURCES = pjrec.cpp  
-pjrec_LDADD = @ctlibs@
-pjrec_DEPENDENCIES = $(SOURCE_DEPEND)
-phm2pj_SOURCES = phm2pj.cpp 
-phm2pj_LDADD = @ctlibs@
-phm2pj_DEPENDENCIES = $(SOURCE_DEPEND)
-phm2if_SOURCES = phm2if.cpp
-phm2if_LDADD = @ctlibs@
-phm2if_DEPENDENCIES = $(SOURCE_DEPEND)
-ifexport_SOURCES = ifexport.cpp
-ifexport_LDADD = @ctlibs@
-ifexport_DEPENDENCIES = $(SOURCE_DEPEND)
-pj2if_SOURCES = pj2if.cpp
-pj2if_LDADD = @ctlibs@
-pj2if_DEPENDENCIES = $(SOURCE_DEPEND)
-pjinfo_SOURCES = pjinfo.cpp
-pjinfo_LDADD = @ctlibs@
-pjinfo_DEPENDENCIES = $(SOURCE_DEPEND)
-if1_SOURCES = if1.cpp 
-if1_LDADD = @ctlibs@
-if1_DEPENDENCIES = $(SOURCE_DEPEND)
-if2_SOURCES = if2.cpp 
-if2_LDADD = @ctlibs@
-if2_DEPENDENCIES = $(SOURCE_DEPEND)
-ifinfo_SOURCES = ifinfo.cpp
-ifinfo_LDADD = @ctlibs@
-ifinfo_DEPENDENCIES = $(SOURCE_DEPEND)
-
-pjrec_lam_SOURCES = pjrec.cpp
-pjrec_lam_LDADD = @ctlamlibs@
-phm2if_lam_SOURCES = phm2if.cpp
-phm2if_lam_LDADD = @ctlamlibs@
-phm2pj_lam_SOURCES = phm2pj.cpp
-phm2pj_lam_LDADD = @ctlamlibs@
+ctsimtext_SOURCES = ctsimtext.cpp if1.cpp if2.cpp ifinfo.cpp ifexport.cpp phm2if.cpp phm2pj.cpp pj2if.cpp pjinfo.cpp pjrec.cpp
+ctsimtext_LDADD = @ctlibs@
+ctsimtext_DEPENDENCIES = $(SOURCE_DEPEND)
+
+ctsimtext_lam_SOURCES = ctsimtext.cpp if1.cpp if2.cpp ifinfo.cpp ifexport.cpp phm2if.cpp phm2pj.cpp pj2if.cpp pjinfo.cpp pjrec.cpp mpiworld.cpp
+ctsimtext_lam_LDADD = @ctlamlibs@
 
 @USE_LAM_TRUE@CC_LAM = $(lamdir)/bin/hcp
 @USE_LAM_TRUE@LAM_EXTRA_SRC = mpiworld.cpp
+
+@USE_LAM_TRUE@ctsimtext_lam_DEPENDENCIES = $(SOURCE_DEPEND)
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = ../config.h
 CONFIG_CLEAN_FILES =  sample-ctsim.sh
@@ -145,33 +118,12 @@ DEFS = @DEFS@ -I. -I$(srcdir) -I..
 CPPFLAGS = @CPPFLAGS@
 LDFLAGS = @LDFLAGS@
 LIBS = @LIBS@
-pjrec_lam_OBJECTS =  pjrec.o
-pjrec_lam_DEPENDENCIES = 
-pjrec_lam_LDFLAGS = 
-phm2pj_lam_OBJECTS =  phm2pj.o
-phm2pj_lam_DEPENDENCIES = 
-phm2pj_lam_LDFLAGS = 
-phm2if_lam_OBJECTS =  phm2if.o
-phm2if_lam_DEPENDENCIES = 
-phm2if_lam_LDFLAGS = 
-pjrec_OBJECTS =  pjrec.o
-pjrec_LDFLAGS = 
-phm2pj_OBJECTS =  phm2pj.o
-phm2pj_LDFLAGS = 
-pj2if_OBJECTS =  pj2if.o
-pj2if_LDFLAGS = 
-ifinfo_OBJECTS =  ifinfo.o
-ifinfo_LDFLAGS = 
-phm2if_OBJECTS =  phm2if.o
-phm2if_LDFLAGS = 
-if1_OBJECTS =  if1.o
-if1_LDFLAGS = 
-if2_OBJECTS =  if2.o
-if2_LDFLAGS = 
-ifexport_OBJECTS =  ifexport.o
-ifexport_LDFLAGS = 
-pjinfo_OBJECTS =  pjinfo.o
-pjinfo_LDFLAGS = 
+ctsimtext_lam_OBJECTS =  ctsimtext.o if1.o if2.o ifinfo.o ifexport.o \
+phm2if.o phm2pj.o pj2if.o pjinfo.o pjrec.o mpiworld.o
+ctsimtext_lam_LDFLAGS = 
+ctsimtext_OBJECTS =  ctsimtext.o if1.o if2.o ifinfo.o ifexport.o \
+phm2if.o phm2pj.o pj2if.o pjinfo.o pjrec.o
+ctsimtext_LDFLAGS = 
 SCRIPTS =  $(bin_SCRIPTS)
 
 CXXFLAGS = @CXXFLAGS@
@@ -185,11 +137,11 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
 
 TAR = gtar
 GZIP_ENV = --best
-DEP_FILES =  .deps/if1.P .deps/if2.P .deps/ifexport.P .deps/ifinfo.P \
-.deps/phm2if.P .deps/phm2pj.P .deps/pj2if.P .deps/pjinfo.P \
-.deps/pjrec.P
-SOURCES = $(pjrec_lam_SOURCES) $(phm2pj_lam_SOURCES) $(phm2if_lam_SOURCES) $(pjrec_SOURCES) $(phm2pj_SOURCES) $(pj2if_SOURCES) $(ifinfo_SOURCES) $(phm2if_SOURCES) $(if1_SOURCES) $(if2_SOURCES) $(ifexport_SOURCES) $(pjinfo_SOURCES)
-OBJECTS = $(pjrec_lam_OBJECTS) $(phm2pj_lam_OBJECTS) $(phm2if_lam_OBJECTS) $(pjrec_OBJECTS) $(phm2pj_OBJECTS) $(pj2if_OBJECTS) $(ifinfo_OBJECTS) $(phm2if_OBJECTS) $(if1_OBJECTS) $(if2_OBJECTS) $(ifexport_OBJECTS) $(pjinfo_OBJECTS)
+DEP_FILES =  .deps/ctsimtext.P .deps/if1.P .deps/if2.P .deps/ifexport.P \
+.deps/ifinfo.P .deps/mpiworld.P .deps/phm2if.P .deps/phm2pj.P \
+.deps/pj2if.P .deps/pjinfo.P .deps/pjrec.P
+SOURCES = $(ctsimtext_lam_SOURCES) $(ctsimtext_SOURCES)
+OBJECTS = $(ctsimtext_lam_OBJECTS) $(ctsimtext_OBJECTS)
 
 all: all-redirect
 .SUFFIXES:
@@ -245,41 +197,9 @@ distclean-compile:
 
 maintainer-clean-compile:
 
-pjrec: $(pjrec_OBJECTS) $(pjrec_DEPENDENCIES)
-       @rm -f pjrec
-       $(CXXLINK) $(pjrec_LDFLAGS) $(pjrec_OBJECTS) $(pjrec_LDADD) $(LIBS)
-
-phm2pj: $(phm2pj_OBJECTS) $(phm2pj_DEPENDENCIES)
-       @rm -f phm2pj
-       $(CXXLINK) $(phm2pj_LDFLAGS) $(phm2pj_OBJECTS) $(phm2pj_LDADD) $(LIBS)
-
-pj2if: $(pj2if_OBJECTS) $(pj2if_DEPENDENCIES)
-       @rm -f pj2if
-       $(CXXLINK) $(pj2if_LDFLAGS) $(pj2if_OBJECTS) $(pj2if_LDADD) $(LIBS)
-
-ifinfo: $(ifinfo_OBJECTS) $(ifinfo_DEPENDENCIES)
-       @rm -f ifinfo
-       $(CXXLINK) $(ifinfo_LDFLAGS) $(ifinfo_OBJECTS) $(ifinfo_LDADD) $(LIBS)
-
-phm2if: $(phm2if_OBJECTS) $(phm2if_DEPENDENCIES)
-       @rm -f phm2if
-       $(CXXLINK) $(phm2if_LDFLAGS) $(phm2if_OBJECTS) $(phm2if_LDADD) $(LIBS)
-
-if1: $(if1_OBJECTS) $(if1_DEPENDENCIES)
-       @rm -f if1
-       $(CXXLINK) $(if1_LDFLAGS) $(if1_OBJECTS) $(if1_LDADD) $(LIBS)
-
-if2: $(if2_OBJECTS) $(if2_DEPENDENCIES)
-       @rm -f if2
-       $(CXXLINK) $(if2_LDFLAGS) $(if2_OBJECTS) $(if2_LDADD) $(LIBS)
-
-ifexport: $(ifexport_OBJECTS) $(ifexport_DEPENDENCIES)
-       @rm -f ifexport
-       $(CXXLINK) $(ifexport_LDFLAGS) $(ifexport_OBJECTS) $(ifexport_LDADD) $(LIBS)
-
-pjinfo: $(pjinfo_OBJECTS) $(pjinfo_DEPENDENCIES)
-       @rm -f pjinfo
-       $(CXXLINK) $(pjinfo_LDFLAGS) $(pjinfo_OBJECTS) $(pjinfo_LDADD) $(LIBS)
+ctsimtext: $(ctsimtext_OBJECTS) $(ctsimtext_DEPENDENCIES)
+       @rm -f ctsimtext
+       $(CXXLINK) $(ctsimtext_LDFLAGS) $(ctsimtext_OBJECTS) $(ctsimtext_LDADD) $(LIBS)
 
 install-binSCRIPTS: $(bin_SCRIPTS)
        @$(NORMAL_INSTALL)
@@ -411,6 +331,8 @@ check: check-am
 installcheck-am:
 installcheck: installcheck-am
 install-exec-am: install-binPROGRAMS install-binSCRIPTS
+       @$(NORMAL_INSTALL)
+       $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
 install-exec: install-exec-am
 
 install-data-am:
@@ -476,17 +398,14 @@ distclean-generic clean-generic maintainer-clean-generic clean \
 mostlyclean distclean maintainer-clean
 
 
+install-exec-hook:
+       ln -s $(bindir)/ctsimtext $(bindir)/ifinfo
+
 realclean:
        rm -f *.pgm *.if *~ *.pj
 
-@USE_LAM_TRUE@pjrec-lam: pjrec.cpp mpiworld.cpp ../include/ct.h  ../libctsim/libctsim.a ../libctsupport/libctsupport.a
-@USE_LAM_TRUE@ $(CC_LAM) @DEFS@ @lamdefs@ $(CFLAGS) $(INCLUDES) -DHAVE_MPI pjrec.cpp -o pjrec-lam $(LDFLAGS) $(LAM_EXTRA_SRC) @ctlibs@
-
-@USE_LAM_TRUE@phm2pj-lam: phm2pj.cpp mpiworld.cpp ../include/ct.h ../libctsim/libctsim.a ../libctsupport/libctsupport.a
-@USE_LAM_TRUE@ $(CC_LAM) @DEFS@ @lamdefs@ $(CFLAGS) $(INCLUDES) -DHAVE_MPI phm2pj.cpp -o phm2pj-lam $(LDFLAGS) $(LAM_EXTRA_SRC) @ctlibs@
-
-@USE_LAM_TRUE@phm2if-lam: phm2if.cpp mpiworld.cpp ../include/ct.h ../libctsim/libctsim.a ../libctsupport/libctsupport.a
-@USE_LAM_TRUE@ $(CC_LAM) @DEFS@ @lamdefs@ $(CFLAGS) $(INCLUDES) -DHAVE_MPI phm2if.cpp -o phm2if-lam $(LDFLAGS) $(LAM_EXTRA_SRC) @ctlibs@
+@USE_LAM_TRUE@ctsimtext-lam: ctsimtext.cpp if1.cpp if2.cpp ifinfo.cpp ifexport.cpp phm2if.cpp phm2pj.cpp pj2if.cpp pjinfo.cpp pjrec.cpp mpiworld.cpp ../include/ct.h  ../libctsim/libctsim.a ../libctsupport/libctsupport.a
+@USE_LAM_TRUE@ $(CC_LAM) @DEFS@ @lamdefs@ $(CFLAGS) $(INCLUDES) -DHAVE_MPI -DNO_MAIN ctsimtext.cpp if1.cpp if2.cpp ifinfo.cpp ifexport.cpp phm2if.cpp phm2pj.cpp pj2if.cpp pjinfo.cpp pjrec.cpp -o ctsimtext-lam $(LDFLAGS) $(LAM_EXTRA_SRC) @ctlibs@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
index cd02ac68fb8569aeb8ed8e2de5db45259d4814f3..8989706491e87d6ea71978b9bdef930ccb35c89b 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: ctsimtext.cpp,v 1.3 2001/01/09 20:38:53 kevin Exp $
+**  $Id: ctsimtext.cpp,v 1.4 2001/01/09 22:31:47 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
 
 #include "ct.h"
 
-#ifdef HAVE_READLINE
+#ifdef HAVE_READLINE_H
+extern "C" {
 #include <readline.h>
 #include <history.h>
+};
+#elif defined(HAVE_READLINE_READLINE_H)
+extern "C" {
+#include <readline/readline.h>
+#include <readline/history.h>
+};
 #endif
 
 
@@ -38,7 +45,7 @@
 // If linked to ctsimtext, but executed as another name, eg pjrec, then program will use that
 // linked name as name of function.
 
-static const char* const g_szIdStr = "$Id: ctsimtext.cpp,v 1.3 2001/01/09 20:38:53 kevin Exp $";
+static const char* const g_szIdStr = "$Id: ctsimtext.cpp,v 1.4 2001/01/09 22:31:47 kevin Exp $";
 static const char* const s_szProgramName = "ctsimtext";
 
 extern int if1_main (int argc, char* const argv[]);
@@ -55,7 +62,6 @@ static int processCommand (int argc, char* const argv[]);
 static void convertStringToArgcv (char* szLine, int* piArgc, char*** pppArgv);
 
 
-
 void 
 ctsimtext_usage (const char *program)
 {
@@ -72,28 +78,55 @@ ctsimtext_usage (const char *program)
   std::cout << "  pj2if         Convert an projection file into an imagefile\n";
 }
 
+void 
+interactive_usage ()
+{
+  std::cout << "usage: function-name parameters...\n";
+  std::cout << "Available functions:\n";
+  std::cout << "  ifinfo        Image file information\n";
+  std::cout << "  if1           Single image file conversion\n";
+  std::cout << "  if2           Dual image file conversions\n";
+  std::cout << "  pjrec         Projection reconstruction\n";
+  std::cout << "  pjinfo        Projection file information\n";
+  std::cout << "  phm2if        Convert a geometric phantom into an imagefile\n";
+  std::cout << "  phm2pj        Take projections of a phantom object\n";
+  std::cout << "  ifexport      Export an imagefile to a graphics file\n";
+  std::cout << "  pj2if         Convert an projection file into an imagefile\n";
+  std::cout << "  quit          Quits shell\n";
+  std::cout << "All functions accept --help as parameter for online help\n\n";
+}
+
+static bool s_bInteractive = false;
+
 
 int 
 ctsimtext_main (int argc, char * argv[])
 {
   int iReturn = 0;
 
-  if (strcmp(argv[0],s_szProgramName) == 0) {
+  if (argc > 1 && strstr(argv[0], s_szProgramName)) {
     argv = &argv[1];
     argc--;
     iReturn = processCommand (argc, argv);
   } else if (argc > 1){
     iReturn = processCommand (argc, argv);
   } else {
+    s_bInteractive = true;
     char szPrompt[] = "CTSim> ";
-    std::string strInput;
+    std::cout << "CTSim Text Shell (Type \"quit\" to end)\n\n";
     while (1) {
-      std::cout << "CTSimText Interactive mode\nType quit to end";
 #ifdef HAVE_READLINE
       char* pszInput = readline (szPrompt);
+      if (! pszInput)
+       break;
+      if (*pszInput != EOS)
+       add_history (pszInput);
 #else
       std::cout << szPrompt;
+      std::string strInput;
       std::cin >> strInput;
+      std::cout << std::flush:;
+      std::cout << "\n";
       char* pszInput = new char [strInput.length() + 1];
       strncpy (pszInput, strInput.c_str(), sizeof(pszInput));
 #endif
@@ -102,8 +135,8 @@ ctsimtext_main (int argc, char * argv[])
         break;
       }
       convertStringToArgcv (pszInput, &argc, &argv);
-      delete pszInput;
       iReturn = processCommand (argc, argv);
+      delete pszInput;
     }
   }
 
@@ -123,7 +156,7 @@ convertStringToArgcv (char* pszLine, int* piArgc, char*** pppArgv)
   bool bInToken = false;
 
   while (*pCurrentPos) {
-    if (iswhite (*pCurrentPos)) {
+    if (isspace (*pCurrentPos)) {
       if (! bInToken)
         *pCurrentPos = 0;
       else if (bInSingleQuote || bInDoubleQuote)
@@ -133,9 +166,10 @@ convertStringToArgcv (char* pszLine, int* piArgc, char*** pppArgv)
         bInToken = false;
       }
     }
-    else if (*pCurrentPos = '\"') {
+    else if (*pCurrentPos == '\"') {
       if (bInSingleQuote) {
         bInSingleQuote = false;
+       *pCurrentPos = 0;
       } else {
         bInSingleQuote = true;
         if (! bInToken) {
@@ -144,9 +178,10 @@ convertStringToArgcv (char* pszLine, int* piArgc, char*** pppArgv)
           vecpszToken.push_back (pCurrentPos+1);
         }
       }
-    } else if (*pCurrentPos = '\'') {
+    } else if (*pCurrentPos == '\'') {
       if (bInDoubleQuote) {
         bInDoubleQuote = false;
+       *pCurrentPos = 0;
       } else {
         bInDoubleQuote = true;
         if (! bInToken) {
@@ -165,7 +200,7 @@ convertStringToArgcv (char* pszLine, int* piArgc, char*** pppArgv)
   }
 
   *piArgc = nTokens;
-  pppArgv = new char** [nTokens];
+  *pppArgv = new char* [nTokens];
   for (unsigned int iToken = 0; iToken < vecpszToken.size(); iToken++)
     (*pppArgv)[iToken] = vecpszToken[iToken];
 }
@@ -194,8 +229,11 @@ processCommand (int argc, char* const argv[])
   else if (strcasecmp (pszFunction, "pjrec") == 0)
     return pjrec_main (argc, argv);
   else {
-    std::cout << "Unknown function name" << pszFunction << "\n\n";
-    ctsimtext_usage (argv[0]);
+    std::cout << "Unknown function name: " << pszFunction << "\n";
+    if (s_bInteractive)
+      interactive_usage();
+    else
+      ctsimtext_usage (s_szProgramName);
     return 1;
   }
 }
index 0f36b595f02beb734cbeba00b6ef0fcbb8d9b4eb..2b69d27f12fb1e05ad4cd5b9b1df8d47d390af5a 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: if2.cpp,v 1.6 2000/12/29 15:45:06 kevin Exp $
+**  $Id: if2.cpp,v 1.7 2001/01/09 22:31:47 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
@@ -46,7 +46,7 @@ static struct option my_options[] =
   {0, 0, 0, 0}
 };
 
-static const char* g_szIdStr = "$Id: if2.cpp,v 1.6 2000/12/29 15:45:06 kevin Exp $";
+static const char* g_szIdStr = "$Id: if2.cpp,v 1.7 2001/01/09 22:31:47 kevin Exp $";
 
 void 
 if2_usage (const char *program)
@@ -251,23 +251,6 @@ if2_main (int argc, char *const argv[])
 \r
     plotFile.fileWrite (strOutFile.c_str());\r
     \r
-#if HAVE_SGP
-    SGPDriver driver ("Column Plot");
-    SGP sgp (driver);
-    EZPlot ezplot;
-    ezplot.ezset ("clear.");
-    ezplot.ezset ("xticks major 5.");
-    ezplot.ezset ("xlabel Column");
-    ezplot.ezset ("title Column Plot");
-    ezplot.ezset ("ylabel Pixel");
-    ezplot.ezset ("box.");
-    ezplot.ezset ("grid.");
-    ezplot.addCurve (plot_xaxis, v1[opt_columnPlot], im_in1.ny());
-    ezplot.addCurve (plot_xaxis, v2[opt_columnPlot], im_in2.ny());
-    ezplot.plot (&sgp);
-    std::cout << "Press enter to continue" << flush;
-    cio_kb_getc();
-#endif
     delete plot_xaxis;
   }
   
@@ -306,23 +289,6 @@ if2_main (int argc, char *const argv[])
     
     plotFile.fileWrite (strOutFile.c_str());
     
-#if HAVE_SGP
-    SGPDriver driver ("Row Plot");
-    SGP sgp (driver);
-    EZPlot ezplot;
-    ezplot.ezset ("clear.");
-    ezplot.ezset ("xticks major 5.");
-    ezplot.ezset ("title Row Plot");
-    ezplot.ezset ("xlabel Row");
-    ezplot.ezset ("ylabel Pixel");
-    ezplot.ezset ("box.");
-    ezplot.ezset ("grid.");
-    ezplot.addCurve (plot_xaxis, v1Row, im_in1.nx());
-    ezplot.addCurve (plot_xaxis, v2Row, im_in2.nx());
-    ezplot.plot (&sgp);
-    std::cout << "Press enter to continue" << flush;
-    cio_kb_getc();
-#endif
     delete plot_xaxis;\r
     delete v1Row;\r
     delete v2Row;\r
index 0ccd6d6921fd54d856ec1850dff395a87f53a3c7..87603323b143673c0fd248bd3fc38120e01cc5dd 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: ifexport.cpp,v 1.2 2000/12/17 23:00:33 kevin Exp $
+**  $Id: ifexport.cpp,v 1.3 2001/01/09 22:31:47 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
@@ -48,7 +48,7 @@ static struct option my_options[] =
   {0, 0, 0, 0}
 };
 
-static const char* g_szIdStr = "$Id: ifexport.cpp,v 1.2 2000/12/17 23:00:33 kevin Exp $";
+static const char* g_szIdStr = "$Id: ifexport.cpp,v 1.3 2001/01/09 22:31:47 kevin Exp $";
 
 enum { O_AUTO_FULL, O_AUTO_STD0_1, O_AUTO_STD0_5, O_AUTO_STD1, O_AUTO_STD2, O_AUTO_STD3 };
 static const char O_AUTO_FULL_STR[]="full";
@@ -63,13 +63,11 @@ static const char O_CENTER_MEAN_STR[]="mean";
 static const char O_CENTER_MODE_STR[]="mode";
 static const char O_CENTER_MEDIAN_STR[]="median";
 
-enum { O_FORMAT_GIF, O_FORMAT_PNG, O_FORMAT_PNG16, O_FORMAT_PGM, O_FORMAT_PGMASC, O_FORMAT_DISP };
-static const char O_FORMAT_GIF_STR[]="gif";
+enum { O_FORMAT_PNG, O_FORMAT_PNG16, O_FORMAT_PGM, O_FORMAT_PGMASC };
 static const char O_FORMAT_PNG_STR[]="png" ;
 static const char O_FORMAT_PNG16_STR[]="png16" ;
 static const char O_FORMAT_PGM_STR[]="pgm";
 static const char O_FORMAT_PGMASC_STR[]="pgmasc";
-static const char O_FORMAT_DISP_STR[]="disp";
 
 void 
 ifexport_usage (const char *program)
@@ -86,10 +84,6 @@ ifexport_usage (const char *program)
   std::cout << "         png    PNG (8-bit) format\n";
   std::cout << "         png16  PNG (16-bit) format\n";
 #endif
-#if HAVE_G2
-  std::cout << "         gif    GIF format\n";
-#endif
-  std::cout << "         disp   Display on screen\n";
   std::cout << "     --center   Center of window\n";
   std::cout << "         median Median is center of window (default)\n";
   std::cout << "         mode   Mode is center of window\n";
@@ -222,9 +216,7 @@ ifexport_main (int argc, char *const argv[])
          else if (strcmp(optarg, O_FORMAT_GIF_STR) == 0)
            opt_format = O_FORMAT_GIF;
 #endif
-         else if (strcmp(optarg, O_FORMAT_DISP_STR) == 0)
-           opt_format = O_FORMAT_DISP;
-         else {
+  else {
              sys_error (ERR_SEVERE, "Invalid format mode %s", optarg);
              ifexport_usage(argv[0]);
              return (1);
@@ -259,22 +251,13 @@ ifexport_main (int argc, char *const argv[])
        }
     }
 
-#if HAVE_SGP
-  if (optind + 1 == argc)
-    opt_format = O_FORMAT_DISP;  // display image if no options
-#endif
-
-  if ((opt_format == O_FORMAT_DISP && optind + 1 != argc) 
-      || (opt_format != O_FORMAT_DISP && optind + 2 != argc)) {
+  if (optind + 2 != argc) {
     ifexport_usage(argv[0]);
     return (1);
   }
   
   in_file = argv[optind];
-
-  if (opt_format != O_FORMAT_DISP)
-      out_file = argv[optind+1];
-  else out_file = NULL;
+  out_file = argv[optind+1];
 
   pim = new ImageFile ();
   ImageFile& im = *pim;
@@ -364,13 +347,6 @@ ifexport_main (int argc, char *const argv[])
   else if (opt_format == O_FORMAT_GIF) 
     im.writeImageGIF (out_file, opt_scale, opt_scale, densmin, densmax);
 #endif
-  else if (opt_format == O_FORMAT_DISP) {
-#if HAVE_SGP
-    im.displayScaling (opt_scale, densmin, densmax);
-    std::cout << "Press enter to continue\n";
-    cio_kb_getc();
-#endif
-  }
   else
     {
       sys_error (ERR_SEVERE, "Internal Error: Invalid format mode %d", opt_format);
index 8d5e403d997452803c4c81df671281a54d3a04c6..edcdba43cad1d9e4345fc53362e8524d35791646 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: phm2if.cpp,v 1.20 2001/01/07 22:19:44 kevin Exp $
+**  $Id: phm2if.cpp,v 1.21 2001/01/09 22:31:47 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
@@ -50,7 +50,7 @@ static struct option my_options[] =
   {0, 0, 0, 0}
 };
 
-static const char* g_szIdStr = "$Id: phm2if.cpp,v 1.20 2001/01/07 22:19:44 kevin Exp $";
+static const char* g_szIdStr = "$Id: phm2if.cpp,v 1.21 2001/01/09 22:31:47 kevin Exp $";
 
 void 
 phm2if_usage (const char *program)
@@ -332,10 +332,6 @@ phm2if_main (int argc, char* const argv[])
   } else if (optFilterName != "") {
     pImGlobal->filterResponse (optDomainName.c_str(), optFilterBW, optFilterName.c_str(), optFilterParam);
   } else {
-#if HAVE_SGP
-    if (optTrace >= Trace::TRACE_PHANTOM)
-      phm.show();
-#endif
     phm.convertToImagefile (*pImGlobal, opt_nsample, optTrace);
   }
 #endif
index 4e4463da9bec97b6e9690b73ad55f57b155c9dbb..313045a7262858637d1946447c3ae5866264da42 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: phm2pj.cpp,v 1.21 2001/01/07 22:19:44 kevin Exp $
+**  $Id: phm2pj.cpp,v 1.22 2001/01/09 22:31:47 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
@@ -50,7 +50,7 @@ static struct option phm2pj_options[] =
   {0, 0, 0, 0}
 };
 
-static const char* g_szIdStr = "$Id: phm2pj.cpp,v 1.21 2001/01/07 22:19:44 kevin Exp $";
+static const char* g_szIdStr = "$Id: phm2pj.cpp,v 1.22 2001/01/09 22:31:47 kevin Exp $";
 
 
 void 
@@ -324,26 +324,8 @@ phm2pj_main (int argc, char* const argv[])
 
 #else
   Projections pjGlobal (scanner);
-#if HAVE_SGP
-  SGPDriver* pSGPDriver = NULL;
-  SGP* pSGP = NULL;
-  if (opt_trace >= Trace::TRACE_PHANTOM) {
-    pSGPDriver = new SGPDriver ("phm2pj", 600, 600);
-    pSGP = new SGP (*pSGPDriver);
-  }
-  scanner.collectProjections (pjGlobal, phm, opt_trace, pSGP);
-  if (opt_trace >= Trace::TRACE_PHANTOM) {
-    std::cout << "Press enter to continue\n";
-    cio_kb_getc();
-    delete pSGP;  pSGP = NULL;
-    delete pSGPDriver;  pSGPDriver = NULL;
-  }
-
-#else
   scanner.collectProjections (pjGlobal, phm, opt_trace);
 #endif
-
-#endif
   
 #ifdef HAVE_MPI
   if (mpiWorld.getRank() == 0)