Index: configure.ac =================================================================== --- configure.ac (revision 24410) +++ configure.ac (working copy) @@ -224,6 +224,21 @@ AC_SUBST(GNUSTEP_CONFIG_FILE) #--------------------------------------------------------------------- +# location of gnustep-config path +#--------------------------------------------------------------------- + +AC_MSG_CHECKING([gnustep-config path location]) +AC_ARG_WITH(config-bindir,[ +--with-config-bindir=PATH +The location to install the gnustep-config binary], +GNUSTEP_CONFIG_BIN_DIR=$withval,GNUSTEP_CONFIG_BIN_DIR=no) +if test "$GNUSTEP_CONFIG_BIN_DIR" = "" -o "$GNUSTEP_CONFIG_BIN_DIR" = "no"; then +GNUSTEP_CONFIG_BIN_DIR="/usr/local/bin/"; +fi +AC_MSG_RESULT($GNUSTEP_CONFIG_BIN_DIR) +AC_SUBST(GNUSTEP_CONFIG_BIN_DIR) + +#--------------------------------------------------------------------- # Now read/import the existing configuration file, if any #--------------------------------------------------------------------- @@ -1060,7 +1075,7 @@ #-------------------------------------------------------------------- AC_CONFIG_FILES([config-noarch.make config.make openapp opentool executable.template GNUmakefile GNUstep.conf GNUstep.sh GNUstep.csh fixpath.sh -gnustep-make.spec]) +gnustep-make.spec gnustep-config]) AC_CONFIG_COMMANDS([default], [[chmod a+x openapp opentool fixpath.sh executable.template]], [[]]) Index: gnustep-config.in =================================================================== --- gnustep-config.in (revision 0) +++ gnustep-config.in (revision 0) @@ -0,0 +1,58 @@ +#!/bin/sh + +if [ $# -lt 1 ]; then +echo "$0: argument required."; +fi + +# Determine the location of the system configuration file +if [ -z "$GNUSTEP_CONFIG_FILE" ]; then + address@hidden@ +fi + +# Determine the location of the user configuration file +if [ -z "$GNUSTEP_USER_CONFIG_FILE" ]; then + address@hidden@ +fi + +# Read the system configuration file +if [ -f "$GNUSTEP_CONFIG_FILE" ]; then + . "$GNUSTEP_CONFIG_FILE" +fi + +# Read the user configuration file ... unless it is disabled (ie, set +# to an empty string) +if [ -n "$GNUSTEP_USER_CONFIG_FILE" ]; then + case "$GNUSTEP_USER_CONFIG_FILE" in + /*) # An absolute path + if [ -f "$GNUSTEP_USER_CONFIG_FILE" ]; then + . "$GNUSTEP_USER_CONFIG_FILE" + fi;; + *) # Something else + if [ -f "$GNUSTEP_HOME/$GNUSTEP_USER_CONFIG_FILE" ]; then + . "$GNUSTEP_HOME/$GNUSTEP_USER_CONFIG_FILE" + fi;; + esac +fi + + +case "$1" in --makefiles) + echo $GNUSTEP_SYSTEM_ROOT/Library/Makefiles; + exit + ;; +--system-root) + echo $GNUSTEP_SYSTEM_ROOT + exit + ;; +--local-root) + echo $GNUSTEP_LOCAL_ROOT + exit + ;; +--network-root) + echo $GNUSTEP_NETWORK_ROOT + exit + ;; +--user-root) + echo ~/$GNUSTEP_USER_DIR + exit + ;; +esac Index: GNUmakefile.in =================================================================== --- GNUmakefile.in (revision 24410) +++ GNUmakefile.in (working copy) @@ -141,7 +141,8 @@ $(makedir)/Master \ $(makedir)/Instance \ $(makedir)/Instance/Shared \ - $(makedir)/Instance/Documentation) + $(makedir)/Instance/Documentation \ + @GNUSTEP_CONFIG_BIN_DIR@) $(EC)(echo "Installing GNUstep configuration file in $(GNUSTEP_CONFIG_FILE)"; \ $(srcdir)/mkinstalldirs "$(GNUSTEP_CONFIG_FILE_DIR)"; \ $(INSTALL_DATA) GNUstep.conf "$(GNUSTEP_CONFIG_FILE)") @@ -159,7 +160,8 @@ $(INSTALL_PROGRAM) -m 755 GNUstep.csh $(makedir); \ $(INSTALL_PROGRAM) -m 755 fixpath.sh $(makedir); \ $(INSTALL_PROGRAM) -m 755 openapp $(tooldir); \ - $(INSTALL_PROGRAM) -m 755 opentool $(tooldir)) + $(INSTALL_PROGRAM) -m 755 opentool $(tooldir); \ + $(INSTALL_PROGRAM) -m 755 gnustep-config @GNUSTEP_CONFIG_BIN_DIR@) $(EC)(echo "Installing makefiles"; \ for f in $(MAKE_FILES); do \ $(INSTALL_DATA) $(srcdir)/$$f $(makedir); \