ports/security/sssd/files/patch-configure.ac
2024-07-05 05:32:24 -07:00

43 lines
1.4 KiB
Text

--- configure.ac.orig 2020-03-17 13:31:28 UTC
+++ configure.ac
@@ -44,8 +44,6 @@ AC_CONFIG_HEADER(config.h)
AC_CHECK_HEADERS(stdint.h dlfcn.h)
AC_CONFIG_HEADER(config.h)
-AC_CHECK_TYPES([errno_t], [], [], [[#include <errno.h>]])
-
m4_include([src/build_macros.m4])
BUILD_WITH_SHARED_BUILD_DIR
@@ -62,6 +60,20 @@ AM_CONDITIONAL([HAVE_PTHREAD], [test x"$HAVE_PTHREAD"
AM_CONDITIONAL([HAVE_PTHREAD], [test x"$HAVE_PTHREAD" != "x"])
+saved_CFLAGS="$CFLAGS"
+CFLAGS="-Werror"
+AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include <string.h>]],
+ [[(void)mempcpy(NULL, NULL, 0);]])],
+ [AC_DEFINE([HAVE_MEMPCPY], [1], [mempcpy() available])
+ HAVE_MEMPCPY=1
+ ],
+ [AC_MSG_WARN([mempcpy() not found, will use private implementation])])
+
+CFLAGS="$saved_CFLAGS"
+
+AM_CONDITIONAL([HAVE_MEMPCPY], [test x"$HAVE_MEMPCPY" != "x"])
+
# Check library for the timer_create function
SAVE_LIBS=$LIBS
LIBS=
@@ -356,8 +368,8 @@ them please use argument --without-python3-bindings wh
AM_CHECK_PYTHON_HEADERS([],
AC_MSG_ERROR([Could not find python3 headers]))
- AC_SUBST([py3execdir], [$pyexecdir])
- AC_SUBST([python3dir], [$pythondir])
+ AC_SUBST([py3execdir], [$(eval echo $pyexecdir)])
+ AC_SUBST([python3dir], [$(eval echo $pythondir)])
AC_SUBST([PYTHON3_CFLAGS], [$PYTHON_CFLAGS])
AC_SUBST([PYTHON3_LIBS], [$PYTHON_LIBS])
AC_SUBST([PYTHON3_INCLUDES], [$PYTHON_INCLUDES])