From bf111c9f7dabd9b0268ab8399e4af804d1267f9b Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Wed, 7 Sep 1994 23:34:23 +0000 Subject: [PATCH] Update for autoconf beta 1.112: * aclocal.m4 (GAS_CHECK_DECL_NEEDED, GAS_WORKING_ASSERT): New macros. * configure.in: Use them. Use AC_ARG_PROGRAM (now provided by autoconf) instead of my hacked-up AC_PROGRAM_TRANSFORM_NAME. Move test for CROSS_COMPILE just before AC_FUNC_ALLOCA, and emit a message to try to ease confusion about autoconf's "cross-compiling" message. * acconfig.h (NEED_DECLARATION_MALLOC, NEED_DECLARATION_FREE, NEED_DECLARATION_ERRNO): Renamed from NEED_*_DECLARATION. * configure, conf.in: Regenerated. --- gas/ChangeLog | 14 ++ gas/acconfig.h | 6 +- gas/aclocal.m4 | 43 +++++- gas/conf.in | 6 +- gas/configure | 331 ++++++++++++++++++++++++----------------------- gas/configure.in | 79 +++-------- 6 files changed, 249 insertions(+), 230 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index cb5588c5112..e33ba02b4d4 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,17 @@ +Wed Sep 7 19:10:09 1994 Ken Raeburn (raeburn@cujo.cygnus.com) + + Update for autoconf beta 1.112: + * aclocal.m4 (GAS_CHECK_DECL_NEEDED, GAS_WORKING_ASSERT): New + macros. + * configure.in: Use them. Use AC_ARG_PROGRAM (now provided by + autoconf) instead of my hacked-up AC_PROGRAM_TRANSFORM_NAME. Move + test for CROSS_COMPILE just before AC_FUNC_ALLOCA, and emit a + message to try to ease confusion about autoconf's + "cross-compiling" message. + * acconfig.h (NEED_DECLARATION_MALLOC, NEED_DECLARATION_FREE, + NEED_DECLARATION_ERRNO): Renamed from NEED_*_DECLARATION. + * configure, conf.in: Regenerated. + Wed Sep 7 12:49:55 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) * configure.in: Check ${host} and ${target} rather than diff --git a/gas/acconfig.h b/gas/acconfig.h index 51ed5c80241..abae0b8091e 100644 --- a/gas/acconfig.h +++ b/gas/acconfig.h @@ -29,13 +29,13 @@ #undef WANT_FOPEN_BIN /* Sometimes the system header files don't declare malloc and realloc. */ -#undef NEED_MALLOC_DECLARATION +#undef NEED_DECLARATION_MALLOC /* Sometimes the system header files don't declare free. */ -#undef NEED_FREE_DECLARATION +#undef NEED_DECLARATION_FREE /* Sometimes errno.h doesn't declare errno itself. */ -#undef NEED_ERRNO_DECLARATION +#undef NEED_DECLARATION_ERRNO #undef MANY_SEGMENTS diff --git a/gas/aclocal.m4 b/gas/aclocal.m4 index bc7455deb92..d9d03c744c2 100644 --- a/gas/aclocal.m4 +++ b/gas/aclocal.m4 @@ -7,9 +7,8 @@ dnl dnl It knows where it is in the tree; don't try using it elsewhere. dnl undefine([AC_PROG_CC])dnl -define(AC_PROG_CC, +AC_DEFUN(AC_PROG_CC, [AC_BEFORE([$0], [AC_PROG_CPP])dnl -AC_PROVIDE([$0])dnl dnl dnl The ugly bit... dnl @@ -35,3 +34,43 @@ else fi rm -f conftest* ])dnl +dnl +dnl GAS_CHECK_DECL_NEEDED(name, typedefname, typedef, headers) +AC_DEFUN(GAS_CHECK_DECL_NEEDED,[ +AC_MSG_CHECKING(whether declaration is required for $1) +AC_CACHE_VAL(gas_cv_decl_needed_$1, +AC_TRY_LINK([$4], +[ +typedef $3; +$2 x; +x = ($2) $1; +], gas_cv_decl_needed_$1=no, gas_cv_decl_needed_$1=yes))dnl +AC_MSG_RESULT($gas_cv_decl_needed_$1) +test $gas_cv_decl_needed_$1 = no || { + ifelse(index($1,[$]),-1, + [AC_DEFINE([NEED_DECLARATION_]translit($1, [a-z], [A-Z]))], + [gas_decl_name_upcase=`echo $1 | tr '[a-z]' '[A-Z]'` + AC_DEFINE_UNQUOTED(NEED_DECLARATION_$gas_decl_name_upcase)]) +} +])dnl +dnl +dnl Some non-ANSI preprocessors botch requoting inside strings. That's bad +dnl enough, but on some of those systems, the assert macro relies on requoting +dnl working properly! +dnl GAS_WORKING_ASSERT +AC_DEFUN(GAS_WORKING_ASSERT, +[AC_MSG_CHECKING([for working assert macro]) +AC_CACHE_VAL(gas_cv_assert_ok, +AC_TRY_LINK([#include +#include ], [ +/* check for requoting problems */ +static int a, b, c, d; +static char *s; +assert (!strcmp(s, "foo bar baz quux")); +/* check for newline handling */ +assert (a == b + || c == d); +], gas_cv_assert_ok=yes, gas_cv_assert_ok=no))dnl +AC_MSG_RESULT($gas_cv_assert_ok) +test $gas_cv_assert_ok = yes || AC_DEFINE(BROKEN_ASSERT) +])dnl diff --git a/gas/conf.in b/gas/conf.in index 93900df6bc1..07c9eb43c98 100644 --- a/gas/conf.in +++ b/gas/conf.in @@ -53,13 +53,13 @@ #undef WANT_FOPEN_BIN /* Sometimes the system header files don't declare malloc and realloc. */ -#undef NEED_MALLOC_DECLARATION +#undef NEED_DECLARATION_MALLOC /* Sometimes the system header files don't declare free. */ -#undef NEED_FREE_DECLARATION +#undef NEED_DECLARATION_FREE /* Sometimes errno.h doesn't declare errno itself. */ -#undef NEED_ERRNO_DECLARATION +#undef NEED_DECLARATION_ERRNO #undef MANY_SEGMENTS diff --git a/gas/configure b/gas/configure index 3619268c5c9..44c2046e3f6 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.109 +# Generated automatically using autoconf version 1.112 # Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. # # This configure script is free software; you can redistribute it and/or @@ -24,8 +24,7 @@ ac_help="${ac_help} # Save the original args to write them into config.status later. configure_args="$@" -# Omit some internal, obsolete, or unimplemented options to make the -# list less imposing. +# Omit some internal or obsolete options to make the list less imposing. ac_usage="Usage: configure [options] [host] Options: [defaults in brackets after descriptions] Configuration: @@ -34,10 +33,12 @@ Configuration: --no-create do not create output files --quiet, --silent do not print \`checking...' messages --version print the version of autoconf that created configure -Directories: +Directory and file names: --exec-prefix=PREFIX install host dependent files in PREFIX [/usr/local] --prefix=PREFIX install host independent files in PREFIX [/usr/local] --srcdir=DIR find the sources in DIR [configure dir or ..] + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names Host type: --build=BUILD configure for building on BUILD [BUILD=HOST] --host=HOST configure for HOST [guessed] @@ -60,11 +61,11 @@ exec_prefix=NONE host=NONE no_create= nonopt=NONE -norecursion= +no_recursion= prefix=NONE -program_prefix= -program_suffix= -program_transform_name= +program_prefix=NONE +program_suffix=NONE +program_transform_name=NONE silent= srcdir= target=NONE @@ -91,8 +92,7 @@ do *) ac_optarg= ;; esac - # Accept (but ignore some of) the important Cygnus configure - # options, so we can diagnose typos. + # Accept the important Cygnus configure options, so we can diagnose typos. case "$ac_option" in @@ -162,23 +162,20 @@ EOF | --no-cr | --no-c) no_create=yes ;; - -norecursion | --norecursion | --norecursio | --norecursi \ - | --norecurs | --norecur | --norecu | --norec | --nore | --nor) - norecursion=yes ;; + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix="$ac_optarg" ;; - # The program_*_given variables are so we can distinguish between - # unspecified and empty-string-valued options. -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix_given=yes program_prefix="$ac_optarg" ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ @@ -186,7 +183,6 @@ EOF ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix_given=yes program_suffix="$ac_optarg" ;; -program-transform-name | --program-transform-name \ @@ -204,10 +200,7 @@ EOF | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) - # Double any backslashes or dollar signs in the argument - program_transform_name_given=yes - program_transform_name="${program_transform_name} -e `echo ${ac_optarg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`" - ;; + program_transform_name="$ac_optarg" ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) @@ -227,7 +220,7 @@ EOF verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 1.109" + echo "configure generated by autoconf version 1.112" exit 0 ;; -with-* | --with-*) @@ -291,7 +284,6 @@ if test -n "$ac_prev"; then fi trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15 -trap 'rm -fr confdefs* $ac_clean_files' 0 # File descriptor usage: # 0 unused; standard input @@ -312,17 +304,16 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. " 1>&5 -# Save the original args if we used an alternate arg parser. -ac_configure_temp="${configure_args-$@}" -# Strip out --no-create and --norecursion so they do not pile up. +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 case "$ac_arg" in -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c) ;; - -norecursion | --norecursion | --norecursio | --norecursi \ - | --norecurs | --norecur | --norecu | --norec | --nore | --nor) ;; + -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" ;; esac @@ -367,7 +358,7 @@ if test ! -r $srcdir/$ac_unique_file; then fi # Prefer explicitly selected file to automatically selected ones. -if test ! -r "$CONFIG_SITE"; then +if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE=$prefix/lib/config.site else @@ -398,6 +389,18 @@ ac_ext=c ac_cpp='${CPP} $CPPFLAGS' ac_compile='${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. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' +' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi +else + ac_n= ac_c='\c' ac_t= +fi + bfd_gas=no user_bfd_gas= @@ -428,17 +431,6 @@ 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" -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi # Do some error checking and defaulting for the host and target type. # The inputs are: @@ -517,22 +509,25 @@ build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` esac echo "$ac_t""$build" 1>&4 +test "${host_alias}" != "${target_alias}" && + test "${program_prefix}${program_suffix}${program_transform_name}" = \ + NONENONENONE && program_prefix=${target_alias}- -if [ "${host_alias}" != "${target_alias}" ] ; then - if [ "${program_prefix_given}${program_suffix_given}${program_transform_name_given}" = "" ] ; then - program_prefix=${target_alias}- ; - fi -fi - -# Merge program_prefix and program_suffix onto program_transform_name -# Use a double $ so that make ignores it -if [ "${program_suffix}" != "" ] ; then - program_transform_name="-e s,\$\$,${program_suffix}, ${program_transform_name}" +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`" + rm -f conftestsed fi +test "${program_prefix}" != NONE && + program_transform_name="-e 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}" -if [ "${program_prefix}" != "" ] ; then - program_transform_name="-e s,^,${program_prefix}, ${program_transform_name}" -fi +# sed with no file args requires a program. +test "${program_transform_name}" = "" && program_transform_name="-e s,x,x," emulation=generic @@ -783,14 +778,6 @@ esac -case "x${host}" in - x${target}) ;; - *) cat >> confdefs.h <<\EOF -#define CROSS_COMPILE 1 -EOF -;; -esac - cat >> confdefs.h < conftest.${ac_ext} < Syntax Error EOF -ac_err=`eval "$ac_cpp conftest.${ac_ext} >/dev/null" 2>&1` +eval "$ac_cpp conftest.${ac_ext} >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : else @@ -925,12 +915,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.${ac_ext} < Syntax Error EOF -ac_err=`eval "$ac_cpp conftest.${ac_ext} >/dev/null" 2>&1` +eval "$ac_cpp conftest.${ac_ext} >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : else @@ -955,11 +946,12 @@ 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 -ac_err=`eval "$ac_cpp conftest.${ac_ext} >/dev/null" 2>&1` +eval "$ac_cpp conftest.${ac_ext} >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" @@ -983,18 +975,32 @@ fi done +# Put this here so that autoconf's "cross-compiling" message doesn't confuse +# people who are not cross-compiling but are compiling cross-assemblers. +echo $ac_n "checking whether compiling a cross-assembler""... $ac_c" 1>&4 +if test "${host}" = "${target}"; then + cross_gas=yes + cat >> confdefs.h <<\EOF +#define CROSS_COMPILE 1 +EOF + +else + cross_gas=no +fi +echo "$ac_t""$cross_gas" 1>&4 + # If we cannot run a trivial program, we must be cross compiling. echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&4 if eval "test \"`echo '${'ac_cv_c_cross'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&4 else if test "$cross_compiling" = yes; then - { echo "configure: can not run test program while cross compiling" 1>&2; exit 1; } + ac_cv_cross=yes else cat > conftest.${ac_ext} </dev/null; then @@ -1015,7 +1021,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; } @@ -1046,7 +1052,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} <&5 | +if (eval "$ac_cpp conftest.${ac_ext}") 2>&5 | egrep "webecray" >/dev/null 2>&1; then rm -rf conftest* ac_cv_os_cray=yes @@ -1131,7 +1137,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; } @@ -1172,7 +1178,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; } @@ -1213,7 +1219,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; } @@ -1262,12 +1268,10 @@ if eval "test \"`echo '${'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&4 else if test "$cross_compiling" = yes; then - echo "configure: warning: using default for cross-compiling" 1>&2 -ac_cv_c_stack_direction=0 - + ac_cv_c_stack_direction=0 else cat > conftest.${ac_ext} < conftest.${ac_ext} <&4 else cat > conftest.${ac_ext} < #include @@ -1379,17 +1383,11 @@ test $gas_cv_assert_ok = yes || cat >> confdefs.h <<\EOF EOF + # On some systems, the system header files may not declare malloc, realloc, # and free. There are places where gas needs these functions to have been # declared -- such as when taking their addresses. -echo $ac_n "checking whether a malloc declaration is required""... $ac_c" 1>&4 -if eval "test \"`echo '${'gas_cv_malloc_decl_needed'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&4 -else - cat > conftest.${ac_ext} <&4 +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 -test $gas_cv_malloc_decl_needed = no || cat >> confdefs.h <<\EOF -#define NEED_MALLOC_DECLARATION 1 +echo "$ac_t""$gas_cv_decl_needed_malloc" 1>&4 +test $gas_cv_decl_needed_malloc = no || { + cat >> confdefs.h <<\EOF +#define NEED_DECLARATION_MALLOC 1 EOF +} + -echo $ac_n "checking whether a free declaration is required""... $ac_c" 1>&4 -if eval "test \"`echo '${'gas_cv_free_decl_needed'+set}'`\" = set"; then +echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&4 +if eval "test \"`echo '${'gas_cv_decl_needed_free'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&4 else cat > conftest.${ac_ext} < -#endif -#ifdef HAVE_STRING_H -#include -#endif -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif - +$gas_test_headers int main() { return 0; } int t() { -int (*f) (); -f = (int (*)()) free; +typedef int f; +f x; +x = (f) free; ; return 0; } EOF if eval $ac_compile; then rm -rf conftest* - gas_cv_free_decl_needed=no + gas_cv_decl_needed_free=no else rm -rf conftest* - gas_cv_free_decl_needed=yes + gas_cv_decl_needed_free=yes fi rm -f conftest* fi - -echo "$ac_t""$gas_cv_free_decl_needed" 1>&4 -test $gas_cv_free_decl_needed = no || cat >> confdefs.h <<\EOF -#define NEED_FREE_DECLARATION 1 +echo "$ac_t""$gas_cv_decl_needed_free" 1>&4 +test $gas_cv_decl_needed_free = no || { + cat >> confdefs.h <<\EOF +#define NEED_DECLARATION_FREE 1 EOF +} + # Does errno.h declare errno, or do we have to add a separate declaration # for it? -echo $ac_n "checking whether an errno declaration is required""... $ac_c" 1>&4 -if eval "test \"`echo '${'gas_cv_errno_decl_needed'+set}'`\" = set"; then + +echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&4 +if eval "test \"`echo '${'gas_cv_decl_needed_errno'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&4 else cat > conftest.${ac_ext} <&4 -test $gas_cv_errno_decl_needed = no || cat >> confdefs.h <<\EOF -#define NEED_ERRNO_DECLARATION 1 +echo "$ac_t""$gas_cv_decl_needed_errno" 1>&4 +test $gas_cv_decl_needed_errno = no || { + cat >> confdefs.h <<\EOF +#define NEED_DECLARATION_ERRNO 1 EOF +} + subdirs="testsuite" @@ -1521,7 +1526,7 @@ cat > $cache_file <<\EOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs. It is not useful on other systems. -# If its contents are invalid for some reason, you may delete or edit it. +# If it contains results you don't want to keep, you may remove or edit it. # # By default, configure uses ./config.cache as the cache file, # creating it if it does not exist already. You can give configure @@ -1576,10 +1581,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 --norecursion - exec \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create --norecursion ;; + 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 ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "${CONFIG_STATUS} generated by autoconf version 1.109" + echo "${CONFIG_STATUS} generated by autoconf version 1.112" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; @@ -1597,14 +1602,14 @@ sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF $ac_vpsub $extrasub -s%@LIBS@%$LIBS%g -s%@prefix@%$prefix%g -s%@exec_prefix@%$exec_prefix%g -s%@DEFS@%$DEFS%g s%@CFLAGS@%$CFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g s%@CPPFLAGS@%$CPPFLAGS%g +s%@CXXFLAGS@%$CXXFLAGS%g +s%@DEFS@%$DEFS%g s%@LDFLAGS@%$LDFLAGS%g +s%@LIBS@%$LIBS%g +s%@exec_prefix@%$exec_prefix%g +s%@prefix@%$prefix%g s%@host@%$host%g s%@host_alias@%$host_alias%g s%@host_cpu@%$host_cpu%g @@ -1620,8 +1625,6 @@ s%@build_alias@%$build_alias%g s%@build_cpu@%$build_cpu%g s%@build_vendor@%$build_vendor%g s%@build_os@%$build_os%g -s%@program_prefix@%$program_prefix%g -s%@program_suffix@%$program_suffix%g s%@program_transform_name@%$program_transform_name%g s%@OPCODES_LIB@%$OPCODES_LIB%g /@target_frag@/r $target_frag @@ -1641,9 +1644,11 @@ s%@subdirs@%$subdirs%g CEOF EOF -cat >> ${CONFIG_STATUS} <<\EOF +cat >> ${CONFIG_STATUS} <> ${CONFIG_STATUS} <<\EOF for ac_file in .. ${CONFIG_FILES}; do if test "x$ac_file" != x..; then # Support "outfile[:infile]", defaulting infile="outfile.in". case "$ac_file" in @@ -1792,7 +1797,6 @@ do done rm -f conftest.vals -# Now back to your regularly scheduled config.status. cat >> ${CONFIG_STATUS} <<\EOF rm -f conftest.frag conftest.h echo "/* $ac_file. Generated automatically by configure. */" > conftest.h @@ -1810,37 +1814,40 @@ fi; done EOF cat >> ${CONFIG_STATUS} <> ${CONFIG_STATUS} <<\EOF -while test -n "${ac_files}"; do - set ${ac_links}; ac_link=$1; shift; ac_links=$* - set ${ac_files}; ac_file=$1; shift; ac_files=$* +srcdir=$ac_given_srcdir +while test -n "${ac_sources}"; do + set ${ac_dests}; ac_dest=$1; shift; ac_dests=$* + set ${ac_sources}; ac_source=$1; shift; ac_sources=$* - echo "linking ${ac_link} to ${srcdir}/${ac_file}" + echo "linking ${ac_dest} to ${srcdir}/${ac_source}" - if test ! -r ${srcdir}/${ac_file}; then - { echo "configure: ${srcdir}/${ac_file}: File not found" 1>&2; exit 1; } + if test ! -r ${srcdir}/${ac_source}; then + { echo "configure: ${srcdir}/${ac_source}: File not found" 1>&2; exit 1; } fi - rm -f ${ac_link} + rm -f ${ac_dest} # Make a symlink if possible; otherwise try a hard link. - if ln -s ${srcdir}/${ac_file} ${ac_link} 2>/dev/null || - ln ${srcdir}/${ac_file} ${ac_link}; then : + if ln -s ${srcdir}/${ac_source} ${ac_dest} 2>/dev/null || + ln ${srcdir}/${ac_source} ${ac_dest}; then : else - { echo "configure: can not link ${ac_link} to ${srcdir}/${ac_file}" 1>&2; exit 1; } + { echo "configure: can not link ${ac_dest} to ${srcdir}/${ac_source}" 1>&2; exit 1; } fi done + exit 0 EOF chmod +x ${CONFIG_STATUS} +rm -fr confdefs* $ac_clean_files test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} ${CONFIG_STATUS} -if test "${norecursion}" != yes; then +if test "${no_recursion}" != yes; then # Remove --cache-file and --srcdir arguments so they do not pile up. ac_sub_configure_args= diff --git a/gas/configure.in b/gas/configure.in index 29094f83423..5f7a36586fe 100644 --- a/gas/configure.in +++ b/gas/configure.in @@ -24,7 +24,7 @@ AC_CONFIG_HEADER(conf) dnl For recursion to work right, this must be an absolute pathname. AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/..) AC_CANONICAL_SYSTEM -AC_PROGRAM_TRANSFORM_NAME +AC_ARG_PROGRAM emulation=generic @@ -276,11 +276,6 @@ esac AC_SUBST(BFDLIB) AC_SUBST(ALL_OBJ_DEPS) -case "x${host}" in - x${target}) ;; - *) AC_DEFINE(CROSS_COMPILE);; -esac - AC_DEFINE_UNQUOTED(TARGET_ALIAS, "${target_alias}") AC_DEFINE_UNQUOTED(TARGET_CANONICAL, "${target}") AC_DEFINE_UNQUOTED(TARGET_CPU, "${target_cpu}") @@ -302,6 +297,17 @@ AC_PROG_INSTALL AC_CHECK_HEADERS(string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h) +# Put this here so that autoconf's "cross-compiling" message doesn't confuse +# people who are not cross-compiling but are compiling cross-assemblers. +AC_MSG_CHECKING(whether compiling a cross-assembler) +if test "${host}" = "${target}"; then + cross_gas=yes + AC_DEFINE(CROSS_COMPILE) +else + cross_gas=no +fi +AC_MSG_RESULT($cross_gas) + dnl ansidecl.h will deal with const dnl AC_CONST AC_FUNC_ALLOCA @@ -310,49 +316,12 @@ AC_C_INLINE # Some non-ANSI preprocessors botch requoting inside strings. That's bad # enough, but on some of those systems, the assert macro relies on requoting # working properly! -AC_MSG_CHECKING([for working assert macro]) -AC_CACHE_VAL(gas_cv_assert_ok, -AC_TRY_LINK([#include -#include ], [ -/* check for requoting problems */ -static int a, b, c, d; -static char *s; -assert (!strcmp(s, "foo bar baz quux")); -/* check for newline handling */ -assert (a == b - || c == d); -], gas_cv_assert_ok=yes, gas_cv_assert_ok=no))dnl -AC_MSG_RESULT($gas_cv_assert_ok) -test $gas_cv_assert_ok = yes || AC_DEFINE(BROKEN_ASSERT) +GAS_WORKING_ASSERT # On some systems, the system header files may not declare malloc, realloc, # and free. There are places where gas needs these functions to have been # declared -- such as when taking their addresses. -AC_MSG_CHECKING([whether a malloc declaration is required]) -AC_CACHE_VAL(gas_cv_malloc_decl_needed, -AC_TRY_LINK([ -#ifdef HAVE_MEMORY_H -#include -#endif -#ifdef HAVE_STRING_H -#include -#endif -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif -], [ -char *(*f) (); -f = (char *(*)()) malloc; -], gas_cv_malloc_decl_needed=no, gas_cv_malloc_decl_needed=yes))dnl -AC_MSG_RESULT($gas_cv_malloc_decl_needed) -test $gas_cv_malloc_decl_needed = no || AC_DEFINE(NEED_MALLOC_DECLARATION) - -AC_MSG_CHECKING([whether a free declaration is required]) -AC_CACHE_VAL(gas_cv_free_decl_needed, -AC_TRY_LINK([ +gas_test_headers=" #ifdef HAVE_MEMORY_H #include #endif @@ -365,27 +334,17 @@ AC_TRY_LINK([ #ifdef HAVE_UNISTD_H #include #endif -], [ -int (*f) (); -f = (int (*)()) free; -], gas_cv_free_decl_needed=no, gas_cv_free_decl_needed=yes)) -AC_MSG_RESULT($gas_cv_free_decl_needed) -test $gas_cv_free_decl_needed = no || AC_DEFINE(NEED_FREE_DECLARATION) +" +GAS_CHECK_DECL_NEEDED(malloc, f, char *(*f)(), $gas_test_headers) +GAS_CHECK_DECL_NEEDED(free, f, int f, $gas_test_headers) # Does errno.h declare errno, or do we have to add a separate declaration # for it? -AC_MSG_CHECKING([whether an errno declaration is required]) -AC_CACHE_VAL(gas_cv_errno_decl_needed, -AC_TRY_LINK([ +GAS_CHECK_DECL_NEEDED(errno, f, int f, [ #ifdef HAVE_ERRNO_H #include #endif -], [ -int x; -x = errno; -], gas_cv_errno_decl_needed=no, gas_cv_errno_decl_needed=yes)) -AC_MSG_RESULT($gas_cv_errno_decl_needed) -test $gas_cv_errno_decl_needed = no || AC_DEFINE(NEED_ERRNO_DECLARATION) +]) AC_CONFIG_SUBDIRS(testsuite) -- 2.30.2