aboutsummaryrefslogtreecommitdiff
path: root/m4/check-libc.m4
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--m4/check-libc.m419
1 files changed, 18 insertions, 1 deletions
diff --git a/m4/check-libc.m4 b/m4/check-libc.m4
index 40df15b..dadf0da 100644
--- a/m4/check-libc.m4
+++ b/m4/check-libc.m4
@@ -1,3 +1,18 @@
1#
2# Copyright (c) 2014 Brent Cook
3#
4# Permission to use, copy, modify, and distribute this software for any
5# purpose with or without fee is hereby granted, provided that the above
6# copyright notice and this permission notice appear in all copies.
7#
8# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15
1AC_DEFUN([CHECK_LIBC_COMPAT], [ 16AC_DEFUN([CHECK_LIBC_COMPAT], [
2# Check for libc headers 17# Check for libc headers
3AC_CHECK_HEADERS([endian.h machine/endian.h err.h readpassphrase.h]) 18AC_CHECK_HEADERS([endian.h machine/endian.h err.h readpassphrase.h])
@@ -7,7 +22,7 @@ AC_CHECK_HEADERS([netinet/ip.h], [], [],
7]) 22])
8AC_HEADER_RESOLV 23AC_HEADER_RESOLV
9# Check for general libc functions 24# Check for general libc functions
10AC_CHECK_FUNCS([asprintf freezero memmem]) 25AC_CHECK_FUNCS([asprintf freezero getdelim getline memmem])
11AC_CHECK_FUNCS([readpassphrase reallocarray recallocarray]) 26AC_CHECK_FUNCS([readpassphrase reallocarray recallocarray])
12AC_CHECK_FUNCS([strcasecmp strlcat strlcpy strndup strnlen strsep strtonum]) 27AC_CHECK_FUNCS([strcasecmp strlcat strlcpy strndup strnlen strsep strtonum])
13AC_CHECK_FUNCS([timegm _mkgmtime timespecsub]) 28AC_CHECK_FUNCS([timegm _mkgmtime timespecsub])
@@ -24,6 +39,8 @@ AC_CACHE_CHECK([for getpagesize], ac_cv_func_getpagesize, [
24]) 39])
25AM_CONDITIONAL([HAVE_ASPRINTF], [test "x$ac_cv_func_asprintf" = xyes]) 40AM_CONDITIONAL([HAVE_ASPRINTF], [test "x$ac_cv_func_asprintf" = xyes])
26AM_CONDITIONAL([HAVE_FREEZERO], [test "x$ac_cv_func_freezero" = xyes]) 41AM_CONDITIONAL([HAVE_FREEZERO], [test "x$ac_cv_func_freezero" = xyes])
42AM_CONDITIONAL([HAVE_GETDELIM], [test "x$ac_cv_func_getdelim" = xyes])
43AM_CONDITIONAL([HAVE_GETLINE], [test "x$ac_cv_func_getline" = xyes])
27AM_CONDITIONAL([HAVE_GETPAGESIZE], [test "x$ac_cv_func_getpagesize" = xyes]) 44AM_CONDITIONAL([HAVE_GETPAGESIZE], [test "x$ac_cv_func_getpagesize" = xyes])
28AM_CONDITIONAL([HAVE_GETOPT], [test "x$ac_cv_func_getopt" = xyes]) 45AM_CONDITIONAL([HAVE_GETOPT], [test "x$ac_cv_func_getopt" = xyes])
29AM_CONDITIONAL([HAVE_MEMMEM], [test "x$ac_cv_func_memmem" = xyes]) 46AM_CONDITIONAL([HAVE_MEMMEM], [test "x$ac_cv_func_memmem" = xyes])