c++: over-eager friend matching [PR109649]
[official-gcc.git] / libcody / configure.ac
blob960191ecb72c4d34111535be85e6760922ec88bb
1 # CODYlib  -*- mode:autoconf -*-
2 # Copyright (C) 2020 Nathan Sidwell, nathan@acm.org
3 # License: Apache v2.0
5 AC_INIT([codylib],[0.0],[github.com/urnathan/libcody])
6 AC_CONFIG_SRCDIR(cody.hh)
7 m4_include(config.m4)
9 AC_CONFIG_AUX_DIR(..)
10 AC_SUBST(PACKAGE_VERSION)
12 AC_CANONICAL_HOST
14 NMS_MAINTAINER_MODE
15 NMS_CXX_COMPILER
16 AC_LANG(C++)
17 AC_PROG_CXX
18 NMS_CXX_11
19 NMS_LINK_OPT([-Wl,--no-undefined])
21 # Enable expensive internal checks
22 is_release=
23 if test -d $srcdir/../gcc \
24    && test -f $srcdir/../gcc/DEV-PHASE \
25    && test x"`cat $srcdir/../gcc/DEV-PHASE`" != xexperimental; then
26   is_release=yes
29 dnl NMS_ENABLE_CHECKING
30 dnl cloned from ../libcpp/configure.ac
31 AC_ARG_ENABLE(checking,
32 [AS_HELP_STRING([[--enable-checking[=LIST]]],
33                 [enable expensive run-time checks.  With LIST,
34                  enable only specific categories of checks.
35                  Categories are: yes,no,all,none,release.
36                  Flags are: misc,valgrind or other strings])],
37 [ac_checking_flags="${enableval}"],[
38 # Determine the default checks.
39 if test x$is_release = x ; then
40   ac_checking_flags=yes
41 else
42   ac_checking_flags=release
43 fi])
44 IFS="${IFS=     }"; ac_save_IFS="$IFS"; IFS="$IFS,"
45 for check in release $ac_checking_flags
47         case $check in
48         yes|all|misc) ac_checking=1 ;;
49         no|none|release) ac_checking= ;;
50         # accept
51         *) ;;
52         esac
53 done
54 IFS="$ac_save_IFS"
55                 
56 if test x$ac_checking != x ; then
57   AC_DEFINE(NMS_CHECKING, 1,
58 [Define to 1 if you want more run-time sanity checks.])
59 else
60   AC_DEFINE(NMS_CHECKING, 0)
63 # Enable --enable-host-shared.
64 AC_ARG_ENABLE(host-shared,
65 [AS_HELP_STRING([--enable-host-shared],
66                 [build host code as shared libraries])],
67 [PICFLAG=-fPIC], [PICFLAG=])
68 AC_SUBST(PICFLAG)
70 NMS_ENABLE_EXCEPTIONS
72 AC_PROG_RANLIB
73 AC_CHECK_TOOL([AR],[ar])
74 AH_VERBATIM([_GNU_SOURCE],[#define _GNU_SOURCE 1])
75 AH_VERBATIM([_FORTIFY_SOURCE],[#undef _FORTIFY_SOURCE])
76 AC_CONFIG_HEADERS([config.h])
78 AC_CONFIG_FILES([Makefile])
79 AC_SUBST(configure_args,[$ac_configure_args])
81 AC_OUTPUT