]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Test for glibc.
authorBruno Haible <bruno@clisp.org>
Tue, 3 Feb 2004 11:01:39 +0000 (11:01 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:11:47 +0000 (12:11 +0200)
gettext-runtime/m4/glibc2.m4 [new file with mode: 0644]

diff --git a/gettext-runtime/m4/glibc2.m4 b/gettext-runtime/m4/glibc2.m4
new file mode 100644 (file)
index 0000000..baa1b50
--- /dev/null
@@ -0,0 +1,32 @@
+# glibc2.m4 serial 1
+dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+# Test for the GNU C Library, version 2.0 or newer.
+# From Bruno Haible.
+
+AC_DEFUN([gt_GLIBC2],
+  [
+    AC_CACHE_CHECK(whether we are using the GNU C Library 2 or newer,
+      ac_cv_gnu_library_2,
+      [AC_EGREP_CPP([Lucky GNU user],
+       [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ >= 2)
+  Lucky GNU user
+ #endif
+#endif
+       ],
+       ac_cv_gnu_library_2=yes,
+       ac_cv_gnu_library_2=no)
+      ]
+    )
+    AC_SUBST(GLIBC2)
+    GLIBC2="$ac_cv_gnu_library_2"
+  ]
+)