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

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

automake 1.7.9

File size: 2.2 KB
Line 
1# Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
2
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)
6# any later version.
7
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.
12
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
16# 02111-1307, USA.
17
18# serial 3
19
20# AM_ENABLE_MULTILIB([MAKEFILE], [REL-TO-TOP-SRCDIR])
21# ---------------------------------------------------
22# Add --enable-multilib to configure.
23AC_DEFUN([AM_ENABLE_MULTILIB],
24[# Default to --enable-multilib
25AC_ARG_ENABLE(multilib,
26[ --enable-multilib build many library versions (default)],
27[case "$enableval" in
28 yes) multilib=yes ;;
29 no) multilib=no ;;
30 *) AC_MSG_ERROR([bad value $enableval for multilib option]) ;;
31 esac],
32 [multilib=yes])
33
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.
37
38if test "$srcdir" = "."; then
39 if test "$with_target_subdir" != "."; then
40 multi_basedir="$srcdir/$with_multisrctop../$2"
41 else
42 multi_basedir="$srcdir/$with_multisrctop$2"
43 fi
44else
45 multi_basedir="$srcdir/$2"
46fi
47AC_SUBST(multi_basedir)
48
49AC_OUTPUT_COMMANDS([
50# Only add multilib support code if we just rebuilt the top-level
51# Makefile.
52case " $CONFIG_FILES " in
53 *" ]m4_default([$1],Makefile)[ "*)
54 ac_file=]m4_default([$1],Makefile)[ . ${multi_basedir}/config-ml.in
55 ;;
56esac],
57 [
58srcdir="$srcdir"
59host="$host"
60target="$target"
61with_multisubdir="$with_multisubdir"
62with_multisrctop="$with_multisrctop"
63with_target_subdir="$with_target_subdir"
64ac_configure_args="${multilib_arg} ${ac_configure_args}"
65multi_basedir="$multi_basedir"
66CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
67CC="$CC"])])dnl
Note: See TracBrowser for help on using the repository browser.