diff options
author | Alexandre Duret-Lutz <adl@gnu.org> | 2006-08-04 14:53:32 +0000 |
---|---|---|
committer | Alexandre Duret-Lutz <adl@gnu.org> | 2006-08-04 14:53:32 +0000 |
commit | 16e941b2e1f87a44414ab21861f336a5324af6a3 (patch) | |
tree | 07785885736a217163f816e27598177e3ecb01e9 /m4/init.m4 | |
parent | 2ccd5670a86dd36222ad9090270a963fe1ccdb9a (diff) | |
download | automake-16e941b2e1f87a44414ab21861f336a5324af6a3.tar.gz |
* 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/init.m4')
-rw-r--r-- | m4/init.m4 | 7 |
1 files changed, 5 insertions, 2 deletions
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 |