diff options
author | neroden <neroden@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-08-03 19:40:56 +0000 |
---|---|---|
committer | neroden <neroden@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-08-03 19:40:56 +0000 |
commit | 4618c7f0421522e19c699a906161c18a4d1ca144 (patch) | |
tree | 26e49635650726c4963f58b4e942f67d87bcfde4 /libjava/configure.in | |
parent | e08bd2f48a99bbbb4affd85f05cb1f3719352f91 (diff) | |
download | gcc-4618c7f0421522e19c699a906161c18a4d1ca144.tar.gz |
* acinclude.m4: Include no-executables.m4.
* aclocal.m4: Rebuild.
* configure.in: Convert to the autoconf 2.59 version of
of the no-executables hack, and also of the nonstandard CXX
hack and the multilibbed CC and CXX hack. Change prerequisite
to autoconf 2.59.
* configure: Rebuild with autoconf 2.59. (Woo-hoo!)
* Makefile.in, gcj/Makefile.in, include/Makefile.in,
testsuite/Makefile.in: Regenerate.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85495 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/configure.in')
-rw-r--r-- | libjava/configure.in | 76 |
1 files changed, 25 insertions, 51 deletions
diff --git a/libjava/configure.in b/libjava/configure.in index dc7b8799353..38ccec5ac0e 100644 --- a/libjava/configure.in +++ b/libjava/configure.in @@ -1,5 +1,5 @@ dnl Process this with autoconf to create configure -AC_PREREQ(2.13) +AC_PREREQ(2.59) AC_INIT(java/lang/System.java) dnl We use these options to decide which functions to include. @@ -84,57 +84,31 @@ AC_ARG_ENABLE(multilib, *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;; esac], [multilib=yes])dnl -dnl This shouldn't be needed, as long as top-level dependencies are -dnl defined correctly and shared-library paths are set up so that -dnl execution tests succeed. FIXME. -define([AC_PROG_CC_WORKS],[]) -define([AC_PROG_CXX_WORKS],[]) - +dnl # It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX. +GCC_NO_EXECUTABLES + +# (1) We use an abnormal CXX (without library references), so we +# must cache it under a different name. +# (2) CC, CFLAGS, CXX, CXXFLAGS, LDFLAGS must not be 'precious', or +# the non-multilib-adjusted value will be used in multilibs. +# (3) As a side effect, we must SUBST CXXFLAGS, CFLAGS, and LDFLAGS ourselves. +# (4) As another side effect, automake doesn't automatically include them +# in Makefile.in. +# (5) For libstdc++-v3, -fno-builtin must be present here so that a +# non-conflicting form of std::exit can be guessed by AC_PROG_CXX, and +# used in later tests. This may not be necessary in libjava; I don't know. +m4_define([ac_cv_prog_CXX],[glibcxx_cv_prog_CXX]) +m4_rename([_AC_ARG_VAR_PRECIOUS],[glibcxx_PRECIOUS]) +m4_define([_AC_ARG_VAR_PRECIOUS],[]) +save_CXXFLAGS="$CXXFLAGS" +CXXFLAGS="$CXXFLAGS -fno-builtin" AC_PROG_CC - -# We use the libstdc++-v3 version of LIB_AC_PROG_CXX, but use -# glibjava_CXX instead of glibcpp_CXX. That's because we're passed a -# different definition of CXX than other directories, since we don't -# depend on libstdc++-v3 having already been built. -AC_DEFUN(LIB_AC_PROG_CXX, -[AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl -dnl Fool anybody using AC_PROG_CXX. -AC_PROVIDE([AC_PROG_CXX]) -# Use glibjava_CXX so that we do not cause CXX to be cached with the -# flags that come in CXX while configuring libjava. They're different -# from those used for all other target libraries. If CXX is set in -# the environment, respect that here. -glibjava_CXX=$CXX -AC_CHECK_PROGS(glibjava_CXX, $CCC c++ g++ gcc CC cxx cc++, gcc) -AC_SUBST(CXX) -CXX=$glibjava_CXX -test -z "$glibjava_CXX" && AC_MSG_ERROR([no acceptable c++ found in \$PATH]) - -AC_PROG_CXX_GNU - -if test $ac_cv_prog_gxx = yes; then - GXX=yes -dnl Check whether -g works, even if CXXFLAGS is set, in case the package -dnl plays around with CXXFLAGS (such as to build both debugging and -dnl normal versions of a library), tasteless as that idea is. - ac_test_CXXFLAGS="${CXXFLAGS+set}" - ac_save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS= - AC_PROG_CXX_G - if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS="$ac_save_CXXFLAGS" - elif test $ac_cv_prog_cxx_g = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-O2" - fi -else - GXX= - test "${CXXFLAGS+set}" = set || CXXFLAGS="-g" -fi -]) - -LIB_AC_PROG_CXX +AC_PROG_CXX +CXXFLAGS="$save_CXXFLAGS" +m4_rename([glibcxx_PRECIOUS],[_AC_ARG_VAR_PRECIOUS]) +AC_SUBST(CFLAGS) +AC_SUBST(CXXFLAGS) +AC_SUBST(LDFLAGS) dnl version is pulled out to make it a bit easier to change using sed. version=0.0.7 |