From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1521) id 7FB6A385C418; Wed, 2 Feb 2022 04:28:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7FB6A385C418 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Frysinger To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] libgloss: move to ../config/multi.m4 for multilib logic X-Act-Checkin: newlib-cygwin X-Git-Author: Mike Frysinger X-Git-Refname: refs/heads/master X-Git-Oldrev: 30f244155b8e82aa948ddcb8f2350654fc1adb92 X-Git-Newrev: 8622002ffc71ff5777a7221232ba02c7a7e7d004 Message-Id: <20220202042816.7FB6A385C418@sourceware.org> Date: Wed, 2 Feb 2022 04:28:16 +0000 (GMT) X-BeenThere: newlib-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib GIT logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Feb 2022 04:28:16 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D8622002ffc7= 1ff5777a7221232ba02c7a7e7d004 commit 8622002ffc71ff5777a7221232ba02c7a7e7d004 Author: Mike Frysinger Date: Sun Jan 23 23:24:52 2022 -0500 libgloss: move to ../config/multi.m4 for multilib logic =20 The current libgloss multilib logic is almost exactly the same as the config/multi.m4, and the differences should be minor, so switch over to that to delete custom logic on ourside. =20 The insertions here look larger and that's because none of the scripts were declaring --enable-multilib explicitly even though they checked the flag and changed behavior. Diff: --- libgloss/aarch64/aclocal.m4 | 1 + libgloss/aarch64/configure | 69 +++++++++++++++++++++++++++--- libgloss/aarch64/configure.ac | 11 ++--- libgloss/aarch64/cpu-init/aclocal.m4 | 1 + libgloss/aarch64/cpu-init/configure | 69 +++++++++++++++++++++++++++--- libgloss/aarch64/cpu-init/configure.ac | 11 ++--- libgloss/aclocal.m4 | 1 + libgloss/arm/aclocal.m4 | 1 + libgloss/arm/configure | 77 +++++++++++++++++++++++++++---= --- libgloss/arm/configure.ac | 21 ++------- libgloss/configure | 78 ++++++++++++++++++++++++++----= ---- libgloss/configure.ac | 24 +---------- libgloss/csky/aclocal.m4 | 1 + libgloss/csky/configure | 70 +++++++++++++++++++++++++++--- libgloss/csky/configure.ac | 12 ++---- libgloss/i386/aclocal.m4 | 1 + libgloss/i386/configure | 69 +++++++++++++++++++++++++++--- libgloss/i386/configure.ac | 11 ++--- libgloss/m68k/aclocal.m4 | 1 + libgloss/m68k/configure | 70 +++++++++++++++++++++++++++--- libgloss/m68k/configure.ac | 12 ++---- libgloss/mcore/aclocal.m4 | 1 + libgloss/mcore/configure | 69 +++++++++++++++++++++++++++--- libgloss/mcore/configure.ac | 11 ++--- libgloss/mips/aclocal.m4 | 1 + libgloss/mips/configure | 69 +++++++++++++++++++++++++++--- libgloss/mips/configure.ac | 11 ++--- libgloss/mn10200/aclocal.m4 | 1 + libgloss/mn10200/configure | 71 +++++++++++++++++++++++++++---- libgloss/mn10200/configure.ac | 13 ++---- libgloss/mn10300/aclocal.m4 | 1 + libgloss/mn10300/configure | 74 +++++++++++++++++++++++++++---= -- libgloss/mn10300/configure.ac | 16 ++----- libgloss/moxie/aclocal.m4 | 1 + libgloss/moxie/configure | 69 +++++++++++++++++++++++++++--- libgloss/moxie/configure.ac | 11 ++--- libgloss/sparc/aclocal.m4 | 1 + libgloss/sparc/configure | 73 ++++++++++++++++++++++++++----- libgloss/sparc/configure.ac | 11 ++--- 39 files changed, 868 insertions(+), 247 deletions(-) diff --git a/libgloss/aarch64/aclocal.m4 b/libgloss/aarch64/aclocal.m4 index 24271f381..fab8217a4 100644 --- a/libgloss/aarch64/aclocal.m4 +++ b/libgloss/aarch64/aclocal.m4 @@ -379,5 +379,6 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) =20 m4_include([../../config/depstand.m4]) m4_include([../../config/lead-dot.m4]) +m4_include([../../config/multi.m4]) m4_include([../../config/override.m4]) m4_include([../acinclude.m4]) diff --git a/libgloss/aarch64/configure b/libgloss/aarch64/configure index 723862766..969a00418 100755 --- a/libgloss/aarch64/configure +++ b/libgloss/aarch64/configure @@ -585,6 +585,7 @@ ac_unique_file=3D"crt0.S" enable_option_checking=3Dno ac_subst_vars=3D'LTLIBOBJS LIBOBJS +multi_basedir subdirs host_makefile_frag_path objtype @@ -663,6 +664,7 @@ ac_subst_files=3D'host_makefile_frag' ac_user_opts=3D' enable_option_checking enable_dependency_tracking +enable_multilib ' ac_precious_vars=3D'build_alias host_alias @@ -1290,6 +1292,7 @@ Optional Features: do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build + --enable-multilib build many library versions (default) =20 Some influential environment variables: CCAS assembler compiler command (defaults to CC) @@ -2561,6 +2564,44 @@ subdirs=3D"$subdirs cpu-init" =20 fi =20 +# Default to --enable-multilib +# Check whether --enable-multilib was given. +if test "${enable_multilib+set}" =3D set; then : + enableval=3D$enable_multilib; case "$enableval" in + yes) multilib=3Dyes ;; + no) multilib=3Dno ;; + *) as_fn_error $? "bad value $enableval for multilib option" "$LINENO"= 5 ;; + esac +else + multilib=3Dyes +fi + + +# We may get other options which we leave undocumented: +# --with-target-subdir, --with-multisrctop, --with-multisubdir +# See config-ml.in if you want the gory details. + +if test "$srcdir" =3D "."; then + if test "$with_target_subdir" !=3D "."; then + multi_basedir=3D"$srcdir/$with_multisrctop../../.." + else + multi_basedir=3D"$srcdir/$with_multisrctop../.." + fi +else + multi_basedir=3D"$srcdir/../.." +fi + + +# Even if the default multilib is not a cross compilation, +# it may be that some of the other multilibs are. +if test $cross_compiling =3D no && test $multilib =3D yes \ + && test "x${with_multisubdir}" !=3D x ; then + cross_compiling=3Dmaybe +fi + +ac_config_commands=3D"$ac_config_commands default-1" + + ac_config_files=3D"$ac_config_files Makefile" =20 cat >confcache <<\_ACEOF @@ -3277,12 +3318,20 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=3D1 # INIT-COMMANDS # AMDEP_TRUE=3D"$AMDEP_TRUE" ac_aux_dir=3D"$ac_aux_dir" -srcdir=3D${srcdir} -target=3D${target} -with_multisubdir=3D${with_multisubdir} -ac_configure_args=3D"${ac_configure_args} --enable-multilib" -CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh} =20 +srcdir=3D"$srcdir" +host=3D"$host" +target=3D"$target" +with_multisubdir=3D"$with_multisubdir" +with_multisrctop=3D"$with_multisrctop" +with_target_subdir=3D"$with_target_subdir" +ac_configure_args=3D"${multilib_arg} ${ac_configure_args}" +multi_basedir=3D"$multi_basedir" +CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh} +CC=3D"$CC" +CXX=3D"$CXX" +GFORTRAN=3D"$GFORTRAN" +GCJ=3D"$GCJ" =20 _ACEOF =20 @@ -3293,6 +3342,7 @@ for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS=3D"$CONFIG_COMMANDS depfiles" ;; + "default-1") CONFIG_COMMANDS=3D"$CONFIG_COMMANDS default-1" ;; "Makefile") CONFIG_FILES=3D"$CONFIG_FILES Makefile" ;; =20 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; @@ -3849,7 +3899,14 @@ $as_echo X"$file" | done } ;; - "Makefile":F) . ${srcdir}/../../config-ml.in ;; + "default-1":C) +# Only add multilib support code if we just rebuilt the top-level +# Makefile. +case " $CONFIG_FILES " in + *" Makefile "*) + ac_file=3DMakefile . ${multi_basedir}/config-ml.in + ;; +esac ;; =20 esac done # for ac_tag diff --git a/libgloss/aarch64/configure.ac b/libgloss/aarch64/configure.ac index 303e51359..b26f55eca 100644 --- a/libgloss/aarch64/configure.ac +++ b/libgloss/aarch64/configure.ac @@ -43,12 +43,7 @@ if test -d "${srcdir}/cpu-init"; then AC_SUBST(subdirs) fi =20 -AC_CONFIG_FILES(Makefile, -. ${srcdir}/../../config-ml.in, -srcdir=3D${srcdir} -target=3D${target} -with_multisubdir=3D${with_multisubdir} -ac_configure_args=3D"${ac_configure_args} --enable-multilib" -CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh} -) +AM_ENABLE_MULTILIB(, ../..) + +AC_CONFIG_FILES([Makefile]) AC_OUTPUT diff --git a/libgloss/aarch64/cpu-init/aclocal.m4 b/libgloss/aarch64/cpu-in= it/aclocal.m4 index 5ca701920..ee5abac29 100644 --- a/libgloss/aarch64/cpu-init/aclocal.m4 +++ b/libgloss/aarch64/cpu-init/aclocal.m4 @@ -379,5 +379,6 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) =20 m4_include([../../../config/depstand.m4]) m4_include([../../../config/lead-dot.m4]) +m4_include([../../../config/multi.m4]) m4_include([../../../config/override.m4]) m4_include([../../acinclude.m4]) diff --git a/libgloss/aarch64/cpu-init/configure b/libgloss/aarch64/cpu-ini= t/configure index c8159716a..7b03053e4 100755 --- a/libgloss/aarch64/cpu-init/configure +++ b/libgloss/aarch64/cpu-init/configure @@ -584,6 +584,7 @@ PACKAGE_URL=3D ac_unique_file=3D"Makefile.in" ac_subst_vars=3D'LTLIBOBJS LIBOBJS +multi_basedir host_makefile_frag_path CCASFLAGS CCAS @@ -660,6 +661,7 @@ ac_subst_files=3D'host_makefile_frag' ac_user_opts=3D' enable_option_checking enable_dependency_tracking +enable_multilib ' ac_precious_vars=3D'build_alias host_alias @@ -1287,6 +1289,7 @@ Optional Features: do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build + --enable-multilib build many library versions (default) =20 Some influential environment variables: CCAS assembler compiler command (defaults to CC) @@ -2540,6 +2543,44 @@ host_makefile_frag_path=3D$host_makefile_frag =20 =20 =20 +# Default to --enable-multilib +# Check whether --enable-multilib was given. +if test "${enable_multilib+set}" =3D set; then : + enableval=3D$enable_multilib; case "$enableval" in + yes) multilib=3Dyes ;; + no) multilib=3Dno ;; + *) as_fn_error $? "bad value $enableval for multilib option" "$LINENO"= 5 ;; + esac +else + multilib=3Dyes +fi + + +# We may get other options which we leave undocumented: +# --with-target-subdir, --with-multisrctop, --with-multisubdir +# See config-ml.in if you want the gory details. + +if test "$srcdir" =3D "."; then + if test "$with_target_subdir" !=3D "."; then + multi_basedir=3D"$srcdir/$with_multisrctop../../../.." + else + multi_basedir=3D"$srcdir/$with_multisrctop../../.." + fi +else + multi_basedir=3D"$srcdir/../../.." +fi + + +# Even if the default multilib is not a cross compilation, +# it may be that some of the other multilibs are. +if test $cross_compiling =3D no && test $multilib =3D yes \ + && test "x${with_multisubdir}" !=3D x ; then + cross_compiling=3Dmaybe +fi + +ac_config_commands=3D"$ac_config_commands default-1" + + ac_config_files=3D"$ac_config_files Makefile" =20 cat >confcache <<\_ACEOF @@ -3256,12 +3297,20 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=3D1 # INIT-COMMANDS # AMDEP_TRUE=3D"$AMDEP_TRUE" ac_aux_dir=3D"$ac_aux_dir" -srcdir=3D${srcdir} -target=3D${target} -with_multisubdir=3D${with_multisubdir} -ac_configure_args=3D"${ac_configure_args} --enable-multilib" -CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh} =20 +srcdir=3D"$srcdir" +host=3D"$host" +target=3D"$target" +with_multisubdir=3D"$with_multisubdir" +with_multisrctop=3D"$with_multisrctop" +with_target_subdir=3D"$with_target_subdir" +ac_configure_args=3D"${multilib_arg} ${ac_configure_args}" +multi_basedir=3D"$multi_basedir" +CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh} +CC=3D"$CC" +CXX=3D"$CXX" +GFORTRAN=3D"$GFORTRAN" +GCJ=3D"$GCJ" =20 _ACEOF =20 @@ -3272,6 +3321,7 @@ for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS=3D"$CONFIG_COMMANDS depfiles" ;; + "default-1") CONFIG_COMMANDS=3D"$CONFIG_COMMANDS default-1" ;; "Makefile") CONFIG_FILES=3D"$CONFIG_FILES Makefile" ;; =20 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; @@ -3828,7 +3878,14 @@ $as_echo X"$file" | done } ;; - "Makefile":F) . ${srcdir}/../../../config-ml.in ;; + "default-1":C) +# Only add multilib support code if we just rebuilt the top-level +# Makefile. +case " $CONFIG_FILES " in + *" Makefile "*) + ac_file=3DMakefile . ${multi_basedir}/config-ml.in + ;; +esac ;; =20 esac done # for ac_tag diff --git a/libgloss/aarch64/cpu-init/configure.ac b/libgloss/aarch64/cpu-= init/configure.ac index 91aa2211d..91f9c709a 100644 --- a/libgloss/aarch64/cpu-init/configure.ac +++ b/libgloss/aarch64/cpu-init/configure.ac @@ -28,12 +28,7 @@ host_makefile_frag_path=3D$host_makefile_frag AC_SUBST(host_makefile_frag_path) AC_SUBST_FILE(host_makefile_frag) =20 -AC_CONFIG_FILES(Makefile, -. ${srcdir}/../../../config-ml.in, -srcdir=3D${srcdir} -target=3D${target} -with_multisubdir=3D${with_multisubdir} -ac_configure_args=3D"${ac_configure_args} --enable-multilib" -CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh} -) +AM_ENABLE_MULTILIB(, ../../..) + +AC_CONFIG_FILES([Makefile]) AC_OUTPUT diff --git a/libgloss/aclocal.m4 b/libgloss/aclocal.m4 index 3b8142a4b..6f7b7f7a7 100644 --- a/libgloss/aclocal.m4 +++ b/libgloss/aclocal.m4 @@ -1133,5 +1133,6 @@ AC_SUBST([am__untar]) =20 m4_include([../config/depstand.m4]) m4_include([../config/lead-dot.m4]) +m4_include([../config/multi.m4]) m4_include([../config/override.m4]) m4_include([acinclude.m4]) diff --git a/libgloss/arm/aclocal.m4 b/libgloss/arm/aclocal.m4 index 24271f381..fab8217a4 100644 --- a/libgloss/arm/aclocal.m4 +++ b/libgloss/arm/aclocal.m4 @@ -379,5 +379,6 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) =20 m4_include([../../config/depstand.m4]) m4_include([../../config/lead-dot.m4]) +m4_include([../../config/multi.m4]) m4_include([../../config/override.m4]) m4_include([../acinclude.m4]) diff --git a/libgloss/arm/configure b/libgloss/arm/configure index bfa8bdb3d..8e3866b56 100755 --- a/libgloss/arm/configure +++ b/libgloss/arm/configure @@ -584,6 +584,7 @@ PACKAGE_URL=3D ac_unique_file=3D"redboot-crt0.S" ac_subst_vars=3D'LTLIBOBJS LIBOBJS +multi_basedir subdirs host_makefile_frag_path objtype @@ -665,6 +666,7 @@ ac_user_opts=3D' enable_option_checking enable_newlib_supplied_syscalls enable_dependency_tracking +enable_multilib ' ac_precious_vars=3D'build_alias host_alias @@ -1293,6 +1295,7 @@ Optional Features: do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build + --enable-multilib build many library versions (default) =20 Some influential environment variables: CCAS assembler compiler command (defaults to CC) @@ -2587,6 +2590,44 @@ if test -d "${srcdir}/cpu-init"; then =20 fi =20 +# Default to --enable-multilib +# Check whether --enable-multilib was given. +if test "${enable_multilib+set}" =3D set; then : + enableval=3D$enable_multilib; case "$enableval" in + yes) multilib=3Dyes ;; + no) multilib=3Dno ;; + *) as_fn_error $? "bad value $enableval for multilib option" "$LINENO"= 5 ;; + esac +else + multilib=3Dyes +fi + + +# We may get other options which we leave undocumented: +# --with-target-subdir, --with-multisrctop, --with-multisubdir +# See config-ml.in if you want the gory details. + +if test "$srcdir" =3D "."; then + if test "$with_target_subdir" !=3D "."; then + multi_basedir=3D"$srcdir/$with_multisrctop../../.." + else + multi_basedir=3D"$srcdir/$with_multisrctop../.." + fi +else + multi_basedir=3D"$srcdir/../.." +fi + + +# Even if the default multilib is not a cross compilation, +# it may be that some of the other multilibs are. +if test $cross_compiling =3D no && test $multilib =3D yes \ + && test "x${with_multisubdir}" !=3D x ; then + cross_compiling=3Dmaybe +fi + +ac_config_commands=3D"$ac_config_commands default-1" + + ac_config_files=3D"$ac_config_files Makefile" =20 cat >confcache <<\_ACEOF @@ -3303,18 +3344,20 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=3D1 # INIT-COMMANDS # AMDEP_TRUE=3D"$AMDEP_TRUE" ac_aux_dir=3D"$ac_aux_dir" -srcdir=3D${srcdir} - target=3D${target} - with_multisubdir=3D${with_multisubdir} - ac_configure_args=3D"${ac_configure_args} --enable-multilib" - CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh} - -srcdir=3D${srcdir} -target=3D${target} -with_multisubdir=3D${with_multisubdir} -ac_configure_args=3D"${ac_configure_args} --enable-multilib" -CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh} =20 +srcdir=3D"$srcdir" +host=3D"$host" +target=3D"$target" +with_multisubdir=3D"$with_multisubdir" +with_multisrctop=3D"$with_multisrctop" +with_target_subdir=3D"$with_target_subdir" +ac_configure_args=3D"${multilib_arg} ${ac_configure_args}" +multi_basedir=3D"$multi_basedir" +CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh} +CC=3D"$CC" +CXX=3D"$CXX" +GFORTRAN=3D"$GFORTRAN" +GCJ=3D"$GCJ" =20 _ACEOF =20 @@ -3326,6 +3369,7 @@ do case $ac_config_target in "depfiles") CONFIG_COMMANDS=3D"$CONFIG_COMMANDS depfiles" ;; "cpu-init/Makefile") CONFIG_FILES=3D"$CONFIG_FILES cpu-init/Makefile" = ;; + "default-1") CONFIG_COMMANDS=3D"$CONFIG_COMMANDS default-1" ;; "Makefile") CONFIG_FILES=3D"$CONFIG_FILES Makefile" ;; =20 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; @@ -3882,8 +3926,14 @@ $as_echo X"$file" | done } ;; - "cpu-init/Makefile":F) . ${srcdir}/../../config-ml.in ;; - "Makefile":F) . ${srcdir}/../../config-ml.in ;; + "default-1":C) +# Only add multilib support code if we just rebuilt the top-level +# Makefile. +case " $CONFIG_FILES " in + *" Makefile "*) + ac_file=3DMakefile . ${multi_basedir}/config-ml.in + ;; +esac ;; =20 esac done # for ac_tag @@ -3922,4 +3972,3 @@ if test -n "$ac_unrecognized_opts" && test "$enable_o= ption_checking" !=3D no; then $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&= 2;} fi =20 - diff --git a/libgloss/arm/configure.ac b/libgloss/arm/configure.ac index 806020b04..2b98b5453 100644 --- a/libgloss/arm/configure.ac +++ b/libgloss/arm/configure.ac @@ -62,24 +62,11 @@ AC_SUBST_FILE(host_makefile_frag) # Configure cpu init plug-ins if test -d "${srcdir}/cpu-init"; then subdirs=3D"${subdirs} cpu-init" - AC_CONFIG_FILES(cpu-init/Makefile, - . ${srcdir}/../../config-ml.in, - srcdir=3D${srcdir} - target=3D${target} - with_multisubdir=3D${with_multisubdir} - ac_configure_args=3D"${ac_configure_args} --enable-multilib" - CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh} - ) + AC_CONFIG_FILES([cpu-init/Makefile]) AC_SUBST(subdirs) fi =20 -AC_CONFIG_FILES(Makefile, -. ${srcdir}/../../config-ml.in, -srcdir=3D${srcdir} -target=3D${target} -with_multisubdir=3D${with_multisubdir} -ac_configure_args=3D"${ac_configure_args} --enable-multilib" -CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh} -) -AC_OUTPUT +AM_ENABLE_MULTILIB(, ../..) =20 +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT diff --git a/libgloss/configure b/libgloss/configure index d197679ac..3fc20d6a2 100755 --- a/libgloss/configure +++ b/libgloss/configure @@ -587,6 +587,7 @@ ac_subst_vars=3D'am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS +multi_basedir target_makefile_frag_path host_makefile_frag_path CPP @@ -697,6 +698,7 @@ ac_user_opts=3D' enable_option_checking enable_silent_rules enable_dependency_tracking +enable_multilib ' ac_precious_vars=3D'build_alias host_alias @@ -1345,6 +1347,7 @@ Optional Features: do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build + --enable-multilib build many library versions (default) =20 Some influential environment variables: CCAS assembler compiler command (defaults to CC) @@ -4791,13 +4794,44 @@ target_makefile_frag_path=3D$target_makefile_frag =20 =20 =20 -if test "${multilib}" =3D "yes"; then - multilib_arg=3D"--enable-multilib" +# Default to --enable-multilib +# Check whether --enable-multilib was given. +if test "${enable_multilib+set}" =3D set; then : + enableval=3D$enable_multilib; case "$enableval" in + yes) multilib=3Dyes ;; + no) multilib=3Dno ;; + *) as_fn_error $? "bad value $enableval for multilib option" "$LINENO"= 5 ;; + esac else - multilib_arg=3D + multilib=3Dyes fi =20 -# for now, only add multilibs for specific targets + +# We may get other options which we leave undocumented: +# --with-target-subdir, --with-multisrctop, --with-multisubdir +# See config-ml.in if you want the gory details. + +if test "$srcdir" =3D "."; then + if test "$with_target_subdir" !=3D "."; then + multi_basedir=3D"$srcdir/$with_multisrctop../.." + else + multi_basedir=3D"$srcdir/$with_multisrctop.." + fi +else + multi_basedir=3D"$srcdir/.." +fi + + +# Even if the default multilib is not a cross compilation, +# it may be that some of the other multilibs are. +if test $cross_compiling =3D no && test $multilib =3D yes \ + && test "x${with_multisubdir}" !=3D x ; then + cross_compiling=3Dmaybe +fi + +ac_config_commands=3D"$ac_config_commands default-1" + + ac_config_files=3D"$ac_config_files Makefile" =20 cat >confcache <<\_ACEOF @@ -5520,15 +5554,20 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=3D1 # INIT-COMMANDS # AMDEP_TRUE=3D"$AMDEP_TRUE" ac_aux_dir=3D"$ac_aux_dir" -srcdir=3D${srcdir} -target=3D${target} -host=3D${host} -with_multisubdir=3D${with_multisubdir} -ac_configure_args=3D"--enable-multilib ${ac_configure_args}" -CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh} -CC=3D"${CC}" -LDFLAGS=3D${LDFLAGS} =20 +srcdir=3D"$srcdir" +host=3D"$host" +target=3D"$target" +with_multisubdir=3D"$with_multisubdir" +with_multisrctop=3D"$with_multisrctop" +with_target_subdir=3D"$with_target_subdir" +ac_configure_args=3D"${multilib_arg} ${ac_configure_args}" +multi_basedir=3D"$multi_basedir" +CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh} +CC=3D"$CC" +CXX=3D"$CXX" +GFORTRAN=3D"$GFORTRAN" +GCJ=3D"$GCJ" =20 _ACEOF =20 @@ -5578,6 +5617,7 @@ do "nios2/Makefile") CONFIG_FILES=3D"$CONFIG_FILES nios2/Makefile" ;; "libnosys/Makefile") CONFIG_FILES=3D"$CONFIG_FILES libnosys/Makefile" = ;; "depfiles") CONFIG_COMMANDS=3D"$CONFIG_COMMANDS depfiles" ;; + "default-1") CONFIG_COMMANDS=3D"$CONFIG_COMMANDS default-1" ;; "Makefile") CONFIG_FILES=3D"$CONFIG_FILES Makefile" ;; =20 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; @@ -6306,10 +6346,14 @@ $as_echo X"$file" | done } ;; - "Makefile":F) if test -n "$CONFIG_FILES"; then - unset ac_file - . ${srcdir}/../config-ml.in -fi ;; + "default-1":C) +# Only add multilib support code if we just rebuilt the top-level +# Makefile. +case " $CONFIG_FILES " in + *" Makefile "*) + ac_file=3DMakefile . ${multi_basedir}/config-ml.in + ;; +esac ;; =20 esac done # for ac_tag @@ -6493,5 +6537,3 @@ if test -n "$ac_unrecognized_opts" && test "$enable_o= ption_checking" !=3D no; then $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&= 2;} fi =20 - - diff --git a/libgloss/configure.ac b/libgloss/configure.ac index c65a3655a..ac812c69b 100644 --- a/libgloss/configure.ac +++ b/libgloss/configure.ac @@ -330,27 +330,7 @@ target_makefile_frag_path=3D$target_makefile_frag AC_SUBST(target_makefile_frag_path) AC_SUBST_FILE(target_makefile_frag) =20 -if test "${multilib}" =3D "yes"; then - multilib_arg=3D"--enable-multilib" -else - multilib_arg=3D -fi +AM_ENABLE_MULTILIB(, ..) =20 -# for now, only add multilibs for specific targets -AC_CONFIG_FILES([Makefile], -[if test -n "$CONFIG_FILES"; then - unset ac_file - . ${srcdir}/../config-ml.in -fi], -srcdir=3D${srcdir} -target=3D${target} -host=3D${host} -with_multisubdir=3D${with_multisubdir} -ac_configure_args=3D"--enable-multilib ${ac_configure_args}" -CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh} -CC=3D"${CC}" -LDFLAGS=3D${LDFLAGS} -) +AC_CONFIG_FILES([Makefile]) AC_OUTPUT - - diff --git a/libgloss/csky/aclocal.m4 b/libgloss/csky/aclocal.m4 index 24271f381..fab8217a4 100644 --- a/libgloss/csky/aclocal.m4 +++ b/libgloss/csky/aclocal.m4 @@ -379,5 +379,6 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) =20 m4_include([../../config/depstand.m4]) m4_include([../../config/lead-dot.m4]) +m4_include([../../config/multi.m4]) m4_include([../../config/override.m4]) m4_include([../acinclude.m4]) diff --git a/libgloss/csky/configure b/libgloss/csky/configure index 672876a35..98ca17fa4 100755 --- a/libgloss/csky/configure +++ b/libgloss/csky/configure @@ -584,6 +584,7 @@ PACKAGE_URL=3D ac_unique_file=3D"crt0.S" ac_subst_vars=3D'LTLIBOBJS LIBOBJS +multi_basedir target_makefile_frag_path host_makefile_frag_path DO @@ -670,6 +671,7 @@ target_makefile_frag' ac_user_opts=3D' enable_option_checking enable_dependency_tracking +enable_multilib ' ac_precious_vars=3D'build_alias host_alias @@ -1303,6 +1305,7 @@ Optional Features: do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build + --enable-multilib build many library versions (default) =20 Some influential environment variables: CCAS assembler compiler command (defaults to CC) @@ -3577,6 +3580,44 @@ target_makefile_frag_path=3D$target_makefile_frag =20 =20 =20 +# Default to --enable-multilib +# Check whether --enable-multilib was given. +if test "${enable_multilib+set}" =3D set; then : + enableval=3D$enable_multilib; case "$enableval" in + yes) multilib=3Dyes ;; + no) multilib=3Dno ;; + *) as_fn_error $? "bad value $enableval for multilib option" "$LINENO"= 5 ;; + esac +else + multilib=3Dyes +fi + + +# We may get other options which we leave undocumented: +# --with-target-subdir, --with-multisrctop, --with-multisubdir +# See config-ml.in if you want the gory details. + +if test "$srcdir" =3D "."; then + if test "$with_target_subdir" !=3D "."; then + multi_basedir=3D"$srcdir/$with_multisrctop../../.." + else + multi_basedir=3D"$srcdir/$with_multisrctop../.." + fi +else + multi_basedir=3D"$srcdir/../.." +fi + + +# Even if the default multilib is not a cross compilation, +# it may be that some of the other multilibs are. +if test $cross_compiling =3D no && test $multilib =3D yes \ + && test "x${with_multisubdir}" !=3D x ; then + cross_compiling=3Dmaybe +fi + +ac_config_commands=3D"$ac_config_commands default-1" + + ac_config_files=3D"$ac_config_files Makefile" =20 cat >confcache <<\_ACEOF @@ -4293,12 +4334,20 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=3D1 # INIT-COMMANDS # AMDEP_TRUE=3D"$AMDEP_TRUE" ac_aux_dir=3D"$ac_aux_dir" -srcdir=3D${srcdir} -target=3D${target} -with_multisubdir=3D${with_multisubdir} -ac_configure_args=3D"${ac_configure_args} --enable-multilib" -CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh} =20 +srcdir=3D"$srcdir" +host=3D"$host" +target=3D"$target" +with_multisubdir=3D"$with_multisubdir" +with_multisrctop=3D"$with_multisrctop" +with_target_subdir=3D"$with_target_subdir" +ac_configure_args=3D"${multilib_arg} ${ac_configure_args}" +multi_basedir=3D"$multi_basedir" +CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh} +CC=3D"$CC" +CXX=3D"$CXX" +GFORTRAN=3D"$GFORTRAN" +GCJ=3D"$GCJ" =20 _ACEOF =20 @@ -4309,6 +4358,7 @@ for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS=3D"$CONFIG_COMMANDS depfiles" ;; + "default-1") CONFIG_COMMANDS=3D"$CONFIG_COMMANDS default-1" ;; "Makefile") CONFIG_FILES=3D"$CONFIG_FILES Makefile" ;; =20 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; @@ -4865,7 +4915,14 @@ $as_echo X"$file" | done } ;; - "Makefile":F) . ${srcdir}/../../config-ml.in ;; + "default-1":C) +# Only add multilib support code if we just rebuilt the top-level +# Makefile. +case " $CONFIG_FILES " in + *" Makefile "*) + ac_file=3DMakefile . ${multi_basedir}/config-ml.in + ;; +esac ;; =20 esac done # for ac_tag @@ -4904,4 +4961,3 @@ if test -n "$ac_unrecognized_opts" && test "$enable_o= ption_checking" !=3D no; then $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&= 2;} fi =20 - diff --git a/libgloss/csky/configure.ac b/libgloss/csky/configure.ac index 0387ea46b..bb9a9195d 100644 --- a/libgloss/csky/configure.ac +++ b/libgloss/csky/configure.ac @@ -65,13 +65,7 @@ target_makefile_frag_path=3D$target_makefile_frag AC_SUBST(target_makefile_frag_path) AC_SUBST_FILE(target_makefile_frag) =20 -AC_CONFIG_FILES(Makefile, -. ${srcdir}/../../config-ml.in, -srcdir=3D${srcdir} -target=3D${target} -with_multisubdir=3D${with_multisubdir} -ac_configure_args=3D"${ac_configure_args} --enable-multilib" -CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh} -) -AC_OUTPUT +AM_ENABLE_MULTILIB(, ../..) =20 +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT diff --git a/libgloss/i386/aclocal.m4 b/libgloss/i386/aclocal.m4 index 24271f381..fab8217a4 100644 --- a/libgloss/i386/aclocal.m4 +++ b/libgloss/i386/aclocal.m4 @@ -379,5 +379,6 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) =20 m4_include([../../config/depstand.m4]) m4_include([../../config/lead-dot.m4]) +m4_include([../../config/multi.m4]) m4_include([../../config/override.m4]) m4_include([../acinclude.m4]) diff --git a/libgloss/i386/configure b/libgloss/i386/configure index 81026b7de..9f9e02bdf 100755 --- a/libgloss/i386/configure +++ b/libgloss/i386/configure @@ -584,6 +584,7 @@ PACKAGE_URL=3D ac_unique_file=3D"cygmon-salib.c" ac_subst_vars=3D'LTLIBOBJS LIBOBJS +multi_basedir host_makefile_frag_path CCASFLAGS CCAS @@ -663,6 +664,7 @@ ac_subst_files=3D'host_makefile_frag' ac_user_opts=3D' enable_option_checking enable_dependency_tracking +enable_multilib ' ac_precious_vars=3D'build_alias host_alias @@ -1290,6 +1292,7 @@ Optional Features: do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build + --enable-multilib build many library versions (default) =20 Some influential environment variables: CCAS assembler compiler command (defaults to CC) @@ -2555,6 +2558,44 @@ host_makefile_frag_path=3D$host_makefile_frag =20 =20 =20 +# Default to --enable-multilib +# Check whether --enable-multilib was given. +if test "${enable_multilib+set}" =3D set; then : + enableval=3D$enable_multilib; case "$enableval" in + yes) multilib=3Dyes ;; + no) multilib=3Dno ;; + *) as_fn_error $? "bad value $enableval for multilib option" "$LINENO"= 5 ;; + esac +else + multilib=3Dyes +fi + + +# We may get other options which we leave undocumented: +# --with-target-subdir, --with-multisrctop, --with-multisubdir +# See config-ml.in if you want the gory details. + +if test "$srcdir" =3D "."; then + if test "$with_target_subdir" !=3D "."; then + multi_basedir=3D"$srcdir/$with_multisrctop../../.." + else + multi_basedir=3D"$srcdir/$with_multisrctop../.." + fi +else + multi_basedir=3D"$srcdir/../.." +fi + + +# Even if the default multilib is not a cross compilation, +# it may be that some of the other multilibs are. +if test $cross_compiling =3D no && test $multilib =3D yes \ + && test "x${with_multisubdir}" !=3D x ; then + cross_compiling=3Dmaybe +fi + +ac_config_commands=3D"$ac_config_commands default-1" + + ac_config_files=3D"$ac_config_files Makefile" =20 cat >confcache <<\_ACEOF @@ -3271,12 +3312,20 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=3D1 # INIT-COMMANDS # AMDEP_TRUE=3D"$AMDEP_TRUE" ac_aux_dir=3D"$ac_aux_dir" -srcdir=3D${srcdir} -target=3D${target} -with_multisubdir=3D${with_multisubdir} -ac_configure_args=3D"${ac_configure_args} --enable-multilib" -CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh} =20 +srcdir=3D"$srcdir" +host=3D"$host" +target=3D"$target" +with_multisubdir=3D"$with_multisubdir" +with_multisrctop=3D"$with_multisrctop" +with_target_subdir=3D"$with_target_subdir" +ac_configure_args=3D"${multilib_arg} ${ac_configure_args}" +multi_basedir=3D"$multi_basedir" +CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh} +CC=3D"$CC" +CXX=3D"$CXX" +GFORTRAN=3D"$GFORTRAN" +GCJ=3D"$GCJ" =20 _ACEOF =20 @@ -3287,6 +3336,7 @@ for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS=3D"$CONFIG_COMMANDS depfiles" ;; + "default-1") CONFIG_COMMANDS=3D"$CONFIG_COMMANDS default-1" ;; "Makefile") CONFIG_FILES=3D"$CONFIG_FILES Makefile" ;; =20 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; @@ -3843,7 +3893,14 @@ $as_echo X"$file" | done } ;; - "Makefile":F) . ${srcdir}/../../config-ml.in ;; + "default-1":C) +# Only add multilib support code if we just rebuilt the top-level +# Makefile. +case " $CONFIG_FILES " in + *" Makefile "*) + ac_file=3DMakefile . ${multi_basedir}/config-ml.in + ;; +esac ;; =20 esac done # for ac_tag diff --git a/libgloss/i386/configure.ac b/libgloss/i386/configure.ac index 895e4476e..e03620770 100644 --- a/libgloss/i386/configure.ac +++ b/libgloss/i386/configure.ac @@ -53,12 +53,7 @@ host_makefile_frag_path=3D$host_makefile_frag AC_SUBST(host_makefile_frag_path) AC_SUBST_FILE(host_makefile_frag) =20 -AC_CONFIG_FILES(Makefile, -. ${srcdir}/../../config-ml.in, -srcdir=3D${srcdir} -target=3D${target} -with_multisubdir=3D${with_multisubdir} -ac_configure_args=3D"${ac_configure_args} --enable-multilib" -CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh} -) +AM_ENABLE_MULTILIB(, ../..) + +AC_CONFIG_FILES([Makefile]) AC_OUTPUT diff --git a/libgloss/m68k/aclocal.m4 b/libgloss/m68k/aclocal.m4 index 24271f381..fab8217a4 100644 --- a/libgloss/m68k/aclocal.m4 +++ b/libgloss/m68k/aclocal.m4 @@ -379,5 +379,6 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) =20 m4_include([../../config/depstand.m4]) m4_include([../../config/lead-dot.m4]) +m4_include([../../config/multi.m4]) m4_include([../../config/override.m4]) m4_include([../acinclude.m4]) diff --git a/libgloss/m68k/configure b/libgloss/m68k/configure index 2b3e5682c..2a9d3f2ae 100755 --- a/libgloss/m68k/configure +++ b/libgloss/m68k/configure @@ -584,6 +584,7 @@ PACKAGE_URL=3D ac_unique_file=3D"crt0.S" ac_subst_vars=3D'LTLIBOBJS LIBOBJS +multi_basedir target_makefile_frag_path host_makefile_frag_path DO @@ -670,6 +671,7 @@ target_makefile_frag' ac_user_opts=3D' enable_option_checking enable_dependency_tracking +enable_multilib ' ac_precious_vars=3D'build_alias host_alias @@ -1303,6 +1305,7 @@ Optional Features: do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build + --enable-multilib build many library versions (default) =20 Some influential environment variables: CCAS assembler compiler command (defaults to CC) @@ -3577,6 +3580,44 @@ target_makefile_frag_path=3D$target_makefile_frag =20 =20 =20 +# Default to --enable-multilib +# Check whether --enable-multilib was given. +if test "${enable_multilib+set}" =3D set; then : + enableval=3D$enable_multilib; case "$enableval" in + yes) multilib=3Dyes ;; + no) multilib=3Dno ;; + *) as_fn_error $? "bad value $enableval for multilib option" "$LINENO"= 5 ;; + esac +else + multilib=3Dyes +fi + + +# We may get other options which we leave undocumented: +# --with-target-subdir, --with-multisrctop, --with-multisubdir +# See config-ml.in if you want the gory details. + +if test "$srcdir" =3D "."; then + if test "$with_target_subdir" !=3D "."; then + multi_basedir=3D"$srcdir/$with_multisrctop../../.." + else + multi_basedir=3D"$srcdir/$with_multisrctop../.." + fi +else + multi_basedir=3D"$srcdir/../.." +fi + + +# Even if the default multilib is not a cross compilation, +# it may be that some of the other multilibs are. +if test $cross_compiling =3D no && test $multilib =3D yes \ + && test "x${with_multisubdir}" !=3D x ; then + cross_compiling=3Dmaybe +fi + +ac_config_commands=3D"$ac_config_commands default-1" + + ac_config_files=3D"$ac_config_files Makefile" =20 cat >confcache <<\_ACEOF @@ -4293,12 +4334,20 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=3D1 # INIT-COMMANDS # AMDEP_TRUE=3D"$AMDEP_TRUE" ac_aux_dir=3D"$ac_aux_dir" -srcdir=3D${srcdir} -target=3D${target} -with_multisubdir=3D${with_multisubdir} -ac_configure_args=3D"${ac_configure_args} --enable-multilib" -CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh} =20 +srcdir=3D"$srcdir" +host=3D"$host" +target=3D"$target" +with_multisubdir=3D"$with_multisubdir" +with_multisrctop=3D"$with_multisrctop" +with_target_subdir=3D"$with_target_subdir" +ac_configure_args=3D"${multilib_arg} ${ac_configure_args}" +multi_basedir=3D"$multi_basedir" +CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh} +CC=3D"$CC" +CXX=3D"$CXX" +GFORTRAN=3D"$GFORTRAN" +GCJ=3D"$GCJ" =20 _ACEOF =20 @@ -4309,6 +4358,7 @@ for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS=3D"$CONFIG_COMMANDS depfiles" ;; + "default-1") CONFIG_COMMANDS=3D"$CONFIG_COMMANDS default-1" ;; "Makefile") CONFIG_FILES=3D"$CONFIG_FILES Makefile" ;; =20 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; @@ -4865,7 +4915,14 @@ $as_echo X"$file" | done } ;; - "Makefile":F) . ${srcdir}/../../config-ml.in ;; + "default-1":C) +# Only add multilib support code if we just rebuilt the top-level +# Makefile. +case " $CONFIG_FILES " in + *" Makefile "*) + ac_file=3DMakefile . ${multi_basedir}/config-ml.in + ;; +esac ;; =20 esac done # for ac_tag @@ -4904,4 +4961,3 @@ if test -n "$ac_unrecognized_opts" && test "$enable_o= ption_checking" !=3D no; then $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&= 2;} fi =20 - diff --git a/libgloss/m68k/configure.ac b/libgloss/m68k/configure.ac index 53615ffc6..de35d7934 100644 --- a/libgloss/m68k/configure.ac +++ b/libgloss/m68k/configure.ac @@ -65,13 +65,7 @@ target_makefile_frag_path=3D$target_makefile_frag AC_SUBST(target_makefile_frag_path) AC_SUBST_FILE(target_makefile_frag) =20 -AC_CONFIG_FILES(Makefile, -. ${srcdir}/../../config-ml.in, -srcdir=3D${srcdir} -target=3D${target} -with_multisubdir=3D${with_multisubdir} -ac_configure_args=3D"${ac_configure_args} --enable-multilib" -CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh} -) -AC_OUTPUT +AM_ENABLE_MULTILIB(, ../..) =20 +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT diff --git a/libgloss/mcore/aclocal.m4 b/libgloss/mcore/aclocal.m4 index 24271f381..fab8217a4 100644 --- a/libgloss/mcore/aclocal.m4 +++ b/libgloss/mcore/aclocal.m4 @@ -379,5 +379,6 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) =20 m4_include([../../config/depstand.m4]) m4_include([../../config/lead-dot.m4]) +m4_include([../../config/multi.m4]) m4_include([../../config/override.m4]) m4_include([../acinclude.m4]) diff --git a/libgloss/mcore/configure b/libgloss/mcore/configure index 62f9f6926..840f4a959 100755 --- a/libgloss/mcore/configure +++ b/libgloss/mcore/configure @@ -584,6 +584,7 @@ PACKAGE_URL=3D ac_unique_file=3D"crt0.S" ac_subst_vars=3D'LTLIBOBJS LIBOBJS +multi_basedir host_makefile_frag_path bsp_prefix CCASFLAGS @@ -661,6 +662,7 @@ ac_subst_files=3D'host_makefile_frag' ac_user_opts=3D' enable_option_checking enable_dependency_tracking +enable_multilib ' ac_precious_vars=3D'build_alias host_alias @@ -1288,6 +1290,7 @@ Optional Features: do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build + --enable-multilib build many library versions (default) =20 Some influential environment variables: CCAS assembler compiler command (defaults to CC) @@ -2552,6 +2555,44 @@ host_makefile_frag_path=3D$host_makefile_frag =20 =20 =20 +# Default to --enable-multilib +# Check whether --enable-multilib was given. +if test "${enable_multilib+set}" =3D set; then : + enableval=3D$enable_multilib; case "$enableval" in + yes) multilib=3Dyes ;; + no) multilib=3Dno ;; + *) as_fn_error $? "bad value $enableval for multilib option" "$LINENO"= 5 ;; + esac +else + multilib=3Dyes +fi + + +# We may get other options which we leave undocumented: +# --with-target-subdir, --with-multisrctop, --with-multisubdir +# See config-ml.in if you want the gory details. + +if test "$srcdir" =3D "."; then + if test "$with_target_subdir" !=3D "."; then + multi_basedir=3D"$srcdir/$with_multisrctop../../.." + else + multi_basedir=3D"$srcdir/$with_multisrctop../.." + fi +else + multi_basedir=3D"$srcdir/../.." +fi + + +# Even if the default multilib is not a cross compilation, +# it may be that some of the other multilibs are. +if test $cross_compiling =3D no && test $multilib =3D yes \ + && test "x${with_multisubdir}" !=3D x ; then + cross_compiling=3Dmaybe +fi + +ac_config_commands=3D"$ac_config_commands default-1" + + ac_config_files=3D"$ac_config_files Makefile" =20 cat >confcache <<\_ACEOF @@ -3268,12 +3309,20 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=3D1 # INIT-COMMANDS # AMDEP_TRUE=3D"$AMDEP_TRUE" ac_aux_dir=3D"$ac_aux_dir" -srcdir=3D${srcdir} -target=3D${target} -with_multisubdir=3D${with_multisubdir} -ac_configure_args=3D"${ac_configure_args} --enable-multilib" -CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh} =20 +srcdir=3D"$srcdir" +host=3D"$host" +target=3D"$target" +with_multisubdir=3D"$with_multisubdir" +with_multisrctop=3D"$with_multisrctop" +with_target_subdir=3D"$with_target_subdir" +ac_configure_args=3D"${multilib_arg} ${ac_configure_args}" +multi_basedir=3D"$multi_basedir" +CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh} +CC=3D"$CC" +CXX=3D"$CXX" +GFORTRAN=3D"$GFORTRAN" +GCJ=3D"$GCJ" =20 _ACEOF =20 @@ -3284,6 +3333,7 @@ for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS=3D"$CONFIG_COMMANDS depfiles" ;; + "default-1") CONFIG_COMMANDS=3D"$CONFIG_COMMANDS default-1" ;; "Makefile") CONFIG_FILES=3D"$CONFIG_FILES Makefile" ;; =20 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; @@ -3840,7 +3890,14 @@ $as_echo X"$file" | done } ;; - "Makefile":F) . ${srcdir}/../../config-ml.in ;; + "default-1":C) +# Only add multilib support code if we just rebuilt the top-level +# Makefile. +case " $CONFIG_FILES " in + *" Makefile "*) + ac_file=3DMakefile . ${multi_basedir}/config-ml.in + ;; +esac ;; =20 esac done # for ac_tag diff --git a/libgloss/mcore/configure.ac b/libgloss/mcore/configure.ac index a314d4ee3..f6b3f0096 100644 --- a/libgloss/mcore/configure.ac +++ b/libgloss/mcore/configure.ac @@ -39,12 +39,7 @@ host_makefile_frag_path=3D$host_makefile_frag AC_SUBST(host_makefile_frag_path) AC_SUBST_FILE(host_makefile_frag) =20 -AC_CONFIG_FILES(Makefile, -. ${srcdir}/../../config-ml.in, -srcdir=3D${srcdir} -target=3D${target} -with_multisubdir=3D${with_multisubdir} -ac_configure_args=3D"${ac_configure_args} --enable-multilib" -CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh} -) +AM_ENABLE_MULTILIB(, ../..) + +AC_CONFIG_FILES([Makefile]) AC_OUTPUT diff --git a/libgloss/mips/aclocal.m4 b/libgloss/mips/aclocal.m4 index 24271f381..fab8217a4 100644 --- a/libgloss/mips/aclocal.m4 +++ b/libgloss/mips/aclocal.m4 @@ -379,5 +379,6 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) =20 m4_include([../../config/depstand.m4]) m4_include([../../config/lead-dot.m4]) +m4_include([../../config/multi.m4]) m4_include([../../config/override.m4]) m4_include([../acinclude.m4]) diff --git a/libgloss/mips/configure b/libgloss/mips/configure index 2026f0aef..8b035f427 100755 --- a/libgloss/mips/configure +++ b/libgloss/mips/configure @@ -584,6 +584,7 @@ PACKAGE_URL=3D ac_unique_file=3D"crt0.S" ac_subst_vars=3D'LTLIBOBJS LIBOBJS +multi_basedir pcrt0 crt0 bsp_list @@ -668,6 +669,7 @@ target_makefile_frag' ac_user_opts=3D' enable_option_checking enable_dependency_tracking +enable_multilib ' ac_precious_vars=3D'build_alias host_alias @@ -1295,6 +1297,7 @@ Optional Features: do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build + --enable-multilib build many library versions (default) =20 Some influential environment variables: CCAS assembler compiler command (defaults to CC) @@ -2604,6 +2607,44 @@ target_makefile_frag_path=3D$target_makefile_frag =20 =20 =20 +# Default to --enable-multilib +# Check whether --enable-multilib was given. +if test "${enable_multilib+set}" =3D set; then : + enableval=3D$enable_multilib; case "$enableval" in + yes) multilib=3Dyes ;; + no) multilib=3Dno ;; + *) as_fn_error $? "bad value $enableval for multilib option" "$LINENO"= 5 ;; + esac +else + multilib=3Dyes +fi + + +# We may get other options which we leave undocumented: +# --with-target-subdir, --with-multisrctop, --with-multisubdir +# See config-ml.in if you want the gory details. + +if test "$srcdir" =3D "."; then + if test "$with_target_subdir" !=3D "."; then + multi_basedir=3D"$srcdir/$with_multisrctop../../.." + else + multi_basedir=3D"$srcdir/$with_multisrctop../.." + fi +else + multi_basedir=3D"$srcdir/../.." +fi + + +# Even if the default multilib is not a cross compilation, +# it may be that some of the other multilibs are. +if test $cross_compiling =3D no && test $multilib =3D yes \ + && test "x${with_multisubdir}" !=3D x ; then + cross_compiling=3Dmaybe +fi + +ac_config_commands=3D"$ac_config_commands default-1" + + ac_config_files=3D"$ac_config_files Makefile" =20 cat >confcache <<\_ACEOF @@ -3320,12 +3361,20 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=3D1 # INIT-COMMANDS # AMDEP_TRUE=3D"$AMDEP_TRUE" ac_aux_dir=3D"$ac_aux_dir" -srcdir=3D${srcdir} -target=3D${target} -with_multisubdir=3D${with_multisubdir} -ac_configure_args=3D"${ac_configure_args} --enable-multilib" -CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh} =20 +srcdir=3D"$srcdir" +host=3D"$host" +target=3D"$target" +with_multisubdir=3D"$with_multisubdir" +with_multisrctop=3D"$with_multisrctop" +with_target_subdir=3D"$with_target_subdir" +ac_configure_args=3D"${multilib_arg} ${ac_configure_args}" +multi_basedir=3D"$multi_basedir" +CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh} +CC=3D"$CC" +CXX=3D"$CXX" +GFORTRAN=3D"$GFORTRAN" +GCJ=3D"$GCJ" =20 _ACEOF =20 @@ -3336,6 +3385,7 @@ for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS=3D"$CONFIG_COMMANDS depfiles" ;; + "default-1") CONFIG_COMMANDS=3D"$CONFIG_COMMANDS default-1" ;; "Makefile") CONFIG_FILES=3D"$CONFIG_FILES Makefile" ;; =20 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; @@ -3892,7 +3942,14 @@ $as_echo X"$file" | done } ;; - "Makefile":F) . ${srcdir}/../../config-ml.in ;; + "default-1":C) +# Only add multilib support code if we just rebuilt the top-level +# Makefile. +case " $CONFIG_FILES " in + *" Makefile "*) + ac_file=3DMakefile . ${multi_basedir}/config-ml.in + ;; +esac ;; =20 esac done # for ac_tag diff --git a/libgloss/mips/configure.ac b/libgloss/mips/configure.ac index a609233a6..ca99c7287 100644 --- a/libgloss/mips/configure.ac +++ b/libgloss/mips/configure.ac @@ -97,12 +97,7 @@ AC_SUBST(bsp_list) AC_SUBST(crt0) AC_SUBST(pcrt0) =20 -AC_CONFIG_FILES(Makefile, -. ${srcdir}/../../config-ml.in, -srcdir=3D${srcdir} -target=3D${target} -with_multisubdir=3D${with_multisubdir} -ac_configure_args=3D"${ac_configure_args} --enable-multilib" -CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh} -) +AM_ENABLE_MULTILIB(, ../..) + +AC_CONFIG_FILES([Makefile]) AC_OUTPUT diff --git a/libgloss/mn10200/aclocal.m4 b/libgloss/mn10200/aclocal.m4 index 24271f381..fab8217a4 100644 --- a/libgloss/mn10200/aclocal.m4 +++ b/libgloss/mn10200/aclocal.m4 @@ -379,5 +379,6 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) =20 m4_include([../../config/depstand.m4]) m4_include([../../config/lead-dot.m4]) +m4_include([../../config/multi.m4]) m4_include([../../config/override.m4]) m4_include([../acinclude.m4]) diff --git a/libgloss/mn10200/configure b/libgloss/mn10200/configure index 728c774fe..401064ff3 100755 --- a/libgloss/mn10200/configure +++ b/libgloss/mn10200/configure @@ -584,6 +584,7 @@ PACKAGE_URL=3D ac_unique_file=3D"crt0.S" ac_subst_vars=3D'LTLIBOBJS LIBOBJS +multi_basedir part_specific_obj target_makefile_frag_path host_makefile_frag_path @@ -663,6 +664,7 @@ target_makefile_frag' ac_user_opts=3D' enable_option_checking enable_dependency_tracking +enable_multilib ' ac_precious_vars=3D'build_alias host_alias @@ -1290,6 +1292,7 @@ Optional Features: do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build + --enable-multilib build many library versions (default) =20 Some influential environment variables: CCAS assembler compiler command (defaults to CC) @@ -2554,6 +2557,44 @@ target_makefile_frag_path=3D$target_makefile_frag =20 =20 =20 +# Default to --enable-multilib +# Check whether --enable-multilib was given. +if test "${enable_multilib+set}" =3D set; then : + enableval=3D$enable_multilib; case "$enableval" in + yes) multilib=3Dyes ;; + no) multilib=3Dno ;; + *) as_fn_error $? "bad value $enableval for multilib option" "$LINENO"= 5 ;; + esac +else + multilib=3Dyes +fi + + +# We may get other options which we leave undocumented: +# --with-target-subdir, --with-multisrctop, --with-multisubdir +# See config-ml.in if you want the gory details. + +if test "$srcdir" =3D "."; then + if test "$with_target_subdir" !=3D "."; then + multi_basedir=3D"$srcdir/$with_multisrctop../../.." + else + multi_basedir=3D"$srcdir/$with_multisrctop../.." + fi +else + multi_basedir=3D"$srcdir/../.." +fi + + +# Even if the default multilib is not a cross compilation, +# it may be that some of the other multilibs are. +if test $cross_compiling =3D no && test $multilib =3D yes \ + && test "x${with_multisubdir}" !=3D x ; then + cross_compiling=3Dmaybe +fi + +ac_config_commands=3D"$ac_config_commands default-1" + + ac_config_files=3D"$ac_config_files Makefile" =20 cat >confcache <<\_ACEOF @@ -3270,12 +3311,20 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=3D1 # INIT-COMMANDS # AMDEP_TRUE=3D"$AMDEP_TRUE" ac_aux_dir=3D"$ac_aux_dir" -srcdir=3D${srcdir} -target=3D${target} -with_multisubdir=3D${with_multisubdir} -ac_configure_args=3D"${ac_configure_args} --enable-multilib" -CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh} =20 +srcdir=3D"$srcdir" +host=3D"$host" +target=3D"$target" +with_multisubdir=3D"$with_multisubdir" +with_multisrctop=3D"$with_multisrctop" +with_target_subdir=3D"$with_target_subdir" +ac_configure_args=3D"${multilib_arg} ${ac_configure_args}" +multi_basedir=3D"$multi_basedir" +CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh} +CC=3D"$CC" +CXX=3D"$CXX" +GFORTRAN=3D"$GFORTRAN" +GCJ=3D"$GCJ" =20 _ACEOF =20 @@ -3286,6 +3335,7 @@ for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS=3D"$CONFIG_COMMANDS depfiles" ;; + "default-1") CONFIG_COMMANDS=3D"$CONFIG_COMMANDS default-1" ;; "Makefile") CONFIG_FILES=3D"$CONFIG_FILES Makefile" ;; =20 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; @@ -3842,7 +3892,14 @@ $as_echo X"$file" | done } ;; - "Makefile":F) . ${srcdir}/../../config-ml.in ;; + "default-1":C) +# Only add multilib support code if we just rebuilt the top-level +# Makefile. +case " $CONFIG_FILES " in + *" Makefile "*) + ac_file=3DMakefile . ${multi_basedir}/config-ml.in + ;; +esac ;; =20 esac done # for ac_tag @@ -3881,5 +3938,3 @@ if test -n "$ac_unrecognized_opts" && test "$enable_o= ption_checking" !=3D no; then $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&= 2;} fi =20 - - diff --git a/libgloss/mn10200/configure.ac b/libgloss/mn10200/configure.ac index 70dbd49d9..d5a0cc87a 100644 --- a/libgloss/mn10200/configure.ac +++ b/libgloss/mn10200/configure.ac @@ -52,14 +52,7 @@ AC_SUBST(target_makefile_frag_path) AC_SUBST_FILE(target_makefile_frag) AC_SUBST(part_specific_obj) =20 -AC_CONFIG_FILES(Makefile, -. ${srcdir}/../../config-ml.in, -srcdir=3D${srcdir} -target=3D${target} -with_multisubdir=3D${with_multisubdir} -ac_configure_args=3D"${ac_configure_args} --enable-multilib" -CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh} -) -AC_OUTPUT - +AM_ENABLE_MULTILIB(, ../..) =20 +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT diff --git a/libgloss/mn10300/aclocal.m4 b/libgloss/mn10300/aclocal.m4 index 24271f381..fab8217a4 100644 --- a/libgloss/mn10300/aclocal.m4 +++ b/libgloss/mn10300/aclocal.m4 @@ -379,5 +379,6 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) =20 m4_include([../../config/depstand.m4]) m4_include([../../config/lead-dot.m4]) +m4_include([../../config/multi.m4]) m4_include([../../config/override.m4]) m4_include([../acinclude.m4]) diff --git a/libgloss/mn10300/configure b/libgloss/mn10300/configure index 971885587..4ddb539fa 100755 --- a/libgloss/mn10300/configure +++ b/libgloss/mn10300/configure @@ -584,6 +584,7 @@ PACKAGE_URL=3D ac_unique_file=3D"crt0.S" ac_subst_vars=3D'LTLIBOBJS LIBOBJS +multi_basedir bsp_list script_list part_specific_obj @@ -665,6 +666,7 @@ target_makefile_frag' ac_user_opts=3D' enable_option_checking enable_dependency_tracking +enable_multilib ' ac_precious_vars=3D'build_alias host_alias @@ -1292,6 +1294,7 @@ Optional Features: do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build + --enable-multilib build many library versions (default) =20 Some influential environment variables: CCAS assembler compiler command (defaults to CC) @@ -2565,6 +2568,44 @@ target_makefile_frag_path=3D$target_makefile_frag =20 =20 =20 +# Default to --enable-multilib +# Check whether --enable-multilib was given. +if test "${enable_multilib+set}" =3D set; then : + enableval=3D$enable_multilib; case "$enableval" in + yes) multilib=3Dyes ;; + no) multilib=3Dno ;; + *) as_fn_error $? "bad value $enableval for multilib option" "$LINENO"= 5 ;; + esac +else + multilib=3Dyes +fi + + +# We may get other options which we leave undocumented: +# --with-target-subdir, --with-multisrctop, --with-multisubdir +# See config-ml.in if you want the gory details. + +if test "$srcdir" =3D "."; then + if test "$with_target_subdir" !=3D "."; then + multi_basedir=3D"$srcdir/$with_multisrctop../../.." + else + multi_basedir=3D"$srcdir/$with_multisrctop../.." + fi +else + multi_basedir=3D"$srcdir/../.." +fi + + +# Even if the default multilib is not a cross compilation, +# it may be that some of the other multilibs are. +if test $cross_compiling =3D no && test $multilib =3D yes \ + && test "x${with_multisubdir}" !=3D x ; then + cross_compiling=3Dmaybe +fi + +ac_config_commands=3D"$ac_config_commands default-1" + + ac_config_files=3D"$ac_config_files Makefile" =20 cat >confcache <<\_ACEOF @@ -3281,12 +3322,20 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=3D1 # INIT-COMMANDS # AMDEP_TRUE=3D"$AMDEP_TRUE" ac_aux_dir=3D"$ac_aux_dir" -srcdir=3D${srcdir} -target=3D${target} -with_multisubdir=3D${with_multisubdir} -ac_configure_args=3D"${ac_configure_args} --enable-multilib" -CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh} =20 +srcdir=3D"$srcdir" +host=3D"$host" +target=3D"$target" +with_multisubdir=3D"$with_multisubdir" +with_multisrctop=3D"$with_multisrctop" +with_target_subdir=3D"$with_target_subdir" +ac_configure_args=3D"${multilib_arg} ${ac_configure_args}" +multi_basedir=3D"$multi_basedir" +CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh} +CC=3D"$CC" +CXX=3D"$CXX" +GFORTRAN=3D"$GFORTRAN" +GCJ=3D"$GCJ" =20 _ACEOF =20 @@ -3297,6 +3346,7 @@ for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS=3D"$CONFIG_COMMANDS depfiles" ;; + "default-1") CONFIG_COMMANDS=3D"$CONFIG_COMMANDS default-1" ;; "Makefile") CONFIG_FILES=3D"$CONFIG_FILES Makefile" ;; =20 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; @@ -3853,10 +3903,14 @@ $as_echo X"$file" | done } ;; - "Makefile":F) if test -n "$CONFIG_FILES"; then - unset ac_file - . ${srcdir}/../../config-ml.in -fi ;; + "default-1":C) +# Only add multilib support code if we just rebuilt the top-level +# Makefile. +case " $CONFIG_FILES " in + *" Makefile "*) + ac_file=3DMakefile . ${multi_basedir}/config-ml.in + ;; +esac ;; =20 esac done # for ac_tag @@ -3895,5 +3949,3 @@ if test -n "$ac_unrecognized_opts" && test "$enable_o= ption_checking" !=3D no; then $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&= 2;} fi =20 - - diff --git a/libgloss/mn10300/configure.ac b/libgloss/mn10300/configure.ac index 9526576b0..88af0f948 100644 --- a/libgloss/mn10300/configure.ac +++ b/libgloss/mn10300/configure.ac @@ -61,17 +61,7 @@ AC_SUBST(part_specific_obj) AC_SUBST(script_list) AC_SUBST(bsp_list) =20 -AC_CONFIG_FILES([Makefile], -[if test -n "$CONFIG_FILES"; then - unset ac_file - . ${srcdir}/../../config-ml.in -fi], -srcdir=3D${srcdir} -target=3D${target} -with_multisubdir=3D${with_multisubdir} -ac_configure_args=3D"${ac_configure_args} --enable-multilib" -CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh} -) -AC_OUTPUT - +AM_ENABLE_MULTILIB(, ../..) =20 +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT diff --git a/libgloss/moxie/aclocal.m4 b/libgloss/moxie/aclocal.m4 index 24271f381..fab8217a4 100644 --- a/libgloss/moxie/aclocal.m4 +++ b/libgloss/moxie/aclocal.m4 @@ -379,5 +379,6 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) =20 m4_include([../../config/depstand.m4]) m4_include([../../config/lead-dot.m4]) +m4_include([../../config/multi.m4]) m4_include([../../config/override.m4]) m4_include([../acinclude.m4]) diff --git a/libgloss/moxie/configure b/libgloss/moxie/configure index db77f070a..5ce3f34a5 100755 --- a/libgloss/moxie/configure +++ b/libgloss/moxie/configure @@ -584,6 +584,7 @@ PACKAGE_URL=3D ac_unique_file=3D"crt0.S" ac_subst_vars=3D'LTLIBOBJS LIBOBJS +multi_basedir host_makefile_frag_path BUILD_CRT0_FALSE BUILD_CRT0_TRUE @@ -662,6 +663,7 @@ ac_subst_files=3D'host_makefile_frag' ac_user_opts=3D' enable_option_checking enable_dependency_tracking +enable_multilib ' ac_precious_vars=3D'build_alias host_alias @@ -1289,6 +1291,7 @@ Optional Features: do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build + --enable-multilib build many library versions (default) =20 Some influential environment variables: CCAS assembler compiler command (defaults to CC) @@ -2557,6 +2560,44 @@ host_makefile_frag_path=3D$host_makefile_frag =20 =20 =20 +# Default to --enable-multilib +# Check whether --enable-multilib was given. +if test "${enable_multilib+set}" =3D set; then : + enableval=3D$enable_multilib; case "$enableval" in + yes) multilib=3Dyes ;; + no) multilib=3Dno ;; + *) as_fn_error $? "bad value $enableval for multilib option" "$LINENO"= 5 ;; + esac +else + multilib=3Dyes +fi + + +# We may get other options which we leave undocumented: +# --with-target-subdir, --with-multisrctop, --with-multisubdir +# See config-ml.in if you want the gory details. + +if test "$srcdir" =3D "."; then + if test "$with_target_subdir" !=3D "."; then + multi_basedir=3D"$srcdir/$with_multisrctop../../.." + else + multi_basedir=3D"$srcdir/$with_multisrctop../.." + fi +else + multi_basedir=3D"$srcdir/../.." +fi + + +# Even if the default multilib is not a cross compilation, +# it may be that some of the other multilibs are. +if test $cross_compiling =3D no && test $multilib =3D yes \ + && test "x${with_multisubdir}" !=3D x ; then + cross_compiling=3Dmaybe +fi + +ac_config_commands=3D"$ac_config_commands default-1" + + ac_config_files=3D"$ac_config_files Makefile" =20 cat >confcache <<\_ACEOF @@ -3273,12 +3314,20 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=3D1 # INIT-COMMANDS # AMDEP_TRUE=3D"$AMDEP_TRUE" ac_aux_dir=3D"$ac_aux_dir" -srcdir=3D${srcdir} -target=3D${target} -with_multisubdir=3D${with_multisubdir} -ac_configure_args=3D"${ac_configure_args} --enable-multilib" -CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh} =20 +srcdir=3D"$srcdir" +host=3D"$host" +target=3D"$target" +with_multisubdir=3D"$with_multisubdir" +with_multisrctop=3D"$with_multisrctop" +with_target_subdir=3D"$with_target_subdir" +ac_configure_args=3D"${multilib_arg} ${ac_configure_args}" +multi_basedir=3D"$multi_basedir" +CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh} +CC=3D"$CC" +CXX=3D"$CXX" +GFORTRAN=3D"$GFORTRAN" +GCJ=3D"$GCJ" =20 _ACEOF =20 @@ -3289,6 +3338,7 @@ for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS=3D"$CONFIG_COMMANDS depfiles" ;; + "default-1") CONFIG_COMMANDS=3D"$CONFIG_COMMANDS default-1" ;; "Makefile") CONFIG_FILES=3D"$CONFIG_FILES Makefile" ;; =20 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; @@ -3845,7 +3895,14 @@ $as_echo X"$file" | done } ;; - "Makefile":F) . ${srcdir}/../../config-ml.in ;; + "default-1":C) +# Only add multilib support code if we just rebuilt the top-level +# Makefile. +case " $CONFIG_FILES " in + *" Makefile "*) + ac_file=3DMakefile . ${multi_basedir}/config-ml.in + ;; +esac ;; =20 esac done # for ac_tag diff --git a/libgloss/moxie/configure.ac b/libgloss/moxie/configure.ac index baf66ef49..f09d72b77 100644 --- a/libgloss/moxie/configure.ac +++ b/libgloss/moxie/configure.ac @@ -44,12 +44,7 @@ host_makefile_frag_path=3D$host_makefile_frag AC_SUBST(host_makefile_frag_path) AC_SUBST_FILE(host_makefile_frag) =20 -AC_CONFIG_FILES(Makefile, -. ${srcdir}/../../config-ml.in, -srcdir=3D${srcdir} -target=3D${target} -with_multisubdir=3D${with_multisubdir} -ac_configure_args=3D"${ac_configure_args} --enable-multilib" -CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh} -) +AM_ENABLE_MULTILIB(, ../..) + +AC_CONFIG_FILES([Makefile]) AC_OUTPUT diff --git a/libgloss/sparc/aclocal.m4 b/libgloss/sparc/aclocal.m4 index 24271f381..fab8217a4 100644 --- a/libgloss/sparc/aclocal.m4 +++ b/libgloss/sparc/aclocal.m4 @@ -379,5 +379,6 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) =20 m4_include([../../config/depstand.m4]) m4_include([../../config/lead-dot.m4]) +m4_include([../../config/multi.m4]) m4_include([../../config/override.m4]) m4_include([../acinclude.m4]) diff --git a/libgloss/sparc/configure b/libgloss/sparc/configure index d4da11635..1a1e6a01a 100755 --- a/libgloss/sparc/configure +++ b/libgloss/sparc/configure @@ -585,6 +585,7 @@ ac_unique_file=3D"sparc-stub.c" enable_option_checking=3Dno ac_subst_vars=3D'LTLIBOBJS LIBOBJS +multi_basedir CYGMONLDSCRIPTTEMPL target_makefile_frag_path host_makefile_frag_path @@ -666,6 +667,7 @@ target_makefile_frag' ac_user_opts=3D' enable_option_checking enable_dependency_tracking +enable_multilib ' ac_precious_vars=3D'build_alias host_alias @@ -1288,6 +1290,7 @@ Optional Features: do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build + --enable-multilib build many library versions (default) =20 Some influential environment variables: CCAS assembler compiler command (defaults to CC) @@ -2554,9 +2557,45 @@ target_makefile_frag_path=3D$target_makefile_frag =20 =20 =20 -ac_config_files=3D"$ac_config_files Makefile" +# Default to --enable-multilib +# Check whether --enable-multilib was given. +if test "${enable_multilib+set}" =3D set; then : + enableval=3D$enable_multilib; case "$enableval" in + yes) multilib=3Dyes ;; + no) multilib=3Dno ;; + *) as_fn_error $? "bad value $enableval for multilib option" "$LINENO"= 5 ;; + esac +else + multilib=3Dyes +fi + + +# We may get other options which we leave undocumented: +# --with-target-subdir, --with-multisrctop, --with-multisubdir +# See config-ml.in if you want the gory details. + +if test "$srcdir" =3D "."; then + if test "$with_target_subdir" !=3D "."; then + multi_basedir=3D"$srcdir/$with_multisrctop../../.." + else + multi_basedir=3D"$srcdir/$with_multisrctop../.." + fi +else + multi_basedir=3D"$srcdir/../.." +fi =20 -ac_config_commands=3D"$ac_config_commands default" + +# Even if the default multilib is not a cross compilation, +# it may be that some of the other multilibs are. +if test $cross_compiling =3D no && test $multilib =3D yes \ + && test "x${with_multisubdir}" !=3D x ; then + cross_compiling=3Dmaybe +fi + +ac_config_commands=3D"$ac_config_commands default-1" + + +ac_config_files=3D"$ac_config_files Makefile" =20 cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -3272,12 +3311,20 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=3D1 # INIT-COMMANDS # AMDEP_TRUE=3D"$AMDEP_TRUE" ac_aux_dir=3D"$ac_aux_dir" -srcdir=3D${srcdir} -target=3D${target} -with_multisubdir=3D${with_multisubdir} -ac_configure_args=3D"${ac_configure_args} --enable-multilib" -CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh} =20 +srcdir=3D"$srcdir" +host=3D"$host" +target=3D"$target" +with_multisubdir=3D"$with_multisubdir" +with_multisrctop=3D"$with_multisrctop" +with_target_subdir=3D"$with_target_subdir" +ac_configure_args=3D"${multilib_arg} ${ac_configure_args}" +multi_basedir=3D"$multi_basedir" +CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh} +CC=3D"$CC" +CXX=3D"$CXX" +GFORTRAN=3D"$GFORTRAN" +GCJ=3D"$GCJ" =20 _ACEOF =20 @@ -3288,8 +3335,8 @@ for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS=3D"$CONFIG_COMMANDS depfiles" ;; + "default-1") CONFIG_COMMANDS=3D"$CONFIG_COMMANDS default-1" ;; "Makefile") CONFIG_FILES=3D"$CONFIG_FILES Makefile" ;; - "default") CONFIG_COMMANDS=3D"$CONFIG_COMMANDS default" ;; =20 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac @@ -3845,7 +3892,14 @@ $as_echo X"$file" | done } ;; - "default":C) . ${srcdir}/../../config-ml.in ;; + "default-1":C) +# Only add multilib support code if we just rebuilt the top-level +# Makefile. +case " $CONFIG_FILES " in + *" Makefile "*) + ac_file=3DMakefile . ${multi_basedir}/config-ml.in + ;; +esac ;; =20 esac done # for ac_tag @@ -4029,4 +4083,3 @@ if test -n "$ac_unrecognized_opts" && test "$enable_o= ption_checking" !=3D no; then $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&= 2;} fi =20 - diff --git a/libgloss/sparc/configure.ac b/libgloss/sparc/configure.ac index 9a9b987da..56049d5b9 100644 --- a/libgloss/sparc/configure.ac +++ b/libgloss/sparc/configure.ac @@ -58,12 +58,7 @@ AC_SUBST(target_makefile_frag_path) AC_SUBST_FILE(target_makefile_frag) AC_SUBST(CYGMONLDSCRIPTTEMPL) =20 -AC_OUTPUT(Makefile, -. ${srcdir}/../../config-ml.in, -srcdir=3D${srcdir} -target=3D${target} -with_multisubdir=3D${with_multisubdir} -ac_configure_args=3D"${ac_configure_args} --enable-multilib" -CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh} -) +AM_ENABLE_MULTILIB(, ../..) =20 +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT