From: Ralf Wildenhues Date: Sun, 13 Sep 2009 19:15:10 +0000 (+0200) Subject: DJGPP fix: do not try to source /dev/null as cache or site file. X-Git-Tag: v2.65~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d9226f650cfce1dd1e7aaa3d905d24aed8de88eb;p=thirdparty%2Fautoconf.git 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. Signed-off-by: Ralf Wildenhues --- diff --git a/ChangeLog b/ChangeLog index 7faf7590..1617ee42 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2009-09-14 Ralf Wildenhues + 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. diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 4e5cddbe..43b5e235 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -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";;