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