~ubuntu-branches/ubuntu/hoary/binutils/hoary

« back to all changes in this revision

Viewing changes to demangler/configure.in

  • Committer: Bazaar Package Importer
  • Author(s): James Troup
  • Date: 2004-05-19 10:35:44 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040519103544-17h3o6e8pwndydrg
Tags: 2.14.90.0.7-8
debian/rules: don't use gcc-2.95 on m68k.  Thanks to Adam Conrad for
pointing this out.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
dnl Process this with autoconf to create configure
 
2
AC_INIT(lib/demangle.cc)
 
3
 
 
4
# This works around the fact that libtool configuration may change LD
 
5
# for this particular configuration, but some shells, instead of
 
6
# keeping the changes in LD private, export them just because LD is
 
7
# exported.
 
8
ORIGINAL_LD_FOR_MULTILIBS=$LD
 
9
 
 
10
dnl We use these options to decide which functions to include.
 
11
AC_ARG_WITH(target-subdir,
 
12
[  --with-target-subdir=SUBDIR      Configuring in a subdirectory for target])
 
13
AC_ARG_WITH(cross-host,
 
14
[  --with-cross-host=HOST           Configuring with a cross compiler])
 
15
 
 
16
dnl Default to --enable-multilib
 
17
AC_ARG_ENABLE(multilib,
 
18
[  --enable-multilib       build many library versions (default)],
 
19
[case "${enableval}" in
 
20
  yes) multilib=yes ;;
 
21
  no)  multilib=no ;;
 
22
  *)   AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
 
23
 esac], [multilib=yes])dnl
 
24
 
 
25
dnl We may get other options which we don't document:
 
26
dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
 
27
 
 
28
if test -n "${with_target_subdir}" && test "${srcdir}" = "."; then
 
29
  if test "${with_target_subdir}" != "."; then
 
30
    libdemangler_basedir="${with_multisrctop}../"
 
31
  else
 
32
    libdemangler_basedir="${with_multisrctop}"
 
33
  fi
 
34
else
 
35
  libdemangler_basedir=
 
36
fi
 
37
AC_SUBST(libdemangler_basedir)
 
38
 
 
39
AC_CANONICAL_HOST
 
40
 
 
41
AC_PROG_CC
 
42
libdemangler_AC_PROG_CXX
 
43
AM_PROG_LIBTOOL
 
44
 
 
45
AM_INIT_AUTOMAKE(demangler,1.0,no-define)
 
46
 
 
47
AC_EXEEXT
 
48
AM_MAINTAINER_MODE
 
49
 
 
50
libdemangler_AC_NEW_DEMANGLER
 
51
if test -d ${srcdir}/${libdemangler_basedir}../libiberty; then
 
52
  SUBDIRS=.
 
53
  if test $libdemangler_cv_new_demangler = yes; then
 
54
    libiberty_target=new_demangler
 
55
  else
 
56
    libiberty_target=old_demangler
 
57
  fi
 
58
else
 
59
  SUBDIRS=lib
 
60
  libiberty_target=dummy_demangler
 
61
  if test $libdemangler_cv_new_demangler != yes; then
 
62
    AC_MSG_ERROR([
 
63
*** C++ compiler is unable to compile a working demangler!])
 
64
  fi
 
65
fi
 
66
AC_SUBST(libiberty_target)
 
67
AC_SUBST(SUBDIRS)
 
68
 
 
69
if test -n "$with_cross_host" &&
 
70
   test x"$with_cross_host" != x"no"; then
 
71
  toolexecdir='$(exec_prefix)/$(target_alias)'
 
72
  toolexeclibdir='$(toolexecdir)/lib'
 
73
else
 
74
  toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
 
75
  toolexeclibdir='$(libdir)'
 
76
fi
 
77
multi_os_directory=`$CC -print-multi-os-directory 2> /dev/null`
 
78
if test $? = 0; then
 
79
  case $multi_os_directory in
 
80
    .) ;; # Avoid trailing /.
 
81
    *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
 
82
  esac
 
83
fi
 
84
AC_SUBST(toolexecdir)
 
85
AC_SUBST(toolexeclibdir)
 
86
 
 
87
if test "${multilib}" = "yes"; then
 
88
  multilib_arg="--enable-multilib"
 
89
else
 
90
  multilib_arg=
 
91
fi
 
92
 
 
93
AC_OUTPUT(Makefile lib/Makefile,
 
94
[
 
95
if test -n "$CONFIG_FILES"; then
 
96
  if test -n "${with_target_subdir}"; then
 
97
    LD="${ORIGINAL_LD_FOR_MULTILIBS}"
 
98
    ac_file=Makefile . ${srcdir}/${libdemangler_basedir}../config-ml.in
 
99
  fi
 
100
fi
 
101
],
 
102
srcdir=${srcdir}
 
103
host=${host}
 
104
target=${target}
 
105
with_target_subdir=${with_target_subdir}
 
106
with_multisubdir=${with_multisubdir}
 
107
ac_configure_args="${multilib_arg} ${ac_configure_args}"
 
108
CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
 
109
libdemangler_basedir=${libdemangler_basedir}
 
110
CC="${CC}"
 
111
DEFS="$DEFS"
 
112
ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}"
 
113
)