aboutsummaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorBrent Cook <busterb@gmail.com>2023-07-07 11:46:21 +0300
committerBrent Cook <busterb@gmail.com>2023-07-07 12:11:20 +0300
commit7463f87cf1c3b8494a604976a8f818b07747b55e (patch)
treeb650ee1a218d8fdaf5d7794f4b0f2902ca080ce4 /m4
parente06ce19f9531240fa4e754197850184dbcd445fc (diff)
downloadportable-7463f87cf1c3b8494a604976a8f818b07747b55e.tar.gz
portable-7463f87cf1c3b8494a604976a8f818b07747b55e.tar.bz2
portable-7463f87cf1c3b8494a604976a8f818b07747b55e.zip
add compat getopt implementation, remove patches
This adds a getopt implementation for compatibility where it is not available, removing a couple of regress patches. Note, this is a slightly modified copy from OpenBSD libc that doesn't expose getopt_long, which has dependency conflicts with Windows system headers and isn't needed anyway.
Diffstat (limited to 'm4')
-rw-r--r--m4/check-libc.m43
1 files changed, 2 insertions, 1 deletions
diff --git a/m4/check-libc.m4 b/m4/check-libc.m4
index 68a4f88..dc8d6bd 100644
--- a/m4/check-libc.m4
+++ b/m4/check-libc.m4
@@ -11,7 +11,7 @@ AC_CHECK_FUNCS([asprintf freezero memmem])
11AC_CHECK_FUNCS([readpassphrase reallocarray recallocarray]) 11AC_CHECK_FUNCS([readpassphrase reallocarray recallocarray])
12AC_CHECK_FUNCS([strlcat strlcpy strndup strnlen strsep strtonum]) 12AC_CHECK_FUNCS([strlcat strlcpy strndup strnlen strsep strtonum])
13AC_CHECK_FUNCS([timegm _mkgmtime timespecsub]) 13AC_CHECK_FUNCS([timegm _mkgmtime timespecsub])
14AC_CHECK_FUNCS([getprogname syslog syslog_r]) 14AC_CHECK_FUNCS([getopt getprogname syslog syslog_r])
15AC_CACHE_CHECK([for getpagesize], ac_cv_func_getpagesize, [ 15AC_CACHE_CHECK([for getpagesize], ac_cv_func_getpagesize, [
16 AC_LINK_IFELSE([AC_LANG_PROGRAM([[ 16 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
17#include <unistd.h> 17#include <unistd.h>
@@ -25,6 +25,7 @@ AC_CACHE_CHECK([for getpagesize], ac_cv_func_getpagesize, [
25AM_CONDITIONAL([HAVE_ASPRINTF], [test "x$ac_cv_func_asprintf" = xyes]) 25AM_CONDITIONAL([HAVE_ASPRINTF], [test "x$ac_cv_func_asprintf" = xyes])
26AM_CONDITIONAL([HAVE_FREEZERO], [test "x$ac_cv_func_freezero" = xyes]) 26AM_CONDITIONAL([HAVE_FREEZERO], [test "x$ac_cv_func_freezero" = xyes])
27AM_CONDITIONAL([HAVE_GETPAGESIZE], [test "x$ac_cv_func_getpagesize" = xyes]) 27AM_CONDITIONAL([HAVE_GETPAGESIZE], [test "x$ac_cv_func_getpagesize" = xyes])
28AM_CONDITIONAL([HAVE_GETOPT], [test "x$ac_cv_func_getopt" = xyes])
28AM_CONDITIONAL([HAVE_MEMMEM], [test "x$ac_cv_func_memmem" = xyes]) 29AM_CONDITIONAL([HAVE_MEMMEM], [test "x$ac_cv_func_memmem" = xyes])
29AM_CONDITIONAL([HAVE_READPASSPHRASE], [test "x$ac_cv_func_readpassphrase" = xyes]) 30AM_CONDITIONAL([HAVE_READPASSPHRASE], [test "x$ac_cv_func_readpassphrase" = xyes])
30AM_CONDITIONAL([HAVE_REALLOCARRAY], [test "x$ac_cv_func_reallocarray" = xyes]) 31AM_CONDITIONAL([HAVE_REALLOCARRAY], [test "x$ac_cv_func_reallocarray" = xyes])