1 # CODYlib -*- mode:autoconf -*-
2 # Copyright (C) 2020 Nathan Sidwell, nathan@acm.org
5 AC_INIT([codylib],[0.0],[github.com/urnathan/libcody])
6 AC_CONFIG_SRCDIR(cody.hh)
9 AC_CONFIG_AUX_DIR(build-aux)
10 AC_SUBST(PACKAGE_VERSION)
23 NMS_LINK_OPT([-Wl,--no-undefined])
24 NMS_CONFIG_FILES([gdbinit dox.cfg])
26 # Enable expensive internal checks
28 if test -d $srcdir/../gcc \
29 && test -f $srcdir/../gcc/DEV-PHASE \
30 && test x"`cat $srcdir/../gcc/DEV-PHASE`" != xexperimental; then
35 dnl NMS_ENABLE_CHECKING
36 dnl cloned from ../libcpp/configure.ac
37 AC_ARG_ENABLE(checking,
38 [AS_HELP_STRING([[--enable-checking[=LIST]]],
39 [enable expensive run-time checks. With LIST,
40 enable only specific categories of checks.
41 Categories are: yes,no,all,none,release.
42 Flags are: misc,valgrind or other strings])],
43 [ac_checking_flags="${enableval}"],[
44 # Determine the default checks.
45 if test x$is_release = x ; then
48 ac_checking_flags=release
50 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
51 for check in release $ac_checking_flags
54 yes|all|misc) ac_checking=1 ;;
55 no|none|release) ac_checking= ;;
62 if test x$ac_checking != x ; then
63 AC_DEFINE(NMS_CHECKING, 1,
64 [Define to 1 if you want more run-time sanity checks.])
66 AC_DEFINE(NMS_CHECKING, 0)
72 AC_CONFIG_HEADERS([config.h])
73 AC_CHECK_TOOL([AR],[ar])
74 AC_CHECK_PROG([DOXYGEN],[doxygen],[doxygen],[: NOTdoxygen])
75 AC_CHECK_PROG([ALOY],[aloy],[aloy],[: Joust testsuite missing])
76 AH_VERBATIM([_GNU_SOURCE],[#define _GNU_SOURCE 1])
77 AH_VERBATIM([_FORTIFY_SOURCE],[#undef _FORTIFY_SOURCE])