From: Pavel Roskin Date: Fri, 10 Nov 2000 15:49:15 +0000 (+0000) Subject: * autoscan.pl (scan_files): Eliminate a warning if no C files X-Git-Tag: autoconf-2.50~440 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fddcd135795035bff076a882a2fb49a821f2185e;p=thirdparty%2Fautoconf.git * autoscan.pl (scan_files): Eliminate a warning if no C files are found. (output): Likewise. Use AC_CONFIG_SRCDIR and AC_CONFIG_FILES instead of old-style arguments for AC_INIT and AC_OUTPUT. --- diff --git a/ChangeLog b/ChangeLog index 4ae9db522..6ea85a205 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2000-11-10 Pavel Roskin + + * autoscan.pl (scan_files): Eliminate a warning if no C files + are found. + (output): Likewise. Use AC_CONFIG_SRCDIR and AC_CONFIG_FILES + instead of old-style arguments for AC_INIT and AC_OUTPUT. + 2000-11-10 Akim Demaille * doc/autoconf.texi (Limitations of Usual Tools): `&' in sed's rhs diff --git a/autoscan.in b/autoscan.in index 6bb8d8037..baf301c02 100644 --- a/autoscan.in +++ b/autoscan.in @@ -151,7 +151,9 @@ sub wanted # that might create nonportabilities. sub scan_files { - $initfile = $cfiles[0]; # Pick one at random. + if (defined $cfiles[0]) { + $initfile = $cfiles[0]; # Pick one at random. + } if ($verbose) { print "cfiles:", join(" ", @cfiles), "\n"; @@ -318,7 +320,10 @@ sub output local (%unique_makefiles); print CONF "# Process this file with autoconf to produce a configure script.\n"; - print CONF "AC_INIT($initfile)\n"; + print CONF "AC_INIT\n"; + if (defined $initfile) { + print CONF "AC_CONFIG_SRCDIR([$initfile])\n"; + } &output_programs; &output_headers; @@ -330,7 +335,9 @@ sub output s/\.in$//; $unique_makefiles{$_}++; } - print CONF "\nAC_OUTPUT([", join("\n ", keys(%unique_makefiles)), "])\n"; + print CONF "\nAC_CONFIG_FILES([", + join("\n ", keys(%unique_makefiles)), "])\n"; + print CONF "AC_OUTPUT\n"; close CONF; } diff --git a/autoscan.pl b/autoscan.pl index 6bb8d8037..baf301c02 100644 --- a/autoscan.pl +++ b/autoscan.pl @@ -151,7 +151,9 @@ sub wanted # that might create nonportabilities. sub scan_files { - $initfile = $cfiles[0]; # Pick one at random. + if (defined $cfiles[0]) { + $initfile = $cfiles[0]; # Pick one at random. + } if ($verbose) { print "cfiles:", join(" ", @cfiles), "\n"; @@ -318,7 +320,10 @@ sub output local (%unique_makefiles); print CONF "# Process this file with autoconf to produce a configure script.\n"; - print CONF "AC_INIT($initfile)\n"; + print CONF "AC_INIT\n"; + if (defined $initfile) { + print CONF "AC_CONFIG_SRCDIR([$initfile])\n"; + } &output_programs; &output_headers; @@ -330,7 +335,9 @@ sub output s/\.in$//; $unique_makefiles{$_}++; } - print CONF "\nAC_OUTPUT([", join("\n ", keys(%unique_makefiles)), "])\n"; + print CONF "\nAC_CONFIG_FILES([", + join("\n ", keys(%unique_makefiles)), "])\n"; + print CONF "AC_OUTPUT\n"; close CONF; } diff --git a/bin/autoscan.in b/bin/autoscan.in index 6bb8d8037..baf301c02 100644 --- a/bin/autoscan.in +++ b/bin/autoscan.in @@ -151,7 +151,9 @@ sub wanted # that might create nonportabilities. sub scan_files { - $initfile = $cfiles[0]; # Pick one at random. + if (defined $cfiles[0]) { + $initfile = $cfiles[0]; # Pick one at random. + } if ($verbose) { print "cfiles:", join(" ", @cfiles), "\n"; @@ -318,7 +320,10 @@ sub output local (%unique_makefiles); print CONF "# Process this file with autoconf to produce a configure script.\n"; - print CONF "AC_INIT($initfile)\n"; + print CONF "AC_INIT\n"; + if (defined $initfile) { + print CONF "AC_CONFIG_SRCDIR([$initfile])\n"; + } &output_programs; &output_headers; @@ -330,7 +335,9 @@ sub output s/\.in$//; $unique_makefiles{$_}++; } - print CONF "\nAC_OUTPUT([", join("\n ", keys(%unique_makefiles)), "])\n"; + print CONF "\nAC_CONFIG_FILES([", + join("\n ", keys(%unique_makefiles)), "])\n"; + print CONF "AC_OUTPUT\n"; close CONF; }