General mingw improvements

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@22261 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2006-01-08 12:59:11 +00:00
parent 23d5a370a8
commit bcd2a93d27
5 changed files with 1772 additions and 3019 deletions

View file

@ -1,3 +1,17 @@
2006-01-08 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSPathUtilities.m: be more consistent in use of defined values
from config file.
* configure.in: Improve comments/help. Fix error in config where we
were attempting OS based decisions before we had determined the OS.
Improve default paths on mingw to be relative to the DLL.
Load information from make package config fo use during build of
base library.
Generally try to improve user experience on mingw to make build/install
really simple with new config files.
* configure: regenerate
* Headers/Additions/GNUstepBase/config.h.in: regenerate
2006-01-07 Fred Kiefer <FredKiefer@gmx.de> 2006-01-07 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSPropertyList.m (BinaryPLGenerator - storeCount:) Handle * Source/NSPropertyList.m (BinaryPLGenerator - storeCount:) Handle

View file

@ -12,6 +12,9 @@
/* Define if constructors are automatically loaded */ /* Define if constructors are automatically loaded */
#undef CON_AUTOLOAD #undef CON_AUTOLOAD
/* Built in default value for GNUstep config file */
#undef GNUSTEP_TARGET_CONFIG_FILE
/* Built in default value for GNUstep local root */ /* Built in default value for GNUstep local root */
#undef GNUSTEP_TARGET_LOCAL_ROOT #undef GNUSTEP_TARGET_LOCAL_ROOT
@ -439,11 +442,9 @@
first (like Motorola and SPARC, unlike Intel and VAX). */ first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN #undef WORDS_BIGENDIAN
/* Define to `__inline__' or `__inline' if that's what the C compiler /* Define as `__inline' if that's what the C compiler calls it, or to nothing
calls it, or to nothing if 'inline' is not supported under any name. */ if it is not supported. */
#ifndef __cplusplus
#undef inline #undef inline
#endif
/* Define to `unsigned' if <sys/types.h> does not define. */ /* Define to `unsigned' if <sys/types.h> does not define. */
#undef size_t #undef size_t

View file

