]> git.ipfire.org Git - thirdparty/gcc.git/blob - libsanitizer/configure.ac
Makefile.am (AM_CXXFLAGS): Remove -Wno-variadic-macros.
[thirdparty/gcc.git] / libsanitizer / configure.ac
1 # -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 AC_PREREQ([2.64])
5 AC_INIT(package-unused, version-unused, libsanitizer)
6 AC_CONFIG_SRCDIR([include/sanitizer/common_interface_defs.h])
7
8 AC_MSG_CHECKING([for --enable-version-specific-runtime-libs])
9 AC_ARG_ENABLE(version-specific-runtime-libs,
10 [ --enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory ],
11 [case "$enableval" in
12 yes) version_specific_libs=yes ;;
13 no) version_specific_libs=no ;;
14 *) AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);;
15 esac],
16 [version_specific_libs=no])
17 AC_MSG_RESULT($version_specific_libs)
18
19 # Do not delete or change the following two lines. For why, see
20 # http://gcc.gnu.org/ml/libstdc++/2003-07/msg00451.html
21 AC_CANONICAL_SYSTEM
22 target_alias=${target_alias-$host_alias}
23 AC_SUBST(target_alias)
24
25 AM_INIT_AUTOMAKE(foreign)
26 AM_ENABLE_MULTILIB(, ..)
27 AM_MAINTAINER_MODE
28
29 # Calculate toolexeclibdir
30 # Also toolexecdir, though it's only used in toolexeclibdir
31 case ${version_specific_libs} in
32 yes)
33 # Need the gcc compiler version to know where to install libraries
34 # and header files if --enable-version-specific-runtime-libs option
35 # is selected.
36 toolexecdir='$(libdir)/gcc/$(target_alias)'
37 toolexeclibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)'
38 ;;
39 no)
40 if test -n "$with_cross_host" &&
41 test x"$with_cross_host" != x"no"; then
42 # Install a library built with a cross compiler in tooldir, not libdir.
43 toolexecdir='$(exec_prefix)/$(target_alias)'
44 toolexeclibdir='$(toolexecdir)/lib'
45 else
46 toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
47 toolexeclibdir='$(libdir)'
48 fi
49 multi_os_directory=`$CC -print-multi-os-directory`
50 case $multi_os_directory in
51 .) ;; # Avoid trailing /.
52 *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
53 esac
54 ;;
55 esac
56 AC_SUBST(toolexecdir)
57 AC_SUBST(toolexeclibdir)
58
59 # Checks for programs.
60 AC_PROG_CC
61 AC_PROG_CXX
62 AM_PROG_AS
63
64 AC_LIBTOOL_DLOPEN
65 AM_PROG_LIBTOOL
66
67 AC_SUBST(enable_shared)
68 AC_SUBST(enable_static)
69
70 AC_CHECK_SIZEOF([void *])
71
72 if test "${multilib}" = "yes"; then
73 multilib_arg="--enable-multilib"
74 else
75 multilib_arg=
76 fi
77
78 # Get target configury.
79 unset TSAN_SUPPORTED
80 . ${srcdir}/configure.tgt
81 AM_CONDITIONAL(TSAN_SUPPORTED, [test "x$TSAN_SUPPORTED" = "xyes"])
82
83 AC_CONFIG_FILES([Makefile])
84
85 AC_CONFIG_FILES(AC_FOREACH([DIR], [interception sanitizer_common asan], [DIR/Makefile ]),
86 [cat > vpsed$$ << \_EOF
87 s!`test -f '$<' || echo '$(srcdir)/'`!!
88 _EOF
89 sed -f vpsed$$ $ac_file > tmp$$
90 mv tmp$$ $ac_file
91 rm vpsed$$
92 echo 'MULTISUBDIR =' >> $ac_file
93 ml_norecursion=yes
94 . ${multi_basedir}/config-ml.in
95 AS_UNSET([ml_norecursion])
96 ])
97
98 if test "x$TSAN_SUPPORTED" = "xyes"; then
99 AC_CONFIG_FILES(AC_FOREACH([DIR], [tsan], [DIR/Makefile ]),
100 [cat > vpsed$$ << \_EOF
101 s!`test -f '$<' || echo '$(srcdir)/'`!!
102 _EOF
103 sed -f vpsed$$ $ac_file > tmp$$
104 mv tmp$$ $ac_file
105 rm vpsed$$
106 echo 'MULTISUBDIR =' >> $ac_file
107 ml_norecursion=yes
108 . ${multi_basedir}/config-ml.in
109 AS_UNSET([ml_norecursion])
110 ])
111 fi
112
113 AC_OUTPUT