summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorseawood%netscape.com <devnull@localhost>2002-02-26 10:19:08 +0000
committerseawood%netscape.com <devnull@localhost>2002-02-26 10:19:08 +0000
commit97946a14f74b6ed9d38b77e17db2b34b99841f6c (patch)
treeb8eb4bf8df74f957bea6b5385c44bdf966ee1cd6
parent5d91cbd5862a9949d59734d1f6a929d71ce4090c (diff)
downloadnspr-hg-97946a14f74b6ed9d38b77e17db2b34b99841f6c.tar.gz
Add -lrt/-lposix4 to OS_LIBS on Solaris so that Purify doesn't complain about the missing library when instrumenting libnspr.
Bug #124493 r=bryner a=asa
-rwxr-xr-xconfigure41
-rw-r--r--configure.in5
2 files changed, 28 insertions, 18 deletions
diff --git a/configure b/configure
index 6a1090db..84ce3dcb 100755
--- a/configure
+++ b/configure
@@ -4488,6 +4488,11 @@ EOF
DSO_LDOPTS="$DSO_LDOPTS -f "'$(ULTRASPARC_FILTER_LIBRARY)'
fi
fi
+ # Purify requires that binaries linked against nspr also
+ # be linked against -lrt (or -lposix4) so add it to OS_LIBS
+ _rev=`uname -r`
+ _librt=`echo $_rev 5.6 | awk '{ if ($1 > $2) print "-lrt"; else print "-lposix4" }'`
+ OS_LIBS="$OS_LIBS $_librt"
;;
*-sco-sysv5*)
@@ -4662,12 +4667,12 @@ esac
if test -z "$SKIP_LIBRARY_CHECKS"; then
echo $ac_n "checking for dlopen""... $ac_c" 1>&6
-echo "configure:4666: checking for dlopen" >&5
+echo "configure:4671: checking for dlopen" >&5
if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4671 "configure"
+#line 4676 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char dlopen(); below. */
@@ -4690,7 +4695,7 @@ dlopen();
; return 0; }
EOF
-if { (eval echo configure:4694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_dlopen=yes"
else
@@ -4709,7 +4714,7 @@ else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:4713: checking for dlopen in -ldl" >&5
+echo "configure:4718: 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
@@ -4717,7 +4722,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4721 "configure"
+#line 4726 "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
@@ -4728,7 +4733,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo configure:4732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4737: \"$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
@@ -4756,13 +4761,13 @@ fi
if test $ac_cv_prog_gcc = yes; then
echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
-echo "configure:4760: checking whether ${CC-cc} needs -traditional" >&5
+echo "configure:4765: 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 4766 "configure"
+#line 4771 "configure"
#include "confdefs.h"
#include <sgtty.h>
Autoconf TIOCGETP
@@ -4780,7 +4785,7 @@ rm -f conftest*
if test $ac_cv_prog_gcc_traditional = no; then
cat > conftest.$ac_ext <<EOF
-#line 4784 "configure"
+#line 4789 "configure"
#include "confdefs.h"
#include <termio.h>
Autoconf TCGETA
@@ -4804,12 +4809,12 @@ fi
for ac_func in lchown strerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4808: checking for $ac_func" >&5
+echo "configure:4813: 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 4813 "configure"
+#line 4818 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4832,7 +4837,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4841: \"$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
@@ -4870,7 +4875,7 @@ fi
echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
-echo "configure:4874: checking for pthread_create in -lpthreads" >&5
+echo "configure:4879: checking for pthread_create in -lpthreads" >&5
echo "
#include <pthread.h>
void *foo(void *v) { int a = 1; }
@@ -4892,7 +4897,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
-echo "configure:4896: checking for pthread_create in -lpthread" >&5
+echo "configure:4901: checking for pthread_create in -lpthread" >&5
echo "
#include <pthread.h>
void *foo(void *v) { int a = 1; }
@@ -4914,7 +4919,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
-echo "configure:4918: checking for pthread_create in -lc_r" >&5
+echo "configure:4923: checking for pthread_create in -lc_r" >&5
echo "
#include <pthread.h>
void *foo(void *v) { int a = 1; }
@@ -4936,7 +4941,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
-echo "configure:4940: checking for pthread_create in -lc" >&5
+echo "configure:4945: checking for pthread_create in -lc" >&5
echo "
#include <pthread.h>
void *foo(void *v) { int a = 1; }
@@ -5086,7 +5091,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:5090: checking whether ${CC-cc} accepts -pthread" >&5
+echo "configure:5095: 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
@@ -5109,7 +5114,7 @@ echo "configure:5090: 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:5113: checking whether ${CC-cc} accepts -pthreads" >&5
+echo "configure:5118: 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 5a7884c1..6f69b34f 100644
--- a/configure.in
+++ b/configure.in
@@ -1649,6 +1649,11 @@ mips-sony-newsos*)
DSO_LDOPTS="$DSO_LDOPTS -f "'$(ULTRASPARC_FILTER_LIBRARY)'
fi
fi
+ # Purify requires that binaries linked against nspr also
+ # be linked against -lrt (or -lposix4) so add it to OS_LIBS
+ _rev=`uname -r`
+ _librt=`echo $_rev 5.6 | awk '{ if ($1 > $2) print "-lrt"; else print "-lposix4" }'`
+ OS_LIBS="$OS_LIBS $_librt"
;;
*-sco-sysv5*)