aboutsummaryrefslogtreecommitdiff
path: root/libjava/acinclude.m4
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2000-09-10 09:26:50 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2000-09-10 09:26:50 +0000
commit158a8e6b904781f75e8c8d517af2ad57ae0ec4be (patch)
tree56a59f0be4b95876174b9d63dd8a97ea60d07610 /libjava/acinclude.m4
parent6d0860ee89b96024fa76dbad08743855318184ce (diff)
downloadgcc-158a8e6b904781f75e8c8d517af2ad57ae0ec4be.zip
gcc-158a8e6b904781f75e8c8d517af2ad57ae0ec4be.tar.gz
gcc-158a8e6b904781f75e8c8d517af2ad57ae0ec4be.tar.bz2
acinclude.m4: Simplify the tests for CC and CXX.
* acinclude.m4: Simplify the tests for CC and CXX. * aclocal.m4, configure: Rebuilt. From-SVN: r36297
Diffstat (limited to 'libjava/acinclude.m4')
-rw-r--r--libjava/acinclude.m491
1 files changed, 9 insertions, 82 deletions
diff --git a/libjava/acinclude.m4 b/libjava/acinclude.m4
index 6b24951..85186b8 100644
--- a/libjava/acinclude.m4
+++ b/libjava/acinclude.m4
@@ -1,9 +1,3 @@
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
AC_DEFUN(LIBGCJ_CONFIGURE,
[
dnl Default to --enable-multilib
@@ -31,87 +25,20 @@ AC_SUBST(libgcj_basedir)
AC_CANONICAL_HOST
+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],[])
+
+AC_PROG_CC
+AC_PROG_CXX
+
dnl version is pulled out to make it a bit easier to change using sed.
version=0.0.7
dnl Still use "libjava" here to placate dejagnu.
AM_INIT_AUTOMAKE(libjava, $version)
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-AC_DEFUN(LIB_AC_PROG_CC,
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-dnl Fool anybody using AC_PROG_CC.
-AC_PROVIDE([AC_PROG_CC])
-AC_CHECK_PROG(CC, gcc, gcc)
-if test -z "$CC"; then
- AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-AC_PROG_CC_GNU
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-dnl Check whether -g works, even if CFLAGS is set, in case the package
-dnl plays around with CFLAGS (such as to build both debugging and
-dnl normal versions of a library), tasteless as that idea is.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- AC_PROG_CC_G
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-])
-
-LIB_AC_PROG_CC
-
-# Likewise for AC_PROG_CXX.
-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])
-AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx cc++, gcc)
-test -z "$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_CHECK_TOOL does AC_REQUIRE (AC_CANONICAL_BUILD). If we dont
# run it explicitly here, it will be run implicitly before
# LIBGCJ_CONFIGURE, which doesn't work because that means that it will