summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in51
1 files changed, 31 insertions, 20 deletions
diff --git a/configure.in b/configure.in
index a76bf31..1e680a9 100644
--- a/configure.in
+++ b/configure.in
@@ -3,7 +3,7 @@ AC_REVISION([$Id$])
AC_PREREQ(2.13)dnl dnl Minimum Autoconf version required.
AC_INIT(vpath.c)dnl dnl A distinctive file to look for in srcdir.
-AM_INIT_AUTOMAKE(make, 3.79.1)
+AM_INIT_AUTOMAKE(make, 3.79.1.0)
AM_CONFIG_HEADER(config.h)
dnl Regular configure stuff
@@ -45,18 +45,37 @@ dnl Handle internationalization
ALL_LINGUAS="de es fr ja ko nl pl pt_BR ru"
pds_WITH_GETTEXT
-
-dnl See if the user wants nsec timestamps
-
-AC_ARG_ENABLE(nsec-timestamps,
- [ --disable-nsec-timestamps disable use of sub-second timestamps],
- [make_cv_nsec_timestamps="$enableval"],
- [make_cv_nsec_timestamps="yes"])
-
-if test "x$make_cv_nsec_timestamps" != xno; then
- AC_STRUCT_ST_MTIM_NSEC
-fi
jm_AC_TYPE_UINTMAX_T
+AC_STRUCT_ST_MTIM_NSEC
+AC_MSG_CHECKING([whether to use high resolution file timestamps])
+AC_CACHE_VAL(make_cv_file_timestamp_hi_res, [
+ make_cv_file_timestamp_hi_res=no
+ if test $ac_cv_struct_st_mtim_nsec != no; then
+ AC_TRY_COMPILE([
+# if HAVE_INTTYPES_H
+# include <inttypes.h>
+# endif],
+ [char a[0x7fffffff < (uintmax_t) -1 >> 30 ? 1 : -1];],
+ make_cv_file_timestamp_hi_res=yes)
+ fi])
+AC_MSG_RESULT($make_cv_file_timestamp_hi_res)
+if test $make_cv_file_timestamp_hi_res = yes; then
+ val=1
+else
+ val=0
+fi
+AC_DEFINE_UNQUOTED(FILE_TIMESTAMP_HI_RES, $val,
+ [Use high resolution file timestamps if nonzero.])
+
+if test $make_cv_file_timestamp_hi_res = yes; then
+ # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
+ # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
+ AC_SEARCH_LIBS(clock_gettime, [rt posix4])
+ if test "$ac_cv_search_clock_gettime" != no; then
+ AC_DEFINE(HAVE_CLOCK_GETTIME, 1,
+ [Define if you have the clock_gettime function.])
+ fi
+fi
AC_SUBST(LIBOBJS)
@@ -73,14 +92,6 @@ changequote([,])dnl
fi
AC_MSG_RESULT($ac_cv_check_symbol_$1)])dnl
-# Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
-# Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
-AC_SEARCH_LIBS(clock_gettime, [rt posix4])
-if test "$ac_cv_search_clock_gettime" != no; then
- AC_DEFINE(HAVE_CLOCK_GETTIME, 1,
- [Define if you have the clock_gettime function.])
-fi
-
# See if we have a standard version of gettimeofday(). Since actual
# implementations can differ, just make sure we have the most common
# one.