* configure.ac: Non-default multilibs can be cross compilations.
[deliverable/binutils-gdb.git] / libiberty / configure.ac
index fe4633f86973d39dce6ff4d51819273053e7ca5e..cdc3cd38f62093df3c291c73d04671657623c334 100644 (file)
@@ -109,6 +109,25 @@ dnl to call AC_CHECK_PROG.
 AC_CHECK_TOOL(AR, ar)
 AC_CHECK_TOOL(RANLIB, ranlib, :)
 
+dnl When switching to automake, replace the following with AM_ENABLE_MULTILIB.
+# Add --enable-multilib to configure.
+# Default to --enable-multilib
+AC_ARG_ENABLE(multilib,
+[  --enable-multilib       build many library versions (default)],
+[case "$enableval" in
+  yes) multilib=yes ;;
+  no)  multilib=no ;;
+  *)   AC_MSG_ERROR([bad value $enableval for multilib option]) ;;
+ esac],
+             [multilib=yes])
+
+# Even if the default multilib is not a cross compilation,
+# it may be that some of the other multilibs are.
+if test $cross_compiling = no && test $multilib = yes \
+   && test "x${with_multisubdir}" != x ; then
+   cross_compiling=maybe
+fi
+
 GCC_NO_EXECUTABLES
 AC_PROG_CC
 AC_PROG_CPP_WERROR
This page took 0.023438 seconds and 4 git commands to generate.