@@ -93,7 +93,7 @@ LIBTOOL_INSTALL = $(LIBTOOL) --mode=inst
LIBTOOL_CLEAN = $(LIBTOOL) --mode=clean
#LIBTOOL_UNINSTALL = $(LIBTOOL) --mode=uninstall
-OBJC_GCFLAGS=-DOBJC_WITH_GC=1
+OBJC_GCFLAGS=@OBJC_GCFLAGS@
OBJC_BOEHM_GC=@OBJC_BOEHM_GC@
OBJC_BOEHM_GC_INCLUDES=@OBJC_BOEHM_GC_INCLUDES@
OBJC_BOEHM_GC_LIBS=../boehm-gc/libgcjgc_convenience.la $(thread_libs_and_flags)
@@ -1,6 +1,6 @@
# Process this file with autoconf to produce a configure script.
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004
-# 2005, 2006, 2009 Free Software Foundation, Inc.
+# 2005, 2006, 2009, 2011 Free Software Foundation, Inc.
# Originally contributed by Dave Love (d.love@dl.ac.uk).
#
#This file is part of GCC.
@@ -63,15 +63,25 @@ AC_ARG_ENABLE(objc-gc,
the GNU Objective-C runtime.],
[case $enable_objc_gc in
no)
+ OBJC_GCFLAGS=''
OBJC_BOEHM_GC=''
OBJC_BOEHM_GC_INCLUDES=''
;;
*)
- OBJC_BOEHM_GC=libobjc_gc.la
+ OBJC_GCFLAGS='-DOBJC_WITH_GC=1'
+ OBJC_BOEHM_GC='libobjc_gc$(libsuffix).la'
OBJC_BOEHM_GC_INCLUDES='-I$(top_srcdir)/../boehm-gc/include -I../boehm-gc/include'
+ case "${host}" in
+ alpha*-dec-osf*)
+ # boehm-gc headers include <pthread.h>, which needs to be compiled
+ # with -pthread on Tru64 UNIX.
+ OBJC_GCFLAGS="${OBJC_GCFLAGS} -pthread"
+ ;;
+ esac
;;
esac],
-[OBJC_BOEHM_GC=''; OBJC_BOEHM_GC_INCLUDES=''])
+[OBJC_GCFLAGS=''; OBJC_BOEHM_GC=''; OBJC_BOEHM_GC_INCLUDES=''])
+AC_SUBST(OBJC_GCFLAGS)
AC_SUBST(OBJC_BOEHM_GC)
AC_SUBST(OBJC_BOEHM_GC_INCLUDES)