diff --git a/libgloss/arm/configure b/libgloss/arm/configure index 8e3866b56..84878afff 100755 --- a/libgloss/arm/configure +++ b/libgloss/arm/configure @@ -3926,6 +3926,8 @@ $as_echo X"$file" | done } ;; + "cpu-init/Makefile":F) ac_file=cpu-init/Makefile . ${srcdir}/../../config-ml.in + ;; "default-1":C) # Only add multilib support code if we just rebuilt the top-level # Makefile. diff --git a/libgloss/arm/configure.ac b/libgloss/arm/configure.ac index 2b98b5453..3d7ba7da1 100644 --- a/libgloss/arm/configure.ac +++ b/libgloss/arm/configure.ac @@ -62,7 +62,9 @@ AC_SUBST_FILE(host_makefile_frag) # Configure cpu init plug-ins if test -d "${srcdir}/cpu-init"; then subdirs="${subdirs} cpu-init" - AC_CONFIG_FILES([cpu-init/Makefile]) + AC_CONFIG_FILES([cpu-init/Makefile], [dnl + ac_file=cpu-init/Makefile . ${srcdir}/../../config-ml.in + ]) AC_SUBST(subdirs) fi diff --git a/libgloss/configure b/libgloss/configure index 3fc20d6a2..64f08cf16 100755 --- a/libgloss/configure +++ b/libgloss/configure @@ -4794,6 +4794,9 @@ target_makefile_frag_path=$target_makefile_frag +ac_config_commands="$ac_config_commands default-1" + + # Default to --enable-multilib # Check whether --enable-multilib was given. if test "${enable_multilib+set}" = set; then : @@ -4829,7 +4832,7 @@ if test $cross_compiling = no && test $multilib = yes \ cross_compiling=maybe fi -ac_config_commands="$ac_config_commands default-1" +ac_config_commands="$ac_config_commands default-2" ac_config_files="$ac_config_files Makefile" @@ -5554,6 +5557,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" +subdirs="$subdirs" srcdir="$srcdir" host="$host" @@ -5618,6 +5622,7 @@ do "libnosys/Makefile") CONFIG_FILES="$CONFIG_FILES libnosys/Makefile" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; + "default-2") CONFIG_COMMANDS="$CONFIG_COMMANDS default-2" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; @@ -6347,6 +6352,14 @@ $as_echo X"$file" | } ;; "default-1":C) +for subdir in $subdirs; do + case " $CONFIG_FILES " in + *" $subdir/Makefile "*) + ac_file=$subdir/Makefile . ${multi_basedir}/config-ml.in + ;; + esac +done ;; + "default-2":C) # Only add multilib support code if we just rebuilt the top-level # Makefile. case " $CONFIG_FILES " in diff --git a/libgloss/configure.ac b/libgloss/configure.ac index ac812c69b..1fa877729 100644 --- a/libgloss/configure.ac +++ b/libgloss/configure.ac @@ -330,6 +330,19 @@ target_makefile_frag_path=$target_makefile_frag AC_SUBST(target_makefile_frag_path) AC_SUBST_FILE(target_makefile_frag) +dnl AM_ENABLE_MULTILIB only processes the top-level Makefile, but we want the +dnl multilib settings to propagate to all sub-Makefiles that we recurse into +dnl too. This can go away if we ever get rid of sub-Makefiles and only use +dnl Automake + makefile include fragments. +AC_OUTPUT_COMMANDS([ +for subdir in $subdirs; do + case " $CONFIG_FILES " in + *" $subdir/Makefile "*) + ac_file=$subdir/Makefile . ${multi_basedir}/config-ml.in + ;; + esac +done], [subdirs="$subdirs"]) + AM_ENABLE_MULTILIB(, ..) AC_CONFIG_FILES([Makefile])