diff --git a/ChangeLog b/ChangeLog index ad5f9597e..a682423af 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,24 @@ +2008-12-24 Nicola Pero + + * 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 * Version: diff --git a/GNUmakefile b/GNUmakefile index 511015ea5..dabb10cea 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -32,18 +32,15 @@ ifeq ($(GNUSTEP_MAKEFILES),) endif -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 export GNUSTEP_CORE_SOFTWARE RPM_DISABLE_RELOCATABLE = YES PACKAGE_NEEDS_CONFIGURE = YES +PACKAGE_NAME = gnustep-base +export PACKAGE_NAME + SVN_MODULE_NAME = base SVN_BASE_URL = svn+ssh://svn.gna.org/svn/gnustep/libs @@ -56,9 +53,6 @@ include $(GNUSTEP_MAKEFILES)/common.make include ./Version -PACKAGE_NAME = gnustep-base -export PACKAGE_NAME - # # The list of subproject directories # diff --git a/Makefile.postamble b/Makefile.postamble index 71e656ff5..bf4f28ae4 100644 --- a/Makefile.postamble +++ b/Makefile.postamble @@ -32,12 +32,18 @@ # 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 before-all:: - if [ $(GNUSTEP_BASE_DOMAIN) != $(GNUSTEP_INSTALLATION_DOMAIN) ]; \ + $(ECHO_NOTHING)if [ "$(GNUSTEP_BASE_DOMAIN)" != "$(GNUSTEP_INSTALLATION_DOMAIN)" ]; \ then \ + echo "GNUSTEP_INSTALLATION_DOMAIN does not match GNUSTEP_BASE_DOMAIN; reconfiguring"; \ GNUSTEP_INSTALLATION_DOMAIN=$(GNUSTEP_INSTALLATION_DOMAIN) ./config.status --recheck; \ - fi + fi$(END_ECHO) +endif # Things to do after compiling # after-all:: diff --git a/configure b/configure index 4937fbc42..9b49e9ef9 100755 --- a/configure +++ b/configure @@ -914,13 +914,18 @@ Optional Packages: then the path from --with-config-file or from the gnustep-make package is used. --with-installation-domain=DOMAIN -Specify the domain (SYSTEM, LOCAL, NETWORK -or USER) into which gnustep-base will be installed. This is -necessary whenever because relative paths -are hardcoded into gnustep-base. If this is not specified, LOCAL -is used. Please make sure this matches the DOMAIN where -you will be installing gnustep-base to prevent problems -with finding resources at runtime. + Specify the domain (SYSTEM, LOCAL, + NETWORK or USER) into which + gnustep-base will be installed. + Whenever relative paths are hardcoded + into gnustep-base (at the moment, this + happens only on MinGW) this option + 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-library-flags=FLAGS Specify all library flags at once --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" result="$withval" else - result="$GNUSTEP_INSTALLATION_DOMAIN" + result="no" 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 SYSTEM) echo "$as_me:$LINENO: result: SYSTEM" >&5 @@ -1825,11 +1846,14 @@ echo "${ECHO_T}NETWORK" >&6 echo "${ECHO_T}USER" >&6 GNUSTEP_BASE_PATH="$GNUSTEP_USER_TOOLS";; *) - echo "$as_me:$LINENO: result: none specified => using LOCAL" >&5 -echo "${ECHO_T}none specified => using LOCAL" >&6 - result=LOCAL; - GNUSTEP_BASE_PATH="$GNUSTEP_LOCAL_TOOLS";; + { { 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 "$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;} + { (exit 1); exit 1; }; } + exit 1;; 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 diff --git a/configure.ac b/configure.ac index 2bf3c0746..3d94f5bd9 100644 --- a/configure.ac +++ b/configure.ac @@ -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_ARG_WITH(installation-domain, [ --with-installation-domain=DOMAIN -Specify the domain (SYSTEM, LOCAL, NETWORK -or USER) into which gnustep-base will be installed. This is -necessary whenever because relative paths -are hardcoded into gnustep-base. If this is not specified, LOCAL -is used. Please make sure this matches the DOMAIN where -you will be installing gnustep-base to prevent problems -with finding resources at runtime.], + Specify the domain (SYSTEM, LOCAL, + NETWORK or USER) into which + gnustep-base will be installed. + Whenever relative paths are hardcoded + into gnustep-base (at the moment, this + happens only on MinGW) this option + 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="$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 SYSTEM) AC_MSG_RESULT([SYSTEM]) @@ -377,10 +398,12 @@ case "$result" in AC_MSG_RESULT([USER]) GNUSTEP_BASE_PATH="$GNUSTEP_USER_TOOLS";; *) - AC_MSG_RESULT([none specified => using LOCAL]) - result=LOCAL; - GNUSTEP_BASE_PATH="$GNUSTEP_LOCAL_TOOLS";; + 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).]) + exit 1;; 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 AC_SUBST(GNUSTEP_BASE_DOMAIN)