re PR tree-optimization/63747 (icf mis-compares switch gimple)
[gcc.git] / libcc1 / configure.ac
1 dnl Copyright (C) 2014 Free Software Foundation, Inc.
2 dnl
3 dnl This file is part of GCC.
4 dnl
5 dnl GCC is free software; you can redistribute it and/or modify it under
6 dnl the terms of the GNU General Public License as published by the Free
7 dnl Software Foundation; either version 3, or (at your option) any later
8 dnl version.
9 dnl
10 dnl GCC is distributed in the hope that it will be useful, but WITHOUT ANY
11 dnl WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 dnl for more details.
14 dnl
15 dnl You should have received a copy of the GNU General Public License
16 dnl along with GCC; see the file COPYING3. If not see
17 dnl <http://www.gnu.org/licenses/>.
18
19 AC_PREREQ(2.64)
20 AC_INIT([libcc1], [version-unused])
21 AC_CONFIG_SRCDIR([libcc1.cc])
22 AC_CONFIG_HEADER(cc1plugin-config.h)
23
24 AC_CANONICAL_SYSTEM
25 AC_USE_SYSTEM_EXTENSIONS
26 # Determine the noncanonical target name, for directory use.
27 ACX_NONCANONICAL_TARGET
28 GCC_TOPLEV_SUBDIRS
29
30 # 1.11.1: Require that version of automake.
31 # foreign: Don't require README, INSTALL, NEWS, etc.
32 # no-define: Don't define PACKAGE and VERSION.
33 # -Wall: Issue all automake warnings.
34 # -Wno-portability: Don't warn about constructs supported by GNU make.
35 # (because GCC requires GNU make anyhow).
36 AM_INIT_AUTOMAKE([1.11.1 foreign no-dist no-define -Wall -Wno-portability])
37 AM_MAINTAINER_MODE
38
39 LT_INIT([disable-static])
40 AM_PROG_LIBTOOL
41 AC_PROG_CXX
42
43 visibility=
44 if test "$GXX" = yes; then
45 visibility=-fvisibility=hidden
46 fi
47 AC_SUBST(visibility)
48
49 AC_CHECK_DECLS([basename])
50
51 gcc_version=`cat $srcdir/../gcc/BASE-VER`
52 AC_SUBST(gcc_version)
53
54 ACX_PROG_CC_WARNING_OPTS([-W -Wall], [WARN_FLAGS])
55 AC_SUBST(WARN_FLAGS)
56 ACX_PROG_CC_WARNINGS_ARE_ERRORS([manual])
57
58 AC_ARG_VAR(GMPINC,[How to find GMP include files])
59
60 libsuffix=
61 if test "$GXX" = yes; then
62 libsuffix=`$CXX -print-multi-os-directory`
63 fi
64 AC_SUBST(libsuffix)
65
66 # If any of these functions are missing, simply don't bother building
67 # this plugin.
68 GCC_ENABLE_PLUGINS
69 AC_CHECK_FUNC(socketpair, , enable_plugin=no)
70 AC_CHECK_FUNC(select, , enable_plugin=no)
71 AC_CHECK_FUNC(fork, , enable_plugin=no)
72 AM_CONDITIONAL(ENABLE_PLUGIN, test $enable_plugin = yes)
73
74 AC_CONFIG_FILES([Makefile])
75 AC_OUTPUT