From 6166d547d84ee8b5f4d8adda06722c38ab69cbc2 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Thu, 27 Jul 2000 04:01:24 +0000 Subject: Move GDB_MULTI_ARCH selection to configure*. Makes tm.h optional. --- gdb/configure | 52 +++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 43 insertions(+), 9 deletions(-) (limited to 'gdb/configure') diff --git a/gdb/configure b/gdb/configure index 5082c09..ac046a8 100755 --- a/gdb/configure +++ b/gdb/configure @@ -7482,6 +7482,10 @@ targetfile=`sed -n ' s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p ' ${target_makefile_frag}` +GDB_MULTI_ARCH=`sed -n ' +s/GDB_MULTI_ARCH[ ]*=[ ]*\([^ ]*\)[ ]*/\1/p +' ${target_makefile_frag}` + # these really aren't orthogonal true/false values of the same condition, # but shells are slow enough that I like to reuse the test conditions # whenever possible @@ -7495,6 +7499,36 @@ s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p fi +# New targets should just set gdb_multi_arch=yes in configure.tgt. +# Old targets being converted can either do that or set GDB_MULTI_ARCH +# in the target specific makefile frag. Eventually gdb_multi_arch=yes +# will be the default. +if test x"${GDB_MULTI_ARCH}" = x ; then + case "${gdb_multi_arch}" in + yes ) GDB_MULTI_ARCH=GDB_MULTI_ARCH_PURE ;; + no ) GDB_MULTI_ARCH=0 ;; + 0|1|2 ) GDB_MULTI_ARCH=${gdb_multi_arch} ;; + esac +fi +if test x"${GDB_MULTI_ARCH}" != x ; then + cat >> confdefs.h <&2 ;; + GDB_MULTI_ARCH_PURE ) + if test x"${targetfile}" != x ; then + echo "configure: warning: "GDB: Ingoring TM_FILE in ${target_makefile_frag}"" 1>&2 + fi ;; + *) { echo "configure: error: "GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}"" 1>&2; exit 1; };; +esac + + SUBDIRS="doc testsuite nlm" if test "${enable_multi_ice}" = "yes"; then SUBDIRS="${SUBDIRS} multi-ice" @@ -7530,7 +7564,7 @@ files="${files} config/nm-empty.h" links="${links} nm.h" fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:7534: checking whether ln -s works" >&5 +echo "configure:7568: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7554,12 +7588,12 @@ fi echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:7558: checking for Cygwin environment" >&5 +echo "configure:7592: checking for Cygwin environment" >&5 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -7587,19 +7621,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6 CYGWIN= test "$ac_cv_cygwin" = yes && CYGWIN=yes echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -echo "configure:7591: checking for mingw32 environment" >&5 +echo "configure:7625: checking for mingw32 environment" >&5 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7637: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else @@ -7618,7 +7652,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:7622: checking for executable suffix" >&5 +echo "configure:7656: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7628,7 +7662,7 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:7632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:7666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj | *.ilk | *.pdb) ;; -- cgit v1.1