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

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