mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
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:
parent
eca1f5a0f2
commit
3f096773cf
3 changed files with 17003 additions and 2863 deletions
|
@ -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:
|
||||
|
|
19
configure.ac
19
configure.ac
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue