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

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