]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
AC_INIT: Use correct value for PACKAGE_TARNAME.
authorJim Meyering <meyering@redhat.com>
Tue, 15 Sep 2009 17:21:21 +0000 (19:21 +0200)
committerJim Meyering <meyering@redhat.com>
Tue, 15 Sep 2009 20:01:54 +0000 (22:01 +0200)
* lib/autoconf/general.m4 (AC_PACKAGE_NAME): Remove what are excess
quotes around the package name, now that m4_tolower's result is quoted.
* tests/base.at (AC_INIT): Test for this.

Signed-off-by: Jim Meyering <meyering@redhat.com>
lib/autoconf/general.m4
tests/base.at

index c11908888d45393e140e52ac4cf61a3d43721dec..bd19e824c934550b47a152cc15a155ad74a09b2b 100644 (file)
@@ -237,7 +237,7 @@ m4_ifndef([AC_PACKAGE_NAME],
 m4_ifndef([AC_PACKAGE_TARNAME],
          [m4_define([AC_PACKAGE_TARNAME],
                     m4_default([$4],
-                               [m4_bpatsubst(m4_tolower(m4_bpatsubst([[[$1]]],
+                               [m4_bpatsubst(m4_tolower(m4_bpatsubst([[$1]],
                                                                     [GNU ])),
                                 [[^_abcdefghijklmnopqrstuvwxyz0123456789]],
                                 [-])]))])
index 5929927d7075888a58c24dd576fb8af0884ef990..a8f8de79e72cbf380a03fa5b8be0649c11510f8d 100644 (file)
@@ -198,6 +198,27 @@ AT_CHECK_CONFIGURE
 AT_CLEANUP
 
 
+## -------- ##
+## AC_INIT. ##
+## -------- ##
+
+# Make sure AC_INIT sets PACKAGE_TARNAME properly.
+
+AT_SETUP([AC_INIT])
+
+AT_DATA([configure.ac],
+[[AC_INIT([GNU fu], [1.0], [bug-fu@gnu.org])
+]])
+
+AT_CHECK_AUTOCONF
+AT_CHECK_CONFIGURE([-q])
+
+# Ensure we get the expected definition:
+AT_CHECK([grep "^PACKAGE_TARNAME='fu'\$" configure], [], [ignore])
+
+AT_CLEANUP
+
+
 ## ---------------- ##
 ## AC_CACHE_CHECK.  ##
 ## ---------------- ##