]> git.ipfire.org Git - thirdparty/gcc.git/blame - libvtv/configure.ac
Fix logging to not use /tmp or the current directory...
[thirdparty/gcc.git] / libvtv / configure.ac
CommitLineData
2077db1b
CT
1# -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4AC_PREREQ([2.64])
5AC_INIT([GNU Vtable Verification Runtime Library], 1.0,,[libvtv])
6#AC_INIT(package-unused, version-unused, libvtv)
7AC_CONFIG_SRCDIR([vtv_rts.h])
8
9# -------
10# Options
11# -------
12AC_MSG_CHECKING([for --enable-version-specific-runtime-libs])
13AC_ARG_ENABLE(version-specific-runtime-libs,
14[ --enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory ],
15[case "$enableval" in
16 yes) version_specific_libs=yes ;;
17 no) version_specific_libs=no ;;
18 *) AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);;
19 esac],
20[version_specific_libs=no])
21AC_MSG_RESULT($version_specific_libs)
22
0c6cb2d1
BK
23# Use same top-level configure hooks in libgcc/libstdc++/libvtv.
24AC_MSG_CHECKING([for --enable-vtable-verify])
25AC_ARG_ENABLE(vtable-verify,
26[ --enable-vtable-verify Enable vtable verification feature ],
27[case "$enableval" in
28 yes) enable_vtable_verify=yes ;;
29 no) enable_vtable_verify=no ;;
30 *) enable_vtable_verify=no;;
31 esac],
32[enable_vtable_verify=no])
33AC_MSG_RESULT($enable_vtable_verify)
34
35# See if supported.
36unset VTV_SUPPORTED
37AC_MSG_CHECKING([for host support for vtable verification])
38. ${srcdir}/configure.tgt
39AC_MSG_RESULT($VTV_SUPPORTED)
40
41# Decide if it's usable.
42use_vtable_verify=no
43if test "x$VTV_SUPPORTED" = "xyes"; then
44 if test "x$enable_vtable_verify" = "xyes"; then
45 use_vtable_verify=yes
46 AC_MSG_NOTICE(using vtable verification)
47 fi
48fi
49AM_CONDITIONAL(ENABLE_VTABLE_VERIFY, test $use_vtable_verify = yes)
50
2077db1b
CT
51# Do not delete or change the following two lines. For why, see
52# http://gcc.gnu.org/ml/libstdc++/2003-07/msg00451.html
53AC_CANONICAL_SYSTEM
54target_alias=${target_alias-$host_alias}
55AC_SUBST(target_alias)
56GCC_LIBSTDCXX_RAW_CXX_FLAGS
57
58AM_INIT_AUTOMAKE(foreign no-dist)
59AM_ENABLE_MULTILIB(, ..)
60AM_MAINTAINER_MODE
61
0c6cb2d1
BK
62LIBVTV_CONFIGURE
63
2077db1b
CT
64# Calculate toolexeclibdir
65# Also toolexecdir, though it's only used in toolexeclibdir
66case ${version_specific_libs} in
67 yes)
68 # Need the gcc compiler version to know where to install libraries
69 # and header files if --enable-version-specific-runtime-libs option
70 # is selected.
71 toolexecdir='$(libdir)/gcc/$(target_alias)'
72 toolexeclibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)'
73 ;;
74 no)
75 if test -n "$with_cross_host" &&
76 test x"$with_cross_host" != x"no"; then
77 # Install a library built with a cross compiler in tooldir, not libdir.
78 toolexecdir='$(exec_prefix)/$(target_alias)'
79 toolexeclibdir='$(toolexecdir)/lib'
80 else
81 toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
82 toolexeclibdir='$(libdir)'
83 fi
84 multi_os_directory=`$CC -print-multi-os-directory`
85 case $multi_os_directory in
86 .) ;; # Avoid trailing /.
87 *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
88 esac
89 ;;
90esac
91AC_SUBST(toolexecdir)
92AC_SUBST(toolexeclibdir)
93
8bc16536
CT
94AC_GNU_SOURCE
95AC_CHECK_FUNCS([__secure_getenv])
96
97AC_GNU_SOURCE
98AC_CHECK_FUNCS([secure_getenv])
99
2077db1b
CT
100# Check for programs.
101m4_rename([_AC_ARG_VAR_PRECIOUS],[real_PRECIOUS])
102m4_define([_AC_ARG_VAR_PRECIOUS],[])
103AC_PROG_CC
104AC_PROG_CXX
105m4_rename_force([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
106
107AM_PROG_CC_C_O
108
109AC_SUBST(CFLAGS)
110AC_SUBST(CXXFLAGS)
111
112# Newer automakes demand CCAS and CCASFLAGS.
113: ${CCAS='$(CC)'}
114: ${CCASFLAGS='$(CFLAGS)'}
115AC_SUBST(CCAS)
116AC_SUBST(CCASFLAGS)
117
118AC_CHECK_TOOL(AS, as)
119AC_CHECK_TOOL(AR, ar)
120AC_CHECK_TOOL(RANLIB, ranlib, :)
121
122# Configure libtool
123AC_LIBTOOL_DLOPEN
124AM_PROG_LIBTOOL
125AC_SUBST(enable_shared)
126AC_SUBST(enable_static)
127
128# For libtool versioning info, format is CURRENT:REVISION:AGE
129libtool_VERSION=1:0:0
130AC_SUBST(libtool_VERSION)
131
132XCFLAGS="-D_GNU_SOURCE -Wall -Wextra -fno-exceptions"
133AC_SUBST(XCFLAGS)
134
135if test "${multilib}" = "yes"; then
136 multilib_arg="--enable-multilib"
137else
138 multilib_arg=
139fi
140
2077db1b
CT
141AC_CONFIG_FILES([Makefile])
142
143if test "x$VTV_SUPPORTED" = "xyes"; then
144 AC_CONFIG_FILES(AC_FOREACH([DIR], [. testsuite], [DIR/Makefile ]),
145 [cat > vpsed$$ << \_EOF
146s!`test -f '$<' || echo '$(srcdir)/'`!!
147_EOF
148 sed -f vpsed$$ $ac_file > tmp$$
149 mv tmp$$ $ac_file
150 rm vpsed$$
151 echo 'MULTISUBDIR =' >> $ac_file
152 ml_norecursion=yes
153 . ${multi_basedir}/config-ml.in
154 AS_UNSET([ml_norecursion])
155])
156fi
157
158AC_OUTPUT