summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorAlexandre Duret-Lutz <adl@gnu.org>2006-08-04 14:53:32 +0000
committerAlexandre Duret-Lutz <adl@gnu.org>2006-08-04 14:53:32 +0000
commit16e941b2e1f87a44414ab21861f336a5324af6a3 (patch)
tree07785885736a217163f816e27598177e3ecb01e9 /m4
parent2ccd5670a86dd36222ad9090270a963fe1ccdb9a (diff)
downloadautomake-16e941b2e1f87a44414ab21861f336a5324af6a3.tar.gz
automake-16e941b2e1f87a44414ab21861f336a5324af6a3.tar.bz2
automake-16e941b2e1f87a44414ab21861f336a5324af6a3.zip
* m4/init.m4: Suggest fixing the call to AC_INIT when
AC_PACKAGE_NAME or AC_PACKAGE_VERSION is undefined. This is for newcomers who call AC_INIT and AM_INIT_AUTOMAKE without arguments. * tests/init.test: New file. * tests/Makefile.am (TESTS): Add it.
Diffstat (limited to 'm4')
-rw-r--r--m4/Makefile.in1
-rw-r--r--m4/init.m47
2 files changed, 5 insertions, 3 deletions
diff --git a/m4/Makefile.in b/m4/Makefile.in
index c6b1340fd..a6dc9c591 100644
--- a/m4/Makefile.in
+++ b/m4/Makefile.in
@@ -236,7 +236,6 @@ CTAGS:
distdir: $(DISTFILES)
- $(mkdir_p) $(distdir)/../m4
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
diff --git a/m4/init.m4 b/m4/init.m4
index 34fa71681..f66538402 100644
--- a/m4/init.m4
+++ b/m4/init.m4
@@ -1,7 +1,7 @@
# Do all the work for Automake. -*- Autoconf -*-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -53,6 +53,9 @@ m4_ifval([$2],
AC_SUBST([PACKAGE], [$1])dnl
AC_SUBST([VERSION], [$2])],
[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+ [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl