# [PATCH] apache2* config.m4 update (resend)

- Thread: https://externals.io/message/12288
- Original archive: https://news-web.php.net/php.internals/12288
- Started by Joe Orton on 2004-08-23T07:20:37+00:00
- Messages: 5
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #12288 — Joe Orton — 2004-08-23T07:20:37+00:00

URL: https://externals.io/message/12288#12288

This fixes the 2.0 SAPI build against HEAD of httpd-2.0:

1. pick up correct names for ap[ru]-config from apxs
2. pick up --cppflags etc from apr-config to ensure that
-D_LARGEFILE64_SOURCE is used where necessary (that's bug #27761)
since APR now has large file support

(tested to not break the build against the 2.0.x branch)

Index: sapi/apache2filter/config.m4
===================================================================
RCS file: /repository/php-src/sapi/apache2filter/config.m4,v
retrieving revision 1.36
diff -u -r1.36 config.m4
--- sapi/apache2filter/config.m4	3 Oct 2003 05:24:27 -0000	1.36
+++ sapi/apache2filter/config.m4	23 Aug 2004 07:14:35 -0000
@@ -40,8 +40,14 @@
   APU_BINDIR=`$APXS -q APU_BINDIR`
   APR_BINDIR=`$APXS -q APR_BINDIR`
 
-  APU_INCLUDEDIR="`$APU_BINDIR/apu-config --includes`"
-  APR_INCLUDEDIR="`$APR_BINDIR/apr-config --includes`"
+  # Pick up ap[ru]-N-config if using httpd >=2.1
+  APR_CONFIG=`$APXS -q APR_CONFIG 2>/dev/null ||
+    echo $APR_BINDIR/apr-config`
+  APU_CONFIG=`$APXS -q APU_CONFIG 2>/dev/null ||
+    echo $APU_BINDIR/apu-config`
+
+  APR_CFLAGS="`$APR_CONFIG --cppflags --includes`"
+  APU_CFLAGS="`$APU_CONFIG --includes`"
 
   for flag in $APXS_CFLAGS; do
     case $flag in
@@ -49,7 +55,7 @@
     esac
   done
 
-  APACHE_CFLAGS="$APACHE_CPPFLAGS -I$APXS_INCLUDEDIR $APU_INCLUDEDIR $APR_INCLUDEDIR"
+  APACHE_CFLAGS="$APACHE_CPPFLAGS -I$APXS_INCLUDEDIR $APR_CFLAGS $APU_CFLAGS"
 
   # Test that we're trying to configure with apache 2.x
   PHP_AP_EXTRACT_VERSION($APXS_HTTPD)
Index: sapi/apache2handler/config.m4
===================================================================
RCS file: /repository/php-src/sapi/apache2handler/config.m4,v
retrieving revision 1.9
diff -u -r1.9 config.m4
--- sapi/apache2handler/config.m4	21 Oct 2003 11:48:31 -0000	1.9
+++ sapi/apache2handler/config.m4	23 Aug 2004 07:14:35 -0000
@@ -39,8 +39,14 @@
   APU_BINDIR=`$APXS -q APU_BINDIR`
   APR_BINDIR=`$APXS -q APR_BINDIR`
 
-  APU_INCLUDEDIR="`$APU_BINDIR/apu-config --includes`"
-  APR_INCLUDEDIR="`$APR_BINDIR/apr-config --includes`"
+  # Pick up ap[ru]-N-config if using httpd >=2.1
+  APR_CONFIG=`$APXS -q APR_CONFIG 2>/dev/null ||
+    echo $APR_BINDIR/apr-config`
+  APU_CONFIG=`$APXS -q APU_CONFIG 2>/dev/null ||
+    echo $APU_BINDIR/apu-config`
+
+  APR_CFLAGS="`$APR_CONFIG --cppflags --includes`"
+  APU_CFLAGS="`$APU_CONFIG --includes`"
 
   for flag in $APXS_CFLAGS; do
     case $flag in
@@ -48,7 +54,7 @@
     esac
   done
 
-  APACHE_CFLAGS="$APACHE_CPPFLAGS -I$APXS_INCLUDEDIR $APU_INCLUDEDIR $APR_INCLUDEDIR"
+  APACHE_CFLAGS="$APACHE_CPPFLAGS -I$APXS_INCLUDEDIR $APR_CFLAGS $APU_CFLAGS"
 
   # Test that we're trying to configure with apache 2.x
   PHP_AP_EXTRACT_VERSION($APXS_HTTPD)

---

## #12289 — Derick Rethans — 2004-08-23T07:48:06+00:00

URL: https://externals.io/message/12288#12289 · In reply to: #12288

> This fixes the 2.0 SAPI build against HEAD of httpd-2.0:

Can you please send it as an attachment (extension .txt), otherwise it
get's garbled when saving.

regards,
Derick

-- 
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org

---

## #12290 — Joe Orton — 2004-08-23T08:39:58+00:00

URL: https://externals.io/message/12288#12290 · In reply to: #12289

> 
> 
> > […]
> 
> Can you please send it as an attachment (extension .txt), otherwise it
> get's garbled when saving.

Sure.

---

## #12291 — Derick Rethans — 2004-08-23T09:01:38+00:00

URL: https://externals.io/message/12288#12291 · In reply to: #12290

> 
> > […]
>
> Sure.

Committed, thanks!

Derick

-- 
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org

---

## #12292 — Joe Orton — 2004-08-23T09:32:07+00:00

URL: https://externals.io/message/12288#12292 · In reply to: #12291

> Committed, thanks!

Thanks.  #27791 can be closed now.

joe
