Improved --with-installation-domain=xxx configure option, and fixed support for installation-domains.conf file

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27414 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicola Pero 2008-12-24 18:11:38 +00:00
parent 10f5aab56a
commit 823e5f0032
5 changed files with 102 additions and 34 deletions

View file

@ -1,3 +1,24 @@
2008-12-24 Nicola Pero <nicola.pero@meta-innovation.com>
* configure.ac: Improved help for --with-installation-domain=xxx.
If no --with-installation-domain=xxx option is used, and
gnustep-config supports the new option
--installation-domain-for=gnustep-base, use it to determine the
installation domain as accurately as possible (including
supporting the environment variable GNUSTEP_INSTALLATION_DOMAIN
and the installation-domains.conf file). Otherwise fall back to
LOCAL. If an invalid installation domain is provided on the
command-line, abort with an error.
* configure: Regenerated.
* GNUmakefile: Set PACKAGE_NAME before importing common.make. Do
not try to set GNUSTEP_BASE_DOMAIN or GNUSTEP_INSTALLATION_DOMAIN.
* Makefile.postamble (before-all): Only check that
GNUSTEP_BASE_DOMAIN matches GNUSTEP_INSTALLATION_DOMAIN on MinGW.
Quote GNUSTEP_BASE_DOMAIN and GNUSTEP_INSTALLATION_DOMAIN to catch
the case when one of them is empty. Added ECHO_NOTHING to the
rule to suppress ugly code output. Print an error message when
reconfiguring automatically.
2008-12-22 Richard Frith-Macdonald <rfm@gnu.org> 2008-12-22 Richard Frith-Macdonald <rfm@gnu.org>
* Version: * Version:

View file

@ -32,18 +32,15 @@ ifeq ($(GNUSTEP_MAKEFILES),)
endif endif
-include config.mak -include config.mak
ifeq ($(GNUSTEP_INSTALLATION_DOMAIN),)
GNUSTEP_INSTALLATION_DOMAIN := LOCAL
endif
ifeq ($(GNUSTEP_BASE_DOMAIN),)
GNUSTEP_BASE_DOMAIN := LOCAL
endif
GNUSTEP_CORE_SOFTWARE = YES GNUSTEP_CORE_SOFTWARE = YES
export GNUSTEP_CORE_SOFTWARE export GNUSTEP_CORE_SOFTWARE
RPM_DISABLE_RELOCATABLE = YES RPM_DISABLE_RELOCATABLE = YES
PACKAGE_NEEDS_CONFIGURE = YES PACKAGE_NEEDS_CONFIGURE = YES
PACKAGE_NAME = gnustep-base
export PACKAGE_NAME
SVN_MODULE_NAME = base SVN_MODULE_NAME = base
SVN_BASE_URL = svn+ssh://svn.gna.org/svn/gnustep/libs SVN_BASE_URL = svn+ssh://svn.gna.org/svn/gnustep/libs
@ -56,9 +53,6 @@ include $(GNUSTEP_MAKEFILES)/common.make
include ./Version include ./Version
PACKAGE_NAME = gnustep-base
export PACKAGE_NAME
# #
# The list of subproject directories # The list of subproject directories
# #

View file

@ -32,12 +32,18 @@
# otherwise the normal makefile rules will not be performed. # otherwise the normal makefile rules will not be performed.
# #
# On MinGW, make sure the domain that we are installing into matches
# the domain that we were configured with. If they don't match, print
# an error message and reconfigure.
ifeq ($(findstring mingw32, $(GNUSTEP_TARGET_OS)), mingw32)
# Things to do before compiling # Things to do before compiling
before-all:: before-all::
if [ $(GNUSTEP_BASE_DOMAIN) != $(GNUSTEP_INSTALLATION_DOMAIN) ]; \ $(ECHO_NOTHING)if [ "$(GNUSTEP_BASE_DOMAIN)" != "$(GNUSTEP_INSTALLATION_DOMAIN)" ]; \
then \ then \
echo "GNUSTEP_INSTALLATION_DOMAIN does not match GNUSTEP_BASE_DOMAIN; reconfiguring"; \
GNUSTEP_INSTALLATION_DOMAIN=$(GNUSTEP_INSTALLATION_DOMAIN) ./config.status --recheck; \ GNUSTEP_INSTALLATION_DOMAIN=$(GNUSTEP_INSTALLATION_DOMAIN) ./config.status --recheck; \
fi fi$(END_ECHO)
endif
# Things to do after compiling # Things to do after compiling
# after-all:: # after-all::

