-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
326 lines (265 loc) · 10.2 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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
# ---------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ---------------------------------------------------------------------------
AC_PREREQ(2.61)
## --------------------------------
## Initialization macros.
## --------------------------------
AC_INIT(activemq-cpp, 3.9.0, [email protected])
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_SRCDIR(src/main/activemq/core/ActiveMQConnection.cpp)
AC_CONFIG_MACRO_DIR([m4])
## ------------------------------------------------------------
## Define the Version variables for the ActiveMQ-CPP Library
## ------------------------------------------------------------
ACTIVEMQ_LIBRARY_NAME=activemq-cpp
ACTIVEMQ_MAJOR_VERSION=3
ACTIVEMQ_MINOR_VERSION=9
ACTIVEMQ_PATCH_VERSION=0
ACTIVEMQ_VERSION=${ACTIVEMQ_MAJOR_VERSION}.${ACTIVEMQ_MINOR_VERSION}.${ACTIVEMQ_PATCH_VERSION}
ACTIVEMQ_API_VERSION=${ACTIVEMQ_VERSION}
## ------------------------------------------------------------
## Define the Version variables for the CMS API Library
## ------------------------------------------------------------
CMSAPI_MAJOR_VERSION=3
CMSAPI_MINOR_VERSION=2
CMSAPI_VERSION=${CMSAPI_MAJOR_VERSION}.${CMSAPI_MINOR_VERSION}
AC_SUBST(CMSAPI_MAJOR_VERSION)
AC_SUBST(CMSAPI_MINOR_VERSION)
AC_SUBST(CMSAPI_VERSION)
##
## When releasing a new version the ACTIVEMQ_LIBRARY_VERSION needs to be updated.
## The following rules apply to the numbers in the version as defined by libtool.
##
## 1. Start with version information of ‘0:0:0’ for each libtool library.
## 2. Update the version information only immediately before a public release of your
## software. More frequent updates are unnecessary, and only guarantee that the current
## interface number gets larger faster.
## 3. If the library source code has changed at all since the last update, then increment
## revision (‘c:r:a’ becomes ‘c:r+1:a’).
## 4. If any interfaces have been added, removed, or changed since the last update, increment
## current, and set revision to 0.
## 5. If any interfaces have been added since the last public release, then increment age.
## 6. If any interfaces have been removed or changed since the last public release, then set
## age to 0.
##
## More plainly the follow rules should be used when changing this number.
##
## 1. 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.
## 2. 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: set revision to 0, bump current and age.
## 3. Programs may need to be changed, recompiled, relinked in order to use the new version. Bump
## current, set revision and age to 0.
##
ACTIVEMQ_LIBRARY_VERSION=19:0:0
AC_SUBST(ACTIVEMQ_LIBRARY_NAME)
AC_SUBST(ACTIVEMQ_VERSION)
AC_SUBST(ACTIVEMQ_MAJOR_VERSION)
AC_SUBST(ACTIVEMQ_MINOR_VERSION)
AC_SUBST(ACTIVEMQ_PATCH_VERSION)
AC_SUBST(ACTIVEMQ_LIBRARY_VERSION)
AC_SUBST(ACTIVEMQ_API_VERSION)
## Value used in the generated files.
PACKAGE=$ACTIVEMQ_LIBRARY_NAME
VERSION=$ACTIVEMQ_VERSION
AM_INIT_AUTOMAKE([subdir-objects])
AM_CONFIG_HEADER(config.h)
# Gives us access to the host_os environment variable
AC_CANONICAL_HOST
echo "Configuring ActiveMQ-CPP library"
echo " Platform: $host_os"
echo " CPU: $host_cpu"
echo " Vendor: $host_vendor"
## -----------------------------------------------
## Checks for programs.
## -----------------------------------------------
AC_PROG_CC
AC_PROG_CXX
AC_LIBTOOL_WIN32_DLL
AC_PROG_LIBTOOL
AC_SUBST([LIBTOOL_DEPS])
AM_SANITY_CHECK
AC_LANG_CPLUSPLUS
AC_FUNC_MEMCMP
AC_FUNC_VPRINTF
AC_HEADER_STDC
AC_C_CONST
AC_TYPE_SIZE_T
AC_C_BIGENDIAN
AC_CHECK_TYPE(wchar_t, AC_DEFINE(HAVE_WCHAR_T, 1, [Define if compiler provides wchar_t]))
AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(wchar_t)
AC_CHECK_SIZEOF(char, 1)
AC_CHECK_SIZEOF(short, 2)
AC_CHECK_SIZEOF(int, 4)
AC_CHECK_SIZEOF(long long, 8)
AC_CHECK_SIZEOF(float, 4)
AC_CHECK_SIZEOF(double, 8)
AC_CHECK_HEADERS([objbase.h])
AC_CHECK_HEADERS([repcdce.h])
AC_CHECK_HEADERS([signal.h])
AC_CHECK_HEADERS([string.h])
AC_CHECK_HEADERS([sched.h])
AC_CHECK_HEADERS([time.h])
AC_CHECK_HEADERS([limits.h])
AC_CHECK_HEADERS([sys/filio.h])
AC_CHECK_HEADERS([sys/ioctl.h])
AC_CHECK_HEADERS([sys/select.h])
AC_CHECK_HEADERS([sys/time.h])
AC_CHECK_HEADERS([sys/timeb.h])
AC_CHECK_HEADERS([sys/wait.h])
AC_CHECK_HEADERS([sys/types.h])
AC_CHECK_HEADERS([sys/sysctl.h])
AC_CHECK_HEADERS([sys/resource.h])
AC_CHECK_HEADERS([pthread.h])
AC_CHECK_HEADERS([errno.h])
AC_CHECK_HEADERS([semaphore.h])
AC_CHECK_FUNCS([ioctl select gettimeofday time ftime random srandom])
AMQ_FIND_CPPUNIT( 1.10.2, cppunit=yes, cppunit=no;
AC_MSG_RESULT([no. Unit and Integration tests disabled])
)
AM_CONDITIONAL(BUILD_CPPUNIT_TESTS, test x$cppunit = xyes)
# Absolute source/build directory
decaf_srcdir=`(cd $srcdir && pwd)`
decaf_builddir=`pwd`
AC_SUBST(decaf_srcdir)
AC_SUBST(decaf_builddir)
if test "$decaf_builddir" != "$decaf_srcdir"; then
USE_VPATH=1
DECAF_CONFIG_LOCATION=build
else
DECAF_CONFIG_LOCATION=source
fi
AC_SUBST(DECAF_CONFIG_LOCATION)
PLAT_CXXFLAGS=
PLAT_LIBS=
# Detect the presence of pthreads and the correct linker settings.
DECAF_CHECK_PTHREADS()
# Detect the presence of atomic operations.
DECAF_CHECK_ATOMICS()
case "${host_os}" in
*darwin* ) ## Mac OS X configuration
;;
*solaris* ) ## Solaris configuration
PLAT_LIBS="-lm -luuid -lsocket -lrt"
if ! test "$GCC" = "yes"; then
# Assuming Sun Compiler and adding in optimization
# because autoconf can't seem to figure it out.
PLAT_CXXFLAGS="-mt -w -O5 -library=stlport4"
fi
;;
*hpux10* )
if ! test "$GCC" = "yes"; then
# Assuming aCC Compiler unknown yet if any additional settings are needed.
PLAT_CXXFLAGS=""
fi
;;
*hpux11* )
if ! test "$GCC" = "yes"; then
# Assuming aCC Compiler unknown yet if any additional settings are needed.
PLAT_CXXFLAGS="-AA"
fi
;;
*linux*) ## Unix configuration
;;
esac
if test "$GCC" = "yes"; then
PLAT_CXXFLAGS="-ansi -pedantic"
fi
## find and configure the Apache Decaf Library
## DECAF_CONFIGURE_DECAF - Future use for decaf as a standalone lib
## Flags for building the decaf cpp library
## find and configure the APR, and APR Utils
## find and configure the OpenSSL library if present
AC_ARG_ENABLE([ssl],
[AS_HELP_STRING([--disable-ssl],
[disable SSL support (default is enabled if the OpenSSL libraries and headers are found)])],
[use_ssl=$enableval],
[use_ssl=yes])
DECAF_CONFIGURE_APR
if test "$use_ssl" = "yes"; then
DECAF_CONFIGURE_SSL
fi
DECAF_CXXFLAGS="$APR_CPPFLAGS $APR_INCLUDES $APU_INCLUDES $OPENSSL_INCLUDES"
DECAF_CFLAGS="$APR_CFLAGS $APR_INCLUDES $APU_INCLUDES $OPENSSL_INCLUDES"
DECAF_LIBS="$APR_LIBS $APR_LDFLAGS $APU_LIBS $APU_LDFLAGS $OPENSSL_LIBS $OPENSSL_LDFLAGS"
AC_SUBST([DECAF_CXXFLAGS])
AC_SUBST([DECAF_CFLAGS])
AC_SUBST([DECAF_LIBS])
## Flags for building the test applications.
DECAF_TEST_CXXFLAGS="$DECAF_CXXFLAGS $APR_CPPFLAGS $APR_INCLUDES $APU_INCLUDES"
AC_SUBST([DECAF_TEST_CXXFLAGS])
## Flags for building the activemq-cpp library
AC_SUBST([AMQ_CXXFLAGS])
AC_SUBST([AMQ_CFLAGS])
AC_SUBST([AMQ_LIBS])
if test "$GCC" = "yes"; then
AMQ_CXXFLAGS="$PLAT_CXXFLAGS $DECAF_INCLUDES $DECAF_CXXFLAGS -W -Wall -Wextra -Wconversion -fPIC -fstrict-aliasing -Wstrict-aliasing=2 -Wno-long-long"
AMQ_CFLAGS="$PLAT_CFLAGS $DECAF_INCLUDES $DECAF_CFLAGS -W -Wall -fPIC"
else
AMQ_CXXFLAGS="$PLAT_CXXFLAGS $DECAF_INCLUDES $DECAF_CXXFLAGS"
AMQ_CFLAGS="$PLAT_CXXFLAGS $DECAF_INCLUDES $DECAF_CXXFLAGS"
fi
AMQ_LIBS="$PLAT_LIBS $DECAF_LIBS"
if test "$GCC" = "yes"; then
AMQ_TEST_CXXFLAGS="$AMQ_CXXFLAGS $DECAF_INCLUDES $DECAF_CXXFLAGS -Wno-non-virtual-dtor -Wno-unused-parameter -Wno-uninitialized"
else
AMQ_TEST_CXXFLAGS="$AMQ_CXXFLAGS $DECAF_INCLUDES $DECAF_CXXFLAGS"
fi
AMQ_TEST_LIBS="../main/libactivemq-cpp.la $DECAF_LIBS"
## Flags for building the test applications.
AC_SUBST([AMQ_TEST_CXXFLAGS])
AC_SUBST([AMQ_TEST_LIBS])
# Check to see if the compiler supports the visibility flags.
# If so, define HAVE_VISIBILITY_OPTIONS
CHECK_VISIBILITY()
## Not all platforms define addrinfo and related functions. If this platform
## supports addrinfo, defines HAVE_STRUCT_ADDRINFO.
CHECK_ADDRINFO()
## Execute Doxygen macros
DX_HTML_FEATURE(ON)
DX_CHM_FEATURE(OFF)
DX_CHI_FEATURE(OFF)
DX_MAN_FEATURE(OFF)
DX_RTF_FEATURE(OFF)
DX_XML_FEATURE(OFF)
DX_PDF_FEATURE(OFF)
DX_PS_FEATURE(OFF)
DX_INIT_DOXYGEN(activemq-cpp, doxygen.cfg, doc)
## -----------------------------------------------------
## configuration
## Generates Makefile's, configuration files and scripts
## -----------------------------------------------------
AC_OUTPUT_COMMANDS([chmod +x activemqcpp-config],[])
AC_CONFIG_FILES(Makefile)
AC_CONFIG_FILES(activemq-cpp.pc)
AC_CONFIG_FILES(src/main/Makefile)
AC_CONFIG_FILES(src/examples/Makefile)
AC_CONFIG_FILES(activemqcpp-config)
if test x$cppunit = xyes
then
AC_CONFIG_FILES(src/test/Makefile)
AC_CONFIG_FILES(src/test-integration/Makefile)
AC_CONFIG_FILES(src/test-benchmarks/Makefile)
fi
AC_OUTPUT