X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=configure.in;h=f849e26ccff974e58ecc0d077b958a0a94353175;hb=46f45a4a373bd55d5ff7327be137b23b9486be45;hp=7f5150fe38096e2bf7e8f8795382d63c90e68b30;hpb=4a18bd6b6e51d6d5d4857e3e0e45e0f88edc4cb7;p=deliverable%2Fbinutils-gdb.git diff --git a/configure.in b/configure.in index 7f5150fe38..f849e26ccf 100644 --- a/configure.in +++ b/configure.in @@ -23,6 +23,9 @@ AC_PREREQ(2.13) AC_CANONICAL_SYSTEM AC_ARG_PROGRAM +# Get 'install' or 'install-sh' and its variants. +AC_PROG_INSTALL + sinclude(config/acx.m4) ### we might need to use some other shell than /bin/sh for running subshells @@ -63,8 +66,14 @@ progname=$0 # if PWD already has a value, it is probably wrong. if test -n "$PWD" ; then PWD=`${PWDCMD-pwd}`; fi -# Export original configure arguments for use by sub-configures. -TOPLEVEL_CONFIGURE_ARGUMENTS="$progname $@" +# Export original configure arguments for use by sub-configures. These +# will be expanded by make, so quote '$'. +tmp="$progname $@" +sed -e 's,\$,$$,g' < conftestsed.out +$tmp +EOF_SED +TOPLEVEL_CONFIGURE_ARGUMENTS=`cat conftestsed.out` +rm -f conftestsed.out AC_SUBST(TOPLEVEL_CONFIGURE_ARGUMENTS) moveifchange=${srcdir}/move-if-change @@ -189,27 +198,9 @@ else is_cross_compiler=yes fi -# Find the build and target subdirs. +# Find the build and target subdir names. GCC_TOPLEV_SUBDIRS -if test ! -d ${target_subdir} ; then - if mkdir ${target_subdir} ; then true - else - echo "'*** could not make ${PWD=`${PWDCMD-pwd}`}/${target_subdir}" 1>&2 - exit 1 - fi -fi - -if test x"${build_alias}" != x"${host}" ; then - if test ! -d ${build_subdir} ; then - if mkdir ${build_subdir} ; then true - else - echo "'*** could not make ${PWD=`${PWDCMD-pwd}`}/${build_subdir}" 1>&2 - exit 1 - fi - fi -fi - # Skipdirs are removed silently. skipdirs= # Noconfigdirs are removed loudly. @@ -257,7 +248,8 @@ esac # If both --with-headers and --with-libs are specified, default to # --without-newlib. -if test x"${with_headers}" != x && test x"${with_libs}" != x ; then +if test x"${with_headers}" != x && test x"${with_headers} != xno \ + && test x"${with_libs}" != x && test x"${with_libs} != xno ; then if test x"${with_newlib}" = x ; then with_newlib=no fi @@ -334,6 +326,10 @@ case "${target}" in *-*-chorusos) noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}" ;; + powerpc-*-darwin*) + noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof" + noconfigdirs="$noconfigdirs target-libobjc" + ;; *-*-darwin*) noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof" noconfigdirs="$noconfigdirs target-libobjc ${libgcj}" @@ -374,7 +370,7 @@ case "${target}" in esac ;; *-*-vxworks*) - noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}" + noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libiberty ${libgcj}" ;; alpha*-dec-osf*) # ld works, but does not support shared libraries. @@ -389,7 +385,7 @@ case "${target}" in # newlib is not 64 bit ready noconfigdirs="$noconfigdirs target-newlib target-libgloss" ;; - alpha*-*-freebsd*) + alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu) noconfigdirs="$noconfigdirs target-newlib target-libgloss" ;; alpha*-*-*) @@ -510,7 +506,7 @@ case "${target}" in i[[3456789]]86-*-coff | i[[3456789]]86-*-elf) noconfigdirs="$noconfigdirs ${libgcj}" ;; - i[[3456789]]86-*-freebsd*) + i[[3456789]]86-*-freebsd* | i[[3456789]]86-*-kfreebsd*-gnu) noconfigdirs="$noconfigdirs target-newlib target-libgloss" ;; i[[3456789]]86-*-linux*) @@ -577,7 +573,7 @@ case "${target}" in noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}" ;; m32r-*-*) - noconfigdirs="$noconfigdirs ${libgcj} gdb" + noconfigdirs="$noconfigdirs ${libgcj}" ;; m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*) noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}" @@ -937,7 +933,7 @@ copy_dirs= # Handle --with-headers=XXX. If the value is not "yes", the contents of # the named directory are copied to $(tooldir)/sys-include. -if test x"${with_headers}" != x ; then +if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then if test x${is_cross_compiler} = xno ; then echo 1>&2 '***' --with-headers is only supported when cross compiling exit 1 @@ -954,7 +950,7 @@ fi # Handle --with-libs=XXX. If the value is not "yes", the contents of # the name directories are copied to $(tooldir)/lib. Multiple directories # are permitted. -if test x"${with_libs}" != x ; then +if test x"${with_libs}" != x && test x"${with_libs}" != xno ; then if test x${is_cross_compiler} = xno ; then echo 1>&2 '***' --with-libs is only supported when cross compiling exit 1 @@ -1764,21 +1760,53 @@ AC_SUBST_FILE(serialization_dependencies) # Base args. Strip norecursion, cache-file, srcdir, host, build, # target and nonopt. These are the ones we might not want to pass -# down to subconfigures. -baseargs=`echo " ${ac_configure_args} " | \ - sed -e 's/ --no[[^ ]]* / /' \ - -e 's/ --c[[a-z-]]*[[= ]][[^ ]]* / /' \ - -e 's/ --sr[[a-z-]]*[[= ]][[^ ]]* / /' \ - -e 's/ --ho[[a-z-]]*[[= ]][[^ ]]* / /' \ - -e 's/ --bu[[a-z-]]*[[= ]][[^ ]]* / /' \ - -e 's/ --t[[a-z-]]*[[= ]][[^ ]]* / /' \ - -e 's/ -cache-file[[= ]][[^ ]]* / /' \ - -e 's/ -srcdir[[= ]][[^ ]]* / /' \ - -e 's/ -host[[= ]][[^ ]]* / /' \ - -e 's/ -build[[= ]][[^ ]]* / /' \ - -e 's/ -target[[= ]][[^ ]]* / /' \ - -e "s/ [[^' -][^ ]*] / /" \ - -e 's/^ *//;s/ *$//'` +# down to subconfigures. Also strip program-prefix, program-suffix, +# and program-transform-name, so that we can pass down a consistent +# program-transform-name. If autoconf has put single quotes around +# any of these arguments (because they contain shell metacharacters) +# then this will fail; in practice this only happens for +# --program-transform-name, so be sure to override --program-transform-name +# at the end of the argument list. +# These will be expanded by make, so quote '$'. +cat <<\EOF_SED > conftestsed +s/ --no[[^ ]]* / / +s/ --c[[a-z-]]*[[= ]][[^ ]]* / / +s/ --sr[[a-z-]]*[[= ]][[^ ]]* / / +s/ --ho[[a-z-]]*[[= ]][[^ ]]* / / +s/ --bu[[a-z-]]*[[= ]][[^ ]]* / / +s/ --t[[a-z-]]*[[= ]][[^ ]]* / / +s/ --program-[[pst]][[a-z-]]*[[= ]][[^ ]]* / / +s/ -cache-file[[= ]][[^ ]]* / / +s/ -srcdir[[= ]][[^ ]]* / / +s/ -host[[= ]][[^ ]]* / / +s/ -build[[= ]][[^ ]]* / / +s/ -target[[= ]][[^ ]]* / / +s/ -program-prefix[[= ]][[^ ]]* / / +s/ -program-suffix[[= ]][[^ ]]* / / +s/ -program-transform-name[[= ]][[^ ]]* / / +s/ [[^' -][^ ]*] / / +s/^ *//;s/ *$// +s,\$,$$,g +EOF_SED +sed -f conftestsed < conftestsed.out + ${ac_configure_args} +EOF_SED +baseargs=`cat conftestsed.out` +rm -f conftestsed conftestsed.out + +# Add in --program-transform-name, after --program-prefix and +# --program-suffix have been applied to it. Autoconf has already +# doubled dollar signs and backslashes in program_transform_name; we want +# the backslashes un-doubled, and then the entire thing wrapped in single +# quotes, because this will be expanded first by make and then by the shell. +# Also, because we want to override the logic in subdir configure scripts to +# choose program_transform_name, replace any s,x,x, with s,y,y,. +sed -e "s,\\\\\\\\,\\\\,g; s,','\\\\'',g; s/s,x,x,/s,y,y,/" < conftestsed.out +${program_transform_name} +EOF_SED +gcc_transform_name=`cat conftestsed.out` +rm -f conftestsed.out +baseargs="$baseargs --program-transform-name='${gcc_transform_name}'" # For the build-side libraries, we just need to pretend we're native, # and not use the same cache file. Multilibs are neither needed nor @@ -1891,6 +1919,10 @@ case " $target_configdirs " in ;; esac +# Allow the user to override the flags for +# our build compiler if desired. +CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}} + # On Canadian crosses, we'll be searching the right directories for # the previously-installed cross compiler, so don't bother to add # flags for directories within the install tree of the compiler @@ -1933,7 +1965,9 @@ libstdcxx_flags='`test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_ raw_libstdcxx_flags=' -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs' if test "x${CXX_FOR_TARGET+set}" = xset; then - : + if test "x${RAW_CXX_FOR_TARGET+set}" != xset; then + RAW_CXX_FOR_TARGET=${CXX_FOR_TARGET} + fi elif test -d ${srcdir}/gcc; then # We add -shared-libgcc to CXX_FOR_TARGET whenever we use xgcc instead # of g++ for linking C++ or Java, because g++ has -shared-libgcc by @@ -2030,6 +2064,7 @@ NCN_STRICT_CHECK_TOOL(OBJDUMP, objdump) AC_SUBST(CC) AC_SUBST(CXX) AC_SUBST(CFLAGS) +AC_SUBST(CFLAGS_FOR_BUILD) AC_SUBST(CXXFLAGS) AC_SUBST(DEFAULT_YACC) AC_SUBST(DEFAULT_LEX)