From: Ken Raeburn Date: Tue, 13 Sep 1994 05:54:13 +0000 (+0000) Subject: Generate .gdbinit file: X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e23b25eccd45b0fe76b6e75a426cbe3de940421a;p=binutils-gdb.git Generate .gdbinit file: * aclocal.m4 (GAS_GDBINIT): New macro. * configure.in: Use it. * configure: Regenerated. (using autoconf-1.117) --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 09435a9732b..517fbfcad0a 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +Tue Sep 13 01:47:08 1994 Ken Raeburn (raeburn@cujo.cygnus.com) + + * aclocal.m4 (GAS_GDBINIT): New macro. + * configure.in: Use it. + * configure: Regenerated. + Mon Sep 12 20:56:38 1994 Ken Raeburn (raeburn@kr-laptop.cygnus.com) * .gdbinit (pe, ps): Define new commands. diff --git a/gas/aclocal.m4 b/gas/aclocal.m4 index d9d03c744c2..39b8b300c04 100644 --- a/gas/aclocal.m4 +++ b/gas/aclocal.m4 @@ -74,3 +74,17 @@ assert (a == b AC_MSG_RESULT($gas_cv_assert_ok) test $gas_cv_assert_ok = yes || AC_DEFINE(BROKEN_ASSERT) ])dnl +dnl +dnl GAS_GDBINIT +dnl Generates a .gdbinit file in the build directory pointing gdb to +dnl srcdir, if srcdir != PWD. +AC_DEFUN(GAS_GDBINIT, +[if test `cd $srcdir;pwd` = `pwd` ; then + rm -f .gdbinit + cat > .gdbinit << EOF +dir $srcdir +dir . +source $srcdir/.gdbinit +EOF +fi +])dnl diff --git a/gas/configure b/gas/configure index b63f8021a12..25542f3638a 100755 --- a/gas/configure +++ b/gas/configure @@ -1,7 +1,7 @@ #!/bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 1.112 +# Generated automatically using autoconf version 1.117 # Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. # # This configure script is free software; you can redistribute it and/or @@ -21,8 +21,6 @@ ac_help= ac_help="${ac_help} bfd-assembler use BFD back end for writing object files" -# Save the original args to write them into config.status later. -configure_args="$@" # Omit some internal or obsolete options to make the list less imposing. ac_usage="Usage: configure [options] [host] @@ -220,7 +218,7 @@ EOF verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 1.112" + echo "configure generated by autoconf version 1.117" exit 0 ;; -with-* | --with-*) @@ -304,18 +302,19 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. " 1>&5 -ac_configure_temp="$configure_args" # Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing spaces. -configure_args= -for ac_arg in $ac_configure_temp; do +# Also quote any args containing shell metacharacters. +ac_configure_args= +for ac_arg +do case "$ac_arg" in -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c) ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *[" "]*) configure_args="$configure_args '$ac_arg'" ;; - *) configure_args="$configure_args $ac_arg" ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) + ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) ac_configure_args="$ac_configure_args $ac_arg" ;; esac done @@ -387,7 +386,7 @@ 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} $CFLAGS $CPPFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS 1>&5 2>&5' +ac_link='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS 1>&5 2>&5' if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. @@ -419,17 +418,22 @@ fi ac_aux_dir= for ac_dir in `cd $srcdir;pwd`/.. ${srcdir}/`cd $srcdir;pwd`/..; do - if test -f $ac_dir/install.sh; then - ac_aux_dir=$ac_dir; break + if test -f $ac_dir/install-sh; then + ac_aux_dir=$ac_dir + ac_install_sh="${ac_aux_dir}/install-sh -c" + break + elif test -f $ac_dir/install.sh; then + ac_aux_dir=$ac_dir + ac_install_sh="${ac_aux_dir}/install.sh -c" + break fi done if test -z "$ac_aux_dir"; then - { echo "configure: can not find install.sh in `cd $srcdir;pwd`/.. ${srcdir}/`cd $srcdir;pwd`/.." 1>&2; exit 1; } + { echo "configure: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. ${srcdir}/`cd $srcdir;pwd`/.." 1>&2; exit 1; } fi ac_config_guess=${ac_aux_dir}/config.guess ac_config_sub=${ac_aux_dir}/config.sub ac_configure=${ac_aux_dir}/configure # This should be Cygnus configure. -ac_install_sh="${ac_aux_dir}/install.sh -c" # Do some error checking and defaulting for the host and target type. @@ -453,6 +457,7 @@ NONE---*---* | *---NONE---* | *---*---NONE) ;; *) { echo "configure: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; esac + # Make sure we can run config.sub. if ${ac_config_sub} sun4 >/dev/null 2>&1; then : else { echo "configure: can not run ${ac_config_sub}" 1>&2; exit 1; } @@ -517,17 +522,17 @@ test "${program_transform_name}" = NONE && program_transform_name= if test -n "${program_transform_name}"; then # Double any \ or $. echo 's,\\,\\\\,g; s,\$,$$,g' > conftestsed - program_transform_name="-e `echo ${program_transform_name} | sed -f conftestsed`" + program_transform_name="`echo ${program_transform_name}|sed -f conftestsed`" rm -f conftestsed fi test "${program_prefix}" != NONE && - program_transform_name="-e s,^,${program_prefix}, ${program_transform_name}" + program_transform_name="s,^,${program_prefix},; ${program_transform_name}" # Use a double $ so make ignores it. test "${program_suffix}" != NONE && - program_transform_name="-e s,\$\$,${program_suffix}, ${program_transform_name}" + program_transform_name="s,\$\$,${program_suffix},; ${program_transform_name}" # sed with no file args requires a program. -test "${program_transform_name}" = "" && program_transform_name="-e s,x,x," +test "${program_transform_name}" = "" && program_transform_name="s,x,x," emulation=generic @@ -901,7 +906,7 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.${ac_ext} < Syntax Error @@ -915,7 +920,7 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.${ac_ext} < Syntax Error @@ -946,7 +951,7 @@ if eval "test \"`echo '${'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&4 else cat > conftest.${ac_ext} < EOF @@ -998,11 +1003,11 @@ else ac_cv_cross=yes else cat > conftest.${ac_ext} </dev/null; then ac_cv_c_cross=no else @@ -1021,7 +1026,7 @@ if eval "test \"`echo '${'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&4 else cat > conftest.${ac_ext} < int main() { return 0; } @@ -1029,7 +1034,7 @@ int t() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if eval $ac_compile; then +if eval $ac_link; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -1052,7 +1057,7 @@ if eval "test \"`echo '${'ac_cv_func_alloca'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&4 else cat > conftest.${ac_ext} <&4 else cat > conftest.${ac_ext} <&4 else cat > conftest.${ac_ext} < /* Arbitrary system header to define __stub macros. */ int main() { return 0; } @@ -1155,7 +1160,7 @@ char _getb67(); _getb67(); ; return 0; } EOF -if eval $ac_compile; then +if eval $ac_link; then rm -rf conftest* eval "ac_cv_func__getb67=yes" else @@ -1178,7 +1183,7 @@ if eval "test \"`echo '${'ac_cv_func_GETB67'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&4 else cat > conftest.${ac_ext} < /* Arbitrary system header to define __stub macros. */ int main() { return 0; } @@ -1196,7 +1201,7 @@ char GETB67(); GETB67(); ; return 0; } EOF -if eval $ac_compile; then +if eval $ac_link; then rm -rf conftest* eval "ac_cv_func_GETB67=yes" else @@ -1219,7 +1224,7 @@ if eval "test \"`echo '${'ac_cv_func_getb67'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&4 else cat > conftest.${ac_ext} < /* Arbitrary system header to define __stub macros. */ int main() { return 0; } @@ -1237,7 +1242,7 @@ char getb67(); getb67(); ; return 0; } EOF -if eval $ac_compile; then +if eval $ac_link; then rm -rf conftest* eval "ac_cv_func_getb67=yes" else @@ -1271,7 +1276,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.${ac_ext} </dev/null; then ac_cv_c_stack_direction=1 else @@ -1312,7 +1317,7 @@ if eval "test \"`echo '${'ac_cv_c_inline'+set}'`\" = set"; then else if test "$GCC" = yes; then cat > conftest.${ac_ext} <&4 else cat > conftest.${ac_ext} < #include @@ -1367,7 +1372,7 @@ assert (a == b ; return 0; } EOF -if eval $ac_compile; then +if eval $ac_link; then rm -rf conftest* gas_cv_assert_ok=yes else @@ -1407,7 +1412,7 @@ if eval "test \"`echo '${'gas_cv_decl_needed_malloc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&4 else cat > conftest.${ac_ext} <&4 else cat > conftest.${ac_ext} <&4 else cat > conftest.${ac_ext} < .gdbinit << EOF +dir $srcdir +dir . +source $srcdir/.gdbinit +EOF +fi + + if test -w $cache_file; then echo "updating cache $cache_file" cat > $cache_file <<\EOF @@ -1536,9 +1551,12 @@ cat > $cache_file <<\EOF # Giving --cache-file=/dev/null disables caching, for debugging configure. # config.status only pays attention to the cache file if you give it the # --recheck option to rerun configure. +# EOF # Ultrix sh set writes to stderr and can't be redirected directly. -(set) 2>&1 | sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1-'\2'}/p" >> $cache_file +(set) 2>&1 | + sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/: \${\1='\2'}/p" \ + >> $cache_file else echo "not updating unwritable cache $cache_file" fi @@ -1571,7 +1589,7 @@ cat > ${CONFIG_STATUS} </dev/null | sed 1q`: # -# $0 $configure_args +# $0 $ac_configure_args # # Compiler output produced by configure, useful for debugging # configure, is in ./config.log if it exists. @@ -1581,10 +1599,10 @@ for ac_option do case "\$ac_option" in -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo running \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create --no-recursion - exec \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create --no-recursion ;; + echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" + exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "${CONFIG_STATUS} generated by autoconf version 1.112" + echo "${CONFIG_STATUS} generated by autoconf version 1.117" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; @@ -1852,7 +1870,7 @@ if test "${no_recursion}" != yes; then # Remove --cache-file and --srcdir arguments so they do not pile up. ac_sub_configure_args= ac_prev= - for ac_arg in $configure_args; do + for ac_arg in $ac_configure_args; do if test -n "$ac_prev"; then ac_prev= continue @@ -1868,7 +1886,6 @@ if test "${no_recursion}" != yes; then ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) ;; - *[" "]*) ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;; *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; esac done @@ -1928,7 +1945,8 @@ if test "${no_recursion}" != yes; then esac echo "running ${CONFIG_SHELL-/bin/sh} ${ac_sub_configure} ${ac_sub_configure_args} --cache-file=$ac_sub_cache_file --srcdir=${ac_sub_srcdir}" - if ${CONFIG_SHELL-/bin/sh} ${ac_sub_configure} ${ac_sub_configure_args} --cache-file=$ac_sub_cache_file --srcdir=${ac_sub_srcdir} + # The eval makes quoting arguments work. + if eval ${CONFIG_SHELL-/bin/sh} ${ac_sub_configure} ${ac_sub_configure_args} --cache-file=$ac_sub_cache_file --srcdir=${ac_sub_srcdir} then : else { echo "configure: ${ac_sub_configure} failed for ${ac_config_dir}" 1>&2; exit 1; } diff --git a/gas/configure.in b/gas/configure.in index 6bf0728a064..55e365037a4 100644 --- a/gas/configure.in +++ b/gas/configure.in @@ -348,6 +348,8 @@ GAS_CHECK_DECL_NEEDED(errno, f, int f, [ AC_CONFIG_SUBDIRS(testsuite) +GAS_GDBINIT + dnl This must come last. dnl Apparently symlinks are checked for in the directory containing dnl the last Makefile. Thus the order used here...