diff options
author | Jim Meyering <jim@meyering.net> | 1997-11-10 03:52:47 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1997-11-10 03:52:47 +0000 |
commit | 5e28f75496a14b9d878084b9507b8308b7368680 (patch) | |
tree | 9ba168b33935f94a1424879b12353911a3256b84 /m4 | |
parent | bc445a1f167e2e2ebc8c00490ddee32f95e1daac (diff) | |
download | coreutils-5e28f75496a14b9d878084b9507b8308b7368680.tar.xz |
(jm_STRFTIME_PREREQS): Check for localtime_r.
(jm_FUNC_GNU_STRFTIME): Use new macro.
(jm_FUNC_STRFTIME): New macro. Likewise.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/strftime.m4 | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/m4/strftime.m4 b/m4/strftime.m4 index 47cf56c6b..d366fde8f 100644 --- a/m4/strftime.m4 +++ b/m4/strftime.m4 @@ -1,4 +1,12 @@ -#serial 3 +#serial 4 + +AC_DEFUN(jm_STRFTIME_PREREQS, +[ + dnl strftime.c uses localtime_r if it exists. Check for it. + AC_CHECK_FUNCS(localtime_r) + dnl FIXME: add tests for everything in strftime.c: e.g., HAVE_BCOPY, + dnl HAVE_TZNAME, HAVE_TZSET, HAVE_TM_ZONE, etc. +]) dnl From Jim Meyering. dnl If you use this macro in a package, you should @@ -8,6 +16,9 @@ dnl #undef strftime dnl AC_DEFUN(jm_FUNC_GNU_STRFTIME, [AC_REQUIRE([AC_HEADER_TIME])dnl + + jm_STRFTIME_PREREQS + AC_REQUIRE([AC_C_CONST])dnl AC_REQUIRE([AC_HEADER_STDC])dnl AC_CHECK_HEADERS(sys/time.h) @@ -123,3 +134,9 @@ changequote([, ])dnl AC_DEFINE_UNQUOTED(strftime, gnu_strftime) fi ]) + +AC_DEFUN(jm_FUNC_STRFTIME, +[ + jm_STRFTIME_PREREQS + AC_REPLACE_FUNCS(strftime) +]) |