components/php-5_3/php-sapi/patches/016_php_sapi_apache2filter_config.m4.patch
changeset 4987 6a82655eda42
parent 4986 90a869b3f47a
child 4988 4b69c7c7e09b
equal deleted inserted replaced
4986:90a869b3f47a 4987:6a82655eda42
     1 --- php-5.3.10/sapi/apache2filter/config.m4_orig	Sun Mar  9 05:35:56 2008
       
     2 +++ php-5.3.10/sapi/apache2filter/config.m4	Wed Feb  8 11:25:25 2012
       
     3 @@ -9,6 +9,23 @@
       
     4  
       
     5  AC_MSG_CHECKING([for Apache 2.0 filter-module support via DSO through APXS])
       
     6  
       
     7 +dnl PHP_AP2_EXTRACT_VERSION(/path/httpd)
       
     8 +dnl
       
     9 +dnl This macro is used to get a comparable
       
    10 +dnl version for apache2.
       
    11 +dnl
       
    12 +AC_DEFUN([PHP_AP2_EXTRACT_VERSION],[
       
    13 +  ac_output=`env LD_LIBRARY_PATH=$APXS_LIBDIR $1 -v 2>&1 | grep version`
       
    14 +  ac_IFS=$IFS
       
    15 +IFS="- /.
       
    16 +"
       
    17 +  set $ac_output
       
    18 +  IFS=$ac_IFS
       
    19 +
       
    20 +  APACHE_VERSION=`expr [$]4 \* 1000000 + [$]5 \* 1000 + [$]6`
       
    21 +])
       
    22 +
       
    23 +dnl
       
    24  if test "$PHP_APXS2FILTER" != "no"; then
       
    25    if test "$PHP_APXS2FILTER" = "yes"; then
       
    26      APXS=apxs
       
    27 @@ -37,6 +54,7 @@
       
    28  
       
    29    APXS_INCLUDEDIR=`$APXS -q INCLUDEDIR`
       
    30    APXS_BINDIR=`$APXS -q BINDIR`
       
    31 +  APXS_LIBDIR=`$APXS -q LIBDIR`
       
    32    APXS_HTTPD=`$APXS -q SBINDIR`/`$APXS -q TARGET`
       
    33    APXS_CFLAGS=`$APXS -q CFLAGS`
       
    34    APXS_MPM=`$APXS -q MPM_NAME`
       
    35 @@ -62,6 +80,7 @@
       
    36  
       
    37    # Test that we're trying to configure with apache 2.x
       
    38    PHP_AP_EXTRACT_VERSION($APXS_HTTPD)
       
    39 +  PHP_AP2_EXTRACT_VERSION($APXS_HTTPD)
       
    40    if test "$APACHE_VERSION" -le 2000000; then
       
    41      AC_MSG_ERROR([You have enabled Apache 2 support while your server is Apache 1.3.  Please use the appropiate switch --with-apxs (without the 2)])
       
    42    elif test "$APACHE_VERSION" -lt 2000040; then