summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2015-01-30 11:57:10 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2015-01-30 11:57:10 (GMT)
commitba002bcc8f8fad5de54d0239e1e967784e228453 (patch)
tree749902b7eea0835b794411fc4d746c301e0d8ba4 /configure
parent8cb70b47cb8dbe8641da44ffc0e6c1a1e51b3618 (diff)
downloadhdf5-ba002bcc8f8fad5de54d0239e1e967784e228453.zip
hdf5-ba002bcc8f8fad5de54d0239e1e967784e228453.tar.gz
hdf5-ba002bcc8f8fad5de54d0239e1e967784e228453.tar.bz2
[svn-r26086] Solaris no longer has issues with requiring early checking for time
functions so the checks were merged with the other system call checks. Fixes HDFFV-9083 Tested on: Linux (jam) and Solaris (emu)
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure181
1 files changed, 70 insertions, 111 deletions
diff --git a/configure b/configure
index 5f4923a..0fca1ad 100755
--- a/configure
+++ b/configure
@@ -22470,113 +22470,6 @@ $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
fi
-## ----------------------------------------------------------------------
-## Check for these two functions before the time headers are checked
-## for, otherwise they are not detected correctly on Solaris (the
-## configure test will fail due to multiply-defined symbols).
-##
-for ac_func in difftime
-do :
- ac_fn_c_check_func "$LINENO" "difftime" "ac_cv_func_difftime"
-if test "x$ac_cv_func_difftime" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_DIFFTIME 1
-_ACEOF
-
-fi
-done
-
-for ac_func in gettimeofday
-do :
- ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
-if test "x$ac_cv_func_gettimeofday" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_GETTIMEOFDAY 1
-_ACEOF
- have_gettime="yes"
-else
- have_gettime="no"
-fi
-done
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
-$as_echo_n "checking for library containing clock_gettime... " >&6; }
-if ${ac_cv_search_clock_gettime+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char clock_gettime ();
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-# ifdef __cplusplus
- extern "C"
-# endif
- int FC_DUMMY_MAIN() { return 1; }
-#endif
-#endif
-int
-main ()
-{
-return clock_gettime ();
- ;
- return 0;
-}
-_ACEOF
-for ac_lib in '' rt posix4; do
- if test -z "$ac_lib"; then
- ac_res="none required"
- else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- fi
- if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_clock_gettime=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext
- if ${ac_cv_search_clock_gettime+:} false; then :
- break
-fi
-done
-if ${ac_cv_search_clock_gettime+:} false; then :
-
-else
- ac_cv_search_clock_gettime=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
-$as_echo "$ac_cv_search_clock_gettime" >&6; }
-ac_res=$ac_cv_search_clock_gettime
-if test "$ac_res" != no; then :
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-fi
-
-for ac_func in clock_gettime
-do :
- ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
-if test "x$ac_cv_func_clock_gettime" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_CLOCK_GETTIME 1
-_ACEOF
- have_clock_gettime="yes"
-else
- have_clock_gettime="no"
-fi
-done
-
-
## Unix
for ac_header in sys/resource.h sys/time.h unistd.h sys/ioctl.h sys/stat.h
do :
@@ -22837,7 +22730,7 @@ $as_echo "no" >&6; }
fi
## ----------------------------------------------------------------------
-## Test for Largefile support.
+## Test for large file support.
##
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if configure should try to set up large file support" >&5
$as_echo_n "checking if configure should try to set up large file support... " >&6; }
@@ -26734,7 +26627,73 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
## ----------------------------------------------------------------------
## Check for functions.
##
-for ac_func in alarm fork frexpf frexpl
+## NOTE: clock_gettime may require linking to the rt or posix4 library
+## so we'll search for it before calling AC_CHECK_FUNCS.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
+$as_echo_n "checking for library containing clock_gettime... " >&6; }
+if ${ac_cv_search_clock_gettime+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char clock_gettime ();
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+return clock_gettime ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' rt posix4; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_clock_gettime=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_clock_gettime+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_clock_gettime+:} false; then :
+
+else
+ ac_cv_search_clock_gettime=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
+$as_echo "$ac_cv_search_clock_gettime" >&6; }
+ac_res=$ac_cv_search_clock_gettime
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+for ac_func in alarm clock_gettime difftime fork frexpf frexpl
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -26746,7 +26705,7 @@ _ACEOF
fi
done
-for ac_func in gethostname getpwuid getrusage lstat
+for ac_func in gethostname getpwuid getrusage gettimeofday
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -26758,7 +26717,7 @@ _ACEOF
fi
done
-for ac_func in rand_r random setsysinfo
+for ac_func in lstat rand_r random setsysinfo
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"