apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jus...@erenkrantz.com>
Subject [PATCH] update find_ap{ru}.m4 for ap{ru}-1-config was Re: 1.0.0 RC4 (apr-config -> apr-1-config)
Date Thu, 15 Jul 2004 03:41:51 GMT
--On Wednesday, July 14, 2004 10:24 PM +0100 Max Bowsher <maxb@ukf.net> wrote:

> Joe Orton wrote:
>> On Wed, Jul 14, 2004 at 04:12:29PM +0100, Max Bowsher wrote:
>>> David Reid wrote:
>>>> Tarballs available at http://www.apache.org/~dreid/
>>>>
>>>> Test & report!
>>>
>>> RC4 is still installing <prefix>/bin/apr-config , so making it impossible
> to
>>> install apr 0 and apr 1 side-by-side.
>>
>> Known issue, will get fixed sometime after 1.0.0 once everything else
>> has been hooked up to use apr-1-config.
>
> I'm unsure whether my m4 skills are sufficient, but since this is of
> interest to me as I package apr for cygwin, I'm going to work on this, to
> ideally get it done for apr 1.0.0, if I can, if not, helping to get it done
> in 1.0.1 at the latest.

Tweak find_apr.m4 to look for apr-1-config then look for apr-config.  None of
these projects you mention need any changes other than a new find_ap{ru}.m4.
They all use $apr_config *after* find_ap{ru}.m4 runs.  That's why we designed
find_ap{ru}.m4 in the way we did - so that changes like this are extremely
non-intrusive.

Update those find_ap{ru}.m4 in projects that have it, then you're done.
Completely untested patch attached.  I hope my mailer doesn't do anything
stupid with it, but you should get the gist of it.  -- justin

Index: apr/build/find_apr.m4
===================================================================
RCS file: /home/cvs/apr/build/find_apr.m4,v
retrieving revision 1.14
diff -u -r1.14 find_apr.m4
--- apr/build/find_apr.m4	5 Nov 2002 22:09:19 -0000	1.14
+++ apr/build/find_apr.m4	15 Jul 2004 03:38:35 -0000
@@ -56,9 +56,15 @@
       AC_MSG_ERROR([--with-apr requires a directory to be provided])
     fi

-    if $TEST_X "$withval/bin/apr-config"; then
+    if $TEST_X "$withval/bin/apr-1-config"; then
+      apr_found="yes"
+      apr_config="$withval/bin/apr-1-config"
+    elif $TEST_X "$withval/bin/apr-config"; then
       apr_found="yes"
       apr_config="$withval/bin/apr-config"
+    elif $TEST_X "$withval/apr-1-config"; then
+      apr_found="yes"
+      apr_config="$withval/apr-1-config"
     elif $TEST_X "$withval/apr-config"; then
       apr_found="yes"
       apr_config="$withval/apr-config"
@@ -78,19 +84,26 @@
       apr_temp_abs_srcdir="`cd $1 && pwd`"
       apr_found="reconfig"
       if test -n "$2"; then
-        apr_config="$2/apr-config"
+        apr_config="$2/apr-1-config"
       else
-        apr_config="$1/apr-config"
+        apr_config="$1/apr-1-config"
       fi
     fi
     if test "$apr_found" = "no" && test -n "$3" && test "$3" = "1"; then
-      if apr-config --help > /dev/null 2>&1 ; then
+      if apr-1-config --help > /dev/null 2>&1 ; then
+        apr_found="yes"
+        apr_config="apr-1-config"
+      elif apr-config --help > /dev/null 2>&1 ; then
         apr_found="yes"
         apr_config="apr-config"
       else
         dnl look in some standard places (apparently not in builtin/default)
         for lookdir in /usr /usr/local /opt/apr /usr/local/apache2 ; do
-          if $TEST_X "$lookdir/bin/apr-config"; then
+          if $TEST_X "$lookdir/bin/apr-1-config"; then
+            apr_found="yes"
+            apr_config="$lookdir/bin/apr-1-config"
+            break
+          elif $TEST_X "$lookdir/bin/apr-config"; then
             apr_found="yes"
             apr_config="$lookdir/bin/apr-config"
             break
Index: apr-util/build/find_apu.m4
===================================================================
RCS file: /home/cvs/apr-util/build/find_apu.m4,v
retrieving revision 1.7
diff -u -r1.7 find_apu.m4
--- apr-util/build/find_apu.m4	5 Nov 2002 22:13:42 -0000	1.7
+++ apr-util/build/find_apu.m4	15 Jul 2004 03:38:09 -0000
@@ -52,9 +52,16 @@
       AC_MSG_ERROR([--with-apr-util requires a directory to be provided])
     fi

-    if test -x "$withval/bin/apu-config"; then
+    if test -x "$withval/bin/apu-1-config"; then
+       apu_found="yes"
+       apu_config="$withval/bin/apu-1-config"
+    elif test -x "$withval/bin/apu-config"; then
        apu_found="yes"
        apu_config="$withval/bin/apu-config"
+    elif test -x "$withval/apu-1-config"; then
+       dnl Already configured build dir
+       apu_found="yes"
+       apu_config="$withval/apu-1-config"
     elif test -x "$withval/apu-config"; then
        dnl Already configured build dir
        apu_found="yes"
@@ -76,19 +83,26 @@
     if test -d "$1"; then
       apu_found="reconfig"
       if test -n "$2"; then
-        apu_config="$2/apu-config"
+        apu_config="$2/apu-1-config"
       else
-        apu_config="$1/apu-config"
+        apu_config="$1/apu-1-config"
       fi
     fi
     if test "$apu_found" = "no" && test -n "$3" && test "$3" = "1"; then
-      if apu-config --help > /dev/null 2>&1 ; then
+      if apu-1-config --help > /dev/null 2>&1 ; then
+        apu_found="yes"
+        apu_config="apu-1-config"
+      elif apu-config --help > /dev/null 2>&1 ; then
         apu_found="yes"
         apu_config="apu-config"
       else
         dnl look in the some standard places (apparently not in 
builtin/default)
         for lookdir in /usr /usr/local /opt/apr /usr/local/apache2 ; do
-          if test -x "$lookdir/bin/apu-config"; then
+          if test -x "$lookdir/bin/apu-1-config"; then
+            apu_found="yes"
+            apu_config="$lookdir/bin/apu-1-config"
+            break
+          elif test -x "$lookdir/bin/apu-config"; then
             apu_found="yes"
             apu_config="$lookdir/bin/apu-config"
             break



Mime
View raw message