48
configure vendored
View file

@ -914,13 +914,18 @@ Optional Packages:
then the path from --with-config-file or from then the path from --with-config-file or from
the gnustep-make package is used. the gnustep-make package is used.
--with-installation-domain=DOMAIN --with-installation-domain=DOMAIN
Specify the domain (SYSTEM, LOCAL, NETWORK Specify the domain (SYSTEM, LOCAL,
or USER) into which gnustep-base will be installed. This is NETWORK or USER) into which
necessary whenever because relative paths gnustep-base will be installed.
are hardcoded into gnustep-base. If this is not specified, LOCAL Whenever relative paths are hardcoded
is used. Please make sure this matches the DOMAIN where into gnustep-base (at the moment, this
you will be installing gnustep-base to prevent problems happens only on MinGW) this option
with finding resources at runtime. must be used and must match the domain
where you will be installing
gnustep-base.
If this is not specified, the output of
gnustep-config --installation-domain-for=gnustep-base
(which should normally be LOCAL) is used.
--with-include-flags=FLAGS Specify all include flags at once --with-include-flags=FLAGS Specify all include flags at once
--with-library-flags=FLAGS Specify all library flags at once --with-library-flags=FLAGS Specify all library flags at once
--with-ffi-include=PATH Include path for ffi (ffcall/libffi) headers --with-ffi-include=PATH Include path for ffi (ffcall/libffi) headers
@ -1804,9 +1809,25 @@ if test "${with_installation_domain+set}" = set; then
withval="$with_installation_domain" withval="$with_installation_domain"
result="$withval" result="$withval"
else else
result="$GNUSTEP_INSTALLATION_DOMAIN" result="no"
fi; fi;
if test "$result" == "no"
then
# Check if gnustep-config supports the option
# --installation-domain-for, and use it if available. That option
# will automatically use the shell variable GNUSTEP_INSTALLATION_DOMAIN
# or the installation-domains.conf files (or the LOCAL default) as appropriate.
# Otherwise, if that option is not available just fall back to LOCAL.
if (gnustep-config --help | grep installation-domain) >&5 2>&5
then
result=`gnustep-config --installation-domain-for=gnustep-base 2>&5`
else
# This case was added on December 2008 and is only for backwards
# compatibility with older versions of gnustep-make.
result=LOCAL
fi
fi
case "$result" in case "$result" in
SYSTEM) SYSTEM)
echo "$as_me:$LINENO: result: SYSTEM" >&5 echo "$as_me:$LINENO: result: SYSTEM" >&5
@ -1825,11 +1846,14 @@ echo "${ECHO_T}NETWORK" >&6
echo "${ECHO_T}USER" >&6 echo "${ECHO_T}USER" >&6
GNUSTEP_BASE_PATH="$GNUSTEP_USER_TOOLS";; GNUSTEP_BASE_PATH="$GNUSTEP_USER_TOOLS";;
*) *)
echo "$as_me:$LINENO: result: none specified => using LOCAL" >&5 { { echo "$as_me:$LINENO: error: Unknown installation domain '$result' (it should be SYSTEM, LOCAL, NETWORK or USER). Please run configure again with the option --with-installation-domain=LOCAL (or whatever domain you want to install into)." >&5
echo "${ECHO_T}none specified => using LOCAL" >&6 echo "$as_me: error: Unknown installation domain '$result' (it should be SYSTEM, LOCAL, NETWORK or USER). Please run configure again with the option --with-installation-domain=LOCAL (or whatever domain you want to install into)." >&2;}
result=LOCAL; { (exit 1); exit 1; }; }
GNUSTEP_BASE_PATH="$GNUSTEP_LOCAL_TOOLS";; exit 1;;
esac esac
# We store GNUSTEP_BASE_DOMAIN in config.mak so that we can check
# at runtime and make sure it is consistent with the
# GNUSTEP_INSTALLATION_DOMAIN that is used at runtime.
GNUSTEP_BASE_DOMAIN=$result GNUSTEP_BASE_DOMAIN=$result

