Updated NSPathUtilities to support the new filesystem stuff

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@24587 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
nicola 2007-02-15 03:06:33 +00:00
parent e3da9fdc33
commit fbda09ef24
5 changed files with 1066 additions and 271 deletions

View file

@ -1,3 +1,18 @@
2007-02-15 Nicola Pero <nicola.pero@meta-innovation.com>
Important: do not update from trunk if you need stability.
* Source/NSPathUtilities.m: Updated all the path routines to work
with the new filesystem support, reading and managing the new
variables.
* configure.ac: Updated for the new filesystem support: prepare
for NSPathUtilities.m default values for all the new variables.
Make sure to avoid config files overwriting our current
GNUSTEP_MAKEFILES variable.
* configure: Regenerated.
* Headers/Additions/GNUstepBase/config.h.in: Regenerated using
autoheaders to get all the new filesystem default variable
definitions.
2007-02-14 Nicola Pero <nicola.pero@meta-innovation.com> 2007-02-14 Nicola Pero <nicola.pero@meta-innovation.com>
* configure.ac (GNUSTEP_MAKE_CONFIG): Output errors to config.log * configure.ac (GNUSTEP_MAKE_CONFIG): Output errors to config.log

View file

@ -15,15 +15,90 @@
/* Built in default value for GNUstep config file */ /* Built in default value for GNUstep config file */
#undef GNUSTEP_TARGET_CONFIG_FILE #undef GNUSTEP_TARGET_CONFIG_FILE
/* Built in default value for GNUstep local apps */
#undef GNUSTEP_TARGET_LOCAL_APPS
/* Built in default value for GNUstep local documentation */
#undef GNUSTEP_TARGET_LOCAL_DOCUMENTATION
/* Built in default value for GNUstep local info documentation */
#undef GNUSTEP_TARGET_LOCAL_DOCUMENTATION_INFO
/* Built in default value for GNUstep local manpages documentation */
#undef GNUSTEP_TARGET_LOCAL_DOCUMENTATION_MAN
/* Built in default value for GNUstep local headers */
#undef GNUSTEP_TARGET_LOCAL_HEADERS
/* Built in default value for GNUstep local libraries */
#undef GNUSTEP_TARGET_LOCAL_LIBRARIES
/* Built in default value for GNUstep local library */
#undef GNUSTEP_TARGET_LOCAL_LIBRARY
/* 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
/* Built in default value for GNUstep local tools */
#undef GNUSTEP_TARGET_LOCAL_TOOLS
/* Built in default value for GNUstep Makefiles */
#undef GNUSTEP_TARGET_MAKEFILES
/* Built in default value for GNUstep network apps */
#undef GNUSTEP_TARGET_NETWORK_APPS
/* Built in default value for GNUstep network documentation */
#undef GNUSTEP_TARGET_NETWORK_DOCUMENTATION
/* Built in default value for GNUstep network info documentation */
#undef GNUSTEP_TARGET_NETWORK_DOCUMENTATION_INFO
/* Built in default value for GNUstep network manpages documentation */
#undef GNUSTEP_TARGET_NETWORK_DOCUMENTATION_MAN
/* Built in default value for GNUstep network headers */
#undef GNUSTEP_TARGET_NETWORK_HEADERS
/* Built in default value for GNUstep network libraries */
#undef GNUSTEP_TARGET_NETWORK_LIBRARIES
/* Built in default value for GNUstep network library */
#undef GNUSTEP_TARGET_NETWORK_LIBRARY
/* Built in default value for GNUstep network root */ /* Built in default value for GNUstep network root */
#undef GNUSTEP_TARGET_NETWORK_ROOT #undef GNUSTEP_TARGET_NETWORK_ROOT
/* Built in default value for GNUstep network tools */
#undef GNUSTEP_TARGET_NETWORK_TOOLS
/* Built in default value for GNUstep system apps */
#undef GNUSTEP_TARGET_SYSTEM_APPS
/* Built in default value for GNUstep system documentation */
#undef GNUSTEP_TARGET_SYSTEM_DOCUMENTATION
/* Built in default value for GNUstep system info documentation */
#undef GNUSTEP_TARGET_SYSTEM_DOCUMENTATION_INFO
/* Built in default value for GNUstep system manpages documentation */
#undef GNUSTEP_TARGET_SYSTEM_DOCUMENTATION_MAN
/* Built in default value for GNUstep system headers */
#undef GNUSTEP_TARGET_SYSTEM_HEADERS
/* Built in default value for GNUstep system libraries */
#undef GNUSTEP_TARGET_SYSTEM_LIBRARIES
/* Built in default value for GNUstep system library */
#undef GNUSTEP_TARGET_SYSTEM_LIBRARY
/* Built in default value for GNUstep system root */ /* Built in default value for GNUstep system root */
#undef GNUSTEP_TARGET_SYSTEM_ROOT #undef GNUSTEP_TARGET_SYSTEM_ROOT
/* Built in default value for GNUstep system tools */
#undef GNUSTEP_TARGET_SYSTEM_TOOLS
/* Built in default value for GNUstep user config file */ /* Built in default value for GNUstep user config file */
#undef GNUSTEP_TARGET_USER_CONFIG_FILE #undef GNUSTEP_TARGET_USER_CONFIG_FILE
@ -33,6 +108,30 @@
/* Built in default value for GNUstep user directory */ /* Built in default value for GNUstep user directory */
#undef GNUSTEP_TARGET_USER_DIR #undef GNUSTEP_TARGET_USER_DIR
/* Built in default value for GNUstep user_dir apps */
#undef GNUSTEP_TARGET_USER_DIR_APPS
/* Built in default value for GNUstep user_dir documentation */
#undef GNUSTEP_TARGET_USER_DIR_DOCUMENTATION
/* Built in default value for GNUstep user_dir info documentation */
#undef GNUSTEP_TARGET_USER_DIR_DOCUMENTATION_INFO
/* Built in default value for GNUstep user_dir manpages documentation */
#undef GNUSTEP_TARGET_USER_DIR_DOCUMENTATION_MAN
/* Built in default value for GNUstep user_dir headers */
#undef GNUSTEP_TARGET_USER_DIR_HEADERS
/* Built in default value for GNUstep user_dir libraries */
#undef GNUSTEP_TARGET_USER_DIR_LIBRARIES
/* Built in default value for GNUstep user_dir library */
#undef GNUSTEP_TARGET_USER_DIR_LIBRARY
/* Built in default value for GNUstep user_dir tools */
#undef GNUSTEP_TARGET_USER_DIR_TOOLS
/* Define if this constant is defined */ /* Define if this constant is defined */
#undef HANDLE_LLONG_MAX #undef HANDLE_LLONG_MAX
@ -55,6 +154,9 @@
/* Define if you have the dladdr function in the dl library */ /* Define if you have the dladdr function in the dl library */
#undef HAVE_DLADDR #undef HAVE_DLADDR
/* Define to 1 if you have the <dns_sd.h> header file. */
#undef HAVE_DNS_SD_H
/* Define to 1 if you have the <float.h> header file. */ /* Define to 1 if you have the <float.h> header file. */
#undef HAVE_FLOAT_H #undef HAVE_FLOAT_H
@ -157,9 +259,6 @@
/* Define to 1 if you have the <malloc.h> header file. */ /* Define to 1 if you have the <malloc.h> header file. */
#undef HAVE_MALLOC_H #undef HAVE_MALLOC_H
/* Define to 1 if you have the <mdns_sd.h> header file. */
#undef HAVE_MDNS_SD_H
/* Define to 1 if you have the <memory.h> header file. */ /* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H #undef HAVE_MEMORY_H
@ -423,25 +522,25 @@
/* Define to 1 if the `setpgrp' function takes no argument. */ /* Define to 1 if the `setpgrp' function takes no argument. */
#undef SETPGRP_VOID #undef SETPGRP_VOID
/* The size of `double', as computed by sizeof. */ /* The size of a `double', as computed by sizeof. */
#undef SIZEOF_DOUBLE #undef SIZEOF_DOUBLE
/* The size of `float', as computed by sizeof. */ /* The size of a `float', as computed by sizeof. */
#undef SIZEOF_FLOAT #undef SIZEOF_FLOAT
/* The size of `int', as computed by sizeof. */ /* The size of a `int', as computed by sizeof. */
#undef SIZEOF_INT #undef SIZEOF_INT
/* The size of `long', as computed by sizeof. */ /* The size of a `long', as computed by sizeof. */
#undef SIZEOF_LONG #undef SIZEOF_LONG
/* The size of `long long', as computed by sizeof. */ /* The size of a `long long', as computed by sizeof. */
#undef SIZEOF_LONG_LONG #undef SIZEOF_LONG_LONG
/* The size of `short', as computed by sizeof. */ /* The size of a `short', as computed by sizeof. */
#undef SIZEOF_SHORT #undef SIZEOF_SHORT
/* The size of `void*', as computed by sizeof. */ /* The size of a `void*', as computed by sizeof. */
#undef SIZEOF_VOIDP #undef SIZEOF_VOIDP
/* Define to 1 if you have the ANSI C header files. */ /* Define to 1 if you have the ANSI C header files. */
@ -469,5 +568,5 @@
#undef inline #undef inline
#endif #endif
/* Define to `unsigned int' 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

@ -138,10 +138,13 @@ static NSString *gnustep_is_flattened =
static NSString *gnustepConfigPath = nil; static NSString *gnustepConfigPath = nil;
/* We read these four paths only once */ /* This will be deprecated and removed. */
static NSString *gnustepUserRoot = nil; /* GNUSTEP_USER_ROOT path */ static NSString *gnustepUserRoot = nil; /* GNUSTEP_USER_ROOT path */
/* This will be deprecated and removed. */
static NSString *gnustepLocalRoot = nil; /* GNUSTEP_LOCAL_ROOT path */ static NSString *gnustepLocalRoot = nil; /* GNUSTEP_LOCAL_ROOT path */
/* This will be deprecated and removed. */
static NSString *gnustepNetworkRoot = nil; /* GNUSTEP_NETWORK_ROOT path */ static NSString *gnustepNetworkRoot = nil; /* GNUSTEP_NETWORK_ROOT path */
/* This will be deprecated and removed. */
static NSString *gnustepSystemRoot = nil; /* GNUSTEP_SYSTEM_ROOT path */ static NSString *gnustepSystemRoot = nil; /* GNUSTEP_SYSTEM_ROOT path */
static NSString *gnustepUserDir = nil; static NSString *gnustepUserDir = nil;
@ -152,18 +155,57 @@ static NSString *theUserName = nil; /* The user's login name */
static NSString *theFullUserName = nil; /* The user's full login name */ static NSString *theFullUserName = nil; /* The user's full login name */
static NSString *tempDir = nil; /* user's temporary directory */ static NSString *tempDir = nil; /* user's temporary directory */
static NSString *osSysApps = nil; /* The following list entirely describe our filesystem configuration. */
static NSString *osSysLibs = nil; static NSString *gnustepMakefiles = nil;
static NSString *osSysAdmin = nil;
static NSString *platformResources = nil; static NSString *gnustepSystemApps = nil;
static NSString *platformApps = nil; static NSString *gnustepSystemTools = nil;
static NSString *platformLibs = nil; static NSString *gnustepSystemLibrary = nil;
static NSString *platformAdmin = nil; static NSString *gnustepSystemLibraries = nil;
static NSString *gnustepSystemHeaders = nil;
static NSString *gnustepSystemDocumentation = nil;
static NSString *gnustepSystemDocumentationInfo = nil;
static NSString *gnustepSystemDocumentationMan = nil;
static NSString *localResources = nil; static NSString *gnustepNetworkApps = nil;
static NSString *localApps = nil; static NSString *gnustepNetworkTools = nil;
static NSString *localLibs = nil; static NSString *gnustepNetworkLibrary = nil;
static NSString *gnustepNetworkLibraries = nil;
static NSString *gnustepNetworkHeaders = nil;
static NSString *gnustepNetworkDocumentation = nil;
static NSString *gnustepNetworkDocumentationInfo = nil;
static NSString *gnustepNetworkDocumentationMan = nil;
static NSString *gnustepLocalApps = nil;
static NSString *gnustepLocalTools = nil;
static NSString *gnustepLocalLibrary = nil;
static NSString *gnustepLocalLibraries = nil;
static NSString *gnustepLocalHeaders = nil;
static NSString *gnustepLocalDocumentation = nil;
static NSString *gnustepLocalDocumentationInfo = nil;
static NSString *gnustepLocalDocumentationMan = nil;
static NSString *gnustepUserApps = nil;
static NSString *gnustepUserTools = nil;
static NSString *gnustepUserLibrary = nil;
static NSString *gnustepUserLibraries = nil;
static NSString *gnustepUserHeaders = nil;
static NSString *gnustepUserDocumentation = nil;
static NSString *gnustepUserDocumentationInfo = nil;
static NSString *gnustepUserDocumentationMan = nil;
/* These are the same as the corresponding User variables, but
* they hold the path before GNUSTEP_HOME is prepended. It's what
* we read from config files.
*/
static NSString *gnustepUserDirApps = nil;
static NSString *gnustepUserDirTools = nil;
static NSString *gnustepUserDirLibrary = nil;
static NSString *gnustepUserDirLibraries = nil;
static NSString *gnustepUserDirHeaders = nil;
static NSString *gnustepUserDirDocumentation = nil;
static NSString *gnustepUserDirDocumentationInfo = nil;
static NSString *gnustepUserDirDocumentationMan = nil;
static BOOL ParseConfigurationFile(NSString *name, NSMutableDictionary *dict, static BOOL ParseConfigurationFile(NSString *name, NSMutableDictionary *dict,
NSString *userName); NSString *userName);
@ -204,6 +246,15 @@ static void ShutdownPathUtilities(void);
}\ }\
}) })
#define ASSIGN_DEFAULT_PATH(var, default) ({\
if (var == nil)\
{\
var = default; \
var = RETAIN(getPath(var)); \
}\
})
/* Get a full path string */ /* Get a full path string */
static inline NSString * static inline NSString *
getPath(NSString *path) getPath(NSString *path)
@ -269,18 +320,43 @@ static void ExtractValuesFromConfig(NSDictionary *config)
ASSIGN_IF_SET(gnustepUserDir, c, @"GNUSTEP_USER_DIR"); ASSIGN_IF_SET(gnustepUserDir, c, @"GNUSTEP_USER_DIR");
ASSIGN_IF_SET(gnustepUserDefaultsDir, c, @"GNUSTEP_USER_DEFAULTS_DIR"); ASSIGN_IF_SET(gnustepUserDefaultsDir, c, @"GNUSTEP_USER_DEFAULTS_DIR");
ASSIGN_PATH(osSysApps, c, @"GNUSTEP_SYS_APPS"); ASSIGN_PATH(gnustepMakefiles, c, @"GNUSTEP_MAKEFILES");
ASSIGN_PATH(osSysLibs, c, @"GNUSTEP_SYS_LIBS");
ASSIGN_PATH(osSysAdmin, c, @"GNUSTEP_SYS_ADMIN");
ASSIGN_PATH(platformResources, c, @"GNUSTEP_PLATFORM_RESOURCES"); ASSIGN_PATH(gnustepSystemApps, c, @"GNUSTEP_SYSTEM_APPS");
ASSIGN_PATH(platformApps, c, @"GNUSTEP_PLATFORM_APPS"); ASSIGN_PATH(gnustepSystemTools, c, @"GNUSTEP_SYSTEM_TOOLS");
ASSIGN_PATH(platformLibs, c, @"GNUSTEP_PLATFORM_LIBS"); ASSIGN_PATH(gnustepSystemLibrary, c, @"GNUSTEP_SYSTEM_LIBRARY");
ASSIGN_PATH(platformAdmin, c, @"GNUSTEP_PLATFORM_ADMIN"); ASSIGN_PATH(gnustepSystemLibraries, c, @"GNUSTEP_SYSTEM_LIBRARIES");
ASSIGN_PATH(gnustepSystemHeaders, c, @"GNUSTEP_SYSTEM_HEADERS");
ASSIGN_PATH(gnustepSystemDocumentation, c, @"GNUSTEP_SYSTEM_DOCUMENTATION");
ASSIGN_PATH(gnustepSystemDocumentationMan, c, @"GNUSTEP_SYSTEM_DOCUMENTATION_MAN");
ASSIGN_PATH(gnustepSystemDocumentationInfo, c, @"GNUSTEP_SYSTEM_DOCUMENTATION_INFO");
ASSIGN_PATH(localResources, c, @"GNUSTEP_PLATFORM_LOCAL_RESOURCES"); ASSIGN_PATH(gnustepNetworkApps, c, @"GNUSTEP_NETWORK_APPS");
ASSIGN_PATH(localApps, c, @"GNUSTEP_PLATFORM_LOCAL_APPS"); ASSIGN_PATH(gnustepNetworkTools, c, @"GNUSTEP_NETWORK_TOOLS");
ASSIGN_PATH(localLibs, c, @"GNUSTEP_PLATFORM_LOCAL_LIBS"); ASSIGN_PATH(gnustepNetworkLibrary, c, @"GNUSTEP_NETWORK_LIBRARY");
ASSIGN_PATH(gnustepNetworkLibraries, c, @"GNUSTEP_NETWORK_LIBRARIES");
ASSIGN_PATH(gnustepNetworkHeaders, c, @"GNUSTEP_NETWORK_HEADERS");
ASSIGN_PATH(gnustepNetworkDocumentation, c, @"GNUSTEP_NETWORK_DOCUMENTATION");
ASSIGN_PATH(gnustepNetworkDocumentationMan, c, @"GNUSTEP_NETWORK_DOCUMENTATION_MAN");
ASSIGN_PATH(gnustepNetworkDocumentationInfo, c, @"GNUSTEP_NETWORK_DOCUMENTATION_INFO");
ASSIGN_PATH(gnustepLocalApps, c, @"GNUSTEP_LOCAL_APPS");
ASSIGN_PATH(gnustepLocalTools, c, @"GNUSTEP_LOCAL_TOOLS");
ASSIGN_PATH(gnustepLocalLibrary, c, @"GNUSTEP_LOCAL_LIBRARY");
ASSIGN_PATH(gnustepLocalLibraries, c, @"GNUSTEP_LOCAL_LIBRARIES");
ASSIGN_PATH(gnustepLocalHeaders, c, @"GNUSTEP_LOCAL_HEADERS");
ASSIGN_PATH(gnustepLocalDocumentation, c, @"GNUSTEP_LOCAL_DOCUMENTATION");
ASSIGN_PATH(gnustepLocalDocumentationMan, c, @"GNUSTEP_LOCAL_DOCUMENTATION_MAN");
ASSIGN_PATH(gnustepLocalDocumentationInfo, c, @"GNUSTEP_LOCAL_DOCUMENTATION_INFO");
ASSIGN_IF_SET(gnustepUserDirApps, c, @"GNUSTEP_USER_DIR_APPS");
ASSIGN_IF_SET(gnustepUserDirTools, c, @"GNUSTEP_USER_DIR_TOOLS");
ASSIGN_IF_SET(gnustepUserDirLibrary, c, @"GNUSTEP_USER_DIR_LIBRARY");
ASSIGN_IF_SET(gnustepUserDirLibraries, c, @"GNUSTEP_USER_DIR_LIBRARIES");
ASSIGN_IF_SET(gnustepUserDirHeaders, c, @"GNUSTEP_USER_DIR_HEADERS");
ASSIGN_IF_SET(gnustepUserDirDocumentation, c, @"GNUSTEP_USER_DIR_DOCUMENTATION");
ASSIGN_IF_SET(gnustepUserDirDocumentationMan, c, @"GNUSTEP_USER_DIR_DOCUMENTATION_MAN");
ASSIGN_IF_SET(gnustepUserDirDocumentationInfo, c, @"GNUSTEP_USER_DIR_DOCUMENTATION_INFO");
/* /*
* The GNUSTEP_EXTRA field may contain a list of extra keys which * The GNUSTEP_EXTRA field may contain a list of extra keys which
@ -327,12 +403,76 @@ static void ExtractValuesFromConfig(NSDictionary *config)
{ {
ASSIGN(gnustepUserDefaultsDir, @GNUSTEP_TARGET_USER_DEFAULTS_DIR); ASSIGN(gnustepUserDefaultsDir, @GNUSTEP_TARGET_USER_DEFAULTS_DIR);
} }
if (gnustepUserDirApps == nil)
{
ASSIGN(gnustepUserDirApps, @GNUSTEP_TARGET_USER_DIR_APPS);
}
if (gnustepUserDirTools == nil)
{
ASSIGN(gnustepUserDirTools, @GNUSTEP_TARGET_USER_DIR_TOOLS);
}
if (gnustepUserDirLibrary == nil)
{
ASSIGN(gnustepUserDirLibrary, @GNUSTEP_TARGET_USER_DIR_LIBRARY);
}
if (gnustepUserDirLibraries == nil)
{
ASSIGN(gnustepUserDirLibraries, @GNUSTEP_TARGET_USER_DIR_LIBRARIES);
}
if (gnustepUserDirHeaders == nil)
{
ASSIGN(gnustepUserDirHeaders, @GNUSTEP_TARGET_USER_DIR_HEADERS);
}
if (gnustepUserDirDocumentation == nil)
{
ASSIGN(gnustepUserDirDocumentation,
@GNUSTEP_TARGET_USER_DIR_DOCUMENTATION);
}
if (gnustepUserDirDocumentationMan == nil)
{
ASSIGN(gnustepUserDirDocumentationMan,
@GNUSTEP_TARGET_USER_DIR_DOCUMENTATION_MAN);
}
if (gnustepUserDirDocumentationInfo == nil)
{
ASSIGN(gnustepUserDirDocumentationInfo,
@GNUSTEP_TARGET_USER_DIR_DOCUMENTATION_INFO);
}
/* /*
* Set the user root from the user home and the user dir * Set the GNUSTEP_USER_xxx variables from the user home and the
* GNUSTEP_USER_DIR_xxx variables.
*/ */
ASSIGN(gnustepUserRoot, ASSIGN(gnustepUserRoot,
[gnustepUserHome stringByAppendingPathComponent: gnustepUserDir]); [gnustepUserHome stringByAppendingPathComponent: gnustepUserDir]);
ASSIGN(gnustepUserApps,
[gnustepUserHome stringByAppendingPathComponent: gnustepUserDirApps]);
ASSIGN(gnustepUserTools,
[gnustepUserHome stringByAppendingPathComponent: gnustepUserDirTools]);
ASSIGN(gnustepUserLibrary,
[gnustepUserHome stringByAppendingPathComponent: gnustepUserDirLibrary]);
ASSIGN(gnustepUserLibraries,
[gnustepUserHome stringByAppendingPathComponent: gnustepUserDirLibraries]);
ASSIGN(gnustepUserHeaders,
[gnustepUserHome stringByAppendingPathComponent: gnustepUserDirHeaders]);
ASSIGN(gnustepUserDocumentation,
[gnustepUserHome stringByAppendingPathComponent:
gnustepUserDocumentation]);
ASSIGN(gnustepUserDocumentationMan,
[gnustepUserHome stringByAppendingPathComponent:
gnustepUserDocumentationMan]);
ASSIGN(gnustepUserDocumentationInfo,
[gnustepUserHome stringByAppendingPathComponent:
gnustepUserDocumentationInfo]);
/* /*
* Try to ensure that essential user directories exist. * Try to ensure that essential user directories exist.
* FIXME ... Check/creation should perhaps be configurable. * FIXME ... Check/creation should perhaps be configurable.
@ -348,16 +488,8 @@ static void ExtractValuesFromConfig(NSDictionary *config)
attr = [NSDictionary dictionaryWithObject: [NSNumber numberWithInt: 0750] attr = [NSDictionary dictionaryWithObject: [NSNumber numberWithInt: 0750]
forKey: NSFilePosixPermissions]; forKey: NSFilePosixPermissions];
// make sure user root exists. // Make sure library directory exists (to store resources).
path = gnustepUserRoot; path = gnustepUserLibrary;
if ([manager fileExistsAtPath: path isDirectory: &flag] == NO
|| flag == NO)
{
[manager createDirectoryAtPath: path attributes: attr];
}
// make sure library directory exists (to store resources).
path = [path stringByAppendingPathComponent: @"Library"];
if ([manager fileExistsAtPath: path isDirectory: &flag] == NO if ([manager fileExistsAtPath: path isDirectory: &flag] == NO
|| flag == NO) || flag == NO)
{ {
@ -368,21 +500,38 @@ static void ExtractValuesFromConfig(NSDictionary *config)
/* /*
* Finally set default locations for the essential paths if required. * Finally set default locations for the essential paths if required.
*/ */
if (gnustepSystemRoot == nil) ASSIGN_DEFAULT_PATH(gnustepSystemRoot, @GNUSTEP_TARGET_SYSTEM_ROOT);
{ ASSIGN_DEFAULT_PATH(gnustepNetworkRoot, @GNUSTEP_TARGET_NETWORK_ROOT);
gnustepSystemRoot = @GNUSTEP_TARGET_SYSTEM_ROOT; ASSIGN_DEFAULT_PATH(gnustepLocalRoot, @GNUSTEP_TARGET_LOCAL_ROOT);
gnustepSystemRoot = RETAIN(getPath(gnustepSystemRoot));
} ASSIGN_DEFAULT_PATH(gnustepSystemApps, @GNUSTEP_TARGET_SYSTEM_APPS);
if (gnustepNetworkRoot == nil) ASSIGN_DEFAULT_PATH(gnustepSystemTools, @GNUSTEP_TARGET_SYSTEM_TOOLS);
{ ASSIGN_DEFAULT_PATH(gnustepSystemLibrary, @GNUSTEP_TARGET_SYSTEM_LIBRARY);
gnustepNetworkRoot = @GNUSTEP_TARGET_NETWORK_ROOT; ASSIGN_DEFAULT_PATH(gnustepSystemLibraries, @GNUSTEP_TARGET_SYSTEM_LIBRARIES);
gnustepNetworkRoot = RETAIN(getPath(gnustepNetworkRoot)); ASSIGN_DEFAULT_PATH(gnustepSystemHeaders, @GNUSTEP_TARGET_SYSTEM_HEADERS);
} ASSIGN_DEFAULT_PATH(gnustepSystemDocumentation, @GNUSTEP_TARGET_SYSTEM_DOCUMENTATION);
if (gnustepLocalRoot == nil) ASSIGN_DEFAULT_PATH(gnustepSystemDocumentationMan, @GNUSTEP_TARGET_SYSTEM_DOCUMENTATION_MAN);
{ ASSIGN_DEFAULT_PATH(gnustepSystemDocumentationInfo, @GNUSTEP_TARGET_SYSTEM_DOCUMENTATION_INFO);
gnustepLocalRoot = @GNUSTEP_TARGET_LOCAL_ROOT;
gnustepLocalRoot = RETAIN(getPath(gnustepLocalRoot)); ASSIGN_DEFAULT_PATH(gnustepNetworkApps, @GNUSTEP_TARGET_NETWORK_APPS);
} ASSIGN_DEFAULT_PATH(gnustepNetworkTools, @GNUSTEP_TARGET_NETWORK_TOOLS);
ASSIGN_DEFAULT_PATH(gnustepNetworkLibrary, @GNUSTEP_TARGET_NETWORK_LIBRARY);
ASSIGN_DEFAULT_PATH(gnustepNetworkLibraries, @GNUSTEP_TARGET_NETWORK_LIBRARIES);
ASSIGN_DEFAULT_PATH(gnustepNetworkHeaders, @GNUSTEP_TARGET_NETWORK_HEADERS);
ASSIGN_DEFAULT_PATH(gnustepNetworkDocumentation, @GNUSTEP_TARGET_NETWORK_DOCUMENTATION);
ASSIGN_DEFAULT_PATH(gnustepNetworkDocumentationMan, @GNUSTEP_TARGET_NETWORK_DOCUMENTATION_MAN);
ASSIGN_DEFAULT_PATH(gnustepNetworkDocumentationInfo, @GNUSTEP_TARGET_NETWORK_DOCUMENTATION_INFO);
ASSIGN_DEFAULT_PATH(gnustepLocalApps, @GNUSTEP_TARGET_LOCAL_APPS);
ASSIGN_DEFAULT_PATH(gnustepLocalTools, @GNUSTEP_TARGET_LOCAL_TOOLS);
ASSIGN_DEFAULT_PATH(gnustepLocalLibrary, @GNUSTEP_TARGET_LOCAL_LIBRARY);
ASSIGN_DEFAULT_PATH(gnustepLocalLibraries, @GNUSTEP_TARGET_LOCAL_LIBRARIES);
ASSIGN_DEFAULT_PATH(gnustepLocalHeaders, @GNUSTEP_TARGET_LOCAL_HEADERS);
ASSIGN_DEFAULT_PATH(gnustepLocalDocumentation, @GNUSTEP_TARGET_LOCAL_DOCUMENTATION);
ASSIGN_DEFAULT_PATH(gnustepLocalDocumentationMan, @GNUSTEP_TARGET_LOCAL_DOCUMENTATION_MAN);
ASSIGN_DEFAULT_PATH(gnustepLocalDocumentationInfo, @GNUSTEP_TARGET_LOCAL_DOCUMENTATION_INFO);
ASSIGN_DEFAULT_PATH(gnustepMakefiles, @GNUSTEP_TARGET_MAKEFILES);
} }
NSMutableDictionary* NSMutableDictionary*
@ -576,7 +725,7 @@ GNUstepUserConfig(NSMutableDictionary *config, NSString *userName)
/* Initialise all things required by this module */ /* Initialise all things required by this module */
static void InitialisePathUtilities(void) static void InitialisePathUtilities(void)
{ {
if (gnustepSystemRoot != nil) if (gnustepMakefiles != nil)
{ {
return; // Protect from multiple calls return; // Protect from multiple calls
} }
@ -618,18 +767,43 @@ static void ShutdownPathUtilities(void)
DESTROY(gnustepUserHome); DESTROY(gnustepUserHome);
DESTROY(gnustepUserDefaultsDir); DESTROY(gnustepUserDefaultsDir);
DESTROY(osSysApps); DESTROY(gnustepMakefiles);
DESTROY(osSysLibs);
DESTROY(osSysAdmin);
DESTROY(platformResources); DESTROY(gnustepSystemApps);
DESTROY(platformApps); DESTROY(gnustepSystemTools);
DESTROY(platformLibs); DESTROY(gnustepSystemLibrary);
DESTROY(platformAdmin); DESTROY(gnustepSystemLibraries);
DESTROY(gnustepSystemHeaders);
DESTROY(gnustepSystemDocumentation);
DESTROY(gnustepSystemDocumentationMan);
DESTROY(gnustepSystemDocumentationInfo);
DESTROY(localResources); DESTROY(gnustepNetworkApps);
DESTROY(localApps); DESTROY(gnustepNetworkTools);
DESTROY(localLibs); DESTROY(gnustepNetworkLibrary);
DESTROY(gnustepNetworkLibraries);
DESTROY(gnustepNetworkHeaders);
DESTROY(gnustepNetworkDocumentation);
DESTROY(gnustepNetworkDocumentationMan);
DESTROY(gnustepNetworkDocumentationInfo);
DESTROY(gnustepLocalApps);
DESTROY(gnustepLocalTools);
DESTROY(gnustepLocalLibrary);
DESTROY(gnustepLocalLibraries);
DESTROY(gnustepLocalHeaders);
DESTROY(gnustepLocalDocumentation);
DESTROY(gnustepLocalDocumentationMan);
DESTROY(gnustepLocalDocumentationInfo);
DESTROY(gnustepUserApps);
DESTROY(gnustepUserTools);
DESTROY(gnustepUserLibrary);
DESTROY(gnustepUserLibraries);
DESTROY(gnustepUserHeaders);
DESTROY(gnustepUserDocumentation);
DESTROY(gnustepUserDocumentationMan);
DESTROY(gnustepUserDocumentationInfo);
DESTROY(tempDir); DESTROY(tempDir);
} }
@ -1385,18 +1559,6 @@ NSArray *
NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory directoryKey, NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory directoryKey,
NSSearchPathDomainMask domainMask, BOOL expandTilde) NSSearchPathDomainMask domainMask, BOOL expandTilde)
{ {
static NSString *adminDir = @"Administrator";
static NSString *appsDir = @"Applications";
static NSString *devDir = @"Developer";
static NSString *demosDir = @"Demos";
static NSString *libraryDir = @"Library";
static NSString *supportDir = @"Library/ApplicationSupport";
static NSString *docDir = @"Documentation";
static NSString *docsDir = @"Documentats";
static NSString *fontsDir = @"Fonts";
static NSString *frameworkDir = @"Frameworks";
static NSString *libsDir = @"Libraries";
static NSString *toolsDir = @"Tools";
NSMutableArray *paths = [NSMutableArray new]; NSMutableArray *paths = [NSMutableArray new];
NSString *path; NSString *path;
unsigned i; unsigned i;
@ -1404,7 +1566,7 @@ NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory directoryKey,
InitialisePathUtilities(); InitialisePathUtilities();
NSCAssert(gnustepSystemRoot!=nil,@"Path utilities without initialisation!"); NSCAssert(gnustepMakefiles!=nil,@"Path utilities without initialisation!");
/* /*
* The order in which we return paths is important - user must come * The order in which we return paths is important - user must come
@ -1432,139 +1594,126 @@ if (domainMask & mask) \
{ {
case NSAllApplicationsDirectory: case NSAllApplicationsDirectory:
{ {
NSString *devDemosDir; /* We don't really have any separation of applications by type,
NSString *devAppsDir; * we put everything in Applications. So for now no point
NSString *devAdminDir; * in returning anything different and spending time scanning
* the disk for non-existing dirs.
devDemosDir = [devDir stringByAppendingPathComponent: demosDir]; */
devAppsDir = [devDir stringByAppendingPathComponent: appsDir]; ADD_PLATFORM_PATH(NSUserDomainMask, gnustepUserApps);
devAdminDir = [devDir stringByAppendingPathComponent: adminDir]; ADD_PLATFORM_PATH(NSLocalDomainMask, gnustepLocalApps);
ADD_PLATFORM_PATH(NSNetworkDomainMask, gnustepNetworkApps);
ADD_PATH(NSUserDomainMask, gnustepUserRoot, appsDir); ADD_PLATFORM_PATH(NSSystemDomainMask, gnustepSystemApps);
ADD_PATH(NSUserDomainMask, gnustepUserRoot, devAppsDir);
ADD_PATH(NSLocalDomainMask, gnustepLocalRoot, appsDir);
ADD_PATH(NSLocalDomainMask, gnustepLocalRoot, devAppsDir);
ADD_PATH(NSLocalDomainMask, gnustepLocalRoot, devAdminDir);
ADD_PATH(NSNetworkDomainMask, gnustepNetworkRoot, appsDir);
ADD_PATH(NSNetworkDomainMask, gnustepNetworkRoot, devAppsDir);
ADD_PATH(NSNetworkDomainMask, gnustepNetworkRoot, devAdminDir);
ADD_PATH(NSSystemDomainMask, gnustepSystemRoot, appsDir);
ADD_PATH(NSSystemDomainMask, gnustepSystemRoot, devAppsDir);
ADD_PATH(NSSystemDomainMask, gnustepSystemRoot, devAdminDir);
ADD_PATH(NSSystemDomainMask, gnustepSystemRoot, devDemosDir);
ADD_PLATFORM_PATH(NSLocalDomainMask, localApps);
ADD_PLATFORM_PATH(NSSystemDomainMask, platformApps);
ADD_PLATFORM_PATH(NSSystemDomainMask, osSysApps);
ADD_PLATFORM_PATH(NSSystemDomainMask, osSysAdmin);
ADD_PLATFORM_PATH(NSSystemDomainMask, platformAdmin);
} }
break; break;
case NSApplicationDirectory: case NSApplicationDirectory:
{ {
ADD_PATH(NSUserDomainMask, gnustepUserRoot, appsDir); ADD_PLATFORM_PATH(NSUserDomainMask, gnustepUserApps);
ADD_PATH(NSLocalDomainMask, gnustepLocalRoot, appsDir); ADD_PLATFORM_PATH(NSLocalDomainMask, gnustepLocalApps);
ADD_PATH(NSNetworkDomainMask, gnustepNetworkRoot, appsDir); ADD_PLATFORM_PATH(NSNetworkDomainMask, gnustepNetworkApps);
ADD_PATH(NSSystemDomainMask, gnustepSystemRoot, appsDir); ADD_PLATFORM_PATH(NSSystemDomainMask, gnustepSystemApps);
ADD_PLATFORM_PATH(NSLocalDomainMask, localApps);
ADD_PLATFORM_PATH(NSSystemDomainMask, platformApps);
ADD_PLATFORM_PATH(NSSystemDomainMask, osSysApps);
} }
break; break;
case NSDemoApplicationDirectory: case NSDemoApplicationDirectory:
{ {
NSString *devDemosDir; ADD_PLATFORM_PATH(NSUserDomainMask, gnustepUserApps);
ADD_PLATFORM_PATH(NSLocalDomainMask, gnustepLocalApps);
ADD_PLATFORM_PATH(NSNetworkDomainMask, gnustepNetworkApps);
ADD_PLATFORM_PATH(NSSystemDomainMask, gnustepSystemApps);
devDemosDir = [devDir stringByAppendingPathComponent: demosDir]; /* I imagine if ever wanted a separate Demo directory, the
ADD_PATH(NSSystemDomainMask, gnustepSystemRoot, devDemosDir); * only way for this to have some meaning across filesystems
* would be as a subdirectory of Applications, as follows.
*/
/*
ADD_PATH(NSUserDomainMask, gnustepUserApps, @"Demos");
ADD_PATH(NSLocalDomainMask, gnustepLocalApps, @"Demos");
ADD_PATH(NSNetworkDomainMask, gnustepNetworkApps, @"Demos");
ADD_PATH(NSSystemDomainMask, gnustepSystemApps, @"Demos");
*/
} }
break; break;
case NSCoreServicesDirectory: case NSCoreServicesDirectory:
{ {
NSString *coreDir; ADD_PATH(NSSystemDomainMask, gnustepSystemLibrary, @"CoreServices");
coreDir = [devDir stringByAppendingPathComponent:
@"Library/CoreServices"];
ADD_PATH(NSSystemDomainMask, gnustepSystemRoot, coreDir);
} }
break; break;
case NSDesktopDirectory: case NSDesktopDirectory:
{ {
NSString *deskDir; ADD_PATH(NSUserDomainMask, gnustepUserLibrary, @"Desktop");
// FIXME ... what should desktop really be?
deskDir = [devDir stringByAppendingPathComponent:
@"Desktop"];
ADD_PATH(NSUserDomainMask, gnustepUserRoot, deskDir);
} }
break; break;
case NSDeveloperApplicationDirectory: case NSDeveloperApplicationDirectory:
{ {
NSString *devAppsDir; ADD_PLATFORM_PATH(NSUserDomainMask, gnustepUserApps);
ADD_PLATFORM_PATH(NSLocalDomainMask, gnustepLocalApps);
ADD_PLATFORM_PATH(NSNetworkDomainMask, gnustepNetworkApps);
ADD_PLATFORM_PATH(NSSystemDomainMask, gnustepSystemApps);
devAppsDir = [devDir stringByAppendingPathComponent: appsDir]; /* I imagine if ever wanted a separate Developer directory, the
ADD_PATH(NSUserDomainMask, gnustepUserRoot, devAppsDir); * only way for this to have some meaning across filesystems
ADD_PATH(NSLocalDomainMask, gnustepLocalRoot, devAppsDir); * would be as a subdirectory of Applications, as follows.
ADD_PATH(NSNetworkDomainMask, gnustepNetworkRoot, devAppsDir); */
ADD_PATH(NSSystemDomainMask, gnustepSystemRoot, devAppsDir); /*
ADD_PATH(NSUserDomainMask, gnustepUserApps, @"Developer");
ADD_PATH(NSLocalDomainMask, gnustepLocalApps, @"Developer");
ADD_PATH(NSNetworkDomainMask, gnustepNetworkApps, @"Developer");
ADD_PATH(NSSystemDomainMask, gnustepSystemApps, @"Developer");
*/
} }
break; break;
case NSAdminApplicationDirectory: case NSAdminApplicationDirectory:
{ {
NSString *devAdminDir;
devAdminDir = [devDir stringByAppendingPathComponent: adminDir];
/* NSUserDomainMask - users have no Administrator directory */ /* NSUserDomainMask - users have no Administrator directory */
ADD_PATH(NSLocalDomainMask, gnustepLocalRoot, devAdminDir); /* ADD_PLATFORM_PATH(NSUserDomainMask, gnustepUserApps); */
ADD_PATH(NSNetworkDomainMask, gnustepNetworkRoot, devAdminDir); ADD_PLATFORM_PATH(NSLocalDomainMask, gnustepLocalApps);
ADD_PATH(NSSystemDomainMask, gnustepSystemRoot, devAdminDir); ADD_PLATFORM_PATH(NSNetworkDomainMask, gnustepNetworkApps);
ADD_PLATFORM_PATH(NSSystemDomainMask, gnustepSystemApps);
ADD_PLATFORM_PATH(NSSystemDomainMask, osSysAdmin); /* I imagine if ever wanted a separate Administrator directory, the
ADD_PLATFORM_PATH(NSSystemDomainMask, platformAdmin); * only way for this to have some meaning across filesystems
* would be as a subdirectory of Applications, as follows.
*/
/*
ADD_PATH(NSLocalDomainMask, gnustepLocalApps, @"Administrator");
ADD_PATH(NSNetworkDomainMask, gnustepNetworkApps, @"Administrator");
ADD_PATH(NSSystemDomainMask, gnustepSystemApps, @"Administrator");
*/
} }
break; break;
case NSAllLibrariesDirectory: case NSAllLibrariesDirectory:
{ {
ADD_PATH(NSUserDomainMask, gnustepUserRoot, libraryDir); ADD_PLATFORM_PATH(NSUserDomainMask, gnustepUserLibraries);
ADD_PATH(NSLocalDomainMask, gnustepLocalRoot, libraryDir); ADD_PLATFORM_PATH(NSLocalDomainMask, gnustepLocalLibraries);
ADD_PATH(NSNetworkDomainMask, gnustepNetworkRoot, libraryDir); ADD_PLATFORM_PATH(NSNetworkDomainMask, gnustepNetworkLibraries);
ADD_PATH(NSSystemDomainMask, gnustepSystemRoot, libraryDir); ADD_PLATFORM_PATH(NSSystemDomainMask, gnustepSystemLibraries);
ADD_PLATFORM_PATH(NSLocalDomainMask, localResources);
ADD_PLATFORM_PATH(NSSystemDomainMask, platformResources);
} }
break; break;
case NSLibraryDirectory: case NSLibraryDirectory:
{ {
ADD_PATH(NSUserDomainMask, gnustepUserRoot, libraryDir); ADD_PLATFORM_PATH(NSUserDomainMask, gnustepUserLibrary);
ADD_PATH(NSLocalDomainMask, gnustepLocalRoot, libraryDir); ADD_PLATFORM_PATH(NSLocalDomainMask, gnustepLocalLibrary);
ADD_PATH(NSNetworkDomainMask, gnustepNetworkRoot, libraryDir); ADD_PLATFORM_PATH(NSNetworkDomainMask, gnustepNetworkLibrary);
ADD_PATH(NSSystemDomainMask, gnustepSystemRoot, libraryDir); ADD_PLATFORM_PATH(NSSystemDomainMask, gnustepSystemLibrary);
ADD_PLATFORM_PATH(NSLocalDomainMask, localResources);
ADD_PLATFORM_PATH(NSSystemDomainMask, platformResources);
} }
break; break;
case NSDeveloperDirectory: case NSDeveloperDirectory:
{ {
ADD_PATH(NSUserDomainMask, gnustepUserRoot, devDir); /* The only way of having a Developer directory is as a
ADD_PATH(NSLocalDomainMask, gnustepLocalRoot, devDir); * sub-dir of Library.
ADD_PATH(NSNetworkDomainMask, gnustepNetworkRoot, devDir); */
ADD_PATH(NSSystemDomainMask, gnustepSystemRoot, devDir); ADD_PATH(NSUserDomainMask, gnustepUserLibrary, @"Developer");
ADD_PATH(NSLocalDomainMask, gnustepLocalLibrary, @"Developer");
ADD_PATH(NSNetworkDomainMask, gnustepNetworkLibrary, @"Developer");
ADD_PATH(NSSystemDomainMask, gnustepSystemLibrary, @"Developer");
} }
break; break;
@ -1579,85 +1728,69 @@ if (domainMask & mask) \
case NSDocumentationDirectory: case NSDocumentationDirectory:
{ {
NSString *gsdocDir; ADD_PLATFORM_PATH(NSUserDomainMask, gnustepUserDocumentation);
ADD_PLATFORM_PATH(NSLocalDomainMask, gnustepLocalDocumentation);
gsdocDir = [libraryDir stringByAppendingPathComponent: docDir]; ADD_PLATFORM_PATH(NSNetworkDomainMask, gnustepNetworkDocumentation);
ADD_PATH(NSUserDomainMask, gnustepUserRoot, gsdocDir); ADD_PLATFORM_PATH(NSSystemDomainMask, gnustepSystemDocumentation);
ADD_PATH(NSLocalDomainMask, gnustepLocalRoot, gsdocDir);
ADD_PATH(NSNetworkDomainMask, gnustepNetworkRoot, gsdocDir);
ADD_PATH(NSSystemDomainMask, gnustepSystemRoot, gsdocDir);
} }
break; break;
case NSDocumentDirectory: case NSDocumentDirectory:
{ {
NSString *gsdocDir; ADD_PATH(NSUserDomainMask, gnustepUserLibrary, @"Document");
ADD_PATH(NSLocalDomainMask, gnustepLocalLibrary, @"Document");
gsdocDir = [libraryDir stringByAppendingPathComponent: docsDir]; ADD_PATH(NSNetworkDomainMask, gnustepNetworkLibrary, @"Document");
ADD_PATH(NSUserDomainMask, gnustepUserRoot, gsdocDir); ADD_PATH(NSSystemDomainMask, gnustepSystemLibrary, @"Document");
ADD_PATH(NSLocalDomainMask, gnustepLocalRoot, gsdocDir);
ADD_PATH(NSNetworkDomainMask, gnustepNetworkRoot, gsdocDir);
ADD_PATH(NSSystemDomainMask, gnustepSystemRoot, gsdocDir);
} }
break; break;
case NSCachesDirectory: case NSCachesDirectory:
{ {
NSString *cacheDir; /* Uff - at the moment the only place to put Caches seems to
* be Library. Unfortunately under GNU/Linux Library will
cacheDir = [libraryDir stringByAppendingPathComponent: * end up in /usr/lib/GNUstep which could be mounted
@"Library/Caches"]; * read-only!
ADD_PATH(NSUserDomainMask, gnustepUserRoot, cacheDir); */
ADD_PATH(NSLocalDomainMask, gnustepLocalRoot, cacheDir); ADD_PATH(NSUserDomainMask, gnustepUserLibrary, @"Caches");
ADD_PATH(NSNetworkDomainMask, gnustepNetworkRoot, cacheDir); ADD_PATH(NSLocalDomainMask, gnustepLocalLibrary, @"Caches");
ADD_PATH(NSSystemDomainMask, gnustepSystemRoot, cacheDir); ADD_PATH(NSNetworkDomainMask, gnustepNetworkLibrary, @"Caches");
ADD_PATH(NSSystemDomainMask, gnustepSystemLibrary, @"Caches");
} }
break; break;
case NSApplicationSupportDirectory: case NSApplicationSupportDirectory:
{ {
NSString *appSupDir; ADD_PATH(NSUserDomainMask, gnustepUserLibrary, @"ApplicationSupport");
ADD_PATH(NSLocalDomainMask, gnustepLocalLibrary, @"ApplicationSupport");
appSupDir = [libraryDir stringByAppendingPathComponent: supportDir]; ADD_PATH(NSNetworkDomainMask, gnustepNetworkLibrary, @"ApplicationSupport");
ADD_PATH(NSUserDomainMask, gnustepUserRoot, appSupDir); ADD_PATH(NSSystemDomainMask, gnustepSystemLibrary, @"ApplicationSupport");
ADD_PATH(NSLocalDomainMask, gnustepLocalRoot, appSupDir);
ADD_PATH(NSNetworkDomainMask, gnustepNetworkRoot, appSupDir);
ADD_PATH(NSSystemDomainMask, gnustepSystemRoot, appSupDir);
} }
break; break;
/* Now the GNUstep additions */ /* Now the GNUstep additions */
case GSFrameworksDirectory: case GSFrameworksDirectory:
{ {
NSString *frameDir; ADD_PATH(NSUserDomainMask, gnustepUserLibrary, @"Frameworks");
ADD_PATH(NSLocalDomainMask, gnustepLocalLibrary, @"Frameworks");
frameDir = [libraryDir stringByAppendingPathComponent: frameworkDir]; ADD_PATH(NSNetworkDomainMask, gnustepNetworkLibrary, @"Frameworks");
ADD_PATH(NSUserDomainMask, gnustepUserRoot, frameDir); ADD_PATH(NSSystemDomainMask, gnustepSystemLibrary, @"Frameworks");
ADD_PATH(NSLocalDomainMask, gnustepLocalRoot, frameDir);
ADD_PATH(NSNetworkDomainMask, gnustepNetworkRoot, frameDir);
ADD_PATH(NSSystemDomainMask, gnustepSystemRoot, frameDir);
} }
break; break;
case GSFontsDirectory: case GSFontsDirectory:
{ {
NSString *fontDir; ADD_PATH(NSUserDomainMask, gnustepUserLibrary, @"Fonts");
ADD_PATH(NSLocalDomainMask, gnustepLocalLibrary, @"Fonts");
fontDir = [libraryDir stringByAppendingPathComponent: fontsDir]; ADD_PATH(NSNetworkDomainMask, gnustepNetworkLibrary, @"Fonts");
ADD_PATH(NSUserDomainMask, gnustepUserRoot, fontDir); ADD_PATH(NSSystemDomainMask, gnustepSystemLibrary, @"Fonts");
ADD_PATH(NSLocalDomainMask, gnustepLocalRoot, fontDir);
ADD_PATH(NSNetworkDomainMask, gnustepNetworkRoot, fontDir);
ADD_PATH(NSSystemDomainMask, gnustepSystemRoot, fontDir);
} }
break; break;
case GSLibrariesDirectory: case GSLibrariesDirectory:
{ {
NSString *gslibsDir;
NSString *full = nil; NSString *full = nil;
NSString *part = nil; NSString *part = nil;
gslibsDir = [libraryDir stringByAppendingPathComponent: libsDir];
if ([gnustep_is_flattened boolValue] == NO if ([gnustep_is_flattened boolValue] == NO
&& gnustep_target_cpu != nil && gnustep_target_os != nil) && gnustep_target_cpu != nil && gnustep_target_os != nil)
{ {
@ -1666,27 +1799,24 @@ if (domainMask & mask) \
if (library_combo != nil) if (library_combo != nil)
{ {
full = [part stringByAppendingPathComponent: library_combo]; full = [part stringByAppendingPathComponent: library_combo];
full = [gslibsDir stringByAppendingPathComponent: full];
} }
part = [gslibsDir stringByAppendingPathComponent: part];
} }
ADD_PATH(NSUserDomainMask, gnustepUserRoot, gslibsDir); ADD_PLATFORM_PATH(NSUserDomainMask, gnustepUserLibraries);
if (full) ADD_PATH(NSUserDomainMask, gnustepUserRoot, full); if (full) ADD_PATH(NSUserDomainMask, gnustepUserLibraries, full);
if (part) ADD_PATH(NSUserDomainMask, gnustepUserRoot, part); if (part) ADD_PATH(NSUserDomainMask, gnustepUserLibraries, part);
ADD_PATH(NSLocalDomainMask, gnustepLocalRoot, gslibsDir);
if (full) ADD_PATH(NSLocalDomainMask, gnustepLocalRoot, full);
if (part) ADD_PATH(NSLocalDomainMask, gnustepLocalRoot, part);
ADD_PATH(NSNetworkDomainMask, gnustepNetworkRoot, gslibsDir);
if (full) ADD_PATH(NSNetworkDomainMask, gnustepNetworkRoot, full);
if (part) ADD_PATH(NSNetworkDomainMask, gnustepNetworkRoot, part);
ADD_PATH(NSSystemDomainMask, gnustepSystemRoot, gslibsDir);
if (full) ADD_PATH(NSSystemDomainMask, gnustepSystemRoot, full);
if (part) ADD_PATH(NSSystemDomainMask, gnustepSystemRoot, part);
ADD_PLATFORM_PATH(NSLocalDomainMask, localLibs); ADD_PLATFORM_PATH(NSLocalDomainMask, gnustepLocalLibraries);
ADD_PLATFORM_PATH(NSSystemDomainMask, platformLibs); if (full) ADD_PATH(NSLocalDomainMask, gnustepLocalLibraries, full);
ADD_PLATFORM_PATH(NSSystemDomainMask, osSysLibs); if (part) ADD_PATH(NSLocalDomainMask, gnustepLocalLibraries, part);
ADD_PLATFORM_PATH(NSNetworkDomainMask, gnustepNetworkLibraries);
if (full) ADD_PATH(NSNetworkDomainMask, gnustepNetworkLibraries, full);
if (part) ADD_PATH(NSNetworkDomainMask, gnustepNetworkLibraries, part);
ADD_PLATFORM_PATH(NSSystemDomainMask, gnustepSystemLibraries);
if (full) ADD_PATH(NSSystemDomainMask, gnustepSystemLibraries, full);
if (part) ADD_PATH(NSSystemDomainMask, gnustepSystemLibraries, part);
} }
break; break;
@ -1703,29 +1833,24 @@ if (domainMask & mask) \
if (library_combo != nil) if (library_combo != nil)
{ {
full = [part stringByAppendingPathComponent: library_combo]; full = [part stringByAppendingPathComponent: library_combo];
full = [toolsDir stringByAppendingPathComponent: full];
} }
part = [toolsDir stringByAppendingPathComponent: part];
} }
ADD_PATH(NSUserDomainMask, gnustepUserRoot, toolsDir); ADD_PLATFORM_PATH(NSUserDomainMask, gnustepUserTools);
if (full) ADD_PATH(NSUserDomainMask, gnustepUserRoot, full); if (full) ADD_PATH(NSUserDomainMask, gnustepUserTools, full);
if (part) ADD_PATH(NSUserDomainMask, gnustepUserRoot, part); if (part) ADD_PATH(NSUserDomainMask, gnustepUserTools, part);
ADD_PATH(NSLocalDomainMask, gnustepLocalRoot, toolsDir);
if (full) ADD_PATH(NSLocalDomainMask, gnustepLocalRoot, full);
if (part) ADD_PATH(NSLocalDomainMask, gnustepLocalRoot, part);
ADD_PATH(NSNetworkDomainMask, gnustepNetworkRoot, toolsDir);
if (full) ADD_PATH(NSNetworkDomainMask, gnustepNetworkRoot, full);
if (part) ADD_PATH(NSNetworkDomainMask, gnustepNetworkRoot, part);
ADD_PATH(NSSystemDomainMask, gnustepSystemRoot, toolsDir);
if (full) ADD_PATH(NSSystemDomainMask, gnustepSystemRoot, full);
if (part) ADD_PATH(NSSystemDomainMask, gnustepSystemRoot, part);
ADD_PLATFORM_PATH(NSLocalDomainMask, localApps); ADD_PLATFORM_PATH(NSLocalDomainMask, gnustepLocalTools);
ADD_PLATFORM_PATH(NSSystemDomainMask, platformApps); if (full) ADD_PATH(NSLocalDomainMask, gnustepLocalTools, full);
ADD_PLATFORM_PATH(NSSystemDomainMask, osSysApps); if (part) ADD_PATH(NSLocalDomainMask, gnustepLocalTools, part);
ADD_PLATFORM_PATH(NSSystemDomainMask, platformAdmin);
ADD_PLATFORM_PATH(NSSystemDomainMask, osSysAdmin); ADD_PLATFORM_PATH(NSNetworkDomainMask, gnustepNetworkTools);
if (full) ADD_PATH(NSNetworkDomainMask, gnustepNetworkTools, full);
if (part) ADD_PATH(NSNetworkDomainMask, gnustepNetworkTools, part);
ADD_PLATFORM_PATH(NSSystemDomainMask, gnustepSystemTools);
if (full) ADD_PATH(NSSystemDomainMask, gnustepSystemTools, full);
if (part) ADD_PATH(NSSystemDomainMask, gnustepSystemTools, part);
} }
break; break;
} }