@ -83,8 +83,8 @@
#include <stdio.h> #include <stdio.h>
/* The global configuration file. The real value is read from config.h */ /* The global configuration file. The real value is read from config.h */
#ifndef GNUSTEP_CONFIG_FILE #ifndef GNUSTEP_TARGET_CONFIG_FILE
# define GNUSTEP_CONFIG_FILE /etc/GNUstep/GNUstep.conf # define GNUSTEP_TARGET_CONFIG_FILE "/etc/GNUstep/GNUstep.conf"
#endif #endif
static NSString *gnustep_target_cpu = static NSString *gnustep_target_cpu =
@ -390,8 +390,7 @@ GNUstepConfig(NSDictionary *newConfig)
if (file == nil) if (file == nil)
{ {
fromEnvironment = NO; fromEnvironment = NO;
file = [NSString stringWithCString: file = @GNUSTEP_TARGET_CONFIG_FILE;
STRINGIFY(GNUSTEP_CONFIG_FILE)];
} }
/* /*
@ -475,11 +474,8 @@ GNUstepConfig(NSDictionary *newConfig)
*/ */
if ([conf objectForKey: @"GNUSTEP_USER_CONFIG_FILE"] == nil) if ([conf objectForKey: @"GNUSTEP_USER_CONFIG_FILE"] == nil)
{ {
NSString *tmp; [conf setObject: @GNUSTEP_TARGET_USER_CONFIG_FILE
forKey: @"GNUSTEP_USER_CONFIG_FILE"];
tmp = [NSString stringWithCString:\
STRINGIFY(GNUSTEP_USER_CONFIG_FILE)];
[conf setObject: tmp forKey: @"GNUSTEP_USER_CONFIG_FILE"];
} }
if (config != nil) if (config != nil)
{ {

4643
configure vendored

File diff suppressed because it is too large Load diff

View file

@ -35,14 +35,36 @@ if test -z "$GNUSTEP_MAKEFILES"; then
AC_MSG_ERROR([You must have the gnustep-make package installed and set up the GNUSTEP_MAKEFILES environment variable to contain the path to the makefiles directory before configuring!]) AC_MSG_ERROR([You must have the gnustep-make package installed and set up the GNUSTEP_MAKEFILES environment variable to contain the path to the makefiles directory before configuring!])
fi fi
#--------------------------------------------------------------------
# Use config.guess, config.sub and install-sh provided by gnustep-make
#--------------------------------------------------------------------
AC_CONFIG_AUX_DIR($GNUSTEP_MAKEFILES)
#--------------------------------------------------------------------
# Use a .h file with #define's, instead of -D command-line switches
#--------------------------------------------------------------------
AC_CONFIG_HEADER(Headers/Additions/GNUstepBase/config.h)
#--------------------------------------------------------------------
# Determine the host, build, and target systems
#--------------------------------------------------------------------
AC_CANONICAL_TARGET([])
#--------------------------------------------------------------------- #---------------------------------------------------------------------
# Location of the GNUstep.conf config file (--with-config-file) # Location of the GNUstep.conf config file (--with-config-file)
#--------------------------------------------------------------------- #---------------------------------------------------------------------
AC_MSG_CHECKING([for GNUstep configuration file to use]) AC_MSG_CHECKING([for GNUstep configuration file to use])
GNUSTEP_MAKE_CONFIG=`grep '^GNUSTEP_CONFIG_FILE *=' $GNUSTEP_MAKEFILES/config.make | sed -e 's/GNUSTEP_CONFIG_FILE *= *\(.*\)/\1/'`
AC_ARG_WITH(config-file, AC_ARG_WITH(config-file,
[ --with-config-file=PATH Specify path to the GNUstep config file. [ --with-config-file=PATH Specify path to the GNUstep config file.
If unspecified, uses the same value as the This is the location to be used by the base
GNUstep make package. library to locate oath information at
application or tool runtime.
If unspecified, this uses the same value as
the GNUstep make package on unix-like systems,
but uses ./GNUstep.conf on mingw so that
it is relative to the location of the
base library DLL.
If a leading './' is specified, the path If a leading './' is specified, the path
is taken to be relative to the base library is taken to be relative to the base library
linked runtime, not all operating systems linked runtime, not all operating systems
@ -57,7 +79,7 @@ AC_ARG_WITH(config-file,
mingw*) mingw*)
GNUSTEP_CONFIG_FILE=./GNUstep.conf ;; GNUSTEP_CONFIG_FILE=./GNUstep.conf ;;
*) *)
GNUSTEP_CONFIG_FILE=`grep '^GNUSTEP_CONFIG_FILE *=' $GNUSTEP_MAKEFILES/config.make | sed -e 's/GNUSTEP_CONFIG_FILE *= *\(.*\)/\1/'` ;; GNUSTEP_CONFIG_FILE="$GNUSTEP_MAKE_CONFIG" ;;
esac esac
fi]) fi])
AC_MSG_RESULT($GNUSTEP_CONFIG_FILE) AC_MSG_RESULT($GNUSTEP_CONFIG_FILE)
@ -78,7 +100,8 @@ AC_ARG_ENABLE(environment-config-file,
for platforms where the path to the base for platforms where the path to the base
library can't be determined at runtime library can't be determined at runtime
and the leading './' in the config file name and the leading './' in the config file name
is therefore not supported.], is therefore not supported.
Normally this should be left disabled.],
ac_cv_environment_config_file=$enableval, ac_cv_environment_config_file=$enableval,
ac_cv_environment_config_file="no") ac_cv_environment_config_file="no")
if test "$ac_cv_environment_config_file" = "yes"; then if test "$ac_cv_environment_config_file" = "yes"; then
@ -93,14 +116,20 @@ fi
# #
# Set 'standard' defaults for values from configuration file. # Set 'standard' defaults for values from configuration file.
# On mingw, we assume paths for an isolated, standalone, relocatable package. #
# On mingw, we assume paths relative to the location of the base library -
# Normally that DLL is stored in the Tools directory of the System domain,
# so we assume a standard layout relative to that. For standalone deployment
# you may want everything in the same directory, in which case the paths for
# the domains relative to the DLL need to be modified.
#
# On unix we assume a standard layout for both development and distribution. # On unix we assume a standard layout for both development and distribution.
# #
case "$target_os" in case "$target_os" in
mingw*) mingw*)
GNUSTEP_SYSTEM_ROOT=./System GNUSTEP_SYSTEM_ROOT=./..\\..\\System
GNUSTEP_LOCAL_ROOT=./Local GNUSTEP_LOCAL_ROOT=./..\\..\\Local
GNUSTEP_NETWORK_ROOT=./Local GNUSTEP_NETWORK_ROOT=./..\\..\\Local
GNUSTEP_USER_DIR=GNUstep GNUSTEP_USER_DIR=GNUstep
GNUSTEP_USER_DEFAULTS_DIR=GNUstep\\Defaults GNUSTEP_USER_DEFAULTS_DIR=GNUstep\\Defaults
GNUSTEP_USER_CONFIG_FILE=.GNUstep.conf GNUSTEP_USER_CONFIG_FILE=.GNUstep.conf
@ -147,34 +176,34 @@ then
provide default values for the base library provide default values for the base library
to use at runtime if no GNUstep config file to use at runtime if no GNUstep config file
is found at runtime. If this is not specified is found at runtime. If this is not specified
then the path from --with-config-file is used.], then the path from --with-config-file or from
the gnustep-make pacakage is used.],
GNUSTEP_DEFAULT_CONFIG="$withval", GNUSTEP_DEFAULT_CONFIG="$withval",
[if test "$GNUSTEP_DEFAULT_CONFIG" = ""; then [if test "$GNUSTEP_DEFAULT_CONFIG" = ""; then
GNUSTEP_DEFAULT_CONFIG="$GNUSTEP_CONFIG_FILE" if test -f "$GNUSTEP_CONFIG_FILE"; then
GNUSTEP_DEFAULT_CONFIG="$GNUSTEP_CONFIG_FILE"
fi
fi]) fi])
AC_MSG_RESULT($GNUSTEP_DEFAULT_CONFIG) AC_MSG_RESULT($GNUSTEP_DEFAULT_CONFIG)
# #
# Use the default config file to override standard values. # Only try importing if the default config file has been specified.
# #
if test ! -f "$GNUSTEP_DEFAULT_CONFIG"; then if test "$GNUSTEP_DEFAULT_CONFIG" != ""; then
AC_MSG_RESULT([fail: file "$GNUSTEP_DEFAULT_CONFIG" does not exist]) #
AC_MSG_NOTICE([Please run configure again with the --disable-importing-config-file option or specifying an alternative file using the --with-default-config= option]) # Use the default config file to override standard values.
else #
AC_MSG_RESULT([trying to import "$GNUSTEP_DEFAULT_CONFIG"]) if test ! -f "$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]) AC_MSG_RESULT([fail: file "$GNUSTEP_DEFAULT_CONFIG" does not exist])
. "$GNUSTEP_DEFAULT_CONFIG" AC_MSG_NOTICE([Please run configure again with the --disable-importing-config-file option or specifying an alternative file using the --with-default-config= option])
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"
fi
fi fi
fi fi
#
# Add standard library and header directories for configure to use to locate
# plain C developer headers/libraries which haver been installed in the
# GNUstep hierarchy.
#
CPPFLAGS="$CPPFLAGS -I$GNUSTEP_SYSTEM_ROOT/Library/Headers"
LDFLAGS="$LDFLAGS -L$GNUSTEP_SYSTEM_ROOT/Library/Libraries"
# #
# Set the default configuration file values in config.h to be hard-coded # Set the default configuration file values in config.h to be hard-coded
# into NSPathUtilities.m # into NSPathUtilities.m
@ -203,22 +232,24 @@ GNUSTEP_USER_CONFIG_FILE=`echo $GNUSTEP_USER_CONFIG_FILE|sed -e 's/\\\\/\\\\\\\\
AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_USER_CONFIG_FILE, AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_USER_CONFIG_FILE,
"$GNUSTEP_USER_CONFIG_FILE", "$GNUSTEP_USER_CONFIG_FILE",
[Built in default value for GNUstep user config file]) [Built in default value for GNUstep user config file])
GNUSTEP_CONFIG_FILE=`echo $GNUSTEP_CONFIG_FILE|sed -e 's/\\\\/\\\\\\\\/g'`
AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_CONFIG_FILE,
"$GNUSTEP_CONFIG_FILE",
[Built in default value for GNUstep config file])
#
# Now load the values to be used in locating libraries etc used when
# building the base library ... as supplied by the gnustep-make package
#
. "$GNUSTEP_MAKE_CONFIG"
#-------------------------------------------------------------------- #
# Use config.guess, config.sub and install-sh provided by gnustep-make # Add standard library and header directories for configure to use to locate
#-------------------------------------------------------------------- # plain C developer headers/libraries which haver been installed in the
AC_CONFIG_AUX_DIR($GNUSTEP_MAKEFILES) # GNUstep hierarchy.
#
#-------------------------------------------------------------------- CPPFLAGS="$CPPFLAGS -I$GNUSTEP_SYSTEM_ROOT/Library/Headers"
# Use a .h file with #define's, instead of -D command-line switches LDFLAGS="$LDFLAGS -L$GNUSTEP_SYSTEM_ROOT/Library/Libraries"
#--------------------------------------------------------------------
AC_CONFIG_HEADER(Headers/Additions/GNUstepBase/config.h)
#--------------------------------------------------------------------
# Determine the host, build, and target systems
#--------------------------------------------------------------------
AC_CANONICAL_TARGET([])
#-------------------------------------------------------------------- #--------------------------------------------------------------------
# Find the compiler # Find the compiler