Fixes for Windows

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@6641 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2000-06-06 16:50:52 +00:00
parent f5c78d02fe
commit 9de41b06f6
21 changed files with 236 additions and 348 deletions

View file

@ -1,3 +1,31 @@
2000-06-06 Adam Fedor <fedor@gnu.org>
* Code cleanup to help with Windows port.
* configure.in: Check for some extra headers. Remove obsolete stuff.
* Source/BinaryCStream.m: Fix includes for WIN32
* Source/NSCalandarDate.m: Likewise.
* Source/NSDate.m: Likewise.
* Source/NSLog.m: Likewise.
* Source/NSPipe.m: Likewise.
* Source/NSProcessInfo.m: Likewise.
* Source/NSRunLoop.m: Likewise.
* Source/NSUserDefaults.m: Likewise.
* Source/StdioStream.m: Likewise.
* Source/UdpPort.m: Likewise.
* Tools/gdomap.c: Likewise.
* Source/Invocation.m (initWithTarget:selector:): Use proper cast.
* Source/NSFileManager.m (-isExecutableFileAtPath): Typo.
* Source/NSPage.m (getpagesize): New function for WIN32
* Source/NSString.m (-indexOfString): New method.
* Source/NSBundle.m (bundle_directory_readable,
bundle_file_readable, _bundle_name_first_match): New functions
use NSFileManager instead of unix dir functions.
(-initWithPath:) Use them.
(-pathForResource:...): Likewise.
(-pathsForResource:...): Likewise.
2000-06-02 Richard Frith-Macdonald <rfm@gnu.org>
* Headers/gnustep/base/NSConnection.h: Changed reply_depth ivar to be

View file

@ -165,6 +165,12 @@
/* Define if you have the <sys/statvfs.h> header file. */
#undef HAVE_SYS_STATVFS_H
/* Define if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
/* Define if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define if you have the <sys/vfs.h> header file. */
#undef HAVE_SYS_VFS_H

View file

@ -30,7 +30,9 @@
#include <Foundation/NSData.h>
#include <Foundation/NSException.h>
#include <math.h>
#ifndef __WIN32__
#ifdef __WIN32__
#include <winsock.h>
#else /* __WIN32__ */
#if HAVE_VALUES_H
#include <values.h> // This gets BITSPERBYTE on Solaris
#endif

View file

@ -597,7 +597,7 @@ my_method_get_next_argument (arglist_t argframe,
{
int copysize;
copysize = objc_sizeof_type(tmptype);
memcpy(datum, (char)va_arg(ap, int), copysize);
memcpy(datum, (char *)va_arg(ap, int), copysize);
} /* default */
}
datum = my_method_get_next_argument (argframe, &tmptype);

View file

@ -104,7 +104,7 @@ after-uninstall::
# Things to do after distcleaning
after-distclean::
rm -f Foundation/config.h Foundation/GSConfig.h Foundation/dynamic-load.h \
mframe/mframe.h Foundation base \
Foundation/preface.h mframe/mframe.h Foundation base \
NSNumber[0-9]*.m NSValue[0-9]*.m o_*_bas.m
rm -rf $(GNUSTEP_TARGET_CPU)

View file

