+2002-08-30 Nick Clifton <nickc@redhat.com>
+
+ * acinclude.m4: Provide alternative definition of AC_PROG_CXX
+ which does not call AC_PROG_CXX_WORKS. This allows dejagnu to
+ be configured and built without a working C++ compiler.
+
2002-08-28 Catherine Moore <clm@redhat.com>
* baseboards/v850-sim.exp (target_install): Add v850e-elf.
SCRIPTS = $(bin_SCRIPTS) $(libexec_SCRIPTS) $(pkgdata_SCRIPTS)
DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \
-Makefile.in NEWS TODO aclocal.m4 config.guess config.sub configure \
-configure.in install-sh missing mkinstalldirs
+Makefile.in NEWS TODO acinclude.m4 aclocal.m4 config.guess config.sub \
+configure configure.in install-sh missing mkinstalldirs
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
cd $(top_builddir) \
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in acinclude.m4
cd $(srcdir) && $(ACLOCAL)
config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
--- /dev/null
+# AC_PROG_CXX
+
+# FIXME: We temporarily define our own version of AC_PROG_CXX.
+# This is copied from autoconf 2.13, but does not call AC_PROG_CXX_WORKS.
+# We do not need a C++ compiler in order to build dejagnu, so
+# if we cannot find a working compiler it is not the end of
+# the world. This is fixed in later versions of autoconf where
+# there is different macro which will skip the link test entirely.
+
+AC_DEFUN(AC_PROG_CXX,
+[AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl
+AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx cc++ cl, gcc)
+
+AC_PROG_CXX_GNU
+
+if test $ac_cv_prog_gxx = yes; then
+ GXX=yes
+else
+ GXX=
+fi
+
+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
+ if test "$GXX" = yes; then
+ CXXFLAGS="-g -O2"
+ else
+ CXXFLAGS="-g"
+ fi
+else
+ if test "$GXX" = yes; then
+ CXXFLAGS="-O2"
+ else
+ CXXFLAGS=
+ fi
+fi
+])
-
-echo $ac_n "checking for STL versions""... $ac_c" 1>&6
-echo "configure:1584: checking for STL versions" >&5
-if eval "test \"`echo '$''{'ac_cv_stl'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 1597 "configure"
-#include "confdefs.h"
-#include <iostream>
-int main() {
-
- using namespace std;
- char bbuuff[5120];
- cout.rdbuf()->pubsetbuf(bbuuff, 5120);
-; return 0; }
-EOF
-if { (eval echo configure:1607: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_stl=v3
-
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_stl=v2
-
-fi
-rm -f conftest*,
-
-fi
-
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-if test x"${ac_cv_stl}" != x"v2" ; then
- echo "$ac_t""v3" 1>&6
- cat >> confdefs.h <<\EOF
-#define HAVE_STL3 1
-EOF
-
-else
- echo "$ac_t""v2" 1>&6
-fi
-
-
BOARDS='$(boards)'
CONFIG='$(config)'
dnl we need the path to the tcl shell to build a release
DJ_AC_PATH_TCLSH
-dnl we need to know if we have libstl v2 or v3
-DJ_AC_STL
-
dnl Level of indirection for automake macro (baseboards:boards_DATA)
BOARDS='$(boards)'
AC_SUBST(BOARDS)
@echo 'Making a new site.exp file...'
@test ! -f site.bak || rm -f site.bak
@echo '## these variables are automatically generated by make ##' > $@-t
- @echo '# Do not edit here. If you wish to override these values' >> $@-t
+ @echo '# Do not edit here. If you wish to override these values' >> $-t
@echo '# edit the last section' >> $@-t
@echo 'set objdir' `pwd` >> $@-t
@echo 'set tmpdir tmpdir' >> $@-t