748511976d
normal update-patches filenames. This avoids update-patches picking up the .orig files in PHP distfiles and make it easier to keep in-sync. ok robert@
55 lines
2.8 KiB
Plaintext
55 lines
2.8 KiB
Plaintext
$OpenBSD: patch-sapi_cgi_config9_m4,v 1.3 2011/06/18 19:49:50 sthen Exp $
|
|
--- sapi/cgi/config9.m4.orig.port Mon Oct 1 13:40:54 2007
|
|
+++ sapi/cgi/config9.m4 Sat Jun 18 12:14:53 2011
|
|
@@ -8,7 +8,6 @@ PHP_ARG_ENABLE(cgi,,
|
|
dnl
|
|
dnl CGI setup
|
|
dnl
|
|
-if test "$PHP_SAPI" = "default"; then
|
|
AC_MSG_CHECKING(whether to build CGI binary)
|
|
if test "$PHP_CGI" != "no"; then
|
|
AC_MSG_RESULT(yes)
|
|
@@ -54,8 +53,9 @@ if test "$PHP_SAPI" = "default"; then
|
|
|
|
dnl Set install target and select SAPI
|
|
INSTALL_IT="@echo \"Installing PHP CGI binary: \$(INSTALL_ROOT)\$(bindir)/\"; \$(INSTALL) -m 0755 \$(SAPI_CGI_PATH) \$(INSTALL_ROOT)\$(bindir)/\$(program_prefix)php-cgi\$(program_suffix)\$(EXEEXT)"
|
|
- PHP_SELECT_SAPI(cgi, program, cgi_main.c fastcgi.c,, '$(SAPI_CGI_PATH)')
|
|
-
|
|
+ PHP_ADD_SOURCES(/main, internal_functions.c,,cgi)
|
|
+ PHP_ADD_SOURCES(/sapi/cgi, $PHP_FCGI_FILES cgi_main.c fastcgi.c,, cgi)
|
|
+
|
|
case $host_alias in
|
|
*aix*)
|
|
BUILD_CGI="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg \`echo \$(PHP_GLOBAL_OBJS) \$(PHP_SAPI_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") || (\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) { print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_SAPI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
|
|
@@ -64,17 +64,26 @@ if test "$PHP_SAPI" = "default"; then
|
|
BUILD_CGI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_SAPI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
|
|
;;
|
|
*)
|
|
- BUILD_CGI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_SAPI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
|
|
+ BUILD_CGI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_CGI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
|
|
;;
|
|
esac
|
|
|
|
+ PHP_CGI_TARGET="\$(SAPI_CGI_PATH)"
|
|
PHP_SUBST(BUILD_CGI)
|
|
+ PHP_SUBST(PHP_CGI_OBJS)
|
|
+ PHP_SUBST(PHP_CGI_TARGET)
|
|
|
|
- elif test "$PHP_CLI" != "no"; then
|
|
+ if test "$PHP_SAPI" = "default" ; then
|
|
+ PHP_BUILD_PROGRAM($SAPI_CGI_PATH)
|
|
+ fi
|
|
+ else
|
|
AC_MSG_RESULT(no)
|
|
- OVERALL_TARGET=
|
|
- PHP_SAPI=cli
|
|
+ if test "$PHP_SAPI" = "default" ; then
|
|
+ if test "$PHP_SAPI_CLI" != "no" ; then
|
|
+ OVERALL_TARGET=
|
|
+ PHP_SAPI=cli
|
|
else
|
|
AC_MSG_ERROR([No SAPIs selected.])
|
|
fi
|
|
+ fi
|
|
fi
|