diff options
-rwxr-xr-x | configure | 27 | ||||
-rw-r--r-- | configure.in | 5 | ||||
-rw-r--r-- | pr/src/linking/prlink.c | 5 |
3 files changed, 20 insertions, 17 deletions
@@ -5849,15 +5849,17 @@ echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6 fi fi -for ac_func in lchown strerror +_SAVE_LDFLAGS="$LDFLAGS" +LDFLAGS="$OS_LIBS" +for ac_func in lchown strerror dladdr do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5856: checking for $ac_func" >&5 +echo "configure:5858: 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 5861 "configure" +#line 5863 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5880,7 +5882,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:5884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5886: \"$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 @@ -5904,6 +5906,7 @@ else fi done +LDFLAGS="$_SAVE_LDFLAGS" @@ -5931,7 +5934,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5935: checking for $ac_word" >&5 +echo "configure:5938: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_CCACHE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5990,7 +5993,7 @@ hpux*) if test -z "$GNU_CC"; then echo $ac_n "checking for +Olit support""... $ac_c" 1>&6 -echo "configure:5994: checking for +Olit support" >&5 +echo "configure:5997: 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 @@ -6032,7 +6035,7 @@ wince*) *) echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 -echo "configure:6036: checking for pthread_create in -lpthreads" >&5 +echo "configure:6039: checking for pthread_create in -lpthreads" >&5 echo " #include <pthread.h> void *foo(void *v) { return v; } @@ -6054,7 +6057,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:6058: checking for pthread_create in -lpthread" >&5 +echo "configure:6061: checking for pthread_create in -lpthread" >&5 echo " #include <pthread.h> void *foo(void *v) { return v; } @@ -6076,7 +6079,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -echo "configure:6080: checking for pthread_create in -lc_r" >&5 +echo "configure:6083: checking for pthread_create in -lc_r" >&5 echo " #include <pthread.h> void *foo(void *v) { return v; } @@ -6098,7 +6101,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6 -echo "configure:6102: checking for pthread_create in -lc" >&5 +echo "configure:6105: checking for pthread_create in -lc" >&5 echo " #include <pthread.h> void *foo(void *v) { return v; } @@ -6216,7 +6219,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:6220: checking whether ${CC-cc} accepts -pthread" >&5 +echo "configure:6223: 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 @@ -6239,7 +6242,7 @@ echo "configure:6220: 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:6243: checking whether ${CC-cc} accepts -pthreads" >&5 +echo "configure:6246: 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 2a04ecac..54d7fc37 100644 --- a/configure.in +++ b/configure.in @@ -2741,7 +2741,10 @@ dnl ======================================================== dnl Checks for library functions. dnl ======================================================== AC_PROG_GCC_TRADITIONAL -AC_CHECK_FUNCS(lchown strerror) +_SAVE_LDFLAGS="$LDFLAGS" +LDFLAGS="$OS_LIBS" +AC_CHECK_FUNCS(lchown strerror dladdr) +LDFLAGS="$_SAVE_LDFLAGS" dnl AC_FUNC_MEMCMP dnl AC_FUNC_MMAP diff --git a/pr/src/linking/prlink.c b/pr/src/linking/prlink.c index 11981fac..0b5b11be 100644 --- a/pr/src/linking/prlink.c +++ b/pr/src/linking/prlink.c @@ -1360,10 +1360,7 @@ PR_LoadStaticLibrary(const char *name, const PRStaticLinkTable *slt) PR_IMPLEMENT(char *) PR_GetLibraryFilePathname(const char *name, PRFuncPtr addr) { -#if defined(USE_DLFCN) && !defined(ANDROID) \ - && (defined(SOLARIS) || defined(FREEBSD) \ - || defined(LINUX) || defined(__GNU__) || defined(__GLIBC__) \ - || defined(DARWIN)) +#if defined(USE_DLFCN) && defined(HAVE_DLADDR) Dl_info dli; char *result; |