1 | # generated automatically by aclocal 1.14.1 -*- Autoconf -*-
|
---|
2 |
|
---|
3 | # Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
---|
4 |
|
---|
5 | # This file is free software; the Free Software Foundation
|
---|
6 | # gives unlimited permission to copy and/or distribute it,
|
---|
7 | # with or without modifications, as long as this notice is preserved.
|
---|
8 |
|
---|
9 | # This program is distributed in the hope that it will be useful,
|
---|
10 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
---|
11 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
---|
12 | # PARTICULAR PURPOSE.
|
---|
13 |
|
---|
14 | m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
|
---|
15 | m4_ifndef([AC_AUTOCONF_VERSION],
|
---|
16 | [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
---|
17 | m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
|
---|
18 | [m4_warning([this file was generated for autoconf 2.69.
|
---|
19 | You have another version of autoconf. It may work, but is not guaranteed to.
|
---|
20 | If you have problems, you may need to regenerate the build system entirely.
|
---|
21 | To do so, use the procedure documented by the package, typically 'autoreconf'.])])
|
---|
22 |
|
---|
23 | # ===========================================================================
|
---|
24 | # http://www.gnu.org/software/autoconf-archive/ax_boost_asio.html
|
---|
25 | # ===========================================================================
|
---|
26 | #
|
---|
27 | # SYNOPSIS
|
---|
28 | #
|
---|
29 | # AX_BOOST_ASIO
|
---|
30 | #
|
---|
31 | # DESCRIPTION
|
---|
32 | #
|
---|
33 | # Test for Asio library from the Boost C++ libraries. The macro requires a
|
---|
34 | # preceding call to AX_BOOST_BASE. Further documentation is available at
|
---|
35 | # <http://randspringer.de/boost/index.html>.
|
---|
36 | #
|
---|
37 | # This macro calls:
|
---|
38 | #
|
---|
39 | # AC_SUBST(BOOST_ASIO_LIB)
|
---|
40 | #
|
---|
41 | # And sets:
|
---|
42 | #
|
---|
43 | # HAVE_BOOST_ASIO
|
---|
44 | #
|
---|
45 | # LICENSE
|
---|
46 | #
|
---|
47 | # Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
|
---|
48 | # Copyright (c) 2008 Pete Greenwell <pete@mu.org>
|
---|
49 | #
|
---|
50 | # Copying and distribution of this file, with or without modification, are
|
---|
51 | # permitted in any medium without royalty provided the copyright notice
|
---|
52 | # and this notice are preserved. This file is offered as-is, without any
|
---|
53 | # warranty.
|
---|
54 |
|
---|
55 | #serial 16
|
---|
56 |
|
---|
57 | AC_DEFUN([AX_BOOST_ASIO],
|
---|
58 | [
|
---|
59 | AC_ARG_WITH([boost-asio],
|
---|
60 | AS_HELP_STRING([--with-boost-asio@<:@=special-lib@:>@],
|
---|
61 | [use the ASIO library from boost - it is possible to specify a certain library for the linker
|
---|
62 | e.g. --with-boost-asio=boost_system-gcc41-mt-1_34 ]),
|
---|
63 | [
|
---|
64 | if test "$withval" = "no"; then
|
---|
65 | want_boost="no"
|
---|
66 | elif test "$withval" = "yes"; then
|
---|
67 | want_boost="yes"
|
---|
68 | ax_boost_user_asio_lib=""
|
---|
69 | else
|
---|
70 | want_boost="yes"
|
---|
71 | ax_boost_user_asio_lib="$withval"
|
---|
72 | fi
|
---|
73 | ],
|
---|
74 | [want_boost="yes"]
|
---|
75 | )
|
---|
76 |
|
---|
77 | if test "x$want_boost" = "xyes"; then
|
---|
78 | AC_REQUIRE([AC_PROG_CC])
|
---|
79 | CPPFLAGS_SAVED="$CPPFLAGS"
|
---|
80 | CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
---|
81 | export CPPFLAGS
|
---|
82 |
|
---|
83 | LDFLAGS_SAVED="$LDFLAGS"
|
---|
84 | LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
---|
85 | export LDFLAGS
|
---|
86 |
|
---|
87 | AC_CACHE_CHECK(whether the Boost::ASIO library is available,
|
---|
88 | ax_cv_boost_asio,
|
---|
89 | [AC_LANG_PUSH([C++])
|
---|
90 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ @%:@include <boost/asio.hpp>
|
---|
91 | ]],
|
---|
92 | [[
|
---|
93 |
|
---|
94 | boost::asio::io_service io;
|
---|
95 | boost::system::error_code timer_result;
|
---|
96 | boost::asio::deadline_timer t(io);
|
---|
97 | t.cancel();
|
---|
98 | io.run_one();
|
---|
99 | return 0;
|
---|
100 | ]])],
|
---|
101 | ax_cv_boost_asio=yes, ax_cv_boost_asio=no)
|
---|
102 | AC_LANG_POP([C++])
|
---|
103 | ])
|
---|
104 | if test "x$ax_cv_boost_asio" = "xyes"; then
|
---|
105 | AC_DEFINE(HAVE_BOOST_ASIO,,[define if the Boost::ASIO library is available])
|
---|
106 | BN=boost_system
|
---|
107 | BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
|
---|
108 | if test "x$ax_boost_user_asio_lib" = "x"; then
|
---|
109 | for ax_lib in `ls $BOOSTLIBDIR/libboost_system*.so* $BOOSTLIBDIR/libboost_system*.dylib* $BOOSTLIBDIR/libboost_system*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_system.*\)\.so.*$;\1;' -e 's;^lib\(boost_system.*\)\.dylib.*$;\1;' -e 's;^lib\(boost_system.*\)\.a.*$;\1;' ` ; do
|
---|
110 | AC_CHECK_LIB($ax_lib, main, [BOOST_ASIO_LIB="-l$ax_lib" AC_SUBST(BOOST_ASIO_LIB) link_thread="yes" break],
|
---|
111 | [link_thread="no"])
|
---|
112 | done
|
---|
113 | else
|
---|
114 | for ax_lib in $ax_boost_user_asio_lib $BN-$ax_boost_user_asio_lib; do
|
---|
115 | AC_CHECK_LIB($ax_lib, main,
|
---|
116 | [BOOST_ASIO_LIB="-l$ax_lib" AC_SUBST(BOOST_ASIO_LIB) link_asio="yes" break],
|
---|
117 | [link_asio="no"])
|
---|
118 | done
|
---|
119 |
|
---|
120 | fi
|
---|
121 | if test "x$ax_lib" = "x"; then
|
---|
122 | AC_MSG_ERROR(Could not find a version of the library!)
|
---|
123 | fi
|
---|
124 | if test "x$link_asio" = "xno"; then
|
---|
125 | AC_MSG_ERROR(Could not link against $ax_lib !)
|
---|
126 | fi
|
---|
127 | fi
|
---|
128 |
|
---|
129 | CPPFLAGS="$CPPFLAGS_SAVED"
|
---|
130 | LDFLAGS="$LDFLAGS_SAVED"
|
---|
131 | fi
|
---|
132 | ])
|
---|
133 |
|
---|
134 | # ===========================================================================
|
---|
135 | # http://www.gnu.org/software/autoconf-archive/ax_boost_date_time.html
|
---|
136 | # ===========================================================================
|
---|
137 | #
|
---|
138 | # SYNOPSIS
|
---|
139 | #
|
---|
140 | # AX_BOOST_DATE_TIME
|
---|
141 | #
|
---|
142 | # DESCRIPTION
|
---|
143 | #
|
---|
144 | # Test for Date_Time library from the Boost C++ libraries. The macro
|
---|
145 | # requires a preceding call to AX_BOOST_BASE. Further documentation is
|
---|
146 | # available at <http://randspringer.de/boost/index.html>.
|
---|
147 | #
|
---|
148 | # This macro calls:
|
---|
149 | #
|
---|
150 | # AC_SUBST(BOOST_DATE_TIME_LIB)
|
---|
151 | #
|
---|
152 | # And sets:
|
---|
153 | #
|
---|
154 | # HAVE_BOOST_DATE_TIME
|
---|
155 | #
|
---|
156 | # LICENSE
|
---|
157 | #
|
---|
158 | # Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
|
---|
159 | # Copyright (c) 2008 Michael Tindal
|
---|
160 | #
|
---|
161 | # Copying and distribution of this file, with or without modification, are
|
---|
162 | # permitted in any medium without royalty provided the copyright notice
|
---|
163 | # and this notice are preserved. This file is offered as-is, without any
|
---|
164 | # warranty.
|
---|
165 |
|
---|
166 | #serial 21
|
---|
167 |
|
---|
168 | AC_DEFUN([AX_BOOST_DATE_TIME],
|
---|
169 | [
|
---|
170 | AC_ARG_WITH([boost-date-time],
|
---|
171 | AS_HELP_STRING([--with-boost-date-time@<:@=special-lib@:>@],
|
---|
172 | [use the Date_Time library from boost - it is possible to specify a certain library for the linker
|
---|
173 | e.g. --with-boost-date-time=boost_date_time-gcc-mt-d-1_33_1 ]),
|
---|
174 | [
|
---|
175 | if test "$withval" = "no"; then
|
---|
176 | want_boost="no"
|
---|
177 | elif test "$withval" = "yes"; then
|
---|
178 | want_boost="yes"
|
---|
179 | ax_boost_user_date_time_lib=""
|
---|
180 | else
|
---|
181 | want_boost="yes"
|
---|
182 | ax_boost_user_date_time_lib="$withval"
|
---|
183 | fi
|
---|
184 | ],
|
---|
185 | [want_boost="yes"]
|
---|
186 | )
|
---|
187 |
|
---|
188 | if test "x$want_boost" = "xyes"; then
|
---|
189 | AC_REQUIRE([AC_PROG_CC])
|
---|
190 | CPPFLAGS_SAVED="$CPPFLAGS"
|
---|
191 | CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
---|
192 | export CPPFLAGS
|
---|
193 |
|
---|
194 | LDFLAGS_SAVED="$LDFLAGS"
|
---|
195 | LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
---|
196 | export LDFLAGS
|
---|
197 |
|
---|
198 | AC_CACHE_CHECK(whether the Boost::Date_Time library is available,
|
---|
199 | ax_cv_boost_date_time,
|
---|
200 | [AC_LANG_PUSH([C++])
|
---|
201 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/date_time/gregorian/gregorian_types.hpp>]],
|
---|
202 | [[using namespace boost::gregorian; date d(2002,Jan,10);
|
---|
203 | return 0;
|
---|
204 | ]])],
|
---|
205 | ax_cv_boost_date_time=yes, ax_cv_boost_date_time=no)
|
---|
206 | AC_LANG_POP([C++])
|
---|
207 | ])
|
---|
208 | if test "x$ax_cv_boost_date_time" = "xyes"; then
|
---|
209 | AC_DEFINE(HAVE_BOOST_DATE_TIME,,[define if the Boost::Date_Time library is available])
|
---|
210 | BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
|
---|
211 | if test "x$ax_boost_user_date_time_lib" = "x"; then
|
---|
212 | for libextension in `ls $BOOSTLIBDIR/libboost_date_time*.so* $BOOSTLIBDIR/libboost_date_time*.dylib* $BOOSTLIBDIR/libboost_date_time*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_date_time.*\)\.so.*$;\1;' -e 's;^lib\(boost_date_time.*\)\.dylib.*$;\1;' -e 's;^lib\(boost_date_time.*\)\.a*$;\1;'` ; do
|
---|
213 | ax_lib=${libextension}
|
---|
214 | AC_CHECK_LIB($ax_lib, exit,
|
---|
215 | [BOOST_DATE_TIME_LIB="-l$ax_lib"; AC_SUBST(BOOST_DATE_TIME_LIB) link_date_time="yes"; break],
|
---|
216 | [link_date_time="no"])
|
---|
217 | done
|
---|
218 | if test "x$link_date_time" != "xyes"; then
|
---|
219 | for libextension in `ls $BOOSTLIBDIR/boost_date_time*.dll* $BOOSTLIBDIR/boost_date_time*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_date_time.*\)\.dll.*$;\1;' -e 's;^\(boost_date_time.*\)\.a.*$;\1;'` ; do
|
---|
220 | ax_lib=${libextension}
|
---|
221 | AC_CHECK_LIB($ax_lib, exit,
|
---|
222 | [BOOST_DATE_TIME_LIB="-l$ax_lib"; AC_SUBST(BOOST_DATE_TIME_LIB) link_date_time="yes"; break],
|
---|
223 | [link_date_time="no"])
|
---|
224 | done
|
---|
225 | fi
|
---|
226 |
|
---|
227 | else
|
---|
228 | for ax_lib in $ax_boost_user_date_time_lib boost_date_time-$ax_boost_user_date_time_lib; do
|
---|
229 | AC_CHECK_LIB($ax_lib, main,
|
---|
230 | [BOOST_DATE_TIME_LIB="-l$ax_lib"; AC_SUBST(BOOST_DATE_TIME_LIB) link_date_time="yes"; break],
|
---|
231 | [link_date_time="no"])
|
---|
232 | done
|
---|
233 |
|
---|
234 | fi
|
---|
235 | if test "x$ax_lib" = "x"; then
|
---|
236 | AC_MSG_ERROR(Could not find a version of the library!)
|
---|
237 | fi
|
---|
238 | if test "x$link_date_time" != "xyes"; then
|
---|
239 | AC_MSG_ERROR(Could not link against $ax_lib !)
|
---|
240 | fi
|
---|
241 | fi
|
---|
242 |
|
---|
243 | CPPFLAGS="$CPPFLAGS_SAVED"
|
---|
244 | LDFLAGS="$LDFLAGS_SAVED"
|
---|
245 | fi
|
---|
246 | ])
|
---|
247 |
|
---|
248 | # ===========================================================================
|
---|
249 | # http://www.gnu.org/software/autoconf-archive/ax_boost_filesystem.html
|
---|
250 | # ===========================================================================
|
---|
251 | #
|
---|
252 | # SYNOPSIS
|
---|
253 | #
|
---|
254 | # AX_BOOST_FILESYSTEM
|
---|
255 | #
|
---|
256 | # DESCRIPTION
|
---|
257 | #
|
---|
258 | # Test for Filesystem library from the Boost C++ libraries. The macro
|
---|
259 | # requires a preceding call to AX_BOOST_BASE. Further documentation is
|
---|
260 | # available at <http://randspringer.de/boost/index.html>.
|
---|
261 | #
|
---|
262 | # This macro calls:
|
---|
263 | #
|
---|
264 | # AC_SUBST(BOOST_FILESYSTEM_LIB)
|
---|
265 | #
|
---|
266 | # And sets:
|
---|
267 | #
|
---|
268 | # HAVE_BOOST_FILESYSTEM
|
---|
269 | #
|
---|
270 | # LICENSE
|
---|
271 | #
|
---|
272 | # Copyright (c) 2009 Thomas Porschberg <thomas@randspringer.de>
|
---|
273 | # Copyright (c) 2009 Michael Tindal
|
---|
274 | # Copyright (c) 2009 Roman Rybalko <libtorrent@romanr.info>
|
---|
275 | #
|
---|
276 | # Copying and distribution of this file, with or without modification, are
|
---|
277 | # permitted in any medium without royalty provided the copyright notice
|
---|
278 | # and this notice are preserved. This file is offered as-is, without any
|
---|
279 | # warranty.
|
---|
280 |
|
---|
281 | #serial 26
|
---|
282 |
|
---|
283 | AC_DEFUN([AX_BOOST_FILESYSTEM],
|
---|
284 | [
|
---|
285 | AC_ARG_WITH([boost-filesystem],
|
---|
286 | AS_HELP_STRING([--with-boost-filesystem@<:@=special-lib@:>@],
|
---|
287 | [use the Filesystem library from boost - it is possible to specify a certain library for the linker
|
---|
288 | e.g. --with-boost-filesystem=boost_filesystem-gcc-mt ]),
|
---|
289 | [
|
---|
290 | if test "$withval" = "no"; then
|
---|
291 | want_boost="no"
|
---|
292 | elif test "$withval" = "yes"; then
|
---|
293 | want_boost="yes"
|
---|
294 | ax_boost_user_filesystem_lib=""
|
---|
295 | else
|
---|
296 | want_boost="yes"
|
---|
297 | ax_boost_user_filesystem_lib="$withval"
|
---|
298 | fi
|
---|
299 | ],
|
---|
300 | [want_boost="yes"]
|
---|
301 | )
|
---|
302 |
|
---|
303 | if test "x$want_boost" = "xyes"; then
|
---|
304 | AC_REQUIRE([AC_PROG_CC])
|
---|
305 | CPPFLAGS_SAVED="$CPPFLAGS"
|
---|
306 | CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
---|
307 | export CPPFLAGS
|
---|
308 |
|
---|
309 | LDFLAGS_SAVED="$LDFLAGS"
|
---|
310 | LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
---|
311 | export LDFLAGS
|
---|
312 |
|
---|
313 | LIBS_SAVED=$LIBS
|
---|
314 | LIBS="$LIBS $BOOST_SYSTEM_LIB"
|
---|
315 | export LIBS
|
---|
316 |
|
---|
317 | AC_CACHE_CHECK(whether the Boost::Filesystem library is available,
|
---|
318 | ax_cv_boost_filesystem,
|
---|
319 | [AC_LANG_PUSH([C++])
|
---|
320 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/filesystem/path.hpp>]],
|
---|
321 | [[using namespace boost::filesystem;
|
---|
322 | path my_path( "foo/bar/data.txt" );
|
---|
323 | return 0;]])],
|
---|
324 | ax_cv_boost_filesystem=yes, ax_cv_boost_filesystem=no)
|
---|
325 | AC_LANG_POP([C++])
|
---|
326 | ])
|
---|
327 | if test "x$ax_cv_boost_filesystem" = "xyes"; then
|
---|
328 | AC_DEFINE(HAVE_BOOST_FILESYSTEM,,[define if the Boost::Filesystem library is available])
|
---|
329 | BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
|
---|
330 | if test "x$ax_boost_user_filesystem_lib" = "x"; then
|
---|
331 | for libextension in `ls -r $BOOSTLIBDIR/libboost_filesystem* 2>/dev/null | sed 's,.*/lib,,' | sed 's,\..*,,'` ; do
|
---|
332 | ax_lib=${libextension}
|
---|
333 | AC_CHECK_LIB($ax_lib, exit,
|
---|
334 | [BOOST_FILESYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_FILESYSTEM_LIB) link_filesystem="yes"; break],
|
---|
335 | [link_filesystem="no"])
|
---|
336 | done
|
---|
337 | if test "x$link_filesystem" != "xyes"; then
|
---|
338 | for libextension in `ls -r $BOOSTLIBDIR/boost_filesystem* 2>/dev/null | sed 's,.*/,,' | sed -e 's,\..*,,'` ; do
|
---|
339 | ax_lib=${libextension}
|
---|
340 | AC_CHECK_LIB($ax_lib, exit,
|
---|
341 | [BOOST_FILESYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_FILESYSTEM_LIB) link_filesystem="yes"; break],
|
---|
342 | [link_filesystem="no"])
|
---|
343 | done
|
---|
344 | fi
|
---|
345 | else
|
---|
346 | for ax_lib in $ax_boost_user_filesystem_lib boost_filesystem-$ax_boost_user_filesystem_lib; do
|
---|
347 | AC_CHECK_LIB($ax_lib, exit,
|
---|
348 | [BOOST_FILESYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_FILESYSTEM_LIB) link_filesystem="yes"; break],
|
---|
349 | [link_filesystem="no"])
|
---|
350 | done
|
---|
351 |
|
---|
352 | fi
|
---|
353 | if test "x$ax_lib" = "x"; then
|
---|
354 | AC_MSG_ERROR(Could not find a version of the library!)
|
---|
355 | fi
|
---|
356 | if test "x$link_filesystem" != "xyes"; then
|
---|
357 | AC_MSG_ERROR(Could not link against $ax_lib !)
|
---|
358 | fi
|
---|
359 | fi
|
---|
360 |
|
---|
361 | CPPFLAGS="$CPPFLAGS_SAVED"
|
---|
362 | LDFLAGS="$LDFLAGS_SAVED"
|
---|
363 | LIBS="$LIBS_SAVED"
|
---|
364 | fi
|
---|
365 | ])
|
---|
366 |
|
---|
367 | # ============================================================================
|
---|
368 | # http://www.gnu.org/software/autoconf-archive/ax_boost_program_options.html
|
---|
369 | # ============================================================================
|
---|
370 | #
|
---|
371 | # SYNOPSIS
|
---|
372 | #
|
---|
373 | # AX_BOOST_PROGRAM_OPTIONS
|
---|
374 | #
|
---|
375 | # DESCRIPTION
|
---|
376 | #
|
---|
377 | # Test for program options library from the Boost C++ libraries. The macro
|
---|
378 | # requires a preceding call to AX_BOOST_BASE. Further documentation is
|
---|
379 | # available at <http://randspringer.de/boost/index.html>.
|
---|
380 | #
|
---|
381 | # This macro calls:
|
---|
382 | #
|
---|
383 | # AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB)
|
---|
384 | #
|
---|
385 | # And sets:
|
---|
386 | #
|
---|
387 | # HAVE_BOOST_PROGRAM_OPTIONS
|
---|
388 | #
|
---|
389 | # LICENSE
|
---|
390 | #
|
---|
391 | # Copyright (c) 2009 Thomas Porschberg <thomas@randspringer.de>
|
---|
392 | #
|
---|
393 | # Copying and distribution of this file, with or without modification, are
|
---|
394 | # permitted in any medium without royalty provided the copyright notice
|
---|
395 | # and this notice are preserved. This file is offered as-is, without any
|
---|
396 | # warranty.
|
---|
397 |
|
---|
398 | #serial 22
|
---|
399 |
|
---|
400 | AC_DEFUN([AX_BOOST_PROGRAM_OPTIONS],
|
---|
401 | [
|
---|
402 | AC_ARG_WITH([boost-program-options],
|
---|
403 | AS_HELP_STRING([--with-boost-program-options@<:@=special-lib@:>@],
|
---|
404 | [use the program options library from boost - it is possible to specify a certain library for the linker
|
---|
405 | e.g. --with-boost-program-options=boost_program_options-gcc-mt-1_33_1 ]),
|
---|
406 | [
|
---|
407 | if test "$withval" = "no"; then
|
---|
408 | want_boost="no"
|
---|
409 | elif test "$withval" = "yes"; then
|
---|
410 | want_boost="yes"
|
---|
411 | ax_boost_user_program_options_lib=""
|
---|
412 | else
|
---|
413 | want_boost="yes"
|
---|
414 | ax_boost_user_program_options_lib="$withval"
|
---|
415 | fi
|
---|
416 | ],
|
---|
417 | [want_boost="yes"]
|
---|
418 | )
|
---|
419 |
|
---|
420 | if test "x$want_boost" = "xyes"; then
|
---|
421 | AC_REQUIRE([AC_PROG_CC])
|
---|
422 | export want_boost
|
---|
423 | CPPFLAGS_SAVED="$CPPFLAGS"
|
---|
424 | CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
---|
425 | export CPPFLAGS
|
---|
426 | LDFLAGS_SAVED="$LDFLAGS"
|
---|
427 | LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
---|
428 | export LDFLAGS
|
---|
429 | AC_CACHE_CHECK([whether the Boost::Program_Options library is available],
|
---|
430 | ax_cv_boost_program_options,
|
---|
431 | [AC_LANG_PUSH(C++)
|
---|
432 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/program_options.hpp>
|
---|
433 | ]],
|
---|
434 | [[boost::program_options::options_description generic("Generic options");
|
---|
435 | return 0;]])],
|
---|
436 | ax_cv_boost_program_options=yes, ax_cv_boost_program_options=no)
|
---|
437 | AC_LANG_POP([C++])
|
---|
438 | ])
|
---|
439 | if test "$ax_cv_boost_program_options" = yes; then
|
---|
440 | AC_DEFINE(HAVE_BOOST_PROGRAM_OPTIONS,,[define if the Boost::PROGRAM_OPTIONS library is available])
|
---|
441 | BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
|
---|
442 | if test "x$ax_boost_user_program_options_lib" = "x"; then
|
---|
443 | for libextension in `ls $BOOSTLIBDIR/libboost_program_options*.so* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_program_options.*\)\.so.*$;\1;'` `ls $BOOSTLIBDIR/libboost_program_options*.dylib* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_program_options.*\)\.dylib.*$;\1;'` `ls $BOOSTLIBDIR/libboost_program_options*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_program_options.*\)\.a.*$;\1;'` ; do
|
---|
444 | ax_lib=${libextension}
|
---|
445 | AC_CHECK_LIB($ax_lib, exit,
|
---|
446 | [BOOST_PROGRAM_OPTIONS_LIB="-l$ax_lib"; AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB) link_program_options="yes"; break],
|
---|
447 | [link_program_options="no"])
|
---|
448 | done
|
---|
449 | if test "x$link_program_options" != "xyes"; then
|
---|
450 | for libextension in `ls $BOOSTLIBDIR/boost_program_options*.dll* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_program_options.*\)\.dll.*$;\1;'` `ls $BOOSTLIBDIR/boost_program_options*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_program_options.*\)\.a.*$;\1;'` ; do
|
---|
451 | ax_lib=${libextension}
|
---|
452 | AC_CHECK_LIB($ax_lib, exit,
|
---|
453 | [BOOST_PROGRAM_OPTIONS_LIB="-l$ax_lib"; AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB) link_program_options="yes"; break],
|
---|
454 | [link_program_options="no"])
|
---|
455 | done
|
---|
456 | fi
|
---|
457 | else
|
---|
458 | for ax_lib in $ax_boost_user_program_options_lib boost_program_options-$ax_boost_user_program_options_lib; do
|
---|
459 | AC_CHECK_LIB($ax_lib, main,
|
---|
460 | [BOOST_PROGRAM_OPTIONS_LIB="-l$ax_lib"; AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB) link_program_options="yes"; break],
|
---|
461 | [link_program_options="no"])
|
---|
462 | done
|
---|
463 | fi
|
---|
464 | if test "x$ax_lib" = "x"; then
|
---|
465 | AC_MSG_ERROR(Could not find a version of the library!)
|
---|
466 | fi
|
---|
467 | if test "x$link_program_options" != "xyes"; then
|
---|
468 | AC_MSG_ERROR([Could not link against [$ax_lib] !])
|
---|
469 | fi
|
---|
470 | fi
|
---|
471 | CPPFLAGS="$CPPFLAGS_SAVED"
|
---|
472 | LDFLAGS="$LDFLAGS_SAVED"
|
---|
473 | fi
|
---|
474 | ])
|
---|
475 |
|
---|
476 | # ===========================================================================
|
---|
477 | # http://www.gnu.org/software/autoconf-archive/ax_boost_regex.html
|
---|
478 | # ===========================================================================
|
---|
479 | #
|
---|
480 | # SYNOPSIS
|
---|
481 | #
|
---|
482 | # AX_BOOST_REGEX
|
---|
483 | #
|
---|
484 | # DESCRIPTION
|
---|
485 | #
|
---|
486 | # Test for Regex library from the Boost C++ libraries. The macro requires
|
---|
487 | # a preceding call to AX_BOOST_BASE. Further documentation is available at
|
---|
488 | # <http://randspringer.de/boost/index.html>.
|
---|
489 | #
|
---|
490 | # This macro calls:
|
---|
491 | #
|
---|
492 | # AC_SUBST(BOOST_REGEX_LIB)
|
---|
493 | #
|
---|
494 | # And sets:
|
---|
495 | #
|
---|
496 | # HAVE_BOOST_REGEX
|
---|
497 | #
|
---|
498 | # LICENSE
|
---|
499 | #
|
---|
500 | # Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
|
---|
501 | # Copyright (c) 2008 Michael Tindal
|
---|
502 | #
|
---|
503 | # Copying and distribution of this file, with or without modification, are
|
---|
504 | # permitted in any medium without royalty provided the copyright notice
|
---|
505 | # and this notice are preserved. This file is offered as-is, without any
|
---|
506 | # warranty.
|
---|
507 |
|
---|
508 | #serial 22
|
---|
509 |
|
---|
510 | AC_DEFUN([AX_BOOST_REGEX],
|
---|
511 | [
|
---|
512 | AC_ARG_WITH([boost-regex],
|
---|
513 | AS_HELP_STRING([--with-boost-regex@<:@=special-lib@:>@],
|
---|
514 | [use the Regex library from boost - it is possible to specify a certain library for the linker
|
---|
515 | e.g. --with-boost-regex=boost_regex-gcc-mt-d-1_33_1 ]),
|
---|
516 | [
|
---|
517 | if test "$withval" = "no"; then
|
---|
518 | want_boost="no"
|
---|
519 | elif test "$withval" = "yes"; then
|
---|
520 | want_boost="yes"
|
---|
521 | ax_boost_user_regex_lib=""
|
---|
522 | else
|
---|
523 | want_boost="yes"
|
---|
524 | ax_boost_user_regex_lib="$withval"
|
---|
525 | fi
|
---|
526 | ],
|
---|
527 | [want_boost="yes"]
|
---|
528 | )
|
---|
529 |
|
---|
530 | if test "x$want_boost" = "xyes"; then
|
---|
531 | AC_REQUIRE([AC_PROG_CC])
|
---|
532 | CPPFLAGS_SAVED="$CPPFLAGS"
|
---|
533 | CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
---|
534 | export CPPFLAGS
|
---|
535 |
|
---|
536 | LDFLAGS_SAVED="$LDFLAGS"
|
---|
537 | LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
---|
538 | export LDFLAGS
|
---|
539 |
|
---|
540 | AC_CACHE_CHECK(whether the Boost::Regex library is available,
|
---|
541 | ax_cv_boost_regex,
|
---|
542 | [AC_LANG_PUSH([C++])
|
---|
543 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/regex.hpp>
|
---|
544 | ]],
|
---|
545 | [[boost::regex r(); return 0;]])],
|
---|
546 | ax_cv_boost_regex=yes, ax_cv_boost_regex=no)
|
---|
547 | AC_LANG_POP([C++])
|
---|
548 | ])
|
---|
549 | if test "x$ax_cv_boost_regex" = "xyes"; then
|
---|
550 | AC_DEFINE(HAVE_BOOST_REGEX,,[define if the Boost::Regex library is available])
|
---|
551 | BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
|
---|
552 | if test "x$ax_boost_user_regex_lib" = "x"; then
|
---|
553 | for libextension in `ls $BOOSTLIBDIR/libboost_regex*.so* $BOOSTLIBDIR/libboost_regex*.dylib* $BOOSTLIBDIR/libboost_regex*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_regex.*\)\.so.*$;\1;' -e 's;^lib\(boost_regex.*\)\.dylib.*;\1;' -e 's;^lib\(boost_regex.*\)\.a.*$;\1;'` ; do
|
---|
554 | ax_lib=${libextension}
|
---|
555 | AC_CHECK_LIB($ax_lib, exit,
|
---|
556 | [BOOST_REGEX_LIB="-l$ax_lib"; AC_SUBST(BOOST_REGEX_LIB) link_regex="yes"; break],
|
---|
557 | [link_regex="no"])
|
---|
558 | done
|
---|
559 | if test "x$link_regex" != "xyes"; then
|
---|
560 | for libextension in `ls $BOOSTLIBDIR/boost_regex*.dll* $BOOSTLIBDIR/boost_regex*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_regex.*\)\.dll.*$;\1;' -e 's;^\(boost_regex.*\)\.a.*$;\1;'` ; do
|
---|
561 | ax_lib=${libextension}
|
---|
562 | AC_CHECK_LIB($ax_lib, exit,
|
---|
563 | [BOOST_REGEX_LIB="-l$ax_lib"; AC_SUBST(BOOST_REGEX_LIB) link_regex="yes"; break],
|
---|
564 | [link_regex="no"])
|
---|
565 | done
|
---|
566 | fi
|
---|
567 |
|
---|
568 | else
|
---|
569 | for ax_lib in $ax_boost_user_regex_lib boost_regex-$ax_boost_user_regex_lib; do
|
---|
570 | AC_CHECK_LIB($ax_lib, main,
|
---|
571 | [BOOST_REGEX_LIB="-l$ax_lib"; AC_SUBST(BOOST_REGEX_LIB) link_regex="yes"; break],
|
---|
572 | [link_regex="no"])
|
---|
573 | done
|
---|
574 | fi
|
---|
575 | if test "x$ax_lib" = "x"; then
|
---|
576 | AC_MSG_ERROR(Could not find a version of the Boost::Regex library!)
|
---|
577 | fi
|
---|
578 | if test "x$link_regex" != "xyes"; then
|
---|
579 | AC_MSG_ERROR(Could not link against $ax_lib !)
|
---|
580 | fi
|
---|
581 | fi
|
---|
582 |
|
---|
583 | CPPFLAGS="$CPPFLAGS_SAVED"
|
---|
584 | LDFLAGS="$LDFLAGS_SAVED"
|
---|
585 | fi
|
---|
586 | ])
|
---|
587 |
|
---|
588 | # ===========================================================================
|
---|
589 | # http://www.gnu.org/software/autoconf-archive/ax_boost_system.html
|
---|
590 | # ===========================================================================
|
---|
591 | #
|
---|
592 | # SYNOPSIS
|
---|
593 | #
|
---|
594 | # AX_BOOST_SYSTEM
|
---|
595 | #
|
---|
596 | # DESCRIPTION
|
---|
597 | #
|
---|
598 | # Test for System library from the Boost C++ libraries. The macro requires
|
---|
599 | # a preceding call to AX_BOOST_BASE. Further documentation is available at
|
---|
600 | # <http://randspringer.de/boost/index.html>.
|
---|
601 | #
|
---|
602 | # This macro calls:
|
---|
603 | #
|
---|
604 | # AC_SUBST(BOOST_SYSTEM_LIB)
|
---|
605 | #
|
---|
606 | # And sets:
|
---|
607 | #
|
---|
608 | # HAVE_BOOST_SYSTEM
|
---|
609 | #
|
---|
610 | # LICENSE
|
---|
611 | #
|
---|
612 | # Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
|
---|
613 | # Copyright (c) 2008 Michael Tindal
|
---|
614 | # Copyright (c) 2008 Daniel Casimiro <dan.casimiro@gmail.com>
|
---|
615 | #
|
---|
616 | # Copying and distribution of this file, with or without modification, are
|
---|
617 | # permitted in any medium without royalty provided the copyright notice
|
---|
618 | # and this notice are preserved. This file is offered as-is, without any
|
---|
619 | # warranty.
|
---|
620 |
|
---|
621 | #serial 17
|
---|
622 |
|
---|
623 | AC_DEFUN([AX_BOOST_SYSTEM],
|
---|
624 | [
|
---|
625 | AC_ARG_WITH([boost-system],
|
---|
626 | AS_HELP_STRING([--with-boost-system@<:@=special-lib@:>@],
|
---|
627 | [use the System library from boost - it is possible to specify a certain library for the linker
|
---|
628 | e.g. --with-boost-system=boost_system-gcc-mt ]),
|
---|
629 | [
|
---|
630 | if test "$withval" = "no"; then
|
---|
631 | want_boost="no"
|
---|
632 | elif test "$withval" = "yes"; then
|
---|
633 | want_boost="yes"
|
---|
634 | ax_boost_user_system_lib=""
|
---|
635 | else
|
---|
636 | want_boost="yes"
|
---|
637 | ax_boost_user_system_lib="$withval"
|
---|
638 | fi
|
---|
639 | ],
|
---|
640 | [want_boost="yes"]
|
---|
641 | )
|
---|
642 |
|
---|
643 | if test "x$want_boost" = "xyes"; then
|
---|
644 | AC_REQUIRE([AC_PROG_CC])
|
---|
645 | AC_REQUIRE([AC_CANONICAL_BUILD])
|
---|
646 | CPPFLAGS_SAVED="$CPPFLAGS"
|
---|
647 | CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
---|
648 | export CPPFLAGS
|
---|
649 |
|
---|
650 | LDFLAGS_SAVED="$LDFLAGS"
|
---|
651 | LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
---|
652 | export LDFLAGS
|
---|
653 |
|
---|
654 | AC_CACHE_CHECK(whether the Boost::System library is available,
|
---|
655 | ax_cv_boost_system,
|
---|
656 | [AC_LANG_PUSH([C++])
|
---|
657 | CXXFLAGS_SAVE=$CXXFLAGS
|
---|
658 |
|
---|
659 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/system/error_code.hpp>]],
|
---|
660 | [[boost::system::system_category]])],
|
---|
661 | ax_cv_boost_system=yes, ax_cv_boost_system=no)
|
---|
662 | CXXFLAGS=$CXXFLAGS_SAVE
|
---|
663 | AC_LANG_POP([C++])
|
---|
664 | ])
|
---|
665 | if test "x$ax_cv_boost_system" = "xyes"; then
|
---|
666 | AC_SUBST(BOOST_CPPFLAGS)
|
---|
667 |
|
---|
668 | AC_DEFINE(HAVE_BOOST_SYSTEM,,[define if the Boost::System library is available])
|
---|
669 | BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
|
---|
670 |
|
---|
671 | LDFLAGS_SAVE=$LDFLAGS
|
---|
672 | if test "x$ax_boost_user_system_lib" = "x"; then
|
---|
673 | for libextension in `ls -r $BOOSTLIBDIR/libboost_system* 2>/dev/null | sed 's,.*/lib,,' | sed 's,\..*,,'` ; do
|
---|
674 | ax_lib=${libextension}
|
---|
675 | AC_CHECK_LIB($ax_lib, exit,
|
---|
676 | [BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break],
|
---|
677 | [link_system="no"])
|
---|
678 | done
|
---|
679 | if test "x$link_system" != "xyes"; then
|
---|
680 | for libextension in `ls -r $BOOSTLIBDIR/boost_system* 2>/dev/null | sed 's,.*/,,' | sed -e 's,\..*,,'` ; do
|
---|
681 | ax_lib=${libextension}
|
---|
682 | AC_CHECK_LIB($ax_lib, exit,
|
---|
683 | [BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break],
|
---|
684 | [link_system="no"])
|
---|
685 | done
|
---|
686 | fi
|
---|
687 |
|
---|
688 | else
|
---|
689 | for ax_lib in $ax_boost_user_system_lib boost_system-$ax_boost_user_system_lib; do
|
---|
690 | AC_CHECK_LIB($ax_lib, exit,
|
---|
691 | [BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break],
|
---|
692 | [link_system="no"])
|
---|
693 | done
|
---|
694 |
|
---|
695 | fi
|
---|
696 | if test "x$ax_lib" = "x"; then
|
---|
697 | AC_MSG_ERROR(Could not find a version of the library!)
|
---|
698 | fi
|
---|
699 | if test "x$link_system" = "xno"; then
|
---|
700 | AC_MSG_ERROR(Could not link against $ax_lib !)
|
---|
701 | fi
|
---|
702 | fi
|
---|
703 |
|
---|
704 | CPPFLAGS="$CPPFLAGS_SAVED"
|
---|
705 | LDFLAGS="$LDFLAGS_SAVED"
|
---|
706 | fi
|
---|
707 | ])
|
---|
708 |
|
---|
709 | # ===========================================================================
|
---|
710 | # http://www.gnu.org/software/autoconf-archive/ax_boost_thread.html
|
---|
711 | # ===========================================================================
|
---|
712 | #
|
---|
713 | # SYNOPSIS
|
---|
714 | #
|
---|
715 | # AX_BOOST_THREAD
|
---|
716 | #
|
---|
717 | # DESCRIPTION
|
---|
718 | #
|
---|
719 | # Test for Thread library from the Boost C++ libraries. The macro requires
|
---|
720 | # a preceding call to AX_BOOST_BASE. Further documentation is available at
|
---|
721 | # <http://randspringer.de/boost/index.html>.
|
---|
722 | #
|
---|
723 | # This macro calls:
|
---|
724 | #
|
---|
725 | # AC_SUBST(BOOST_THREAD_LIB)
|
---|
726 | #
|
---|
727 | # And sets:
|
---|
728 | #
|
---|
729 | # HAVE_BOOST_THREAD
|
---|
730 | #
|
---|
731 | # LICENSE
|
---|
732 | #
|
---|
733 | # Copyright (c) 2009 Thomas Porschberg <thomas@randspringer.de>
|
---|
734 | # Copyright (c) 2009 Michael Tindal
|
---|
735 | #
|
---|
736 | # Copying and distribution of this file, with or without modification, are
|
---|
737 | # permitted in any medium without royalty provided the copyright notice
|
---|
738 | # and this notice are preserved. This file is offered as-is, without any
|
---|
739 | # warranty.
|
---|
740 |
|
---|
741 | #serial 27
|
---|
742 |
|
---|
743 | AC_DEFUN([AX_BOOST_THREAD],
|
---|
744 | [
|
---|
745 | AC_ARG_WITH([boost-thread],
|
---|
746 | AS_HELP_STRING([--with-boost-thread@<:@=special-lib@:>@],
|
---|
747 | [use the Thread library from boost - it is possible to specify a certain library for the linker
|
---|
748 | e.g. --with-boost-thread=boost_thread-gcc-mt ]),
|
---|
749 | [
|
---|
750 | if test "$withval" = "no"; then
|
---|
751 | want_boost="no"
|
---|
752 | elif test "$withval" = "yes"; then
|
---|
753 | want_boost="yes"
|
---|
754 | ax_boost_user_thread_lib=""
|
---|
755 | else
|
---|
756 | want_boost="yes"
|
---|
757 | ax_boost_user_thread_lib="$withval"
|
---|
758 | fi
|
---|
759 | ],
|
---|
760 | [want_boost="yes"]
|
---|
761 | )
|
---|
762 |
|
---|
763 | if test "x$want_boost" = "xyes"; then
|
---|
764 | AC_REQUIRE([AC_PROG_CC])
|
---|
765 | AC_REQUIRE([AC_CANONICAL_BUILD])
|
---|
766 | CPPFLAGS_SAVED="$CPPFLAGS"
|
---|
767 | CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
---|
768 | export CPPFLAGS
|
---|
769 |
|
---|
770 | LDFLAGS_SAVED="$LDFLAGS"
|
---|
771 | LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
---|
772 | export LDFLAGS
|
---|
773 |
|
---|
774 | AC_CACHE_CHECK(whether the Boost::Thread library is available,
|
---|
775 | ax_cv_boost_thread,
|
---|
776 | [AC_LANG_PUSH([C++])
|
---|
777 | CXXFLAGS_SAVE=$CXXFLAGS
|
---|
778 |
|
---|
779 | if test "x$host_os" = "xsolaris" ; then
|
---|
780 | CXXFLAGS="-pthreads $CXXFLAGS"
|
---|
781 | elif test "x$host_os" = "xmingw32" ; then
|
---|
782 | CXXFLAGS="-mthreads $CXXFLAGS"
|
---|
783 | else
|
---|
784 | CXXFLAGS="-pthread $CXXFLAGS"
|
---|
785 | fi
|
---|
786 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/thread/thread.hpp>]],
|
---|
787 | [[boost::thread_group thrds;
|
---|
788 | return 0;]])],
|
---|
789 | ax_cv_boost_thread=yes, ax_cv_boost_thread=no)
|
---|
790 | CXXFLAGS=$CXXFLAGS_SAVE
|
---|
791 | AC_LANG_POP([C++])
|
---|
792 | ])
|
---|
793 | if test "x$ax_cv_boost_thread" = "xyes"; then
|
---|
794 | if test "x$host_os" = "xsolaris" ; then
|
---|
795 | BOOST_CPPFLAGS="-pthreads $BOOST_CPPFLAGS"
|
---|
796 | elif test "x$host_os" = "xmingw32" ; then
|
---|
797 | BOOST_CPPFLAGS="-mthreads $BOOST_CPPFLAGS"
|
---|
798 | else
|
---|
799 | BOOST_CPPFLAGS="-pthread $BOOST_CPPFLAGS"
|
---|
800 | fi
|
---|
801 |
|
---|
802 | AC_SUBST(BOOST_CPPFLAGS)
|
---|
803 |
|
---|
804 | AC_DEFINE(HAVE_BOOST_THREAD,,[define if the Boost::Thread library is available])
|
---|
805 | BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
|
---|
806 |
|
---|
807 | LDFLAGS_SAVE=$LDFLAGS
|
---|
808 | case "x$host_os" in
|
---|
809 | *bsd* )
|
---|
810 | LDFLAGS="-pthread $LDFLAGS"
|
---|
811 | break;
|
---|
812 | ;;
|
---|
813 | esac
|
---|
814 | if test "x$ax_boost_user_thread_lib" = "x"; then
|
---|
815 | for libextension in `ls -r $BOOSTLIBDIR/libboost_thread* 2>/dev/null | sed 's,.*/lib,,' | sed 's,\..*,,'`; do
|
---|
816 | ax_lib=${libextension}
|
---|
817 | AC_CHECK_LIB($ax_lib, exit,
|
---|
818 | [BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break],
|
---|
819 | [link_thread="no"])
|
---|
820 | done
|
---|
821 | if test "x$link_thread" != "xyes"; then
|
---|
822 | for libextension in `ls -r $BOOSTLIBDIR/boost_thread* 2>/dev/null | sed 's,.*/,,' | sed 's,\..*,,'`; do
|
---|
823 | ax_lib=${libextension}
|
---|
824 | AC_CHECK_LIB($ax_lib, exit,
|
---|
825 | [BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break],
|
---|
826 | [link_thread="no"])
|
---|
827 | done
|
---|
828 | fi
|
---|
829 |
|
---|
830 | else
|
---|
831 | for ax_lib in $ax_boost_user_thread_lib boost_thread-$ax_boost_user_thread_lib; do
|
---|
832 | AC_CHECK_LIB($ax_lib, exit,
|
---|
833 | [BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break],
|
---|
834 | [link_thread="no"])
|
---|
835 | done
|
---|
836 |
|
---|
837 | fi
|
---|
838 | if test "x$ax_lib" = "x"; then
|
---|
839 | AC_MSG_ERROR(Could not find a version of the library!)
|
---|
840 | fi
|
---|
841 | if test "x$link_thread" = "xno"; then
|
---|
842 | AC_MSG_ERROR(Could not link against $ax_lib !)
|
---|
843 | else
|
---|
844 | case "x$host_os" in
|
---|
845 | *bsd* )
|
---|
846 | BOOST_LDFLAGS="-pthread $BOOST_LDFLAGS"
|
---|
847 | break;
|
---|
848 | ;;
|
---|
849 | esac
|
---|
850 |
|
---|
851 | fi
|
---|
852 | fi
|
---|
853 |
|
---|
854 | CPPFLAGS="$CPPFLAGS_SAVED"
|
---|
855 | LDFLAGS="$LDFLAGS_SAVED"
|
---|
856 | fi
|
---|
857 | ])
|
---|
858 |
|
---|
859 | # ===========================================================================
|
---|
860 | # http://www.gnu.org/software/autoconf-archive/ax_prog_doxygen.html
|
---|
861 | # ===========================================================================
|
---|
862 | #
|
---|
863 | # SYNOPSIS
|
---|
864 | #
|
---|
865 | # DX_INIT_DOXYGEN(PROJECT-NAME, DOXYFILE-PATH, [OUTPUT-DIR])
|
---|
866 | # DX_DOXYGEN_FEATURE(ON|OFF)
|
---|
867 | # DX_DOT_FEATURE(ON|OFF)
|
---|
868 | # DX_HTML_FEATURE(ON|OFF)
|
---|
869 | # DX_CHM_FEATURE(ON|OFF)
|
---|
870 | # DX_CHI_FEATURE(ON|OFF)
|
---|
871 | # DX_MAN_FEATURE(ON|OFF)
|
---|
872 | # DX_RTF_FEATURE(ON|OFF)
|
---|
873 | # DX_XML_FEATURE(ON|OFF)
|
---|
874 | # DX_PDF_FEATURE(ON|OFF)
|
---|
875 | # DX_PS_FEATURE(ON|OFF)
|
---|
876 | #
|
---|
877 | # DESCRIPTION
|
---|
878 | #
|
---|
879 | # The DX_*_FEATURE macros control the default setting for the given
|
---|
880 | # Doxygen feature. Supported features are 'DOXYGEN' itself, 'DOT' for
|
---|
881 | # generating graphics, 'HTML' for plain HTML, 'CHM' for compressed HTML
|
---|
882 | # help (for MS users), 'CHI' for generating a seperate .chi file by the
|
---|
883 | # .chm file, and 'MAN', 'RTF', 'XML', 'PDF' and 'PS' for the appropriate
|
---|
884 | # output formats. The environment variable DOXYGEN_PAPER_SIZE may be
|
---|
885 | # specified to override the default 'a4wide' paper size.
|
---|
886 | #
|
---|
887 | # By default, HTML, PDF and PS documentation is generated as this seems to
|
---|
888 | # be the most popular and portable combination. MAN pages created by
|
---|
889 | # Doxygen are usually problematic, though by picking an appropriate subset
|
---|
890 | # and doing some massaging they might be better than nothing. CHM and RTF
|
---|
891 | # are specific for MS (note that you can't generate both HTML and CHM at
|
---|
892 | # the same time). The XML is rather useless unless you apply specialized
|
---|
893 | # post-processing to it.
|
---|
894 | #
|
---|
895 | # The macros mainly control the default state of the feature. The use can
|
---|
896 | # override the default by specifying --enable or --disable. The macros
|
---|
897 | # ensure that contradictory flags are not given (e.g.,
|
---|
898 | # --enable-doxygen-html and --enable-doxygen-chm,
|
---|
899 | # --enable-doxygen-anything with --disable-doxygen, etc.) Finally, each
|
---|
900 | # feature will be automatically disabled (with a warning) if the required
|
---|
901 | # programs are missing.
|
---|
902 | #
|
---|
903 | # Once all the feature defaults have been specified, call DX_INIT_DOXYGEN
|
---|
904 | # with the following parameters: a one-word name for the project for use
|
---|
905 | # as a filename base etc., an optional configuration file name (the
|
---|
906 | # default is 'Doxyfile', the same as Doxygen's default), and an optional
|
---|
907 | # output directory name (the default is 'doxygen-doc').
|
---|
908 | #
|
---|
909 | # Automake Support
|
---|
910 | #
|
---|
911 | # The following is a template aminclude.am file for use with Automake.
|
---|
912 | # Make targets and variables values are controlled by the various
|
---|
913 | # DX_COND_* conditionals set by autoconf.
|
---|
914 | #
|
---|
915 | # The provided targets are:
|
---|
916 | #
|
---|
917 | # doxygen-doc: Generate all doxygen documentation.
|
---|
918 | #
|
---|
919 | # doxygen-run: Run doxygen, which will generate some of the
|
---|
920 | # documentation (HTML, CHM, CHI, MAN, RTF, XML)
|
---|
921 | # but will not do the post processing required
|
---|
922 | # for the rest of it (PS, PDF, and some MAN).
|
---|
923 | #
|
---|
924 | # doxygen-man: Rename some doxygen generated man pages.
|
---|
925 | #
|
---|
926 | # doxygen-ps: Generate doxygen PostScript documentation.
|
---|
927 | #
|
---|
928 | # doxygen-pdf: Generate doxygen PDF documentation.
|
---|
929 | #
|
---|
930 | # Note that by default these are not integrated into the automake targets.
|
---|
931 | # If doxygen is used to generate man pages, you can achieve this
|
---|
932 | # integration by setting man3_MANS to the list of man pages generated and
|
---|
933 | # then adding the dependency:
|
---|
934 | #
|
---|
935 | # $(man3_MANS): doxygen-doc
|
---|
936 | #
|
---|
937 | # This will cause make to run doxygen and generate all the documentation.
|
---|
938 | #
|
---|
939 | # The following variable is intended for use in Makefile.am:
|
---|
940 | #
|
---|
941 | # DX_CLEANFILES = everything to clean.
|
---|
942 | #
|
---|
943 | # Then add this variable to MOSTLYCLEANFILES.
|
---|
944 | #
|
---|
945 | # ----- begin aminclude.am -------------------------------------
|
---|
946 | #
|
---|
947 | # ## --------------------------------- ##
|
---|
948 | # ## Format-independent Doxygen rules. ##
|
---|
949 | # ## --------------------------------- ##
|
---|
950 | #
|
---|
951 | # if DX_COND_doc
|
---|
952 | #
|
---|
953 | # ## ------------------------------- ##
|
---|
954 | # ## Rules specific for HTML output. ##
|
---|
955 | # ## ------------------------------- ##
|
---|
956 | #
|
---|
957 | # if DX_COND_html
|
---|
958 | #
|
---|
959 | # DX_CLEAN_HTML = @DX_DOCDIR@/html
|
---|
960 | #
|
---|
961 | # endif DX_COND_html
|
---|
962 | #
|
---|
963 | # ## ------------------------------ ##
|
---|
964 | # ## Rules specific for CHM output. ##
|
---|
965 | # ## ------------------------------ ##
|
---|
966 | #
|
---|
967 | # if DX_COND_chm
|
---|
968 | #
|
---|
969 | # DX_CLEAN_CHM = @DX_DOCDIR@/chm
|
---|
970 | #
|
---|
971 | # if DX_COND_chi
|
---|
972 | #
|
---|
973 | # DX_CLEAN_CHI = @DX_DOCDIR@/@PACKAGE@.chi
|
---|
974 | #
|
---|
975 | # endif DX_COND_chi
|
---|
976 | #
|
---|
977 | # endif DX_COND_chm
|
---|
978 | #
|
---|
979 | # ## ------------------------------ ##
|
---|
980 | # ## Rules specific for MAN output. ##
|
---|
981 | # ## ------------------------------ ##
|
---|
982 | #
|
---|
983 | # if DX_COND_man
|
---|
984 | #
|
---|
985 | # DX_CLEAN_MAN = @DX_DOCDIR@/man
|
---|
986 | #
|
---|
987 | # endif DX_COND_man
|
---|
988 | #
|
---|
989 | # ## ------------------------------ ##
|
---|
990 | # ## Rules specific for RTF output. ##
|
---|
991 | # ## ------------------------------ ##
|
---|
992 | #
|
---|
993 | # if DX_COND_rtf
|
---|
994 | #
|
---|
995 | # DX_CLEAN_RTF = @DX_DOCDIR@/rtf
|
---|
996 | #
|
---|
997 | # endif DX_COND_rtf
|
---|
998 | #
|
---|
999 | # ## ------------------------------ ##
|
---|
1000 | # ## Rules specific for XML output. ##
|
---|
1001 | # ## ------------------------------ ##
|
---|
1002 | #
|
---|
1003 | # if DX_COND_xml
|
---|
1004 | #
|
---|
1005 | # DX_CLEAN_XML = @DX_DOCDIR@/xml
|
---|
1006 | #
|
---|
1007 | # endif DX_COND_xml
|
---|
1008 | #
|
---|
1009 | # ## ----------------------------- ##
|
---|
1010 | # ## Rules specific for PS output. ##
|
---|
1011 | # ## ----------------------------- ##
|
---|
1012 | #
|
---|
1013 | # if DX_COND_ps
|
---|
1014 | #
|
---|
1015 | # DX_CLEAN_PS = @DX_DOCDIR@/@PACKAGE@.ps
|
---|
1016 | #
|
---|
1017 | # DX_PS_GOAL = doxygen-ps
|
---|
1018 | #
|
---|
1019 | # doxygen-ps: @DX_DOCDIR@/@PACKAGE@.ps
|
---|
1020 | #
|
---|
1021 | # @DX_DOCDIR@/@PACKAGE@.ps: @DX_DOCDIR@/@PACKAGE@.tag
|
---|
1022 | # cd @DX_DOCDIR@/latex; \
|
---|
1023 | # rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \
|
---|
1024 | # $(DX_LATEX) refman.tex; \
|
---|
1025 | # $(MAKEINDEX_PATH) refman.idx; \
|
---|
1026 | # $(DX_LATEX) refman.tex; \
|
---|
1027 | # countdown=5; \
|
---|
1028 | # while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \
|
---|
1029 | # refman.log > /dev/null 2>&1 \
|
---|
1030 | # && test $$countdown -gt 0; do \
|
---|
1031 | # $(DX_LATEX) refman.tex; \
|
---|
1032 | # countdown=`expr $$countdown - 1`; \
|
---|
1033 | # done; \
|
---|
1034 | # $(DX_DVIPS) -o ../@PACKAGE@.ps refman.dvi
|
---|
1035 | #
|
---|
1036 | # endif DX_COND_ps
|
---|
1037 | #
|
---|
1038 | # ## ------------------------------ ##
|
---|
1039 | # ## Rules specific for PDF output. ##
|
---|
1040 | # ## ------------------------------ ##
|
---|
1041 | #
|
---|
1042 | # if DX_COND_pdf
|
---|
1043 | #
|
---|
1044 | # DX_CLEAN_PDF = @DX_DOCDIR@/@PACKAGE@.pdf
|
---|
1045 | #
|
---|
1046 | # DX_PDF_GOAL = doxygen-pdf
|
---|
1047 | #
|
---|
1048 | # doxygen-pdf: @DX_DOCDIR@/@PACKAGE@.pdf
|
---|
1049 | #
|
---|
1050 | # @DX_DOCDIR@/@PACKAGE@.pdf: @DX_DOCDIR@/@PACKAGE@.tag
|
---|
1051 | # cd @DX_DOCDIR@/latex; \
|
---|
1052 | # rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \
|
---|
1053 | # $(DX_PDFLATEX) refman.tex; \
|
---|
1054 | # $(DX_MAKEINDEX) refman.idx; \
|
---|
1055 | # $(DX_PDFLATEX) refman.tex; \
|
---|
1056 | # countdown=5; \
|
---|
1057 | # while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \
|
---|
1058 | # refman.log > /dev/null 2>&1 \
|
---|
1059 | # && test $$countdown -gt 0; do \
|
---|
1060 | # $(DX_PDFLATEX) refman.tex; \
|
---|
1061 | # countdown=`expr $$countdown - 1`; \
|
---|
1062 | # done; \
|
---|
1063 | # mv refman.pdf ../@PACKAGE@.pdf
|
---|
1064 | #
|
---|
1065 | # endif DX_COND_pdf
|
---|
1066 | #
|
---|
1067 | # ## ------------------------------------------------- ##
|
---|
1068 | # ## Rules specific for LaTeX (shared for PS and PDF). ##
|
---|
1069 | # ## ------------------------------------------------- ##
|
---|
1070 | #
|
---|
1071 | # if DX_COND_latex
|
---|
1072 | #
|
---|
1073 | # DX_CLEAN_LATEX = @DX_DOCDIR@/latex
|
---|
1074 | #
|
---|
1075 | # endif DX_COND_latex
|
---|
1076 | #
|
---|
1077 | # .PHONY: doxygen-run doxygen-doc $(DX_PS_GOAL) $(DX_PDF_GOAL)
|
---|
1078 | #
|
---|
1079 | # .INTERMEDIATE: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL)
|
---|
1080 | #
|
---|
1081 | # doxygen-run: @DX_DOCDIR@/@PACKAGE@.tag
|
---|
1082 | #
|
---|
1083 | # doxygen-doc: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL)
|
---|
1084 | #
|
---|
1085 | # @DX_DOCDIR@/@PACKAGE@.tag: $(DX_CONFIG) $(pkginclude_HEADERS)
|
---|
1086 | # rm -rf @DX_DOCDIR@
|
---|
1087 | # $(DX_ENV) $(DX_DOXYGEN) $(srcdir)/$(DX_CONFIG)
|
---|
1088 | #
|
---|
1089 | # DX_CLEANFILES = \
|
---|
1090 | # @DX_DOCDIR@/@PACKAGE@.tag \
|
---|
1091 | # -r \
|
---|
1092 | # $(DX_CLEAN_HTML) \
|
---|
1093 | # $(DX_CLEAN_CHM) \
|
---|
1094 | # $(DX_CLEAN_CHI) \
|
---|
1095 | # $(DX_CLEAN_MAN) \
|
---|
1096 | # $(DX_CLEAN_RTF) \
|
---|
1097 | # $(DX_CLEAN_XML) \
|
---|
1098 | # $(DX_CLEAN_PS) \
|
---|
1099 | # $(DX_CLEAN_PDF) \
|
---|
1100 | # $(DX_CLEAN_LATEX)
|
---|
1101 | #
|
---|
1102 | # endif DX_COND_doc
|
---|
1103 | #
|
---|
1104 | # ----- end aminclude.am ---------------------------------------
|
---|
1105 | #
|
---|
1106 | # LICENSE
|
---|
1107 | #
|
---|
1108 | # Copyright (c) 2009 Oren Ben-Kiki <oren@ben-kiki.org>
|
---|
1109 | #
|
---|
1110 | # Copying and distribution of this file, with or without modification, are
|
---|
1111 | # permitted in any medium without royalty provided the copyright notice
|
---|
1112 | # and this notice are preserved. This file is offered as-is, without any
|
---|
1113 | # warranty.
|
---|
1114 |
|
---|
1115 | #serial 12
|
---|
1116 |
|
---|
1117 |
|
---|
1118 | DX_ENV=""
|
---|
1119 | AC_DEFUN([DX_FEATURE_doc], ON)
|
---|
1120 | AC_DEFUN([DX_FEATURE_dot], OFF)
|
---|
1121 | AC_DEFUN([DX_FEATURE_man], OFF)
|
---|
1122 | AC_DEFUN([DX_FEATURE_html], ON)
|
---|
1123 | AC_DEFUN([DX_FEATURE_chm], OFF)
|
---|
1124 | AC_DEFUN([DX_FEATURE_chi], OFF)
|
---|
1125 | AC_DEFUN([DX_FEATURE_rtf], OFF)
|
---|
1126 | AC_DEFUN([DX_FEATURE_xml], OFF)
|
---|
1127 | AC_DEFUN([DX_FEATURE_pdf], ON)
|
---|
1128 | AC_DEFUN([DX_FEATURE_ps], ON)
|
---|
1129 |
|
---|
1130 |
|
---|
1131 | # DX_ENV_APPEND(VARIABLE, VALUE)
|
---|
1132 | # ------------------------------
|
---|
1133 | # Append VARIABLE="VALUE" to DX_ENV for invoking doxygen.
|
---|
1134 | AC_DEFUN([DX_ENV_APPEND], [AC_SUBST([DX_ENV], ["$DX_ENV $1='$2'"])])
|
---|
1135 |
|
---|
1136 | # DX_DIRNAME_EXPR
|
---|
1137 | # ---------------
|
---|
1138 | # Expand into a shell expression prints the directory part of a path.
|
---|
1139 | AC_DEFUN([DX_DIRNAME_EXPR],
|
---|
1140 | [[expr ".$1" : '\(\.\)[^/]*$' \| "x$1" : 'x\(.*\)/[^/]*$']])
|
---|
1141 |
|
---|
1142 | # DX_IF_FEATURE(FEATURE, IF-ON, IF-OFF)
|
---|
1143 | # -------------------------------------
|
---|
1144 | # Expands according to the M4 (static) status of the feature.
|
---|
1145 | AC_DEFUN([DX_IF_FEATURE], [ifelse(DX_FEATURE_$1, ON, [$2], [$3])])
|
---|
1146 |
|
---|
1147 | # DX_REQUIRE_PROG(VARIABLE, PROGRAM)
|
---|
1148 | # ----------------------------------
|
---|
1149 | # Require the specified program to be found for the DX_CURRENT_FEATURE to work.
|
---|
1150 | AC_DEFUN([DX_REQUIRE_PROG], [
|
---|
1151 | AC_PATH_TOOL([$1], [$2])
|
---|
1152 | if test "$DX_FLAG_[]DX_CURRENT_FEATURE$$1" = 1; then
|
---|
1153 | AC_MSG_WARN([$2 not found - will not DX_CURRENT_DESCRIPTION])
|
---|
1154 | AC_SUBST(DX_FLAG_[]DX_CURRENT_FEATURE, 0)
|
---|
1155 | fi
|
---|
1156 | ])
|
---|
1157 |
|
---|
1158 | # DX_TEST_FEATURE(FEATURE)
|
---|
1159 | # ------------------------
|
---|
1160 | # Expand to a shell expression testing whether the feature is active.
|
---|
1161 | AC_DEFUN([DX_TEST_FEATURE], [test "$DX_FLAG_$1" = 1])
|
---|
1162 |
|
---|
1163 | # DX_CHECK_DEPEND(REQUIRED_FEATURE, REQUIRED_STATE)
|
---|
1164 | # -------------------------------------------------
|
---|
1165 | # Verify that a required features has the right state before trying to turn on
|
---|
1166 | # the DX_CURRENT_FEATURE.
|
---|
1167 | AC_DEFUN([DX_CHECK_DEPEND], [
|
---|
1168 | test "$DX_FLAG_$1" = "$2" \
|
---|
1169 | || AC_MSG_ERROR([doxygen-DX_CURRENT_FEATURE ifelse([$2], 1,
|
---|
1170 | requires, contradicts) doxygen-DX_CURRENT_FEATURE])
|
---|
1171 | ])
|
---|
1172 |
|
---|
1173 | # DX_CLEAR_DEPEND(FEATURE, REQUIRED_FEATURE, REQUIRED_STATE)
|
---|
1174 | # ----------------------------------------------------------
|
---|
1175 | # Turn off the DX_CURRENT_FEATURE if the required feature is off.
|
---|
1176 | AC_DEFUN([DX_CLEAR_DEPEND], [
|
---|
1177 | test "$DX_FLAG_$1" = "$2" || AC_SUBST(DX_FLAG_[]DX_CURRENT_FEATURE, 0)
|
---|
1178 | ])
|
---|
1179 |
|
---|
1180 | # DX_FEATURE_ARG(FEATURE, DESCRIPTION,
|
---|
1181 | # CHECK_DEPEND, CLEAR_DEPEND,
|
---|
1182 | # REQUIRE, DO-IF-ON, DO-IF-OFF)
|
---|
1183 | # --------------------------------------------
|
---|
1184 | # Parse the command-line option controlling a feature. CHECK_DEPEND is called
|
---|
1185 | # if the user explicitly turns the feature on (and invokes DX_CHECK_DEPEND),
|
---|
1186 | # otherwise CLEAR_DEPEND is called to turn off the default state if a required
|
---|
1187 | # feature is disabled (using DX_CLEAR_DEPEND). REQUIRE performs additional
|
---|
1188 | # requirement tests (DX_REQUIRE_PROG). Finally, an automake flag is set and
|
---|
1189 | # DO-IF-ON or DO-IF-OFF are called according to the final state of the feature.
|
---|
1190 | AC_DEFUN([DX_ARG_ABLE], [
|
---|
1191 | AC_DEFUN([DX_CURRENT_FEATURE], [$1])
|
---|
1192 | AC_DEFUN([DX_CURRENT_DESCRIPTION], [$2])
|
---|
1193 | AC_ARG_ENABLE(doxygen-$1,
|
---|
1194 | [AS_HELP_STRING(DX_IF_FEATURE([$1], [--disable-doxygen-$1],
|
---|
1195 | [--enable-doxygen-$1]),
|
---|
1196 | DX_IF_FEATURE([$1], [don't $2], [$2]))],
|
---|
1197 | [
|
---|
1198 | case "$enableval" in
|
---|
1199 | #(
|
---|
1200 | y|Y|yes|Yes|YES)
|
---|
1201 | AC_SUBST([DX_FLAG_$1], 1)
|
---|
1202 | $3
|
---|
1203 | ;; #(
|
---|
1204 | n|N|no|No|NO)
|
---|
1205 | AC_SUBST([DX_FLAG_$1], 0)
|
---|
1206 | ;; #(
|
---|
1207 | *)
|
---|
1208 | AC_MSG_ERROR([invalid value '$enableval' given to doxygen-$1])
|
---|
1209 | ;;
|
---|
1210 | esac
|
---|
1211 | ], [
|
---|
1212 | AC_SUBST([DX_FLAG_$1], [DX_IF_FEATURE([$1], 1, 0)])
|
---|
1213 | $4
|
---|
1214 | ])
|
---|
1215 | if DX_TEST_FEATURE([$1]); then
|
---|
1216 | $5
|
---|
1217 | :
|
---|
1218 | fi
|
---|
1219 | AM_CONDITIONAL(DX_COND_$1, DX_TEST_FEATURE([$1]))
|
---|
1220 | if DX_TEST_FEATURE([$1]); then
|
---|
1221 | $6
|
---|
1222 | :
|
---|
1223 | else
|
---|
1224 | $7
|
---|
1225 | :
|
---|
1226 | fi
|
---|
1227 | ])
|
---|
1228 |
|
---|
1229 |
|
---|
1230 | # DX_XXX_FEATURE(DEFAULT_STATE)
|
---|
1231 | # -----------------------------
|
---|
1232 | AC_DEFUN([DX_DOXYGEN_FEATURE], [AC_DEFUN([DX_FEATURE_doc], [$1])])
|
---|
1233 | AC_DEFUN([DX_DOT_FEATURE], [AC_DEFUN([DX_FEATURE_dot], [$1])])
|
---|
1234 | AC_DEFUN([DX_MAN_FEATURE], [AC_DEFUN([DX_FEATURE_man], [$1])])
|
---|
1235 | AC_DEFUN([DX_HTML_FEATURE], [AC_DEFUN([DX_FEATURE_html], [$1])])
|
---|
1236 | AC_DEFUN([DX_CHM_FEATURE], [AC_DEFUN([DX_FEATURE_chm], [$1])])
|
---|
1237 | AC_DEFUN([DX_CHI_FEATURE], [AC_DEFUN([DX_FEATURE_chi], [$1])])
|
---|
1238 | AC_DEFUN([DX_RTF_FEATURE], [AC_DEFUN([DX_FEATURE_rtf], [$1])])
|
---|
1239 | AC_DEFUN([DX_XML_FEATURE], [AC_DEFUN([DX_FEATURE_xml], [$1])])
|
---|
1240 | AC_DEFUN([DX_XML_FEATURE], [AC_DEFUN([DX_FEATURE_xml], [$1])])
|
---|
1241 | AC_DEFUN([DX_PDF_FEATURE], [AC_DEFUN([DX_FEATURE_pdf], [$1])])
|
---|
1242 | AC_DEFUN([DX_PS_FEATURE], [AC_DEFUN([DX_FEATURE_ps], [$1])])
|
---|
1243 |
|
---|
1244 | # DX_INIT_DOXYGEN(PROJECT, [CONFIG-FILE], [OUTPUT-DOC-DIR])
|
---|
1245 | # ---------------------------------------------------------
|
---|
1246 | # PROJECT also serves as the base name for the documentation files.
|
---|
1247 | # The default CONFIG-FILE is "Doxyfile" and OUTPUT-DOC-DIR is "doxygen-doc".
|
---|
1248 | AC_DEFUN([DX_INIT_DOXYGEN], [
|
---|
1249 |
|
---|
1250 | # Files:
|
---|
1251 | AC_SUBST([DX_PROJECT], [$1])
|
---|
1252 | AC_SUBST([DX_CONFIG], [ifelse([$2], [], Doxyfile, [$2])])
|
---|
1253 | AC_SUBST([DX_DOCDIR], [ifelse([$3], [], doxygen-doc, [$3])])
|
---|
1254 |
|
---|
1255 | # Environment variables used inside doxygen.cfg:
|
---|
1256 | DX_ENV_APPEND(SRCDIR, $srcdir)
|
---|
1257 | DX_ENV_APPEND(PROJECT, $DX_PROJECT)
|
---|
1258 | DX_ENV_APPEND(DOCDIR, $DX_DOCDIR)
|
---|
1259 | DX_ENV_APPEND(VERSION, $PACKAGE_VERSION)
|
---|
1260 |
|
---|
1261 | # Doxygen itself:
|
---|
1262 | DX_ARG_ABLE(doc, [generate any doxygen documentation],
|
---|
1263 | [],
|
---|
1264 | [],
|
---|
1265 | [DX_REQUIRE_PROG([DX_DOXYGEN], doxygen)
|
---|
1266 | DX_REQUIRE_PROG([DX_PERL], perl)],
|
---|
1267 | [DX_ENV_APPEND(PERL_PATH, $DX_PERL)])
|
---|
1268 |
|
---|
1269 | # Dot for graphics:
|
---|
1270 | DX_ARG_ABLE(dot, [generate graphics for doxygen documentation],
|
---|
1271 | [DX_CHECK_DEPEND(doc, 1)],
|
---|
1272 | [DX_CLEAR_DEPEND(doc, 1)],
|
---|
1273 | [DX_REQUIRE_PROG([DX_DOT], dot)],
|
---|
1274 | [DX_ENV_APPEND(HAVE_DOT, YES)
|
---|
1275 | DX_ENV_APPEND(DOT_PATH, [`DX_DIRNAME_EXPR($DX_DOT)`])],
|
---|
1276 | [DX_ENV_APPEND(HAVE_DOT, NO)])
|
---|
1277 |
|
---|
1278 | # Man pages generation:
|
---|
1279 | DX_ARG_ABLE(man, [generate doxygen manual pages],
|
---|
1280 | [DX_CHECK_DEPEND(doc, 1)],
|
---|
1281 | [DX_CLEAR_DEPEND(doc, 1)],
|
---|
1282 | [],
|
---|
1283 | [DX_ENV_APPEND(GENERATE_MAN, YES)],
|
---|
1284 | [DX_ENV_APPEND(GENERATE_MAN, NO)])
|
---|
1285 |
|
---|
1286 | # RTF file generation:
|
---|
1287 | DX_ARG_ABLE(rtf, [generate doxygen RTF documentation],
|
---|
1288 | [DX_CHECK_DEPEND(doc, 1)],
|
---|
1289 | [DX_CLEAR_DEPEND(doc, 1)],
|
---|
1290 | [],
|
---|
1291 | [DX_ENV_APPEND(GENERATE_RTF, YES)],
|
---|
1292 | [DX_ENV_APPEND(GENERATE_RTF, NO)])
|
---|
1293 |
|
---|
1294 | # XML file generation:
|
---|
1295 | DX_ARG_ABLE(xml, [generate doxygen XML documentation],
|
---|
1296 | [DX_CHECK_DEPEND(doc, 1)],
|
---|
1297 | [DX_CLEAR_DEPEND(doc, 1)],
|
---|
1298 | [],
|
---|
1299 | [DX_ENV_APPEND(GENERATE_XML, YES)],
|
---|
1300 | [DX_ENV_APPEND(GENERATE_XML, NO)])
|
---|
1301 |
|
---|
1302 | # (Compressed) HTML help generation:
|
---|
1303 | DX_ARG_ABLE(chm, [generate doxygen compressed HTML help documentation],
|
---|
1304 | [DX_CHECK_DEPEND(doc, 1)],
|
---|
1305 | [DX_CLEAR_DEPEND(doc, 1)],
|
---|
1306 | [DX_REQUIRE_PROG([DX_HHC], hhc)],
|
---|
1307 | [DX_ENV_APPEND(HHC_PATH, $DX_HHC)
|
---|
1308 | DX_ENV_APPEND(GENERATE_HTML, YES)
|
---|
1309 | DX_ENV_APPEND(GENERATE_HTMLHELP, YES)],
|
---|
1310 | [DX_ENV_APPEND(GENERATE_HTMLHELP, NO)])
|
---|
1311 |
|
---|
1312 | # Seperate CHI file generation.
|
---|
1313 | DX_ARG_ABLE(chi, [generate doxygen seperate compressed HTML help index file],
|
---|
1314 | [DX_CHECK_DEPEND(chm, 1)],
|
---|
1315 | [DX_CLEAR_DEPEND(chm, 1)],
|
---|
1316 | [],
|
---|
1317 | [DX_ENV_APPEND(GENERATE_CHI, YES)],
|
---|
1318 | [DX_ENV_APPEND(GENERATE_CHI, NO)])
|
---|
1319 |
|
---|
1320 | # Plain HTML pages generation:
|
---|
1321 | DX_ARG_ABLE(html, [generate doxygen plain HTML documentation],
|
---|
1322 | [DX_CHECK_DEPEND(doc, 1) DX_CHECK_DEPEND(chm, 0)],
|
---|
1323 | [DX_CLEAR_DEPEND(doc, 1) DX_CLEAR_DEPEND(chm, 0)],
|
---|
1324 | [],
|
---|
1325 | [DX_ENV_APPEND(GENERATE_HTML, YES)],
|
---|
1326 | [DX_TEST_FEATURE(chm) || DX_ENV_APPEND(GENERATE_HTML, NO)])
|
---|
1327 |
|
---|
1328 | # PostScript file generation:
|
---|
1329 | DX_ARG_ABLE(ps, [generate doxygen PostScript documentation],
|
---|
1330 | [DX_CHECK_DEPEND(doc, 1)],
|
---|
1331 | [DX_CLEAR_DEPEND(doc, 1)],
|
---|
1332 | [DX_REQUIRE_PROG([DX_LATEX], latex)
|
---|
1333 | DX_REQUIRE_PROG([DX_MAKEINDEX], makeindex)
|
---|
1334 | DX_REQUIRE_PROG([DX_DVIPS], dvips)
|
---|
1335 | DX_REQUIRE_PROG([DX_EGREP], egrep)])
|
---|
1336 |
|
---|
1337 | # PDF file generation:
|
---|
1338 | DX_ARG_ABLE(pdf, [generate doxygen PDF documentation],
|
---|
1339 | [DX_CHECK_DEPEND(doc, 1)],
|
---|
1340 | [DX_CLEAR_DEPEND(doc, 1)],
|
---|
1341 | [DX_REQUIRE_PROG([DX_PDFLATEX], pdflatex)
|
---|
1342 | DX_REQUIRE_PROG([DX_MAKEINDEX], makeindex)
|
---|
1343 | DX_REQUIRE_PROG([DX_EGREP], egrep)])
|
---|
1344 |
|
---|
1345 | # LaTeX generation for PS and/or PDF:
|
---|
1346 | AM_CONDITIONAL(DX_COND_latex, DX_TEST_FEATURE(ps) || DX_TEST_FEATURE(pdf))
|
---|
1347 | if DX_TEST_FEATURE(ps) || DX_TEST_FEATURE(pdf); then
|
---|
1348 | DX_ENV_APPEND(GENERATE_LATEX, YES)
|
---|
1349 | else
|
---|
1350 | DX_ENV_APPEND(GENERATE_LATEX, NO)
|
---|
1351 | fi
|
---|
1352 |
|
---|
1353 | # Paper size for PS and/or PDF:
|
---|
1354 | AC_ARG_VAR(DOXYGEN_PAPER_SIZE,
|
---|
1355 | [a4wide (default), a4, letter, legal or executive])
|
---|
1356 | case "$DOXYGEN_PAPER_SIZE" in
|
---|
1357 | #(
|
---|
1358 | "")
|
---|
1359 | AC_SUBST(DOXYGEN_PAPER_SIZE, "")
|
---|
1360 | ;; #(
|
---|
1361 | a4wide|a4|letter|legal|executive)
|
---|
1362 | DX_ENV_APPEND(PAPER_SIZE, $DOXYGEN_PAPER_SIZE)
|
---|
1363 | ;; #(
|
---|
1364 | *)
|
---|
1365 | AC_MSG_ERROR([unknown DOXYGEN_PAPER_SIZE='$DOXYGEN_PAPER_SIZE'])
|
---|
1366 | ;;
|
---|
1367 | esac
|
---|
1368 |
|
---|
1369 | #For debugging:
|
---|
1370 | #echo DX_FLAG_doc=$DX_FLAG_doc
|
---|
1371 | #echo DX_FLAG_dot=$DX_FLAG_dot
|
---|
1372 | #echo DX_FLAG_man=$DX_FLAG_man
|
---|
1373 | #echo DX_FLAG_html=$DX_FLAG_html
|
---|
1374 | #echo DX_FLAG_chm=$DX_FLAG_chm
|
---|
1375 | #echo DX_FLAG_chi=$DX_FLAG_chi
|
---|
1376 | #echo DX_FLAG_rtf=$DX_FLAG_rtf
|
---|
1377 | #echo DX_FLAG_xml=$DX_FLAG_xml
|
---|
1378 | #echo DX_FLAG_pdf=$DX_FLAG_pdf
|
---|
1379 | #echo DX_FLAG_ps=$DX_FLAG_ps
|
---|
1380 | #echo DX_ENV=$DX_ENV
|
---|
1381 | ])
|
---|
1382 |
|
---|
1383 | # ===========================================================================
|
---|
1384 | # http://www.gnu.org/software/autoconf-archive/ax_pthread.html
|
---|
1385 | # ===========================================================================
|
---|
1386 | #
|
---|
1387 | # SYNOPSIS
|
---|
1388 | #
|
---|
1389 | # AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
---|
1390 | #
|
---|
1391 | # DESCRIPTION
|
---|
1392 | #
|
---|
1393 | # This macro figures out how to build C programs using POSIX threads. It
|
---|
1394 | # sets the PTHREAD_LIBS output variable to the threads library and linker
|
---|
1395 | # flags, and the PTHREAD_CFLAGS output variable to any special C compiler
|
---|
1396 | # flags that are needed. (The user can also force certain compiler
|
---|
1397 | # flags/libs to be tested by setting these environment variables.)
|
---|
1398 | #
|
---|
1399 | # Also sets PTHREAD_CC to any special C compiler that is needed for
|
---|
1400 | # multi-threaded programs (defaults to the value of CC otherwise). (This
|
---|
1401 | # is necessary on AIX to use the special cc_r compiler alias.)
|
---|
1402 | #
|
---|
1403 | # NOTE: You are assumed to not only compile your program with these flags,
|
---|
1404 | # but also link it with them as well. e.g. you should link with
|
---|
1405 | # $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
|
---|
1406 | #
|
---|
1407 | # If you are only building threads programs, you may wish to use these
|
---|
1408 | # variables in your default LIBS, CFLAGS, and CC:
|
---|
1409 | #
|
---|
1410 | # LIBS="$PTHREAD_LIBS $LIBS"
|
---|
1411 | # CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
---|
1412 | # CC="$PTHREAD_CC"
|
---|
1413 | #
|
---|
1414 | # In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
|
---|
1415 | # has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name
|
---|
1416 | # (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
|
---|
1417 | #
|
---|
1418 | # Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
|
---|
1419 | # PTHREAD_PRIO_INHERIT symbol is defined when compiling with
|
---|
1420 | # PTHREAD_CFLAGS.
|
---|
1421 | #
|
---|
1422 | # ACTION-IF-FOUND is a list of shell commands to run if a threads library
|
---|
1423 | # is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
|
---|
1424 | # is not found. If ACTION-IF-FOUND is not specified, the default action
|
---|
1425 | # will define HAVE_PTHREAD.
|
---|
1426 | #
|
---|
1427 | # Please let the authors know if this macro fails on any platform, or if
|
---|
1428 | # you have any other suggestions or comments. This macro was based on work
|
---|
1429 | # by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
|
---|
1430 | # from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
|
---|
1431 | # Alejandro Forero Cuervo to the autoconf macro repository. We are also
|
---|
1432 | # grateful for the helpful feedback of numerous users.
|
---|
1433 | #
|
---|
1434 | # Updated for Autoconf 2.68 by Daniel Richard G.
|
---|
1435 | #
|
---|
1436 | # LICENSE
|
---|
1437 | #
|
---|
1438 | # Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
|
---|
1439 | # Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG>
|
---|
1440 | #
|
---|
1441 | # This program is free software: you can redistribute it and/or modify it
|
---|
1442 | # under the terms of the GNU General Public License as published by the
|
---|
1443 | # Free Software Foundation, either version 3 of the License, or (at your
|
---|
1444 | # option) any later version.
|
---|
1445 | #
|
---|
1446 | # This program is distributed in the hope that it will be useful, but
|
---|
1447 | # WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
1448 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
---|
1449 | # Public License for more details.
|
---|
1450 | #
|
---|
1451 | # You should have received a copy of the GNU General Public License along
|
---|
1452 | # with this program. If not, see <http://www.gnu.org/licenses/>.
|
---|
1453 | #
|
---|
1454 | # As a special exception, the respective Autoconf Macro's copyright owner
|
---|
1455 | # gives unlimited permission to copy, distribute and modify the configure
|
---|
1456 | # scripts that are the output of Autoconf when processing the Macro. You
|
---|
1457 | # need not follow the terms of the GNU General Public License when using
|
---|
1458 | # or distributing such scripts, even though portions of the text of the
|
---|
1459 | # Macro appear in them. The GNU General Public License (GPL) does govern
|
---|
1460 | # all other use of the material that constitutes the Autoconf Macro.
|
---|
1461 | #
|
---|
1462 | # This special exception to the GPL applies to versions of the Autoconf
|
---|
1463 | # Macro released by the Autoconf Archive. When you make and distribute a
|
---|
1464 | # modified version of the Autoconf Macro, you may extend this special
|
---|
1465 | # exception to the GPL to apply to your modified version as well.
|
---|
1466 |
|
---|
1467 | #serial 21
|
---|
1468 |
|
---|
1469 | AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
|
---|
1470 | AC_DEFUN([AX_PTHREAD], [
|
---|
1471 | AC_REQUIRE([AC_CANONICAL_HOST])
|
---|
1472 | AC_LANG_PUSH([C])
|
---|
1473 | ax_pthread_ok=no
|
---|
1474 |
|
---|
1475 | # We used to check for pthread.h first, but this fails if pthread.h
|
---|
1476 | # requires special compiler flags (e.g. on True64 or Sequent).
|
---|
1477 | # It gets checked for in the link test anyway.
|
---|
1478 |
|
---|
1479 | # First of all, check if the user has set any of the PTHREAD_LIBS,
|
---|
1480 | # etcetera environment variables, and if threads linking works using
|
---|
1481 | # them:
|
---|
1482 | if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
|
---|
1483 | save_CFLAGS="$CFLAGS"
|
---|
1484 | CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
---|
1485 | save_LIBS="$LIBS"
|
---|
1486 | LIBS="$PTHREAD_LIBS $LIBS"
|
---|
1487 | AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
|
---|
1488 | AC_TRY_LINK_FUNC([pthread_join], [ax_pthread_ok=yes])
|
---|
1489 | AC_MSG_RESULT([$ax_pthread_ok])
|
---|
1490 | if test x"$ax_pthread_ok" = xno; then
|
---|
1491 | PTHREAD_LIBS=""
|
---|
1492 | PTHREAD_CFLAGS=""
|
---|
1493 | fi
|
---|
1494 | LIBS="$save_LIBS"
|
---|
1495 | CFLAGS="$save_CFLAGS"
|
---|
1496 | fi
|
---|
1497 |
|
---|
1498 | # We must check for the threads library under a number of different
|
---|
1499 | # names; the ordering is very important because some systems
|
---|
1500 | # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
|
---|
1501 | # libraries is broken (non-POSIX).
|
---|
1502 |
|
---|
1503 | # Create a list of thread flags to try. Items starting with a "-" are
|
---|
1504 | # C compiler flags, and other items are library names, except for "none"
|
---|
1505 | # which indicates that we try without any flags at all, and "pthread-config"
|
---|
1506 | # which is a program returning the flags for the Pth emulation library.
|
---|
1507 |
|
---|
1508 | ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
|
---|
1509 |
|
---|
1510 | # The ordering *is* (sometimes) important. Some notes on the
|
---|
1511 | # individual items follow:
|
---|
1512 |
|
---|
1513 | # pthreads: AIX (must check this before -lpthread)
|
---|
1514 | # none: in case threads are in libc; should be tried before -Kthread and
|
---|
1515 | # other compiler flags to prevent continual compiler warnings
|
---|
1516 | # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
|
---|
1517 | # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
|
---|
1518 | # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
|
---|
1519 | # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
|
---|
1520 | # -pthreads: Solaris/gcc
|
---|
1521 | # -mthreads: Mingw32/gcc, Lynx/gcc
|
---|
1522 | # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
|
---|
1523 | # doesn't hurt to check since this sometimes defines pthreads too;
|
---|
1524 | # also defines -D_REENTRANT)
|
---|
1525 | # ... -mt is also the pthreads flag for HP/aCC
|
---|
1526 | # pthread: Linux, etcetera
|
---|
1527 | # --thread-safe: KAI C++
|
---|
1528 | # pthread-config: use pthread-config program (for GNU Pth library)
|
---|
1529 |
|
---|
1530 | case ${host_os} in
|
---|
1531 | solaris*)
|
---|
1532 |
|
---|
1533 | # On Solaris (at least, for some versions), libc contains stubbed
|
---|
1534 | # (non-functional) versions of the pthreads routines, so link-based
|
---|
1535 | # tests will erroneously succeed. (We need to link with -pthreads/-mt/
|
---|
1536 | # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
|
---|
1537 | # a function called by this macro, so we could check for that, but
|
---|
1538 | # who knows whether they'll stub that too in a future libc.) So,
|
---|
1539 | # we'll just look for -pthreads and -lpthread first:
|
---|
1540 |
|
---|
1541 | ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
|
---|
1542 | ;;
|
---|
1543 |
|
---|
1544 | darwin*)
|
---|
1545 | ax_pthread_flags="-pthread $ax_pthread_flags"
|
---|
1546 | ;;
|
---|
1547 | esac
|
---|
1548 |
|
---|
1549 | # Clang doesn't consider unrecognized options an error unless we specify
|
---|
1550 | # -Werror. We throw in some extra Clang-specific options to ensure that
|
---|
1551 | # this doesn't happen for GCC, which also accepts -Werror.
|
---|
1552 |
|
---|
1553 | AC_MSG_CHECKING([if compiler needs -Werror to reject unknown flags])
|
---|
1554 | save_CFLAGS="$CFLAGS"
|
---|
1555 | ax_pthread_extra_flags="-Werror"
|
---|
1556 | CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument"
|
---|
1557 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([int foo(void);],[foo()])],
|
---|
1558 | [AC_MSG_RESULT([yes])],
|
---|
1559 | [ax_pthread_extra_flags=
|
---|
1560 | AC_MSG_RESULT([no])])
|
---|
1561 | CFLAGS="$save_CFLAGS"
|
---|
1562 |
|
---|
1563 | if test x"$ax_pthread_ok" = xno; then
|
---|
1564 | for flag in $ax_pthread_flags; do
|
---|
1565 |
|
---|
1566 | case $flag in
|
---|
1567 | none)
|
---|
1568 | AC_MSG_CHECKING([whether pthreads work without any flags])
|
---|
1569 | ;;
|
---|
1570 |
|
---|
1571 | -*)
|
---|
1572 | AC_MSG_CHECKING([whether pthreads work with $flag])
|
---|
1573 | PTHREAD_CFLAGS="$flag"
|
---|
1574 | ;;
|
---|
1575 |
|
---|
1576 | pthread-config)
|
---|
1577 | AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no])
|
---|
1578 | if test x"$ax_pthread_config" = xno; then continue; fi
|
---|
1579 | PTHREAD_CFLAGS="`pthread-config --cflags`"
|
---|
1580 | PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
|
---|
1581 | ;;
|
---|
1582 |
|
---|
1583 | *)
|
---|
1584 | AC_MSG_CHECKING([for the pthreads library -l$flag])
|
---|
1585 | PTHREAD_LIBS="-l$flag"
|
---|
1586 | ;;
|
---|
1587 | esac
|
---|
1588 |
|
---|
1589 | save_LIBS="$LIBS"
|
---|
1590 | save_CFLAGS="$CFLAGS"
|
---|
1591 | LIBS="$PTHREAD_LIBS $LIBS"
|
---|
1592 | CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
|
---|
1593 |
|
---|
1594 | # Check for various functions. We must include pthread.h,
|
---|
1595 | # since some functions may be macros. (On the Sequent, we
|
---|
1596 | # need a special flag -Kthread to make this header compile.)
|
---|
1597 | # We check for pthread_join because it is in -lpthread on IRIX
|
---|
1598 | # while pthread_create is in libc. We check for pthread_attr_init
|
---|
1599 | # due to DEC craziness with -lpthreads. We check for
|
---|
1600 | # pthread_cleanup_push because it is one of the few pthread
|
---|
1601 | # functions on Solaris that doesn't have a non-functional libc stub.
|
---|
1602 | # We try pthread_create on general principles.
|
---|
1603 | AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>
|
---|
1604 | static void routine(void *a) { a = 0; }
|
---|
1605 | static void *start_routine(void *a) { return a; }],
|
---|
1606 | [pthread_t th; pthread_attr_t attr;
|
---|
1607 | pthread_create(&th, 0, start_routine, 0);
|
---|
1608 | pthread_join(th, 0);
|
---|
1609 | pthread_attr_init(&attr);
|
---|
1610 | pthread_cleanup_push(routine, 0);
|
---|
1611 | pthread_cleanup_pop(0) /* ; */])],
|
---|
1612 | [ax_pthread_ok=yes],
|
---|
1613 | [])
|
---|
1614 |
|
---|
1615 | LIBS="$save_LIBS"
|
---|
1616 | CFLAGS="$save_CFLAGS"
|
---|
1617 |
|
---|
1618 | AC_MSG_RESULT([$ax_pthread_ok])
|
---|
1619 | if test "x$ax_pthread_ok" = xyes; then
|
---|
1620 | break;
|
---|
1621 | fi
|
---|
1622 |
|
---|
1623 | PTHREAD_LIBS=""
|
---|
1624 | PTHREAD_CFLAGS=""
|
---|
1625 | done
|
---|
1626 | fi
|
---|
1627 |
|
---|
1628 | # Various other checks:
|
---|
1629 | if test "x$ax_pthread_ok" = xyes; then
|
---|
1630 | save_LIBS="$LIBS"
|
---|
1631 | LIBS="$PTHREAD_LIBS $LIBS"
|
---|
1632 | save_CFLAGS="$CFLAGS"
|
---|
1633 | CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
---|
1634 |
|
---|
1635 | # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
|
---|
1636 | AC_MSG_CHECKING([for joinable pthread attribute])
|
---|
1637 | attr_name=unknown
|
---|
1638 | for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
|
---|
1639 | AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>],
|
---|
1640 | [int attr = $attr; return attr /* ; */])],
|
---|
1641 | [attr_name=$attr; break],
|
---|
1642 | [])
|
---|
1643 | done
|
---|
1644 | AC_MSG_RESULT([$attr_name])
|
---|
1645 | if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
|
---|
1646 | AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE], [$attr_name],
|
---|
1647 | [Define to necessary symbol if this constant
|
---|
1648 | uses a non-standard name on your system.])
|
---|
1649 | fi
|
---|
1650 |
|
---|
1651 | AC_MSG_CHECKING([if more special flags are required for pthreads])
|
---|
1652 | flag=no
|
---|
1653 | case ${host_os} in
|
---|
1654 | aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
|
---|
1655 | osf* | hpux*) flag="-D_REENTRANT";;
|
---|
1656 | solaris*)
|
---|
1657 | if test "$GCC" = "yes"; then
|
---|
1658 | flag="-D_REENTRANT"
|
---|
1659 | else
|
---|
1660 | # TODO: What about Clang on Solaris?
|
---|
1661 | flag="-mt -D_REENTRANT"
|
---|
1662 | fi
|
---|
1663 | ;;
|
---|
1664 | esac
|
---|
1665 | AC_MSG_RESULT([$flag])
|
---|
1666 | if test "x$flag" != xno; then
|
---|
1667 | PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
|
---|
1668 | fi
|
---|
1669 |
|
---|
1670 | AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT],
|
---|
1671 | [ax_cv_PTHREAD_PRIO_INHERIT], [
|
---|
1672 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]],
|
---|
1673 | [[int i = PTHREAD_PRIO_INHERIT;]])],
|
---|
1674 | [ax_cv_PTHREAD_PRIO_INHERIT=yes],
|
---|
1675 | [ax_cv_PTHREAD_PRIO_INHERIT=no])
|
---|
1676 | ])
|
---|
1677 | AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"],
|
---|
1678 | [AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.])])
|
---|
1679 |
|
---|
1680 | LIBS="$save_LIBS"
|
---|
1681 | CFLAGS="$save_CFLAGS"
|
---|
1682 |
|
---|
1683 | # More AIX lossage: compile with *_r variant
|
---|
1684 | if test "x$GCC" != xyes; then
|
---|
1685 | case $host_os in
|
---|
1686 | aix*)
|
---|
1687 | AS_CASE(["x/$CC"],
|
---|
1688 | [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6],
|
---|
1689 | [#handle absolute path differently from PATH based program lookup
|
---|
1690 | AS_CASE(["x$CC"],
|
---|
1691 | [x/*],
|
---|
1692 | [AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])],
|
---|
1693 | [AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])])
|
---|
1694 | ;;
|
---|
1695 | esac
|
---|
1696 | fi
|
---|
1697 | fi
|
---|
1698 |
|
---|
1699 | test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
|
---|
1700 |
|
---|
1701 | AC_SUBST([PTHREAD_LIBS])
|
---|
1702 | AC_SUBST([PTHREAD_CFLAGS])
|
---|
1703 | AC_SUBST([PTHREAD_CC])
|
---|
1704 |
|
---|
1705 | # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
|
---|
1706 | if test x"$ax_pthread_ok" = xyes; then
|
---|
1707 | ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1])
|
---|
1708 | :
|
---|
1709 | else
|
---|
1710 | ax_pthread_ok=no
|
---|
1711 | $2
|
---|
1712 | fi
|
---|
1713 | AC_LANG_POP
|
---|
1714 | ])dnl AX_PTHREAD
|
---|
1715 |
|
---|
1716 | # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
|
---|
1717 | # serial 1 (pkg-config-0.24)
|
---|
1718 | #
|
---|
1719 | # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
|
---|
1720 | #
|
---|
1721 | # This program is free software; you can redistribute it and/or modify
|
---|
1722 | # it under the terms of the GNU General Public License as published by
|
---|
1723 | # the Free Software Foundation; either version 2 of the License, or
|
---|
1724 | # (at your option) any later version.
|
---|
1725 | #
|
---|
1726 | # This program is distributed in the hope that it will be useful, but
|
---|
1727 | # WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
1728 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
1729 | # General Public License for more details.
|
---|
1730 | #
|
---|
1731 | # You should have received a copy of the GNU General Public License
|
---|
1732 | # along with this program; if not, write to the Free Software
|
---|
1733 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
---|
1734 | #
|
---|
1735 | # As a special exception to the GNU General Public License, if you
|
---|
1736 | # distribute this file as part of a program that contains a
|
---|
1737 | # configuration script generated by Autoconf, you may include it under
|
---|
1738 | # the same distribution terms that you use for the rest of that program.
|
---|
1739 |
|
---|
1740 | # PKG_PROG_PKG_CONFIG([MIN-VERSION])
|
---|
1741 | # ----------------------------------
|
---|
1742 | AC_DEFUN([PKG_PROG_PKG_CONFIG],
|
---|
1743 | [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
|
---|
1744 | m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
|
---|
1745 | m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
|
---|
1746 | AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
|
---|
1747 | AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
|
---|
1748 | AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
|
---|
1749 |
|
---|
1750 | if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
|
---|
1751 | AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
|
---|
1752 | fi
|
---|
1753 | if test -n "$PKG_CONFIG"; then
|
---|
1754 | _pkg_min_version=m4_default([$1], [0.9.0])
|
---|
1755 | AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
|
---|
1756 | if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
|
---|
1757 | AC_MSG_RESULT([yes])
|
---|
1758 | else
|
---|
1759 | AC_MSG_RESULT([no])
|
---|
1760 | PKG_CONFIG=""
|
---|
1761 | fi
|
---|
1762 | fi[]dnl
|
---|
1763 | ])# PKG_PROG_PKG_CONFIG
|
---|
1764 |
|
---|
1765 | # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
---|
1766 | #
|
---|
1767 | # Check to see whether a particular set of modules exists. Similar
|
---|
1768 | # to PKG_CHECK_MODULES(), but does not set variables or print errors.
|
---|
1769 | #
|
---|
1770 | # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
---|
1771 | # only at the first occurence in configure.ac, so if the first place
|
---|
1772 | # it's called might be skipped (such as if it is within an "if", you
|
---|
1773 | # have to call PKG_CHECK_EXISTS manually
|
---|
1774 | # --------------------------------------------------------------
|
---|
1775 | AC_DEFUN([PKG_CHECK_EXISTS],
|
---|
1776 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
---|
1777 | if test -n "$PKG_CONFIG" && \
|
---|
1778 | AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
|
---|
1779 | m4_default([$2], [:])
|
---|
1780 | m4_ifvaln([$3], [else
|
---|
1781 | $3])dnl
|
---|
1782 | fi])
|
---|
1783 |
|
---|
1784 | # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
|
---|
1785 | # ---------------------------------------------
|
---|
1786 | m4_define([_PKG_CONFIG],
|
---|
1787 | [if test -n "$$1"; then
|
---|
1788 | pkg_cv_[]$1="$$1"
|
---|
1789 | elif test -n "$PKG_CONFIG"; then
|
---|
1790 | PKG_CHECK_EXISTS([$3],
|
---|
1791 | [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
|
---|
1792 | test "x$?" != "x0" && pkg_failed=yes ],
|
---|
1793 | [pkg_failed=yes])
|
---|
1794 | else
|
---|
1795 | pkg_failed=untried
|
---|
1796 | fi[]dnl
|
---|
1797 | ])# _PKG_CONFIG
|
---|
1798 |
|
---|
1799 | # _PKG_SHORT_ERRORS_SUPPORTED
|
---|
1800 | # -----------------------------
|
---|
1801 | AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
|
---|
1802 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
---|
1803 | if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
---|
1804 | _pkg_short_errors_supported=yes
|
---|
1805 | else
|
---|
1806 | _pkg_short_errors_supported=no
|
---|
1807 | fi[]dnl
|
---|
1808 | ])# _PKG_SHORT_ERRORS_SUPPORTED
|
---|
1809 |
|
---|
1810 |
|
---|
1811 | # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
|
---|
1812 | # [ACTION-IF-NOT-FOUND])
|
---|
1813 | #
|
---|
1814 | #
|
---|
1815 | # Note that if there is a possibility the first call to
|
---|
1816 | # PKG_CHECK_MODULES might not happen, you should be sure to include an
|
---|
1817 | # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
|
---|
1818 | #
|
---|
1819 | #
|
---|
1820 | # --------------------------------------------------------------
|
---|
1821 | AC_DEFUN([PKG_CHECK_MODULES],
|
---|
1822 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
---|
1823 | AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
|
---|
1824 | AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
|
---|
1825 |
|
---|
1826 | pkg_failed=no
|
---|
1827 | AC_MSG_CHECKING([for $1])
|
---|
1828 |
|
---|
1829 | _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
|
---|
1830 | _PKG_CONFIG([$1][_LIBS], [libs], [$2])
|
---|
1831 |
|
---|
1832 | m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
|
---|
1833 | and $1[]_LIBS to avoid the need to call pkg-config.
|
---|
1834 | See the pkg-config man page for more details.])
|
---|
1835 |
|
---|
1836 | if test $pkg_failed = yes; then
|
---|
1837 | AC_MSG_RESULT([no])
|
---|
1838 | _PKG_SHORT_ERRORS_SUPPORTED
|
---|
1839 | if test $_pkg_short_errors_supported = yes; then
|
---|
1840 | $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
|
---|
1841 | else
|
---|
1842 | $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
|
---|
1843 | fi
|
---|
1844 | # Put the nasty error message in config.log where it belongs
|
---|
1845 | echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
|
---|
1846 |
|
---|
1847 | m4_default([$4], [AC_MSG_ERROR(
|
---|
1848 | [Package requirements ($2) were not met:
|
---|
1849 |
|
---|
1850 | $$1_PKG_ERRORS
|
---|
1851 |
|
---|
1852 | Consider adjusting the PKG_CONFIG_PATH environment variable if you
|
---|
1853 | installed software in a non-standard prefix.
|
---|
1854 |
|
---|
1855 | _PKG_TEXT])[]dnl
|
---|
1856 | ])
|
---|
1857 | elif test $pkg_failed = untried; then
|
---|
1858 | AC_MSG_RESULT([no])
|
---|
1859 | m4_default([$4], [AC_MSG_FAILURE(
|
---|
1860 | [The pkg-config script could not be found or is too old. Make sure it
|
---|
1861 | is in your PATH or set the PKG_CONFIG environment variable to the full
|
---|
1862 | path to pkg-config.
|
---|
1863 |
|
---|
1864 | _PKG_TEXT
|
---|
1865 |
|
---|
1866 | To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
|
---|
1867 | ])
|
---|
1868 | else
|
---|
1869 | $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
|
---|
1870 | $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
|
---|
1871 | AC_MSG_RESULT([yes])
|
---|
1872 | $3
|
---|
1873 | fi[]dnl
|
---|
1874 | ])# PKG_CHECK_MODULES
|
---|
1875 |
|
---|
1876 | # Copyright (C) 2002-2013 Free Software Foundation, Inc.
|
---|
1877 | #
|
---|
1878 | # This file is free software; the Free Software Foundation
|
---|
1879 | # gives unlimited permission to copy and/or distribute it,
|
---|
1880 | # with or without modifications, as long as this notice is preserved.
|
---|
1881 |
|
---|
1882 | # AM_AUTOMAKE_VERSION(VERSION)
|
---|
1883 | # ----------------------------
|
---|
1884 | # Automake X.Y traces this macro to ensure aclocal.m4 has been
|
---|
1885 | # generated from the m4 files accompanying Automake X.Y.
|
---|
1886 | # (This private macro should not be called outside this file.)
|
---|
1887 | AC_DEFUN([AM_AUTOMAKE_VERSION],
|
---|
1888 | [am__api_version='1.14'
|
---|
1889 | dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
|
---|
1890 | dnl require some minimum version. Point them to the right macro.
|
---|
1891 | m4_if([$1], [1.14.1], [],
|
---|
1892 | [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
|
---|
1893 | ])
|
---|
1894 |
|
---|
1895 | # _AM_AUTOCONF_VERSION(VERSION)
|
---|
1896 | # -----------------------------
|
---|
1897 | # aclocal traces this macro to find the Autoconf version.
|
---|
1898 | # This is a private macro too. Using m4_define simplifies
|
---|
1899 | # the logic in aclocal, which can simply ignore this definition.
|
---|
1900 | m4_define([_AM_AUTOCONF_VERSION], [])
|
---|
1901 |
|
---|
1902 | # AM_SET_CURRENT_AUTOMAKE_VERSION
|
---|
1903 | # -------------------------------
|
---|
1904 | # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
|
---|
1905 | # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
|
---|
1906 | AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
---|
1907 | [AM_AUTOMAKE_VERSION([1.14.1])dnl
|
---|
1908 | m4_ifndef([AC_AUTOCONF_VERSION],
|
---|
1909 | [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
---|
1910 | _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
|
---|
1911 |
|
---|
1912 | # Copyright (C) 2011-2013 Free Software Foundation, Inc.
|
---|
1913 | #
|
---|
1914 | # This file is free software; the Free Software Foundation
|
---|
1915 | # gives unlimited permission to copy and/or distribute it,
|
---|
1916 | # with or without modifications, as long as this notice is preserved.
|
---|
1917 |
|
---|
1918 | # AM_PROG_AR([ACT-IF-FAIL])
|
---|
1919 | # -------------------------
|
---|
1920 | # Try to determine the archiver interface, and trigger the ar-lib wrapper
|
---|
1921 | # if it is needed. If the detection of archiver interface fails, run
|
---|
1922 | # ACT-IF-FAIL (default is to abort configure with a proper error message).
|
---|
1923 | AC_DEFUN([AM_PROG_AR],
|
---|
1924 | [AC_BEFORE([$0], [LT_INIT])dnl
|
---|
1925 | AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl
|
---|
1926 | AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
---|
1927 | AC_REQUIRE_AUX_FILE([ar-lib])dnl
|
---|
1928 | AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false])
|
---|
1929 | : ${AR=ar}
|
---|
1930 |
|
---|
1931 | AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface],
|
---|
1932 | [AC_LANG_PUSH([C])
|
---|
1933 | am_cv_ar_interface=ar
|
---|
1934 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])],
|
---|
1935 | [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
|
---|
1936 | AC_TRY_EVAL([am_ar_try])
|
---|
1937 | if test "$ac_status" -eq 0; then
|
---|
1938 | am_cv_ar_interface=ar
|
---|
1939 | else
|
---|
1940 | am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
|
---|
1941 | AC_TRY_EVAL([am_ar_try])
|
---|
1942 | if test "$ac_status" -eq 0; then
|
---|
1943 | am_cv_ar_interface=lib
|
---|
1944 | else
|
---|
1945 | am_cv_ar_interface=unknown
|
---|
1946 | fi
|
---|
1947 | fi
|
---|
1948 | rm -f conftest.lib libconftest.a
|
---|
1949 | ])
|
---|
1950 | AC_LANG_POP([C])])
|
---|
1951 |
|
---|
1952 | case $am_cv_ar_interface in
|
---|
1953 | ar)
|
---|
1954 | ;;
|
---|
1955 | lib)
|
---|
1956 | # Microsoft lib, so override with the ar-lib wrapper script.
|
---|
1957 | # FIXME: It is wrong to rewrite AR.
|
---|
1958 | # But if we don't then we get into trouble of one sort or another.
|
---|
1959 | # A longer-term fix would be to have automake use am__AR in this case,
|
---|
1960 | # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
|
---|
1961 | # similar.
|
---|
1962 | AR="$am_aux_dir/ar-lib $AR"
|
---|
1963 | ;;
|
---|
1964 | unknown)
|
---|
1965 | m4_default([$1],
|
---|
1966 | [AC_MSG_ERROR([could not determine $AR interface])])
|
---|
1967 | ;;
|
---|
1968 | esac
|
---|
1969 | AC_SUBST([AR])dnl
|
---|
1970 | ])
|
---|
1971 |
|
---|
1972 | # AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
---|
1973 |
|
---|
1974 | # Copyright (C) 2001-2013 Free Software Foundation, Inc.
|
---|
1975 | #
|
---|
1976 | # This file is free software; the Free Software Foundation
|
---|
1977 | # gives unlimited permission to copy and/or distribute it,
|
---|
1978 | # with or without modifications, as long as this notice is preserved.
|
---|
1979 |
|
---|
1980 | # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
|
---|
1981 | # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
|
---|
1982 | # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
|
---|
1983 | #
|
---|
1984 | # Of course, Automake must honor this variable whenever it calls a
|
---|
1985 | # tool from the auxiliary directory. The problem is that $srcdir (and
|
---|
1986 | # therefore $ac_aux_dir as well) can be either absolute or relative,
|
---|
1987 | # depending on how configure is run. This is pretty annoying, since
|
---|
1988 | # it makes $ac_aux_dir quite unusable in subdirectories: in the top
|
---|
1989 | # source directory, any form will work fine, but in subdirectories a
|
---|
1990 | # relative path needs to be adjusted first.
|
---|
1991 | #
|
---|
1992 | # $ac_aux_dir/missing
|
---|
1993 | # fails when called from a subdirectory if $ac_aux_dir is relative
|
---|
1994 | # $top_srcdir/$ac_aux_dir/missing
|
---|
1995 | # fails if $ac_aux_dir is absolute,
|
---|
1996 | # fails when called from a subdirectory in a VPATH build with
|
---|
1997 | # a relative $ac_aux_dir
|
---|
1998 | #
|
---|
1999 | # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
|
---|
2000 | # are both prefixed by $srcdir. In an in-source build this is usually
|
---|
2001 | # harmless because $srcdir is '.', but things will broke when you
|
---|
2002 | # start a VPATH build or use an absolute $srcdir.
|
---|
2003 | #
|
---|
2004 | # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
|
---|
2005 | # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
|
---|
2006 | # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
|
---|
2007 | # and then we would define $MISSING as
|
---|
2008 | # MISSING="\${SHELL} $am_aux_dir/missing"
|
---|
2009 | # This will work as long as MISSING is not called from configure, because
|
---|
2010 | # unfortunately $(top_srcdir) has no meaning in configure.
|
---|
2011 | # However there are other variables, like CC, which are often used in
|
---|
2012 | # configure, and could therefore not use this "fixed" $ac_aux_dir.
|
---|
2013 | #
|
---|
2014 | # Another solution, used here, is to always expand $ac_aux_dir to an
|
---|
2015 | # absolute PATH. The drawback is that using absolute paths prevent a
|
---|
2016 | # configured tree to be moved without reconfiguration.
|
---|
2017 |
|
---|
2018 | AC_DEFUN([AM_AUX_DIR_EXPAND],
|
---|
2019 | [dnl Rely on autoconf to set up CDPATH properly.
|
---|
2020 | AC_PREREQ([2.50])dnl
|
---|
2021 | # expand $ac_aux_dir to an absolute path
|
---|
2022 | am_aux_dir=`cd $ac_aux_dir && pwd`
|
---|
2023 | ])
|
---|
2024 |
|
---|
2025 | # AM_COND_IF -*- Autoconf -*-
|
---|
2026 |
|
---|
2027 | # Copyright (C) 2008-2013 Free Software Foundation, Inc.
|
---|
2028 | #
|
---|
2029 | # This file is free software; the Free Software Foundation
|
---|
2030 | # gives unlimited permission to copy and/or distribute it,
|
---|
2031 | # with or without modifications, as long as this notice is preserved.
|
---|
2032 |
|
---|
2033 | # _AM_COND_IF
|
---|
2034 | # _AM_COND_ELSE
|
---|
2035 | # _AM_COND_ENDIF
|
---|
2036 | # --------------
|
---|
2037 | # These macros are only used for tracing.
|
---|
2038 | m4_define([_AM_COND_IF])
|
---|
2039 | m4_define([_AM_COND_ELSE])
|
---|
2040 | m4_define([_AM_COND_ENDIF])
|
---|
2041 |
|
---|
2042 | # AM_COND_IF(COND, [IF-TRUE], [IF-FALSE])
|
---|
2043 | # ---------------------------------------
|
---|
2044 | # If the shell condition COND is true, execute IF-TRUE, otherwise execute
|
---|
2045 | # IF-FALSE. Allow automake to learn about conditional instantiating macros
|
---|
2046 | # (the AC_CONFIG_FOOS).
|
---|
2047 | AC_DEFUN([AM_COND_IF],
|
---|
2048 | [m4_ifndef([_AM_COND_VALUE_$1],
|
---|
2049 | [m4_fatal([$0: no such condition "$1"])])dnl
|
---|
2050 | _AM_COND_IF([$1])dnl
|
---|
2051 | if test -z "$$1_TRUE"; then :
|
---|
2052 | m4_n([$2])[]dnl
|
---|
2053 | m4_ifval([$3],
|
---|
2054 | [_AM_COND_ELSE([$1])dnl
|
---|
2055 | else
|
---|
2056 | $3
|
---|
2057 | ])dnl
|
---|
2058 | _AM_COND_ENDIF([$1])dnl
|
---|
2059 | fi[]dnl
|
---|
2060 | ])
|
---|
2061 |
|
---|
2062 | # AM_CONDITIONAL -*- Autoconf -*-
|
---|
2063 |
|
---|
2064 | # Copyright (C) 1997-2013 Free Software Foundation, Inc.
|
---|
2065 | #
|
---|
2066 | # This file is free software; the Free Software Foundation
|
---|
2067 | # gives unlimited permission to copy and/or distribute it,
|
---|
2068 | # with or without modifications, as long as this notice is preserved.
|
---|
2069 |
|
---|
2070 | # AM_CONDITIONAL(NAME, SHELL-CONDITION)
|
---|
2071 | # -------------------------------------
|
---|
2072 | # Define a conditional.
|
---|
2073 | AC_DEFUN([AM_CONDITIONAL],
|
---|
2074 | [AC_PREREQ([2.52])dnl
|
---|
2075 | m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
|
---|
2076 | [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
|
---|
2077 | AC_SUBST([$1_TRUE])dnl
|
---|
2078 | AC_SUBST([$1_FALSE])dnl
|
---|
2079 | _AM_SUBST_NOTMAKE([$1_TRUE])dnl
|
---|
2080 | _AM_SUBST_NOTMAKE([$1_FALSE])dnl
|
---|
2081 | m4_define([_AM_COND_VALUE_$1], [$2])dnl
|
---|
2082 | if $2; then
|
---|
2083 | $1_TRUE=
|
---|
2084 | $1_FALSE='#'
|
---|
2085 | else
|
---|
2086 | $1_TRUE='#'
|
---|
2087 | $1_FALSE=
|
---|
2088 | fi
|
---|
2089 | AC_CONFIG_COMMANDS_PRE(
|
---|
2090 | [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
|
---|
2091 | AC_MSG_ERROR([[conditional "$1" was never defined.
|
---|
2092 | Usually this means the macro was only invoked conditionally.]])
|
---|
2093 | fi])])
|
---|
2094 |
|
---|
2095 | # Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
---|
2096 | #
|
---|
2097 | # This file is free software; the Free Software Foundation
|
---|
2098 | # gives unlimited permission to copy and/or distribute it,
|
---|
2099 | # with or without modifications, as long as this notice is preserved.
|
---|
2100 |
|
---|
2101 |
|
---|
2102 | # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
|
---|
2103 | # written in clear, in which case automake, when reading aclocal.m4,
|
---|
2104 | # will think it sees a *use*, and therefore will trigger all it's
|
---|
2105 | # C support machinery. Also note that it means that autoscan, seeing
|
---|
2106 | # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
|
---|
2107 |
|
---|
2108 |
|
---|
2109 | # _AM_DEPENDENCIES(NAME)
|
---|
2110 | # ----------------------
|
---|
2111 | # See how the compiler implements dependency checking.
|
---|
2112 | # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
|
---|
2113 | # We try a few techniques and use that to set a single cache variable.
|
---|
2114 | #
|
---|
2115 | # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
|
---|
2116 | # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
|
---|
2117 | # dependency, and given that the user is not expected to run this macro,
|
---|
2118 | # just rely on AC_PROG_CC.
|
---|
2119 | AC_DEFUN([_AM_DEPENDENCIES],
|
---|
2120 | [AC_REQUIRE([AM_SET_DEPDIR])dnl
|
---|
2121 | AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
|
---|
2122 | AC_REQUIRE([AM_MAKE_INCLUDE])dnl
|
---|
2123 | AC_REQUIRE([AM_DEP_TRACK])dnl
|
---|
2124 |
|
---|
2125 | m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
|
---|
2126 | [$1], [CXX], [depcc="$CXX" am_compiler_list=],
|
---|
2127 | [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
|
---|
2128 | [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
|
---|
2129 | [$1], [UPC], [depcc="$UPC" am_compiler_list=],
|
---|
2130 | [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
|
---|
2131 | [depcc="$$1" am_compiler_list=])
|
---|
2132 |
|
---|
2133 | AC_CACHE_CHECK([dependency style of $depcc],
|
---|
2134 | [am_cv_$1_dependencies_compiler_type],
|
---|
2135 | [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
|
---|
2136 | # We make a subdir and do the tests there. Otherwise we can end up
|
---|
2137 | # making bogus files that we don't know about and never remove. For
|
---|
2138 | # instance it was reported that on HP-UX the gcc test will end up
|
---|
2139 | # making a dummy file named 'D' -- because '-MD' means "put the output
|
---|
2140 | # in D".
|
---|
2141 | rm -rf conftest.dir
|
---|
2142 | mkdir conftest.dir
|
---|
2143 | # Copy depcomp to subdir because otherwise we won't find it if we're
|
---|
2144 | # using a relative directory.
|
---|
2145 | cp "$am_depcomp" conftest.dir
|
---|
2146 | cd conftest.dir
|
---|
2147 | # We will build objects and dependencies in a subdirectory because
|
---|
2148 | # it helps to detect inapplicable dependency modes. For instance
|
---|
2149 | # both Tru64's cc and ICC support -MD to output dependencies as a
|
---|
2150 | # side effect of compilation, but ICC will put the dependencies in
|
---|
2151 | # the current directory while Tru64 will put them in the object
|
---|
2152 | # directory.
|
---|
2153 | mkdir sub
|
---|
2154 |
|
---|
2155 | am_cv_$1_dependencies_compiler_type=none
|
---|
2156 | if test "$am_compiler_list" = ""; then
|
---|
2157 | am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
|
---|
2158 | fi
|
---|
2159 | am__universal=false
|
---|
2160 | m4_case([$1], [CC],
|
---|
2161 | [case " $depcc " in #(
|
---|
2162 | *\ -arch\ *\ -arch\ *) am__universal=true ;;
|
---|
2163 | esac],
|
---|
2164 | [CXX],
|
---|
2165 | [case " $depcc " in #(
|
---|
2166 | *\ -arch\ *\ -arch\ *) am__universal=true ;;
|
---|
2167 | esac])
|
---|
2168 |
|
---|
2169 | for depmode in $am_compiler_list; do
|
---|
2170 | # Setup a source with many dependencies, because some compilers
|
---|
2171 | # like to wrap large dependency lists on column 80 (with \), and
|
---|
2172 | # we should not choose a depcomp mode which is confused by this.
|
---|
2173 | #
|
---|
2174 | # We need to recreate these files for each test, as the compiler may
|
---|
2175 | # overwrite some of them when testing with obscure command lines.
|
---|
2176 | # This happens at least with the AIX C compiler.
|
---|
2177 | : > sub/conftest.c
|
---|
2178 | for i in 1 2 3 4 5 6; do
|
---|
2179 | echo '#include "conftst'$i'.h"' >> sub/conftest.c
|
---|
2180 | # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
|
---|
2181 | # Solaris 10 /bin/sh.
|
---|
2182 | echo '/* dummy */' > sub/conftst$i.h
|
---|
2183 | done
|
---|
2184 | echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
|
---|
2185 |
|
---|
2186 | # We check with '-c' and '-o' for the sake of the "dashmstdout"
|
---|
2187 | # mode. It turns out that the SunPro C++ compiler does not properly
|
---|
2188 | # handle '-M -o', and we need to detect this. Also, some Intel
|
---|
2189 | # versions had trouble with output in subdirs.
|
---|
2190 | am__obj=sub/conftest.${OBJEXT-o}
|
---|
2191 | am__minus_obj="-o $am__obj"
|
---|
2192 | case $depmode in
|
---|
2193 | gcc)
|
---|
2194 | # This depmode causes a compiler race in universal mode.
|
---|
2195 | test "$am__universal" = false || continue
|
---|
2196 | ;;
|
---|
2197 | nosideeffect)
|
---|
2198 | # After this tag, mechanisms are not by side-effect, so they'll
|
---|
2199 | # only be used when explicitly requested.
|
---|
2200 | if test "x$enable_dependency_tracking" = xyes; then
|
---|
2201 | continue
|
---|
2202 | else
|
---|
2203 | break
|
---|
2204 | fi
|
---|
2205 | ;;
|
---|
2206 | msvc7 | msvc7msys | msvisualcpp | msvcmsys)
|
---|
2207 | # This compiler won't grok '-c -o', but also, the minuso test has
|
---|
2208 | # not run yet. These depmodes are late enough in the game, and
|
---|
2209 | # so weak that their functioning should not be impacted.
|
---|
2210 | am__obj=conftest.${OBJEXT-o}
|
---|
2211 | am__minus_obj=
|
---|
2212 | ;;
|
---|
2213 | none) break ;;
|
---|
2214 | esac
|
---|
2215 | if depmode=$depmode \
|
---|
2216 | source=sub/conftest.c object=$am__obj \
|
---|
2217 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
|
---|
2218 | $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
|
---|
2219 | >/dev/null 2>conftest.err &&
|
---|
2220 | grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
|
---|
2221 | grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
|
---|
2222 | grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
|
---|
2223 | ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
|
---|
2224 | # icc doesn't choke on unknown options, it will just issue warnings
|
---|
2225 | # or remarks (even with -Werror). So we grep stderr for any message
|
---|
2226 | # that says an option was ignored or not supported.
|
---|
2227 | # When given -MP, icc 7.0 and 7.1 complain thusly:
|
---|
2228 | # icc: Command line warning: ignoring option '-M'; no argument required
|
---|
2229 | # The diagnosis changed in icc 8.0:
|
---|
2230 | # icc: Command line remark: option '-MP' not supported
|
---|
2231 | if (grep 'ignoring option' conftest.err ||
|
---|
2232 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
|
---|
2233 | am_cv_$1_dependencies_compiler_type=$depmode
|
---|
2234 | break
|
---|
2235 | fi
|
---|
2236 | fi
|
---|
2237 | done
|
---|
2238 |
|
---|
2239 | cd ..
|
---|
2240 | rm -rf conftest.dir
|
---|
2241 | else
|
---|
2242 | am_cv_$1_dependencies_compiler_type=none
|
---|
2243 | fi
|
---|
2244 | ])
|
---|
2245 | AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
|
---|
2246 | AM_CONDITIONAL([am__fastdep$1], [
|
---|
2247 | test "x$enable_dependency_tracking" != xno \
|
---|
2248 | && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
|
---|
2249 | ])
|
---|
2250 |
|
---|
2251 |
|
---|
2252 | # AM_SET_DEPDIR
|
---|
2253 | # -------------
|
---|
2254 | # Choose a directory name for dependency files.
|
---|
2255 | # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
|
---|
2256 | AC_DEFUN([AM_SET_DEPDIR],
|
---|
2257 | [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
---|
2258 | AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
|
---|
2259 | ])
|
---|
2260 |
|
---|
2261 |
|
---|
2262 | # AM_DEP_TRACK
|
---|
2263 | # ------------
|
---|
2264 | AC_DEFUN([AM_DEP_TRACK],
|
---|
2265 | [AC_ARG_ENABLE([dependency-tracking], [dnl
|
---|
2266 | AS_HELP_STRING(
|
---|
2267 | [--enable-dependency-tracking],
|
---|
2268 | [do not reject slow dependency extractors])
|
---|
2269 | AS_HELP_STRING(
|
---|
2270 | [--disable-dependency-tracking],
|
---|
2271 | [speeds up one-time build])])
|
---|
2272 | if test "x$enable_dependency_tracking" != xno; then
|
---|
2273 | am_depcomp="$ac_aux_dir/depcomp"
|
---|
2274 | AMDEPBACKSLASH='\'
|
---|
2275 | am__nodep='_no'
|
---|
2276 | fi
|
---|
2277 | AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
|
---|
2278 | AC_SUBST([AMDEPBACKSLASH])dnl
|
---|
2279 | _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
|
---|
2280 | AC_SUBST([am__nodep])dnl
|
---|
2281 | _AM_SUBST_NOTMAKE([am__nodep])dnl
|
---|
2282 | ])
|
---|
2283 |
|
---|
2284 | # Generate code to set up dependency tracking. -*- Autoconf -*-
|
---|
2285 |
|
---|
2286 | # Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
---|
2287 | #
|
---|
2288 | # This file is free software; the Free Software Foundation
|
---|
2289 | # gives unlimited permission to copy and/or distribute it,
|
---|
2290 | # with or without modifications, as long as this notice is preserved.
|
---|
2291 |
|
---|
2292 |
|
---|
2293 | # _AM_OUTPUT_DEPENDENCY_COMMANDS
|
---|
2294 | # ------------------------------
|
---|
2295 | AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
|
---|
2296 | [{
|
---|
2297 | # Older Autoconf quotes --file arguments for eval, but not when files
|
---|
2298 | # are listed without --file. Let's play safe and only enable the eval
|
---|
2299 | # if we detect the quoting.
|
---|
2300 | case $CONFIG_FILES in
|
---|
2301 | *\'*) eval set x "$CONFIG_FILES" ;;
|
---|
2302 | *) set x $CONFIG_FILES ;;
|
---|
2303 | esac
|
---|
2304 | shift
|
---|
2305 | for mf
|
---|
2306 | do
|
---|
2307 | # Strip MF so we end up with the name of the file.
|
---|
2308 | mf=`echo "$mf" | sed -e 's/:.*$//'`
|
---|
2309 | # Check whether this is an Automake generated Makefile or not.
|
---|
2310 | # We used to match only the files named 'Makefile.in', but
|
---|
2311 | # some people rename them; so instead we look at the file content.
|
---|
2312 | # Grep'ing the first line is not enough: some people post-process
|
---|
2313 | # each Makefile.in and add a new line on top of each file to say so.
|
---|
2314 | # Grep'ing the whole file is not good either: AIX grep has a line
|
---|
2315 | # limit of 2048, but all sed's we know have understand at least 4000.
|
---|
2316 | if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
|
---|
2317 | dirpart=`AS_DIRNAME("$mf")`
|
---|
2318 | else
|
---|
2319 | continue
|
---|
2320 | fi
|
---|
2321 | # Extract the definition of DEPDIR, am__include, and am__quote
|
---|
2322 | # from the Makefile without running 'make'.
|
---|
2323 | DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
|
---|
2324 | test -z "$DEPDIR" && continue
|
---|
2325 | am__include=`sed -n 's/^am__include = //p' < "$mf"`
|
---|
2326 | test -z "$am__include" && continue
|
---|
2327 | am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
|
---|
2328 | # Find all dependency output files, they are included files with
|
---|
2329 | # $(DEPDIR) in their names. We invoke sed twice because it is the
|
---|
2330 | # simplest approach to changing $(DEPDIR) to its actual value in the
|
---|
2331 | # expansion.
|
---|
2332 | for file in `sed -n "
|
---|
2333 | s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
|
---|
2334 | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
|
---|
2335 | # Make sure the directory exists.
|
---|
2336 | test -f "$dirpart/$file" && continue
|
---|
2337 | fdir=`AS_DIRNAME(["$file"])`
|
---|
2338 | AS_MKDIR_P([$dirpart/$fdir])
|
---|
2339 | # echo "creating $dirpart/$file"
|
---|
2340 | echo '# dummy' > "$dirpart/$file"
|
---|
2341 | done
|
---|
2342 | done
|
---|
2343 | }
|
---|
2344 | ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
---|
2345 |
|
---|
2346 |
|
---|
2347 | # AM_OUTPUT_DEPENDENCY_COMMANDS
|
---|
2348 | # -----------------------------
|
---|
2349 | # This macro should only be invoked once -- use via AC_REQUIRE.
|
---|
2350 | #
|
---|
2351 | # This code is only required when automatic dependency tracking
|
---|
2352 | # is enabled. FIXME. This creates each '.P' file that we will
|
---|
2353 | # need in order to bootstrap the dependency handling code.
|
---|
2354 | AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
|
---|
2355 | [AC_CONFIG_COMMANDS([depfiles],
|
---|
2356 | [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
|
---|
2357 | [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
|
---|
2358 | ])
|
---|
2359 |
|
---|
2360 | # Do all the work for Automake. -*- Autoconf -*-
|
---|
2361 |
|
---|
2362 | # Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
---|
2363 | #
|
---|
2364 | # This file is free software; the Free Software Foundation
|
---|
2365 | # gives unlimited permission to copy and/or distribute it,
|
---|
2366 | # with or without modifications, as long as this notice is preserved.
|
---|
2367 |
|
---|
2368 | # This macro actually does too much. Some checks are only needed if
|
---|
2369 | # your package does certain things. But this isn't really a big deal.
|
---|
2370 |
|
---|
2371 | dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
|
---|
2372 | m4_define([AC_PROG_CC],
|
---|
2373 | m4_defn([AC_PROG_CC])
|
---|
2374 | [_AM_PROG_CC_C_O
|
---|
2375 | ])
|
---|
2376 |
|
---|
2377 | # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
|
---|
2378 | # AM_INIT_AUTOMAKE([OPTIONS])
|
---|
2379 | # -----------------------------------------------
|
---|
2380 | # The call with PACKAGE and VERSION arguments is the old style
|
---|
2381 | # call (pre autoconf-2.50), which is being phased out. PACKAGE
|
---|
2382 | # and VERSION should now be passed to AC_INIT and removed from
|
---|
2383 | # the call to AM_INIT_AUTOMAKE.
|
---|
2384 | # We support both call styles for the transition. After
|
---|
2385 | # the next Automake release, Autoconf can make the AC_INIT
|
---|
2386 | # arguments mandatory, and then we can depend on a new Autoconf
|
---|
2387 | # release and drop the old call support.
|
---|
2388 | AC_DEFUN([AM_INIT_AUTOMAKE],
|
---|
2389 | [AC_PREREQ([2.65])dnl
|
---|
2390 | dnl Autoconf wants to disallow AM_ names. We explicitly allow
|
---|
2391 | dnl the ones we care about.
|
---|
2392 | m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
|
---|
2393 | AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
|
---|
2394 | AC_REQUIRE([AC_PROG_INSTALL])dnl
|
---|
2395 | if test "`cd $srcdir && pwd`" != "`pwd`"; then
|
---|
2396 | # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
|
---|
2397 | # is not polluted with repeated "-I."
|
---|
2398 | AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
|
---|
2399 | # test to see if srcdir already configured
|
---|
2400 | if test -f $srcdir/config.status; then
|
---|
2401 | AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
|
---|
2402 | fi
|
---|
2403 | fi
|
---|
2404 |
|
---|
2405 | # test whether we have cygpath
|
---|
2406 | if test -z "$CYGPATH_W"; then
|
---|
2407 | if (cygpath --version) >/dev/null 2>/dev/null; then
|
---|
2408 | CYGPATH_W='cygpath -w'
|
---|
2409 | else
|
---|
2410 | CYGPATH_W=echo
|
---|
2411 | fi
|
---|
2412 | fi
|
---|
2413 | AC_SUBST([CYGPATH_W])
|
---|
2414 |
|
---|
2415 | # Define the identity of the package.
|
---|
2416 | dnl Distinguish between old-style and new-style calls.
|
---|
2417 | m4_ifval([$2],
|
---|
2418 | [AC_DIAGNOSE([obsolete],
|
---|
2419 | [$0: two- and three-arguments forms are deprecated.])
|
---|
2420 | m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
|
---|
2421 | AC_SUBST([PACKAGE], [$1])dnl
|
---|
2422 | AC_SUBST([VERSION], [$2])],
|
---|
2423 | [_AM_SET_OPTIONS([$1])dnl
|
---|
2424 | dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
|
---|
2425 | m4_if(
|
---|
2426 | m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
|
---|
2427 | [ok:ok],,
|
---|
2428 | [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
|
---|
2429 | AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
|
---|
2430 | AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
|
---|
2431 |
|
---|
2432 | _AM_IF_OPTION([no-define],,
|
---|
2433 | [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
|
---|
2434 | AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
|
---|
2435 |
|
---|
2436 | # Some tools Automake needs.
|
---|
2437 | AC_REQUIRE([AM_SANITY_CHECK])dnl
|
---|
2438 | AC_REQUIRE([AC_ARG_PROGRAM])dnl
|
---|
2439 | AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
|
---|
2440 | AM_MISSING_PROG([AUTOCONF], [autoconf])
|
---|
2441 | AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
|
---|
2442 | AM_MISSING_PROG([AUTOHEADER], [autoheader])
|
---|
2443 | AM_MISSING_PROG([MAKEINFO], [makeinfo])
|
---|
2444 | AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
|
---|
2445 | AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
|
---|
2446 | AC_REQUIRE([AC_PROG_MKDIR_P])dnl
|
---|
2447 | # For better backward compatibility. To be removed once Automake 1.9.x
|
---|
2448 | # dies out for good. For more background, see:
|
---|
2449 | # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
|
---|
2450 | # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
|
---|
2451 | AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
|
---|
2452 | # We need awk for the "check" target. The system "awk" is bad on
|
---|
2453 | # some platforms.
|
---|
2454 | AC_REQUIRE([AC_PROG_AWK])dnl
|
---|
2455 | AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
---|
2456 | AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
---|
2457 | _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
|
---|
2458 | [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
|
---|
2459 | [_AM_PROG_TAR([v7])])])
|
---|
2460 | _AM_IF_OPTION([no-dependencies],,
|
---|
2461 | [AC_PROVIDE_IFELSE([AC_PROG_CC],
|
---|
2462 | [_AM_DEPENDENCIES([CC])],
|
---|
2463 | [m4_define([AC_PROG_CC],
|
---|
2464 | m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
|
---|
2465 | AC_PROVIDE_IFELSE([AC_PROG_CXX],
|
---|
2466 | [_AM_DEPENDENCIES([CXX])],
|
---|
2467 | [m4_define([AC_PROG_CXX],
|
---|
2468 | m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
|
---|
2469 | AC_PROVIDE_IFELSE([AC_PROG_OBJC],
|
---|
2470 | [_AM_DEPENDENCIES([OBJC])],
|
---|
2471 | [m4_define([AC_PROG_OBJC],
|
---|
2472 | m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
|
---|
2473 | AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
|
---|
2474 | [_AM_DEPENDENCIES([OBJCXX])],
|
---|
2475 | [m4_define([AC_PROG_OBJCXX],
|
---|
2476 | m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
|
---|
2477 | ])
|
---|
2478 | AC_REQUIRE([AM_SILENT_RULES])dnl
|
---|
2479 | dnl The testsuite driver may need to know about EXEEXT, so add the
|
---|
2480 | dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
|
---|
2481 | dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
|
---|
2482 | AC_CONFIG_COMMANDS_PRE(dnl
|
---|
2483 | [m4_provide_if([_AM_COMPILER_EXEEXT],
|
---|
2484 | [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
|
---|
2485 |
|
---|
2486 | # POSIX will say in a future version that running "rm -f" with no argument
|
---|
2487 | # is OK; and we want to be able to make that assumption in our Makefile
|
---|
2488 | # recipes. So use an aggressive probe to check that the usage we want is
|
---|
2489 | # actually supported "in the wild" to an acceptable degree.
|
---|
2490 | # See automake bug#10828.
|
---|
2491 | # To make any issue more visible, cause the running configure to be aborted
|
---|
2492 | # by default if the 'rm' program in use doesn't match our expectations; the
|
---|
2493 | # user can still override this though.
|
---|
2494 | if rm -f && rm -fr && rm -rf; then : OK; else
|
---|
2495 | cat >&2 <<'END'
|
---|
2496 | Oops!
|
---|
2497 |
|
---|
2498 | Your 'rm' program seems unable to run without file operands specified
|
---|
2499 | on the command line, even when the '-f' option is present. This is contrary
|
---|
2500 | to the behaviour of most rm programs out there, and not conforming with
|
---|
2501 | the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
|
---|
2502 |
|
---|
2503 | Please tell bug-automake@gnu.org about your system, including the value
|
---|
2504 | of your $PATH and any error possibly output before this message. This
|
---|
2505 | can help us improve future automake versions.
|
---|
2506 |
|
---|
2507 | END
|
---|
2508 | if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
|
---|
2509 | echo 'Configuration will proceed anyway, since you have set the' >&2
|
---|
2510 | echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
|
---|
2511 | echo >&2
|
---|
2512 | else
|
---|
2513 | cat >&2 <<'END'
|
---|
2514 | Aborting the configuration process, to ensure you take notice of the issue.
|
---|
2515 |
|
---|
2516 | You can download and install GNU coreutils to get an 'rm' implementation
|
---|
2517 | that behaves properly: <http://www.gnu.org/software/coreutils/>.
|
---|
2518 |
|
---|
2519 | If you want to complete the configuration process using your problematic
|
---|
2520 | 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
|
---|
2521 | to "yes", and re-run configure.
|
---|
2522 |
|
---|
2523 | END
|
---|
2524 | AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
|
---|
2525 | fi
|
---|
2526 | fi])
|
---|
2527 |
|
---|
2528 | dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
|
---|
2529 | dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
|
---|
2530 | dnl mangled by Autoconf and run in a shell conditional statement.
|
---|
2531 | m4_define([_AC_COMPILER_EXEEXT],
|
---|
2532 | m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
|
---|
2533 |
|
---|
2534 | # When config.status generates a header, we must update the stamp-h file.
|
---|
2535 | # This file resides in the same directory as the config header
|
---|
2536 | # that is generated. The stamp files are numbered to have different names.
|
---|
2537 |
|
---|
2538 | # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
|
---|
2539 | # loop where config.status creates the headers, so we can generate
|
---|
2540 | # our stamp files there.
|
---|
2541 | AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
|
---|
2542 | [# Compute $1's index in $config_headers.
|
---|
2543 | _am_arg=$1
|
---|
2544 | _am_stamp_count=1
|
---|
2545 | for _am_header in $config_headers :; do
|
---|
2546 | case $_am_header in
|
---|
2547 | $_am_arg | $_am_arg:* )
|
---|
2548 | break ;;
|
---|
2549 | * )
|
---|
2550 | _am_stamp_count=`expr $_am_stamp_count + 1` ;;
|
---|
2551 | esac
|
---|
2552 | done
|
---|
2553 | echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
|
---|
2554 |
|
---|
2555 | # Copyright (C) 2001-2013 Free Software Foundation, Inc.
|
---|
2556 | #
|
---|
2557 | # This file is free software; the Free Software Foundation
|
---|
2558 | # gives unlimited permission to copy and/or distribute it,
|
---|
2559 | # with or without modifications, as long as this notice is preserved.
|
---|
2560 |
|
---|
2561 | # AM_PROG_INSTALL_SH
|
---|
2562 | # ------------------
|
---|
2563 | # Define $install_sh.
|
---|
2564 | AC_DEFUN([AM_PROG_INSTALL_SH],
|
---|
2565 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
---|
2566 | if test x"${install_sh}" != xset; then
|
---|
2567 | case $am_aux_dir in
|
---|
2568 | *\ * | *\ *)
|
---|
2569 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
|
---|
2570 | *)
|
---|
2571 | install_sh="\${SHELL} $am_aux_dir/install-sh"
|
---|
2572 | esac
|
---|
2573 | fi
|
---|
2574 | AC_SUBST([install_sh])])
|
---|
2575 |
|
---|
2576 | # Copyright (C) 2003-2013 Free Software Foundation, Inc.
|
---|
2577 | #
|
---|
2578 | # This file is free software; the Free Software Foundation
|
---|
2579 | # gives unlimited permission to copy and/or distribute it,
|
---|
2580 | # with or without modifications, as long as this notice is preserved.
|
---|
2581 |
|
---|
2582 | # Check whether the underlying file-system supports filenames
|
---|
2583 | # with a leading dot. For instance MS-DOS doesn't.
|
---|
2584 | AC_DEFUN([AM_SET_LEADING_DOT],
|
---|
2585 | [rm -rf .tst 2>/dev/null
|
---|
2586 | mkdir .tst 2>/dev/null
|
---|
2587 | if test -d .tst; then
|
---|
2588 | am__leading_dot=.
|
---|
2589 | else
|
---|
2590 | am__leading_dot=_
|
---|
2591 | fi
|
---|
2592 | rmdir .tst 2>/dev/null
|
---|
2593 | AC_SUBST([am__leading_dot])])
|
---|
2594 |
|
---|
2595 | # Check to see how 'make' treats includes. -*- Autoconf -*-
|
---|
2596 |
|
---|
2597 | # Copyright (C) 2001-2013 Free Software Foundation, Inc.
|
---|
2598 | #
|
---|
2599 | # This file is free software; the Free Software Foundation
|
---|
2600 | # gives unlimited permission to copy and/or distribute it,
|
---|
2601 | # with or without modifications, as long as this notice is preserved.
|
---|
2602 |
|
---|
2603 | # AM_MAKE_INCLUDE()
|
---|
2604 | # -----------------
|
---|
2605 | # Check to see how make treats includes.
|
---|
2606 | AC_DEFUN([AM_MAKE_INCLUDE],
|
---|
2607 | [am_make=${MAKE-make}
|
---|
2608 | cat > confinc << 'END'
|
---|
2609 | am__doit:
|
---|
2610 | @echo this is the am__doit target
|
---|
2611 | .PHONY: am__doit
|
---|
2612 | END
|
---|
2613 | # If we don't find an include directive, just comment out the code.
|
---|
2614 | AC_MSG_CHECKING([for style of include used by $am_make])
|
---|
2615 | am__include="#"
|
---|
2616 | am__quote=
|
---|
2617 | _am_result=none
|
---|
2618 | # First try GNU make style include.
|
---|
2619 | echo "include confinc" > confmf
|
---|
2620 | # Ignore all kinds of additional output from 'make'.
|
---|
2621 | case `$am_make -s -f confmf 2> /dev/null` in #(
|
---|
2622 | *the\ am__doit\ target*)
|
---|
2623 | am__include=include
|
---|
2624 | am__quote=
|
---|
2625 | _am_result=GNU
|
---|
2626 | ;;
|
---|
2627 | esac
|
---|
2628 | # Now try BSD make style include.
|
---|
2629 | if test "$am__include" = "#"; then
|
---|
2630 | echo '.include "confinc"' > confmf
|
---|
2631 | case `$am_make -s -f confmf 2> /dev/null` in #(
|
---|
2632 | *the\ am__doit\ target*)
|
---|
2633 | am__include=.include
|
---|
2634 | am__quote="\""
|
---|
2635 | _am_result=BSD
|
---|
2636 | ;;
|
---|
2637 | esac
|
---|
2638 | fi
|
---|
2639 | AC_SUBST([am__include])
|
---|
2640 | AC_SUBST([am__quote])
|
---|
2641 | AC_MSG_RESULT([$_am_result])
|
---|
2642 | rm -f confinc confmf
|
---|
2643 | ])
|
---|
2644 |
|
---|
2645 | # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
|
---|
2646 |
|
---|
2647 | # Copyright (C) 1997-2013 Free Software Foundation, Inc.
|
---|
2648 | #
|
---|
2649 | # This file is free software; the Free Software Foundation
|
---|
2650 | # gives unlimited permission to copy and/or distribute it,
|
---|
2651 | # with or without modifications, as long as this notice is preserved.
|
---|
2652 |
|
---|
2653 | # AM_MISSING_PROG(NAME, PROGRAM)
|
---|
2654 | # ------------------------------
|
---|
2655 | AC_DEFUN([AM_MISSING_PROG],
|
---|
2656 | [AC_REQUIRE([AM_MISSING_HAS_RUN])
|
---|
2657 | $1=${$1-"${am_missing_run}$2"}
|
---|
2658 | AC_SUBST($1)])
|
---|
2659 |
|
---|
2660 | # AM_MISSING_HAS_RUN
|
---|
2661 | # ------------------
|
---|
2662 | # Define MISSING if not defined so far and test if it is modern enough.
|
---|
2663 | # If it is, set am_missing_run to use it, otherwise, to nothing.
|
---|
2664 | AC_DEFUN([AM_MISSING_HAS_RUN],
|
---|
2665 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
---|
2666 | AC_REQUIRE_AUX_FILE([missing])dnl
|
---|
2667 | if test x"${MISSING+set}" != xset; then
|
---|
2668 | case $am_aux_dir in
|
---|
2669 | *\ * | *\ *)
|
---|
2670 | MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
|
---|
2671 | *)
|
---|
2672 | MISSING="\${SHELL} $am_aux_dir/missing" ;;
|
---|
2673 | esac
|
---|
2674 | fi
|
---|
2675 | # Use eval to expand $SHELL
|
---|
2676 | if eval "$MISSING --is-lightweight"; then
|
---|
2677 | am_missing_run="$MISSING "
|
---|
2678 | else
|
---|
2679 | am_missing_run=
|
---|
2680 | AC_MSG_WARN(['missing' script is too old or missing])
|
---|
2681 | fi
|
---|
2682 | ])
|
---|
2683 |
|
---|
2684 | # Helper functions for option handling. -*- Autoconf -*-
|
---|
2685 |
|
---|
2686 | # Copyright (C) 2001-2013 Free Software Foundation, Inc.
|
---|
2687 | #
|
---|
2688 | # This file is free software; the Free Software Foundation
|
---|
2689 | # gives unlimited permission to copy and/or distribute it,
|
---|
2690 | # with or without modifications, as long as this notice is preserved.
|
---|
2691 |
|
---|
2692 | # _AM_MANGLE_OPTION(NAME)
|
---|
2693 | # -----------------------
|
---|
2694 | AC_DEFUN([_AM_MANGLE_OPTION],
|
---|
2695 | [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
|
---|
2696 |
|
---|
2697 | # _AM_SET_OPTION(NAME)
|
---|
2698 | # --------------------
|
---|
2699 | # Set option NAME. Presently that only means defining a flag for this option.
|
---|
2700 | AC_DEFUN([_AM_SET_OPTION],
|
---|
2701 | [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
|
---|
2702 |
|
---|
2703 | # _AM_SET_OPTIONS(OPTIONS)
|
---|
2704 | # ------------------------
|
---|
2705 | # OPTIONS is a space-separated list of Automake options.
|
---|
2706 | AC_DEFUN([_AM_SET_OPTIONS],
|
---|
2707 | [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
|
---|
2708 |
|
---|
2709 | # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
|
---|
2710 | # -------------------------------------------
|
---|
2711 | # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
|
---|
2712 | AC_DEFUN([_AM_IF_OPTION],
|
---|
2713 | [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
|
---|
2714 |
|
---|
2715 | # Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
---|
2716 | #
|
---|
2717 | # This file is free software; the Free Software Foundation
|
---|
2718 | # gives unlimited permission to copy and/or distribute it,
|
---|
2719 | # with or without modifications, as long as this notice is preserved.
|
---|
2720 |
|
---|
2721 | # _AM_PROG_CC_C_O
|
---|
2722 | # ---------------
|
---|
2723 | # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
|
---|
2724 | # to automatically call this.
|
---|
2725 | AC_DEFUN([_AM_PROG_CC_C_O],
|
---|
2726 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
---|
2727 | AC_REQUIRE_AUX_FILE([compile])dnl
|
---|
2728 | AC_LANG_PUSH([C])dnl
|
---|
2729 | AC_CACHE_CHECK(
|
---|
2730 | [whether $CC understands -c and -o together],
|
---|
2731 | [am_cv_prog_cc_c_o],
|
---|
2732 | [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
|
---|
2733 | # Make sure it works both with $CC and with simple cc.
|
---|
2734 | # Following AC_PROG_CC_C_O, we do the test twice because some
|
---|
2735 | # compilers refuse to overwrite an existing .o file with -o,
|
---|
2736 | # though they will create one.
|
---|
2737 | am_cv_prog_cc_c_o=yes
|
---|
2738 | for am_i in 1 2; do
|
---|
2739 | if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
|
---|
2740 | && test -f conftest2.$ac_objext; then
|
---|
2741 | : OK
|
---|
2742 | else
|
---|
2743 | am_cv_prog_cc_c_o=no
|
---|
2744 | break
|
---|
2745 | fi
|
---|
2746 | done
|
---|
2747 | rm -f core conftest*
|
---|
2748 | unset am_i])
|
---|
2749 | if test "$am_cv_prog_cc_c_o" != yes; then
|
---|
2750 | # Losing compiler, so override with the script.
|
---|
2751 | # FIXME: It is wrong to rewrite CC.
|
---|
2752 | # But if we don't then we get into trouble of one sort or another.
|
---|
2753 | # A longer-term fix would be to have automake use am__CC in this case,
|
---|
2754 | # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
|
---|
2755 | CC="$am_aux_dir/compile $CC"
|
---|
2756 | fi
|
---|
2757 | AC_LANG_POP([C])])
|
---|
2758 |
|
---|
2759 | # For backward compatibility.
|
---|
2760 | AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
|
---|
2761 |
|
---|
2762 | # Copyright (C) 2001-2013 Free Software Foundation, Inc.
|
---|
2763 | #
|
---|
2764 | # This file is free software; the Free Software Foundation
|
---|
2765 | # gives unlimited permission to copy and/or distribute it,
|
---|
2766 | # with or without modifications, as long as this notice is preserved.
|
---|
2767 |
|
---|
2768 | # AM_RUN_LOG(COMMAND)
|
---|
2769 | # -------------------
|
---|
2770 | # Run COMMAND, save the exit status in ac_status, and log it.
|
---|
2771 | # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
|
---|
2772 | AC_DEFUN([AM_RUN_LOG],
|
---|
2773 | [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
|
---|
2774 | ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
|
---|
2775 | ac_status=$?
|
---|
2776 | echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
|
---|
2777 | (exit $ac_status); }])
|
---|
2778 |
|
---|
2779 | # Check to make sure that the build environment is sane. -*- Autoconf -*-
|
---|
2780 |
|
---|
2781 | # Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
---|
2782 | #
|
---|
2783 | # This file is free software; the Free Software Foundation
|
---|
2784 | # gives unlimited permission to copy and/or distribute it,
|
---|
2785 | # with or without modifications, as long as this notice is preserved.
|
---|
2786 |
|
---|
2787 | # AM_SANITY_CHECK
|
---|
2788 | # ---------------
|
---|
2789 | AC_DEFUN([AM_SANITY_CHECK],
|
---|
2790 | [AC_MSG_CHECKING([whether build environment is sane])
|
---|
2791 | # Reject unsafe characters in $srcdir or the absolute working directory
|
---|
2792 | # name. Accept space and tab only in the latter.
|
---|
2793 | am_lf='
|
---|
2794 | '
|
---|
2795 | case `pwd` in
|
---|
2796 | *[[\\\"\#\$\&\'\`$am_lf]]*)
|
---|
2797 | AC_MSG_ERROR([unsafe absolute working directory name]);;
|
---|
2798 | esac
|
---|
2799 | case $srcdir in
|
---|
2800 | *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
|
---|
2801 | AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
|
---|
2802 | esac
|
---|
2803 |
|
---|
2804 | # Do 'set' in a subshell so we don't clobber the current shell's
|
---|
2805 | # arguments. Must try -L first in case configure is actually a
|
---|
2806 | # symlink; some systems play weird games with the mod time of symlinks
|
---|
2807 | # (eg FreeBSD returns the mod time of the symlink's containing
|
---|
2808 | # directory).
|
---|
2809 | if (
|
---|
2810 | am_has_slept=no
|
---|
2811 | for am_try in 1 2; do
|
---|
2812 | echo "timestamp, slept: $am_has_slept" > conftest.file
|
---|
2813 | set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
|
---|
2814 | if test "$[*]" = "X"; then
|
---|
2815 | # -L didn't work.
|
---|
2816 | set X `ls -t "$srcdir/configure" conftest.file`
|
---|
2817 | fi
|
---|
2818 | if test "$[*]" != "X $srcdir/configure conftest.file" \
|
---|
2819 | && test "$[*]" != "X conftest.file $srcdir/configure"; then
|
---|
2820 |
|
---|
2821 | # If neither matched, then we have a broken ls. This can happen
|
---|
2822 | # if, for instance, CONFIG_SHELL is bash and it inherits a
|
---|
2823 | # broken ls alias from the environment. This has actually
|
---|
2824 | # happened. Such a system could not be considered "sane".
|
---|
2825 | AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
|
---|
2826 | alias in your environment])
|
---|
2827 | fi
|
---|
2828 | if test "$[2]" = conftest.file || test $am_try -eq 2; then
|
---|
2829 | break
|
---|
2830 | fi
|
---|
2831 | # Just in case.
|
---|
2832 | sleep 1
|
---|
2833 | am_has_slept=yes
|
---|
2834 | done
|
---|
2835 | test "$[2]" = conftest.file
|
---|
2836 | )
|
---|
2837 | then
|
---|
2838 | # Ok.
|
---|
2839 | :
|
---|
2840 | else
|
---|
2841 | AC_MSG_ERROR([newly created file is older than distributed files!
|
---|
2842 | Check your system clock])
|
---|
2843 | fi
|
---|
2844 | AC_MSG_RESULT([yes])
|
---|
2845 | # If we didn't sleep, we still need to ensure time stamps of config.status and
|
---|
2846 | # generated files are strictly newer.
|
---|
2847 | am_sleep_pid=
|
---|
2848 | if grep 'slept: no' conftest.file >/dev/null 2>&1; then
|
---|
2849 | ( sleep 1 ) &
|
---|
2850 | am_sleep_pid=$!
|
---|
2851 | fi
|
---|
2852 | AC_CONFIG_COMMANDS_PRE(
|
---|
2853 | [AC_MSG_CHECKING([that generated files are newer than configure])
|
---|
2854 | if test -n "$am_sleep_pid"; then
|
---|
2855 | # Hide warnings about reused PIDs.
|
---|
2856 | wait $am_sleep_pid 2>/dev/null
|
---|
2857 | fi
|
---|
2858 | AC_MSG_RESULT([done])])
|
---|
2859 | rm -f conftest.file
|
---|
2860 | ])
|
---|
2861 |
|
---|
2862 | # Copyright (C) 2009-2013 Free Software Foundation, Inc.
|
---|
2863 | #
|
---|
2864 | # This file is free software; the Free Software Foundation
|
---|
2865 | # gives unlimited permission to copy and/or distribute it,
|
---|
2866 | # with or without modifications, as long as this notice is preserved.
|
---|
2867 |
|
---|
2868 | # AM_SILENT_RULES([DEFAULT])
|
---|
2869 | # --------------------------
|
---|
2870 | # Enable less verbose build rules; with the default set to DEFAULT
|
---|
2871 | # ("yes" being less verbose, "no" or empty being verbose).
|
---|
2872 | AC_DEFUN([AM_SILENT_RULES],
|
---|
2873 | [AC_ARG_ENABLE([silent-rules], [dnl
|
---|
2874 | AS_HELP_STRING(
|
---|
2875 | [--enable-silent-rules],
|
---|
2876 | [less verbose build output (undo: "make V=1")])
|
---|
2877 | AS_HELP_STRING(
|
---|
2878 | [--disable-silent-rules],
|
---|
2879 | [verbose build output (undo: "make V=0")])dnl
|
---|
2880 | ])
|
---|
2881 | case $enable_silent_rules in @%:@ (((
|
---|
2882 | yes) AM_DEFAULT_VERBOSITY=0;;
|
---|
2883 | no) AM_DEFAULT_VERBOSITY=1;;
|
---|
2884 | *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
|
---|
2885 | esac
|
---|
2886 | dnl
|
---|
2887 | dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
|
---|
2888 | dnl do not support nested variable expansions.
|
---|
2889 | dnl See automake bug#9928 and bug#10237.
|
---|
2890 | am_make=${MAKE-make}
|
---|
2891 | AC_CACHE_CHECK([whether $am_make supports nested variables],
|
---|
2892 | [am_cv_make_support_nested_variables],
|
---|
2893 | [if AS_ECHO([['TRUE=$(BAR$(V))
|
---|
2894 | BAR0=false
|
---|
2895 | BAR1=true
|
---|
2896 | V=1
|
---|
2897 | am__doit:
|
---|
2898 | @$(TRUE)
|
---|
2899 | .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
|
---|
2900 | am_cv_make_support_nested_variables=yes
|
---|
2901 | else
|
---|
2902 | am_cv_make_support_nested_variables=no
|
---|
2903 | fi])
|
---|
2904 | if test $am_cv_make_support_nested_variables = yes; then
|
---|
2905 | dnl Using '$V' instead of '$(V)' breaks IRIX make.
|
---|
2906 | AM_V='$(V)'
|
---|
2907 | AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
|
---|
2908 | else
|
---|
2909 | AM_V=$AM_DEFAULT_VERBOSITY
|
---|
2910 | AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
|
---|
2911 | fi
|
---|
2912 | AC_SUBST([AM_V])dnl
|
---|
2913 | AM_SUBST_NOTMAKE([AM_V])dnl
|
---|
2914 | AC_SUBST([AM_DEFAULT_V])dnl
|
---|
2915 | AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
|
---|
2916 | AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
|
---|
2917 | AM_BACKSLASH='\'
|
---|
2918 | AC_SUBST([AM_BACKSLASH])dnl
|
---|
2919 | _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
|
---|
2920 | ])
|
---|
2921 |
|
---|
2922 | # Copyright (C) 2001-2013 Free Software Foundation, Inc.
|
---|
2923 | #
|
---|
2924 | # This file is free software; the Free Software Foundation
|
---|
2925 | # gives unlimited permission to copy and/or distribute it,
|
---|
2926 | # with or without modifications, as long as this notice is preserved.
|
---|
2927 |
|
---|
2928 | # AM_PROG_INSTALL_STRIP
|
---|
2929 | # ---------------------
|
---|
2930 | # One issue with vendor 'install' (even GNU) is that you can't
|
---|
2931 | # specify the program used to strip binaries. This is especially
|
---|
2932 | # annoying in cross-compiling environments, where the build's strip
|
---|
2933 | # is unlikely to handle the host's binaries.
|
---|
2934 | # Fortunately install-sh will honor a STRIPPROG variable, so we
|
---|
2935 | # always use install-sh in "make install-strip", and initialize
|
---|
2936 | # STRIPPROG with the value of the STRIP variable (set by the user).
|
---|
2937 | AC_DEFUN([AM_PROG_INSTALL_STRIP],
|
---|
2938 | [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
|
---|
2939 | # Installed binaries are usually stripped using 'strip' when the user
|
---|
2940 | # run "make install-strip". However 'strip' might not be the right
|
---|
2941 | # tool to use in cross-compilation environments, therefore Automake
|
---|
2942 | # will honor the 'STRIP' environment variable to overrule this program.
|
---|
2943 | dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
|
---|
2944 | if test "$cross_compiling" != no; then
|
---|
2945 | AC_CHECK_TOOL([STRIP], [strip], :)
|
---|
2946 | fi
|
---|
2947 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
|
---|
2948 | AC_SUBST([INSTALL_STRIP_PROGRAM])])
|
---|
2949 |
|
---|
2950 | # Copyright (C) 2006-2013 Free Software Foundation, Inc.
|
---|
2951 | #
|
---|
2952 | # This file is free software; the Free Software Foundation
|
---|
2953 | # gives unlimited permission to copy and/or distribute it,
|
---|
2954 | # with or without modifications, as long as this notice is preserved.
|
---|
2955 |
|
---|
2956 | # _AM_SUBST_NOTMAKE(VARIABLE)
|
---|
2957 | # ---------------------------
|
---|
2958 | # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
|
---|
2959 | # This macro is traced by Automake.
|
---|
2960 | AC_DEFUN([_AM_SUBST_NOTMAKE])
|
---|
2961 |
|
---|
2962 | # AM_SUBST_NOTMAKE(VARIABLE)
|
---|
2963 | # --------------------------
|
---|
2964 | # Public sister of _AM_SUBST_NOTMAKE.
|
---|
2965 | AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
|
---|
2966 |
|
---|
2967 | # Check how to create a tarball. -*- Autoconf -*-
|
---|
2968 |
|
---|
2969 | # Copyright (C) 2004-2013 Free Software Foundation, Inc.
|
---|
2970 | #
|
---|
2971 | # This file is free software; the Free Software Foundation
|
---|
2972 | # gives unlimited permission to copy and/or distribute it,
|
---|
2973 | # with or without modifications, as long as this notice is preserved.
|
---|
2974 |
|
---|
2975 | # _AM_PROG_TAR(FORMAT)
|
---|
2976 | # --------------------
|
---|
2977 | # Check how to create a tarball in format FORMAT.
|
---|
2978 | # FORMAT should be one of 'v7', 'ustar', or 'pax'.
|
---|
2979 | #
|
---|
2980 | # Substitute a variable $(am__tar) that is a command
|
---|
2981 | # writing to stdout a FORMAT-tarball containing the directory
|
---|
2982 | # $tardir.
|
---|
2983 | # tardir=directory && $(am__tar) > result.tar
|
---|
2984 | #
|
---|
2985 | # Substitute a variable $(am__untar) that extract such
|
---|
2986 | # a tarball read from stdin.
|
---|
2987 | # $(am__untar) < result.tar
|
---|
2988 | #
|
---|
2989 | AC_DEFUN([_AM_PROG_TAR],
|
---|
2990 | [# Always define AMTAR for backward compatibility. Yes, it's still used
|
---|
2991 | # in the wild :-( We should find a proper way to deprecate it ...
|
---|
2992 | AC_SUBST([AMTAR], ['$${TAR-tar}'])
|
---|
2993 |
|
---|
2994 | # We'll loop over all known methods to create a tar archive until one works.
|
---|
2995 | _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
|
---|
2996 |
|
---|
2997 | m4_if([$1], [v7],
|
---|
2998 | [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
|
---|
2999 |
|
---|
3000 | [m4_case([$1],
|
---|
3001 | [ustar],
|
---|
3002 | [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
|
---|
3003 | # There is notably a 21 bits limit for the UID and the GID. In fact,
|
---|
3004 | # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
|
---|
3005 | # and bug#13588).
|
---|
3006 | am_max_uid=2097151 # 2^21 - 1
|
---|
3007 | am_max_gid=$am_max_uid
|
---|
3008 | # The $UID and $GID variables are not portable, so we need to resort
|
---|
3009 | # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
|
---|
3010 | # below are definitely unexpected, so allow the users to see them
|
---|
3011 | # (that is, avoid stderr redirection).
|
---|
3012 | am_uid=`id -u || echo unknown`
|
---|
3013 | am_gid=`id -g || echo unknown`
|
---|
3014 | AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
|
---|
3015 | if test $am_uid -le $am_max_uid; then
|
---|
3016 | AC_MSG_RESULT([yes])
|
---|
3017 | else
|
---|
3018 | AC_MSG_RESULT([no])
|
---|
3019 | _am_tools=none
|
---|
3020 | fi
|
---|
3021 | AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
|
---|
3022 | if test $am_gid -le $am_max_gid; then
|
---|
3023 | AC_MSG_RESULT([yes])
|
---|
3024 | else
|
---|
3025 | AC_MSG_RESULT([no])
|
---|
3026 | _am_tools=none
|
---|
3027 | fi],
|
---|
3028 |
|
---|
3029 | [pax],
|
---|
3030 | [],
|
---|
3031 |
|
---|
3032 | [m4_fatal([Unknown tar format])])
|
---|
3033 |
|
---|
3034 | AC_MSG_CHECKING([how to create a $1 tar archive])
|
---|
3035 |
|
---|
3036 | # Go ahead even if we have the value already cached. We do so because we
|
---|
3037 | # need to set the values for the 'am__tar' and 'am__untar' variables.
|
---|
3038 | _am_tools=${am_cv_prog_tar_$1-$_am_tools}
|
---|
3039 |
|
---|
3040 | for _am_tool in $_am_tools; do
|
---|
3041 | case $_am_tool in
|
---|
3042 | gnutar)
|
---|
3043 | for _am_tar in tar gnutar gtar; do
|
---|
3044 | AM_RUN_LOG([$_am_tar --version]) && break
|
---|
3045 | done
|
---|
3046 | am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
|
---|
3047 | am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
|
---|
3048 | am__untar="$_am_tar -xf -"
|
---|
3049 | ;;
|
---|
3050 | plaintar)
|
---|
3051 | # Must skip GNU tar: if it does not support --format= it doesn't create
|
---|
3052 | # ustar tarball either.
|
---|
3053 | (tar --version) >/dev/null 2>&1 && continue
|
---|
3054 | am__tar='tar chf - "$$tardir"'
|
---|
3055 | am__tar_='tar chf - "$tardir"'
|
---|
3056 | am__untar='tar xf -'
|
---|
3057 | ;;
|
---|
3058 | pax)
|
---|
3059 | am__tar='pax -L -x $1 -w "$$tardir"'
|
---|
3060 | am__tar_='pax -L -x $1 -w "$tardir"'
|
---|
3061 | am__untar='pax -r'
|
---|
3062 | ;;
|
---|
3063 | cpio)
|
---|
3064 | am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
|
---|
3065 | am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
|
---|
3066 | am__untar='cpio -i -H $1 -d'
|
---|
3067 | ;;
|
---|
3068 | none)
|
---|
3069 | am__tar=false
|
---|
3070 | am__tar_=false
|
---|
3071 | am__untar=false
|
---|
3072 | ;;
|
---|
3073 | esac
|
---|
3074 |
|
---|
3075 | # If the value was cached, stop now. We just wanted to have am__tar
|
---|
3076 | # and am__untar set.
|
---|
3077 | test -n "${am_cv_prog_tar_$1}" && break
|
---|
3078 |
|
---|
3079 | # tar/untar a dummy directory, and stop if the command works.
|
---|
3080 | rm -rf conftest.dir
|
---|
3081 | mkdir conftest.dir
|
---|
3082 | echo GrepMe > conftest.dir/file
|
---|
3083 | AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
|
---|
3084 | rm -rf conftest.dir
|
---|
3085 | if test -s conftest.tar; then
|
---|
3086 | AM_RUN_LOG([$am__untar <conftest.tar])
|
---|
3087 | AM_RUN_LOG([cat conftest.dir/file])
|
---|
3088 | grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
|
---|
3089 | fi
|
---|
3090 | done
|
---|
3091 | rm -rf conftest.dir
|
---|
3092 |
|
---|
3093 | AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
|
---|
3094 | AC_MSG_RESULT([$am_cv_prog_tar_$1])])
|
---|
3095 |
|
---|
3096 | AC_SUBST([am__tar])
|
---|
3097 | AC_SUBST([am__untar])
|
---|
3098 | ]) # _AM_PROG_TAR
|
---|
3099 |
|
---|
3100 | m4_include([.macro_dir/ac_check_class.m4])
|
---|
3101 | m4_include([.macro_dir/ac_check_cpp.m4])
|
---|
3102 | m4_include([.macro_dir/ac_check_package.m4])
|
---|
3103 | m4_include([.macro_dir/ac_check_readline.m4])
|
---|
3104 | m4_include([.macro_dir/ac_find_motif.m4])
|
---|
3105 | m4_include([.macro_dir/ax_boost_base.m4])
|
---|
3106 | m4_include([.macro_dir/ax_cxx_compile_stdcxx_0x.m4])
|
---|
3107 | m4_include([.macro_dir/libtool.m4])
|
---|
3108 | m4_include([.macro_dir/ltoptions.m4])
|
---|
3109 | m4_include([.macro_dir/ltsugar.m4])
|
---|
3110 | m4_include([.macro_dir/ltversion.m4])
|
---|
3111 | m4_include([.macro_dir/lt~obsolete.m4])
|
---|
3112 | m4_include([.macro_dir/mysql++_devel.m4])
|
---|
3113 | m4_include([.macro_dir/mysql_devel.m4])
|
---|
3114 | m4_include([.macro_dir/qt4_do_it_all.m4])
|
---|
3115 | m4_include([.macro_dir/root_path.m4])
|
---|