diff options
author | wtchang%redhat.com <devnull@localhost> | 2005-03-09 21:24:03 +0000 |
---|---|---|
committer | wtchang%redhat.com <devnull@localhost> | 2005-03-09 21:24:03 +0000 |
commit | bdf8f49122e9754547f46accde21bb7948c4de51 (patch) | |
tree | a45791dac358407374bd9bb90cbaa99f6d060dbd | |
parent | de7a255880416b87f419db232e702d7ac5eeede8 (diff) | |
download | nspr-hg-bdf8f49122e9754547f46accde21bb7948c4de51.tar.gz |
Bugzilla bug 256508: make --with-pthreads the default on OpenBSD. The
fix was tested by Jim Rees <rees@umich.edu>.
Modified Files: configure.in configure
Tag: NSPRPUB_PRE_4_2_CLIENT_BRANCH
-rwxr-xr-x | configure | 48 | ||||
-rw-r--r-- | configure.in | 4 |
2 files changed, 28 insertions, 24 deletions
@@ -4312,7 +4312,9 @@ EOF DSO_CFLAGS=-fPIC MDCPUCFG_H=_openbsd.cfg PR_MD_CSRCS=openbsd.c - USE_NSPR_THREADS=1 + if test -z "$USE_NSPR_THREADS"; then + USE_PTHREADS=1 + fi DSO_LDOPTS='-shared -fPIC' MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@' ;; @@ -4377,17 +4379,17 @@ EOF _OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Olimit 4000" ac_safe=`echo "machine/builtins.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for machine/builtins.h""... $ac_c" 1>&6 -echo "configure:4381: checking for machine/builtins.h" >&5 +echo "configure:4383: checking for machine/builtins.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 -#line 4386 "configure" +#line 4388 "configure" #include "confdefs.h" #include <machine/builtins.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4393: \"$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* @@ -4929,7 +4931,7 @@ case $target in ;; *) echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:4933: checking for dlopen in -ldl" >&5 +echo "configure:4935: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4937,7 +4939,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <<EOF -#line 4941 "configure" +#line 4943 "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 @@ -4948,7 +4950,7 @@ int main() { dlopen() ; return 0; } EOF -if { (eval echo configure:4952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4954: \"$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 @@ -4965,17 +4967,17 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6 -echo "configure:4969: checking for dlfcn.h" >&5 +echo "configure:4971: checking for dlfcn.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 -#line 4974 "configure" +#line 4976 "configure" #include "confdefs.h" #include <dlfcn.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4979: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4981: \"$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* @@ -5008,13 +5010,13 @@ esac if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:5012: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:5014: checking whether ${CC-cc} needs -traditional" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext <<EOF -#line 5018 "configure" +#line 5020 "configure" #include "confdefs.h" #include <sgtty.h> Autoconf TIOCGETP @@ -5032,7 +5034,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext <<EOF -#line 5036 "configure" +#line 5038 "configure" #include "confdefs.h" #include <termio.h> Autoconf TCGETA @@ -5056,12 +5058,12 @@ fi for ac_func in lchown strerror do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5060: checking for $ac_func" >&5 +echo "configure:5062: 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 5065 "configure" +#line 5067 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5084,7 +5086,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:5088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5090: \"$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 @@ -5125,7 +5127,7 @@ hpux*) if test -z "$GNU_CC"; then echo $ac_n "checking for +Olit support""... $ac_c" 1>&6 -echo "configure:5129: checking for +Olit support" >&5 +echo "configure:5131: checking for +Olit support" >&5 if eval "test \"`echo '$''{'ac_cv_hpux_usable_olit_option'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5159,7 +5161,7 @@ esac echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 -echo "configure:5163: checking for pthread_create in -lpthreads" >&5 +echo "configure:5165: checking for pthread_create in -lpthreads" >&5 echo " #include <pthread.h> void *foo(void *v) { return v; } @@ -5181,7 +5183,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:5185: checking for pthread_create in -lpthread" >&5 +echo "configure:5187: checking for pthread_create in -lpthread" >&5 echo " #include <pthread.h> void *foo(void *v) { return v; } @@ -5203,7 +5205,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -echo "configure:5207: checking for pthread_create in -lc_r" >&5 +echo "configure:5209: checking for pthread_create in -lc_r" >&5 echo " #include <pthread.h> void *foo(void *v) { return v; } @@ -5225,7 +5227,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6 -echo "configure:5229: checking for pthread_create in -lc" >&5 +echo "configure:5231: checking for pthread_create in -lc" >&5 echo " #include <pthread.h> void *foo(void *v) { return v; } @@ -5377,7 +5379,7 @@ if test -n "$USE_PTHREADS"; then rm -f conftest* ac_cv_have_dash_pthread=no echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6 -echo "configure:5381: checking whether ${CC-cc} accepts -pthread" >&5 +echo "configure:5383: checking whether ${CC-cc} accepts -pthread" >&5 echo 'int main() { return 0; }' | cat > conftest.c ${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1 if test $? -eq 0; then @@ -5400,7 +5402,7 @@ echo "configure:5381: checking whether ${CC-cc} accepts -pthread" >&5 ac_cv_have_dash_pthreads=no if test "$ac_cv_have_dash_pthread" = "no"; then echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6 -echo "configure:5404: checking whether ${CC-cc} accepts -pthreads" >&5 +echo "configure:5406: checking whether ${CC-cc} accepts -pthreads" >&5 echo 'int main() { return 0; }' | cat > conftest.c ${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1 if test $? -eq 0; then diff --git a/configure.in b/configure.in index 97807fd3..d91fc4a6 100644 --- a/configure.in +++ b/configure.in @@ -1552,7 +1552,9 @@ mips-sony-newsos*) DSO_CFLAGS=-fPIC MDCPUCFG_H=_openbsd.cfg PR_MD_CSRCS=openbsd.c - USE_NSPR_THREADS=1 + if test -z "$USE_NSPR_THREADS"; then + USE_PTHREADS=1 + fi DSO_LDOPTS='-shared -fPIC' MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@' ;; |