1 | # Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004
|
---|
2 | # Free Software Foundation, Inc.
|
---|
3 |
|
---|
4 | # This program is free software; you can redistribute it and/or modify
|
---|
5 | # it under the terms of the GNU General Public License as published by
|
---|
6 | # the Free Software Foundation; either version 2, or (at your option)
|
---|
7 | # any later version.
|
---|
8 |
|
---|
9 | # This program is distributed in the hope that it will be useful,
|
---|
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
12 | # GNU General Public License for more details.
|
---|
13 |
|
---|
14 | # You should have received a copy of the GNU General Public License
|
---|
15 | # along with this program; if not, write to the Free Software
|
---|
16 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
---|
17 | # 02111-1307, USA.
|
---|
18 |
|
---|
19 | # serial 4
|
---|
20 |
|
---|
21 | # AM_ENABLE_MULTILIB([MAKEFILE], [REL-TO-TOP-SRCDIR])
|
---|
22 | # ---------------------------------------------------
|
---|
23 | # Add --enable-multilib to configure.
|
---|
24 | AC_DEFUN([AM_ENABLE_MULTILIB],
|
---|
25 | [# Default to --enable-multilib
|
---|
26 | AC_ARG_ENABLE(multilib,
|
---|
27 | [ --enable-multilib build many library versions (default)],
|
---|
28 | [case "$enableval" in
|
---|
29 | yes) multilib=yes ;;
|
---|
30 | no) multilib=no ;;
|
---|
31 | *) AC_MSG_ERROR([bad value $enableval for multilib option]) ;;
|
---|
32 | esac],
|
---|
33 | [multilib=yes])
|
---|
34 |
|
---|
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.
|
---|
38 |
|
---|
39 | if test "$srcdir" = "."; then
|
---|
40 | if test "$with_target_subdir" != "."; then
|
---|
41 | multi_basedir="$srcdir/$with_multisrctop../$2"
|
---|
42 | else
|
---|
43 | multi_basedir="$srcdir/$with_multisrctop$2"
|
---|
44 | fi
|
---|
45 | else
|
---|
46 | multi_basedir="$srcdir/$2"
|
---|
47 | fi
|
---|
48 | AC_SUBST(multi_basedir)
|
---|
49 |
|
---|
50 | AC_OUTPUT_COMMANDS([
|
---|
51 | # Only add multilib support code if we just rebuilt the top-level
|
---|
52 | # Makefile.
|
---|
53 | case " $CONFIG_FILES " in
|
---|
54 | *" ]m4_default([$1],Makefile)[ "*)
|
---|
55 | ac_file=]m4_default([$1],Makefile)[ . ${multi_basedir}/config-ml.in
|
---|
56 | ;;
|
---|
57 | esac],
|
---|
58 | [
|
---|
59 | srcdir="$srcdir"
|
---|
60 | host="$host"
|
---|
61 | target="$target"
|
---|
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}
|
---|
68 | CC="$CC"])])dnl
|
---|