$NetBSD: patch-aa,v 1.2 2002/01/31 23:18:11 wiz Exp $ --- configure.orig Sat Apr 10 18:02:18 1999 +++ configure Tue Jan 29 18:59:52 2002 @@ -2601,507 +2601,8 @@ fi -echo $ac_n "checking for --with-thread""... $ac_c" 1>&6 -echo "configure:2606: checking for --with-thread" >&5 -# Check whether --with-thread or --without-thread was given. -if test "${with_thread+set}" = set; then - withval="$with_thread" - -USE_THREAD_MODULE= -echo "$ac_t""$withval" 1>&6 -if test -d "$withval" -then LDFLAGS="$LDFLAGS -L$withval" -fi -cat >> confdefs.h <<\EOF -#define _REENTRANT 1 -EOF -ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6 -echo "configure:2622: checking for mach/cthreads.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:2632: \"$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 - cat >> confdefs.h <<\EOF -#define WITH_THREAD 1 -EOF -cat >> confdefs.h <<\EOF -#define C_THREADS 1 -EOF - -LIBOBJS="$LIBOBJS thread.o" -else - echo "$ac_t""no" 1>&6 - -echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6 -echo "configure:2661: checking for pthread_detach" >&5 -if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char pthread_detach(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach) -choke me -#else -pthread_detach(); -#endif - -; return 0; } -EOF -if { (eval echo configure:2689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_pthread_detach=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_pthread_detach=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define WITH_THREAD 1 -EOF - -cat >> confdefs.h <<\EOF -#define _POSIX_THREADS 1 -EOF - -LIBOBJS="$LIBOBJS thread.o" -else - echo "$ac_t""no" 1>&6 - -ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6 -echo "configure:2717: checking for kernel/OS.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:2727: \"$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 - cat >> confdefs.h <<\EOF -#define WITH_THREAD 1 -EOF - -cat >> confdefs.h <<\EOF -#define BEOS_THREADS 1 -EOF - -LIBOBJS="$LIBOBJS thread.o" -else - echo "$ac_t""no" 1>&6 - -echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 -echo "configure:2756: checking for pthread_create in -lpthreads" >&5 -ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lpthreads $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define WITH_THREAD 1 -EOF - -cat >> confdefs.h <<\EOF -#define _POSIX_THREADS 1 -EOF - -LIBS="$LIBS -lpthreads" -LIBOBJS="$LIBOBJS thread.o" -else - echo "$ac_t""no" 1>&6 - -echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:2804: checking for pthread_create in -lpthread" >&5 -ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lpthread $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define WITH_THREAD 1 -EOF - -cat >> confdefs.h <<\EOF -#define _POSIX_THREADS 1 -EOF - -LIBS="$LIBS -lpthread" -LIBOBJS="$LIBOBJS thread.o" -else - echo "$ac_t""no" 1>&6 - -echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -echo "configure:2852: checking for pthread_create in -lc_r" >&5 -ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lc_r $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define WITH_THREAD 1 -EOF - -cat >> confdefs.h <<\EOF -#define _POSIX_THREADS 1 -EOF - -LIBS="$LIBS -lc_r" -LIBOBJS="$LIBOBJS thread.o" -else - echo "$ac_t""no" 1>&6 - -echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6 -echo "configure:2900: checking for __d6_pthread_create in -lthread" >&5 -ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lthread $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define WITH_THREAD 1 -EOF - -cat >> confdefs.h <<\EOF -#define _POSIX_THREADS 1 -EOF - -LIBS="$LIBS -lthread" -LIBOBJS="$LIBOBJS thread.o" -else - echo "$ac_t""no" 1>&6 - -echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6 -echo "configure:2948: checking for pthread_create in -lcma" >&5 -ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lcma $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define WITH_THREAD 1 -EOF - -cat >> confdefs.h <<\EOF -#define _POSIX_THREADS 1 -EOF - -LIBS="$LIBS -lcma" -LIBOBJS="$LIBOBJS thread.o" -else - echo "$ac_t""no" 1>&6 -fi - - -fi - -fi - -fi - -fi - -fi - -fi - -fi - - -echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6 -echo "configure:3013: checking for usconfig in -lmpc" >&5 -ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lmpc $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define WITH_THREAD 1 -EOF - -LIBS="$LIBS -lmpc" -LIBOBJS="$LIBOBJS thread.o" -else - echo "$ac_t""no" 1>&6 -fi - -echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6 -echo "configure:3058: checking for thr_create in -lthread" >&5 -ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lthread $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define WITH_THREAD 1 -EOF - -LIBS="$LIBS -lthread" -LIBOBJS="$LIBOBJS thread.o" -else - echo "$ac_t""no" 1>&6 -fi - - -else - echo "$ac_t""no" 1>&6 -fi # -I${DLINCLDIR} is added to the compile rule for importdl.o