* 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>
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]],
[-])]))])
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. ##
## ---------------- ##