r7941: add test for getenv
authorKevin M. Rosenberg <kevin@rosenberg.net>
Sun, 5 Oct 2003 06:47:44 +0000 (06:47 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Sun, 5 Oct 2003 06:47:44 +0000 (06:47 +0000)
Makefile.in
config.h.in
configure
configure.ac
tools/Makefile.in

index be18d3ce013aac57d6ff48c8a3fb0622d95866e5..c6a9269f67f52ed01ef95af6817ddd1a8ec991da 100644 (file)
@@ -162,12 +162,12 @@ wxconfig = @wxconfig@
 wxlibs = @wxlibs@
 @INCLUDED_GETOPT_LONG_FALSE@EXTRA_DIRS1 = 
 @INCLUDED_GETOPT_LONG_TRUE@EXTRA_DIRS1 = getopt
-@HAVE_SGP_FALSE@EXTRA_DIRS2 = 
 
 @HAVE_SGP_TRUE@EXTRA_DIRS2 = libctgraphics
-@HAVE_WXWINDOWS_FALSE@EXTRA_DIRS3 = 
+@HAVE_SGP_FALSE@EXTRA_DIRS2 = 
 
 @HAVE_WXWINDOWS_TRUE@EXTRA_DIRS3 = src
+@HAVE_WXWINDOWS_FALSE@EXTRA_DIRS3 = 
 
 SUBDIRS = man libctsupport libctsim  html cgi-bin include $(EXTRA_DIRS1) $(EXTRA_DIRS2) $(EXTRA_DIRS3) tools helical
 
index 2b395ab313854b81179d52169b8f4db9b687c7ce..8d7ac6b61d2ad2c93c1179fe69436a6fc76a116f 100644 (file)
@@ -6,6 +6,9 @@
 /* Define to 1 if you have the <assert.h> header file. */
 #undef HAVE_ASSERT_H
 
+/* Define to 1 if you have the `basename' function. */
+#undef HAVE_BASENAME
+
 /* ctn dicom library */
 #undef HAVE_CTN_DICOM
 
 /* FFTW library */
 #undef HAVE_FFTW
 
+/* Define to 1 if you have the `getenv' function. */
+#undef HAVE_GETENV
+
 /* Define to 1 if you have the <getopt.h> header file. */
 #undef HAVE_GETOPT_H
 
 /* getopt_long library */
 #undef HAVE_GETOPT_LONG
 
+/* Define to 1 if you have the `gettimeofday' function. */
+#undef HAVE_GETTIMEOFDAY
+
 /* Define to 1 if you have the `htonl' function. */
 #undef HAVE_HTONL
 
 /* Define to 1 if you have the <readline/readline.h> header file. */
 #undef HAVE_READLINE_READLINE_H
 
+/* Define to 1 if you have the `setjmp' function. */
+#undef HAVE_SETJMP
+
 /* Define to 1 if you have the <setjmp.h> header file. */
 #undef HAVE_SETJMP_H
 
+/* Define to 1 if you have the `setpriority' function. */
+#undef HAVE_SETPRIORITY
+
 /* use sgp library */
 #undef HAVE_SGP
 
 /* Define to 1 if you have the <sys/types.h> header file. */
 #undef HAVE_SYS_TYPES_H
 
+/* Define to 1 if you have the `time' function. */
+#undef HAVE_TIME
+
 /* Define to 1 if you have the <unistd.h> header file. */
 #undef HAVE_UNISTD_H
 
index 0a32152d8c3206bba8103ec096bf844199d03d39..3668003b2cfe88479c47bc0bfa82a647c4f315b8 100755 (executable)
--- a/configure
+++ b/configure
@@ -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
index 2ce392d076a09af503a529cc2e2accbd03bc9c69..299bfe0f38d12e76fe366758b6dd456eebb10eec 100644 (file)
@@ -63,7 +63,7 @@ AC_STRUCT_TM
 
 dnl Checks for library functions.
 AC_FUNC_VPRINTF
-AC_CHECK_FUNCS(strtod strtol snprintf htonl usleep vsprintf vsnprintf)
+AC_CHECK_FUNCS(strtod strtol snprintf htonl usleep vsprintf vsnprintf basename setjmp setpriority time gettimeofday getenv)
 AC_CHECK_FUNC(basename)
 AC_CHECK_FUNC(setjmp)
 AC_CHECK_FUNC(setpriority)
index fd1f0d69fe2ea755acbc6f131ec3e9a44980bb36..3c6a56823b0eb373910f8e3b56494818e98a4ab7 100644 (file)
@@ -163,9 +163,9 @@ wxlibs = @wxlibs@
 bin_PROGRAMS = @lamprograms@  ctsimtext 
 EXTRA_PROGRAMS = ctsimtext-lam
 INCLUDES = @my_includes@
-@HAVE_SGP_FALSE@SOURCE_DEPEND = ../include/ct.h ../libctsim/libctsim.a ../libctsupport/libctsupport.a
 
 @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
 
 ctsimtext_SOURCES = ctsimtext.cpp if1.cpp if2.cpp ifinfo.cpp ifexport.cpp phm2if.cpp phm2pj.cpp pj2if.cpp pjinfo.cpp pjrec.cpp nographics.cpp phm2helix.cpp pjHinterp.cpp linogram.cpp
 ctsimtext_LDADD = @ctlibs@