mirror of
https://github.com/gnustep/tools-make.git
synced 2025-04-23 22:33:28 +00:00
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:
parent
e4aa34680d
commit
cfb737fda4
3 changed files with 1657 additions and 1773 deletions
|
@ -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:
|
||||
|
|
34
configure.ac
34
configure.ac
|
@ -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!
|
||||
|
|
Loading…
Reference in a new issue