@ -39,31 +39,7 @@
#include <Foundation/NSMapTable.h>
#include <Foundation/NSAutoreleasePool.h>
#include <Foundation/NSFileManager.h>
#include <sys/stat.h>
#ifndef __WIN32__
#include <unistd.h>
#include <sys/param.h> /* Needed by sys/stat */
#endif
/* For DIR and diropen() */
#if HAVE_DIRENT_H
# include <dirent.h>
# define NAMLEN(dirent) strlen((dirent)->d_name)
#else
# define dirent direct
# define NAMLEN(dirent) (dirent)->d_namlen
# if HAVE_SYS_NDIR_H
# include <sys/ndir.h>
# endif
# if HAVE_SYS_DIR_H
# include <sys/dir.h>
# endif
# if HAVE_NDIR_H
# include <ndir.h>
# endif
#endif
typedef enum {
NSBUNDLE_BUNDLE = 1, NSBUNDLE_APPLICATION, NSBUNDLE_LIBRARY
@ -131,6 +107,26 @@ objc_executable_location( void )
return [[[NSBundle mainBundle] bundlePath] cString];
}
static BOOL
bundle_directory_readable(NSString *path)
{
NSFileManager *mgr = [NSFileManager defaultManager];
BOOL directory;
if (![mgr fileExistsAtPath: path isDirectory: &directory]
|| !directory)
return NO;
return [mgr isReadableFileAtPath: path];
}
static BOOL
bundle_file_readable(NSString *path)
{
NSFileManager *mgr = [NSFileManager defaultManager];
return [mgr isReadableFileAtPath: path];
}
/* Get the object file that should be located in the bundle of the same name */
static NSString *
bundle_object_name(NSString *path, NSString* executable)
@ -186,35 +182,21 @@ _bundle_resource_path(NSString *primary, NSString* bundlePath, NSString *lang)
/* Find the first directory entry with a given name (with any extension) */
static NSString *
_bundle_path_for_name(NSString* path, NSString* name)
_bundle_name_first_match(NSString* directory, NSString* name)
{
#ifdef __WIN32__
return nil;
#else
DIR *thedir;
struct dirent *entry;
NSString *fullname;
NSFileManager *mgr = [NSFileManager defaultManager];
NSEnumerator *filelist;
NSString *path, *match;
fullname = NULL;
thedir = opendir([path cString]);
if(thedir)
path = [directory stringByAppendingPathComponent: name];
filelist = [[mgr directoryContentsAtPath: directory] objectEnumerator];
while ((match = [filelist nextObject]))
{
while ((entry = readdir(thedir)))
{
if (*(entry->d_name) != '.'
&& strncmp([name cString], entry->d_name, [name length]) == 0)
{
fullname = [NSString stringWithCString: entry->d_name];
break;
}
}
closedir(thedir);
if ([path isEqual: [match stringByDeletingPathExtension]])
return match;
}
if (!fullname)
return nil;
return [path stringByAppendingPathComponent: fullname];
#endif
return nil;
}
@interface NSBundle (Private)
@ -410,7 +392,6 @@ _bundle_load_callback(Class theClass, Category *theCategory)
- initWithPath:(NSString *)path;
{
struct stat statbuf;
[super init];
if (!path || [path length] == 0)
@ -453,7 +434,7 @@ _bundle_load_callback(Class theClass, Category *theCategory)
}
[load_lock unlock];
if (stat([path cString], &statbuf) != 0)
if (bundle_directory_readable(path) == NO)
{
NSDebugMLLog(@"NSBundle", @"Could not access path %@ for bundle", path);
//[self dealloc];
@ -649,7 +630,7 @@ _bundle_load_callback(Class theClass, Category *theCategory)
enumerate = [languages objectEnumerator];
while ((language = [enumerate nextObject]))
[array addObject: _bundle_resource_path(primary, bundlePath, language)];
primary = rootPath;
[array addObject: _bundle_resource_path(primary, bundlePath, nil)];
enumerate = [languages objectEnumerator];
@ -665,9 +646,8 @@ _bundle_load_callback(Class theClass, Category *theCategory)
inDirectory: (NSString *)bundlePath
withVersion: (int)version
{
NSString *path;
NSArray* paths;
NSEnumerator* enumerate;
NSString *path, *fullpath;
NSEnumerator* pathlist;
if (!name || [name length] == 0)
{
@ -676,19 +656,19 @@ _bundle_load_callback(Class theClass, Category *theCategory)
/* NOT REACHED */
}
paths = [NSBundle _bundleResourcePathsWithRootPath: rootPath
subPath: bundlePath];
enumerate = [paths objectEnumerator];
while((path = [enumerate nextObject]))
pathlist = [[NSBundle _bundleResourcePathsWithRootPath: rootPath
subPath: bundlePath] objectEnumerator];
fullpath = nil;
while((path = [pathlist nextObject]))
{
NSString* fullpath = nil;
if (!bundle_directory_readable(path))
continue;
if (ext && [ext length] != 0)
{
struct stat statbuf;
fullpath = [path stringByAppendingPathComponent:
[NSString stringWithFormat: @"%@.%@", name, ext]];
if ( stat([fullpath cString], &statbuf) == 0)
if ( bundle_file_readable(fullpath) )
{
if (gnustep_target_os)
{
@ -696,7 +676,7 @@ _bundle_load_callback(Class theClass, Category *theCategory)
platpath = [path stringByAppendingPathComponent:
[NSString stringWithFormat: @"%@-%@.%@",
name, gnustep_target_os, ext]];
if ( stat([platpath cString], &statbuf) == 0)
if ( bundle_file_readable(platpath) )
fullpath = platpath;
}
}
@ -705,40 +685,22 @@ _bundle_load_callback(Class theClass, Category *theCategory)
}
else
{
struct stat statbuf;
fullpath = [path stringByAppendingPathComponent:
[NSString stringWithFormat: @"%@", name]];
if ( stat([fullpath cString], &statbuf) == 0)
fullpath = _bundle_name_first_match(path, name);
if (fullpath && gnustep_target_os)
{
if (gnustep_target_os)
{
NSString* platpath;
platpath = [path stringByAppendingPathComponent:
[NSString stringWithFormat: @"%@-%@",
name, gnustep_target_os]];
if ( stat([platpath cString], &statbuf) == 0)
fullpath = platpath;
}
}
else
{
fullpath = _bundle_path_for_name(path, name);
if (fullpath && gnustep_target_os)
{
NSString* platpath;
platpath = _bundle_path_for_name(path,
[NSString stringWithFormat: @"%@-%@",
name, gnustep_target_os]);
if (platpath)
fullpath = platpath;
}
NSString* platpath;
platpath = _bundle_name_first_match(path,
[NSString stringWithFormat: @"%@-%@",
name, gnustep_target_os]);
if (platpath)
fullpath = platpath;
}
}
if (fullpath)
return fullpath;
break;
}
return nil;
return fullpath;
}
+ (NSString *) pathForResource: (NSString *)name
@ -786,42 +748,30 @@ _bundle_load_callback(Class theClass, Category *theCategory)
- (NSArray *) pathsForResourcesOfType: (NSString *)extension
inDirectory: (NSString *)bundlePath
{
BOOL allfiles;
NSString *path;
NSArray* paths;
NSMutableArray* resources;
NSEnumerator* enumerate;
NSMutableArray *resources;
NSEnumerator *pathlist;
NSFileManager *mgr = [NSFileManager defaultManager];
paths = [NSBundle _bundleResourcePathsWithRootPath: [self bundlePath]
subPath: bundlePath];
enumerate = [paths objectEnumerator];
pathlist = [[NSBundle _bundleResourcePathsWithRootPath: [self bundlePath]
subPath: bundlePath] objectEnumerator];
resources = [NSMutableArray arrayWithCapacity: 2];
#ifdef __WIN32__
#else
while((path = [enumerate nextObject]))
{
DIR *thedir;
struct dirent *entry;
allfiles = (extension == nil || [extension length] == 0);
thedir = opendir([path cString]);
if (thedir)
while((path = [pathlist nextObject]))
{
NSEnumerator *filelist;
NSString *match;
filelist = [[mgr directoryContentsAtPath: path] objectEnumerator];
while ((match = [filelist nextObject]))
{
while ((entry = readdir(thedir)))
{
if (*entry->d_name != '.')
{
char* ext;
ext = strrchr(entry->d_name, '.');
if (!extension || [extension length] == 0
|| (ext && strcmp(++ext, [extension cString]) == 0))
[resources addObject:
[path stringByAppendingPathComponent:
[NSString stringWithCString: entry->d_name]]];
}
}
closedir(thedir);
if (allfiles || [extension isEqual: [match pathExtension]])
[resources addObject: match];
}
}
#endif
return resources;
}

View file

@ -31,15 +31,8 @@
#include <Foundation/NSException.h>
#include <Foundation/NSUserDefaults.h>
#include <base/behavior.h>
#ifndef __WIN32__
#include <time.h>
#endif /* !__WIN32__ */
#include <stdio.h>
#include <stdlib.h>
#ifndef __WIN32__
#include <sys/time.h>
#endif /* !__WIN32__ */
// Absolute Gregorian date for NSDate reference date Jan 01 2001
//

View file

@ -36,14 +36,12 @@
#include <base/preface.h>
#include <base/behavior.h>
#include <base/fast.x>
#ifndef __WIN32__
#if HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#include <time.h>
#endif /* !__WIN32__ */
#include <stdio.h>
#include <stdlib.h>
#ifndef __WIN32__
#include <sys/time.h>
#endif /* !__WIN32__ */
/* The number of seconds between 1/1/2001 and 1/1/1970 = -978307200. */
/* This number comes from:

View file

@ -801,7 +801,7 @@ static NSFileManager* defaultManager = nil;
if (res == WIN32ERR)
return NO;
if (len > 4 && strcmp(&path[len-4], ".exe") == 0)
if (len > 4 && strcmp(&cpath[len-4], ".exe") == 0)
return YES;
return NO;
#else

View file

@ -34,9 +34,7 @@
#include <syslog.h>
#endif
#ifndef __WIN32__
#include <unistd.h>
#endif
static void
_NSLog_standard_printf_handler (NSString* message)

View file

@ -39,7 +39,14 @@
#endif
#ifdef __WIN32__
#define getpagesize() vm_page_size
#include <malloc.h>
static size_t
getpagesize(void)
{
SYSTEM_INFO info;
GetSystemInfo(&info);
return info.dwPageSize;
}
#endif
#ifdef __SOLARIS__

View file

@ -25,10 +25,7 @@
#include <base/preface.h>
#include <Foundation/NSObject.h>
#include <Foundation/NSFileHandle.h>
#ifndef __WIN32__
#include <unistd.h>
#endif
@implementation NSPipe

View file

@ -53,6 +53,7 @@
#include <config.h>
#include <base/preface.h>
#include <unistd.h>
#ifdef HAVE_STRERROR
#include <errno.h>

View file

@ -38,11 +38,13 @@
#include <Foundation/NSDebug.h>
#include <Foundation/NSDebug.h>
#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#if !defined(__WIN32__) || defined(__CYGWIN__)
#include <time.h>
#endif
#if HAVE_SYS_TIME_H
#include <sys/time.h>
#endif /* !__WIN32__ */
#endif
#include <time.h>
#include <limits.h>
#include <string.h> /* for memset() */

View file

@ -739,21 +739,21 @@ handle_printf_atsign (FILE *stream,
for this */
case 'd': case 'i': case 'o':
case 'x': case 'X': case 'u': case 'c':
va_arg(arg_list, int);
(void)va_arg(arg_list, int);
break;
case 's':
if (*(spec_pos - 1) == '*')
va_arg(arg_list, int*);
va_arg(arg_list, char*);
(void)va_arg(arg_list, int*);
(void)va_arg(arg_list, char*);
break;
case 'f': case 'e': case 'E': case 'g': case 'G':
va_arg(arg_list, double);
(void)va_arg(arg_list, double);
break;
case 'p':
va_arg(arg_list, void*);
(void)va_arg(arg_list, void*);
break;
case 'n':
va_arg(arg_list, int*);
(void)va_arg(arg_list, int*);
break;
#endif /* NOT powerpc */
case '\0':
@ -1103,6 +1103,22 @@ handle_printf_atsign (FILE *stream,
return strRangeNsNs(self, aString, mask, aRange);
}
- (unsigned int) indexOfString: (NSString *)substring
{
NSRange range = {0, [self length]};
range = [self rangeOfString:substring options:0 range:range];
return range.length ? range.location : NSNotFound;
}
- (unsigned int) indexOfString: (NSString*)substring fromIndex: (unsigned)index
{
NSRange range = {index, [self length]-index};
range = [self rangeOfString:substring options:0 range:range];
return range.length ? range.location : NSNotFound;
}
// Determining Composed Character Sequences
- (NSRange) rangeOfComposedCharacterSequenceAtIndex: (unsigned)anIndex

View file

@ -24,15 +24,6 @@
#include <config.h>
#include <base/preface.h>
#if 0
/* My Linux doesn't have <libc.h>. Why is this necessary?
What is a work-around that will work for all? -mccallum*/
#include <libc.h>
/* If POSIX then: #include <unistd.h> */
#endif /* 0 */
#if !defined(__WIN32__)
#include <pwd.h>
#endif
#include <sys/stat.h>
#include <sys/types.h>
#include <errno.h>

View file

@ -35,10 +35,6 @@
#include <string.h>
#include <unistd.h> /* SEEK_* on SunOS 4 */
#ifdef __WIN32__
#define fdopen _fdopen
#endif
enum {
STREAM_READONLY = 0,
STREAM_READWRITE,

View file

@ -31,13 +31,15 @@
#include <Foundation/NSLock.h>
#include <Foundation/NSException.h>
#include <Foundation/NSHost.h>
#ifndef __WIN32__
#include <unistd.h>
#endif /* !__WIN32__ */
#if _AIX
#include <sys/select.h>
#endif /* _AIX */
#ifndef __WIN32__
#ifdef __WIN32__
#include <winsock.h>
#else
#include <netdb.h>
#include <time.h>
#include <sys/time.h>

View file

@ -23,8 +23,8 @@
#include <stdio.h>
#include <stdlib.h>
#ifndef __WIN32__
#include <unistd.h> /* for gethostname() */
#ifndef __WIN32__
#include <sys/param.h> /* for MAXHOSTNAMELEN */
#include <sys/types.h>
#include <netinet/in.h>
@ -34,7 +34,9 @@
#include <limits.h>
#include <string.h> /* for strchr() */
#include <ctype.h> /* for strchr() */
#ifndef __WIN32__
#ifdef __WIN32__
#include <winsock.h>
#else
#include <sys/time.h>
#include <sys/resource.h>
#include <netdb.h>

205
configure vendored
View file

@ -2695,7 +2695,7 @@ else
fi
done
for ac_hdr in sys/mount.h
for ac_hdr in sys/mount.h sys/types.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
@ -2795,7 +2795,7 @@ done
# These two headers (functions) needed by Time.m
#--------------------------------------------------------------------
for ac_hdr in sys/rusage.h ucbinclude/sys/resource.h
for ac_hdr in sys/time.h sys/rusage.h ucbinclude/sys/resource.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
@ -2920,10 +2920,6 @@ fi
done
if test $ac_cv_header_sys_socket_h = no -o $ac_cv_header_netinet_in_h = no ; then
{ echo "configure: error: Could not find socket and networking headers" 1>&2; exit 1; }
fi
#--------------------------------------------------------------------
# These headers/functions needed by NSLog.m
#--------------------------------------------------------------------
@ -2931,17 +2927,17 @@ for ac_hdr in syslog.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2935: checking for $ac_hdr" >&5
echo "configure:2931: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2940 "configure"
#line 2936 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2945: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2941: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@ -2970,12 +2966,12 @@ done
for ac_func in syslog
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:2974: checking for $ac_func" >&5
echo "configure:2970: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2979 "configure"
#line 2975 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -2998,7 +2994,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:3002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -3029,12 +3025,12 @@ done
for ac_func in vsprintf vasprintf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3033: checking for $ac_func" >&5
echo "configure:3029: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3038 "configure"
#line 3034 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -3057,7 +3053,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:3061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -3086,11 +3082,11 @@ if test $ac_cv_func_vsprintf = yes ; then
VSPRINTF_RETURNS_LENGTH=1
else
cat > conftest.$ac_ext <<EOF
#line 3090 "configure"
#line 3086 "configure"
#include "confdefs.h"
#include "$srcdir/config/config.vsprintf.c"
EOF
if { (eval echo configure:3094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:3090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
VSPRINTF_RETURNS_LENGTH=1
else
@ -3112,11 +3108,11 @@ if test $ac_cv_func_vasprintf = yes ; then
VASPRINTF_RETURNS_LENGTH=1
else
cat > conftest.$ac_ext <<EOF
#line 3116 "configure"
#line 3112 "configure"
#include "confdefs.h"
#include "$srcdir/config/config.vasprintf.c"
EOF
if { (eval echo configure:3120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:3116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
VASPRINTF_RETURNS_LENGTH=1
else
@ -3140,12 +3136,12 @@ fi
for ac_func in getcwd
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3144: checking for $ac_func" >&5
echo "configure:3140: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3149 "configure"
#line 3145 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -3168,7 +3164,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:3172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -3201,12 +3197,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
echo "configure:3205: checking for $ac_hdr that defines DIR" >&5
echo "configure:3201: checking for $ac_hdr that defines DIR" >&5
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3210 "configure"
#line 3206 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
@ -3214,7 +3210,7 @@ int main() {
DIR *dirp = 0;
; return 0; }
EOF
if { (eval echo configure:3218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3214: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
@ -3239,7 +3235,7 @@ done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
echo "configure:3243: checking for opendir in -ldir" >&5
echo "configure:3239: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -3247,7 +3243,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3251 "configure"
#line 3247 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -3258,7 +3254,7 @@ int main() {
opendir()
; return 0; }
EOF
if { (eval echo configure:3262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -3280,7 +3276,7 @@ fi
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
echo "configure:3284: checking for opendir in -lx" >&5
echo "configure:3280: checking for opendir in -lx" >&5
ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -3288,7 +3284,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3292 "configure"
#line 3288 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -3299,7 +3295,7 @@ int main() {
opendir()
; return 0; }
EOF
if { (eval echo configure:3303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -3328,12 +3324,12 @@ fi
for ac_func in valloc
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3332: checking for $ac_func" >&5
echo "configure:3328: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3337 "configure"
#line 3333 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -3356,7 +3352,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:3360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -3387,12 +3383,12 @@ done
for ac_func in times
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3391: checking for $ac_func" >&5
echo "configure:3387: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3396 "configure"
#line 3392 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -3415,7 +3411,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:3419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -3446,12 +3442,12 @@ done
for ac_func in mkstemp
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3450: checking for $ac_func" >&5
echo "configure:3446: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3455 "configure"
#line 3451 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -3474,7 +3470,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:3478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -3501,12 +3497,12 @@ done
for ac_func in shmctl
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3505: checking for $ac_func" >&5
echo "configure:3501: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3510 "configure"
#line 3506 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -3529,7 +3525,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:3533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -3556,12 +3552,12 @@ done
for ac_func in mmap
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3560: checking for $ac_func" >&5
echo "configure:3556: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3565 "configure"
#line 3561 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -3584,7 +3580,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:3588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -3611,12 +3607,12 @@ done
for ac_func in mkstemp
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3615: checking for $ac_func" >&5
echo "configure:3611: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3620 "configure"
#line 3616 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -3639,7 +3635,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:3643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -3670,12 +3666,12 @@ done
for ac_func in inet_aton
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3674: checking for $ac_func" >&5
echo "configure:3670: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3679 "configure"
#line 3675 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -3698,7 +3694,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:3702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -3729,12 +3725,12 @@ done
for ac_func in killpg setpgrp setpgid
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3733: checking for $ac_func" >&5
echo "configure:3729: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3738 "configure"
#line 3734 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -3757,7 +3753,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:3761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -3782,7 +3778,7 @@ fi
done
echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
echo "configure:3786: checking whether setpgrp takes no argument" >&5
echo "configure:3782: checking whether setpgrp takes no argument" >&5
if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -3790,7 +3786,7 @@ else
{ echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
#line 3794 "configure"
#line 3790 "configure"
#include "confdefs.h"
#ifdef HAVE_UNISTD_H
@ -3810,7 +3806,7 @@ main()
}
EOF
if { (eval echo configure:3814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:3810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_setpgrp_void=no
else
@ -3840,12 +3836,12 @@ fi
for ac_func in usleep
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3844: checking for $ac_func" >&5
echo "configure:3840: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3849 "configure"
#line 3845 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -3868,7 +3864,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:3872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -3899,12 +3895,12 @@ done
for ac_func in strerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3903: checking for $ac_func" >&5
echo "configure:3899: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3908 "configure"
#line 3904 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -3927,7 +3923,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:3931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -3956,12 +3952,12 @@ done
# This function needed by NSString for handling of %@ printf directive.
#--------------------------------------------------------------------
echo $ac_n "checking for register_printf_function""... $ac_c" 1>&6
echo "configure:3960: checking for register_printf_function" >&5
echo "configure:3956: checking for register_printf_function" >&5
if eval "test \"`echo '$''{'ac_cv_func_register_printf_function'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3965 "configure"
#line 3961 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char register_printf_function(); below. */
@ -3984,7 +3980,7 @@ register_printf_function();
; return 0; }
EOF
if { (eval echo configure:3988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_register_printf_function=yes"
else
@ -4009,11 +4005,11 @@ if test $register_printf = 1; then
working_register_printf=1
else
cat > conftest.$ac_ext <<EOF
#line 4013 "configure"
#line 4009 "configure"
#include "confdefs.h"
#include "$srcdir/config/config.printf.c"
EOF
if { (eval echo configure:4017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:4013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
working_register_printf=1
else
@ -4039,12 +4035,12 @@ fi
for ac_func in realpath
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:4043: checking for $ac_func" >&5
echo "configure:4039: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4048 "configure"
#line 4044 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -4067,7 +4063,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:4071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:4067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -4097,7 +4093,7 @@ done
# Used in critical cases by NSProcessInfo.m
#--------------------------------------------------------------------
echo $ac_n "checking program_invocation_name in C Library""... $ac_c" 1>&6
echo "configure:4101: checking program_invocation_name in C Library" >&5
echo "configure:4097: checking program_invocation_name in C Library" >&5
if eval "test \"`echo '$''{'program_invocation_name_worked'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4105,7 +4101,7 @@ else
program_invocation_name_worked=no
else
cat > conftest.$ac_ext <<EOF
#line 4109 "configure"
#line 4105 "configure"
#include "confdefs.h"
#include <string.h>
@ -4117,7 +4113,7 @@ main (int argc, char *argv[])
}
EOF
if { (eval echo configure:4121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:4117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
program_invocation_name_worked=yes
else
@ -4146,7 +4142,7 @@ fi
# Needed by NSProcessInfo.m
#--------------------------------------------------------------------
echo $ac_n "checking kernel support for /proc filesystem""... $ac_c" 1>&6
echo "configure:4150: checking kernel support for /proc filesystem" >&5
echo "configure:4146: checking kernel support for /proc filesystem" >&5
if (grep proc /etc/fstab >/dev/null 2>/dev/null); then
sys_proc_fs=yes;
cat >> confdefs.h <<\EOF
@ -4169,7 +4165,7 @@ fi
sys_proc_fs_exe=no;
if test $sys_proc_fs = yes; then
echo $ac_n "checking link to executable in /proc""... $ac_c" 1>&6
echo "configure:4173: checking link to executable in /proc" >&5
echo "configure:4169: checking link to executable in /proc" >&5
if test -L /proc/self/exe; then
sys_proc_fs_exe=yes;
echo "$ac_t""yes" 1>&6
@ -4181,17 +4177,17 @@ fi
#--------------------------------------------------------------------
# Check if short and int values need to be word aligned
#--------------------------------------------------------------------
echo $ac_n "checking short/int need to be word aligned""... $ac_c" 1>&6
echo "configure:4186: checking short/int need to be word aligned" >&5
echo $ac_n "checking short/int needs to be word aligned""... $ac_c" 1>&6
echo "configure:4182: checking short/int needs to be word aligned" >&5
if test "$cross_compiling" = yes; then
NEED_WORD_ALIGNMENT=1
else
cat > conftest.$ac_ext <<EOF
#line 4191 "configure"
#line 4187 "configure"
#include "confdefs.h"
#include "$srcdir/config/config.align.c"
EOF
if { (eval echo configure:4195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:4191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
NEED_WORD_ALIGNMENT=0
else
@ -4213,52 +4209,6 @@ else
echo "$ac_t""no" 1>&6
fi
#--------------------------------------------------------------------
# Tools for making a DLL.
#--------------------------------------------------------------------
DLLTOOL='dlltool'
#--------------------------------------------------------------------
# Custom configuration based upon the target
#--------------------------------------------------------------------
# On some platforms, ld doesn't link in the complete library which
# can cause problems with the dynamic nature of ObjC. Programs call
# methods for classes which don't exist in the executable!!
# The variables turn on/off the behaviour of ld to include the
# whole archive.
# Note that executable sizes will be larger.
# Note that these variables are passed to GCC not ld directly
whole_archive=''
no_whole_archive=''
case "${target}" in
i[345]86-*-cygwin32)
whole_archive='-Wl,--whole-archive'
no_whole_archive='-Wl,--no-whole-archive'
LIBS="$LIBS -ladvapi32"
# -pipe not supported
PIPE=''
;;
i[345]86-*-mingw32)
whole_archive='-Wl,--whole-archive'
no_whole_archive='-Wl,--no-whole-archive'
LIBS="$LIBS -lwsock32 -ladvapi32 -luser32"
# Shared library is a DLL
if [ x$SHARED_LIBRARY != x ]; then
SHARED_LIBRARY='lib$(LIBRARY_NAME).dll'
# Rename static library if also building a shared library
if [ x$STATIC_LIBRARY != x ]; then
STATIC_LIBRARY='lib$(LIBRARY_NAME)_s$(LIBEXT)'
IMPORT_LIBRARY='lib$(LIBRARY_NAME)$(LIBEXT)'
fi
fi
# -pipe not supported
PIPE=''
;;
esac
#--------------------------------------------------------------------
# Include redefinition of main () only if needed.
# On some systems - force redefinition to be used as the /proc stuff
@ -4490,7 +4440,6 @@ s%@_GSC_S_INT@%$_GSC_S_INT%g
s%@_GSC_S_LNG@%$_GSC_S_LNG%g
s%@_GSC_S_LNG_LNG@%$_GSC_S_LNG_LNG%g
s%@DYNAMIC_LINKER@%$DYNAMIC_LINKER%g
s%@DLLTOOL@%$DLLTOOL%g
s%@GS_FAKE_MAIN@%$GS_FAKE_MAIN%g
s%@whole_archive@%$whole_archive%g
s%@no_whole_archive@%$no_whole_archive%g

View file

@ -498,7 +498,7 @@ AC_CHECK_HEADERS(values.h)
# Header files and functions for files and filesystems
#--------------------------------------------------------------------
AC_CHECK_HEADERS(sys/stat.h sys/vfs.h sys/statfs.h sys/statvfs.h pwd.h grp.h)
AC_CHECK_HEADERS(sys/mount.h)
AC_CHECK_HEADERS(sys/mount.h sys/types.h)
AC_CHECK_FUNCS(statvfs)
#--------------------------------------------------------------------
@ -506,7 +506,7 @@ AC_CHECK_FUNCS(statvfs)
#--------------------------------------------------------------------
dnl AC_REPLACE_FUNCS(getrusage gettimeofday)
AC_CHECK_HEADERS(sys/rusage.h ucbinclude/sys/resource.h)
AC_CHECK_HEADERS(sys/time.h sys/rusage.h ucbinclude/sys/resource.h)
#--------------------------------------------------------------------
# These headers/functions needed by TcpPort.m
@ -515,10 +515,6 @@ AC_CHECK_HEADERS(sys/socket.h)
AC_CHECK_HEADERS(netinet/in.h)
dnl AC_REPLACE_FUNCS(recvfrom)
if test $ac_cv_header_sys_socket_h = no -o $ac_cv_header_netinet_in_h = no ; then
AC_MSG_ERROR(Could not find socket and networking headers)
fi
#--------------------------------------------------------------------
# These headers/functions needed by NSLog.m
#--------------------------------------------------------------------
@ -681,52 +677,6 @@ else
AC_MSG_RESULT(no)
fi
#--------------------------------------------------------------------
# Tools for making a DLL.
#--------------------------------------------------------------------
DLLTOOL='dlltool'
AC_SUBST(DLLTOOL)
#--------------------------------------------------------------------
# Custom configuration based upon the target
#--------------------------------------------------------------------
# On some platforms, ld doesn't link in the complete library which
# can cause problems with the dynamic nature of ObjC. Programs call
# methods for classes which don't exist in the executable!!
# The variables turn on/off the behaviour of ld to include the
# whole archive.
# Note that executable sizes will be larger.
# Note that these variables are passed to GCC not ld directly
whole_archive=''
no_whole_archive=''
case "${target}" in
i[[345]]86-*-cygwin32)
whole_archive='-Wl,--whole-archive'
no_whole_archive='-Wl,--no-whole-archive'
LIBS="$LIBS -ladvapi32"
# -pipe not supported
PIPE=''
;;
i[[345]]86-*-mingw32)
whole_archive='-Wl,--whole-archive'
no_whole_archive='-Wl,--no-whole-archive'
LIBS="$LIBS -lwsock32 -ladvapi32 -luser32"
# Shared library is a DLL
if [[ x$SHARED_LIBRARY != x ]]; then
SHARED_LIBRARY='lib$(LIBRARY_NAME).dll'
# Rename static library if also building a shared library
if [[ x$STATIC_LIBRARY != x ]]; then
STATIC_LIBRARY='lib$(LIBRARY_NAME)_s$(LIBEXT)'
IMPORT_LIBRARY='lib$(LIBRARY_NAME)$(LIBEXT)'
fi
fi
# -pipe not supported
PIPE=''
;;
esac
#--------------------------------------------------------------------
# Include redefinition of main () only if needed.
# On some systems - force redefinition to be used as the /proc stuff