-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigure.ac
73 lines (50 loc) · 1.74 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
# autoconf sample
AC_PREREQ([2.69])
AC_INIT([exsample], [1.0])
AM_INIT_AUTOMAKE([foreign subdir-objects])
#AC_CONFIG_SRCDIR([src/exsample.cpp])
AC_CONFIG_HEADERS([include/config.h])
AC_CONFIG_MACRO_DIR([m4])
AC_ARG_ENABLE([address-sanitizer],
[AS_HELP_STRING([--enable-address-sanitizer], [Enable address sanitizer in build time (for debug, default is no)])],
[:],
[enable_address_sanitizer=no])
AM_CONDITIONAL([ENABLE_ADDRESS_SANITIZER], [test "$enable_address_sanitizer" = "yes"])
AC_ARG_ENABLE([gcov],
[AS_HELP_STRING([--enable-gcov], [Enable gcov in build time (for debug, default is no)])],
[:],
[enable_gcov=no])
AM_CONDITIONAL([ENABLE_GCOV], [test "$enable_gcov" = "yes"])
AC_ARG_ENABLE([test],
[AS_HELP_STRING([--enable-test], [Enable unit test build (requir to gtest and gmock, default is no])],
[:],
[enable_test=no])
AM_CONDITIONAL([ENABLE_TEST], [test "$enable_test" = "yes"])
AC_ARG_ENABLE([printfdebug],
[AS_HELP_STRING([--enable-printfdebug], [Enable user printf debug (default is no)])],
[:],
[enable_printfdebug=no])
AM_CONDITIONAL([ENABLE_PRINTFDEBUG], [test "$enable_printfdebug" = "yes"])
# Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
AC_DISABLE_STATIC
# Checks for libraries.
LT_INIT
AM_PROG_LIBTOOL
PKG_PROG_PKG_CONFIG
PKG_CHECK_MODULES([LIBSYSTEMD], [libsystemd])
PKG_CHECK_MODULES([GTEST_MAIN], [gtest_main], , enable_test=no)
PKG_CHECK_MODULES([GMOCK_MAIN], [gmock_main], , enable_test=no)
# Checks for header files.
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
AC_CONFIG_FILES([Makefile
cluster_api.pc
cluster-api-systemd.pc
lib/Makefile
src/Makefile
example/Makefile
test/Makefile ])
AC_OUTPUT