hack to fake OBJCXX checks on systems without new autoconf

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@32770 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2011-04-04 11:33:46 +00:00
parent e4aa34680d
commit cfb737fda4
3 changed files with 1657 additions and 1773 deletions

View file

@ -1,3 +1,11 @@
2011-04-04 Richard Frith-Macdonald <rfm@gnu.org>
* configure.ac:
* configure:
Fake the ObjC++ tests using C++ since only really new versions of
autoconf seem to support ObjC++ and we need things to work on older
systems.
2011-03-22 Richard Frith-Macdonald <rfm@gnu.org>
* configure.ac:

3388
configure vendored

File diff suppressed because it is too large Load diff

View file

@ -37,8 +37,10 @@ AC_PROG_CPP
# compile/link C++ code. :-)
AC_PROG_CXX
# Similarly for the ObjC++ compiler
AC_PROG_OBJCXX
# Similarly for the ObjC++ compiler ... but only new versions of autoconf
# support it, so we pretend by using the C++ compiler
#AC_PROG_OBJCXX
OBJCXX=CXX
AC_CANONICAL_TARGET([])
@ -1249,11 +1251,19 @@ AC_SUBST(objc_threaded)
AC_SUBST(ac_cv_objc_threaded)
AC_MSG_CHECKING(whether Objective-C++ is supported)
AC_LANG_PUSH(Objective C++)
OBJCXXFLAGS_saved="$OBJCXXFLAGS"
OBJCXXFLAGS="$OBJCXXFLAGS -x objective-c++"
OBJCXXPPFLAGS_saved="$OBJCXXPPFLAGS"
OBJCXXPPFLAGS="$OBJCXXPPFLAGS -x objective-c++"
# Only new autoconf supports ObjC++ so we use C++ instead for now
#AC_LANG_PUSH(Objective C++)
#OBJCXXFLAGS_saved="$OBJCXXFLAGS"
#OBJCXXFLAGS="$OBJCXXFLAGS -x objective-c++"
#OBJCXXPPFLAGS_saved="$OBJCXXPPFLAGS"
#OBJCXXPPFLAGS="$OBJCXXPPFLAGS -x objective-c++"
AC_LANG_PUSH(C++)
CXXFLAGS_saved="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -x objective-c++"
CXXPPFLAGS_saved="$CXXPPFLAGS"
CXXPPFLAGS="$CXXPPFLAGS -x objective-c++"
AC_RUN_IFELSE([[
@interface ObjCClass
@ -1278,9 +1288,13 @@ if test x"$objcc" = x"no"; then
OBJCXX=
fi
AC_SUBST(OBJCXX)
OBJCXXFLAGS="$OBJCXXFLAGS_saved"
OBJCXXPPFLAGS="$OBJCXXPPFLAGS_saved"
AC_LANG_POP(Objective C++)
# Only new autoconf supports ObjC++ so we use C++ instead for now
#OBJCXXFLAGS="$OBJCXXFLAGS_saved"
#OBJCXXPPFLAGS="$OBJCXXPPFLAGS_saved"
#AC_LANG_POP(Objective C++)
CXXFLAGS="$CXXFLAGS_saved"
CXXPPFLAGS="$CXXPPFLAGS_saved"
AC_LANG_POP(C++)
#--------------------------------------------------------------------
# Check if GCC supports -fobjc-nonfragile-abi, and if so, turn it on!