ACLOCAL_AMFLAGS = -I $(M4DIR)
ACINCLUDE_INPUTS = $(M4DIR)/gettext.m4 $(M4DIR)/largefile.m4 \
$(M4DIR)/progtest.m4 $(M4DIR)/lcmessage.m4 $(M4DIR)/iconv.m4 \
- $(M4DIR)/codeset.m4
+ $(M4DIR)/codeset.m4 $(M4DIR)/glibc21.m4
bin_PROGRAMS = nano
nano_SOURCES = color.c \
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
AC_REQUIRE([AC_FUNC_MMAP])dnl
- AC_REQUIRE([jm_GLIBC21])dnl
+ AC_REQUIRE([nano_jm_GLIBC21])dnl
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
stdlib.h string.h unistd.h sys/param.h])
--- /dev/null
+#serial 2
+
+# Test for the GNU C Library, version 2.1 or newer.
+# From Bruno Haible.
+
+AC_DEFUN([nano_jm_GLIBC21],
+ [
+ AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
+ ac_cv_gnu_library_2_1,
+ [AC_EGREP_CPP([Lucky GNU user],
+ [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
+ Lucky GNU user
+ #endif
+#endif
+ ],
+ ac_cv_gnu_library_2_1=yes,
+ ac_cv_gnu_library_2_1=no)
+ ]
+ )
+ AC_SUBST(GLIBC21)
+ GLIBC21="$ac_cv_gnu_library_2_1"
+ ]
+)