View file

@ -353,16 +353,37 @@ if test x"$GNUSTEP_USER_DIR_DOC_INFO" = x""; then GNUSTEP_USER_DIR_DOC_INFO=$GNU
AC_MSG_CHECKING([for GNUstep-base installation domain]) AC_MSG_CHECKING([for GNUstep-base installation domain])
AC_ARG_WITH(installation-domain, AC_ARG_WITH(installation-domain,
[ --with-installation-domain=DOMAIN [ --with-installation-domain=DOMAIN
Specify the domain (SYSTEM, LOCAL, NETWORK Specify the domain (SYSTEM, LOCAL,
or USER) into which gnustep-base will be installed. This is NETWORK or USER) into which
necessary whenever because relative paths gnustep-base will be installed.
are hardcoded into gnustep-base. If this is not specified, LOCAL Whenever relative paths are hardcoded
is used. Please make sure this matches the DOMAIN where into gnustep-base (at the moment, this
you will be installing gnustep-base to prevent problems happens only on MinGW) this option
with finding resources at runtime.], must be used and must match the domain
where you will be installing
gnustep-base.
If this is not specified, the output of
gnustep-config --installation-domain-for=gnustep-base
(which should normally be LOCAL) is used.],
result="$withval", result="$withval",
result="$GNUSTEP_INSTALLATION_DOMAIN" result="no"
) )
if test "$result" == "no"
then
# Check if gnustep-config supports the option
# --installation-domain-for, and use it if available. That option
# will automatically use the shell variable GNUSTEP_INSTALLATION_DOMAIN
# or the installation-domains.conf files (or the LOCAL default) as appropriate.
# Otherwise, if that option is not available just fall back to LOCAL.
if (gnustep-config --help | grep installation-domain) >&5 2>&5
then
result=`gnustep-config --installation-domain-for=gnustep-base 2>&5`
else
# This case was added on December 2008 and is only for backwards
# compatibility with older versions of gnustep-make.
result=LOCAL
fi
fi
case "$result" in case "$result" in
SYSTEM) SYSTEM)
AC_MSG_RESULT([SYSTEM]) AC_MSG_RESULT([SYSTEM])
@ -377,10 +398,12 @@ case "$result" in
AC_MSG_RESULT([USER]) AC_MSG_RESULT([USER])
GNUSTEP_BASE_PATH="$GNUSTEP_USER_TOOLS";; GNUSTEP_BASE_PATH="$GNUSTEP_USER_TOOLS";;
*) *)
AC_MSG_RESULT([none specified => using LOCAL]) AC_MSG_ERROR([Unknown installation domain '$result' (it should be SYSTEM, LOCAL, NETWORK or USER). Please run configure again with the option --with-installation-domain=LOCAL (or whatever domain you want to install into).])
result=LOCAL; exit 1;;
GNUSTEP_BASE_PATH="$GNUSTEP_LOCAL_TOOLS";;
esac esac
# We store GNUSTEP_BASE_DOMAIN in config.mak so that we can check
# at runtime and make sure it is consistent with the
# GNUSTEP_INSTALLATION_DOMAIN that is used at runtime.
GNUSTEP_BASE_DOMAIN=$result GNUSTEP_BASE_DOMAIN=$result
AC_SUBST(GNUSTEP_BASE_DOMAIN) AC_SUBST(GNUSTEP_BASE_DOMAIN)