-
Notifications
You must be signed in to change notification settings - Fork 4
/
configure.ac
74 lines (64 loc) · 1.97 KB
/
configure.ac
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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.68])
AC_INIT([kmad], [1.06.04])
AC_CONFIG_AUX_DIR(config)
AM_INIT_AUTOMAKE([subdir-objects])
AC_CONFIG_SRCDIR([src/msa.h])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
# Old versions of autoconf require explicitly including the macros.
m4_include([m4/ax_boost_base.m4])
m4_include([m4/ax_boost_filesystem.m4])
m4_include([m4/ax_boost_program_options.m4])
m4_include([m4/ax_boost_regex.m4])
m4_include([m4/ax_boost_system.m4])
m4_include([m4/ax_boost_unit_test_framework.m4])
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_INSTALL
AC_CHECK_PROGS([CPPCHECK], [cppcheck])
if test -z "$CPPCHECK"; then
AC_MSG_WARN([cppcheck not found - continuing without cppcheck support])
fi
# Checks for libraries.
AX_BOOST_BASE # Adding the boost version fails using old autoconf. Should be
# 1.48.
AX_BOOST_FILESYSTEM
AX_BOOST_PROGRAM_OPTIONS
AX_BOOST_REGEX
AX_BOOST_SYSTEM
AX_BOOST_UNIT_TEST_FRAMEWORK
AM_CONDITIONAL([HAVE_CPPCHECK], [test -n "$CPPCHECK"])
# Checks for header files.
AC_CHECK_HEADERS([sys/ioctl.h termios.h libconfig.h])
# Checks for typedefs, structures, and compiler characteristics.
# AC_CHECK_HEADER_STDBOOL # Doesn't work in old versions of autoconf
AC_C_INLINE
AC_TYPE_INT16_T
AC_TYPE_INT32_T
AC_TYPE_INT64_T
AC_TYPE_INT8_T
AC_TYPE_SIZE_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_TYPE_UINT8_T
# Checks for library functions.
AC_FUNC_ERROR_AT_LINE
AC_FUNC_FORK
AC_CHECK_FUNCS([dup2 floor pow socket sqrt strchr strerror])
# debug
AC_ARG_ENABLE(debug,
AS_HELP_STRING([--enable-debug],
[enable debugging, default: no]),
[case "${enableval}" in
yes) debug=true ;;
no) debug=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
esac],
[debug=false])
AM_CONDITIONAL(DEBUG, test x"$debug" = x"true")
AC_CONFIG_FILES([Makefile])
AC_OUTPUT