summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcls%seawood.org <devnull@localhost>1999-09-21 19:54:55 +0000
committercls%seawood.org <devnull@localhost>1999-09-21 19:54:55 +0000
commit1ae93825be2573b40579fa619881101dcd055dba (patch)
tree86c22e7681debbea70fbd48cbd43c4443016b5fb
parent3f41375595f9d73612582306029985fd0eeebad7 (diff)
downloadnspr-hg-unlabeled-1.1.2.10.4.tar.gz
Patch provided by Lee Iverson <leei@ai.sri.com>unlabeled-1.1.2.10.4
Ensure that unmodified include files & symlinks are not modified. Added --disable-shared option. Resurrect use of OS_LIBS & EXTRA_LIBS. Add check for -ldl. Added nsprincl.sh & nsprincl.mk to build.
-rw-r--r--configure.in36
1 files changed, 30 insertions, 6 deletions
diff --git a/configure.in b/configure.in
index af9e986a..cf250e3c 100644
--- a/configure.in
+++ b/configure.in
@@ -51,6 +51,9 @@ AC_ARG_ENABLE(debug,
MOZ_DEBUG=
fi])
+AC_ARG_ENABLE(shared,
+ [ --disable-shared Do not compile into shared libraries])
+
AC_ARG_ENABLE(target,
[ --enable-target=\$t Turn on features for target \$t when build has multiple targets],
MOZ_TARGET=`echo $enableval | tr a-z A-Z`,
@@ -257,6 +260,11 @@ case "$target" in
;;
esac
+dnl Turn off shared libraries if asked to do so.
+if test "$enable_shared" = no; then
+ MKSHLIB=
+fi
+
dnl ========================================================
dnl Check for system libraries
dnl ========================================================
@@ -325,7 +333,9 @@ dnl AC_CHECK_FUNCS(ftime getcwd gethostname gettimeofday getwd mkdir mktime pute
dnl ========================================================
dnl Check options
dnl ========================================================
-dnl
+
+OS_LIBS=
+
dnl Check if NSPR is being compiled for Mozilla
dnl Let --with-arg override environment setting
dnl
@@ -469,17 +479,17 @@ if test -n "$USE_PTHREADS"; then
;;
esac
+ AC_CHECK_FUNC(pthread_create,,[
+ AC_CHECK_LIB(pthread, pthread_create, [OS_LIBS="-lpthread $OS_LIBS"])
+ ])
+
else
if test -n "$USE_USER_PTHREADS"; then
USE_PTHREADS=
USE_NSPR_THREADS=
else
USE_NSPR_THREADS=1
- case "$target" in
- *-linux*)
- AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
- ;;
- esac
+ dnl AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
fi
fi
dnl Special thread exceptions
@@ -500,6 +510,15 @@ case "$target" in
;;
esac
+AC_CHECK_FUNC(dlopen,,[
+ AC_CHECK_LIB(dl, dlopen, [OS_LIBS="-ldl $OS_LIBS"])
+])
+
+EXTRA_LIBS=
+if test "$enable_shared" = no; then
+ EXTRA_LIBS="$OS_LIBS"
+fi
+
dnl ========================================================
dnl Substitution of found variables.
dnl ========================================================
@@ -541,6 +560,9 @@ AC_SUBST(WINDRES)
AC_SUBST(RANLIB)
AC_SUBST(PERL)
+AC_SUBST(OS_LIBS)
+AC_SUBST(EXTRA_LIBS)
+
dnl ========================================================
dnl Generate output files.
dnl ========================================================
@@ -548,6 +570,8 @@ AC_OUTPUT([
Makefile
config/Makefile
config/autoconf.mk
+config/nsprincl.mk
+config/nsprincl.sh
lib/Makefile
lib/ds/Makefile
lib/libc/Makefile