-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathconfigure.ac
103 lines (88 loc) · 2.87 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
##############################################################################
#
# SkyPat Configuration
#
# This file is distributed under the New BSD License.
# See LICENSE for details.
#
##############################################################################
####################
# Autoconf/Automake Initialization
dnl AC_INIT(PKG_NAME, BUILD_VERSION, BUG_REPORTER)
AC_INIT([skypat],[bourbon],[skypat-dev@@googlegroups.com])
AC_PREREQ(2.59)
AC_CONFIG_SRCDIR([LICENSE])
AC_CONFIG_AUX_DIR([scripts])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([include/skypat/Config/Config.h])
####################
# Check environments - `host`, `target` and `build`
CHECK_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE([1.9 dist-bzip2 foreign nostdinc subdir-objects])
####################
# Versioning, see VERSION
CURRENT_VERSION=3
REVISION_VERSION=1
AGE_VERSION=0
FULL_VERSION_NAME=Bourbon
BUILD_VERSION=bourbon
SKYPAT_VERSION=$CURRENT_VERSION:$REVISION_VERSION:$AGE_VERSION
PACKAGE_VERSION=$CURRENT_VERSION.$REVISION_VERSION.$AGE_VERSION-$BUILD_VERSION
AC_SUBST(PACKAGE_VERSION)
AC_SUBST(SKYPAT_VERSION)
####################
# Languages
AC_PROG_CC
AC_PROG_CXX
AC_LANG([C++])
AC_CXX_STL_HASH
AM_CONDITIONAL(GCC, test "$GCC" = yes) # let the Makefile know if we're gcc
AC_ENABLE_SHARED
LT_INIT
####################
# Check for compiler warnings
CHECK_WERROR_FLAGS
CXX_FLAG_CHECK([-Wno-variadic-macros])
####################
# Check for headers
AC_CHECK_HEADERS([sys/time.h])
AC_CHECK_HEADERS([linux/perf_event.h])
AC_CHECK_HEADERS([asm/unistd.h])
####################
# Check for functions
AC_SEARCH_LIBS([clock_gettime], [rt], [
AC_DEFINE(HAVE_CLOCK_GETTIME, 1,[Have clock_gettime])
])
AC_CHECK_FUNCS([gettimeofday])
####################
# Check for types
AC_CHECK_TYPES([int8_t, int16_t, int32_t, int64_t, intptr_t])
AC_CHECK_TYPES([uint8_t, uint16_t, uint32_t, uint64_t, uintptr_t])
AC_CHECK_TYPES([long double, long long, long long int, unsigned long long int])
AC_CHECK_TYPES([off_t, size_t, ssize_t])
AC_TYPE_LONG_DOUBLE_WIDER
####################
# Check for options
CHECK_PTHREAD
CHECK_ZLIB
CHECK_ENABLE_UNITTEST
CHECK_ENABLE_OPTIMIZE
CHECK_ENABLE_OPTION([clock_gettime], [no], [ENABLE_CLOCK_GETTIME])
CHECK_ENABLE_OPTION([gettimeofday], [yes], [ENABLE_GETTIMEOFDAY])
####################
# OUTPUT
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([include/Makefile])
AC_CONFIG_FILES([lib/Makefile])
AC_CONFIG_FILES([lib/skypat.pc])
AC_CONFIG_FILES([examples/Makefile])
AC_CONFIG_FILES([examples/assertion/Makefile])
AC_CONFIG_FILES([examples/multi_assert/Makefile])
AC_CONFIG_FILES([examples/multi_expect/Makefile])
AC_CONFIG_FILES([examples/multi_case/Makefile])
AC_CONFIG_FILES([examples/performance/Makefile])
AC_CONFIG_FILES([examples/smoke/Makefile])
AC_CONFIG_FILES([examples/fail/Makefile])
AC_CONFIG_FILES([examples/skypat_c/Makefile])
AC_CONFIG_FILES([examples/thread/Makefile])
AC_OUTPUT