glibc21.m4 854 Bytes
Newer Older
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
1 2
# glibc21.m4 serial 4
dnl Copyright (C) 2000-2002, 2004, 2008-2010 Free Software Foundation, Inc.
3 4 5
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
6 7 8 9

# Test for the GNU C Library, version 2.1 or newer.
# From Bruno Haible.

10
AC_DEFUN([gl_GLIBC21],
11
  [
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
12 13
    AC_CACHE_CHECK([whether we are using the GNU C Library 2.1 or newer],
      [ac_cv_gnu_library_2_1],
14
      [AC_EGREP_CPP([Lucky GNU user],
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
15
        [
16 17 18 19 20 21
#include <features.h>
#ifdef __GNU_LIBRARY__
 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
  Lucky GNU user
 #endif
#endif
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
22 23 24
        ],
        [ac_cv_gnu_library_2_1=yes],
        [ac_cv_gnu_library_2_1=no])
25 26
      ]
    )
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
27
    AC_SUBST([GLIBC21])
28 29 30
    GLIBC21="$ac_cv_gnu_library_2_1"
  ]
)