apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rj...@apache.org
Subject svn commit: r1412318 - in /apr/apr/branches/1.3.x: ./ CHANGES build/apr_common.m4
Date Wed, 21 Nov 2012 21:45:39 GMT
Author: rjung
Date: Wed Nov 21 21:45:38 2012
New Revision: 1412318

URL: http://svn.apache.org/viewvc?rev=1412318&view=rev
Log:
Backport some fixes to apr_common.m4 from
trunk, 1.5.x, 1.4.x.

Trunk revisions: r1125472, r1183686, r1199072
1.5.x revisions: r1125473, r1183710, r1199076
1.4.x revisions: r1125474, r1183711, r1199078

1) Silence autoconf 2.68 warnings.

Add AC_LANG_SOURCE to AC_COMPILE_IFELSE
in apr_common.m4.

2) Fix APR_RESTORE_THE_ENVIRONMENT if the original variable
was a single space

The original problem of only whitespace in the saved
variable is fixed by a better test condition.

The additional possible problem of sed or regexp meta
characters in the variable value is still open but
yet has to be observed in the wild.

PR 50334
Submitted by:  Nathan Phillip Brink <binki gentoo org>

Modified:
    apr/apr/branches/1.3.x/   (props changed)
    apr/apr/branches/1.3.x/CHANGES
    apr/apr/branches/1.3.x/build/apr_common.m4

Propchange: apr/apr/branches/1.3.x/
------------------------------------------------------------------------------
  Merged /apr/apr/trunk:r1125472,1183686,1199072

Modified: apr/apr/branches/1.3.x/CHANGES
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.3.x/CHANGES?rev=1412318&r1=1412317&r2=1412318&view=diff
==============================================================================
--- apr/apr/branches/1.3.x/CHANGES [utf-8] (original)
+++ apr/apr/branches/1.3.x/CHANGES [utf-8] Wed Nov 21 21:45:38 2012
@@ -1,6 +1,11 @@
                                                      -*- coding: utf-8 -*-
 Changes for APR 1.3.13
 
+  *) configure: Fix APR_RESTORE_THE_ENVIRONMENT if the original variable was
+     a single space. PR 50334. [Nathan Phillip Brink <binki gentoo org>]
+
+  *) Silence autoconf 2.68 warnings.  [Rainer Jung]
+
   *) Don't overwrite our config.guess and config.sub
      when running buildconf.  [Rainer Jung]
 

Modified: apr/apr/branches/1.3.x/build/apr_common.m4
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.3.x/build/apr_common.m4?rev=1412318&r1=1412317&r2=1412318&view=diff
==============================================================================
--- apr/apr/branches/1.3.x/build/apr_common.m4 (original)
+++ apr/apr/branches/1.3.x/build/apr_common.m4 Wed Nov 21 21:45:38 2012
@@ -202,14 +202,18 @@ dnl and restoring the original variable 
 dnl for a user to override configure when it does something stupid.
 dnl
 AC_DEFUN([APR_RESTORE_THE_ENVIRONMENT], [
-if test "x$apr_ste_save_$1" = "x"; then
+dnl Check whether $apr_ste_save_$1 is empty or
+dnl only whitespace. The verbatim "X" is token number 1,
+dnl the following whitespace will be ignored.
+set X $apr_ste_save_$1
+if test ${#} -eq 1; then
   $2$1="$$1"
   $1=
 else
   if test "x$apr_ste_save_$1" = "x$$1"; then
     $2$1=
   else
-    $2$1=`echo $$1 | sed -e "s%${apr_ste_save_$1}%%"`
+    $2$1=`echo "$$1" | sed -e "s%${apr_ste_save_$1}%%"`
     $1="$apr_ste_save_$1"
   fi
 fi
@@ -495,12 +499,14 @@ AC_DEFUN([APR_TRY_COMPILE_NO_WARNING],
    CFLAGS="$CFLAGS -Werror"
  fi
  AC_COMPILE_IFELSE(
-  [#include "confdefs.h"
-  ]
-  [[$1]]
-  [int main(int argc, const char *const *argv) {]
-  [[$2]]
-  [   return 0; }],
+  [AC_LANG_SOURCE(
+   [#include "confdefs.h"
+   ]
+   [[$1]]
+   [int main(int argc, const char *const *argv) {]
+   [[$2]]
+   [   return 0; }]
+  )],
   [$3], [$4])
  CFLAGS=$apr_save_CFLAGS
 ])



Mime
View raw message