OSDN Git Service

Backported from mainline
[pf3gnuchains/gcc-fork.git] / boehm-gc / configure.ac
index 61e12aa..2eddc9f 100644 (file)
@@ -123,12 +123,13 @@ AC_ARG_ENABLE(parallel-mark,
 )
 
 AM_CPPFLAGS="-I`cd $srcdir && ${PWDCMD-pwd}`/include"
+THREADCFLAGS=
 THREADLIBS=
 case "$THREADS" in
  no | none | single)
     THREADS=none
     ;;
- posix | posix95 | pthreads)
+ posix | pthreads)
     THREADS=posix
     THREADLIBS=-lpthread
     case "$host" in
@@ -163,21 +164,21 @@ case "$THREADS" in
      *-*-hpux10*)
        AC_MSG_WARN("Only HP-UX 11 POSIX threads are supported.")
        ;;
-      *-*-kfreebsd*-gnu)
+     *-*-kfreebsd*-gnu)
        AC_DEFINE(GC_FREEBSD_THREADS)
-       INCLUDES="$INCLUDES -pthread"
-       THREADDLLIBS=-pthread
+       THREADCFLAGS=-pthread
+       THREADLIBS=-pthread
        AC_DEFINE(_REENTRANT)
          if test "${enable_parallel_mark}" = yes; then
          AC_DEFINE(PARALLEL_MARK)
        fi
        AC_DEFINE(THREAD_LOCAL_ALLOC)
        AC_DEFINE(USE_COMPILER_TLS, 1,[use tls for boehm])
-               ;;
+       ;;
      *-*-freebsd*)
        AC_MSG_WARN("FreeBSD does not yet fully support threads with Boehm GC.")
        AC_DEFINE(GC_FREEBSD_THREADS,1,[support FreeBSD threads])
-       AM_CPPFLAGS="$AM_CPPFLAGS -pthread"
+       THREADCFLAGS=-pthread
        THREADLIBS=-pthread
        ;;
      *-*-solaris2.8*)
@@ -218,7 +219,7 @@ case "$THREADS" in
          # May want to enable it in other cases, too.
          # Measurements havent yet been done.
        fi
-       AM_CPPFLAGS="$AM_CPPFLAGS -pthread"
+       THREADCFLAGS=-pthread
        THREADLIBS="-lpthread -lrt"
        ;;
     esac
@@ -228,33 +229,20 @@ case "$THREADS" in
     dnl Old wine getenv may not return NULL for missing entry.
     dnl Define EMPTY_GETENV_RESULTS here to work around the bug.
     ;;
- dgux386)
-    THREADS=dgux386
-AC_MSG_RESULT($THREADLIBS)
-    # Use pthread GCC  switch
-    THREADLIBS=-pthread
-    if test "${enable_parallel_mark}" = yes; then
-        AC_DEFINE(PARALLEL_MARK,1)
-    fi
-    AC_DEFINE(THREAD_LOCAL_ALLOC,1)
-    AC_DEFINE(GC_DGUX386_THREADS,1,[support for DB/UX on I386 threads])
-    AC_DEFINE(DGUX_THREADS,1,[No description])
-    # Enable _POSIX4A_DRAFT10_SOURCE with flag -pthread
-    AM_CPPFLAGS="-pthread $AM_CPPFLAGS"
-    ;;
  aix)
     THREADS=posix
     THREADLIBS=-lpthread
     AC_DEFINE(GC_AIX_THREADS,1)
     AC_DEFINE(_REENTRANT,1)
     ;;
- decosf1 | irix | mach | os2 | solaris | dce | vxworks)
+ dce | vxworks)
     AC_MSG_ERROR(thread package $THREADS not yet supported)
     ;;
  *)
     AC_MSG_ERROR($THREADS is an unknown thread package)
     ;;
 esac
+AC_SUBST(THREADCFLAGS)
 AC_SUBST(THREADLIBS)
 
 case "$host" in
@@ -392,6 +380,7 @@ esac
 oldLIBS="$LIBS"
 LIBS="$LIBS $THREADLIBS"
 AC_CHECK_FUNCS([pthread_getattr_np])
+AC_CHECK_FUNCS([pthread_get_stackaddr_np])
 LIBS="$oldLIBS"
 
 # Configuration of machine-dependent code
@@ -412,7 +401,7 @@ case "$host" in
  alpha*-*-linux*)
     machdep="alpha_mach_dep.lo"
     ;;
- i?86-*-solaris2.[[89]] | i?86-*-solaris2.1?)
+ i?86-*-solaris2.[[89]] | i?86-*-solaris2.1? | x86_64-*-solaris2.1?)
     AC_DEFINE(SOLARIS25_PROC_VDB_BUG_FIXED,1,[PROC_VDB in Solaris 2.5 gives wrong values for dirty bits])
     ;;
  mipstx39-*-elf*)
@@ -455,22 +444,6 @@ AC_SUBST(addincludes)
 AC_SUBST(addlibs)
 AC_SUBST(addtests)
 
-#
-# Check for AViiON Machines running DGUX
-#
-ac_is_dgux=no
-AC_CHECK_HEADER(sys/dg_sys_info.h, [ac_is_dgux=yes])
-
-AC_MSG_CHECKING(if host is AViiON running DGUX)
-AC_MSG_RESULT($ac_is_dgux)
-    ## :GOTCHA: we do not check anything but sys/dg_sys_info.h
-if test $ac_is_dgux = yes; then
-    if test "$enable_full_debug" = "yes"; then
-        GC_CFLAGS="$GC_CFLAGS -mstandard"
-    fi
-    GC_CFLAGS="$GC_CFLAGS -DDGUX -D_DGUX_SOURCE -Di386 -mno-legend"
-fi
-
 dnl As of 4.13a2, the collector will not properly work on Solaris when
 dnl built with gcc and -O.  So we remove -O in the appropriate case.
 dnl Not needed anymore on Solaris.
@@ -513,9 +486,6 @@ AC_ARG_ENABLE(gc-debug,
        AC_MSG_WARN("Client must not use -fomit-frame-pointer.")
        AC_DEFINE(SAVE_CALL_COUNT, 8, [number of call frames saved with objects allocated through the debugging interface])
       ;;
-      i[3456]86-*-dgux*)
-       AC_DEFINE(MAKE_BACK_GRAPH,1)
-      ;;
     esac 
   fi])
 
@@ -547,5 +517,5 @@ fi
 
 AC_CONFIG_HEADERS([include/gc_config.h include/gc_ext_config.h])
 
-AC_CONFIG_FILES(Makefile include/Makefile threads.mk)
+AC_CONFIG_FILES(Makefile include/Makefile testsuite/Makefile threads.mk)
 AC_OUTPUT