OSDN Git Service

2006-06-13 Maxim Kuvyrkov <mkuvyrkov@ispras.ru>
[pf3gnuchains/gcc-fork.git] / configure.in
index bf37b80..2ff8aa5 100644 (file)
@@ -134,7 +134,6 @@ host_tools="texinfo byacc flex bison binutils gas ld fixincludes gcc sid sim gdb
 
 # libgcj represents the runtime libraries only used by gcj.
 libgcj="target-libffi \
-       target-boehm-gc \
        target-zlib \
        target-qthreads \
        target-libjava"
@@ -149,6 +148,7 @@ target_libraries="target-libiberty \
                target-libmudflap \
                target-libssp \
                target-libgfortran \
+               target-boehm-gc \
                ${libgcj} \
                target-libobjc \
                target-libada \
@@ -353,7 +353,7 @@ if test x$enable_libgomp = x ; then
        ;;
     *-*-netbsd* | *-*-freebsd* | *-*-openbsd*)
        ;;
-    *-*-solaris2* | *-*-sysv4* | *-*-irix* | *-*-osf* | *-*-hpux*)
+    *-*-solaris2* | *-*-sysv4* | *-*-irix* | *-*-osf* | *-*-hpux11*)
        ;;
     *-*-darwin* | *-*-aix*)
        ;;
@@ -1068,26 +1068,6 @@ fi
 ACX_PROG_GNAT
 ACX_PROG_CMP_IGNORE_INITIAL
 
-# Check for html and install-html
-AC_ARG_WITH(datarootdir,
-[  --with-datarootdir   Use datarootdir as the data root directory.],
-[datarootdir="\${prefix}/${withval}"],
-[datarootdir="\${prefix}/share"])
-
-AC_ARG_WITH(docdir,
-[  --with-docdir        Install documentation in this directory.],
-[docdir="\${prefix}/${withval}"],
-[docdir="\${datarootdir}/doc"])
-
-AC_ARG_WITH(htmldir,
-[  --with-htmldir       Install html in this directory.],
-[htmldir="\${prefix}/${withval}"],
-[htmldir="\${docdir}"])
-
-AC_SUBST(datarootdir)
-AC_SUBST(docdir)
-AC_SUBST(htmldir)
-
 # Check for GMP and MPFR
 gmplibs=
 gmpinc=
@@ -1333,6 +1313,34 @@ for dir in $configdirs $build_configdirs $target_configdirs ; do
   fi
 done
 
+# Check for Boehm's garbage collector
+AC_ARG_ENABLE(objc-gc,
+[  --enable-objc-gc       enable the use of Boehm's garbage collector with
+                          the GNU Objective-C runtime.],
+[case ,${enable_languages},:${enable_objc_gc}:${noconfigdirs} in
+  *,objc,*:*:yes:*target-boehm-gc*)
+    AC_MSG_ERROR([Boehm's garbage collector was requested yet not supported in this configuration])
+    ;;
+esac])
+
+# Make sure we only build Boehm's garbage collector if required.
+case ,${enable_languages},:${enable_libgcj}:${enable_objc_gc} in
+  *,objc,*:*:yes)
+    # Keep target-boehm-gc if requested for Objective-C.
+    ;;
+  *,java,*:no:*)
+    # Remove target-boehm-gc if libgcj has been disabled explicitly.
+    noconfigdirs="$noconfigdirs target-boehm-gc"
+    ;;
+  *,java,*:*:*)
+    # Keep target-boehm-gc by default for Java.
+    ;;
+  *)
+    # Otherwise remove target-boehm-gc.
+    noconfigdirs="$noconfigdirs target-boehm-gc"
+    ;;
+esac
+
 # Remove the entries in $skipdirs and $noconfigdirs from $configdirs,
 # $build_configdirs and $target_configdirs.
 # If we have the source for $noconfigdirs entries, add them to $notsupp.
@@ -2405,4 +2413,24 @@ case ${enable_werror} in
 esac
 AC_SUBST(stage2_werror_flag)
 
+# Flags needed to enable html installing and building
+AC_ARG_WITH(datarootdir,
+[  --with-datarootdir  Use datarootdir as the data root directory.],
+[datarootdir="\${prefix}/${withval}"],
+[datarootdir="\${prefix}/share"])
+
+AC_ARG_WITH(docdir,
+[  --with-docdir       Install documentation in this directory.],
+[docdir="\${prefix}/${withval}"],
+[docdir="\${datarootdir}/doc"])
+
+AC_ARG_WITH(htmldir,
+[  --with-htmldir      Install html in this directory.],
+[htmldir="\${prefix}/${withval}"],
+[htmldir="\${docdir}"])
+
+AC_SUBST(datarootdir)
+AC_SUBST(docdir)
+AC_SUBST(htmldir)
+
 AC_OUTPUT(Makefile)