summaryrefslogtreecommitdiff
path: root/gcc/configure.in
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1997-12-24 23:56:08 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1997-12-24 23:56:08 +0000
commit58febf9e878b004af36d51b927d91dbe4a9e0af0 (patch)
tree2e6cf425a80122eaea96bbebc87b797b0242c6da /gcc/configure.in
parent0f6bfdafdbf83f687a5d7555c3df8038530305da (diff)
downloadgcc-58febf9e878b004af36d51b927d91dbe4a9e0af0.tar.gz
* Makefile.in (GTHREAD_FLAGS): New var.
(LIBGCC2_CFLAGS): Added $(GTHREAD_FLAGS). (distclean): Remove gthr-default.h. * configure.in: Accept dce as a thread package. Check for thread.h and pthread.h. Link gthr-default.h to appropriate thread file and set gthread_flags. (hppa1.1-*-hpux10*): If --enable-threads, use dce threads and include multilib definitions from pa/t-dce-thr. (sparc-*-solaris2*): Enable threads by default, if thread.h or pthread.h is found, preferring posix threads over solaris ones. * config/pa/t-dce-thr: New file. * config/pa/t-pa: Removed multilibs. * config/sparc/t-sol2: Ditto. * gthr.h: New file. * gthr-single.h: New file. * gthr-posix.h: New file. * gthr-solaris.h: New file. * gthr-dce.h: New file. * libgcc-thr.h: Removed. * objc/thr-dce.c: New file copied from thr-decosf1.c. * frame.c: Include gthr.h instead of libgcc-thr.h. * libgcc2.c: Include gthr.h instead of libgcc-thr.h. (eh_context_initialize): If __gthread_once fails, use static eh context. (eh_context_free): Call __gthread_key_dtor. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@17235 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/configure.in')
-rw-r--r--gcc/configure.in35
1 files changed, 33 insertions, 2 deletions
diff --git a/gcc/configure.in b/gcc/configure.in
index 2ce5b305298..4957d517297 100644
--- a/gcc/configure.in
+++ b/gcc/configure.in
@@ -114,7 +114,7 @@ case x${enable_threads} in
thread_file=''
;;
xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
- xsolaris | xwin32)
+ xsolaris | xwin32 | xdce)
thread_file=$enable_threads
;;
*)
@@ -147,6 +147,10 @@ AC_HEADER_STDC
AC_HEADER_TIME
AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h time.h fcntl.h unistd.h sys/file.h sys/time.h sys/resource.h sys/param.h sys/times.h varargs.h sys/varargs.h)
+# Check for thread headers.
+AC_CHECK_HEADER(thread.h, [have_thread_h=yes], [have_thread_h=])
+AC_CHECK_HEADER(pthread.h, [have_pthread_h=yes], [have_pthread_h=])
+
# Use <inttypes.h> only if it exists,
# doesn't clash with <sys/types.h>, and declares intmax_t.
AC_MSG_CHECKING(for inttypes.h)
@@ -637,10 +641,18 @@ for machine in $build $host $target; do
tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
xm_file=pa/xm-pahpux.h
xmake_file=pa/x-pa-hpux
+ tmake_file=pa/t-pa
if [[ x$gas = xyes ]]
then
tm_file="${tm_file} pa/pa-gas.h"
fi
+ if [[ x$enable_threads = x ]]; then
+ enable_threads=$have_pthread_h
+ fi
+ if [[ x$enable_threads = xyes ]]; then
+ thread_file='dce'
+ tmake_file="${tmake_file} pa/t-dce-thr"
+ fi
install_headers_dir=install-headers-cpio
use_collect2=yes
;;
@@ -2480,8 +2492,18 @@ for machine in $build $host $target; do
fixincludes=fixinc.svr4
float_format=i128
broken_install=yes
- if [[ x$enable_threads = xyes ]]; then
+ if [[ x${enable_threads} = x ]]; then
+ enable_threads=$have_pthread_h
+ if [[ x${enable_threads} = x ]]; then
+ enable_threads=$have_thread_h
+ fi
+ fi
+ if [[ x${enable_threads} = xyes ]]; then
+ if [[ x${have_pthread_h} = xyes ]]; then
+ thread_file='posix'
+ else
thread_file='solaris'
+ fi
fi
;;
sparc-*-sunos4.0*)
@@ -3078,6 +3100,15 @@ do
esac
done
+# Make gthr-default.h if we have a thread file.
+gthread_flags=
+if [[ $thread_file != single ]]; then
+ rm -f gthr-default.h
+ $symbolic_link gthr-${thread_file}.h gthr-default.h
+ gthread_flags=-DHAVE_GTHR_DEFAULT
+fi
+AC_SUBST(gthread_flags)
+
# Make empty files to contain the specs and options for each language.
# Then add #include lines to for a compiler that has specs and/or options.