337
configure vendored
View file

@ -878,6 +878,9 @@ Optional Packages:
This is the location to be used by the base This is the location to be used by the base
library to locate path information at library to locate path information at
application or tool runtime. application or tool runtime.
This file might not even exist now; it is
not read at configure time. The base library
will only read it at runtime.
If unspecified, this uses the same value as If unspecified, this uses the same value as
the GNUstep make package on unix-like systems, the GNUstep make package on unix-like systems,
but uses ./GNUstep.conf on mingw so that but uses ./GNUstep.conf on mingw so that
@ -1366,11 +1369,18 @@ echo "$as_me: error: You must have the gnustep-make package installed and set up
{ (exit 1); exit 1; }; } { (exit 1); exit 1; }; }
fi fi
# This variable might get temporarily overwritten with the
# GNUSTEP_MAKEFILES of the runtime configuration, make sure we keep
# track of the original one. CURRENT_GNUSTEP_MAKEFILES is the one
# that we use to locate the actual gnustep-make installation that
# will build the software.
CURRENT_GNUSTEP_MAKEFILES="$GNUSTEP_MAKEFILES"
#-------------------------------------------------------------------- #--------------------------------------------------------------------
# Use config.guess, config.sub and install-sh provided by gnustep-make # Use config.guess, config.sub and install-sh provided by gnustep-make
#-------------------------------------------------------------------- #--------------------------------------------------------------------
ac_aux_dir= ac_aux_dir=
for ac_dir in $GNUSTEP_MAKEFILES $srcdir/$GNUSTEP_MAKEFILES; do for ac_dir in $CURRENT_GNUSTEP_MAKEFILES $srcdir/$CURRENT_GNUSTEP_MAKEFILES; do
if test -f $ac_dir/install-sh; then if test -f $ac_dir/install-sh; then
ac_aux_dir=$ac_dir ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c" ac_install_sh="$ac_aux_dir/install-sh -c"
@ -1386,8 +1396,8 @@ for ac_dir in $GNUSTEP_MAKEFILES $srcdir/$GNUSTEP_MAKEFILES; do
fi fi
done done
if test -z "$ac_aux_dir"; then if test -z "$ac_aux_dir"; then
{ { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $GNUSTEP_MAKEFILES $srcdir/$GNUSTEP_MAKEFILES" >&5 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $CURRENT_GNUSTEP_MAKEFILES $srcdir/$CURRENT_GNUSTEP_MAKEFILES" >&5
echo "$as_me: error: cannot find install-sh or install.sh in $GNUSTEP_MAKEFILES $srcdir/$GNUSTEP_MAKEFILES" >&2;} echo "$as_me: error: cannot find install-sh or install.sh in $CURRENT_GNUSTEP_MAKEFILES $srcdir/$CURRENT_GNUSTEP_MAKEFILES" >&2;}
{ (exit 1); exit 1; }; } { (exit 1); exit 1; }; }
fi fi
ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_guess="$SHELL $ac_aux_dir/config.guess"
@ -1496,17 +1506,17 @@ GNUSTEP_CONFIG_FILE=""
# This requires gnustep-make > 1.13.0 to work. For gnustep-make = # This requires gnustep-make > 1.13.0 to work. For gnustep-make =
# 1.13.0 we would have to parse # 1.13.0 we would have to parse
# $GNUSTEP_MAKEFILES/$obj_dir/config.make, but $obj_dir is not defined # $CURRENT_GNUSTEP_MAKEFILES/$obj_dir/config.make, but $obj_dir is not defined
# yet at this stage in config, not sure if it's worth trying to make # yet at this stage in config, not sure if it's worth trying to make
# it work. For gnustep-make < 1.13.0 we would have to parse # it work. For gnustep-make < 1.13.0 we would have to parse
# $GNUSTEP_MAKEFILES/config.make. # $CURRENT_GNUSTEP_MAKEFILES/config.make.
GNUSTEP_MAKE_CONFIG=`(grep '^GNUSTEP_CONFIG_FILE *=' $GNUSTEP_MAKEFILES/config-noarch.make | sed -e 's/GNUSTEP_CONFIG_FILE *= *\(.*\)/\1/') 2>&5` GNUSTEP_MAKE_CONFIG=`(grep '^GNUSTEP_CONFIG_FILE *=' $CURRENT_GNUSTEP_MAKEFILES/config-noarch.make | sed -e 's/GNUSTEP_CONFIG_FILE *= *\(.*\)/\1/') 2>&5`
# So, for backwards compatiblity, we try the plain config.make too. # So, for backwards compatiblity, we try the plain config.make too.
# This should work with gnustep-make < 1.13.0, and with 1.13.0 too if # This should work with gnustep-make < 1.13.0, and with 1.13.0 too if
# they haven't deleted the file. # they haven't deleted the file.
if test "$GNUSTEP_MAKE_CONFIG" = ""; then if test "$GNUSTEP_MAKE_CONFIG" = ""; then
GNUSTEP_MAKE_CONFIG=`(grep '^GNUSTEP_CONFIG_FILE *=' $GNUSTEP_MAKEFILES/config.make | sed -e 's/GNUSTEP_CONFIG_FILE *= *\(.*\)/\1/') 2>&5` GNUSTEP_MAKE_CONFIG=`(grep '^GNUSTEP_CONFIG_FILE *=' $CURRENT_GNUSTEP_MAKEFILES/config.make | sed -e 's/GNUSTEP_CONFIG_FILE *= *\(.*\)/\1/') 2>&5`
fi fi
@ -1564,6 +1574,14 @@ _ACEOF
echo "${ECHO_T}no: disabled from the command-line" >&6 echo "${ECHO_T}no: disabled from the command-line" >&6
fi fi
#--------------------------------------------------------------------
# We are not trying to determine the default GNUstep paths to be
# used at runtime. So all GNUSTEP_xxx variables from now on are to be
# considered as 'runtime' ones. They refer to paths that might not
# make any sense now, but might make sense once gnustep-base is
# installed in its final location.
#---------------------------------------------------------------------
# #
# Set 'standard' defaults for values from configuration file. # Set 'standard' defaults for values from configuration file.
# #
@ -1602,7 +1620,7 @@ esac
# the built-in default paths in the code will match those of your # the built-in default paths in the code will match those of your
# installation (or of the config file you specify). # installation (or of the config file you specify).
# It can be annoying in certain cases though; this option lets you # It can be annoying in certain cases though; this option lets you
# turn it off # turn it off.
echo "$as_me:$LINENO: checking if we should import an existing configuration file" >&5 echo "$as_me:$LINENO: checking if we should import an existing configuration file" >&5
echo $ECHO_N "checking if we should import an existing configuration file... $ECHO_C" >&6 echo $ECHO_N "checking if we should import an existing configuration file... $ECHO_C" >&6
# Check whether --enable-importing-config-file or --disable-importing-config-file was given. # Check whether --enable-importing-config-file or --disable-importing-config-file was given.
@ -1668,10 +1686,63 @@ echo "$as_me: If this fails, please run configure again with the --disable-impor
fi fi
fi fi
# Now we have the problem of what to do if some of the paths were not
# set by GNUstep.conf (eg, old gnustep-make), or if no config file was
# read, or if the config file was corrupt. We decide that the most
# likely case is an old gnustep-make, so by default we configure the
# other paths basing on GNUSTEP_*_ROOT.
# TODO/FIXME: We should really have better checks once the situation
# has stabilized. This is a reasonable hack for now.
if test x"$GNUSTEP_MAKEFILES" = x""; then GNUSTEP_MAKEFILES=$GNUSTEP_SYSTEM_ROOT/Library/Makefiles; fi
if test x"$GNUSTEP_SYSTEM_APPS" = x""; then GNUSTEP_SYSTEM_APPS=$GNUSTEP_SYSTEM_ROOT/Apps; fi
if test x"$GNUSTEP_SYSTEM_TOOLS" = x""; then GNUSTEP_SYSTEM_TOOLS=$GNUSTEP_SYSTEM_ROOT/Tools; fi
if test x"$GNUSTEP_SYSTEM_LIBRARY" = x""; then GNUSTEP_SYSTEM_LIBRARY=$GNUSTEP_SYSTEM_ROOT/Library; fi
if test x"$GNUSTEP_SYSTEM_LIBRARIES" = x""; then GNUSTEP_SYSTEM_LIBRARIES=$GNUSTEP_SYSTEM_ROOT/Libraries; fi
if test x"$GNUSTEP_SYSTEM_HEADERS" = x""; then GNUSTEP_SYSTEM_HEADERS=$GNUSTEP_SYSTEM_ROOT/Headers; fi
if test x"$GNUSTEP_SYSTEM_DOCUMENTATION" = x""; then GNUSTEP_SYSTEM_DOCUMENTATION=$GNUSTEP_SYSTEM_ROOT/Documentation; fi
if test x"$GNUSTEP_SYSTEM_DOCUMENTATION_MAN" = x""; then GNUSTEP_SYSTEM_DOCUMENTATION_MAN=$GNUSTEP_SYSTEM_ROOT/Documentation/man; fi
if test x"$GNUSTEP_SYSTEM_DOCUMENTATION_INFO" = x""; then GNUSTEP_SYSTEM_DOCUMENTATION_INFO=$GNUSTEP_SYSTEM_ROOT/Documentation/info; fi
if test x"$GNUSTEP_NETWORK_APPS" = x""; then GNUSTEP_NETWORK_APPS=$GNUSTEP_NETWORK_ROOT/Apps; fi
if test x"$GNUSTEP_NETWORK_TOOLS" = x""; then GNUSTEP_NETWORK_TOOLS=$GNUSTEP_NETWORK_ROOT/Tools; fi
if test x"$GNUSTEP_NETWORK_LIBRARY" = x""; then GNUSTEP_NETWORK_LIBRARY=$GNUSTEP_NETWORK_ROOT/Library; fi
if test x"$GNUSTEP_NETWORK_LIBRARIES" = x""; then GNUSTEP_NETWORK_LIBRARIES=$GNUSTEP_NETWORK_ROOT/Libraries; fi
if test x"$GNUSTEP_NETWORK_HEADERS" = x""; then GNUSTEP_NETWORK_HEADERS=$GNUSTEP_NETWORK_ROOT/Headers; fi
if test x"$GNUSTEP_NETWORK_DOCUMENTATION" = x""; then GNUSTEP_NETWORK_DOCUMENTATION=$GNUSTEP_NETWORK_ROOT/Documentation; fi
if test x"$GNUSTEP_NETWORK_DOCUMENTATION_MAN" = x""; then GNUSTEP_NETWORK_DOCUMENTATION_MAN=$GNUSTEP_NETWORK_ROOT/Documentation/man; fi
if test x"$GNUSTEP_NETWORK_DOCUMENTATION_INFO" = x""; then GNUSTEP_NETWORK_DOCUMENTATION_INFO=$GNUSTEP_NETWORK_ROOT/Documentation/info; fi
if test x"$GNUSTEP_LOCAL_APPS" = x""; then GNUSTEP_LOCAL_APPS=$GNUSTEP_LOCAL_ROOT/Apps; fi
if test x"$GNUSTEP_LOCAL_TOOLS" = x""; then GNUSTEP_LOCAL_TOOLS=$GNUSTEP_LOCAL_ROOT/Tools; fi
if test x"$GNUSTEP_LOCAL_LIBRARY" = x""; then GNUSTEP_LOCAL_LIBRARY=$GNUSTEP_LOCAL_ROOT/Library; fi
if test x"$GNUSTEP_LOCAL_LIBRARIES" = x""; then GNUSTEP_LOCAL_LIBRARIES=$GNUSTEP_LOCAL_ROOT/Libraries; fi
if test x"$GNUSTEP_LOCAL_HEADERS" = x""; then GNUSTEP_LOCAL_HEADERS=$GNUSTEP_LOCAL_ROOT/Headers; fi
if test x"$GNUSTEP_LOCAL_DOCUMENTATION" = x""; then GNUSTEP_LOCAL_DOCUMENTATION=$GNUSTEP_LOCAL_ROOT/Documentation; fi
if test x"$GNUSTEP_LOCAL_DOCUMENTATION_MAN" = x""; then GNUSTEP_LOCAL_DOCUMENTATION_MAN=$GNUSTEP_LOCAL_ROOT/Documentation/man; fi
if test x"$GNUSTEP_LOCAL_DOCUMENTATION_INFO" = x""; then GNUSTEP_LOCAL_DOCUMENTATION_INFO=$GNUSTEP_LOCAL_ROOT/Documentation/info; fi
if test x"$GNUSTEP_USER_DIR_APPS" = x""; then GNUSTEP_USER_DIR_APPS=$GNUSTEP_USER_DIR/Apps; fi
if test x"$GNUSTEP_USER_DIR_TOOLS" = x""; then GNUSTEP_USER_DIR_TOOLS=$GNUSTEP_USER_DIR/Tools; fi
if test x"$GNUSTEP_USER_DIR_LIBRARY" = x""; then GNUSTEP_USER_DIR_LIBRARY=$GNUSTEP_USER_DIR/Library; fi
if test x"$GNUSTEP_USER_DIR_LIBRARIES" = x""; then GNUSTEP_USER_DIR_LIBRARIES=$GNUSTEP_USER_DIR/Libraries; fi
if test x"$GNUSTEP_USER_DIR_HEADERS" = x""; then GNUSTEP_USER_DIR_HEADERS=$GNUSTEP_USER_DIR/Headers; fi
if test x"$GNUSTEP_USER_DIR_DOCUMENTATION" = x""; then GNUSTEP_USER_DIR_DOCUMENTATION=$GNUSTEP_USER_DIR/Documentation; fi
if test x"$GNUSTEP_USER_DIR_DOCUMENTATION_MAN" = x""; then GNUSTEP_USER_DIR_DOCUMENTATION_MAN=$GNUSTEP_USER_DIR/Documentation/man; fi
if test x"$GNUSTEP_USER_DIR_DOCUMENTATION_INFO" = x""; then GNUSTEP_USER_DIR_DOCUMENTATION_INFO=$GNUSTEP_USER_DIR/Documentation/info; fi
# #
# 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
# #
GNUSTEP_MAKEFILES=`echo $GNUSTEP_MAKEFILES|sed -e 's/\\\\/\\\\\\\\/g'`
cat >>confdefs.h <<_ACEOF
#define GNUSTEP_TARGET_MAKEFILES "$GNUSTEP_MAKEFILES"
_ACEOF
GNUSTEP_SYSTEM_ROOT=`echo $GNUSTEP_SYSTEM_ROOT|sed -e 's/\\\\/\\\\\\\\/g'` GNUSTEP_SYSTEM_ROOT=`echo $GNUSTEP_SYSTEM_ROOT|sed -e 's/\\\\/\\\\\\\\/g'`
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
@ -1715,17 +1786,257 @@ cat >>confdefs.h <<_ACEOF
_ACEOF _ACEOF
#
# SYSTEM domain paths
#
GNUSTEP_SYSTEM_APPS=`echo $GNUSTEP_SYSTEM_APPS|sed -e 's/\\\\/\\\\\\\\/g'`
cat >>confdefs.h <<_ACEOF
#define GNUSTEP_TARGET_SYSTEM_APPS "$GNUSTEP_SYSTEM_APPS"
_ACEOF
GNUSTEP_SYSTEM_TOOLS=`echo $GNUSTEP_SYSTEM_TOOLS|sed -e 's/\\\\/\\\\\\\\/g'`
cat >>confdefs.h <<_ACEOF
#define GNUSTEP_TARGET_SYSTEM_TOOLS "$GNUSTEP_SYSTEM_TOOLS"
_ACEOF
GNUSTEP_SYSTEM_LIBRARY=`echo $GNUSTEP_SYSTEM_LIBRARY|sed -e 's/\\\\/\\\\\\\\/g'`
cat >>confdefs.h <<_ACEOF
#define GNUSTEP_TARGET_SYSTEM_LIBRARY "$GNUSTEP_SYSTEM_LIBRARY"
_ACEOF
GNUSTEP_SYSTEM_LIBRARIES=`echo $GNUSTEP_SYSTEM_LIBRARIES|sed -e 's/\\\\/\\\\\\\\/g'`
cat >>confdefs.h <<_ACEOF
#define GNUSTEP_TARGET_SYSTEM_LIBRARIES "$GNUSTEP_SYSTEM_LIBRARIES"
_ACEOF
GNUSTEP_SYSTEM_HEADERS=`echo $GNUSTEP_SYSTEM_HEADERS|sed -e 's/\\\\/\\\\\\\\/g'`
cat >>confdefs.h <<_ACEOF
#define GNUSTEP_TARGET_SYSTEM_HEADERS "$GNUSTEP_SYSTEM_HEADERS"
_ACEOF
GNUSTEP_SYSTEM_DOCUMENTATION=`echo $GNUSTEP_SYSTEM_DOCUMENTATION|sed -e 's/\\\\/\\\\\\\\/g'`
cat >>confdefs.h <<_ACEOF
#define GNUSTEP_TARGET_SYSTEM_DOCUMENTATION "$GNUSTEP_SYSTEM_DOCUMENTATION"
_ACEOF
GNUSTEP_SYSTEM_DOCUMENTATION_MAN=`echo $GNUSTEP_SYSTEM_DOCUMENTATION_MAN|sed -e 's/\\\\/\\\\\\\\/g'`
cat >>confdefs.h <<_ACEOF
#define GNUSTEP_TARGET_SYSTEM_DOCUMENTATION_MAN "$GNUSTEP_SYSTEM_DOCUMENTATION_MAN"
_ACEOF
GNUSTEP_SYSTEM_DOCUMENTATION_INFO=`echo $GNUSTEP_SYSTEM_DOCUMENTATION_INFO|sed -e 's/\\\\/\\\\\\\\/g'`
cat >>confdefs.h <<_ACEOF
#define GNUSTEP_TARGET_SYSTEM_DOCUMENTATION_INFO "$GNUSTEP_SYSTEM_DOCUMENTATION_INFO"
_ACEOF
#
# NETWORK domain paths
#
GNUSTEP_NETWORK_APPS=`echo $GNUSTEP_NETWORK_APPS|sed -e 's/\\\\/\\\\\\\\/g'`
cat >>confdefs.h <<_ACEOF
#define GNUSTEP_TARGET_NETWORK_APPS "$GNUSTEP_NETWORK_APPS"
_ACEOF
GNUSTEP_NETWORK_TOOLS=`echo $GNUSTEP_NETWORK_TOOLS|sed -e 's/\\\\/\\\\\\\\/g'`
cat >>confdefs.h <<_ACEOF
#define GNUSTEP_TARGET_NETWORK_TOOLS "$GNUSTEP_NETWORK_TOOLS"
_ACEOF
GNUSTEP_NETWORK_LIBRARY=`echo $GNUSTEP_NETWORK_LIBRARY|sed -e 's/\\\\/\\\\\\\\/g'`
cat >>confdefs.h <<_ACEOF
#define GNUSTEP_TARGET_NETWORK_LIBRARY "$GNUSTEP_NETWORK_LIBRARY"
_ACEOF
GNUSTEP_NETWORK_LIBRARIES=`echo $GNUSTEP_NETWORK_LIBRARIES|sed -e 's/\\\\/\\\\\\\\/g'`
cat >>confdefs.h <<_ACEOF
#define GNUSTEP_TARGET_NETWORK_LIBRARIES "$GNUSTEP_NETWORK_LIBRARIES"
_ACEOF
GNUSTEP_NETWORK_HEADERS=`echo $GNUSTEP_NETWORK_HEADERS|sed -e 's/\\\\/\\\\\\\\/g'`
cat >>confdefs.h <<_ACEOF
#define GNUSTEP_TARGET_NETWORK_HEADERS "$GNUSTEP_NETWORK_HEADERS"
_ACEOF
GNUSTEP_NETWORK_DOCUMENTATION=`echo $GNUSTEP_NETWORK_DOCUMENTATION|sed -e 's/\\\\/\\\\\\\\/g'`
cat >>confdefs.h <<_ACEOF
#define GNUSTEP_TARGET_NETWORK_DOCUMENTATION "$GNUSTEP_NETWORK_DOCUMENTATION"
_ACEOF
GNUSTEP_NETWORK_DOCUMENTATION_MAN=`echo $GNUSTEP_NETWORK_DOCUMENTATION_MAN|sed -e 's/\\\\/\\\\\\\\/g'`
cat >>confdefs.h <<_ACEOF
#define GNUSTEP_TARGET_NETWORK_DOCUMENTATION_MAN "$GNUSTEP_NETWORK_DOCUMENTATION_MAN"
_ACEOF
GNUSTEP_NETWORK_DOCUMENTATION_INFO=`echo $GNUSTEP_NETWORK_DOCUMENTATION_INFO|sed -e 's/\\\\/\\\\\\\\/g'`
cat >>confdefs.h <<_ACEOF
#define GNUSTEP_TARGET_NETWORK_DOCUMENTATION_INFO "$GNUSTEP_NETWORK_DOCUMENTATION_INFO"
_ACEOF
#
# LOCAL domain paths
#
GNUSTEP_LOCAL_APPS=`echo $GNUSTEP_LOCAL_APPS|sed -e 's/\\\\/\\\\\\\\/g'`
cat >>confdefs.h <<_ACEOF
#define GNUSTEP_TARGET_LOCAL_APPS "$GNUSTEP_LOCAL_APPS"
_ACEOF
GNUSTEP_LOCAL_TOOLS=`echo $GNUSTEP_LOCAL_TOOLS|sed -e 's/\\\\/\\\\\\\\/g'`
cat >>confdefs.h <<_ACEOF
#define GNUSTEP_TARGET_LOCAL_TOOLS "$GNUSTEP_LOCAL_TOOLS"
_ACEOF
GNUSTEP_LOCAL_LIBRARY=`echo $GNUSTEP_LOCAL_LIBRARY|sed -e 's/\\\\/\\\\\\\\/g'`
cat >>confdefs.h <<_ACEOF
#define GNUSTEP_TARGET_LOCAL_LIBRARY "$GNUSTEP_LOCAL_LIBRARY"
_ACEOF
GNUSTEP_LOCAL_LIBRARIES=`echo $GNUSTEP_LOCAL_LIBRARIES|sed -e 's/\\\\/\\\\\\\\/g'`
cat >>confdefs.h <<_ACEOF
#define GNUSTEP_TARGET_LOCAL_LIBRARIES "$GNUSTEP_LOCAL_LIBRARIES"
_ACEOF
GNUSTEP_LOCAL_HEADERS=`echo $GNUSTEP_LOCAL_HEADERS|sed -e 's/\\\\/\\\\\\\\/g'`
cat >>confdefs.h <<_ACEOF
#define GNUSTEP_TARGET_LOCAL_HEADERS "$GNUSTEP_LOCAL_HEADERS"
_ACEOF
GNUSTEP_LOCAL_DOCUMENTATION=`echo $GNUSTEP_LOCAL_DOCUMENTATION|sed -e 's/\\\\/\\\\\\\\/g'`
cat >>confdefs.h <<_ACEOF
#define GNUSTEP_TARGET_LOCAL_DOCUMENTATION "$GNUSTEP_LOCAL_DOCUMENTATION"
_ACEOF
GNUSTEP_LOCAL_DOCUMENTATION_MAN=`echo $GNUSTEP_LOCAL_DOCUMENTATION_MAN|sed -e 's/\\\\/\\\\\\\\/g'`
cat >>confdefs.h <<_ACEOF
#define GNUSTEP_TARGET_LOCAL_DOCUMENTATION_MAN "$GNUSTEP_LOCAL_DOCUMENTATION_MAN"
_ACEOF
GNUSTEP_LOCAL_DOCUMENTATION_INFO=`echo $GNUSTEP_LOCAL_DOCUMENTATION_INFO|sed -e 's/\\\\/\\\\\\\\/g'`
cat >>confdefs.h <<_ACEOF
#define GNUSTEP_TARGET_LOCAL_DOCUMENTATION_INFO "$GNUSTEP_LOCAL_DOCUMENTATION_INFO"
_ACEOF
#
# USER_DIR domain paths
#
GNUSTEP_USER_DIR_APPS=`echo $GNUSTEP_USER_DIR_APPS|sed -e 's/\\\\/\\\\\\\\/g'`
cat >>confdefs.h <<_ACEOF
#define GNUSTEP_TARGET_USER_DIR_APPS "$GNUSTEP_USER_DIR_APPS"
_ACEOF
GNUSTEP_USER_DIR_TOOLS=`echo $GNUSTEP_USER_DIR_TOOLS|sed -e 's/\\\\/\\\\\\\\/g'`
cat >>confdefs.h <<_ACEOF
#define GNUSTEP_TARGET_USER_DIR_TOOLS "$GNUSTEP_USER_DIR_TOOLS"
_ACEOF
GNUSTEP_USER_DIR_LIBRARY=`echo $GNUSTEP_USER_DIR_LIBRARY|sed -e 's/\\\\/\\\\\\\\/g'`
cat >>confdefs.h <<_ACEOF
#define GNUSTEP_TARGET_USER_DIR_LIBRARY "$GNUSTEP_USER_DIR_LIBRARY"
_ACEOF
GNUSTEP_USER_DIR_LIBRARIES=`echo $GNUSTEP_USER_DIR_LIBRARIES|sed -e 's/\\\\/\\\\\\\\/g'`
cat >>confdefs.h <<_ACEOF
#define GNUSTEP_TARGET_USER_DIR_LIBRARIES "$GNUSTEP_USER_DIR_LIBRARIES"
_ACEOF
GNUSTEP_USER_DIR_HEADERS=`echo $GNUSTEP_USER_DIR_HEADERS|sed -e 's/\\\\/\\\\\\\\/g'`
cat >>confdefs.h <<_ACEOF
#define GNUSTEP_TARGET_USER_DIR_HEADERS "$GNUSTEP_USER_DIR_HEADERS"
_ACEOF
GNUSTEP_USER_DIR_DOCUMENTATION=`echo $GNUSTEP_USER_DIR_DOCUMENTATION|sed -e 's/\\\\/\\\\\\\\/g'`
cat >>confdefs.h <<_ACEOF
#define GNUSTEP_TARGET_USER_DIR_DOCUMENTATION "$GNUSTEP_USER_DIR_DOCUMENTATION"
_ACEOF
GNUSTEP_USER_DIR_DOCUMENTATION_MAN=`echo $GNUSTEP_USER_DIR_DOCUMENTATION_MAN|sed -e 's/\\\\/\\\\\\\\/g'`
cat >>confdefs.h <<_ACEOF
#define GNUSTEP_TARGET_USER_DIR_DOCUMENTATION_MAN "$GNUSTEP_USER_DIR_DOCUMENTATION_MAN"
_ACEOF
GNUSTEP_USER_DIR_DOCUMENTATION_INFO=`echo $GNUSTEP_USER_DIR_DOCUMENTATION_INFO|sed -e 's/\\\\/\\\\\\\\/g'`
cat >>confdefs.h <<_ACEOF
#define GNUSTEP_TARGET_USER_DIR_DOCUMENTATION_INFO "$GNUSTEP_USER_DIR_DOCUMENTATION_INFO"
_ACEOF
#------------------------------------------------------------------------------
# Now we have finished configuring the default GNUstep filesystem setup of
# the target. All GNUstep variables from now on are
#------------------------------------------------------------------------------
# #
# Now load the values to be used in locating libraries etc used when # Now load the values to be used in locating libraries etc used when
# building the base library ... as supplied by the gnustep-make package # building the base library ... as supplied by the gnustep-make package
# (FIXME - review the whole idea).
# #
# It looks like we ought to source the whole GNUstep.sh here, and even # It looks like we ought to source the whole GNUstep.sh here, and even
# ask it to output all variables! That way we have access to (eg) # ask it to output all variables! That way we have access to (eg)
# GNUSTEP_SYSTEM_HEADERS below. # GNUSTEP_SYSTEM_HEADERS below.
# #
GNUSTEP_SH_EXPORT_ALL_VARIABLES=yes GNUSTEP_SH_EXPORT_ALL_VARIABLES=yes
. "$GNUSTEP_MAKEFILES/GNUstep.sh" . "$CURRENT_GNUSTEP_MAKEFILES/GNUstep.sh"
unset GNUSTEP_SH_EXPORT_ALL_VARIABLES unset GNUSTEP_SH_EXPORT_ALL_VARIABLES
# For backwards compatibility, define GNUSTEP_SYSTEM_HEADERS from # For backwards compatibility, define GNUSTEP_SYSTEM_HEADERS from
@ -3046,8 +3357,8 @@ fi
#-------------------------------------------------------------------- #--------------------------------------------------------------------
# Set location of GNUstep dirs for later use # Set location of GNUstep dirs for later use
if test "$GNUSTEP_IS_FLATTENED" = no; then if test "$GNUSTEP_IS_FLATTENED" = no; then
clean_target_os=`$GNUSTEP_MAKEFILES/clean_os.sh $target_os` clean_target_os=`$CURRENT_GNUSTEP_MAKEFILES/clean_os.sh $target_os`
clean_target_cpu=`$GNUSTEP_MAKEFILES/clean_cpu.sh $target_cpu` clean_target_cpu=`$CURRENT_GNUSTEP_MAKEFILES/clean_cpu.sh $target_cpu`
obj_dir=$clean_target_cpu/$clean_target_os obj_dir=$clean_target_cpu/$clean_target_os
lobj_dir=$clean_target_cpu/$clean_target_os/$LIBRARY_COMBO lobj_dir=$clean_target_cpu/$clean_target_os/$LIBRARY_COMBO
GNUSTEP_LDIR="$GNUSTEP_SYSTEM_LIBRARIES/$obj_dir" GNUSTEP_LDIR="$GNUSTEP_SYSTEM_LIBRARIES/$obj_dir"
@ -3674,7 +3985,7 @@ echo $ECHO_N "checking for objc threading flags... $ECHO_C" >&6
# #
# Get them from gnustep-make which contains the real code to get them # Get them from gnustep-make which contains the real code to get them
# #
objc_threaded=`grep objc_threaded: $GNUSTEP_MAKEFILES/$lobj_dir/config.make | sed -e 's/objc_threaded:=//'` objc_threaded=`grep objc_threaded: $CURRENT_GNUSTEP_MAKEFILES/$lobj_dir/config.make | sed -e 's/objc_threaded:=//'`
# #
echo "$as_me:$LINENO: result: $objc_threaded" >&5 echo "$as_me:$LINENO: result: $objc_threaded" >&5
echo "${ECHO_T}$objc_threaded" >&6 echo "${ECHO_T}$objc_threaded" >&6

