Skip to content

Commit c7aa37f

Browse files
committed
Re-add Sascha's PHP_ADD_INCLUDE() second parameter patch - not sure how
that got yanked in my fix.
1 parent cf72592 commit c7aa37f

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

acinclude.m4

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,8 @@ AC_MSG_RESULT($ext_output)
263263
dnl
264264
dnl PHP_ARG_WITH(arg-name, check message, help text[, default-val])
265265
dnl Sets PHP_ARG_NAME either to the user value or to the default value.
266-
dnl default-val defaults to no.
266+
dnl default-val defaults to no. This will also set the variable ext_shared,
267+
dnl and will overwrite any previous variable of that name.
267268
dnl
268269
AC_DEFUN(PHP_ARG_WITH,[
269270
PHP_REAL_ARG_WITH([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z0-9-,A-Z0-9_))
@@ -278,7 +279,8 @@ PHP_ARG_ANALYZE($5)
278279
dnl
279280
dnl PHP_ARG_ENABLE(arg-name, check message, help text[, default-val])
280281
dnl Sets PHP_ARG_NAME either to the user value or to the default value.
281-
dnl default-val defaults to no.
282+
dnl default-val defaults to no. This will also set the variable ext_shared,
283+
dnl and will overwrite any previous variable of that name.
282284
dnl
283285
AC_DEFUN(PHP_ARG_ENABLE,[
284286
PHP_REAL_ARG_ENABLE([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z-,A-Z_))
@@ -587,15 +589,19 @@ AC_DEFUN(PHP_BUILD_RPATH,[
587589
])
588590

589591
dnl
590-
dnl PHP_ADD_INCLUDE(path)
592+
dnl PHP_ADD_INCLUDE(path [,before])
591593
dnl
592-
dnl add a include path
594+
dnl add a include pat, if before is 1, add in front.
593595
dnl
594596
AC_DEFUN(PHP_ADD_INCLUDE,[
595597
if test "$1" != "/usr/include"; then
596598
PHP_EXPAND_PATH($1, ai_p)
597599
AC_PHP_ONCE(INCLUDEPATH, $ai_p, [
598-
INCLUDES="$INCLUDES -I$ai_p"
600+
if test "$2"; then
601+
INCLUDES="-I$ai_p $INCLUDES"
602+
else
603+
INCLUDES="$INCLUDES -I$ai_p"
604+
fi
599605
])
600606
fi
601607
])

0 commit comments

Comments
 (0)