forked from lavabit/libdime
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfigure.ac
More file actions
106 lines (84 loc) · 2.84 KB
/
configure.ac
File metadata and controls
106 lines (84 loc) · 2.84 KB
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
104
105
106
# Note that this has not been extensively tested with various autoconf
# versions. TODO - determine the minimum autoconf version we will support
AC_PREREQ([2.63])
AC_INIT([libdime], [0.1])
# Look for macros in the m4 directory
AC_CONFIG_MACRO_DIR([m4])
# TODO - pin down min supported openssl version
PKG_CHECK_MODULES([OPENSSL], [openssl >= 0.9.8])
# Sanity check to make sure the specified srcdir actually contains the source
AC_CONFIG_SRCDIR([include/dime/signet/signet.h])
# Auxiliary autotools files go here
AC_CONFIG_AUX_DIR([build-aux])
# Initialize Automake
#
# The foreign option prevents automake from requiring the GNU-specific project
# files like AUTHORS, COPYING, etc.
#
# The subdir-objects option allows source files in subdirectories.
#
# nostdinc disables including srcdir (-I.)
AM_INIT_AUTOMAKE([foreign subdir-objects nostdinc])
# Instruct configure to create Makefile using Makefile.am
AC_CONFIG_FILES([Makefile])
# Find and probe C compiler (use "current" standard)
AC_PROG_CC_STDC
# Find and probe C++ compiler
AC_PROG_CXX
# Set common system defines for POSIX extensions, such as _GNU_SOURCE Must be
# called before any macros that run the compiler (like AC_PROG_LIBTOOL) to
# avoid autoconf errors.
AC_USE_SYSTEM_EXTENSIONS
# Find libtool
AC_PROG_LIBTOOL
# Find awk
AC_PROG_AWK
# Check which version of strerror_r the system has
AC_FUNC_STRERROR_R
# Handle pthreads
AX_PTHREAD(
[AC_SUBST(GTEST_HAS_PTHREAD, [1])],
[AC_SUBST(GTEST_HAS_PTHREAD, [0])])
#AC_DEFINE([HAVE_NS_TYPE])
# These flags are applied everywhere
WARNINGS="-Wfatal-errors "
WARNINGS+="-Werror "
WARNINGS+="-Wall "
WARNINGS+="-Wextra "
WARNINGS+="-Wformat=2 "
WARNINGS+="-Wwrite-strings "
WARNINGS+="-Wno-format-nonliteral "
#WARNINGS += "-Wstrict-overflow=5"
# These flags are C only
CWARNINGS="-Wstrict-prototypes "
CWARNINGS+="-Wmissing-prototypes "
CWARNINGS+="-Wno-pointer-sign "
if `$CC -v 2>&1 | grep 'clang version' > /dev/null 2>&1`; then
# Clang-specific flags
WARNINGS+="-Wno-cast-align "
WARNINGS+="-Wno-conditional-uninitialized "
WARNINGS+="-Wno-conversion "
WARNINGS+="-Wno-covered-switch-default "
WARNINGS+="-Wno-disabled-macro-expansion "
WARNINGS+="-Wno-documentation "
WARNINGS+="-Wno-documentation-unknown-command "
WARNINGS+="-Wno-float-equal "
WARNINGS+="-Wno-gnu-designator "
WARNINGS+="-Wno-packed "
WARNINGS+="-Wno-padded "
WARNINGS+="-Wno-pedantic "
WARNINGS+="-Wno-shorten-64-to-32 "
WARNINGS+="-Wno-sign-conversion "
WARNINGS+="-Wno-switch-enum "
WARNINGS+="-Wno-unreachable-code "
WARNINGS+="-Wno-cast-qual "
WARNINGS+="-Wno-class-varargs "
WARNINGS+="-Wno-unreachable-code-break "
WARNINGS+="-Wno-assign-enum "
CWARNINGS+="-ferror-limit=5 "
CWARNINGS+="-Weverything "
CWARNINGS+="-Wno-bad-function-cast "
fi
AC_SUBST(WARNINGS)
AC_SUBST(CWARNINGS)
AC_OUTPUT