OSDN Git Service

Add bug number:
[pf3gnuchains/gcc-fork.git] / boehm-gc / configure.ac
index a99cb90..208a916 100644 (file)
@@ -16,8 +16,8 @@
 dnl Process this file with autoconf to produce configure.
 
 AC_PREREQ(2.59)
-AC_INIT(gcj_mlc.c)
-
+AC_INIT
+AC_CONFIG_SRCDIR(gcj_mlc.c)
 # This works around the fact that libtool configuration may change LD
 # for this particular configuration, but some shells, instead of
 # keeping the changes in LD private, export them just because LD is
@@ -26,21 +26,19 @@ ORIGINAL_LD_FOR_MULTILIBS=$LD
 
 AM_ENABLE_MULTILIB(, ..)
 
-AC_CANONICAL_SYSTEM
+AC_CANONICAL_HOST
+AC_CANONICAL_TARGET
 
 # Get the 'noncanonical' system names.
-_GCC_TOPLEV_NONCANONICAL_BUILD
-_GCC_TOPLEV_NONCANONICAL_HOST
-_GCC_TOPLEV_NONCANONICAL_TARGET
+ACX_NONCANONICAL_TARGET
 
 # This works around an automake problem.
 mkinstalldirs="`cd $ac_aux_dir && ${PWDCMD-pwd}`/mkinstalldirs"
 AC_SUBST(mkinstalldirs)
 
-AM_INIT_AUTOMAKE(gc, 6.1a1, no-define)
+AM_INIT_AUTOMAKE(gc, 6.3, no-define)
 
 # The autoconf 2.5x version of the no-executables hack.
-sinclude(../config/no-executables.m4)
 GCC_NO_EXECUTABLES
 
 # Yak.  We must force CC and CXX to /not/ be precious variables; otherwise
@@ -72,26 +70,26 @@ AC_PROG_INSTALL
 
 AM_MAINTAINER_MODE
 
-. [$]{srcdir}/configure.host
+. ${srcdir}/configure.host
 
