xref: /netbsd-src/external/gpl2/diffutils/dist/m4/glibc21.m4 (revision 75f6d617e282811cb173c2ccfbf5df0dd71f7045)
1*75f6d617Schristos# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
2*75f6d617Schristosdnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
3*75f6d617Schristosdnl This file is free software, distributed under the terms of the GNU
4*75f6d617Schristosdnl General Public License.  As a special exception to the GNU General
5*75f6d617Schristosdnl Public License, this file may be distributed as part of a program
6*75f6d617Schristosdnl that contains a configuration script generated by Autoconf, under
7*75f6d617Schristosdnl the same distribution terms as the rest of that program.
8*75f6d617Schristos
9*75f6d617Schristos# Test for the GNU C Library, version 2.1 or newer.
10*75f6d617Schristos# From Bruno Haible.
11*75f6d617Schristos
12*75f6d617SchristosAC_DEFUN([jm_GLIBC21],
13*75f6d617Schristos  [
14*75f6d617Schristos    AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
15*75f6d617Schristos      ac_cv_gnu_library_2_1,
16*75f6d617Schristos      [AC_EGREP_CPP([Lucky GNU user],
17*75f6d617Schristos	[
18*75f6d617Schristos#include <features.h>
19*75f6d617Schristos#ifdef __GNU_LIBRARY__
20*75f6d617Schristos #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
21*75f6d617Schristos  Lucky GNU user
22*75f6d617Schristos #endif
23*75f6d617Schristos#endif
24*75f6d617Schristos	],
25*75f6d617Schristos	ac_cv_gnu_library_2_1=yes,
26*75f6d617Schristos	ac_cv_gnu_library_2_1=no)
27*75f6d617Schristos      ]
28*75f6d617Schristos    )
29*75f6d617Schristos    AC_SUBST(GLIBC21)
30*75f6d617Schristos    GLIBC21="$ac_cv_gnu_library_2_1"
31*75f6d617Schristos  ]
32*75f6d617Schristos)
33