make sourcing of config file more reliable

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34017 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2011-10-17 18:49:16 +00:00
parent eca1f5a0f2
commit 3f096773cf
3 changed files with 17003 additions and 2863 deletions

View file

@ -1,3 +1,8 @@
2011-10-17 Richard Frith-Macdonald <rfm@gnu.org>
* configure.ac: Make sourcing of default config file more reliable.
* configure: regenerate.
2011-10-17 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSBundle.m:

19842
configure vendored

File diff suppressed because it is too large Load diff

View file

@ -306,12 +306,16 @@ then
# Only try importing if the default config file has been specified.
#
if test "$GNUSTEP_DEFAULT_CONFIG" != ""; then
# Make sure we have a slash in the path so that '.' will source it
case $GNUSTEP_DEFAULT_CONFIG in
/*) ;;
*) GNUSTEP_DEFAULT_CONFIG="./$GNUSTEP_DEFAULT_CONFIG" ;;
esac
#
# Use the default config file to override standard values.
#
if test ! -f "$GNUSTEP_DEFAULT_CONFIG"; then
AC_MSG_RESULT([fail: file "$GNUSTEP_DEFAULT_CONFIG" does not exist])
# Ohoh ... things are not going well. We are asked to import
# a config file that doesn't exist. So all paths might be unset
# and who knows what we'll end up hardcoding into gnustep-base.
@ -322,11 +326,18 @@ then
# a config file (eg, they don't have one and they don't care about
# the hardcoded paths) they should just say so. ;-)
AC_MSG_ERROR([Please run configure again with the --disable-importing-config-file option or specifying an alternative file using the --with-default-config= option])
exit 1
else
AC_MSG_RESULT([trying to import "$GNUSTEP_DEFAULT_CONFIG"])
AC_MSG_NOTICE([If this fails, please run configure again with the --disable-importing-config-file option or specifying an alternative file using the --with-default-config= option])
. "$GNUSTEP_DEFAULT_CONFIG"
if test -r "$GNUSTEP_DEFAULT_CONFIG"
then
AC_MSG_NOTICE([If this fails, please run configure again with the --disable-importing-config-file option or specifying an alternative file using the --with-default-config= option])
. "$GNUSTEP_DEFAULT_CONFIG"
else
AC_MSG_RESULT([fail: file "$GNUSTEP_DEFAULT_CONFIG" is not readable])
AC_MSG_ERROR([Unable to import configuration file at $GNUSTEP_DEFAULT_CONFIG. Please run configure again with a revised/corrected --with-default-config= option or with --disable-importing-config-file.])
exit 1
fi
fi
fi
fi