r186: *** empty log message ***
[ctsim.git] / configure
index c011a924d09cd35a7b401bf424ed9e6f9bb14042..299bf4348756e26f01cf987ea1397049503d315a 100755 (executable)
--- a/configure
+++ b/configure
 ac_help=
 ac_default_prefix=/usr/local
 # Any additions from configure.in:
+ac_help="$ac_help
+  --enable-debug          Turn on debugging"
 ac_help="$ac_help
   --enable-verbose-warnings
                           Enable verbose compiler warnings."
-ac_help="$ac_help
-  --enable-debug          Turn on debugging"
 ac_help="$ac_help
   --with-lam[=PATH]       Set path of LAM MPI "
 ac_help="$ac_help
@@ -712,7 +712,7 @@ fi
 
 PACKAGE=ctsim
 
-VERSION=2.0.0-b7
+VERSION=2.0.0b11
 
 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; }
@@ -2614,7 +2614,7 @@ fi
 
 fi
 
-for ac_func in strtod strtol snprintf htonl
+for ac_func in strtod strtol snprintf htonl usleep
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
 echo "configure:2621: checking for $ac_func" >&5
@@ -2837,13 +2837,57 @@ else
 fi
 fi
 
+echo $ac_n "checking debug""... $ac_c" 1>&6
+echo "configure:2842: checking debug" >&5
+# Check whether --enable-debug or --disable-debug was given.
+if test "${enable_debug+set}" = set; then
+  enableval="$enable_debug"
+  case "${enableval}" in
+  yes) debug=true 
+       echo "$ac_t""yes" 1>&6
+       ;;
+  no)  debug=false 
+       echo "$ac_t""no" 1>&6
+       ;;
+  *) echo "$ac_t""bad value ${enableval} for --enable-debug" 1>&6 
+       ;;
+esac
+else
+  debug=false; echo "$ac_t""no" 1>&6
+fi
+
+
+
+if test "$debug" = "true"; then
+  DEBUG_TRUE=
+  DEBUG_FALSE='#'
+else
+  DEBUG_TRUE='#'
+  DEBUG_FALSE=
+fi
+
+if test "$debug" = "true" ; then
+  CFLAGS="-g -DDEBUG"
+  cat >> confdefs.h <<\EOF
+#define DEBUG 1
+EOF
+
+else
+  CFLAGS="-g -O3 -DNDEBUG"
+  cat >> confdefs.h <<\EOF
+#define NDEBUG 1
+EOF
+
+fi
+
+
 
  if test -n "$GCC"; then
     CFLAGS="$CFLAGS -Wall"
  fi
  
 echo $ac_n "checking whether to enable verbose warnings""... $ac_c" 1>&6
-echo "configure:2847: checking whether to enable verbose warnings" >&5
+echo "configure:2891: 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"
@@ -2892,57 +2936,6 @@ else
 fi
 
 
-echo $ac_n "checking debug""... $ac_c" 1>&6
-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"
-  case "${enableval}" in
-  yes) debug=true 
-       echo "$ac_t""yes" 1>&6
-       ;;
-  no)  debug=false 
-       echo "$ac_t""no" 1>&6
-       ;;
-  *) echo "$ac_t""bad value ${enableval} for --enable-debug" 1>&6 
-       ;;
-esac
-else
-  debug=false; echo "$ac_t""no" 1>&6
-fi
-
-
-
-if test "$debug" = "true"; then
-  DEBUG_TRUE=
-  DEBUG_FALSE='#'
-else
-  DEBUG_TRUE='#'
-  DEBUG_FALSE=
-fi
-
-if test "$debug" = "true" ; then
-  
- if test -n "$GCC"; then
-    CFLAGS="$CFLAGS -g -DDEBUG"
- fi
-  cat >> confdefs.h <<\EOF
-#define DEBUG 1
-EOF
-
-else
-  
- if test -n "$GCC"; then
-    CFLAGS="$CFLAGS -g -O3 -DNDEBUG --fast-math"
- fi
-  cat >> confdefs.h <<\EOF
-#define NDEBUG 1
-EOF
-
-fi
-
 # Check whether --with-lam or --without-lam was given.
 if test "${with_lam+set}" = set; then
   withval="$with_lam"
@@ -2959,7 +2952,7 @@ if test "$withval" != "no" ; then
   fi
 
   echo $ac_n "checking for LAM MPI installation""... $ac_c" 1>&6
-echo "configure:2963: checking for LAM MPI installation" >&5
+echo "configure:2956: 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"
@@ -2977,7 +2970,7 @@ else
 fi
 
 echo $ac_n "checking for web access""... $ac_c" 1>&6
-echo "configure:2981: checking for web access" >&5
+echo "configure:2974: 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"
@@ -3067,7 +3060,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:3071: checking for X" >&5
+echo "configure:3064: checking for X" >&5
 
 # Check whether --with-x or --without-x was given.
 if test "${with_x+set}" = set; then
@@ -3129,12 +3122,12 @@ if test "$ac_x_includes" = NO; then
 
   # First, try using that file with no special directory specified.
 cat > conftest.$ac_ext <<EOF
