]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
DJGPP fix: do not try to source /dev/null as cache or site file.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 13 Sep 2009 19:15:10 +0000 (21:15 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 14 Sep 2009 17:32:55 +0000 (19:32 +0200)
* lib/autoconf/general.m4 (AC_SITE_LOAD, AC_CACHE_LOAD): Do not
load the cache or site file if it is `/dev/null', as DJGPP treats
it as a regular file, but the shell then warns about it later.
Fixes several test suite failures on DJGPP.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
lib/autoconf/general.m4

index 7faf75901c56b63020abcf12371a5817f544e9be..1617ee420cbf5a5163d80424ce6806df961dcd45 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2009-09-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
+       DJGPP fix: do not try to source /dev/null as cache or site file.
+       * lib/autoconf/general.m4 (AC_SITE_LOAD, AC_CACHE_LOAD): Do not
+       load the cache or site file if it is `/dev/null', as DJGPP treats
+       it as a regular file, but the shell then warns about it later.
+       Fixes several test suite failures on DJGPP.
+
        testsuite: pass $configure_options to configure invocations.
        * tests/local.at (AT_CHECK_CONFIGURE): Add $configure_options
        to configure command line.
index 4e5cddbe3e77d6ed18241814b13aeb12f27abe7f..43b5e235f6bee4e53770482b025bb18fb9aa07c8 100644 (file)
@@ -1874,7 +1874,7 @@ fi
 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
 do
   test "x$ac_site_file" = xNONE && continue
-  if test -r "$ac_site_file"; then
+  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
     AC_MSG_NOTICE([loading site script $ac_site_file])
     sed 's/^/| /' "$ac_site_file" >&AS_MESSAGE_LOG_FD
     . "$ac_site_file"
@@ -1887,9 +1887,9 @@ done
 # -------------
 m4_define([AC_CACHE_LOAD],
 [if test -r "$cache_file"; then
-  # Some versions of bash will fail to source /dev/null (special
-  # files actually), so we avoid doing that.
-  if test -f "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special files
+  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
+  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
     AC_MSG_NOTICE([loading cache $cache_file])
     case $cache_file in
       [[\\/]]* | ?:[[\\/]]* ) . "$cache_file";;