-case [$]{gc_basedir} in
-/* | [A-Za-z]:[/\\]*) gc_flagbasedir=[$]{gc_basedir} ;;
-*) gc_flagbasedir='[$](top_builddir)/'[$]{gc_basedir} ;;
+case ${gc_basedir} in
+/* | [A-Za-z]:[/\\]*) gc_flagbasedir=${gc_basedir} ;;
+*) gc_flagbasedir='$(top_builddir)/'${gc_basedir} ;;
 esac
 
-gc_cflags="[$]{gc_cflags} -I"'[$](top_builddir)'"/./targ-include -I[$]{gc_flagbasedir}/libc/include"
+gc_cflags="${gc_cflags} -Iinclude -I"'$(top_builddir)'"/./targ-include -I${gc_flagbasedir}/libc/include"
 case "${host}" in
   *-*-cygwin32*)
-    gc_cflags="[$]{gc_cflags} -I[$]{gc_flagbasedir}/../winsup/include"
+    gc_cflags="${gc_cflags} -I${gc_flagbasedir}/../winsup/include"
     ;;
 esac
 
-dnl gc_cflags="[$]{gc_cflags} -fno-builtin"
+dnl gc_cflags="${gc_cflags} -fno-builtin"
 
 GC_CFLAGS=${gc_cflags}
 AC_SUBST(GC_CFLAGS)
 
-AM_PROG_LIBTOOL
+AC_PROG_LIBTOOL
 
 dnl We use these options to decide which functions to include.
 AC_ARG_WITH(target-subdir,
@@ -122,64 +120,64 @@ case "$THREADS" in
  no | none | single)
     THREADS=none
     ;;
- posix | pthreads)
+ posix | posix95 | pthreads)
     THREADS=posix
     THREADLIBS=-lpthread
     case "$host" in
      x86-*-linux* | ia64-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* | alpha-*-linux*)
-       AC_DEFINE(GC_LINUX_THREADS)
-       AC_DEFINE(_REENTRANT)
+       AC_DEFINE(GC_LINUX_THREADS,1,[support for Xavier Leroy's Linux threads])
+       AC_DEFINE(_REENTRANT,1,[Use reentrant code])
         if test "${enable_parallel_mark}" = yes; then
-         AC_DEFINE(PARALLEL_MARK)
+         AC_DEFINE(PARALLEL_MARK,1,[allow the marker to run in multiple threads])
        fi
-       AC_DEFINE(THREAD_LOCAL_ALLOC)
+       AC_DEFINE(THREAD_LOCAL_ALLOC,1,[define GC_local_malloc() & GC_local_malloc_atomic()])
        ;;
      *-*-linux*)
-       AC_DEFINE(GC_LINUX_THREADS)
-       AC_DEFINE(_REENTRANT)
+       AC_DEFINE(GC_LINUX_THREADS,1)
+       AC_DEFINE(_REENTRANT,1)
        ;;
      *-*-aix*)
-       AC_DEFINE(GC_AIX_THREADS)
-       AC_DEFINE(_REENTRANT)
+       AC_DEFINE(GC_AIX_THREADS,1,[support AIX threads])
+       AC_DEFINE(_REENTRANT,1)
        ;;
      *-*-hpux*)
        AC_MSG_WARN("Only HP/UX 11 threads are supported.")
-       AC_DEFINE(GC_HPUX_THREADS)
-       AC_DEFINE(_POSIX_C_SOURCE,199506L)
+       AC_DEFINE(GC_HPUX_THREADS,1,[enables support for HP/UX 11 pthreads])
+       AC_DEFINE(_POSIX_C_SOURCE,199506L,[POSIX version of C Source])
        if test "${enable_parallel_mark}" = yes; then
-         AC_DEFINE(PARALLEL_MARK)
+         AC_DEFINE(PARALLEL_MARK,1)
        fi
-       AC_DEFINE(THREAD_LOCAL_ALLOC)
+       AC_DEFINE(THREAD_LOCAL_ALLOC,1)
        THREADLIBS="-lpthread -lrt"
        ;;
      *-*-freebsd*)
        AC_MSG_WARN("FreeBSD does not yet fully support threads with Boehm GC.")
-       AC_DEFINE(GC_FREEBSD_THREADS)
+       AC_DEFINE(GC_FREEBSD_THREADS,1,[support FreeBSD threads])
        AM_CPPFLAGS="$AM_CPPFLAGS -pthread"
        THREADLIBS=-pthread
        ;;
      *-*-solaris*)
-       AC_DEFINE(GC_SOLARIS_THREADS)
-       AC_DEFINE(GC_SOLARIS_PTHREADS)
+       AC_DEFINE(GC_SOLARIS_THREADS,1,[support for Solaris (thr_) threads])
+       AC_DEFINE(GC_SOLARIS_PTHREADS,1,[support for Solaris pthreads])
        ;;
      *-*-irix*)
-       AC_DEFINE(GC_IRIX_THREADS)
+       AC_DEFINE(GC_IRIX_THREADS,1,[support for Irix pthreads])
        ;;
      *-*-cygwin*)
-       AC_DEFINE(GC_WIN32_THREADS)
+       AC_DEFINE(GC_WIN32_THREADS,1,[support for win32 threads])
        ;;
      *-*-darwin*)
-       AC_DEFINE(GC_DARWIN_THREADS)
-       AC_DEFINE(THREAD_LOCAL_ALLOC)
+       AC_DEFINE(GC_DARWIN_THREADS,1,[support for Mac OS X pthreads])
+       AC_DEFINE(THREAD_LOCAL_ALLOC,1)
        if test "${enable_parallel_mark}" = yes; then
-         AC_DEFINE(PARALLEL_MARK)
+         AC_DEFINE(PARALLEL_MARK,1)
        fi
        ;;
      *-*-osf*)
-       AC_DEFINE(GC_OSF1_THREADS)
+       AC_DEFINE(GC_OSF1_THREADS,1,[support for Tru64 pthreads])
         if test "${enable_parallel_mark}" = yes; then
-         AC_DEFINE(PARALLEL_MARK)
-         AC_DEFINE(THREAD_LOCAL_ALLOC)
+         AC_DEFINE(PARALLEL_MARK,1)
+         AC_DEFINE(THREAD_LOCAL_ALLOC,1)
          # May want to enable it in other cases, too.
          # Measurements havent yet been done.
        fi
@@ -189,7 +187,7 @@ case "$THREADS" in
     esac
     ;;
  win32)
-    AC_DEFINE(GC_WIN32_THREADS)
+    AC_DEFINE(GC_WIN32_THREADS,1)
     dnl Old wine getenv may not return NULL for missing entry.
     dnl Define EMPTY_GETENV_RESULTS here to work around the bug.
     ;;
@@ -199,19 +197,19 @@ AC_MSG_RESULT($THREADLIBS)
     # Use pthread GCC  switch
     THREADLIBS=-pthread
     if test "${enable_parallel_mark}" = yes; then
-        AC_DEFINE(PARALLEL_MARK)
+        AC_DEFINE(PARALLEL_MARK,1)
     fi
-    AC_DEFINE(THREAD_LOCAL_ALLOC)
-    AC_DEFINE(GC_DGUX386_THREADS)
-    AC_DEFINE(DGUX_THREADS)
+    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)
-    AC_DEFINE(_REENTRANT)
+    AC_DEFINE(GC_AIX_THREADS,1)
+    AC_DEFINE(_REENTRANT,1)
     ;;
  decosf1 | irix | mach | os2 | solaris | dce | vxworks)
     AC_MSG_ERROR(thread package $THREADS not yet supported)
@@ -242,7 +240,6 @@ AC_SUBST(EXTRA_TEST_LIBS)
 
 target_all=libgcjgc.la
 AC_SUBST(target_all)
-AC_SUBST(target_noncanonical)
 
 dnl If the target is an eCos system, use the appropriate eCos
 dnl I/O routines.
@@ -262,7 +259,7 @@ case "$TARGET_ECOS" in
    no)
       ;;
    *)
-      AC_DEFINE(ECOS)
+      AC_DEFINE(ECOS,1,[Target is ECOS])
       AM_CPPFLAGS="${AM_CPPFLAGS} -I${TARGET_ECOS}/include"
       addobjs="$addobjs ecos.lo"
       ;;
@@ -315,12 +312,12 @@ case "$host" in
     machdep="alpha_mach_dep.lo"
     ;;
  i?86-*-solaris2.[[89]] | i?86-*-solaris2.1?)
-    AC_DEFINE(SOLARIS25_PROC_VDB_BUG_FIXED)
+    AC_DEFINE(SOLARIS25_PROC_VDB_BUG_FIXED,1,[PROC_VDB in Solaris 2.5 gives wrong values for dirty bits])
     ;;
  mipstx39-*-elf*)
     machdep="mips_ultrix_mach_dep.lo"
-    AC_DEFINE(STACKBASE, __stackbase)
-    AC_DEFINE(DATASTART_IS_ETEXT)
+    AC_DEFINE(STACKBASE, __stackbase,[No description])
+    AC_DEFINE(DATASTART_IS_ETEXT,1,[No description])
     ;;
  mips-dec-ultrix*)
     machdep="mips_ultrix_mach-dep.lo"
@@ -337,13 +334,13 @@ case "$host" in
     ;;
  sparc-sun-solaris2.3)
     machdep="sparc_mach_dep.lo"
-    AC_DEFINE(SUNOS53_SHARED_LIB)
+    AC_DEFINE(SUNOS53_SHARED_LIB,1,[Avoid Solaris 5.3 dynamic library bug])
     ;;
- sparc-sun-solaris2.*)
+ sparc*-sun-solaris2.*)
     machdep="sparc_mach_dep.lo"
     ;;
  ia64-*-*)
-    AC_DEFINE(NO_EXECUTE_PERMISSION)
+    AC_DEFINE(NO_EXECUTE_PERMISSION,1,[cause some or all of the heap to not have execute permission])
     machdep="mach_dep.lo ia64_save_regs_in_stack.lo"
     ;;
 esac
@@ -357,8 +354,6 @@ AC_SUBST(addincludes)
 AC_SUBST(addlibs)
 AC_SUBST(addtests)
 
-AC_PROG_LIBTOOL
-
 #
 # Check for AViiON Machines running DGUX
 #
@@ -381,19 +376,12 @@ if test $ac_is_dgux = yes; then
     AC_SUBST(CXXFLAGS)
 fi
 
-dnl We use these options to decide which functions to include.
-AC_ARG_WITH(target-subdir,
-[  --with-target-subdir=SUBDIR
-                          configuring with a cross compiler])
-AC_ARG_WITH(cross-host,
-[  --with-cross-host=HOST  configuring with a cross compiler])
-
 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
+dnl Not needed anymore on Solaris.
 AC_MSG_CHECKING(whether Solaris gcc optimization fix is necessary)
 case "$host" in
sparc-sun-solaris2*|*aix*)
+ *aix*)
     if test "$GCC" = yes; then
        AC_MSG_RESULT(yes)
        new_CFLAGS=
@@ -420,43 +408,43 @@ AC_SUBST(MY_CFLAGS)
 
 dnl Include defines that have become de facto standard.
 dnl ALL_INTERIOR_POINTERS can be overridden in startup code.
-AC_DEFINE(SILENT)
-AC_DEFINE(NO_SIGNALS)
-AC_DEFINE(ALL_INTERIOR_POINTERS)
+AC_DEFINE(SILENT,1,[disables statistics printing])
+AC_DEFINE(NO_SIGNALS,1,[does not disable signals])
+AC_DEFINE(ALL_INTERIOR_POINTERS,1,[allows all pointers to the interior of objects to be recognized])
 
 dnl By default, make the library as general as possible.
-AC_DEFINE(JAVA_FINALIZATION)
-AC_DEFINE(GC_GCJ_SUPPORT)
-AC_DEFINE(ATOMIC_UNCOLLECTABLE)
+AC_DEFINE(JAVA_FINALIZATION,1,[make it somewhat safer to finalize objects out of order])
+AC_DEFINE(GC_GCJ_SUPPORT,1,[include support for gcj])
+AC_DEFINE(ATOMIC_UNCOLLECTABLE,1,[include code for GC_malloc_atomic_uncollectable])
 
 dnl This is something of a hack.  When cross-compiling we turn off
 dnl some functionality. These is only correct when targetting an
 dnl embedded system.  FIXME.
 if test -n "${with_cross_host}"; then
-   AC_DEFINE(NO_SIGSET)
-   AC_DEFINE(NO_DEBUGGING)
+   AC_DEFINE(NO_SIGSET,1,[use empty GC_disable_signals and GC_enable_signals])
+   AC_DEFINE(NO_DEBUGGING,1,[removes GC_dump])
 fi
 
-AC_ARG_ENABLE(full-debug,
-[  --enable-full-debug include full support for pointer backtracing etc.],
-[ if test "$enable_full_debug" = "yes"; then
+AC_ARG_ENABLE(gc-debug,
+[  --enable-gc-debug   include full support for pointer backtracing etc.],
+[ if test "$enable_gc_debug" = "yes"; then
     AC_MSG_WARN("Must define GC_DEBUG and use debug alloc. in clients.")
-    AC_DEFINE(KEEP_BACK_PTRS)
-    AC_DEFINE(DBG_HDRS_ALL)
+    AC_DEFINE(KEEP_BACK_PTRS,1,[Add code to save back pointers])
+    AC_DEFINE(DBG_HDRS_ALL,1,[Make sure that all objects have debug headers])
     case $host in
       ia64-*-linux* )
-       AC_DEFINE(MAKE_BACK_GRAPH)
+       AC_DEFINE(MAKE_BACK_GRAPH,1,[Enable GC_PRINT_BACK_HEIGHT environment variable])
       ;;
       x86-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* )
-       AC_DEFINE(MAKE_BACK_GRAPH)
+       AC_DEFINE(MAKE_BACK_GRAPH,1)
        AC_MSG_WARN("Client must not use -fomit-frame-pointer.")
-       AC_DEFINE(SAVE_CALL_COUNT, 8)
+       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)
+       AC_DEFINE(MAKE_BACK_GRAPH,1)
       ;;
-    esac ]
-  fi)
+    esac 
+  fi])
 
 if test -n "$with_cross_host" &&
    test x"$with_cross_host" != x"no"; then
@@ -480,10 +468,7 @@ else
   multilib_arg=
 fi
 
-AC_CONFIG_COMMANDS(boehm-cflags, [
-dnl Put all the -I and -D options in a file.
-echo "$AM_CPPFLAGS $DEFS" > boehm-cflags], [
-DEFS="$DEFS"
-AM_CPPFLAGS="$AM_CPPFLAGS"])
+AC_CONFIG_HEADERS([include/gc_config.h include/gc_ext_config.h])
+
 AC_CONFIG_FILES(Makefile include/Makefile)
 AC_OUTPUT