r4228: Interpolation fixes
[ctsim.git] / configure
index f466bd18f9ea1ecc3694d16692be5c0530572489..3f8f09ffc6b6a9708ab91ba2e1ee1b9971a1fc46 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.56.
+# Generated by GNU Autoconf 2.57.
 #
 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
 # Free Software Foundation, Inc.
@@ -864,15 +864,16 @@ Optional Features:
   --enable-verbose-warnings
                           Enable verbose compiler warnings.
   --enable-static
-                          Enable static executables.
+                            Enable static executables.
   --enable-dmalloc        Use dmalloc memory allocation
   --enable-efence        Use ElectricFence memory allocation
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --with-lam=PATH       Set path of LAM MPI
-  --with-ctn=PATH       Set path of CTN DICOM library
+  --with-lam=PATH         Set path of LAM MPI
+  --with-ctn=PATH         Set path of CTN DICOM library
+  --with-mcpu=CPU         Set name of CPU for gcc -mcpu
   --with-cgibin-dir=PATH  Set path of CGI binaries directory
   --with-cgibin-url=PATH  Set URL path of CGI binaries
   --with-webdata-dir=PATH Set path of webdata
@@ -970,7 +971,7 @@ This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
 It was created by $as_me, which was
-generated by GNU Autoconf 2.56.  Invocation command line was
+generated by GNU Autoconf 2.57.  Invocation command line was
 
   $ $0 $@
 
@@ -1491,7 +1492,7 @@ fi
 
 PACKAGE=ctsim
 
