.
[gnulib.git] / m4 / jm-macros.m4
index 702e065..ab9e19a 100644 (file)
@@ -4,7 +4,7 @@ dnl Misc type-related macros for fileutils, sh-utils, textutils.
 
 AC_DEFUN(jm_MACROS,
 [
-  AC_PREREQ(2.13)               dnl Minimum Autoconf version required.
+  AC_PREREQ(2.14.1)               dnl Minimum Autoconf version required.
 
   GNU_PACKAGE="GNU $PACKAGE"
   AC_DEFINE_UNQUOTED(GNU_PACKAGE, "$GNU_PACKAGE",
@@ -16,6 +16,7 @@ AC_DEFUN(jm_MACROS,
 
   jm_INCLUDED_REGEX([lib/regex.c])
 
+  AC_REQUIRE([jm_BISON])
   AC_REQUIRE([jm_ASSERT])
   AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
   AC_REQUIRE([jm_STRUCT_UTIMBUF])
@@ -41,6 +42,13 @@ AC_DEFUN(jm_MACROS,
   AC_REPLACE_FUNCS(strcasecmp strncasecmp)
   AC_REPLACE_FUNCS(dup2)
 
+  dnl used by e.g. intl/*domain.c and lib/canon-host.c
+  AC_REPLACE_FUNCS(strdup)
+
+  AC_REPLACE_FUNCS(memchr)
+  AC_REPLACE_FUNCS(memmove)
+  AC_CHECK_FUNCS(getpagesize)
+
   # By default, argmatch should fail calling usage (1).
   AC_DEFINE(ARGMATCH_DIE, [usage (1)],
            [Define to the function xargmatch calls on failures.])
@@ -48,8 +56,15 @@ AC_DEFUN(jm_MACROS,
            [Define to the declaration of the xargmatch failure function.])
 
   dnl Used to define SETVBUF in sys2.h.
+  dnl This evokes the following warning from autoconf:
+  dnl ...: warning: AC_TRY_RUN called without default to allow cross compiling
   AC_FUNC_SETVBUF_REVERSED
 
+  AM_FUNC_GETLINE
+  if test $am_cv_func_working_getline != yes; then
+    AC_CHECK_FUNCS(getdelim)
+  fi
+
 ])
 
 AC_DEFUN(jm_CHECK_ALL_TYPES,