diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2001-10-31 19:26:13 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2001-10-31 19:26:13 +0000 |
commit | 775f23011b964e1853935ba58131bfe6418204bc (patch) | |
tree | 2597d4daeeffd3bf514b956b3def788db555ac88 /libgloss/m32r/configure.in | |
parent | 75241b15dbe979163b1cc95df6a5c16e30ddde7b (diff) | |
download | cygnal-775f23011b964e1853935ba58131bfe6418204bc.tar.gz cygnal-775f23011b964e1853935ba58131bfe6418204bc.tar.bz2 cygnal-775f23011b964e1853935ba58131bfe6418204bc.zip |
2001-10-31 Jeff Johnston <jjohnstn@redhat.com>
* m32r/Makefile.in: Use gdb stub set by configure.
* m32r/configure.in: Add a special macro for testing
c compiler without building executable. Add setting of
GDBSTUB.
* m32r/configure: Regenerated.
Diffstat (limited to 'libgloss/m32r/configure.in')
-rw-r--r-- | libgloss/m32r/configure.in | 47 |
1 files changed, 46 insertions, 1 deletions
diff --git a/libgloss/m32r/configure.in b/libgloss/m32r/configure.in index 1e9869844..6bffc7003 100644 --- a/libgloss/m32r/configure.in +++ b/libgloss/m32r/configure.in @@ -17,12 +17,57 @@ else fi AC_CONFIG_AUX_DIR($libgloss_topdir) +if test -f "${srcdir}/${with_multisrctop}../../gdb/m32r-stub.c"; then + GDBSTUB=${srcdir}/${with_multisrctop}../../gdb/m32r-stub.c +else + GDBSTUB= +fi +AC_SUBST(GDBSTUB) + AC_CANONICAL_SYSTEM AC_ARG_PROGRAM AC_PROG_INSTALL -AC_PROG_CC +# 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 +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 AS=${AS-as} AC_SUBST(AS) AR=${AR-ar} |