1 # Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2, or (at your option)
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
20 # AM_ENABLE_MULTILIB([MAKEFILE], [REL-TO-TOP-SRCDIR])
21 # ---------------------------------------------------
22 # Add --enable-multilib to configure.
23 AC_DEFUN([AM_ENABLE_MULTILIB],
24 [# Default to --enable-multilib
25 AC_ARG_ENABLE(multilib,
26 [ --enable-multilib build many library versions (default)],
30 *) AC_MSG_ERROR([bad value $enableval for multilib option]) ;;
34 # We may get other options which we leave undocumented:
35 # --with-target-subdir, --with-multisrctop, --with-multisubdir
36 # See config-ml.in if you want the gory details.
38 if test "$srcdir" = "."; then
39 if test "$with_target_subdir" != "."; then
40 multi_basedir="$srcdir/$with_multisrctop../$2"
42 multi_basedir="$srcdir/$with_multisrctop$2"
45 multi_basedir="$srcdir/$2"
47 AC_SUBST(multi_basedir)
50 # Only add multilib support code if we just rebuilt the top-level
52 case " $CONFIG_FILES " in
53 *" ]m4_default([$1],Makefile)[ "*)
54 ac_file=]m4_default([$1],Makefile)[ . ${multi_basedir}/config-ml.in
61 with_multisubdir="$with_multisubdir"
62 with_multisrctop="$with_multisrctop"
63 with_target_subdir="$with_target_subdir"
64 ac_configure_args="${multilib_arg} ${ac_configure_args}"
65 multi_basedir="$multi_basedir"
66 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}