This repository has been archived by the owner on Nov 19, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
configure.ac
74 lines (60 loc) · 1.8 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
74
AC_INIT([Sauce],[0.11.0],[https://github.com/phs/sauce/issues],[sauce],[https://github.com/phs/sauce/])
# Boilerplate
AC_PREREQ(2.61)
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([1.9 -Wall -Werror foreign])
# Needed programs
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
AC_PROG_AWK
AM_PROG_CC_C_O
AC_PROG_CXX
AC_PROG_EGREP
AC_PROG_LN_S
AC_PROG_RANLIB
# Needed libraries
ACX_PTHREAD # only needed to run the unit tests
# Optional features
# Detect default shared pointer presence, only for unit tests.
AC_LANG_PUSH([C++])
AC_MSG_CHECKING([for std::shared_ptr])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[[#include <memory>]]
[[std::shared_ptr<int> have_shared_ptr;]])
], [
AC_MSG_RESULT([yes])
SAUCE_UNIT_TEST_SHARED_PTR=SAUCE_STD_SMART_PTR
], [
AC_MSG_RESULT([no])
AC_MSG_CHECKING([for std::tr1::shared_ptr])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[[#include <memory>]]
[[#include <tr1/memory>]]
[[std::tr1::shared_ptr<int> have_shared_ptr;]])
], [
AC_MSG_RESULT([yes])
SAUCE_UNIT_TEST_SHARED_PTR=SAUCE_STD_TR1_SMART_PTR
], [
AC_MSG_RESULT([no])
])
])
AC_SUBST([SAUCE_UNIT_TEST_SHARED_PTR])
AC_LANG_POP([C++])
DX_DOT_FEATURE(ON)
DX_PDF_FEATURE(OFF)
DX_PS_FEATURE(OFF)
DX_INIT_DOXYGEN(AC_PACKAGE_NAME)
# Set default compilation and linking flags
AC_SUBST([AM_CXXFLAGS],"-Wall -Wextra -Werror -pedantic-errors")
# The list of all authored c++ source and header files in the project
AC_SUBST([CC_FILES],[`( cd "$srcdir" && find sauce test -type f -name "*.cc" | tr '\n' ' ' )`])
AC_SUBST([H_FILES],[`( cd "$srcdir" && find sauce test -type f -name "*.h" | tr '\n' ' ' )`])
# Create the generated files
AC_CONFIG_HEADERS([sauce/config.h])
AC_CONFIG_FILES([
Makefile
Doxyfile
sauce/sauce.pc
])
# Actually create the requested files. This must be the last line.
AC_OUTPUT