glibc21.m4 907 Bytes
Newer Older
1
# glibc21.m4 serial 5
2
dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2014 Free Software Foundation,
3
dnl Inc.
4 5 6
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.
7

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

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