$OpenBSD: patch-ext_gd_config_m4,v 1.1 2018/09/28 22:22:03 sthen Exp $

revert https://github.com/php/php-src/commit/5e9c6c3b644b290255fb10c8eb34778665c2f8a3.patch
which breaks things for finding /usr/X11R6/include/X11/xpm.h

--- ext/gd/config.m4.orig.port	Tue Dec  1 14:36:33 2015
+++ ext/gd/config.m4	Sun Dec  6 14:04:50 2015
@@ -163,11 +163,18 @@ AC_DEFUN([PHP_GD_XPM],[
   if test "$PHP_XPM_DIR" != "no"; then
 
     for i in $PHP_XPM_DIR /usr/local /usr/X11R6 /usr; do
-      test -f $i/include/xpm.h && GD_XPM_DIR=$i && GD_XPM_INC=$i && break
-      test -f $i/include/X11/xpm.h && GD_XPM_DIR=$i && GD_XPM_INC=$i/X11 && break
+      test -f $i/$PHP_LIBDIR/libXpm.$SHLIB_SUFFIX_NAME || test -f $i/$PHP_LIBDIR/libXpm.a && GD_XPM_DIR=$i && break
     done
 
     if test -z "$GD_XPM_DIR"; then
+      AC_MSG_ERROR([libXpm.(a|so) not found.])
+    fi
+
+    for i in include include/X11; do
+      test -f $GD_XPM_DIR/$i/xpm.h && GD_XPM_INC=$GD_XPM_DIR/include
+    done
+
+    if test -z "$GD_XPM_INC"; then
       AC_MSG_ERROR([xpm.h not found.])
     fi
 
