summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>1997-10-24 15:49:12 +0000
committerXavier Leroy <xavier.leroy@inria.fr>1997-10-24 15:49:12 +0000
commit51a0d78d17ca0de10e0850aa21fcb3ec61a66e00 (patch)
treecdaf7fdac34f9e30dcd90d336b5c672f88697373 /configure
parent174fdd6b13d987cdcc0bbea86d2205f530647b7f (diff)
downloadocaml-51a0d78d17ca0de10e0850aa21fcb3ec61a66e00.tar.gz
configure, INSTALL: option -with-pthread
README, etc: MAJ git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1735 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure51
1 files changed, 40 insertions, 11 deletions
diff --git a/configure b/configure
index 9f55b4b5dd..3d2a618d3b 100755
--- a/configure
+++ b/configure
@@ -22,27 +22,53 @@ cc=''
cclibs=''
x11_include_dir=''
x11_lib_dir=''
+posix_threads=no
# Parse command-line arguments
while : ; do
case "$1" in
"") break;;
- -bindir|--bindir) bindir=$2;;
- -libdir|--libdir) libdir=$2;;
- -mandir|--mandir) mandir=$2
- manext=`echo $mandir | sed -e 's/^.*\(.\)$/\1/'`;;
- -host*|--host*) host_type=$2;;
- -cc*) cc="$2";;
- -lib*) cclibs="$2 ";;
- -x11include*|--x11include*) x11_include_dir=$2;;
- -x11lib*|--x11lib*) x11_lib_dir=$2;;
+ -bindir|--bindir)
+ bindir=$2; shift;;
+ -libdir|--libdir)
+ libdir=$2; shift;;
+ -mandir|--mandir)
+ mandir=$2
+ manext=`echo $mandir | sed -e 's/^.*\(.\)$/\1/'`
+ shift;;
+ -host*|--host*)
+ host_type=$2; shift;;
+ -cc*)
+ cc="$2"; shift;;
+ -lib*)
+ cclibs="$2 "; shift;;
+ -x11include*|--x11include*)
+ x11_include_dir=$2; shift;;
+ -x11lib*|--x11lib*)
+ x11_lib_dir=$2; shift;;
+ -with-pthread|--with-pthread)
+ posix_threads=yes;;
*) echo "Unknown option \"$1\"." 1>&2; exit 2;;
esac
shift
- shift
done
+# Sanity checks
+
+case "$bindir" in
+ /*) ;;
+ *) echo "The -bindir directory must be absolute." 1>&2; exit 2;;
+esac
+case "$libdir" in
+ /*) ;;
+ *) echo "The -libdir directory must be absolute." 1>&2; exit 2;;
+esac
+case "$mandir" in
+ /*) ;;
+ *) echo "The -mandir directory must be absolute." 1>&2; exit 2;;
+esac
+
# Generate the files
cd config/auto-aux
@@ -574,7 +600,10 @@ echo "BIGNUM_ARCH=$bignum_arch" >> Makefile
# Determine if the threads library is supported
-if test "$has_select" = "yes" \
+if test "$posix_threads" = "yes"; then
+ echo "Threads library supported (using POSIX system threads)."
+ otherlibraries="$otherlibraries systhreads"
+elif test "$has_select" = "yes" \
&& test "$has_setitimer" = "yes" \
&& test "$has_gettimeofday" = "yes" \
&& test "$has_wait" = "yes"; then