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