source: trunk/FACT++/aclocal.m4@ 15284

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