From: Jim Meyering Date: Tue, 15 Sep 2009 17:21:21 +0000 (+0200) Subject: AC_INIT: Use correct value for PACKAGE_TARNAME. X-Git-Tag: v2.65~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=44483f024289095945e7430d020121704bc8fb46;p=thirdparty%2Fautoconf.git AC_INIT: Use correct value for PACKAGE_TARNAME. * 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 --- diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index c1190888..bd19e824 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -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]], [-])]))]) diff --git a/tests/base.at b/tests/base.at index 5929927d..a8f8de79 100644 --- a/tests/base.at +++ b/tests/base.at @@ -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. ## ## ---------------- ##