-VERSION=3.5.6
+VERSION=4.2.3
 
 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
   { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
@@ -3389,6 +3390,8 @@ for ac_c_preproc_warn_flag in '' yes
 do
   # Use a header file that comes with gcc, so configuring glibc
   # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp. "Syntax error" is here to catch this case.
   cat >conftest.$ac_ext <<_ACEOF
@@ -3398,7 +3401,11 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <assert.h>
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
                      Syntax error
 _ACEOF
 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
@@ -3490,6 +3497,8 @@ for ac_c_preproc_warn_flag in '' yes
 do
   # Use a header file that comes with gcc, so configuring glibc
   # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp. "Syntax error" is here to catch this case.
   cat >conftest.$ac_ext <<_ACEOF
@@ -3499,7 +3508,11 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <assert.h>
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
                      Syntax error
 _ACEOF
 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
@@ -5927,13 +5940,13 @@ else
 fi
 
 wxwin=false
-echo "$as_me:$LINENO: checking for main in -lwx_gtk-2.3" >&5
-echo $ECHO_N "checking for main in -lwx_gtk-2.3... $ECHO_C" >&6
-if test "${ac_cv_lib_wx_gtk_2_3_main+set}" = set; then
+echo "$as_me:$LINENO: checking for main in -lwx_gtk-2.4" >&5
+echo $ECHO_N "checking for main in -lwx_gtk-2.4... $ECHO_C" >&6
+if test "${ac_cv_lib_wx_gtk_2_4_main+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lwx_gtk-2.3  $LIBS"
+LIBS="-lwx_gtk-2.4  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 /* confdefs.h.  */
@@ -5963,19 +5976,19 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_wx_gtk_2_3_main=yes
+  ac_cv_lib_wx_gtk_2_4_main=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_wx_gtk_2_3_main=no
+ac_cv_lib_wx_gtk_2_4_main=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_wx_gtk_2_3_main" >&5
-echo "${ECHO_T}$ac_cv_lib_wx_gtk_2_3_main" >&6
-if test $ac_cv_lib_wx_gtk_2_3_main = yes; then
+echo "$as_me:$LINENO: result: $ac_cv_lib_wx_gtk_2_4_main" >&5
+echo "${ECHO_T}$ac_cv_lib_wx_gtk_2_4_main" >&6
+if test $ac_cv_lib_wx_gtk_2_4_main = yes; then
   wxwin=true; wx_gtk=true;
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_WXWINDOWS 1
@@ -5983,13 +5996,13 @@ _ACEOF
 
 fi
 
-echo "$as_me:$LINENO: checking for main in -lwx_mac-2.3" >&5
-echo $ECHO_N "checking for main in -lwx_mac-2.3... $ECHO_C" >&6
-if test "${ac_cv_lib_wx_mac_2_3_main+set}" = set; then
+echo "$as_me:$LINENO: checking for main in -lwx_mac-2.4" >&5
+echo $ECHO_N "checking for main in -lwx_mac-2.4... $ECHO_C" >&6
+if test "${ac_cv_lib_wx_mac_2_4_main+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lwx_mac-2.3  $LIBS"
+LIBS="-lwx_mac-2.4  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 /* confdefs.h.  */
@@ -6019,20 +6032,20 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_wx_mac_2_3_main=yes
+  ac_cv_lib_wx_mac_2_4_main=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_wx_mac_2_3_main=no
+ac_cv_lib_wx_mac_2_4_main=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_wx_mac_2_3_main" >&5
-echo "${ECHO_T}$ac_cv_lib_wx_mac_2_3_main" >&6
-if test $ac_cv_lib_wx_mac_2_3_main = yes; then
-  wxwin=true; wx_gtk=true;
+echo "$as_me:$LINENO: result: $ac_cv_lib_wx_mac_2_4_main" >&5
+echo "${ECHO_T}$ac_cv_lib_wx_mac_2_4_main" >&6
+if test $ac_cv_lib_wx_mac_2_4_main = yes; then
+  wxwin=true; wx_mac=true;
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_WXWINDOWS 1
 _ACEOF
@@ -6883,8 +6896,14 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.  */
-#include <assert.h>
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 extern "C"
@@ -6908,7 +6927,7 @@ char (*f) () = $ac_func;
 int
 main ()
 {
-
+return f != $ac_func;
   ;
   return 0;
 }
@@ -6954,8 +6973,14 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char _doprnt (); below.  */
-#include <assert.h>
+    which can conflict with char _doprnt (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 extern "C"
@@ -6979,7 +7004,7 @@ char (*f) () = _doprnt;
 int
 main ()
 {
-
+return f != _doprnt;
   ;
   return 0;
 }
@@ -7042,8 +7067,14 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.  */
-#include <assert.h>
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 extern "C"
@@ -7067,7 +7098,7 @@ char (*f) () = $ac_func;
 int
 main ()
 {
-
+return f != $ac_func;
   ;
   return 0;
 }
@@ -7116,8 +7147,14 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char basename (); below.  */
-#include <assert.h>
+    which can conflict with char basename (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 extern "C"
@@ -7141,7 +7178,7 @@ char (*f) () = basename;
 int
 main ()
 {
-
+return f != basename;
   ;
   return 0;
 }
@@ -7183,8 +7220,14 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char setjmp (); below.  */
-#include <assert.h>
+    which can conflict with char setjmp (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 extern "C"
@@ -7208,7 +7251,7 @@ char (*f) () = setjmp;
 int
 main ()
 {
-
+return f != setjmp;
   ;
   return 0;
 }
@@ -7250,8 +7293,14 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char setpriority (); below.  */
-#include <assert.h>
+    which can conflict with char setpriority (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 extern "C"
@@ -7275,7 +7324,7 @@ char (*f) () = setpriority;
 int
 main ()
 {
-
+return f != setpriority;
   ;
   return 0;
 }
@@ -7317,8 +7366,14 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char time (); below.  */
-#include <assert.h>
+    which can conflict with char time (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 extern "C"
@@ -7342,7 +7397,7 @@ char (*f) () = time;
 int
 main ()
 {
-
+return f != time;
   ;
   return 0;
 }
@@ -7384,8 +7439,14 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char gettimeofday (); below.  */
-#include <assert.h>
+    which can conflict with char gettimeofday (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 extern "C"
@@ -7409,7 +7470,7 @@ char (*f) () = gettimeofday;
 int
 main ()
 {
-
+return f != gettimeofday;
   ;
   return 0;
 }
@@ -7438,6 +7499,84 @@ fi
 echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5
 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
 
+echo "$as_me:$LINENO: checking for getopt" >&5
+echo $ECHO_N "checking for getopt... $ECHO_C" >&6
+if test "${ac_cv_func_getopt+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char getopt (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char getopt ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_getopt) || defined (__stub___getopt)
+choke me
+#else
+char (*f) () = getopt;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != getopt;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_getopt=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_getopt=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_getopt" >&5
+echo "${ECHO_T}$ac_cv_func_getopt" >&6
+if test $ac_cv_func_getopt = yes; then
+   getopt=true
+else
+   getopt=false
+fi
+
 
 if test "${OSTYPE}" = "cygwin" ; then
   getopt_long=false
@@ -7455,8 +7594,14 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char getopt_long (); below.  */
-#include <assert.h>
+    which can conflict with char getopt_long (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 extern "C"
@@ -7480,7 +7625,7 @@ char (*f) () = getopt_long;
 int
 main ()
 {
-
+return f != getopt_long;
   ;
   return 0;
 }
@@ -7589,7 +7734,7 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
 else
-  CFLAGS="$CFLAGS -O3 -DNDEBUG -fomit-frame-pointer -funroll-loops"
+  CFLAGS="$CFLAGS -O2 -DNDEBUG -fomit-frame-pointer"
 
 cat >>confdefs.h <<\_ACEOF
 #define NDEBUG 1
@@ -7608,17 +7753,19 @@ fi
 echo "$as_me:$LINENO: checking sstream" >&5
 echo $ECHO_N "checking sstream... $ECHO_C" >&6
  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
+     test -f /usr/include/g++-2/sstream || test -f /usr/include/g++-3/sstream ||
+     test -f /usr/include/gcc/darwin/3.1/g++-v3/sstream ; then
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_SSTREAM 1
 _ACEOF
 
-  echo "$as_me:$LINENO: result: yes" >&5
+   echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6
-fi
-echo "$as_me:$LINENO: result: no" >&5
+  else
+   echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6
+ fi
 
 
 CFLAGS="$CFLAGS -Wall"
@@ -7752,6 +7899,24 @@ echo "${ECHO_T}no" >&6
   fi
 fi
 
+echo "$as_me:$LINENO: checking for CPU specification" >&5
+echo $ECHO_N "checking for CPU specification... $ECHO_C" >&6
+
+# Check whether --with-mcpu or --without-mcpu was given.
+if test "${with_mcpu+set}" = set; then
+  withval="$with_mcpu"
+
+fi;
+
+if test "$withval" == "no" -o "$withval" == "yes" -o "$withval" == ""; then
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+else
+  echo "$as_me:$LINENO: result: $withval" >&5
+echo "${ECHO_T}$withval" >&6
+  CFLAGS="$CFLAGS -mcpu=$withval"
+fi
+
 echo "$as_me:$LINENO: checking for web access" >&5
 echo $ECHO_N "checking for web access... $ECHO_C" >&6
 
@@ -8382,8 +8547,14 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char gethostbyname (); below.  */
-#include <assert.h>
+    which can conflict with char gethostbyname (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 extern "C"
@@ -8407,7 +8578,7 @@ char (*f) () = gethostbyname;
 int
 main ()
 {
-
+return f != gethostbyname;
   ;
   return 0;
 }
@@ -8577,8 +8748,14 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char connect (); below.  */
-#include <assert.h>
+    which can conflict with char connect (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 extern "C"
@@ -8602,7 +8779,7 @@ char (*f) () = connect;
 int
 main ()
 {
-
+return f != connect;
   ;
   return 0;
 }
@@ -8706,8 +8883,14 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char remove (); below.  */
-#include <assert.h>
+    which can conflict with char remove (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 extern "C"
@@ -8731,7 +8914,7 @@ char (*f) () = remove;
 int
 main ()
 {
-
+return f != remove;
   ;
   return 0;
 }
@@ -8835,8 +9018,14 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char shmat (); below.  */
-#include <assert.h>
+    which can conflict with char shmat (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 extern "C"
@@ -8860,7 +9049,7 @@ char (*f) () = shmat;
 int
 main ()
 {
-
+return f != shmat;
   ;
   return 0;
 }
@@ -9122,14 +9311,20 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
   LDFLAGS="$LDFLAGS -L../libctgraphics -L/usr/X11R6/lib"
+  my_includes="$my_includes -I/usr/X11R6/include"
   ctlib_graphics="$ctlibs_base -lctgraphics"
   echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6
   ctlib_graphics="$ctlib_graphics $X_BASIC_LIBS $X_TOOLKIT_LIBS"
   if test "$libgl" = "true" ; then
-    ctlib_graphics="$ctlib_graphics -lglut -lGL -lGLU"
+    # Removed "-lglut" for Mac OS X compilation
+    ctlib_graphics="$ctlib_graphics -lGL -lGLU"
     if test "$wxwin" = "true" ; then
-      ctlib_graphics="$ctlib_graphics -lwx_gtk_gl-2.3"
+      if  "$wx_gtk" ; then
+        ctlib_graphics="$ctlib_graphics -lwx_gtk_gl-2.4"
+      elif  "$wx_mac" ; then
+        ctlib_graphics="$ctlib_graphics -lwx_mac_gl-2.4"
+      fi
     fi
   fi
   if test "$wxwin" = "true" ; then
@@ -9343,12 +9538,12 @@ echo "${ECHO_T}Using efence" >&6
 fi
 
 if test "$wxwin" = "true" ; then
-  if test "$wx_gtk" = "true" ; then
+  if  "$wx_gtk" = "true"  ||  "$wx_mac" == "true"  ; then
     wxcflags=`$wxconfig --cflags`
     wxlibs=`$wxconfig --libs`
   else
        wxcflags="-D__WXMSW__ -D__WIN32__ -D__GNUWIN32__"
-   wxlibs="-lwx -lglui -ljpeg -lxpm -lzlib -ltiff"
+        wxlibs="-lwx -lglui -ljpeg -lxpm -lzlib -ltiff"
   fi
   CFLAGS="$CFLAGS -I../include $wxcflags"
   ctlib_graphics="$ctlib_graphics $wxlibs"
@@ -9742,7 +9937,7 @@ _ASBOX
 cat >&5 <<_CSEOF
 
 This file was extended by $as_me, which was
-generated by GNU Autoconf 2.56.  Invocation command line was
+generated by GNU Autoconf 2.57.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -9805,7 +10000,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
 config.status
-configured by $0, generated by GNU Autoconf 2.56,
+configured by $0, generated by GNU Autoconf 2.57,
   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
 
 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001