diff --git a/ChangeLog b/ChangeLog index abbf7edfa..516028ce2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2001-07-09 Adam Fedor + + * configure.in: Check for pthread.h - for compiling on Darwin. + * Source/GNUmakefile: Compile thr-pthread.m conditionally. + * Source/thr-pthread.m: New file. + + * Source/null-load.h (__objc_dynamic_get_symbol_path): New def. + * Source/objc-load.m: Use NeXT load methods on Darwin. + 2001-07-07 Richard Frith-Macdonald * Source/NSUser.m: NSSearchPathForDirectoriesInDomains() Set up diff --git a/Source/GNUmakefile b/Source/GNUmakefile index 31760282c..8f7ce2f1d 100644 --- a/Source/GNUmakefile +++ b/Source/GNUmakefile @@ -96,7 +96,12 @@ preface.m \ mframe.m ifeq ($(OBJC_RUNTIME), NeXT) -GNU_MFILES += thr-mach.m objc-gnu2next.m +GNU_MFILES += objc-gnu2next.m +ifeq ($(HAVE_PTHREAD_H), yes) +GNU_MFILES += thr-pthread.m +else +GNU_MFILES += thr-mach.m +endif endif ifeq ($(GNUSTEP_TARGET_OS), mingw32) diff --git a/Source/null-load.h b/Source/null-load.h index 8deac4dea..bcd4c2b53 100644 --- a/Source/null-load.h +++ b/Source/null-load.h @@ -70,4 +70,10 @@ __objc_dynamic_list_undefined_symbols(void) return NULL; } +static char * +__objc_dynamic_get_symbol_path(dl_handle_t handle, dl_symbol_t symbol) +{ + return NULL; +} + #endif /* __null_load_h_INCLUDE */ diff --git a/Source/objc-load.m b/Source/objc-load.m index 0273e41d7..812b8e789 100644 --- a/Source/objc-load.m +++ b/Source/objc-load.m @@ -34,6 +34,7 @@ #include #ifndef NeXT_RUNTIME #include +#include #endif #include #include @@ -44,6 +45,7 @@ #include "dynamic-load.h" /* From the objc runtime -- needed when invalidating the dtable */ +#ifndef NeXT_RUNTIME extern void __objc_install_premature_dtable(Class); extern void sarray_free(struct sarray*); #ifndef HAVE_OBJC_GET_UNINSTALLED_DTABLE @@ -57,6 +59,7 @@ objc_get_uninstalled_dtable() return __objc_uninstalled_dtable; } #endif +#endif /* ! NeXT */ /* Declaration from NSBundle.m */ const char *objc_executable_location( void ); @@ -98,6 +101,7 @@ objc_check_undefineds(FILE *errorStream) static void objc_invalidate_dtable(Class class) { +#ifndef NeXT_RUNTIME Class s; if (class->dtable == objc_get_uninstalled_dtable()) @@ -107,6 +111,7 @@ objc_invalidate_dtable(Class class) __objc_install_premature_dtable(class); for (s=class->subclass_list; s; s=s->sibling_class) objc_invalidate_dtable(s); +#endif } /* Initialize for dynamic loading */ @@ -154,6 +159,11 @@ objc_load_module( char *debugFilename) { +#ifdef NeXT_RUNTIME + int errcode; + dynamic_loaded = YES; + return objc_loadModule(filename, loadCallback, &errcode); +#else typedef void (*void_fn)(); dl_handle_t handle; #if !defined(__ELF__) && !defined(CON_AUTOLOAD) @@ -177,9 +187,7 @@ objc_load_module( __objc_dynamic_error(errorStream, "Error (objc-load)"); return 1; } -#ifndef NeXT_RUNTIME dynamic_handles = list_cons(handle, dynamic_handles); -#endif /* If there are any undefined symbols, we can't load the bundle */ if (objc_check_undefineds(errorStream)) { @@ -208,6 +216,7 @@ objc_load_module( _objc_load_callback = 0; _objc_load_load_callback = 0; return 0; +#endif } long @@ -251,7 +260,7 @@ objc_unload_modules( } NSString * -objc_get_symbol_path(Class theClass, Category *theCategory) +objc_get_symbol_path(Class theClass, struct objc_category *theCategory) { const char *ret; char buf[125], *p = buf; diff --git a/Source/thr-mach.m b/Source/thr-mach.m index a4b94cd23..789b3fe1c 100644 --- a/Source/thr-mach.m +++ b/Source/thr-mach.m @@ -37,6 +37,12 @@ int __objc_thread_exit_status = 0; /* Flag which lets us know if we ever became multi threaded */ int __objc_is_multi_threaded = 0; +/* Number of threads alive */ +int __objc_runtime_threads_alive = 0; + +/* Thread create/exit mutex */ +struct objc_mutex* __objc_runtime_mutex = NULL; + /* The hook function called when the runtime becomes multi threaded */ objc_thread_callback _objc_became_multi_threaded = NULL; diff --git a/Source/thr-pthread.m b/Source/thr-pthread.m new file mode 100644 index 000000000..e83db6708 --- /dev/null +++ b/Source/thr-pthread.m @@ -0,0 +1,539 @@ +/* GNU Objective C Runtime Thread Implementation for PCThreads under Darwin. + Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Contributed by Scott Christley + Condition functions added by: Mircea Oancea + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify it under the +terms of the GNU General Public License as published by the Free Software +Foundation; either version 2, or (at your option) any later version. + +GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +details. + +You should have received a copy of the GNU General Public License +along with GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +/* As a special exception, if you link this library with files compiled with + GCC to produce an executable, this does not cause the resulting executable + to be covered by the GNU General Public License. This exception does not + however invalidate any other reasons why the executable file might be + covered by the GNU General Public License. */ + +#include +#include +#include + +/* Key structure for maintaining thread specific storage */ +static pthread_key_t _objc_thread_storage; + +/* Global exit status. */ +int __objc_thread_exit_status = 0; + +/* Number of threads alive */ +int __objc_runtime_threads_alive = 0; + +/* Thread create/exit mutex */ +struct objc_mutex* __objc_runtime_mutex = NULL; + +/* Flag which lets us know if we ever became multi threaded */ +int __objc_is_multi_threaded = 0; + +/* The hook function called when the runtime becomes multi threaded */ +objc_thread_callback _objc_became_multi_threaded = NULL; + +/* + Use this to set the hook function that will be called when the + runtime initially becomes multi threaded. + The hook function is only called once, meaning only when the + 2nd thread is spawned, not for each and every thread. + + It returns the previous hook function or NULL if there is none. + + A program outside of the runtime could set this to some function so + it can be informed; for example, the GNUstep Base Library sets it + so it can implement the NSBecomingMultiThreaded notification. + */ +objc_thread_callback objc_set_thread_callback(objc_thread_callback func) +{ + objc_thread_callback temp = _objc_became_multi_threaded; + _objc_became_multi_threaded = func; + return temp; +} + +/* + Private functions + + These functions are utilized by the frontend, but they are not + considered part of the public interface. + */ + +/* + First function called in a thread, starts everything else. + + This function is passed to the backend by objc_thread_detach + as the starting function for a new thread. + */ +struct __objc_thread_start_state +{ + SEL selector; + id object; + id argument; +}; + +static volatile void +__objc_thread_detach_function(struct __objc_thread_start_state *istate) +{ + /* Valid state? */ + if (istate) { + id (*imp)(id,SEL,id); + SEL selector = istate->selector; + id object = istate->object; + id argument = istate->argument; + + /* Don't need anymore so free it */ + objc_free(istate); + + /* Clear out the thread local storage */ + objc_thread_set_data(NULL); + + /* Check to see if we just became multi threaded */ + if (!__objc_is_multi_threaded) + { + __objc_is_multi_threaded = 1; + + /* Call the hook function */ + if (_objc_became_multi_threaded != NULL) + (*_objc_became_multi_threaded)(); + } + + /* Call the method */ + if ((imp = (id(*)(id, SEL, id))objc_msg_lookup(object, selector))) + (*imp)(object, selector, argument); + else + objc_error(object, OBJC_ERR_UNIMPLEMENTED, + "objc_thread_detach called with bad selector.\n"); + } + else + objc_error(nil, OBJC_ERR_BAD_STATE, + "objc_thread_detach called with NULL state.\n"); + + /* Exit the thread */ + objc_thread_exit(); +} + +/* + Frontend functions + + These functions constitute the public interface to the Objective-C thread + and mutex functionality. + */ + +/* Frontend thread functions */ + +/* + Detach a new thread of execution and return its id. Returns NULL if fails. + Thread is started by sending message with selector to object. Message + takes a single argument. + */ +objc_thread_t +objc_thread_detach(SEL selector, id object, id argument) +{ + struct __objc_thread_start_state *istate; + objc_thread_t thread_id = NULL; + + /* Allocate the state structure */ + if (!(istate = (struct __objc_thread_start_state *) + objc_malloc(sizeof(*istate)))) + return NULL; + + /* Initialize the state structure */ + istate->selector = selector; + istate->object = object; + istate->argument = argument; + + /* lock access */ + objc_mutex_lock(__objc_runtime_mutex); + + /* Call the backend to spawn the thread */ + if ((thread_id = __objc_thread_detach((void *)__objc_thread_detach_function, + istate)) == NULL) + { + /* failed! */ + objc_mutex_unlock(__objc_runtime_mutex); + objc_free(istate); + return NULL; + } + + /* Increment our thread counter */ + __objc_runtime_threads_alive++; + objc_mutex_unlock(__objc_runtime_mutex); + + return thread_id; +} + +/* Backend initialization functions */ + +/* Initialize the threads subsystem. */ +int +__objc_init_thread_system(void) +{ + /* Initialize the thread storage key */ + return pthread_key_create(&_objc_thread_storage, NULL); +} + +/* Close the threads subsystem. */ +int +__objc_close_thread_system(void) +{ + /* Destroy the thread storage key */ + /* Not implemented yet */ + /* return pthread_key_delete(&_objc_thread_storage); */ + return 0; +} + +/* Backend thread functions */ + +/* Create a new thread of execution. */ +objc_thread_t +__objc_thread_detach(void (*func)(void *arg), void *arg) +{ + objc_thread_t thread_id; + pthread_t new_thread_handle; + + if ( !(pthread_create(&new_thread_handle, NULL, (void *)func, arg)) ) + thread_id = *(objc_thread_t *)&new_thread_handle; + else + thread_id = NULL; + + return thread_id; +} + +/* Set the current thread's priority. */ +int +objc_thread_set_priority(int priority) +{ + /* Not implemented yet */ + return -1; +} + +/* Return the current thread's priority. */ +int +objc_thread_get_priority(void) +{ + /* Not implemented yet */ + return OBJC_THREAD_INTERACTIVE_PRIORITY; +} + +/* Yield our process time to another thread. */ +void +objc_thread_yield(void) +{ + pthread_yield(NULL); +} + +/* Terminate the current thread. */ +int +objc_thread_exit(void) +{ + /* Decrement our counter of the number of threads alive */ + objc_mutex_lock(__objc_runtime_mutex); + __objc_runtime_threads_alive--; + objc_mutex_unlock(__objc_runtime_mutex); + + /* exit the thread */ + pthread_exit(&__objc_thread_exit_status); + + /* Failed if we reached here */ + return -1; +} + +/* Returns an integer value which uniquely describes a thread. */ +objc_thread_t +objc_thread_id(void) +{ + pthread_t self = pthread_self(); + + return *(objc_thread_t *)&self; +} + +/* Sets the thread's local storage pointer. */ +int +objc_thread_set_data(void *value) +{ + return pthread_setspecific(_objc_thread_storage, value); +} + +/* Returns the thread's local storage pointer. */ +void * +objc_thread_get_data(void) +{ + return pthread_getspecific(_objc_thread_storage); +} + +/* Backend mutex functions */ + +/* Allocate a mutex. */ +objc_mutex_t +objc_mutex_allocate(void) +{ + objc_mutex_t mutex; + + /* Allocate the mutex structure */ + if (!(mutex = (objc_mutex_t)objc_malloc(sizeof(struct objc_mutex)))) + return NULL; + + /* Call backend to create the mutex */ + if (pthread_mutex_init((pthread_mutex_t *)(&(mutex->backend)), NULL)) + { + /* failed! */ + objc_free(mutex); + return NULL; + } + + /* Initialize mutex */ + mutex->owner = NULL; + mutex->depth = 0; + return mutex; +} + +/* Deallocate a mutex. */ +int +objc_mutex_deallocate(objc_mutex_t mutex) +{ + int depth; + + /* Valid mutex? */ + if (!mutex) + return -1; + + /* Acquire lock on mutex */ + depth = objc_mutex_lock(mutex); + + if (pthread_mutex_destroy((pthread_mutex_t *)(&(mutex->backend)))) + return -1; + + /* Free the mutex structure */ + objc_free(mutex); + + /* Return last depth */ + return depth; +} + +/* Grab a lock on a mutex. */ +int +objc_mutex_lock(objc_mutex_t mutex) +{ + objc_thread_t thread_id; + int status; + + /* Valid mutex? */ + if (!mutex) + return -1; + + /* If we already own the lock then increment depth */ + thread_id = objc_thread_id(); + if (mutex->owner == thread_id) + return ++mutex->depth; + + /* Call the backend to lock the mutex */ + status = pthread_mutex_lock((pthread_mutex_t *)(&(mutex->backend))); + + /* Failed? */ + if (status) + return status; + + /* Successfully locked the thread */ + mutex->owner = thread_id; + return mutex->depth = 1; +} + +/* Try to grab a lock on a mutex. */ +int +objc_mutex_trylock(objc_mutex_t mutex) +{ + objc_thread_t thread_id; + int status; + + /* Valid mutex? */ + if (!mutex) + return -1; + + /* If we already own the lock then increment depth */ + thread_id = objc_thread_id(); + if (mutex->owner == thread_id) + return ++mutex->depth; + + /* Call the backend to try to lock the mutex */ + status = pthread_mutex_trylock((pthread_mutex_t *)(&(mutex->backend))); + + /* Failed? */ + if (status) + return status; + + /* Successfully locked the thread */ + mutex->owner = thread_id; + return mutex->depth = 1; +} + +/* Unlock the mutex */ +int +objc_mutex_unlock(objc_mutex_t mutex) +{ + objc_thread_t thread_id; + + /* Valid mutex? */ + if (!mutex) + return -1; + + /* If another thread owns the lock then abort */ + thread_id = objc_thread_id(); + if (mutex->owner != thread_id) + return -1; + + /* Decrement depth and return */ + if (mutex->depth > 1) + return --mutex->depth; + + /* Depth down to zero so we are no longer the owner */ + mutex->depth = 0; + mutex->owner = NULL; + + /* Have the backend unlock the mutex */ + return pthread_mutex_unlock((pthread_mutex_t *)(&(mutex->backend))); +} + +/* Backend condition mutex functions */ + +/* Allocate a condition. */ +objc_condition_t +objc_condition_allocate(void) +{ + objc_condition_t condition; + + /* Allocate the condition mutex structure */ + if (!(condition = + (objc_condition_t)objc_malloc(sizeof(struct objc_condition)))) + return NULL; + + /* Call the backend to create the condition mutex */ + if (pthread_cond_init((pthread_cond_t *)(&(condition->backend)), NULL)) + { + /* failed! */ + objc_free(condition); + return NULL; + } + + /* Success! */ + return condition; +} + +/* Deallocate a condition. */ +int +objc_condition_deallocate(objc_condition_t condition) +{ + /* Broadcast the condition */ + if (objc_condition_broadcast(condition)) + return -1; + + /* Call the backend to destroy */ + if (pthread_cond_destroy((pthread_cond_t *)(&(condition->backend)))) + return -1; + + /* Free the condition mutex structure */ + objc_free(condition); + + return 0; +} + +/* Wait on the condition */ +int +objc_condition_wait(objc_condition_t condition, objc_mutex_t mutex) +{ + objc_thread_t thread_id; + + /* Valid arguments? */ + if (!mutex || !condition) + return -1; + + /* Make sure we are owner of mutex */ + thread_id = objc_thread_id(); + if (mutex->owner != thread_id) + return -1; + + /* Cannot be locked more than once */ + if (mutex->depth > 1) + return -1; + + /* Virtually unlock the mutex */ + mutex->depth = 0; + mutex->owner = (objc_thread_t)NULL; + + /* Call the backend to wait */ + pthread_cond_wait((pthread_cond_t *)(&(condition->backend)), + (pthread_mutex_t *)(&(mutex->backend))); + + /* Make ourselves owner of the mutex */ + mutex->owner = thread_id; + mutex->depth = 1; + + return 0; +} + +/* Wake up all threads waiting on this condition. */ +int +objc_condition_broadcast(objc_condition_t condition) +{ + /* Valid condition mutex? */ + if (!condition) + return -1; + + return pthread_cond_broadcast((pthread_cond_t *)(&(condition->backend))); +} + +/* Wake up one thread waiting on this condition. */ +int +objc_condition_signal(objc_condition_t condition) +{ + /* Valid condition mutex? */ + if (!condition) + return -1; + + return pthread_cond_signal((pthread_cond_t *)(&(condition->backend))); +} + +/* Make the objc thread system aware that a thread which is managed + (started, stopped) by external code could access objc facilities + from now on. This is used when you are interfacing with some + external non-objc-based environment/system - you must call + objc_thread_add() before an alien thread makes any calls to + Objective-C. Do not cause the _objc_became_multi_threaded hook to + be executed. */ +void +objc_thread_add(void) +{ + objc_mutex_lock(__objc_runtime_mutex); + __objc_is_multi_threaded = 1; + __objc_runtime_threads_alive++; + objc_mutex_unlock(__objc_runtime_mutex); +} + +/* Make the objc thread system aware that a thread managed (started, + stopped) by some external code will no longer access objc and thus + can be forgotten by the objc thread system. Call + objc_thread_remove() when your alien thread is done with making + calls to Objective-C. */ +void +objc_thread_remove(void) +{ + objc_mutex_lock(__objc_runtime_mutex); + __objc_runtime_threads_alive--; + objc_mutex_unlock(__objc_runtime_mutex); +} + +/* End of File */ diff --git a/config.mak.in b/config.mak.in index eb2a1e78c..e2d9d936b 100644 --- a/config.mak.in +++ b/config.mak.in @@ -9,3 +9,5 @@ DYNAMIC_LINKER=@DYNAMIC_LINKER@ HAVE_LIBXML=@HAVE_LIBXML@ WITH_FFI=@WITH_FFI@ + +HAVE_PTHREAD_H=@HAVE_PTHREAD_H@ diff --git a/configure b/configure index ee50e10b1..66f3a7aa0 100755 --- a/configure +++ b/configure @@ -2994,18 +2994,69 @@ fi done +#-------------------------------------------------------------------- +# Check for pthread.h (only when building on Darwin machines) +#-------------------------------------------------------------------- +for ac_hdr in pthread.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3005: 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 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:3015: \"$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* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +if test $ac_cv_header_pthread_h = yes ; then + HAVE_PTHREAD_H=yes + cat >> confdefs.h <<\EOF +#define HAVE_PTHREAD_H 1 +EOF + +fi + #-------------------------------------------------------------------- # This function needed by StdioStream.m #-------------------------------------------------------------------- for ac_func in vsprintf vasprintf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3004: checking for $ac_func" >&5 +echo "configure:3055: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3083: \"$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 @@ -3057,11 +3108,11 @@ if test $ac_cv_func_vsprintf = yes ; then VSPRINTF_RETURNS_LENGTH=1 else cat > conftest.$ac_ext <&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 VSPRINTF_RETURNS_LENGTH=1 else @@ -3083,11 +3134,11 @@ if test $ac_cv_func_vasprintf = yes ; then VASPRINTF_RETURNS_LENGTH=1 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3142: \"$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 @@ -3111,12 +3162,12 @@ fi for ac_func in getcwd do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3115: checking for $ac_func" >&5 +echo "configure:3166: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3194: \"$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 @@ -3168,12 +3219,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:3172: checking for $ac_hdr that defines DIR" >&5 +echo "configure:3223: 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 < #include <$ac_hdr> @@ -3181,7 +3232,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:3185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -3206,7 +3257,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:3210: checking for opendir in -ldir" >&5 +echo "configure:3261: 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 @@ -3214,7 +3265,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3280: \"$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 @@ -3247,7 +3298,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:3251: checking for opendir in -lx" >&5 +echo "configure:3302: 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 @@ -3255,7 +3306,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3321: \"$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 @@ -3296,17 +3347,17 @@ for ac_hdr in getopt.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3300: checking for $ac_hdr" >&5 +echo "configure:3351: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3361: \"$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* @@ -3339,12 +3390,12 @@ done for ac_func in valloc do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3343: checking for $ac_func" >&5 +echo "configure:3394: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3422: \"$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 @@ -3398,12 +3449,12 @@ done for ac_func in times do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3402: checking for $ac_func" >&5 +echo "configure:3453: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3481: \"$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 @@ -3457,12 +3508,12 @@ done for ac_func in mkstemp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3461: checking for $ac_func" >&5 +echo "configure:3512: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3540: \"$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 @@ -3512,12 +3563,12 @@ done for ac_func in shmctl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3516: checking for $ac_func" >&5 +echo "configure:3567: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3595: \"$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 @@ -3567,12 +3618,12 @@ done for ac_func in mmap do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3571: checking for $ac_func" >&5 +echo "configure:3622: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3650: \"$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 @@ -3626,12 +3677,12 @@ done for ac_func in inet_aton do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3630: checking for $ac_func" >&5 +echo "configure:3681: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3709: \"$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 @@ -3685,12 +3736,12 @@ done for ac_func in killpg setpgrp setpgid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3689: checking for $ac_func" >&5 +echo "configure:3740: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3768: \"$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 @@ -3738,7 +3789,7 @@ fi done echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6 -echo "configure:3742: checking whether setpgrp takes no argument" >&5 +echo "configure:3793: 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 @@ -3746,7 +3797,7 @@ else { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3821: \"$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 @@ -3806,17 +3857,17 @@ for ac_hdr in libc.h limits.h malloc.h memory.h string.h signal.h sys/file.h sys do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3810: checking for $ac_hdr" >&5 +echo "configure:3861: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3820: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3871: \"$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* @@ -3849,12 +3900,12 @@ done for ac_func in usleep do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3853: checking for $ac_func" >&5 +echo "configure:3904: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3932: \"$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 @@ -3908,12 +3959,12 @@ done for ac_func in strerror do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3912: checking for $ac_func" >&5 +echo "configure:3963: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3991: \"$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 @@ -3965,16 +4016,16 @@ done # This type needed by GSFormat #-------------------------------------------------------------------- echo $ac_n "checking whether stdint.h defines uintmax_t""... $ac_c" 1>&6 -echo "configure:3969: checking whether stdint.h defines uintmax_t" >&5 +echo "configure:4020: checking whether stdint.h defines uintmax_t" >&5 cat > conftest.$ac_ext < int main() { int i = sizeof(uintmax_t); ; return 0; } EOF -if { (eval echo configure:3978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4029: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* uintmax_t=1 else @@ -3995,9 +4046,9 @@ else fi echo $ac_n "checking whether precompiler handles LONG_LONG_MAX""... $ac_c" 1>&6 -echo "configure:3999: checking whether precompiler handles LONG_LONG_MAX" >&5 +echo "configure:4050: checking whether precompiler handles LONG_LONG_MAX" >&5 cat > conftest.$ac_ext < #include @@ -4008,7 +4059,7 @@ cat > conftest.$ac_ext <&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4063: \"$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* @@ -4034,17 +4085,17 @@ for ac_hdr in wchar.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4038: checking for $ac_hdr" >&5 +echo "configure:4089: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4099: \"$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* @@ -4075,12 +4126,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:4079: checking for register_printf_function" >&5 +echo "configure:4130: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4158: \"$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 @@ -4128,11 +4179,11 @@ if test $register_printf = 1; then working_register_printf=1 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4187: \"$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 @@ -4158,12 +4209,12 @@ fi for ac_func in realpath do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4162: checking for $ac_func" >&5 +echo "configure:4213: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4241: \"$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 @@ -4216,7 +4267,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:4220: checking program_invocation_name in C Library" >&5 +echo "configure:4271: 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 @@ -4224,7 +4275,7 @@ else program_invocation_name_worked=no else cat > conftest.$ac_ext < @@ -4236,7 +4287,7 @@ main (int argc, char *argv[]) } EOF -if { (eval echo configure:4240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4291: \"$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 @@ -4274,7 +4325,7 @@ fi echo $ac_n "checking kernel support for /proc filesystem""... $ac_c" 1>&6 -echo "configure:4278: checking kernel support for /proc filesystem" >&5 +echo "configure:4329: checking kernel support for /proc filesystem" >&5 if eval "test \"`echo '$''{'ac_cv_sys_procfs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4309,7 +4360,7 @@ EOF echo $ac_n "checking link to exe of process in /proc""... $ac_c" 1>&6 -echo "configure:4313: checking link to exe of process in /proc" >&5 +echo "configure:4364: checking link to exe of process in /proc" >&5 if eval "test \"`echo '$''{'ac_cv_sys_procfs_exe_link'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4340,16 +4391,16 @@ EOF # Check if /proc/$$/cmdline terminates the last argument with a nul #-------------------------------------------------------------------- echo $ac_n "checking /proc/$$/cmdline terminated by nul""... $ac_c" 1>&6 -echo "configure:4344: checking /proc/$$/cmdline terminated by nul" >&5 +echo "configure:4395: checking /proc/$$/cmdline terminated by nul" >&5 if test "$cross_compiling" = yes; then CMDLINE_TERMINATED=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then CMDLINE_TERMINATED=1 else @@ -4375,16 +4426,16 @@ fi # Check if short and int values need to be word aligned #-------------------------------------------------------------------- echo $ac_n "checking short/int needs to be word aligned""... $ac_c" 1>&6 -echo "configure:4379: checking short/int needs to be word aligned" >&5 +echo "configure:4430: checking short/int needs to be word aligned" >&5 if test "$cross_compiling" = yes; then NEED_WORD_ALIGNMENT=1 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4439: \"$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 @@ -4412,7 +4463,7 @@ fi # doesn't work. Allow NSProcessInfo initialization method also. #-------------------------------------------------------------------- echo $ac_n "checking "use of pass-through arguments"""... $ac_c" 1>&6 -echo "configure:4416: checking "use of pass-through arguments"" >&5 +echo "configure:4467: checking "use of pass-through arguments"" >&5 # Check whether --enable-pass-arguments or --disable-pass-arguments was given. if test "${enable_pass_arguments+set}" = set; then enableval="$enable_pass_arguments" @@ -4434,7 +4485,7 @@ fi echo "$ac_t""$enable_pass_arguments" 1>&6 echo $ac_n "checking "use of fake-main definition"""... $ac_c" 1>&6 -echo "configure:4438: checking "use of fake-main definition"" >&5 +echo "configure:4489: checking "use of fake-main definition"" >&5 # Check whether --enable-fake-main or --disable-fake-main was given. if test "${enable_fake_main+set}" = set; then enableval="$enable_fake_main" @@ -4494,17 +4545,17 @@ fi ac_safe=`echo "ffi.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ffi.h""... $ac_c" 1>&6 -echo "configure:4498: checking for ffi.h" >&5 +echo "configure:4549: checking for ffi.h" >&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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4559: \"$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* @@ -4528,9 +4579,9 @@ fi echo $ac_n "checking "for forwarding callback in runtime"""... $ac_c" 1>&6 -echo "configure:4532: checking "for forwarding callback in runtime"" >&5 +echo "configure:4583: checking "for forwarding callback in runtime"" >&5 cat > conftest.$ac_ext < EOF @@ -4548,17 +4599,17 @@ for ac_hdr in callback.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4552: checking for $ac_hdr" >&5 +echo "configure:4603: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4562: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4613: \"$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* @@ -4587,7 +4638,7 @@ done echo $ac_n "checking "FFI library usage"""... $ac_c" 1>&6 -echo "configure:4591: checking "FFI library usage"" >&5 +echo "configure:4642: checking "FFI library usage"" >&5 WITH_FFI=none if test $enable_libffi = yes; then cat >> confdefs.h <<\EOF @@ -4652,7 +4703,7 @@ fi # Extract the first word of "xml2-config", so it can be a program name with args. set dummy xml2-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4656: checking for $ac_word" >&5 +echo "configure:4707: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XML2_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4689,7 +4740,7 @@ fi # Extract the first word of "xml-config", so it can be a program name with args. set dummy xml-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4693: checking for $ac_word" >&5 +echo "configure:4744: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XML_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4727,7 +4778,7 @@ fi fi min_xml_version=2.2.3 echo $ac_n "checking for libxml - version >= $min_xml_version""... $ac_c" 1>&6 -echo "configure:4731: checking for libxml - version >= $min_xml_version" >&5 +echo "configure:4782: checking for libxml - version >= $min_xml_version" >&5 no_xml="" if test "$XML_CONFIG" = "no" ; then no_xml=yes @@ -4750,7 +4801,7 @@ echo "configure:4731: checking for libxml - version >= $min_xml_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -4825,7 +4876,7 @@ main() } EOF -if { (eval echo configure:4829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -4930,17 +4981,17 @@ if test $enable_openssl = yes; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4934: checking for $ac_hdr" >&5 +echo "configure:4985: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4944: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4995: \"$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* @@ -4973,7 +5024,7 @@ done ssl_ok=no else echo $ac_n "checking for CRYPTO_malloc in -lcrypto""... $ac_c" 1>&6 -echo "configure:4977: checking for CRYPTO_malloc in -lcrypto" >&5 +echo "configure:5028: checking for CRYPTO_malloc in -lcrypto" >&5 ac_lib_var=`echo crypto'_'CRYPTO_malloc | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4981,7 +5032,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypto $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5047: \"$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 @@ -5017,7 +5068,7 @@ fi base_libs="$LIBS" LIBS="$LIBS -lcrypto" echo $ac_n "checking for ssl2_clear in -lssl""... $ac_c" 1>&6 -echo "configure:5021: checking for ssl2_clear in -lssl" >&5 +echo "configure:5072: checking for ssl2_clear in -lssl" >&5 ac_lib_var=`echo ssl'_'ssl2_clear | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5025,7 +5076,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lssl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5091: \"$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 @@ -5110,17 +5161,17 @@ for ac_hdr in gmp.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5114: checking for $ac_hdr" >&5 +echo "configure:5165: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5175: \"$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* @@ -5148,7 +5199,7 @@ done if test $ac_cv_header_gmp_h = yes; then echo $ac_n "checking for mpf_abs in -lgmp""... $ac_c" 1>&6 -echo "configure:5152: checking for mpf_abs in -lgmp" >&5 +echo "configure:5203: checking for mpf_abs in -lgmp" >&5 ac_lib_var=`echo gmp'_'mpf_abs | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5156,7 +5207,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgmp $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5222: \"$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 @@ -5190,7 +5241,7 @@ fi if test "$gmp_ok" = no; then echo $ac_n "checking for __gmpf_abs in -lgmp""... $ac_c" 1>&6 -echo "configure:5194: checking for __gmpf_abs in -lgmp" >&5 +echo "configure:5245: checking for __gmpf_abs in -lgmp" >&5 ac_lib_var=`echo gmp'_'__gmpf_abs | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5198,7 +5249,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgmp $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5264: \"$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 @@ -5252,12 +5303,12 @@ fi for ac_func in iconv do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5256: checking for $ac_func" >&5 +echo "configure:5307: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5335: \"$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 @@ -5322,7 +5373,7 @@ fi # BSDs install this lib as libgiconv echo $ac_n "checking for main in -lgiconv""... $ac_c" 1>&6 -echo "configure:5326: checking for main in -lgiconv" >&5 +echo "configure:5377: checking for main in -lgiconv" >&5 ac_lib_var=`echo giconv'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5330,14 +5381,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lgiconv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5392: \"$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 @@ -5370,7 +5421,7 @@ fi SYSTEM_DEFS="-DHAVE_ICONV -DHAVE_GICONV_H $SYSTEM_DEFS" else echo $ac_n "checking for main in -liconv""... $ac_c" 1>&6 -echo "configure:5374: checking for main in -liconv" >&5 +echo "configure:5425: checking for main in -liconv" >&5 ac_lib_var=`echo iconv'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5378,14 +5429,14 @@ else ac_save_LIBS="$LIBS" LIBS="-liconv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5440: \"$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 @@ -5435,7 +5486,7 @@ subdirs="Source/mframe" # Record the version #-------------------------------------------------------------------- echo $ac_n "checking for the version of gnustep-base we are compiling""... $ac_c" 1>&6 -echo "configure:5439: checking for the version of gnustep-base we are compiling" >&5 +echo "configure:5490: checking for the version of gnustep-base we are compiling" >&5 if test -f "Version"; then . ./Version fi diff --git a/configure.in b/configure.in index cda227509..ead75d5b0 100644 --- a/configure.in +++ b/configure.in @@ -467,6 +467,15 @@ dnl AC_REPLACE_FUNCS(recvfrom) AC_CHECK_HEADERS(syslog.h) AC_CHECK_FUNCS(syslog) +#-------------------------------------------------------------------- +# Check for pthread.h (only when building on Darwin machines) +#-------------------------------------------------------------------- +AC_CHECK_HEADERS(pthread.h) +if test $ac_cv_header_pthread_h = yes ; then + HAVE_PTHREAD_H=yes + AC_DEFINE(HAVE_PTHREAD_H) +fi + #-------------------------------------------------------------------- # This function needed by StdioStream.m #--------------------------------------------------------------------