$NetBSD: patch-configure.ac,v 1.4 2017/04/23 08:18:15 adam Exp $ Avoid -fstack-protector, it is not portable. Redefine MYPATH to avoid build directory references. Detect dirfd() and setprogname() functions. --- configure.ac.orig 2016-11-02 08:42:29.000000000 +0000 +++ configure.ac @@ -37,7 +37,7 @@ fi AS=${AS-as} AC_SUBST(AS) if test "$GCC" = yes; then - cflags_to_try="-fno-strict-aliasing -fstack-protector -Wempty-body" + cflags_to_try="-fno-strict-aliasing -Wempty-body" AC_MSG_CHECKING([supported compiler flags]) old_cflags=$CFLAGS echo @@ -84,7 +84,7 @@ dnl if test "$cross_compiling" = "yes"; then MYPATH=":" else - MYPATH=$PATH + MYPATH=$MYPATH fi dnl @@ -547,6 +547,8 @@ AC_CHECK_FUNCS(fdatasync) AC_CHECK_FUNCS(lutimes) AC_CHECK_FUNCS(mergesort) AC_CHECK_FUNCS(getauxval) +AC_CHECK_FUNCS(dirfd) +AC_CHECK_FUNCS(setprogname) AC_REPLACE_FUNCS(stpcpy stpncpy)