View file

@ -36,10 +36,17 @@ 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
# This variable might get temporarily overwritten with the
# GNUSTEP_MAKEFILES of the runtime configuration, make sure we keep
# track of the original one. CURRENT_GNUSTEP_MAKEFILES is the one
# that we use to locate the actual gnustep-make installation that
# will build the software.
CURRENT_GNUSTEP_MAKEFILES="$GNUSTEP_MAKEFILES"
#-------------------------------------------------------------------- #--------------------------------------------------------------------
# Use config.guess, config.sub and install-sh provided by gnustep-make # Use config.guess, config.sub and install-sh provided by gnustep-make
#-------------------------------------------------------------------- #--------------------------------------------------------------------
AC_CONFIG_AUX_DIR($GNUSTEP_MAKEFILES) AC_CONFIG_AUX_DIR($CURRENT_GNUSTEP_MAKEFILES)
#-------------------------------------------------------------------- #--------------------------------------------------------------------
# Use a .h file with #define's, instead of -D command-line switches # Use a .h file with #define's, instead of -D command-line switches
@ -59,17 +66,17 @@ GNUSTEP_CONFIG_FILE=""
# This requires gnustep-make > 1.13.0 to work. For gnustep-make = # This requires gnustep-make > 1.13.0 to work. For gnustep-make =
# 1.13.0 we would have to parse # 1.13.0 we would have to parse
# $GNUSTEP_MAKEFILES/$obj_dir/config.make, but $obj_dir is not defined # $CURRENT_GNUSTEP_MAKEFILES/$obj_dir/config.make, but $obj_dir is not defined
# yet at this stage in config, not sure if it's worth trying to make # yet at this stage in config, not sure if it's worth trying to make
# it work. For gnustep-make < 1.13.0 we would have to parse # it work. For gnustep-make < 1.13.0 we would have to parse
# $GNUSTEP_MAKEFILES/config.make. # $CURRENT_GNUSTEP_MAKEFILES/config.make.
GNUSTEP_MAKE_CONFIG=`(grep '^GNUSTEP_CONFIG_FILE *=' $GNUSTEP_MAKEFILES/config-noarch.make | sed -e 's/GNUSTEP_CONFIG_FILE *= *\(.*\)/\1/') 2>&5` GNUSTEP_MAKE_CONFIG=`(grep '^GNUSTEP_CONFIG_FILE *=' $CURRENT_GNUSTEP_MAKEFILES/config-noarch.make | sed -e 's/GNUSTEP_CONFIG_FILE *= *\(.*\)/\1/') 2>&5`
# So, for backwards compatiblity, we try the plain config.make too. # So, for backwards compatiblity, we try the plain config.make too.
# This should work with gnustep-make < 1.13.0, and with 1.13.0 too if # This should work with gnustep-make < 1.13.0, and with 1.13.0 too if
# they haven't deleted the file. # they haven't deleted the file.
if test "$GNUSTEP_MAKE_CONFIG" = ""; then if test "$GNUSTEP_MAKE_CONFIG" = ""; then
GNUSTEP_MAKE_CONFIG=`(grep '^GNUSTEP_CONFIG_FILE *=' $GNUSTEP_MAKEFILES/config.make | sed -e 's/GNUSTEP_CONFIG_FILE *= *\(.*\)/\1/') 2>&5` GNUSTEP_MAKE_CONFIG=`(grep '^GNUSTEP_CONFIG_FILE *=' $CURRENT_GNUSTEP_MAKEFILES/config.make | sed -e 's/GNUSTEP_CONFIG_FILE *= *\(.*\)/\1/') 2>&5`
fi fi
AC_ARG_WITH(config-file, AC_ARG_WITH(config-file,
@ -77,6 +84,9 @@ AC_ARG_WITH(config-file,
This is the location to be used by the base This is the location to be used by the base
library to locate path information at library to locate path information at
application or tool runtime. application or tool runtime.
This file might not even exist now; it is
not read at configure time. The base library
will only read it at runtime.
If unspecified, this uses the same value as If unspecified, this uses the same value as
the GNUstep make package on unix-like systems, the GNUstep make package on unix-like systems,
but uses ./GNUstep.conf on mingw so that but uses ./GNUstep.conf on mingw so that
@ -137,6 +147,14 @@ else
AC_MSG_RESULT([no: disabled from the command-line]) AC_MSG_RESULT([no: disabled from the command-line])
fi fi
#--------------------------------------------------------------------
# We are not trying to determine the default GNUstep paths to be
# used at runtime. So all GNUSTEP_xxx variables from now on are to be
# considered as 'runtime' ones. They refer to paths that might not
# make any sense now, but might make sense once gnustep-base is
# installed in its final location.
#---------------------------------------------------------------------
# #
# Set 'standard' defaults for values from configuration file. # Set 'standard' defaults for values from configuration file.
# #
@ -175,7 +193,7 @@ esac
# the built-in default paths in the code will match those of your # the built-in default paths in the code will match those of your
# installation (or of the config file you specify). # installation (or of the config file you specify).
# It can be annoying in certain cases though; this option lets you # It can be annoying in certain cases though; this option lets you
# turn it off # turn it off.
AC_MSG_CHECKING([if we should import an existing configuration file]) AC_MSG_CHECKING([if we should import an existing configuration file])
AC_ARG_ENABLE(importing-config-file, AC_ARG_ENABLE(importing-config-file,
[ --disable-importing-config-file [ --disable-importing-config-file
@ -233,10 +251,61 @@ then
fi fi
fi fi
# Now we have the problem of what to do if some of the paths were not
# set by GNUstep.conf (eg, old gnustep-make), or if no config file was
# read, or if the config file was corrupt. We decide that the most
# likely case is an old gnustep-make, so by default we configure the
# other paths basing on GNUSTEP_*_ROOT.
# TODO/FIXME: We should really have better checks once the situation
# has stabilized. This is a reasonable hack for now.
if test x"$GNUSTEP_MAKEFILES" = x""; then GNUSTEP_MAKEFILES=$GNUSTEP_SYSTEM_ROOT/Library/Makefiles; fi
if test x"$GNUSTEP_SYSTEM_APPS" = x""; then GNUSTEP_SYSTEM_APPS=$GNUSTEP_SYSTEM_ROOT/Apps; fi
if test x"$GNUSTEP_SYSTEM_TOOLS" = x""; then GNUSTEP_SYSTEM_TOOLS=$GNUSTEP_SYSTEM_ROOT/Tools; fi
if test x"$GNUSTEP_SYSTEM_LIBRARY" = x""; then GNUSTEP_SYSTEM_LIBRARY=$GNUSTEP_SYSTEM_ROOT/Library; fi
if test x"$GNUSTEP_SYSTEM_LIBRARIES" = x""; then GNUSTEP_SYSTEM_LIBRARIES=$GNUSTEP_SYSTEM_ROOT/Libraries; fi
if test x"$GNUSTEP_SYSTEM_HEADERS" = x""; then GNUSTEP_SYSTEM_HEADERS=$GNUSTEP_SYSTEM_ROOT/Headers; fi
if test x"$GNUSTEP_SYSTEM_DOCUMENTATION" = x""; then GNUSTEP_SYSTEM_DOCUMENTATION=$GNUSTEP_SYSTEM_ROOT/Documentation; fi
if test x"$GNUSTEP_SYSTEM_DOCUMENTATION_MAN" = x""; then GNUSTEP_SYSTEM_DOCUMENTATION_MAN=$GNUSTEP_SYSTEM_ROOT/Documentation/man; fi
if test x"$GNUSTEP_SYSTEM_DOCUMENTATION_INFO" = x""; then GNUSTEP_SYSTEM_DOCUMENTATION_INFO=$GNUSTEP_SYSTEM_ROOT/Documentation/info; fi
if test x"$GNUSTEP_NETWORK_APPS" = x""; then GNUSTEP_NETWORK_APPS=$GNUSTEP_NETWORK_ROOT/Apps; fi
if test x"$GNUSTEP_NETWORK_TOOLS" = x""; then GNUSTEP_NETWORK_TOOLS=$GNUSTEP_NETWORK_ROOT/Tools; fi
if test x"$GNUSTEP_NETWORK_LIBRARY" = x""; then GNUSTEP_NETWORK_LIBRARY=$GNUSTEP_NETWORK_ROOT/Library; fi
if test x"$GNUSTEP_NETWORK_LIBRARIES" = x""; then GNUSTEP_NETWORK_LIBRARIES=$GNUSTEP_NETWORK_ROOT/Libraries; fi
if test x"$GNUSTEP_NETWORK_HEADERS" = x""; then GNUSTEP_NETWORK_HEADERS=$GNUSTEP_NETWORK_ROOT/Headers; fi
if test x"$GNUSTEP_NETWORK_DOCUMENTATION" = x""; then GNUSTEP_NETWORK_DOCUMENTATION=$GNUSTEP_NETWORK_ROOT/Documentation; fi
if test x"$GNUSTEP_NETWORK_DOCUMENTATION_MAN" = x""; then GNUSTEP_NETWORK_DOCUMENTATION_MAN=$GNUSTEP_NETWORK_ROOT/Documentation/man; fi
if test x"$GNUSTEP_NETWORK_DOCUMENTATION_INFO" = x""; then GNUSTEP_NETWORK_DOCUMENTATION_INFO=$GNUSTEP_NETWORK_ROOT/Documentation/info; fi
if test x"$GNUSTEP_LOCAL_APPS" = x""; then GNUSTEP_LOCAL_APPS=$GNUSTEP_LOCAL_ROOT/Apps; fi
if test x"$GNUSTEP_LOCAL_TOOLS" = x""; then GNUSTEP_LOCAL_TOOLS=$GNUSTEP_LOCAL_ROOT/Tools; fi
if test x"$GNUSTEP_LOCAL_LIBRARY" = x""; then GNUSTEP_LOCAL_LIBRARY=$GNUSTEP_LOCAL_ROOT/Library; fi
if test x"$GNUSTEP_LOCAL_LIBRARIES" = x""; then GNUSTEP_LOCAL_LIBRARIES=$GNUSTEP_LOCAL_ROOT/Libraries; fi
if test x"$GNUSTEP_LOCAL_HEADERS" = x""; then GNUSTEP_LOCAL_HEADERS=$GNUSTEP_LOCAL_ROOT/Headers; fi
if test x"$GNUSTEP_LOCAL_DOCUMENTATION" = x""; then GNUSTEP_LOCAL_DOCUMENTATION=$GNUSTEP_LOCAL_ROOT/Documentation; fi
if test x"$GNUSTEP_LOCAL_DOCUMENTATION_MAN" = x""; then GNUSTEP_LOCAL_DOCUMENTATION_MAN=$GNUSTEP_LOCAL_ROOT/Documentation/man; fi
if test x"$GNUSTEP_LOCAL_DOCUMENTATION_INFO" = x""; then GNUSTEP_LOCAL_DOCUMENTATION_INFO=$GNUSTEP_LOCAL_ROOT/Documentation/info; fi
if test x"$GNUSTEP_USER_DIR_APPS" = x""; then GNUSTEP_USER_DIR_APPS=$GNUSTEP_USER_DIR/Apps; fi
if test x"$GNUSTEP_USER_DIR_TOOLS" = x""; then GNUSTEP_USER_DIR_TOOLS=$GNUSTEP_USER_DIR/Tools; fi
if test x"$GNUSTEP_USER_DIR_LIBRARY" = x""; then GNUSTEP_USER_DIR_LIBRARY=$GNUSTEP_USER_DIR/Library; fi
if test x"$GNUSTEP_USER_DIR_LIBRARIES" = x""; then GNUSTEP_USER_DIR_LIBRARIES=$GNUSTEP_USER_DIR/Libraries; fi
if test x"$GNUSTEP_USER_DIR_HEADERS" = x""; then GNUSTEP_USER_DIR_HEADERS=$GNUSTEP_USER_DIR/Headers; fi
if test x"$GNUSTEP_USER_DIR_DOCUMENTATION" = x""; then GNUSTEP_USER_DIR_DOCUMENTATION=$GNUSTEP_USER_DIR/Documentation; fi
if test x"$GNUSTEP_USER_DIR_DOCUMENTATION_MAN" = x""; then GNUSTEP_USER_DIR_DOCUMENTATION_MAN=$GNUSTEP_USER_DIR/Documentation/man; fi
if test x"$GNUSTEP_USER_DIR_DOCUMENTATION_INFO" = x""; then GNUSTEP_USER_DIR_DOCUMENTATION_INFO=$GNUSTEP_USER_DIR/Documentation/info; fi
# #
# 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
# #
GNUSTEP_MAKEFILES=`echo $GNUSTEP_MAKEFILES|sed -e 's/\\\\/\\\\\\\\/g'`
AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_MAKEFILES,
"$GNUSTEP_MAKEFILES",
[Built in default value for GNUstep Makefiles])
GNUSTEP_SYSTEM_ROOT=`echo $GNUSTEP_SYSTEM_ROOT|sed -e 's/\\\\/\\\\\\\\/g'` GNUSTEP_SYSTEM_ROOT=`echo $GNUSTEP_SYSTEM_ROOT|sed -e 's/\\\\/\\\\\\\\/g'`
AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_SYSTEM_ROOT, AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_SYSTEM_ROOT,
"$GNUSTEP_SYSTEM_ROOT", "$GNUSTEP_SYSTEM_ROOT",
@ -266,17 +335,193 @@ AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_CONFIG_FILE,
"$GNUSTEP_CONFIG_FILE", "$GNUSTEP_CONFIG_FILE",
[Built in default value for GNUstep config file]) [Built in default value for GNUstep config file])
#
# SYSTEM domain paths
#
GNUSTEP_SYSTEM_APPS=`echo $GNUSTEP_SYSTEM_APPS|sed -e 's/\\\\/\\\\\\\\/g'`
AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_SYSTEM_APPS,
"$GNUSTEP_SYSTEM_APPS",
[Built in default value for GNUstep system apps])
GNUSTEP_SYSTEM_TOOLS=`echo $GNUSTEP_SYSTEM_TOOLS|sed -e 's/\\\\/\\\\\\\\/g'`
AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_SYSTEM_TOOLS,
"$GNUSTEP_SYSTEM_TOOLS",
[Built in default value for GNUstep system tools])
GNUSTEP_SYSTEM_LIBRARY=`echo $GNUSTEP_SYSTEM_LIBRARY|sed -e 's/\\\\/\\\\\\\\/g'`
AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_SYSTEM_LIBRARY,
"$GNUSTEP_SYSTEM_LIBRARY",
[Built in default value for GNUstep system library])
GNUSTEP_SYSTEM_LIBRARIES=`echo $GNUSTEP_SYSTEM_LIBRARIES|sed -e 's/\\\\/\\\\\\\\/g'`
AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_SYSTEM_LIBRARIES,
"$GNUSTEP_SYSTEM_LIBRARIES",
[Built in default value for GNUstep system libraries])
GNUSTEP_SYSTEM_HEADERS=`echo $GNUSTEP_SYSTEM_HEADERS|sed -e 's/\\\\/\\\\\\\\/g'`
AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_SYSTEM_HEADERS,
"$GNUSTEP_SYSTEM_HEADERS",
[Built in default value for GNUstep system headers])
GNUSTEP_SYSTEM_DOCUMENTATION=`echo $GNUSTEP_SYSTEM_DOCUMENTATION|sed -e 's/\\\\/\\\\\\\\/g'`
AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_SYSTEM_DOCUMENTATION,
"$GNUSTEP_SYSTEM_DOCUMENTATION",
[Built in default value for GNUstep system documentation])
GNUSTEP_SYSTEM_DOCUMENTATION_MAN=`echo $GNUSTEP_SYSTEM_DOCUMENTATION_MAN|sed -e 's/\\\\/\\\\\\\\/g'`
AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_SYSTEM_DOCUMENTATION_MAN,
"$GNUSTEP_SYSTEM_DOCUMENTATION_MAN",
[Built in default value for GNUstep system manpages documentation])
GNUSTEP_SYSTEM_DOCUMENTATION_INFO=`echo $GNUSTEP_SYSTEM_DOCUMENTATION_INFO|sed -e 's/\\\\/\\\\\\\\/g'`
AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_SYSTEM_DOCUMENTATION_INFO,
"$GNUSTEP_SYSTEM_DOCUMENTATION_INFO",
[Built in default value for GNUstep system info documentation])
#
# NETWORK domain paths
#
GNUSTEP_NETWORK_APPS=`echo $GNUSTEP_NETWORK_APPS|sed -e 's/\\\\/\\\\\\\\/g'`
AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_NETWORK_APPS,
"$GNUSTEP_NETWORK_APPS",
[Built in default value for GNUstep network apps])
GNUSTEP_NETWORK_TOOLS=`echo $GNUSTEP_NETWORK_TOOLS|sed -e 's/\\\\/\\\\\\\\/g'`
AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_NETWORK_TOOLS,
"$GNUSTEP_NETWORK_TOOLS",
[Built in default value for GNUstep network tools])
GNUSTEP_NETWORK_LIBRARY=`echo $GNUSTEP_NETWORK_LIBRARY|sed -e 's/\\\\/\\\\\\\\/g'`
AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_NETWORK_LIBRARY,
"$GNUSTEP_NETWORK_LIBRARY",
[Built in default value for GNUstep network library])
GNUSTEP_NETWORK_LIBRARIES=`echo $GNUSTEP_NETWORK_LIBRARIES|sed -e 's/\\\\/\\\\\\\\/g'`
AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_NETWORK_LIBRARIES,
"$GNUSTEP_NETWORK_LIBRARIES",
[Built in default value for GNUstep network libraries])
GNUSTEP_NETWORK_HEADERS=`echo $GNUSTEP_NETWORK_HEADERS|sed -e 's/\\\\/\\\\\\\\/g'`
AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_NETWORK_HEADERS,
"$GNUSTEP_NETWORK_HEADERS",
[Built in default value for GNUstep network headers])
GNUSTEP_NETWORK_DOCUMENTATION=`echo $GNUSTEP_NETWORK_DOCUMENTATION|sed -e 's/\\\\/\\\\\\\\/g'`
AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_NETWORK_DOCUMENTATION,
"$GNUSTEP_NETWORK_DOCUMENTATION",
[Built in default value for GNUstep network documentation])
GNUSTEP_NETWORK_DOCUMENTATION_MAN=`echo $GNUSTEP_NETWORK_DOCUMENTATION_MAN|sed -e 's/\\\\/\\\\\\\\/g'`
AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_NETWORK_DOCUMENTATION_MAN,
"$GNUSTEP_NETWORK_DOCUMENTATION_MAN",
[Built in default value for GNUstep network manpages documentation])
GNUSTEP_NETWORK_DOCUMENTATION_INFO=`echo $GNUSTEP_NETWORK_DOCUMENTATION_INFO|sed -e 's/\\\\/\\\\\\\\/g'`
AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_NETWORK_DOCUMENTATION_INFO,
"$GNUSTEP_NETWORK_DOCUMENTATION_INFO",
[Built in default value for GNUstep network info documentation])
#
# LOCAL domain paths
#
GNUSTEP_LOCAL_APPS=`echo $GNUSTEP_LOCAL_APPS|sed -e 's/\\\\/\\\\\\\\/g'`
AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_LOCAL_APPS,
"$GNUSTEP_LOCAL_APPS",
[Built in default value for GNUstep local apps])
GNUSTEP_LOCAL_TOOLS=`echo $GNUSTEP_LOCAL_TOOLS|sed -e 's/\\\\/\\\\\\\\/g'`
AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_LOCAL_TOOLS,
"$GNUSTEP_LOCAL_TOOLS",
[Built in default value for GNUstep local tools])
GNUSTEP_LOCAL_LIBRARY=`echo $GNUSTEP_LOCAL_LIBRARY|sed -e 's/\\\\/\\\\\\\\/g'`
AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_LOCAL_LIBRARY,
"$GNUSTEP_LOCAL_LIBRARY",
[Built in default value for GNUstep local library])
GNUSTEP_LOCAL_LIBRARIES=`echo $GNUSTEP_LOCAL_LIBRARIES|sed -e 's/\\\\/\\\\\\\\/g'`
AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_LOCAL_LIBRARIES,
"$GNUSTEP_LOCAL_LIBRARIES",
[Built in default value for GNUstep local libraries])
GNUSTEP_LOCAL_HEADERS=`echo $GNUSTEP_LOCAL_HEADERS|sed -e 's/\\\\/\\\\\\\\/g'`
AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_LOCAL_HEADERS,
"$GNUSTEP_LOCAL_HEADERS",
[Built in default value for GNUstep local headers])
GNUSTEP_LOCAL_DOCUMENTATION=`echo $GNUSTEP_LOCAL_DOCUMENTATION|sed -e 's/\\\\/\\\\\\\\/g'`
AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_LOCAL_DOCUMENTATION,
"$GNUSTEP_LOCAL_DOCUMENTATION",
[Built in default value for GNUstep local documentation])
GNUSTEP_LOCAL_DOCUMENTATION_MAN=`echo $GNUSTEP_LOCAL_DOCUMENTATION_MAN|sed -e 's/\\\\/\\\\\\\\/g'`
AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_LOCAL_DOCUMENTATION_MAN,
"$GNUSTEP_LOCAL_DOCUMENTATION_MAN",
[Built in default value for GNUstep local manpages documentation])
GNUSTEP_LOCAL_DOCUMENTATION_INFO=`echo $GNUSTEP_LOCAL_DOCUMENTATION_INFO|sed -e 's/\\\\/\\\\\\\\/g'`
AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_LOCAL_DOCUMENTATION_INFO,
"$GNUSTEP_LOCAL_DOCUMENTATION_INFO",
[Built in default value for GNUstep local info documentation])
#
# USER_DIR domain paths
#
GNUSTEP_USER_DIR_APPS=`echo $GNUSTEP_USER_DIR_APPS|sed -e 's/\\\\/\\\\\\\\/g'`
AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_USER_DIR_APPS,
"$GNUSTEP_USER_DIR_APPS",
[Built in default value for GNUstep user_dir apps])
GNUSTEP_USER_DIR_TOOLS=`echo $GNUSTEP_USER_DIR_TOOLS|sed -e 's/\\\\/\\\\\\\\/g'`
AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_USER_DIR_TOOLS,
"$GNUSTEP_USER_DIR_TOOLS",
[Built in default value for GNUstep user_dir tools])
GNUSTEP_USER_DIR_LIBRARY=`echo $GNUSTEP_USER_DIR_LIBRARY|sed -e 's/\\\\/\\\\\\\\/g'`
AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_USER_DIR_LIBRARY,
"$GNUSTEP_USER_DIR_LIBRARY",
[Built in default value for GNUstep user_dir library])
GNUSTEP_USER_DIR_LIBRARIES=`echo $GNUSTEP_USER_DIR_LIBRARIES|sed -e 's/\\\\/\\\\\\\\/g'`
AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_USER_DIR_LIBRARIES,
"$GNUSTEP_USER_DIR_LIBRARIES",
[Built in default value for GNUstep user_dir libraries])
GNUSTEP_USER_DIR_HEADERS=`echo $GNUSTEP_USER_DIR_HEADERS|sed -e 's/\\\\/\\\\\\\\/g'`
AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_USER_DIR_HEADERS,
"$GNUSTEP_USER_DIR_HEADERS",
[Built in default value for GNUstep user_dir headers])
GNUSTEP_USER_DIR_DOCUMENTATION=`echo $GNUSTEP_USER_DIR_DOCUMENTATION|sed -e 's/\\\\/\\\\\\\\/g'`
AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_USER_DIR_DOCUMENTATION,
"$GNUSTEP_USER_DIR_DOCUMENTATION",
[Built in default value for GNUstep user_dir documentation])
GNUSTEP_USER_DIR_DOCUMENTATION_MAN=`echo $GNUSTEP_USER_DIR_DOCUMENTATION_MAN|sed -e 's/\\\\/\\\\\\\\/g'`
AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_USER_DIR_DOCUMENTATION_MAN,
"$GNUSTEP_USER_DIR_DOCUMENTATION_MAN",
[Built in default value for GNUstep user_dir manpages documentation])
GNUSTEP_USER_DIR_DOCUMENTATION_INFO=`echo $GNUSTEP_USER_DIR_DOCUMENTATION_INFO|sed -e 's/\\\\/\\\\\\\\/g'`
AC_DEFINE_UNQUOTED(GNUSTEP_TARGET_USER_DIR_DOCUMENTATION_INFO,
"$GNUSTEP_USER_DIR_DOCUMENTATION_INFO",
[Built in default value for GNUstep user_dir info documentation])
#------------------------------------------------------------------------------
# Now we have finished configuring the default GNUstep filesystem setup of
# the target. All GNUstep variables from now on are
#------------------------------------------------------------------------------
# #
# Now load the values to be used in locating libraries etc used when # Now load the values to be used in locating libraries etc used when
# building the base library ... as supplied by the gnustep-make package # building the base library ... as supplied by the gnustep-make package
# (FIXME - review the whole idea).
# #
# It looks like we ought to source the whole GNUstep.sh here, and even # It looks like we ought to source the whole GNUstep.sh here, and even
# ask it to output all variables! That way we have access to (eg) # ask it to output all variables! That way we have access to (eg)
# GNUSTEP_SYSTEM_HEADERS below. # GNUSTEP_SYSTEM_HEADERS below.
# #
GNUSTEP_SH_EXPORT_ALL_VARIABLES=yes GNUSTEP_SH_EXPORT_ALL_VARIABLES=yes
. "$GNUSTEP_MAKEFILES/GNUstep.sh" . "$CURRENT_GNUSTEP_MAKEFILES/GNUstep.sh"
unset GNUSTEP_SH_EXPORT_ALL_VARIABLES unset GNUSTEP_SH_EXPORT_ALL_VARIABLES
# For backwards compatibility, define GNUSTEP_SYSTEM_HEADERS from # For backwards compatibility, define GNUSTEP_SYSTEM_HEADERS from
@ -354,8 +599,8 @@ fi
#-------------------------------------------------------------------- #--------------------------------------------------------------------
# Set location of GNUstep dirs for later use # Set location of GNUstep dirs for later use
if test "$GNUSTEP_IS_FLATTENED" = no; then if test "$GNUSTEP_IS_FLATTENED" = no; then
clean_target_os=`$GNUSTEP_MAKEFILES/clean_os.sh $target_os` clean_target_os=`$CURRENT_GNUSTEP_MAKEFILES/clean_os.sh $target_os`
clean_target_cpu=`$GNUSTEP_MAKEFILES/clean_cpu.sh $target_cpu` clean_target_cpu=`$CURRENT_GNUSTEP_MAKEFILES/clean_cpu.sh $target_cpu`
obj_dir=$clean_target_cpu/$clean_target_os obj_dir=$clean_target_cpu/$clean_target_os
lobj_dir=$clean_target_cpu/$clean_target_os/$LIBRARY_COMBO lobj_dir=$clean_target_cpu/$clean_target_os/$LIBRARY_COMBO
GNUSTEP_LDIR="$GNUSTEP_SYSTEM_LIBRARIES/$obj_dir" GNUSTEP_LDIR="$GNUSTEP_SYSTEM_LIBRARIES/$obj_dir"
@ -456,7 +701,7 @@ AC_MSG_CHECKING(for objc threading flags)
# #
# Get them from gnustep-make which contains the real code to get them # Get them from gnustep-make which contains the real code to get them
# #
objc_threaded=`grep objc_threaded: $GNUSTEP_MAKEFILES/$lobj_dir/config.make | sed -e 's/objc_threaded:=//'` objc_threaded=`grep objc_threaded: $CURRENT_GNUSTEP_MAKEFILES/$lobj_dir/config.make | sed -e 's/objc_threaded:=//'`
# #
AC_MSG_RESULT($objc_threaded) AC_MSG_RESULT($objc_threaded)