Skip to content

Commit a3b67fc

Browse files
committed
Fix extension include path for out of tree builds
1 parent 670bbdb commit a3b67fc

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

build/php.m4

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,11 +213,13 @@ dnl from the sources. Should not be used directly.
213213
dnl
214214
AC_DEFUN([PHP_ADD_SOURCES_X],[
215215
dnl Relative to source- or build-directory?
216+
dnl source-path is "" when called from PHP_NEW_EXTENSION() for extensions built
217+
dnl with phpize, or a relative path when built in php-src.
216218
dnl ac_srcdir/ac_bdir include trailing slash
217219
case $1 in
218-
""[)] ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
220+
""[)] ac_srcdir="$abs_srcdir/"; ac_bdir="$abs_builddir/"; ac_inc="-I$ac_bdir -I. -I$abs_srcdir" ;;
219221
/*[)] ac_srcdir=`echo "$1"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
220-
*[)] ac_srcdir="$abs_srcdir/$1/"; ac_bdir="$1/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
222+
*[)] ac_srcdir="$abs_srcdir/$1/"; ac_bdir="$abs_builddir/$1/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
221223
esac
222224
223225
dnl how to build .. shared or static?

ext/skeleton/skeleton.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
%HEADER%
22

33
#ifdef HAVE_CONFIG_H
4-
# include "config.h"
4+
# include <config.h>
55
#endif
66

77
#include "php.h"

0 commit comments

Comments
 (0)