autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

safer _AC_AM_CONFIG_HEADER_HOOK


From: Ralf Wildenhues
Subject: safer _AC_AM_CONFIG_HEADER_HOOK
Date: Sat, 12 Jan 2008 15:36:09 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

Benoit has a patch cooking for Autoconf that will change the quoting of
the argument passed to _AC_AM_CONFIG_HEADER_HOOK.  Now, as it stands it
won't actually do great harm, but let's play safe and make the macro
more resistant to different quoting styles.

Applied to master and branch-1-10.

Cheers,
Ralf

2008-01-12  Ralf Wildenhues  <address@hidden>

        * m4/init.m4 (_AC_AM_CONFIG_HEADER_HOOK): Rewrite to be more
        resistant to different quoting styles of $1.

diff --git a/m4/init.m4 b/m4/init.m4
index 511073c..3e673db 100644
--- a/m4/init.m4
+++ b/m4/init.m4
@@ -1,13 +1,13 @@
 # Do all the work for Automake.                             -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006 Free Software Foundation, Inc.
+# 2005, 2006, 2008 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 12
+# serial 13
 
 # This macro actually does too much.  Some checks are only needed if
 # your package does certain things.  But this isn't really a big deal.
@@ -112,13 +112,14 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJC],
 # our stamp files there.
 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
 [# Compute $1's index in $config_headers.
+_am_arg=$1
 _am_stamp_count=1
 for _am_header in $config_headers :; do
   case $_am_header in
-    $1 | $1:* )
+    $_am_arg | $_am_arg:* )
       break ;;
     * )
       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
   esac
 done
-echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+echo "timestamp for $_am_arg" 
>`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
diff --git a/tests/Makefile.in b/tests/Makefile.in




reply via email to

[Prev in Thread] Current Thread [Next in Thread]