r7941: add test for getenv
[ctsim.git] / configure
index 8390af63a39c5c965828e4625844b25b6ea3983f..3668003b2cfe88479c47bc0bfa82a647c4f315b8 100755 (executable)
--- a/configure
+++ b/configure
@@ -1600,7 +1600,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE=ctsim
- VERSION=4.2.8
+ VERSION=4.3.0
 
 
 cat >>confdefs.h <<_ACEOF
@@ -6454,13 +6454,13 @@ _ACEOF
 
 fi
 
-echo "$as_me:$LINENO: checking for fftw_one in -lfftw" >&5
-echo $ECHO_N "checking for fftw_one in -lfftw... $ECHO_C" >&6
-if test "${ac_cv_lib_fftw_fftw_one+set}" = set; then
+echo "$as_me:$LINENO: checking for fftw_malloc in -lfftw3" >&5
+echo $ECHO_N "checking for fftw_malloc in -lfftw3... $ECHO_C" >&6
+if test "${ac_cv_lib_fftw3_fftw_malloc+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lfftw  $LIBS"
+LIBS="-lfftw3  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 /* confdefs.h.  */
@@ -6475,11 +6475,11 @@ 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 fftw_one ();
+char fftw_malloc ();
 int
 main ()
 {
-fftw_one ();
+fftw_malloc ();
   ;
   return 0;
 }
@@ -6496,19 +6496,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_fftw_fftw_one=yes
+  ac_cv_lib_fftw3_fftw_malloc=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_fftw_fftw_one=no
+ac_cv_lib_fftw3_fftw_malloc=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_fftw_fftw_one" >&5
-echo "${ECHO_T}$ac_cv_lib_fftw_fftw_one" >&6
-if test $ac_cv_lib_fftw_fftw_one = yes; then
+echo "$as_me:$LINENO: result: $ac_cv_lib_fftw3_fftw_malloc" >&5
+echo "${ECHO_T}$ac_cv_lib_fftw3_fftw_malloc" >&6
+if test $ac_cv_lib_fftw3_fftw_malloc = yes; then
   fftw=true;
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_FFTW 1
@@ -7979,6 +7979,79 @@ else
    getopt=false
 fi
 
+echo "$as_me:$LINENO: checking for getenv" >&5
+echo $ECHO_N "checking for getenv... $ECHO_C" >&6
+if test "${ac_cv_func_getenv+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 getenv (); 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 getenv ();
+/* 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_getenv) || defined (__stub___getenv)
+choke me
+#else
+char (*f) () = getenv;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != getenv;
+  ;
+  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_getenv=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_getenv=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_getenv" >&5
+echo "${ECHO_T}$ac_cv_func_getenv" >&6
+
 
 if test "${OSTYPE}" = "cygwin" ; then
   getopt_long=false
@@ -9765,7 +9838,7 @@ if test "$zlib" = "true" ; then
   ctlibs_tools="$ctlibs_tools -lz"
 fi
 if test "$fftw" = "true" ; then
-  ctlibs_tools="$ctlibs_tools -lrfftw -lfftw"
+  ctlibs_tools="$ctlibs_tools -lfftw3"
 fi
 if test "$ctn" = "true"; then
   ctlibs_tools="$ctlibs_tools -lctn"