forked from sociomantic-tsunami/libdrizzle-redux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
192 lines (158 loc) · 6.07 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
#!/usr/bin/env bash
# libdrizzle
# Copyright (C) 2012 Drizzle Development Team, http://drizzle.org/
# All rights reserved.
#
# Use and distribution licensed under the BSD license. See
# the COPYING file in this directory for full text.
AC_INIT([libdrizzle-redux6],[6.2.0],[https://github.com/sociomantic-tsunami/libdrizzle-redux/issues],[libdrizzle-redux6],[https://github.com/sociomantic-tsunami/libdrizzle-redux])
AC_CONFIG_AUX_DIR([build/build-aux])
AC_CANONICAL_TARGET
# Automake version before 1.13 (when the serial-tests option was dnl still the default) still defined the badly obsolete macro. 'AM_PROG_INSTALL'.
AM_INIT_AUTOMAKE(1.11 no-define color-tests -Wno-portability subdir-objects foreign tar-ustar m4_ifndef([AM_WITH_REGEX], [serial-tests]))
AC_PREREQ([2.68])
AC_CANONICAL_HOST
AC_CANONICAL_BUILD
AC_ARG_PROGRAM
AC_USE_SYSTEM_EXTENSIONS
AM_SILENT_RULES([yes])
AX_ENABLE_SSL
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h:config.in])dnl Keep filename to 8.3 for MS-DOS.
AC_CONFIG_SRCDIR([src/drizzle.cc])
# Shared library versioning
#
# The following explanation considers library changes and ABI compatibility from
# the users' perspective and how they relate to the shared library version.(§)
#
# Programs using the previous version may use the new version as drop-in
# replacement, and programs using the new version can also work with the
# previous one. In other words, no recompiling nor relinking is needed.
# In this case:
# bump revision only, don’t touch current nor age.
#
# Programs using the previous version may use the new version as drop-in
# replacement, but programs using the new version may use APIs not present in
# the previous one. In other words, a program linking against the new version
# may fail with “unresolved symbols” if linking against the old version at
# runtime. In this case:
# set revision to 0, bump current and age.
#
# Programs may need to be changed, recompiled, relinked in order to use the
# new version:
# bump current, set revision and age to 0.
#
# (§) The explanation is taken from this blogpost:
# http://blog.asleson.org/index.php/2014/07/08/libtool-library-versioning-version-info-currentrevisionage/
#
LIBDRIZZLE_LIBRARY_VERSION=14:0:0
# | | |
# +------+ | +---+
# | | |
# current:revision:age
# | | |
# | | +- increment if interfaces have been added
# | | set to zero if interfaces have been removed
# or changed
# | +- increment if source code has changed
# | set to zero if current is incremented
# +- increment if interfaces have been added, removed or changed
AC_SUBST([LIBDRIZZLE_LIBRARY_VERSION])
# This is used to allow multiple major (SemVer-wise) to be installed concurrently
LIBDRIZZLE_MAJOR=6
AC_SUBST([LIBDRIZZLE_MAJOR])
LT_PREREQ([2.2])
LT_INIT
LT_LANG([C++])
AC_PROG_CXX
AC_PROG_CC
AC_PROG_CC_C99
AS_IF([test "x${ac_cv_prog_cc_c99}" == "xno"],[AC_MSG_ERROR([No c99 compatible compiler found])])
# Check for code coverage tool support
AX_CODE_COVERAGE
AX_PLATFORM
AX_ASSERT
# Checks c++ 11 support
AX_CXX_COMPILE_STDCXX([11],[],[optional])
# Specialty checks
AX_CXX_CINTTYPES
CONFIG_EXTRA
SOCKET_SEND_FLAGS
# Checks for latex
ACLTX_PROG_LATEX
ACLTX_PROG_PDFLATEX
ACLTX_PROG_KPSEWHICH
# Checks for programs.
AX_PROG_SPHINX_BUILD
# Checks for libraries.
AX_CXX_GCC_ABI_DEMANGLE
AC_PATH_ZLIB
# Check for -lm
LT_LIB_M
# Checks for header files.
AC_DEFUN([CHECK_FOR_CXXABI],
[AC_LANG_PUSH([C++])
AC_CHECK_HEADERS([cxxabi.h])
AC_LANG_POP])
CHECK_FOR_CXXABI
AC_CHECK_HEADERS([argp.h])
AC_CHECK_HEADERS([errno.h])
AC_CHECK_HEADERS([fcntl.h])
AC_CHECK_HEADERS([io.h])
AC_CHECK_HEADERS([openssl/ssl.h])
AC_CHECK_HEADERS([poll.h])
AC_CHECK_HEADERS([pwd.h])
AC_CHECK_HEADERS([sys/socket.h])
AC_CHECK_HEADERS([windows.h])
AC_CHECK_HEADERS([winsock2.h])
AC_CHECK_HEADERS([ws2tcpip.h])
# Check for setsockopt support
AX_CHECK_SETSOCKOPT
# Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_TYPES([in_port_t])
AC_TYPE_SSIZE_T
AC_TYPE_SIZE_T
# Checks for library functions.
AC_CHECK_FUNCS([fcntl])
AC_CHECK_FUNCS([on_exit])
AC_CHECK_FUNCS([poll])
AC_CHECK_FUNCS([ppoll])
AX_PTHREAD(, [AC_MSG_ERROR(could not find libpthread)])
AX_ENDIAN
AX_HEX_VERSION([LIBDRIZZLE],[$VERSION])
AX_HARDEN_COMPILER_FLAGS
# Append the -./Iinclude to compiler flags
AX_APPEND_COMPILE_FLAGS([-I$srcdir/include -I$srcdir -I./ -I./include], [CXXFLAGS])
AX_APPEND_COMPILE_FLAGS([-I$srcdir/include -I$srcdir -I./ -I./include], [CFLAGS])
AX_CREATE_GENERIC_CONFIG
AX_AM_JOBSERVER([yes])
AC_CONFIG_FILES([Makefile
docs/conf.py
pkg/rpm/spec
include/libdrizzle-redux/version.h:$srcdir/include/libdrizzle-redux/version.h.in
api-sanity-checker-version.xml:$srcdir/tests/api-sanity-checker-version.xml.in
])
AC_CONFIG_FILES([pkg/deb/build:$srcdir/pkg/deb/build],[chmod +x pkg/deb/build])
AC_OUTPUT
echo "---"
echo "Configuration summary for $PACKAGE_NAME version $VERSION"
echo ""
echo " * Installation prefix: $prefix"
echo " * System type: $host_vendor-$host_os"
echo " * Host CPU: $host_cpu"
echo " * Compiler Vendor: $ax_cv_c_compiler_vendor"
echo " * C Compiler: $CC"
echo " * C Compiler Version: $ax_c_compiler_version"
echo " * C Flags: $CFLAGS"
echo " * C++ Compiler: $CXX"
echo " * C++ Version: $ax_cxx_compiler_version"
echo " * C++ Flags: $CXXFLAGS"
echo " * CPP Flags: $CPPFLAGS"
echo " * LIB Flags: $LIB"
echo " * Assertions enabled: $ax_enable_assert"
echo " * Debug enabled: $ax_enable_debug"
echo " * Warnings as failure: $ac_cv_warnings_as_errors"
echo " * make -j: $enable_jobserver"
echo " * VCS checkout: $ac_cv_vcs_system"
echo ""
echo "---"