mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
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:
parent
c0187c4e1d
commit
ca4ded25ac
5 changed files with 1772 additions and 3019 deletions
14
ChangeLog
14
ChangeLog
|
@ -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>
|
||||
|
||||
* Source/NSPropertyList.m (BinaryPLGenerator - storeCount:) Handle
|
||||
|
|
|
@ -12,6 +12,9 @@
|
|||
/* Define if constructors are automatically loaded */
|
||||
#undef CON_AUTOLOAD
|
||||
|
||||
/* Built in default value for GNUstep config file */
|
||||
#undef GNUSTEP_TARGET_CONFIG_FILE
|
||||
|
||||
/* Built in default value for GNUstep local root */
|
||||
#undef GNUSTEP_TARGET_LOCAL_ROOT
|
||||
|
||||
|
@ -439,11 +442,9 @@
|
|||
first (like Motorola and SPARC, unlike Intel and VAX). */
|
||||
#undef WORDS_BIGENDIAN
|
||||
|
||||
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||
calls it, or to nothing if 'inline' is not supported under any name. */
|
||||
#ifndef __cplusplus
|
||||
/* Define as `__inline' if that's what the C compiler calls it, or to nothing
|
||||
if it is not supported. */
|
||||
#undef inline
|
||||
#endif
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> does not define. */
|
||||
#undef size_t
|
||||
|
|
|
@ -83,8 +83,8 @@
|
|||
#include <stdio.h>
|
||||
|
||||
/* The global configuration file. The real value is read from config.h */
|
||||
#ifndef GNUSTEP_CONFIG_FILE
|
||||
# define GNUSTEP_CONFIG_FILE /etc/GNUstep/GNUstep.conf
|
||||
#ifndef GNUSTEP_TARGET_CONFIG_FILE
|
||||
# define GNUSTEP_TARGET_CONFIG_FILE "/etc/GNUstep/GNUstep.conf"
|
||||
#endif
|
||||
|
||||
static NSString *gnustep_target_cpu =
|
||||
|
@ -390,8 +390,7 @@ GNUstepConfig(NSDictionary *newConfig)
|
|||
if (file == nil)
|
||||
{
|
||||
fromEnvironment = NO;
|
||||
file = [NSString stringWithCString:
|
||||
STRINGIFY(GNUSTEP_CONFIG_FILE)];
|
||||
file = @GNUSTEP_TARGET_CONFIG_FILE;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -475,11 +474,8 @@ GNUstepConfig(NSDictionary *newConfig)
|
|||
*/
|
||||
if ([conf objectForKey: @"GNUSTEP_USER_CONFIG_FILE"] == nil)
|
||||
{
|
||||
NSString *tmp;
|
||||
|
||||
tmp = [NSString stringWithCString:\
|
||||
STRINGIFY(GNUSTEP_USER_CONFIG_FILE)];
|
||||
[conf setObject: tmp forKey: @"GNUSTEP_USER_CONFIG_FILE"];
|
||||
[conf setObject: @GNUSTEP_TARGET_USER_CONFIG_FILE
|
||||
forKey: @"GNUSTEP_USER_CONFIG_FILE"];
|
||||
}
|
||||
if (config != nil)
|
||||
{
|
||||
|
|
111
configure.ac
111
configure.ac
|
@ -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!])
|
||||
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)
|
||||
#---------------------------------------------------------------------
|
||||
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,
|
||||
[ --with-config-file=PATH Specify path to the GNUstep config file.
|
||||
If unspecified, uses the same value as the
|
||||
GNUstep make package.
|
||||
This is the location to be used by the base
|
||||
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
|
||||
is taken to be relative to the base library
|
||||
linked runtime, not all operating systems
|
||||
|
@ -57,7 +79,7 @@ AC_ARG_WITH(config-file,
|
|||
mingw*)
|
||||
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
|
||||
fi])
|
||||
AC_MSG_RESULT($GNUSTEP_CONFIG_FILE)
|
||||
|
@ -78,7 +100,8 @@ AC_ARG_ENABLE(environment-config-file,
|
|||
for platforms where the path to the base
|
||||
library can't be determined at runtime
|
||||
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="no")
|
||||
if test "$ac_cv_environment_config_file" = "yes"; then
|
||||
|
@ -93,14 +116,20 @@ fi
|
|||
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
case "$target_os" in
|
||||
mingw*)
|
||||
GNUSTEP_SYSTEM_ROOT=./System
|
||||
GNUSTEP_LOCAL_ROOT=./Local
|
||||
GNUSTEP_NETWORK_ROOT=./Local
|
||||
GNUSTEP_SYSTEM_ROOT=./..\\..\\System
|
||||
GNUSTEP_LOCAL_ROOT=./..\\..\\Local
|
||||
GNUSTEP_NETWORK_ROOT=./..\\..\\Local
|
||||
GNUSTEP_USER_DIR=GNUstep
|
||||
GNUSTEP_USER_DEFAULTS_DIR=GNUstep\\Defaults
|
||||
GNUSTEP_USER_CONFIG_FILE=.GNUstep.conf
|
||||
|
@ -147,34 +176,34 @@ then
|
|||
provide default values for the base library
|
||||
to use at runtime if no GNUstep config file
|
||||
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",
|
||||
[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])
|
||||
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
|
||||
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])
|
||||
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 "$GNUSTEP_DEFAULT_CONFIG" != ""; then
|
||||
#
|
||||
# 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])
|
||||
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
|
||||
|
||||
#
|
||||
# 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
|
||||
# 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,
|
||||
"$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
|
||||
#--------------------------------------------------------------------
|
||||
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([])
|
||||
#
|
||||
# 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"
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Find the compiler
|
||||
|
|
Loading…
Reference in a new issue