aboutsummaryrefslogtreecommitdiff
path: root/libcody/configure.ac
blob: 598e585a91bcd12d818a7a94c4d9188a2e0ad36c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# CODYlib  -*- mode:autoconf -*-
# Copyright (C) 2020 Nathan Sidwell, nathan@acm.org
# License: Apache v2.0

AC_INIT([codylib],[0.0],[github.com/urnathan/libcody])
AC_CONFIG_SRCDIR(cody.hh)
m4_include(config.m4)

AC_CONFIG_AUX_DIR(build-aux)
AC_SUBST(PACKAGE_VERSION)

NMS_NOT_IN_SOURCE
AC_CANONICAL_HOST

NMS_TOOLS
NMS_NUM_CPUS
NMS_MAINTAINER_MODE
NMS_CXX_COMPILER
AC_LANG(C++)
AC_PROG_CXX
NMS_CXX_11
NMS_TOOL_DIRS
NMS_LINK_OPT([-Wl,--no-undefined])
NMS_CONFIG_FILES([gdbinit dox.cfg])

# Enable expensive internal checks
is_release=
if test -d $srcdir/../gcc \
   && test -f $srcdir/../gcc/DEV-PHASE \
   && test x"`cat $srcdir/../gcc/DEV-PHASE`" != xexperimental; then
  is_release=yes
fi

NMS_BUGURL
dnl NMS_ENABLE_CHECKING
dnl cloned from ../libcpp/configure.ac
AC_ARG_ENABLE(checking,
[AS_HELP_STRING([[--enable-checking[=LIST]]],
		[enable expensive run-time checks.  With LIST,
		 enable only specific categories of checks.
		 Categories are: yes,no,all,none,release.
		 Flags are: misc,valgrind or other strings])],
[ac_checking_flags="${enableval}"],[
# Determine the default checks.
if test x$is_release = x ; then
  ac_checking_flags=yes
else
  ac_checking_flags=release
fi])
IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS="$IFS,"
for check in release $ac_checking_flags
do
	case $check in
	yes|all|misc) ac_checking=1 ;;
	no|none|release) ac_checking= ;;
	# accept
	*) ;;
	esac
done
IFS="$ac_save_IFS"
                
if test x$ac_checking != x ; then
  AC_DEFINE(NMS_CHECKING, 1,
[Define to 1 if you want more run-time sanity checks.])
else
  AC_DEFINE(NMS_CHECKING, 0)
fi

# Enable --enable-host-shared.
AC_ARG_ENABLE(host-shared,
[AS_HELP_STRING([--enable-host-shared],
		[build host code as shared libraries])],
[PICFLAG=-fPIC], [PICFLAG=])
AC_SUBST(PICFLAG)

NMS_ENABLE_EXCEPTIONS

AC_CONFIG_HEADERS([config.h])
AC_PROG_RANLIB
AC_CHECK_TOOL([AR],[ar])
AC_CHECK_PROG([DOXYGEN],[doxygen],[doxygen],[: NOTdoxygen])
AC_CHECK_PROG([ALOY],[aloy],[aloy],[: Joust testsuite missing])
AH_VERBATIM([_GNU_SOURCE],[#define _GNU_SOURCE 1])
AH_VERBATIM([_FORTIFY_SOURCE],[#undef _FORTIFY_SOURCE])

AC_OUTPUT