]> git.wh0rd.org Git - nano.git/commitdiff
Oops, add glib21.m4 to the m4 dir
authorChris Allegretta <chrisa@asty.org>
Thu, 24 Jan 2002 22:00:50 +0000 (22:00 +0000)
committerChris Allegretta <chrisa@asty.org>
Thu, 24 Jan 2002 22:00:50 +0000 (22:00 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1040 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

Makefile.am
m4/gettext.m4
m4/glibc21.m4 [new file with mode: 0644]

index 8822344cf139e8bce204268e1659610393ebf9f3..d3a6d7ba9b0b7dea841e704f2bc22242b07513f9 100644 (file)
@@ -4,7 +4,7 @@ M4DIR = $(srcdir)/m4
 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 \
index ce37a76bee59cfa571c7a9c2bbef1c10aff4562d..a313f0a99bb54e32233c8b57e4f1ea2d6c121234 100644 (file)
@@ -307,7 +307,7 @@ AC_DEFUN([NANO_AM_GNU_GETTEXT],
    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])
diff --git a/m4/glibc21.m4 b/m4/glibc21.m4
new file mode 100644 (file)
index 0000000..314beb1
--- /dev/null
@@ -0,0 +1,26 @@
+#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"
+  ]
+)