source: trunk/essentials/sys-devel/automake-1.8/m4/multi.m4

Last change on this file was 3118, checked in by bird, 18 years ago

automake 1.8.5

File size: 2.2 KB
Line 
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.
24AC_DEFUN([AM_ENABLE_MULTILIB],
25[# Default to --enable-multilib
26AC_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
39if 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
45else
46 multi_basedir="$srcdir/$2"
47fi
48AC_SUBST(multi_basedir)
49
50AC_OUTPUT_COMMANDS([
51# Only add multilib support code if we just rebuilt the top-level
52# Makefile.
53case " $CONFIG_FILES " in
54 *" ]m4_default([$1],Makefile)[ "*)
55 ac_file=]m4_default([$1],Makefile)[ . ${multi_basedir}/config-ml.in
56 ;;
57esac],
58 [
59srcdir="$srcdir"
60host="$host"
61target="$target"
62with_multisubdir="$with_multisubdir"
63with_multisrctop="$with_multisrctop"
64with_target_subdir="$with_target_subdir"
65ac_configure_args="${multilib_arg} ${ac_configure_args}"
66multi_basedir="$multi_basedir"
67CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
68CC="$CC"])])dnl
Note: See TracBrowser for help on using the repository browser.