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.

272 lines
9.6 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
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_MSG_CHECKING(for Apache 1.x module support via DSO through APXS)
  5. AC_ARG_WITH(apxs,
  6. [ --with-apxs[=FILE] Build shared Apache 1.x module. FILE is the optional
  7. pathname to the Apache apxs tool; defaults to "apxs".],[
  8. if test "$withval" = "yes"; then
  9. APXS=apxs
  10. $APXS -q CFLAGS >/dev/null 2>&1
  11. if test "$?" != "0" && test -x /usr/sbin/apxs; then #SUSE 6.x
  12. APXS=/usr/sbin/apxs
  13. fi
  14. else
  15. PHP_EXPAND_PATH($withval, APXS)
  16. fi
  17. $APXS -q CFLAGS >/dev/null 2>&1
  18. if test "$?" != "0"; then
  19. AC_MSG_RESULT()
  20. AC_MSG_RESULT()
  21. AC_MSG_RESULT([Sorry, I was not able to successfully run APXS. Possible reasons:])
  22. AC_MSG_RESULT()
  23. AC_MSG_RESULT([1. Perl is not installed;])
  24. AC_MSG_RESULT([2. Apache was not compiled with DSO support (--enable-module=so);])
  25. AC_MSG_RESULT([3. 'apxs' is not in your path. Try to use --with-apxs=/path/to/apxs])
  26. AC_MSG_RESULT([The output of $APXS follows])
  27. $APXS -q CFLAGS
  28. AC_MSG_ERROR([Aborting])
  29. fi
  30. APXS_LDFLAGS="@SYBASE_LFLAGS@ @SYBASE_LIBS@ @SYBASE_CT_LFLAGS@ @SYBASE_CT_LIBS@"
  31. APXS_INCLUDEDIR=`$APXS -q INCLUDEDIR`
  32. APXS_CFLAGS=`$APXS -q CFLAGS`
  33. APXS_HTTPD=`$APXS -q SBINDIR`/`$APXS -q TARGET`
  34. APACHE_INCLUDE=-I$APXS_INCLUDEDIR
  35. # Test that we're trying to configure with apache 1.x
  36. PHP_AP_EXTRACT_VERSION($APXS_HTTPD)
  37. if test "$APACHE_VERSION" -ge 2000000; then
  38. AC_MSG_ERROR([You have enabled Apache 1.3 support while your server is Apache 2. Please use the appropiate switch --with-apxs2])
  39. fi
  40. for flag in $APXS_CFLAGS; do
  41. case $flag in
  42. -D*) APACHE_CPPFLAGS="$APACHE_CPPFLAGS $flag";;
  43. esac
  44. done
  45. case $host_alias in
  46. *aix*)
  47. APXS_LIBEXECDIR=`$APXS -q LIBEXECDIR`
  48. EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-brtl -Wl,-bI:$APXS_LIBEXECDIR/httpd.exp"
  49. PHP_AIX_LDFLAGS="-Wl,-brtl"
  50. build_type=shared
  51. ;;
  52. *darwin*)
  53. MH_BUNDLE_FLAGS="-dynamic -twolevel_namespace -bundle -bundle_loader $APXS_HTTPD"
  54. PHP_SUBST(MH_BUNDLE_FLAGS)
  55. SAPI_SHARED=libs/libphp5.so
  56. build_type=bundle
  57. ;;
  58. *)
  59. build_type=shared
  60. ;;
  61. esac
  62. PHP_SELECT_SAPI(apache, $build_type, sapi_apache.c mod_php5.c php_apache.c, $APACHE_CPPFLAGS -I$APXS_INCLUDEDIR)
  63. # Test whether apxs support -S option
  64. $APXS -q -S CFLAGS="$APXS_CFLAGS" CFLAGS >/dev/null 2>&1
  65. if test "$?" != "0"; then
  66. APACHE_INSTALL="$APXS -i -a -n php5 $SAPI_SHARED" # Old apxs does not have -S option
  67. else
  68. APXS_LIBEXECDIR='$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR`
  69. if test -z `$APXS -q SYSCONFDIR`; then
  70. APACHE_INSTALL="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \
  71. $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \
  72. -i -n php5 $SAPI_SHARED"
  73. else
  74. APXS_SYSCONFDIR='$(INSTALL_ROOT)'`$APXS -q SYSCONFDIR`
  75. APACHE_INSTALL="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \
  76. \$(mkinstalldirs) '$APXS_SYSCONFDIR' && \
  77. $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \
  78. -S SYSCONFDIR='$APXS_SYSCONFDIR' \
  79. -i -a -n php5 $SAPI_SHARED"
  80. fi
  81. fi
  82. if test -z "`$APXS -q LD_SHLIB`" || test "`$APXS -q LIBEXECDIR`" = "modules"; then
  83. PHP_APXS_BROKEN=yes
  84. fi
  85. STRONGHOLD=
  86. AC_DEFINE(HAVE_AP_CONFIG_H,1,[ ])
  87. AC_DEFINE(HAVE_AP_COMPAT_H,1,[ ])
  88. AC_DEFINE(HAVE_APACHE,1,[ ])
  89. AC_MSG_RESULT(yes)
  90. ],[
  91. AC_MSG_RESULT(no)
  92. ])
  93. if test "$PHP_SAPI" != "apache"; then
  94. AC_MSG_CHECKING(for Apache 1.x module support)
  95. AC_ARG_WITH(apache,
  96. [ --with-apache[=DIR] Build Apache 1.x module. DIR is the top-level Apache
  97. build directory, defaults to /usr/local/apache.],[
  98. APACHE_INSTALL_FILES="\$(srcdir)/sapi/apache/mod_php5.* sapi/apache/libphp5.module"
  99. if test "$withval" = "yes"; then
  100. # Apache's default directory
  101. withval=/usr/local/apache
  102. fi
  103. if test "$withval" != "no"; then
  104. AC_DEFINE(HAVE_APACHE,1,[ ])
  105. APACHE_MODULE=yes
  106. PHP_EXPAND_PATH($withval, withval)
  107. # For Apache 1.2.x
  108. if test -f $withval/src/httpd.h; then
  109. APACHE_INCLUDE=-I$withval/src
  110. APACHE_TARGET=$withval/src
  111. PHP_SELECT_SAPI(apache, static, sapi_apache.c mod_php5.c php_apache.c, $APACHE_INCLUDE)
  112. APACHE_INSTALL="mkdir -p $APACHE_TARGET; cp $SAPI_STATIC $APACHE_INSTALL_FILES $APACHE_TARGET"
  113. PHP_LIBS="-L. -lphp3"
  114. AC_MSG_RESULT(yes - Apache 1.2.x)
  115. STRONGHOLD=
  116. if test -f $withval/src/ap_config.h; then
  117. AC_DEFINE(HAVE_AP_CONFIG_H,1,[ ])
  118. fi
  119. # For Apache 2.0.x
  120. elif test -f $withval/include/httpd.h &&
  121. test -f $withval/srclib/apr/include/apr_general.h ; then
  122. AC_MSG_ERROR([Use --with-apache2 with Apache 2.x!])
  123. # For Apache 1.3.x
  124. elif test -f $withval/src/main/httpd.h; then
  125. APACHE_HAS_REGEX=1
  126. APACHE_INCLUDE="-I$withval/src/main -I$withval/src/os/unix -I$withval/src/ap"
  127. APACHE_TARGET=$withval/src/modules/php5
  128. if test ! -d $APACHE_TARGET; then
  129. mkdir $APACHE_TARGET
  130. fi
  131. PHP_SELECT_SAPI(apache, static, sapi_apache.c mod_php5.c php_apache.c, $APACHE_INCLUDE)
  132. 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"
  133. PHP_LIBS="-Lmodules/php5 -L../modules/php5 -L../../modules/php5 -lmodphp5"
  134. AC_MSG_RESULT(yes - Apache 1.3.x)
  135. STRONGHOLD=
  136. if test -f $withval/src/include/ap_config.h; then
  137. AC_DEFINE(HAVE_AP_CONFIG_H,1,[ ])
  138. fi
  139. if test -f $withval/src/include/ap_compat.h; then
  140. AC_DEFINE(HAVE_AP_COMPAT_H,1,[ ])
  141. if test ! -f $withval/src/include/ap_config_auto.h; then
  142. AC_MSG_ERROR(Please run Apache\'s configure or src/Configure program once and try again)
  143. fi
  144. else
  145. if test -f $withval/src/include/compat.h; then
  146. AC_DEFINE(HAVE_OLD_COMPAT_H,1,[ ])
  147. fi
  148. fi
  149. # Also for Apache 1.3.x
  150. elif test -f $withval/src/include/httpd.h; then
  151. APACHE_HAS_REGEX=1
  152. APACHE_INCLUDE="-I$withval/src/include -I$withval/src/os/unix"
  153. APACHE_TARGET=$withval/src/modules/php5
  154. if test ! -d $APACHE_TARGET; then
  155. mkdir $APACHE_TARGET
  156. fi
  157. PHP_SELECT_SAPI(apache, static, sapi_apache.c mod_php5.c php_apache.c, $APACHE_INCLUDE)
  158. PHP_LIBS="-Lmodules/php5 -L../modules/php5 -L../../modules/php5 -lmodphp5"
  159. 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"
  160. AC_MSG_RESULT(yes - Apache 1.3.x)
  161. STRONGHOLD=
  162. if test -f $withval/src/include/ap_config.h; then
  163. AC_DEFINE(HAVE_AP_CONFIG_H,1,[ ])
  164. fi
  165. if test -f $withval/src/include/ap_compat.h; then
  166. AC_DEFINE(HAVE_AP_COMPAT_H,1,[ ])
  167. if test ! -f $withval/src/include/ap_config_auto.h; then
  168. AC_MSG_ERROR(Please run Apache\'s configure or src/Configure program once and try again)
  169. fi
  170. else
  171. if test -f $withval/src/include/compat.h; then
  172. AC_DEFINE(HAVE_OLD_COMPAT_H,1,[ ])
  173. fi
  174. fi
  175. # For StrongHold 2.2
  176. elif test -f $withval/apache/httpd.h; then
  177. APACHE_INCLUDE=-"I$withval/apache -I$withval/ssl/include"
  178. APACHE_TARGET=$withval/apache
  179. PHP_SELECT_SAPI(apache, static, sapi_apache.c mod_php5.c php_apache.c, $APACHE_INCLUDE)
  180. PHP_LIBS="-Lmodules/php5 -L../modules/php5 -L../../modules/php5 -lmodphp5"
  181. APACHE_INSTALL="mkdir -p $APACHE_TARGET; cp $SAPI_STATIC $APACHE_TARGET/libmodphp5.a; cp $APACHE_INSTALL_FILES $APACHE_TARGET"
  182. STRONGHOLD=-DSTRONGHOLD=1
  183. AC_MSG_RESULT(yes - StrongHold)
  184. if test -f $withval/apache/ap_config.h; then
  185. AC_DEFINE(HAVE_AP_CONFIG_H,1,[ ])
  186. fi
  187. if test -f $withval/src/ap_compat.h; then
  188. AC_DEFINE(HAVE_AP_COMPAT_H,1,[ ])
  189. if test ! -f $withval/src/include/ap_config_auto.h; then
  190. AC_MSG_ERROR(Please run Apache\'s configure or src/Configure program once and try again)
  191. fi
  192. else
  193. if test -f $withval/src/compat.h; then
  194. AC_DEFINE(HAVE_OLD_COMPAT_H,1,[ ])
  195. fi
  196. fi
  197. else
  198. AC_MSG_RESULT(no)
  199. AC_MSG_ERROR(Invalid Apache directory - unable to find httpd.h under $withval)
  200. fi
  201. else
  202. AC_MSG_RESULT(no)
  203. fi
  204. ],[
  205. AC_MSG_RESULT(no)
  206. ])
  207. fi
  208. if test "x$APXS" != "x" -a "`uname -sv`" = "AIX 4" -a "$GCC" != "yes"; then
  209. APXS_EXP=-bE:sapi/apache/mod_php5.exp
  210. fi
  211. PHP_SUBST(APXS_EXP)
  212. PHP_SUBST(APACHE_INCLUDE)
  213. PHP_SUBST(APACHE_TARGET)
  214. PHP_SUBST(APXS)
  215. PHP_SUBST(APXS_LDFLAGS)
  216. PHP_SUBST(APACHE_INSTALL)
  217. PHP_SUBST(STRONGHOLD)
  218. AC_CACHE_CHECK([for member fd in BUFF *],ac_cv_php_fd_in_buff,[
  219. save=$CPPFLAGS
  220. if test -n "$APXS_INCLUDEDIR"; then
  221. CPPFLAGS="$CPPFLAGS -I$APXS_INCLUDEDIR"
  222. else
  223. CPPFLAGS="$CPPFLAGS $APACHE_INCLUDE"
  224. fi
  225. AC_TRY_COMPILE([#include <httpd.h>],[conn_rec *c; int fd = c->client->fd;],[
  226. ac_cv_php_fd_in_buff=yes],[ac_cv_php_fd_in_buff=no],[ac_cv_php_fd_in_buff=no])
  227. CPPFLAGS=$save
  228. ])
  229. if test "$ac_cv_php_fd_in_buff" = "yes"; then
  230. AC_DEFINE(PHP_APACHE_HAVE_CLIENT_FD,1,[ ])
  231. fi
  232. AC_MSG_CHECKING(for mod_charset compatibility option)
  233. AC_ARG_WITH(mod_charset,
  234. [ --with-mod_charset Enable transfer tables for mod_charset (Rus Apache).],
  235. [
  236. AC_MSG_RESULT(yes)
  237. AC_DEFINE(USE_TRANSFER_TABLES,1,[ ])
  238. ],[
  239. AC_MSG_RESULT(no)
  240. ])
  241. if test -n "$APACHE_MODULE"; then
  242. PHP_TARGET_RDYNAMIC
  243. $php_shtool mkdir -p sapi/apache
  244. PHP_OUTPUT(sapi/apache/libphp5.module)
  245. fi
  246. if test -n "$APACHE_INSTALL"; then
  247. INSTALL_IT=$APACHE_INSTALL
  248. fi
  249. dnl ## Local Variables:
  250. dnl ## tab-width: 4
  251. dnl ## End: