summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMatthias Klose <doko@ubuntu.com>2016-11-30 00:12:45 +0000
committerMatthias Klose <doko@gcc.gnu.org>2016-11-30 00:12:45 +0000
commit114bf3f172d0f215a576d8964b95c0a4608563e0 (patch)
tree612b3ff1d05c431b7d883db262d72acacab4b0d8 /configure.ac
parenta2b403c8bb69250b321c9d56e38f5f3537a1e696 (diff)
Makefile.def: Remove reference to boehm-gc target module.
<toplevel> 2016-11-30 Matthias Klose <doko@ubuntu.com> * Makefile.def: Remove reference to boehm-gc target module. * configure.ac: Include pkg.m4, check for --with-target-bdw-gc options and for the bdw-gc pkg-config module. * configure: Regenerate. * Makefile.in: Regenerate. gcc/ 2016-11-30 Matthias Klose <doko@ubuntu.com> * doc/install.texi: Document configure options --enable-objc-gc and --with-target-bdw-gc. config/ 2016-11-30 Matthias Klose <doko@ubuntu.com> * pkg.m4: New file. libobjc/ 2016-11-30 Matthias Klose <doko@ubuntu.com> * configure.ac (--enable-objc-gc): Allow to configure with a system provided boehm-gc. * configure: Regenerate. * Makefile.in (OBJC_BOEHM_GC_LIBS): Get value from configure. * gc.c: Include system bdw-gc headers. * memory.c: Likewise * objects.c: Likewise boehm-gc/ 2016-11-30 Matthias Klose <doko@ubuntu.com> Remove From-SVN: r242985
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac48
1 files changed, 31 insertions, 17 deletions
diff --git a/configure.ac b/configure.ac
index 5f60de569f9..ed89ea22c24 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,6 +29,7 @@ m4_include([ltsugar.m4])
m4_include([ltversion.m4])
m4_include([lt~obsolete.m4])
m4_include([config/isl.m4])
+m4_include([config/pkg.m4])
AC_INIT(move-if-change)
AC_PREREQ(2.64)
@@ -161,7 +162,6 @@ target_libraries="target-libgcc \
target-libssp \
target-libquadmath \
target-libgfortran \
- target-boehm-gc \
target-libffi \
target-libobjc \
target-libada \
@@ -2060,22 +2060,36 @@ done
AC_ARG_ENABLE(objc-gc,
[AS_HELP_STRING([--enable-objc-gc],
[enable 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_objc_gc} in
- *,objc,*:yes)
- # Keep target-boehm-gc if requested for Objective-C.
- ;;
- *)
- # Otherwise remove target-boehm-gc.
- noconfigdirs="$noconfigdirs target-boehm-gc"
- ;;
+ GNU Objective-C runtime])])
+AC_ARG_WITH([target-bdw-gc],
+[AS_HELP_STRING([--with-target-bdw-gc=PATHLIST],
+ [specify prefix directory for installed bdw-gc package.
+ Equivalent to --with-target-bdw-gc-include=PATH/include
+ plus --with-target-bdw-gc-lib=PATH/lib])])
+AC_ARG_WITH([target-bdw-gc-include],
+[AS_HELP_STRING([--with-target-bdw-gc-include=PATHLIST],
+ [specify directories for installed bdw-gc include files])])
+AC_ARG_WITH([target-bdw-gc-lib],
+[AS_HELP_STRING([--with-target-bdw-gc-lib=PATHLIST],
+ [specify directories for installed bdw-gc library])])
+
+case ,${enable_languages},:${enable_objc_gc} in *,objc,*:yes|*,objc,*:auto)
+ AC_MSG_CHECKING([for bdw garbage collector])
+ if test "x$with_target_bdw_gc$with_target_bdw_gc_include$with_target_bdw_gc_lib" = x; then
+ dnl no bdw-gw options, fall back to the bdw-gc pkg-config module
+ PKG_CHECK_EXISTS(bdw-gc,
+ AC_MSG_RESULT([using bdw-gc pkg-config module]),
+ AC_MSG_ERROR([no --with-target-bdw-gc options and no bdw-gc pkg-config module found]))
+ else
+ dnl bdw-gw options, first error checking, complete checking in libobjc
+ if test "x$with_target_bdw_gc_include" = x && test "x$with_target_bdw_gc_lib" != x; then
+ AC_MSG_ERROR([found --with-target-bdw-gc-lib but --with-target-bdw-gc-include missing])
+ elif test "x$with_target_bdw_gc_include" != x && test "x$with_target_bdw_gc_lib" = x; then
+ AC_MSG_ERROR([found --with-target-bdw-gc-include but --with-target-bdw-gc-lib missing])
+ else
+ AC_MSG_RESULT([using paths configured with --with-target-bdw-gc options])
+ fi
+ fi
esac
# Disable libcilkrts, libitm, libsanitizer, libvtv, liboffloadmic if we're not building C++