-#line 3133 "configure"
+#line 3126 "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:3138: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3131: \"$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*
@@ -3203,14 +3196,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 3207 "configure"
+#line 3200 "configure"
 #include "confdefs.h"
 
 int main() {
 ${x_direct_test_function}()
 ; return 0; }
 EOF
-if { (eval echo configure:3214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3207: \"$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.
@@ -3316,17 +3309,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:3320: checking whether -R must be followed by a space" >&5
+echo "configure:3313: 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 3323 "configure"
+#line 3316 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:3330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_R_nospace=yes
 else
@@ -3342,14 +3335,14 @@ rm -f conftest*
       else
        LIBS="$ac_xsave_LIBS -R $x_libraries"
        cat > conftest.$ac_ext <<EOF
-#line 3346 "configure"
+#line 3339 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:3353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_R_space=yes
 else
@@ -3381,7 +3374,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:3385: checking for dnet_ntoa in -ldnet" >&5
+echo "configure:3378: 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
@@ -3389,7 +3382,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldnet  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3393 "configure"
+#line 3386 "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
@@ -3400,7 +3393,7 @@ int main() {
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:3404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3397: \"$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
@@ -3422,7 +3415,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:3426: checking for dnet_ntoa in -ldnet_stub" >&5
+echo "configure:3419: 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
@@ -3430,7 +3423,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldnet_stub  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3434 "configure"
+#line 3427 "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
@@ -3441,7 +3434,7 @@ int main() {
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:3445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3438: \"$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
@@ -3470,12 +3463,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:3474: checking for gethostbyname" >&5
+echo "configure:3467: 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 3479 "configure"
+#line 3472 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname(); below.  */
@@ -3498,7 +3491,7 @@ gethostbyname();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3495: \"$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
@@ -3519,7 +3512,7 @@ fi
 
     if test $ac_cv_func_gethostbyname = no; then
       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:3523: checking for gethostbyname in -lnsl" >&5
+echo "configure:3516: 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
@@ -3527,7 +3520,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3531 "configure"
+#line 3524 "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
@@ -3538,7 +3531,7 @@ int main() {
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:3542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3535: \"$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
@@ -3568,12 +3561,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:3572: checking for connect" >&5
+echo "configure:3565: 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 3577 "configure"
+#line 3570 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char connect(); below.  */
@@ -3596,7 +3589,7 @@ connect();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3593: \"$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
@@ -3617,7 +3610,7 @@ fi
 
     if test $ac_cv_func_connect = no; then
       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
-echo "configure:3621: checking for connect in -lsocket" >&5
+echo "configure:3614: 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
@@ -3625,7 +3618,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3629 "configure"
+#line 3622 "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
@@ -3636,7 +3629,7 @@ int main() {
 connect()
 ; return 0; }
 EOF
-if { (eval echo configure:3640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3633: \"$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
@@ -3660,12 +3653,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:3664: checking for remove" >&5
+echo "configure:3657: 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 3669 "configure"
+#line 3662 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char remove(); below.  */
@@ -3688,7 +3681,7 @@ remove();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3685: \"$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
@@ -3709,7 +3702,7 @@ fi
 
     if test $ac_cv_func_remove = no; then
       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
-echo "configure:3713: checking for remove in -lposix" >&5
+echo "configure:3706: 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
@@ -3717,7 +3710,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lposix  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3721 "configure"
+#line 3714 "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
@@ -3728,7 +3721,7 @@ int main() {
 remove()
 ; return 0; }
 EOF
-if { (eval echo configure:3732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3725: \"$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
@@ -3752,12 +3745,12 @@ fi
 
     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
     echo $ac_n "checking for shmat""... $ac_c" 1>&6
-echo "configure:3756: checking for shmat" >&5
+echo "configure:3749: 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 3761 "configure"
+#line 3754 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char shmat(); below.  */
@@ -3780,7 +3773,7 @@ shmat();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3777: \"$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
@@ -3801,7 +3794,7 @@ fi
 
     if test $ac_cv_func_shmat = no; then
       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
-echo "configure:3805: checking for shmat in -lipc" >&5
+echo "configure:3798: 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
@@ -3809,7 +3802,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lipc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3813 "configure"
+#line 3806 "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
@@ -3820,7 +3813,7 @@ int main() {
 shmat()
 ; return 0; }
 EOF
-if { (eval echo configure:3824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3817: \"$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
@@ -3853,7 +3846,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:3857: checking for IceConnectionNumber in -lICE" >&5
+echo "configure:3850: 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
@@ -3861,7 +3854,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3865 "configure"
+#line 3858 "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
@@ -3872,7 +3865,7 @@ int main() {
 IceConnectionNumber()
 ; return 0; }
 EOF
-if { (eval echo configure:3876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3869: \"$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
@@ -3909,7 +3902,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:3913: checking for XtToolkitThreadInitialize in -lXt" >&5
+echo "configure:3906: 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
@@ -3917,7 +3910,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXt $X_PRE_LIBS $X_BASIC_LIBS $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3921 "configure"
+#line 3914 "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
@@ -3928,7 +3921,7 @@ int main() {
 XtToolkitThreadInitialize()
 ; return 0; }
 EOF
-if { (eval echo configure:3932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3925: \"$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
@@ -3956,7 +3949,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:3960: checking for XdbeQueryExtension in -lXext" >&5
+echo "configure:3953: 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
@@ -3964,7 +3957,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXext -lX11 "$X_EXTRA_LIBS" $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3968 "configure"
+#line 3961 "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
@@ -3975,7 +3968,7 @@ int main() {
 XdbeQueryExtension()
 ; return 0; }
 EOF
-if { (eval echo configure:3979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3972: \"$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
@@ -3999,7 +3992,7 @@ else
 fi
 
 echo $ac_n "checking for XmbufQueryExtension in -lXext""... $ac_c" 1>&6
-echo "configure:4003: checking for XmbufQueryExtension in -lXext" >&5
+echo "configure:3996: 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
@@ -4007,7 +4000,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXext -lX11 "$X_EXTRA_LIBS" $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4011 "configure"
+#line 4004 "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
@@ -4018,7 +4011,7 @@ int main() {
 XmbufQueryExtension()
 ; return 0; }
 EOF
-if { (eval echo configure:4022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4015: \"$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
@@ -4048,17 +4041,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:4052: checking for $ac_hdr" >&5
+echo "configure:4045: 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 4057 "configure"
+#line 4050 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4062: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4055: \"$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*
@@ -4100,7 +4093,7 @@ my_includes="$my_includes -I../include -I.."
 
 
 echo $ac_n "checking interactive graphics""... $ac_c" 1>&6
-echo "configure:4104: checking interactive graphics" >&5
+echo "configure:4097: checking interactive graphics" >&5
 if test "$no_x" != "yes" ; then
   cat >> confdefs.h <<\EOF
 #define HAVE_X11 1
@@ -4141,7 +4134,7 @@ if test "$fftw" = "true" ; then
 fi
 
 echo $ac_n "checking for main in -ldmallocxx""... $ac_c" 1>&6
-echo "configure:4145: checking for main in -ldmallocxx" >&5
+echo "configure:4138: 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
@@ -4149,14 +4142,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldmallocxx  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4153 "configure"
+#line 4146 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:4160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4153: \"$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
@@ -4178,7 +4171,7 @@ dmallocxx=false
 fi
 
 echo $ac_n "checking for enable-dmalloc""... $ac_c" 1>&6
-echo "configure:4182: checking for enable-dmalloc" >&5
+echo "configure:4175: checking for enable-dmalloc" >&5
 # Check whether --enable-dmalloc or --disable-dmalloc was given.
 if test "${enable_dmalloc+set}" = set; then
   enableval="$enable_dmalloc"
@@ -4206,15 +4199,11 @@ EOF
   echo "$ac_t""Using dmalloc" 1>&6
 fi
 
-LDFLAGS="$LDFLAGS -L../libctsupport -L../libctsim" 
-ctlibs="$ctlibs_base -lctsim $ctlibs_graphics -lctsupport $ctlibs_tools"
-
-
 if test "$wxwin" = "true" ; then
   wxcflags=`$wxconfig --cflags`
   CFLAGS="$CFLAGS -I../include $wxcflags"
   wxlibs=`$wxconfig --libs`
-  wxlibs="$wxlibs $ctlibs"
+  ctlibs_graphics="$ctlibs_graphics $wxlibs"
   
 
 if test 1==1 ; then
@@ -4228,9 +4217,15 @@ fi
 
 
 
+LDFLAGS="$LDFLAGS -L../libctsupport -L../libctsim" 
+ctlibs="$ctlibs_base -lctsim $ctlibs_graphics -lctsupport $ctlibs_tools"
+
+
 if test -n "$lamdir" ; then
   lamprograms="pjrec-lam phm2if-lam phm2pj-lam"
   
+  lamdefs="$CFLAGS"
+  
 fi
 
 CXXFLAGS="$CFLAGS"
@@ -4419,12 +4414,13 @@ s%@NO_X_FALSE@%$NO_X_FALSE%g
 s%@my_includes@%$my_includes%g
 s%@HAVE_SGP_TRUE@%$HAVE_SGP_TRUE%g
 s%@HAVE_SGP_FALSE@%$HAVE_SGP_FALSE%g
-s%@ctlibs@%$ctlibs%g
 s%@HAVE_WXWINDOWS_TRUE@%$HAVE_WXWINDOWS_TRUE%g
 s%@HAVE_WXWINDOWS_FALSE@%$HAVE_WXWINDOWS_FALSE%g
 s%@wxcflags@%$wxcflags%g
 s%@wxlibs@%$wxlibs%g
+s%@ctlibs@%$ctlibs%g
 s%@lamprograms@%$lamprograms%g
+s%@lamdefs@%$lamdefs%g
 
 CEOF
 EOF