The following commit has been merged in the master branch:
commit 430c20759f8127c6690b33dd4f877f3acc20d31e
Author: Guillem Jover <[email protected]>
Date:   Sun Oct 4 15:12:47 2009 +0200

    build: Properly escape DPKG_CHECK_DECL and DPKG_CHECK_DEFINE arguments
    
    Use AS_TR_SH for shell variables and AS_TR_CPP for variables used in
    headers or Makefiles.

diff --git a/m4/types.m4 b/m4/types.m4
index 2f9667b..f4f52f8 100644
--- a/m4/types.m4
+++ b/m4/types.m4
@@ -29,7 +29,7 @@ AC_CHECK_DECLS([sys_siglist],,,
 AC_DEFUN([DPKG_CHECK_DECL],
 [
   AC_CHECK_DECL($1,
-                [AC_DEFINE([HAVE_]$1, 1,
+                [AC_DEFINE([HAVE_]AS_TR_CPP($1), 1,
                            [Define to 1 if ']$1[' is declared in <$2>])],,
                 [[#include <$2>]])
 ])# DPKG_CHECK_DECL
@@ -38,13 +38,14 @@ AC_DEFUN([DPKG_CHECK_DECL],
 # -------------------------------------
 # Defines HAVE_DEFINE to 1 if declared in HEADER, 0 otherwise
 AC_DEFUN([DPKG_CHECK_DEFINE],
-[AC_CACHE_CHECK([whether $1 is defined in $2], [dpkg_cv_define_$1],
+[AC_CACHE_CHECK([whether $1 is defined in $2], [dpkg_cv_define_]AS_TR_SH($1),
 [AC_COMPILE_IFELSE(
        [AC_LANG_PROGRAM([[#include <$2>]], [[int i = $1;]])],
-       [dpkg_cv_define_$1=yes],
-       [dpkg_cv_define_$1=no])])
-AS_IF([test "x$dpkg_cv_define_$1" = "xyes"],
-       [AC_DEFINE([HAVE_]$1, 1, [Define to 1 if you have the macro ']$1[' in
-                                 <$2>, and to 0 if you don't.])],
-       [AC_DEFINE([HAVE_]$1, 0)])[]dnl
+       [dpkg_cv_define_]AS_TR_SH($1)[=yes],
+       [dpkg_cv_define_]AS_TR_SH($1)[=no])])
+AS_IF([test "x$dpkg_cv_define_[]AS_TR_SH($1)" = "xyes"],
+       [AC_DEFINE([HAVE_]AS_TR_CPP($1), 1,
+                  [Define to 1 if you have the macro ']$1[' in <$2>,
+                   and to 0 if you don't.])],
+       [AC_DEFINE([HAVE_]AS_TR_CPP($1), 0)])[]dnl
 ])# DPKG_CHECK_DEFINE

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to