You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

265 lines
9.2 KiB

Generalized server-API build process on UNIX. Each SAPI implementation now has its own directory under sapi/, just like extensions have theirs under ext/. To make the final targets appear in the main dir, the top-level Makefile includes sapi/NN/Makefile.inc from the selected sapi backend. This is a plan Makefile stub without any autoconf substitutions. Each SAPI backend also has its own config.m4 like extensions (read at the end of diversion 2) and config.h.stub files. Each SAPI backend has to contain: config.m4: just like for extensions, this file contains autoconf/automake directives that end up in the configure script. The only difference is that the sapi config.m4 files are read in diversion (output block) 2 instead of 3. The sapi config.m4 files should set two variables: PHP_SAPI (which sapi backend to choose) and SAPI_TARGET (the name of the resulting library or program, previously BINNAME). If they are not specified, they will default to "cgi" and "php", respectively. Makefile.inc: has to exist, has to define "INSTALL_IT" to the command used to install the final target (or ":" for no operation). It also has to define a plain Makefile rule (without autoconf substitutions) to build $(SAPI_TARGET) Makefile.am: just what you think. Make sure your target is called "libphpsapi_NNN.a", where NNN is the value of PHP_SAPI. Some testing and fixing probably remains. To make everything hang together, I've done some ugly tricks that I can imagine causing some problems. I've built and run the CGI version and built the Apache DSO.
27 years ago
Generalized server-API build process on UNIX. Each SAPI implementation now has its own directory under sapi/, just like extensions have theirs under ext/. To make the final targets appear in the main dir, the top-level Makefile includes sapi/NN/Makefile.inc from the selected sapi backend. This is a plan Makefile stub without any autoconf substitutions. Each SAPI backend also has its own config.m4 like extensions (read at the end of diversion 2) and config.h.stub files. Each SAPI backend has to contain: config.m4: just like for extensions, this file contains autoconf/automake directives that end up in the configure script. The only difference is that the sapi config.m4 files are read in diversion (output block) 2 instead of 3. The sapi config.m4 files should set two variables: PHP_SAPI (which sapi backend to choose) and SAPI_TARGET (the name of the resulting library or program, previously BINNAME). If they are not specified, they will default to "cgi" and "php", respectively. Makefile.inc: has to exist, has to define "INSTALL_IT" to the command used to install the final target (or ":" for no operation). It also has to define a plain Makefile rule (without autoconf substitutions) to build $(SAPI_TARGET) Makefile.am: just what you think. Make sure your target is called "libphpsapi_NNN.a", where NNN is the value of PHP_SAPI. Some testing and fixing probably remains. To make everything hang together, I've done some ugly tricks that I can imagine causing some problems. I've built and run the CGI version and built the Apache DSO.
27 years ago
Generalized server-API build process on UNIX. Each SAPI implementation now has its own directory under sapi/, just like extensions have theirs under ext/. To make the final targets appear in the main dir, the top-level Makefile includes sapi/NN/Makefile.inc from the selected sapi backend. This is a plan Makefile stub without any autoconf substitutions. Each SAPI backend also has its own config.m4 like extensions (read at the end of diversion 2) and config.h.stub files. Each SAPI backend has to contain: config.m4: just like for extensions, this file contains autoconf/automake directives that end up in the configure script. The only difference is that the sapi config.m4 files are read in diversion (output block) 2 instead of 3. The sapi config.m4 files should set two variables: PHP_SAPI (which sapi backend to choose) and SAPI_TARGET (the name of the resulting library or program, previously BINNAME). If they are not specified, they will default to "cgi" and "php", respectively. Makefile.inc: has to exist, has to define "INSTALL_IT" to the command used to install the final target (or ":" for no operation). It also has to define a plain Makefile rule (without autoconf substitutions) to build $(SAPI_TARGET) Makefile.am: just what you think. Make sure your target is called "libphpsapi_NNN.a", where NNN is the value of PHP_SAPI. Some testing and fixing probably remains. To make everything hang together, I've done some ugly tricks that I can imagine causing some problems. I've built and run the CGI version and built the Apache DSO.
27 years ago
Generalized server-API build process on UNIX. Each SAPI implementation now has its own directory under sapi/, just like extensions have theirs under ext/. To make the final targets appear in the main dir, the top-level Makefile includes sapi/NN/Makefile.inc from the selected sapi backend. This is a plan Makefile stub without any autoconf substitutions. Each SAPI backend also has its own config.m4 like extensions (read at the end of diversion 2) and config.h.stub files. Each SAPI backend has to contain: config.m4: just like for extensions, this file contains autoconf/automake directives that end up in the configure script. The only difference is that the sapi config.m4 files are read in diversion (output block) 2 instead of 3. The sapi config.m4 files should set two variables: PHP_SAPI (which sapi backend to choose) and SAPI_TARGET (the name of the resulting library or program, previously BINNAME). If they are not specified, they will default to "cgi" and "php", respectively. Makefile.inc: has to exist, has to define "INSTALL_IT" to the command used to install the final target (or ":" for no operation). It also has to define a plain Makefile rule (without autoconf substitutions) to build $(SAPI_TARGET) Makefile.am: just what you think. Make sure your target is called "libphpsapi_NNN.a", where NNN is the value of PHP_SAPI. Some testing and fixing probably remains. To make everything hang together, I've done some ugly tricks that I can imagine causing some problems. I've built and run the CGI version and built the Apache DSO.
27 years ago
Generalized server-API build process on UNIX. Each SAPI implementation now has its own directory under sapi/, just like extensions have theirs under ext/. To make the final targets appear in the main dir, the top-level Makefile includes sapi/NN/Makefile.inc from the selected sapi backend. This is a plan Makefile stub without any autoconf substitutions. Each SAPI backend also has its own config.m4 like extensions (read at the end of diversion 2) and config.h.stub files. Each SAPI backend has to contain: config.m4: just like for extensions, this file contains autoconf/automake directives that end up in the configure script. The only difference is that the sapi config.m4 files are read in diversion (output block) 2 instead of 3. The sapi config.m4 files should set two variables: PHP_SAPI (which sapi backend to choose) and SAPI_TARGET (the name of the resulting library or program, previously BINNAME). If they are not specified, they will default to "cgi" and "php", respectively. Makefile.inc: has to exist, has to define "INSTALL_IT" to the command used to install the final target (or ":" for no operation). It also has to define a plain Makefile rule (without autoconf substitutions) to build $(SAPI_TARGET) Makefile.am: just what you think. Make sure your target is called "libphpsapi_NNN.a", where NNN is the value of PHP_SAPI. Some testing and fixing probably remains. To make everything hang together, I've done some ugly tricks that I can imagine causing some problems. I've built and run the CGI version and built the Apache DSO.
27 years ago
Generalized server-API build process on UNIX. Each SAPI implementation now has its own directory under sapi/, just like extensions have theirs under ext/. To make the final targets appear in the main dir, the top-level Makefile includes sapi/NN/Makefile.inc from the selected sapi backend. This is a plan Makefile stub without any autoconf substitutions. Each SAPI backend also has its own config.m4 like extensions (read at the end of diversion 2) and config.h.stub files. Each SAPI backend has to contain: config.m4: just like for extensions, this file contains autoconf/automake directives that end up in the configure script. The only difference is that the sapi config.m4 files are read in diversion (output block) 2 instead of 3. The sapi config.m4 files should set two variables: PHP_SAPI (which sapi backend to choose) and SAPI_TARGET (the name of the resulting library or program, previously BINNAME). If they are not specified, they will default to "cgi" and "php", respectively. Makefile.inc: has to exist, has to define "INSTALL_IT" to the command used to install the final target (or ":" for no operation). It also has to define a plain Makefile rule (without autoconf substitutions) to build $(SAPI_TARGET) Makefile.am: just what you think. Make sure your target is called "libphpsapi_NNN.a", where NNN is the value of PHP_SAPI. Some testing and fixing probably remains. To make everything hang together, I've done some ugly tricks that I can imagine causing some problems. I've built and run the CGI version and built the Apache DSO.
27 years ago
Generalized server-API build process on UNIX. Each SAPI implementation now has its own directory under sapi/, just like extensions have theirs under ext/. To make the final targets appear in the main dir, the top-level Makefile includes sapi/NN/Makefile.inc from the selected sapi backend. This is a plan Makefile stub without any autoconf substitutions. Each SAPI backend also has its own config.m4 like extensions (read at the end of diversion 2) and config.h.stub files. Each SAPI backend has to contain: config.m4: just like for extensions, this file contains autoconf/automake directives that end up in the configure script. The only difference is that the sapi config.m4 files are read in diversion (output block) 2 instead of 3. The sapi config.m4 files should set two variables: PHP_SAPI (which sapi backend to choose) and SAPI_TARGET (the name of the resulting library or program, previously BINNAME). If they are not specified, they will default to "cgi" and "php", respectively. Makefile.inc: has to exist, has to define "INSTALL_IT" to the command used to install the final target (or ":" for no operation). It also has to define a plain Makefile rule (without autoconf substitutions) to build $(SAPI_TARGET) Makefile.am: just what you think. Make sure your target is called "libphpsapi_NNN.a", where NNN is the value of PHP_SAPI. Some testing and fixing probably remains. To make everything hang together, I've done some ugly tricks that I can imagine causing some problems. I've built and run the CGI version and built the Apache DSO.
27 years ago
Generalized server-API build process on UNIX. Each SAPI implementation now has its own directory under sapi/, just like extensions have theirs under ext/. To make the final targets appear in the main dir, the top-level Makefile includes sapi/NN/Makefile.inc from the selected sapi backend. This is a plan Makefile stub without any autoconf substitutions. Each SAPI backend also has its own config.m4 like extensions (read at the end of diversion 2) and config.h.stub files. Each SAPI backend has to contain: config.m4: just like for extensions, this file contains autoconf/automake directives that end up in the configure script. The only difference is that the sapi config.m4 files are read in diversion (output block) 2 instead of 3. The sapi config.m4 files should set two variables: PHP_SAPI (which sapi backend to choose) and SAPI_TARGET (the name of the resulting library or program, previously BINNAME). If they are not specified, they will default to "cgi" and "php", respectively. Makefile.inc: has to exist, has to define "INSTALL_IT" to the command used to install the final target (or ":" for no operation). It also has to define a plain Makefile rule (without autoconf substitutions) to build $(SAPI_TARGET) Makefile.am: just what you think. Make sure your target is called "libphpsapi_NNN.a", where NNN is the value of PHP_SAPI. Some testing and fixing probably remains. To make everything hang together, I've done some ugly tricks that I can imagine causing some problems. I've built and run the CGI version and built the Apache DSO.
27 years ago
Generalized server-API build process on UNIX. Each SAPI implementation now has its own directory under sapi/, just like extensions have theirs under ext/. To make the final targets appear in the main dir, the top-level Makefile includes sapi/NN/Makefile.inc from the selected sapi backend. This is a plan Makefile stub without any autoconf substitutions. Each SAPI backend also has its own config.m4 like extensions (read at the end of diversion 2) and config.h.stub files. Each SAPI backend has to contain: config.m4: just like for extensions, this file contains autoconf/automake directives that end up in the configure script. The only difference is that the sapi config.m4 files are read in diversion (output block) 2 instead of 3. The sapi config.m4 files should set two variables: PHP_SAPI (which sapi backend to choose) and SAPI_TARGET (the name of the resulting library or program, previously BINNAME). If they are not specified, they will default to "cgi" and "php", respectively. Makefile.inc: has to exist, has to define "INSTALL_IT" to the command used to install the final target (or ":" for no operation). It also has to define a plain Makefile rule (without autoconf substitutions) to build $(SAPI_TARGET) Makefile.am: just what you think. Make sure your target is called "libphpsapi_NNN.a", where NNN is the value of PHP_SAPI. Some testing and fixing probably remains. To make everything hang together, I've done some ugly tricks that I can imagine causing some problems. I've built and run the CGI version and built the Apache DSO.
27 years ago
Generalized server-API build process on UNIX. Each SAPI implementation now has its own directory under sapi/, just like extensions have theirs under ext/. To make the final targets appear in the main dir, the top-level Makefile includes sapi/NN/Makefile.inc from the selected sapi backend. This is a plan Makefile stub without any autoconf substitutions. Each SAPI backend also has its own config.m4 like extensions (read at the end of diversion 2) and config.h.stub files. Each SAPI backend has to contain: config.m4: just like for extensions, this file contains autoconf/automake directives that end up in the configure script. The only difference is that the sapi config.m4 files are read in diversion (output block) 2 instead of 3. The sapi config.m4 files should set two variables: PHP_SAPI (which sapi backend to choose) and SAPI_TARGET (the name of the resulting library or program, previously BINNAME). If they are not specified, they will default to "cgi" and "php", respectively. Makefile.inc: has to exist, has to define "INSTALL_IT" to the command used to install the final target (or ":" for no operation). It also has to define a plain Makefile rule (without autoconf substitutions) to build $(SAPI_TARGET) Makefile.am: just what you think. Make sure your target is called "libphpsapi_NNN.a", where NNN is the value of PHP_SAPI. Some testing and fixing probably remains. To make everything hang together, I've done some ugly tricks that I can imagine causing some problems. I've built and run the CGI version and built the Apache DSO.
27 years ago
  1. dnl
  2. dnl $Id$
  3. dnl
  4. AC_DEFUN([PHP_APACHE_FD_CHECK], [
  5. AC_CACHE_CHECK([for member fd in BUFF *],ac_cv_php_fd_in_buff,[
  6. save=$CPPFLAGS
  7. if test -n "$APXS_INCLUDEDIR"; then
  8. CPPFLAGS="$CPPFLAGS -I$APXS_INCLUDEDIR"
  9. else
  10. CPPFLAGS="$CPPFLAGS $APACHE_INCLUDE"
  11. fi
  12. AC_TRY_COMPILE([#include <httpd.h>],[conn_rec *c; int fd = c->client->fd;],[
  13. ac_cv_php_fd_in_buff=yes],[ac_cv_php_fd_in_buff=no],[ac_cv_php_fd_in_buff=no])
  14. CPPFLAGS=$save
  15. ])
  16. if test "$ac_cv_php_fd_in_buff" = "yes"; then
  17. AC_DEFINE(PHP_APACHE_HAVE_CLIENT_FD,1,[ ])
  18. fi
  19. ])
  20. AC_MSG_CHECKING(for Apache 1.x module support via DSO through APXS)
  21. AC_ARG_WITH(apxs,
  22. [ --with-apxs[=FILE] Build shared Apache 1.x module. FILE is the optional
  23. pathname to the Apache apxs tool [apxs]],[
  24. if test "$withval" = "yes"; then
  25. APXS=apxs
  26. $APXS -q CFLAGS >/dev/null 2>&1
  27. if test "$?" != "0" && test -x /usr/sbin/apxs; then #SUSE 6.x
  28. APXS=/usr/sbin/apxs
  29. fi
  30. else
  31. PHP_EXPAND_PATH($withval, APXS)
  32. fi
  33. $APXS -q CFLAGS >/dev/null 2>&1
  34. if test "$?" != "0"; then
  35. AC_MSG_RESULT()
  36. AC_MSG_RESULT()
  37. AC_MSG_RESULT([Sorry, I was not able to successfully run APXS. Possible reasons:])
  38. AC_MSG_RESULT()
  39. AC_MSG_RESULT([1. Perl is not installed;])
  40. AC_MSG_RESULT([2. Apache was not compiled with DSO support (--enable-module=so);])
  41. AC_MSG_RESULT([3. 'apxs' is not in your path. Try to use --with-apxs=/path/to/apxs])
  42. AC_MSG_RESULT([The output of $APXS follows])
  43. $APXS -q CFLAGS
  44. AC_MSG_ERROR([Aborting])
  45. fi
  46. APXS_LDFLAGS="@SYBASE_LFLAGS@ @SYBASE_LIBS@ @SYBASE_CT_LFLAGS@ @SYBASE_CT_LIBS@"
  47. APXS_INCLUDEDIR=`$APXS -q INCLUDEDIR`
  48. APXS_CFLAGS=`$APXS -q CFLAGS`
  49. APXS_HTTPD=`$APXS -q SBINDIR`/`$APXS -q TARGET`
  50. APACHE_INCLUDE=-I$APXS_INCLUDEDIR
  51. # Test that we're trying to configure with apache 1.x
  52. PHP_AP_EXTRACT_VERSION($APXS_HTTPD)
  53. if test "$APACHE_VERSION" -ge 2000000; then
  54. AC_MSG_ERROR([You have enabled Apache 1.3 support while your server is Apache 2. Please use the appropiate switch --with-apxs2])
  55. fi
  56. for flag in $APXS_CFLAGS; do
  57. case $flag in
  58. -D*) APACHE_CPPFLAGS="$APACHE_CPPFLAGS $flag";;
  59. esac
  60. done
  61. case $host_alias in
  62. *aix*)
  63. APXS_LIBEXECDIR=`$APXS -q LIBEXECDIR`
  64. EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-brtl -Wl,-bI:$APXS_LIBEXECDIR/httpd.exp"
  65. PHP_AIX_LDFLAGS="-Wl,-brtl"
  66. build_type=shared
  67. ;;
  68. *darwin*)
  69. MH_BUNDLE_FLAGS="-dynamic -twolevel_namespace -bundle -bundle_loader $APXS_HTTPD"
  70. PHP_SUBST(MH_BUNDLE_FLAGS)
  71. SAPI_SHARED=libs/libphp5.so
  72. build_type=bundle
  73. ;;
  74. *)
  75. build_type=shared
  76. ;;
  77. esac
  78. PHP_SELECT_SAPI(apache, $build_type, sapi_apache.c mod_php5.c php_apache.c, $APACHE_CPPFLAGS -I$APXS_INCLUDEDIR)
  79. # Test whether apxs support -S option
  80. $APXS -q -S CFLAGS="$APXS_CFLAGS" CFLAGS >/dev/null 2>&1
  81. if test "$?" != "0"; then
  82. APACHE_INSTALL="$APXS -i -a -n php5 $SAPI_SHARED" # Old apxs does not have -S option
  83. else
  84. APXS_LIBEXECDIR='$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR`
  85. if test -z `$APXS -q SYSCONFDIR`; then
  86. APACHE_INSTALL="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \
  87. $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \
  88. -i -n php5 $SAPI_SHARED"
  89. else
  90. APXS_SYSCONFDIR='$(INSTALL_ROOT)'`$APXS -q SYSCONFDIR`
  91. APACHE_INSTALL="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \
  92. \$(mkinstalldirs) '$APXS_SYSCONFDIR' && \
  93. $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \
  94. -S SYSCONFDIR='$APXS_SYSCONFDIR' \
  95. -i -a -n php5 $SAPI_SHARED"
  96. fi
  97. fi
  98. if test -z "`$APXS -q LD_SHLIB`" || test "`$APXS -q LIBEXECDIR`" = "modules"; then
  99. PHP_APXS_BROKEN=yes
  100. fi
  101. STRONGHOLD=
  102. AC_DEFINE(HAVE_AP_CONFIG_H,1,[ ])
  103. AC_DEFINE(HAVE_AP_COMPAT_H,1,[ ])
  104. AC_DEFINE(HAVE_APACHE,1,[ ])
  105. AC_MSG_RESULT(yes)
  106. ],[
  107. AC_MSG_RESULT(no)
  108. ])
  109. if test "$PHP_SAPI" != "apache"; then
  110. AC_MSG_CHECKING(for Apache 1.x module support)
  111. AC_ARG_WITH(apache,
  112. [ --with-apache[=DIR] Build Apache 1.x module. DIR is the top-level Apache
  113. build directory [/usr/local/apache]],[
  114. APACHE_INSTALL_FILES="\$(srcdir)/sapi/apache/mod_php5.* sapi/apache/libphp5.module"
  115. if test "$withval" = "yes"; then
  116. # Apache's default directory
  117. withval=/usr/local/apache
  118. fi
  119. if test "$withval" != "no"; then
  120. AC_DEFINE(HAVE_APACHE,1,[ ])
  121. APACHE_MODULE=yes
  122. PHP_EXPAND_PATH($withval, withval)
  123. # For Apache 2.0.x
  124. if test -f $withval/include/httpd.h &&
  125. test -f $withval/srclib/apr/include/apr_general.h ; then
  126. AC_MSG_ERROR([Use --with-apxs2 with Apache 2.x!])
  127. # For Apache 1.3.x
  128. elif test -f $withval/src/main/httpd.h; then
  129. APACHE_HAS_REGEX=1
  130. APACHE_INCLUDE="-I$withval/src/main -I$withval/src/os/unix -I$withval/src/ap"
  131. APACHE_TARGET=$withval/src/modules/php5
  132. if test ! -d $APACHE_TARGET; then
  133. mkdir $APACHE_TARGET
  134. fi
  135. PHP_SELECT_SAPI(apache, static, sapi_apache.c mod_php5.c php_apache.c, $APACHE_INCLUDE)
  136. APACHE_INSTALL="mkdir -p $APACHE_TARGET; cp $SAPI_STATIC $APACHE_TARGET/libmodphp5.a; cp $APACHE_INSTALL_FILES $APACHE_TARGET; cp $srcdir/sapi/apache/apMakefile.tmpl $APACHE_TARGET/Makefile.tmpl; cp $srcdir/sapi/apache/apMakefile.libdir $APACHE_TARGET/Makefile.libdir"
  137. PHP_LIBS="-Lmodules/php5 -L../modules/php5 -L../../modules/php5 -lmodphp5"
  138. AC_MSG_RESULT(yes - Apache 1.3.x)
  139. STRONGHOLD=
  140. if test -f $withval/src/include/ap_config.h; then
  141. AC_DEFINE(HAVE_AP_CONFIG_H,1,[ ])
  142. fi
  143. if test -f $withval/src/include/ap_compat.h; then
  144. AC_DEFINE(HAVE_AP_COMPAT_H,1,[ ])
  145. if test ! -f $withval/src/include/ap_config_auto.h; then
  146. AC_MSG_ERROR(Please run Apache\'s configure or src/Configure program once and try again)
  147. fi
  148. else
  149. if test -f $withval/src/include/compat.h; then
  150. AC_DEFINE(HAVE_OLD_COMPAT_H,1,[ ])
  151. fi
  152. fi
  153. # Also for Apache 1.3.x
  154. elif test -f $withval/src/include/httpd.h; then
  155. APACHE_HAS_REGEX=1
  156. APACHE_INCLUDE="-I$withval/src/include -I$withval/src/os/unix"
  157. APACHE_TARGET=$withval/src/modules/php5
  158. if test ! -d $APACHE_TARGET; then
  159. mkdir $APACHE_TARGET
  160. fi
  161. PHP_SELECT_SAPI(apache, static, sapi_apache.c mod_php5.c php_apache.c, $APACHE_INCLUDE)
  162. PHP_LIBS="-Lmodules/php5 -L../modules/php5 -L../../modules/php5 -lmodphp5"
  163. APACHE_INSTALL="mkdir -p $APACHE_TARGET; cp $SAPI_STATIC $APACHE_TARGET/libmodphp5.a; cp $APACHE_INSTALL_FILES $APACHE_TARGET; cp $srcdir/sapi/apache/apMakefile.tmpl $APACHE_TARGET/Makefile.tmpl; cp $srcdir/sapi/apache/apMakefile.libdir $APACHE_TARGET/Makefile.libdir"
  164. AC_MSG_RESULT(yes - Apache 1.3.x)
  165. STRONGHOLD=
  166. if test -f $withval/src/include/ap_config.h; then
  167. AC_DEFINE(HAVE_AP_CONFIG_H,1,[ ])
  168. fi
  169. if test -f $withval/src/include/ap_compat.h; then
  170. AC_DEFINE(HAVE_AP_COMPAT_H,1,[ ])
  171. if test ! -f $withval/src/include/ap_config_auto.h; then
  172. AC_MSG_ERROR(Please run Apache\'s configure or src/Configure program once and try again)
  173. fi
  174. else
  175. if test -f $withval/src/include/compat.h; then
  176. AC_DEFINE(HAVE_OLD_COMPAT_H,1,[ ])
  177. fi
  178. fi
  179. # For StrongHold 2.2
  180. elif test -f $withval/apache/httpd.h; then
  181. APACHE_INCLUDE="-I$withval/apache -I$withval/ssl/include"
  182. APACHE_TARGET=$withval/apache
  183. PHP_SELECT_SAPI(apache, static, sapi_apache.c mod_php5.c php_apache.c, $APACHE_INCLUDE)
  184. PHP_LIBS="-Lmodules/php5 -L../modules/php5 -L../../modules/php5 -lmodphp5"
  185. APACHE_INSTALL="mkdir -p $APACHE_TARGET; cp $SAPI_STATIC $APACHE_TARGET/libmodphp5.a; cp $APACHE_INSTALL_FILES $APACHE_TARGET"
  186. STRONGHOLD=-DSTRONGHOLD=1
  187. AC_MSG_RESULT(yes - StrongHold)
  188. if test -f $withval/apache/ap_config.h; then
  189. AC_DEFINE(HAVE_AP_CONFIG_H,1,[ ])
  190. fi
  191. if test -f $withval/src/ap_compat.h; then
  192. AC_DEFINE(HAVE_AP_COMPAT_H,1,[ ])
  193. if test ! -f $withval/src/include/ap_config_auto.h; then
  194. AC_MSG_ERROR(Please run Apache\'s configure or src/Configure program once and try again)
  195. fi
  196. else
  197. if test -f $withval/src/compat.h; then
  198. AC_DEFINE(HAVE_OLD_COMPAT_H,1,[ ])
  199. fi
  200. fi
  201. else
  202. AC_MSG_RESULT(no)
  203. AC_MSG_ERROR(Invalid Apache directory - unable to find httpd.h under $withval)
  204. fi
  205. else
  206. AC_MSG_RESULT(no)
  207. fi
  208. ],[
  209. AC_MSG_RESULT(no)
  210. ])
  211. fi
  212. AC_MSG_CHECKING(for mod_charset compatibility option)
  213. AC_ARG_WITH(mod_charset,
  214. [ --with-mod_charset Enable transfer tables for mod_charset (Rus Apache)],
  215. [
  216. AC_MSG_RESULT(yes)
  217. AC_DEFINE(USE_TRANSFER_TABLES,1,[ ])
  218. ],[
  219. AC_MSG_RESULT(no)
  220. ])
  221. dnl Build as static module
  222. if test -n "$APACHE_MODULE"; then
  223. PHP_TARGET_RDYNAMIC
  224. $php_shtool mkdir -p sapi/apache
  225. PHP_OUTPUT(sapi/apache/libphp5.module)
  226. fi
  227. dnl General
  228. if test -n "$APACHE_INSTALL"; then
  229. if test "x$APXS" != "x" -a "`uname -sv`" = "AIX 4" -a "$GCC" != "yes"; then
  230. APXS_EXP=-bE:sapi/apache/mod_php5.exp
  231. fi
  232. PHP_APACHE_FD_CHECK
  233. INSTALL_IT=$APACHE_INSTALL
  234. PHP_SUBST(APXS_EXP)
  235. PHP_SUBST(APACHE_INCLUDE)
  236. PHP_SUBST(APACHE_TARGET)
  237. PHP_SUBST(APXS)
  238. PHP_SUBST(APXS_LDFLAGS)
  239. PHP_SUBST(APACHE_INSTALL)
  240. PHP_SUBST(STRONGHOLD)
  241. fi
  242. dnl ## Local Variables:
  243. dnl ## tab-width: 4
  244. dnl ## End: