$OpenBSD: patch-configure_ac,v 1.2 2021/02/24 22:18:57 sthen Exp $

hunk 1, don't use ifuncs, they segfault. these are used for functions
using avx/sse2 (presumably to reduce overhead) but they seem to resolve
to 0x0. example crash can be seen by reenabling this and running e.g.
$ php-8.0 -r "print(base64_encode('abcdef').PHP_EOL);"

Index: configure.ac
--- configure.ac.orig
+++ configure.ac
@@ -524,7 +524,7 @@ dnl Fix for these systems is already included in GCC 7
 dnl
 dnl At least some versions of FreeBSD seem to have buggy ifunc support, see
 dnl bug #77284. Conservatively don't use ifuncs on FreeBSD.
-AS_CASE([$host_alias], [*-*-*android*|*-*-*uclibc*|*-*-*musl*|*freebsd*], [true], [
+AS_CASE([$host_alias], [*-*-*android*|*-*-*uclibc*|*-*-*musl*|*freebsd*|*openbsd*], [true], [
   AX_GCC_FUNC_ATTRIBUTE([ifunc])
   AX_GCC_FUNC_ATTRIBUTE([target])
 ])
@@ -1063,16 +1063,16 @@ case $php_sapi_module in
     fi
     case $with_pic in
       yes)
-        standard_libtool_flag='-prefer-pic'
+        standard_libtool_flag=''
         ;;
       no)
-        standard_libtool_flag='-prefer-non-pic'
+        standard_libtool_flag=''
         ;;
     esac
     EXTRA_LDFLAGS="$EXTRA_LDFLAGS -avoid-version -module"
     ;;
   *[)]
-    standard_libtool_flag='-prefer-non-pic -static'
+    standard_libtool_flag=''
     if test -z "$PHP_MODULES" && test -z "$PHP_ZEND_EX"; then
       enable_shared=no
     fi
@@ -1251,7 +1251,7 @@ EXPANDED_SYSCONFDIR=`eval echo $sysconfdir`
 EXPANDED_DATADIR=$datadir
 EXPANDED_PHP_CONFIG_FILE_PATH=`eval echo "$PHP_CONFIG_FILE_PATH"`
 EXPANDED_PHP_CONFIG_FILE_SCAN_DIR=`eval echo "$PHP_CONFIG_FILE_SCAN_DIR"`
-INCLUDE_PATH=.:$EXPANDED_PEAR_INSTALLDIR
+INCLUDE_PATH=.:$libdir
 
 exec_prefix=$old_exec_prefix
 libdir=$old_libdir
