2 # Process this file with autoconf to produce a configure script.
5 AC_INIT([GNU Vtable Verification Runtime Library], 1.0,,[libvtv])
6 #AC_INIT(package-unused, version-unused, libvtv)
7 AC_CONFIG_SRCDIR([vtv_rts.h])
12 AC_MSG_CHECKING([for --enable-version-specific-runtime-libs])
13 AC_ARG_ENABLE(version-specific-runtime-libs,
14 [ --enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory ],
16 yes) version_specific_libs=yes ;;
17 no) version_specific_libs=no ;;
18 *) AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);;
20 [version_specific_libs=no])
21 AC_MSG_RESULT($version_specific_libs)
23 # Do not delete or change the following two lines. For why, see
24 # http://gcc.gnu.org/ml/libstdc++/2003-07/msg00451.html
26 target_alias=${target_alias-$host_alias}
27 AC_SUBST(target_alias)
28 GCC_LIBSTDCXX_RAW_CXX_FLAGS
32 AC_MSG_CHECKING([for host support for vtable verification])
33 . ${srcdir}/configure.tgt
34 AC_MSG_RESULT($VTV_SUPPORTED)
36 # Decide if it's usable.
38 if test "x$VTV_SUPPORTED" = "xyes"; then
40 AC_MSG_NOTICE(using vtable verification)
43 AM_INIT_AUTOMAKE(foreign no-dist)
44 AM_ENABLE_MULTILIB(, ..)
49 # Calculate toolexeclibdir
50 # Also toolexecdir, though it's only used in toolexeclibdir
51 case ${version_specific_libs} in
53 # Need the gcc compiler version to know where to install libraries
54 # and header files if --enable-version-specific-runtime-libs option
56 toolexecdir='$(libdir)/gcc/$(target_alias)'
57 toolexeclibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)'
60 if test -n "$with_cross_host" &&
61 test x"$with_cross_host" != x"no"; then
62 # Install a library built with a cross compiler in tooldir, not libdir.
63 toolexecdir='$(exec_prefix)/$(target_alias)'
64 toolexeclibdir='$(toolexecdir)/lib'
66 toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
67 toolexeclibdir='$(libdir)'
69 multi_os_directory=`$CC -print-multi-os-directory`
70 case $multi_os_directory in
71 .) ;; # Avoid trailing /.
72 *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
77 AC_SUBST(toolexeclibdir)
80 AC_CHECK_FUNCS([__secure_getenv])
83 AC_CHECK_FUNCS([secure_getenv])
86 m4_rename([_AC_ARG_VAR_PRECIOUS],[real_PRECIOUS])
87 m4_define([_AC_ARG_VAR_PRECIOUS],[])
90 m4_rename_force([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
97 # Newer automakes demand CCAS and CCASFLAGS.
99 : ${CCASFLAGS='$(CFLAGS)'}
103 AC_CHECK_TOOL(AS, as)
104 AC_CHECK_TOOL(AR, ar)
105 AC_CHECK_TOOL(RANLIB, ranlib, :)
110 AC_SUBST(enable_shared)
111 AC_SUBST(enable_static)
113 # For libtool versioning info, format is CURRENT:REVISION:AGE
114 libtool_VERSION=1:0:0
115 AC_SUBST(libtool_VERSION)
117 XCFLAGS="-D_GNU_SOURCE -Wall -Wextra -fno-exceptions"
120 if test "${multilib}" = "yes"; then
121 multilib_arg="--enable-multilib"
126 AC_CONFIG_FILES([Makefile])
128 if test "x$VTV_SUPPORTED" = "xyes"; then
129 AC_CONFIG_FILES(AC_FOREACH([DIR], [. testsuite], [DIR/Makefile ]),
130 [cat > vpsed$$ << \_EOF
131 s!`test -f '$<' || echo '$(srcdir)/'`!!
133 sed -f vpsed$$ $ac_file > tmp$$
136 echo 'MULTISUBDIR =' >> $ac_file
138 . ${multi_basedir}/config-ml.in
139 AS_UNSET([ml_norecursion])