Tizen 2.1 base
[platform/upstream/lzop.git] / aclocal.m4
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 # // standard ACC macros
24 # ************************************************************************/
25
26 AC_DEFUN([mfx_ACC_CHECK_ENDIAN], [
27 AC_C_BIGENDIAN([AC_DEFINE(ACC_ABI_BIG_ENDIAN,1,[Define to 1 if your machine is big endian.])],[AC_DEFINE(ACC_ABI_LITTLE_ENDIAN,1,[Define to 1 if your machine is little endian.])])
28 ])#
29
30 AC_DEFUN([mfx_ACC_CHECK_HEADERS], [
31 AC_HEADER_TIME
32 AC_CHECK_HEADERS([assert.h ctype.h dirent.h errno.h fcntl.h float.h limits.h malloc.h memory.h setjmp.h signal.h stdarg.h stddef.h stdint.h stdio.h stdlib.h string.h strings.h time.h unistd.h utime.h sys/mman.h sys/resource.h sys/stat.h sys/time.h sys/types.h sys/wait.h])
33 ])#
34
35 AC_DEFUN([mfx_ACC_CHECK_FUNCS], [
36 AC_CHECK_FUNCS(access alloca atexit atoi atol chmod chown clock_getcpuclockid clock_getres clock_gettime ctime difftime fstat getenv getpagesize getrusage gettimeofday gmtime isatty localtime longjmp lstat memcmp memcpy memmove memset mkdir mktime mmap mprotect munmap qsort raise rmdir setjmp signal snprintf strcasecmp strchr strdup strerror strftime stricmp strncasecmp strnicmp strrchr strstr time umask utime vsnprintf)
37 ])#
38
39
40 AC_DEFUN([mfx_ACC_CHECK_SIZEOF], [
41 AC_CHECK_SIZEOF(short)
42 AC_CHECK_SIZEOF(int)
43 AC_CHECK_SIZEOF(long)
44
45 AC_CHECK_SIZEOF(long long)
46 AC_CHECK_SIZEOF(__int16)
47 AC_CHECK_SIZEOF(__int32)
48 AC_CHECK_SIZEOF(__int64)
49
50 AC_CHECK_SIZEOF(void *)
51 AC_CHECK_SIZEOF(size_t)
52 AC_CHECK_SIZEOF(ptrdiff_t)
53 ])#
54
55
56 # /***********************************************************************
57 # // Check for ACC_conformance
58 # ************************************************************************/
59
60 AC_DEFUN([mfx_ACC_ACCCHK], [
61 mfx_tmp=$1
62 mfx_save_CPPFLAGS=$CPPFLAGS
63 dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here
64 test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS"
65
66 AC_MSG_CHECKING([whether your compiler passes the ACC conformance test])
67
68 AC_LANG_CONFTEST([AC_LANG_PROGRAM(
69 [[#define ACC_CONFIG_NO_HEADER 1
70 #include "acc/acc.h"
71 #include "acc/acc_incd.h"
72 #undef ACCCHK_ASSERT
73 #define ACCCHK_ASSERT(expr)     ACC_COMPILE_TIME_ASSERT_HEADER(expr)
74 #include "acc/acc_chk.ch"
75 #undef ACCCHK_ASSERT
76 static void test_acc_compile_time_assert(void) {
77 #define ACCCHK_ASSERT(expr)     ACC_COMPILE_TIME_ASSERT(expr)
78 #include "acc/acc_chk.ch"
79 #undef ACCCHK_ASSERT
80 }
81 #undef NDEBUG
82 #include <assert.h>
83 static int test_acc_run_time_assert(int r) {
84 #define ACCCHK_ASSERT(expr)     assert(expr);
85 #include "acc/acc_chk.ch"
86 #undef ACCCHK_ASSERT
87 return r;
88 }
89 ]], [[
90 test_acc_compile_time_assert();
91 if (test_acc_run_time_assert(1) != 1) return 1;
92 ]]
93 )])
94
95 mfx_tmp=FAILED
96 _AC_COMPILE_IFELSE([], [mfx_tmp=yes])
97 rm -f conftest.$ac_ext conftest.$ac_objext
98
99 CPPFLAGS=$mfx_save_CPPFLAGS
100
101 AC_MSG_RESULT([$mfx_tmp])
102 case x$mfx_tmp in
103   xpassed | xyes) ;;
104   *)
105     AC_MSG_NOTICE([])
106     AC_MSG_NOTICE([Your compiler failed the ACC conformance test - for details see ])
107     AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending])
108     AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.])
109     AC_MSG_NOTICE([Thanks for your support.])
110     AC_MSG_NOTICE([])
111     AC_MSG_ERROR([ACC conformance test failed. Stop.])
112 dnl    AS_EXIT
113     ;;
114 esac
115 ])# mfx_ACC_ACCCHK
116
117
118 # /***********************************************************************
119 # // Check for ACC_conformance
120 # ************************************************************************/
121
122 AC_DEFUN([mfx_MINIACC_ACCCHK], [
123 mfx_tmp=$1
124 mfx_save_CPPFLAGS=$CPPFLAGS
125 dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here
126 test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS"
127
128 AC_MSG_CHECKING([whether your compiler passes the ACC conformance test])
129
130 AC_LANG_CONFTEST([AC_LANG_PROGRAM(
131 [[#define ACC_CONFIG_NO_HEADER 1
132 #define ACC_WANT_ACC_INCD_H 1
133 #include $2
134
135 #define ACC_WANT_ACC_CHK_CH 1
136 #undef ACCCHK_ASSERT
137 #define ACCCHK_ASSERT(expr)     ACC_COMPILE_TIME_ASSERT_HEADER(expr)
138 #include $2
139
140 #define ACC_WANT_ACC_CHK_CH 1
141 #undef ACCCHK_ASSERT
142 #define ACCCHK_ASSERT(expr)     ACC_COMPILE_TIME_ASSERT(expr)
143 static void test_acc_compile_time_assert(void) {
144 #include $2
145 }
146
147 #undef NDEBUG
148 #include <assert.h>
149 #define ACC_WANT_ACC_CHK_CH 1
150 #undef ACCCHK_ASSERT
151 #define ACCCHK_ASSERT(expr)  assert(expr);
152 static int test_acc_run_time_assert(int r) {
153 #include $2
154 return r;
155 }
156 ]], [[
157 test_acc_compile_time_assert();
158 if (test_acc_run_time_assert(1) != 1) return 1;
159 ]]
160 )])
161
162 mfx_tmp=FAILED
163 _AC_COMPILE_IFELSE([], [mfx_tmp=yes])
164 rm -f conftest.$ac_ext conftest.$ac_objext
165
166 CPPFLAGS=$mfx_save_CPPFLAGS
167
168 AC_MSG_RESULT([$mfx_tmp])
169 case x$mfx_tmp in
170   xpassed | xyes) ;;
171   *)
172     AC_MSG_NOTICE([])
173     AC_MSG_NOTICE([Your compiler failed the ACC conformance test - for details see ])
174     AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending])
175     AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.])
176     AC_MSG_NOTICE([Thanks for your support.])
177     AC_MSG_NOTICE([])
178     AC_MSG_ERROR([ACC conformance test failed. Stop.])
179 dnl    AS_EXIT
180     ;;
181 esac
182 ])# mfx_MINIACC_ACCCHK
183
184
185
186 # serial 1
187
188 AC_DEFUN([mfx_PROG_CPPFLAGS], [
189 AC_MSG_CHECKING([whether the C preprocessor needs special flags])
190
191 AC_LANG_CONFTEST([AC_LANG_PROGRAM(
192 [[#include <limits.h>
193 #if (32767 >= 4294967295ul) || (65535u >= 4294967295ul)
194 #  include "your C preprocessor is broken 1"
195 #elif (0xffffu == 0xfffffffful)
196 #  include "your C preprocessor is broken 2"
197 #elif (32767 >= ULONG_MAX) || (65535u >= ULONG_MAX)
198 #  include "your C preprocessor is broken 3"
199 #endif
200 ]], [[ ]]
201 )])
202
203 mfx_save_CPPFLAGS=$CPPFLAGS
204 mfx_tmp=ERROR
205 for mfx_arg in "" -no-cpp-precomp
206 do
207   CPPFLAGS="$mfx_arg $mfx_save_CPPFLAGS"
208   _AC_COMPILE_IFELSE([],
209 [mfx_tmp=$mfx_arg
210 break])
211 done
212 CPPFLAGS=$mfx_save_CPPFLAGS
213 rm -f conftest.$ac_ext conftest.$ac_objext
214 case x$mfx_tmp in
215   x)
216     AC_MSG_RESULT([none needed]) ;;
217   xERROR)
218     AC_MSG_RESULT([ERROR])
219     AC_MSG_ERROR([your C preprocessor is broken - for details see config.log])
220     ;;
221   *)
222     AC_MSG_RESULT([$mfx_tmp])
223     CPPFLAGS="$mfx_tmp $CPPFLAGS"
224     ;;
225 esac
226 ])# mfx_PROG_CPPFLAGS
227
228
229
230 # serial 3
231
232 AC_DEFUN([mfx_CHECK_HEADER_SANE_LIMITS_H], [
233 AC_CACHE_CHECK([whether limits.h is sane],
234 mfx_cv_header_sane_limits_h,
235 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <limits.h>
236 #if (32767 >= 4294967295ul) || (65535u >= 4294967295ul)
237 #  if defined(__APPLE__) && defined(__GNUC__)
238 #    error "your preprocessor is broken - use compiler option -no-cpp-precomp"
239 #  else
240 #    include "your preprocessor is broken"
241 #  endif
242 #endif
243 #define MFX_0xffff          0xffff
244 #define MFX_0xffffffffL     4294967295ul
245 #if !defined(CHAR_BIT) || (CHAR_BIT != 8)
246 #  include "error CHAR_BIT"
247 #endif
248 #if !defined(UCHAR_MAX)
249 #  include "error UCHAR_MAX 1"
250 #endif
251 #if !defined(USHRT_MAX)
252 #  include "error USHRT_MAX 1"
253 #endif
254 #if !defined(UINT_MAX)
255 #  include "error UINT_MAX 1"
256 #endif
257 #if !defined(ULONG_MAX)
258 #  include "error ULONG_MAX 1"
259 #endif
260 #if !defined(SHRT_MAX)
261 #  include "error SHRT_MAX 1"
262 #endif
263 #if !defined(INT_MAX)
264 #  include "error INT_MAX 1"
265 #endif
266 #if !defined(LONG_MAX)
267 #  include "error LONG_MAX 1"
268 #endif
269 #if (UCHAR_MAX < 1)
270 #  include "error UCHAR_MAX 2"
271 #endif
272 #if (USHRT_MAX < 1)
273 #  include "error USHRT_MAX 2"
274 #endif
275 #if (UINT_MAX < 1)
276 #  include "error UINT_MAX 2"
277 #endif
278 #if (ULONG_MAX < 1)
279 #  include "error ULONG_MAX 2"
280 #endif
281 #if (UCHAR_MAX < 0xff)
282 #  include "error UCHAR_MAX 3"
283 #endif
284 #if (USHRT_MAX < MFX_0xffff)
285 #  include "error USHRT_MAX 3"
286 #endif
287 #if (UINT_MAX < MFX_0xffff)
288 #  include "error UINT_MAX 3"
289 #endif
290 #if (ULONG_MAX < MFX_0xffffffffL)
291 #  include "error ULONG_MAX 3"
292 #endif
293 #if (USHRT_MAX > UINT_MAX)
294 #  include "error USHRT_MAX vs UINT_MAX"
295 #endif
296 #if (UINT_MAX > ULONG_MAX)
297 #  include "error UINT_MAX vs ULONG_MAX"
298 #endif
299 ]], [[
300 #if (USHRT_MAX == MFX_0xffff)
301 { typedef char a_short2a[1 - 2 * !(sizeof(short) == 2)]; }
302 #elif (USHRT_MAX >= MFX_0xffff)
303 { typedef char a_short2b[1 - 2 * !(sizeof(short) > 2)]; }
304 #endif
305 #if (UINT_MAX == MFX_0xffff)
306 { typedef char a_int2a[1 - 2 * !(sizeof(int) == 2)]; }
307 #elif (UINT_MAX >= MFX_0xffff)
308 { typedef char a_int2b[1 - 2 * !(sizeof(int) > 2)]; }
309 #endif
310 #if (ULONG_MAX == MFX_0xffff)
311 { typedef char a_long2a[1 - 2 * !(sizeof(long) == 2)]; }
312 #elif (ULONG_MAX >= MFX_0xffff)
313 { typedef char a_long2b[1 - 2 * !(sizeof(long) > 2)]; }
314 #endif
315 #if !defined(_CRAY1) /* CRAY PVP systems */
316 #if (USHRT_MAX == MFX_0xffffffffL)
317 { typedef char a_short4a[1 - 2 * !(sizeof(short) == 4)]; }
318 #elif (USHRT_MAX >= MFX_0xffffffffL)
319 { typedef char a_short4b[1 - 2 * !(sizeof(short) > 4)]; }
320 #endif
321 #endif /* _CRAY1 */
322 #if (UINT_MAX == MFX_0xffffffffL)
323 { typedef char a_int4a[1 - 2 * !(sizeof(int) == 4)]; }
324 #elif (UINT_MAX >= MFX_0xffffffffL)
325 { typedef char a_int4b[1 - 2 * !(sizeof(int) > 4)]; }
326 #endif
327 #if (ULONG_MAX == MFX_0xffffffffL)
328 { typedef char a_long4a[1 - 2 * !(sizeof(long) == 4)]; }
329 #elif (ULONG_MAX >= MFX_0xffffffffL)
330 { typedef char a_long4b[1 - 2 * !(sizeof(long) > 4)]; }
331 #endif
332 ]])],
333 [mfx_cv_header_sane_limits_h=yes],
334 [mfx_cv_header_sane_limits_h=no])])
335 ])
336
337 # /***********************************************************************
338 # //
339 # ************************************************************************/
340
341 dnl more types which are not yet covered by ACC
342
343 AC_DEFUN([mfx_CHECK_SIZEOF], [
344 AC_CHECK_SIZEOF(__int32)
345 AC_CHECK_SIZEOF(intmax_t)
346 AC_CHECK_SIZEOF(uintmax_t)
347 AC_CHECK_SIZEOF(intptr_t)
348 AC_CHECK_SIZEOF(uintptr_t)
349
350 AC_CHECK_SIZEOF(float)
351 AC_CHECK_SIZEOF(double)
352 AC_CHECK_SIZEOF(long double)
353
354 AC_CHECK_SIZEOF(dev_t)
355 AC_CHECK_SIZEOF(fpos_t)
356 AC_CHECK_SIZEOF(mode_t)
357 AC_CHECK_SIZEOF(off_t)
358 AC_CHECK_SIZEOF(ssize_t)
359 AC_CHECK_SIZEOF(time_t)
360 ])#
361
362
363
364 AC_DEFUN([mfx_CHECK_LIB_WINMM], [
365 if test "X$GCC" = Xyes; then
366 case $host_os in
367 cygwin* | mingw* | pw32*)
368      test "X$LIBS" != "X" && LIBS="$LIBS "
369      LIBS="${LIBS}-lwinmm" ;;
370 *)
371      ;;
372 esac
373 fi
374 ])#
375
376
377 #serial 7
378
379 # Copyright (C) 1998, 1999, 2001, 2003 Free Software Foundation, Inc.
380 # This file is free software; the Free Software Foundation
381 # gives unlimited permission to copy and/or distribute it,
382 # with or without modifications, as long as this notice is preserved.
383
384 dnl From Paul Eggert.
385
386 # Define ST_MTIM_NSEC to be the nanoseconds member of struct stat's st_mtim,
387 # if it exists.
388
389 AC_DEFUN([AC_STRUCT_ST_MTIM_NSEC],
390  [AC_CACHE_CHECK([for nanoseconds member of struct stat.st_mtim],
391    ac_cv_struct_st_mtim_nsec,
392    [ac_save_CPPFLAGS="$CPPFLAGS"
393     ac_cv_struct_st_mtim_nsec=no
394     # tv_nsec -- the usual case
395     # _tv_nsec -- Solaris 2.6, if
396     #   (defined _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED == 1
397     #    && !defined __EXTENSIONS__)
398     # st__tim.tv_nsec -- UnixWare 2.1.2
399     for ac_val in tv_nsec _tv_nsec st__tim.tv_nsec; do
400       CPPFLAGS="$ac_save_CPPFLAGS -DST_MTIM_NSEC=$ac_val"
401       AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
402 #include <sys/stat.h>]], [[struct stat s; s.st_mtim.ST_MTIM_NSEC;]])],
403         [ac_cv_struct_st_mtim_nsec=$ac_val; break],[])
404     done
405     CPPFLAGS="$ac_save_CPPFLAGS"])
406
407   if test $ac_cv_struct_st_mtim_nsec != no; then
408     AC_DEFINE_UNQUOTED(ST_MTIM_NSEC, $ac_cv_struct_st_mtim_nsec,
409       [Define to be the nanoseconds member of struct stat's st_mtim,
410        if it exists.])
411   fi
412  ]
413 )
414
415 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
416 #
417 # This file is free software; the Free Software Foundation
418 # gives unlimited permission to copy and/or distribute it,
419 # with or without modifications, as long as this notice is preserved.
420
421 # AM_AUTOMAKE_VERSION(VERSION)
422 # ----------------------------
423 # Automake X.Y traces this macro to ensure aclocal.m4 has been
424 # generated from the m4 files accompanying Automake X.Y.
425 # (This private macro should not be called outside this file.)
426 AC_DEFUN([AM_AUTOMAKE_VERSION],
427 [am__api_version='1.11'
428 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
429 dnl require some minimum version.  Point them to the right macro.
430 m4_if([$1], [1.11.1], [],
431       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
432 ])
433
434 # _AM_AUTOCONF_VERSION(VERSION)
435 # -----------------------------
436 # aclocal traces this macro to find the Autoconf version.
437 # This is a private macro too.  Using m4_define simplifies
438 # the logic in aclocal, which can simply ignore this definition.
439 m4_define([_AM_AUTOCONF_VERSION], [])
440
441 # AM_SET_CURRENT_AUTOMAKE_VERSION
442 # -------------------------------
443 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
444 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
445 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
446 [AM_AUTOMAKE_VERSION([1.11.1])dnl
447 m4_ifndef([AC_AUTOCONF_VERSION],
448   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
449 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
450
451 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
452
453 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
454 #
455 # This file is free software; the Free Software Foundation
456 # gives unlimited permission to copy and/or distribute it,
457 # with or without modifications, as long as this notice is preserved.
458
459 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
460 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
461 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
462 #
463 # Of course, Automake must honor this variable whenever it calls a
464 # tool from the auxiliary directory.  The problem is that $srcdir (and
465 # therefore $ac_aux_dir as well) can be either absolute or relative,
466 # depending on how configure is run.  This is pretty annoying, since
467 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
468 # source directory, any form will work fine, but in subdirectories a
469 # relative path needs to be adjusted first.
470 #
471 # $ac_aux_dir/missing
472 #    fails when called from a subdirectory if $ac_aux_dir is relative
473 # $top_srcdir/$ac_aux_dir/missing
474 #    fails if $ac_aux_dir is absolute,
475 #    fails when called from a subdirectory in a VPATH build with
476 #          a relative $ac_aux_dir
477 #
478 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
479 # are both prefixed by $srcdir.  In an in-source build this is usually
480 # harmless because $srcdir is `.', but things will broke when you
481 # start a VPATH build or use an absolute $srcdir.
482 #
483 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
484 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
485 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
486 # and then we would define $MISSING as
487 #   MISSING="\${SHELL} $am_aux_dir/missing"
488 # This will work as long as MISSING is not called from configure, because
489 # unfortunately $(top_srcdir) has no meaning in configure.
490 # However there are other variables, like CC, which are often used in
491 # configure, and could therefore not use this "fixed" $ac_aux_dir.
492 #
493 # Another solution, used here, is to always expand $ac_aux_dir to an
494 # absolute PATH.  The drawback is that using absolute paths prevent a
495 # configured tree to be moved without reconfiguration.
496
497 AC_DEFUN([AM_AUX_DIR_EXPAND],
498 [dnl Rely on autoconf to set up CDPATH properly.
499 AC_PREREQ([2.50])dnl
500 # expand $ac_aux_dir to an absolute path
501 am_aux_dir=`cd $ac_aux_dir && pwd`
502 ])
503
504 # AM_CONDITIONAL                                            -*- Autoconf -*-
505
506 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
507 # Free Software Foundation, Inc.
508 #
509 # This file is free software; the Free Software Foundation
510 # gives unlimited permission to copy and/or distribute it,
511 # with or without modifications, as long as this notice is preserved.
512
513 # serial 9
514
515 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
516 # -------------------------------------
517 # Define a conditional.
518 AC_DEFUN([AM_CONDITIONAL],
519 [AC_PREREQ(2.52)dnl
520  ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
521         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
522 AC_SUBST([$1_TRUE])dnl
523 AC_SUBST([$1_FALSE])dnl
524 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
525 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
526 m4_define([_AM_COND_VALUE_$1], [$2])dnl
527 if $2; then
528   $1_TRUE=
529   $1_FALSE='#'
530 else
531   $1_TRUE='#'
532   $1_FALSE=
533 fi
534 AC_CONFIG_COMMANDS_PRE(
535 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
536   AC_MSG_ERROR([[conditional "$1" was never defined.
537 Usually this means the macro was only invoked conditionally.]])
538 fi])])
539
540 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
541 # Free Software Foundation, Inc.
542 #
543 # This file is free software; the Free Software Foundation
544 # gives unlimited permission to copy and/or distribute it,
545 # with or without modifications, as long as this notice is preserved.
546
547 # serial 10
548
549 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
550 # written in clear, in which case automake, when reading aclocal.m4,
551 # will think it sees a *use*, and therefore will trigger all it's
552 # C support machinery.  Also note that it means that autoscan, seeing
553 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
554
555
556 # _AM_DEPENDENCIES(NAME)
557 # ----------------------
558 # See how the compiler implements dependency checking.
559 # NAME is "CC", "CXX", "GCJ", or "OBJC".
560 # We try a few techniques and use that to set a single cache variable.
561 #
562 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
563 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
564 # dependency, and given that the user is not expected to run this macro,
565 # just rely on AC_PROG_CC.
566 AC_DEFUN([_AM_DEPENDENCIES],
567 [AC_REQUIRE([AM_SET_DEPDIR])dnl
568 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
569 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
570 AC_REQUIRE([AM_DEP_TRACK])dnl
571
572 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
573        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
574        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
575        [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
576        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
577                    [depcc="$$1"   am_compiler_list=])
578
579 AC_CACHE_CHECK([dependency style of $depcc],
580                [am_cv_$1_dependencies_compiler_type],
581 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
582   # We make a subdir and do the tests there.  Otherwise we can end up
583   # making bogus files that we don't know about and never remove.  For
584   # instance it was reported that on HP-UX the gcc test will end up
585   # making a dummy file named `D' -- because `-MD' means `put the output
586   # in D'.
587   mkdir conftest.dir
588   # Copy depcomp to subdir because otherwise we won't find it if we're
589   # using a relative directory.
590   cp "$am_depcomp" conftest.dir
591   cd conftest.dir
592   # We will build objects and dependencies in a subdirectory because
593   # it helps to detect inapplicable dependency modes.  For instance
594   # both Tru64's cc and ICC support -MD to output dependencies as a
595   # side effect of compilation, but ICC will put the dependencies in
596   # the current directory while Tru64 will put them in the object
597   # directory.
598   mkdir sub
599
600   am_cv_$1_dependencies_compiler_type=none
601   if test "$am_compiler_list" = ""; then
602      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
603   fi
604   am__universal=false
605   m4_case([$1], [CC],
606     [case " $depcc " in #(
607      *\ -arch\ *\ -arch\ *) am__universal=true ;;
608      esac],
609     [CXX],
610     [case " $depcc " in #(
611      *\ -arch\ *\ -arch\ *) am__universal=true ;;
612      esac])
613
614   for depmode in $am_compiler_list; do
615     # Setup a source with many dependencies, because some compilers
616     # like to wrap large dependency lists on column 80 (with \), and
617     # we should not choose a depcomp mode which is confused by this.
618     #
619     # We need to recreate these files for each test, as the compiler may
620     # overwrite some of them when testing with obscure command lines.
621     # This happens at least with the AIX C compiler.
622     : > sub/conftest.c
623     for i in 1 2 3 4 5 6; do
624       echo '#include "conftst'$i'.h"' >> sub/conftest.c
625       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
626       # Solaris 8's {/usr,}/bin/sh.
627       touch sub/conftst$i.h
628     done
629     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
630
631     # We check with `-c' and `-o' for the sake of the "dashmstdout"
632     # mode.  It turns out that the SunPro C++ compiler does not properly
633     # handle `-M -o', and we need to detect this.  Also, some Intel
634     # versions had trouble with output in subdirs
635     am__obj=sub/conftest.${OBJEXT-o}
636     am__minus_obj="-o $am__obj"
637     case $depmode in
638     gcc)
639       # This depmode causes a compiler race in universal mode.
640       test "$am__universal" = false || continue
641       ;;
642     nosideeffect)
643       # after this tag, mechanisms are not by side-effect, so they'll
644       # only be used when explicitly requested
645       if test "x$enable_dependency_tracking" = xyes; then
646         continue
647       else
648         break
649       fi
650       ;;
651     msvisualcpp | msvcmsys)
652       # This compiler won't grok `-c -o', but also, the minuso test has
653       # not run yet.  These depmodes are late enough in the game, and
654       # so weak that their functioning should not be impacted.
655       am__obj=conftest.${OBJEXT-o}
656       am__minus_obj=
657       ;;
658     none) break ;;
659     esac
660     if depmode=$depmode \
661        source=sub/conftest.c object=$am__obj \
662        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
663        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
664          >/dev/null 2>conftest.err &&
665        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
666        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
667        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
668        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
669       # icc doesn't choke on unknown options, it will just issue warnings
670       # or remarks (even with -Werror).  So we grep stderr for any message
671       # that says an option was ignored or not supported.
672       # When given -MP, icc 7.0 and 7.1 complain thusly:
673       #   icc: Command line warning: ignoring option '-M'; no argument required
674       # The diagnosis changed in icc 8.0:
675       #   icc: Command line remark: option '-MP' not supported
676       if (grep 'ignoring option' conftest.err ||
677           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
678         am_cv_$1_dependencies_compiler_type=$depmode
679         break
680       fi
681     fi
682   done
683
684   cd ..
685   rm -rf conftest.dir
686 else
687   am_cv_$1_dependencies_compiler_type=none
688 fi
689 ])
690 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
691 AM_CONDITIONAL([am__fastdep$1], [
692   test "x$enable_dependency_tracking" != xno \
693   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
694 ])
695
696
697 # AM_SET_DEPDIR
698 # -------------
699 # Choose a directory name for dependency files.
700 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
701 AC_DEFUN([AM_SET_DEPDIR],
702 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
703 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
704 ])
705
706
707 # AM_DEP_TRACK
708 # ------------
709 AC_DEFUN([AM_DEP_TRACK],
710 [AC_ARG_ENABLE(dependency-tracking,
711 [  --disable-dependency-tracking  speeds up one-time build
712   --enable-dependency-tracking   do not reject slow dependency extractors])
713 if test "x$enable_dependency_tracking" != xno; then
714   am_depcomp="$ac_aux_dir/depcomp"
715   AMDEPBACKSLASH='\'
716 fi
717 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
718 AC_SUBST([AMDEPBACKSLASH])dnl
719 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
720 ])
721
722 # Generate code to set up dependency tracking.              -*- Autoconf -*-
723
724 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
725 # Free Software Foundation, Inc.
726 #
727 # This file is free software; the Free Software Foundation
728 # gives unlimited permission to copy and/or distribute it,
729 # with or without modifications, as long as this notice is preserved.
730
731 #serial 5
732
733 # _AM_OUTPUT_DEPENDENCY_COMMANDS
734 # ------------------------------
735 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
736 [{
737   # Autoconf 2.62 quotes --file arguments for eval, but not when files
738   # are listed without --file.  Let's play safe and only enable the eval
739   # if we detect the quoting.
740   case $CONFIG_FILES in
741   *\'*) eval set x "$CONFIG_FILES" ;;
742   *)   set x $CONFIG_FILES ;;
743   esac
744   shift
745   for mf
746   do
747     # Strip MF so we end up with the name of the file.
748     mf=`echo "$mf" | sed -e 's/:.*$//'`
749     # Check whether this is an Automake generated Makefile or not.
750     # We used to match only the files named `Makefile.in', but
751     # some people rename them; so instead we look at the file content.
752     # Grep'ing the first line is not enough: some people post-process
753     # each Makefile.in and add a new line on top of each file to say so.
754     # Grep'ing the whole file is not good either: AIX grep has a line
755     # limit of 2048, but all sed's we know have understand at least 4000.
756     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
757       dirpart=`AS_DIRNAME("$mf")`
758     else
759       continue
760     fi
761     # Extract the definition of DEPDIR, am__include, and am__quote
762     # from the Makefile without running `make'.
763     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
764     test -z "$DEPDIR" && continue
765     am__include=`sed -n 's/^am__include = //p' < "$mf"`
766     test -z "am__include" && continue
767     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
768     # When using ansi2knr, U may be empty or an underscore; expand it
769     U=`sed -n 's/^U = //p' < "$mf"`
770     # Find all dependency output files, they are included files with
771     # $(DEPDIR) in their names.  We invoke sed twice because it is the
772     # simplest approach to changing $(DEPDIR) to its actual value in the
773     # expansion.
774     for file in `sed -n "
775       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
776          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
777       # Make sure the directory exists.
778       test -f "$dirpart/$file" && continue
779       fdir=`AS_DIRNAME(["$file"])`
780       AS_MKDIR_P([$dirpart/$fdir])
781       # echo "creating $dirpart/$file"
782       echo '# dummy' > "$dirpart/$file"
783     done
784   done
785 }
786 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
787
788
789 # AM_OUTPUT_DEPENDENCY_COMMANDS
790 # -----------------------------
791 # This macro should only be invoked once -- use via AC_REQUIRE.
792 #
793 # This code is only required when automatic dependency tracking
794 # is enabled.  FIXME.  This creates each `.P' file that we will
795 # need in order to bootstrap the dependency handling code.
796 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
797 [AC_CONFIG_COMMANDS([depfiles],
798      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
799      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
800 ])
801
802 # Do all the work for Automake.                             -*- Autoconf -*-
803
804 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
805 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
806 #
807 # This file is free software; the Free Software Foundation
808 # gives unlimited permission to copy and/or distribute it,
809 # with or without modifications, as long as this notice is preserved.
810
811 # serial 16
812
813 # This macro actually does too much.  Some checks are only needed if
814 # your package does certain things.  But this isn't really a big deal.
815
816 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
817 # AM_INIT_AUTOMAKE([OPTIONS])
818 # -----------------------------------------------
819 # The call with PACKAGE and VERSION arguments is the old style
820 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
821 # and VERSION should now be passed to AC_INIT and removed from
822 # the call to AM_INIT_AUTOMAKE.
823 # We support both call styles for the transition.  After
824 # the next Automake release, Autoconf can make the AC_INIT
825 # arguments mandatory, and then we can depend on a new Autoconf
826 # release and drop the old call support.
827 AC_DEFUN([AM_INIT_AUTOMAKE],
828 [AC_PREREQ([2.62])dnl
829 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
830 dnl the ones we care about.
831 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
832 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
833 AC_REQUIRE([AC_PROG_INSTALL])dnl
834 if test "`cd $srcdir && pwd`" != "`pwd`"; then
835   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
836   # is not polluted with repeated "-I."
837   AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
838   # test to see if srcdir already configured
839   if test -f $srcdir/config.status; then
840     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
841   fi
842 fi
843
844 # test whether we have cygpath
845 if test -z "$CYGPATH_W"; then
846   if (cygpath --version) >/dev/null 2>/dev/null; then
847     CYGPATH_W='cygpath -w'
848   else
849     CYGPATH_W=echo
850   fi
851 fi
852 AC_SUBST([CYGPATH_W])
853
854 # Define the identity of the package.
855 dnl Distinguish between old-style and new-style calls.
856 m4_ifval([$2],
857 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
858  AC_SUBST([PACKAGE], [$1])dnl
859  AC_SUBST([VERSION], [$2])],
860 [_AM_SET_OPTIONS([$1])dnl
861 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
862 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
863   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
864  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
865  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
866
867 _AM_IF_OPTION([no-define],,
868 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
869  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
870
871 # Some tools Automake needs.
872 AC_REQUIRE([AM_SANITY_CHECK])dnl
873 AC_REQUIRE([AC_ARG_PROGRAM])dnl
874 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
875 AM_MISSING_PROG(AUTOCONF, autoconf)
876 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
877 AM_MISSING_PROG(AUTOHEADER, autoheader)
878 AM_MISSING_PROG(MAKEINFO, makeinfo)
879 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
880 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
881 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
882 # We need awk for the "check" target.  The system "awk" is bad on
883 # some platforms.
884 AC_REQUIRE([AC_PROG_AWK])dnl
885 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
886 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
887 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
888               [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
889                              [_AM_PROG_TAR([v7])])])
890 _AM_IF_OPTION([no-dependencies],,
891 [AC_PROVIDE_IFELSE([AC_PROG_CC],
892                   [_AM_DEPENDENCIES(CC)],
893                   [define([AC_PROG_CC],
894                           defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
895 AC_PROVIDE_IFELSE([AC_PROG_CXX],
896                   [_AM_DEPENDENCIES(CXX)],
897                   [define([AC_PROG_CXX],
898                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
899 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
900                   [_AM_DEPENDENCIES(OBJC)],
901                   [define([AC_PROG_OBJC],
902                           defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
903 ])
904 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
905 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
906 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
907 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
908 AC_CONFIG_COMMANDS_PRE(dnl
909 [m4_provide_if([_AM_COMPILER_EXEEXT],
910   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
911 ])
912
913 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
914 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
915 dnl mangled by Autoconf and run in a shell conditional statement.
916 m4_define([_AC_COMPILER_EXEEXT],
917 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
918
919
920 # When config.status generates a header, we must update the stamp-h file.
921 # This file resides in the same directory as the config header
922 # that is generated.  The stamp files are numbered to have different names.
923
924 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
925 # loop where config.status creates the headers, so we can generate
926 # our stamp files there.
927 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
928 [# Compute $1's index in $config_headers.
929 _am_arg=$1
930 _am_stamp_count=1
931 for _am_header in $config_headers :; do
932   case $_am_header in
933     $_am_arg | $_am_arg:* )
934       break ;;
935     * )
936       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
937   esac
938 done
939 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
940
941 # Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
942 #
943 # This file is free software; the Free Software Foundation
944 # gives unlimited permission to copy and/or distribute it,
945 # with or without modifications, as long as this notice is preserved.
946
947 # AM_PROG_INSTALL_SH
948 # ------------------
949 # Define $install_sh.
950 AC_DEFUN([AM_PROG_INSTALL_SH],
951 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
952 if test x"${install_sh}" != xset; then
953   case $am_aux_dir in
954   *\ * | *\     *)
955     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
956   *)
957     install_sh="\${SHELL} $am_aux_dir/install-sh"
958   esac
959 fi
960 AC_SUBST(install_sh)])
961
962 # Copyright (C) 2003, 2005  Free Software Foundation, Inc.
963 #
964 # This file is free software; the Free Software Foundation
965 # gives unlimited permission to copy and/or distribute it,
966 # with or without modifications, as long as this notice is preserved.
967
968 # serial 2
969
970 # Check whether the underlying file-system supports filenames
971 # with a leading dot.  For instance MS-DOS doesn't.
972 AC_DEFUN([AM_SET_LEADING_DOT],
973 [rm -rf .tst 2>/dev/null
974 mkdir .tst 2>/dev/null
975 if test -d .tst; then
976   am__leading_dot=.
977 else
978   am__leading_dot=_
979 fi
980 rmdir .tst 2>/dev/null
981 AC_SUBST([am__leading_dot])])
982
983 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
984 # From Jim Meyering
985
986 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
987 # Free Software Foundation, Inc.
988 #
989 # This file is free software; the Free Software Foundation
990 # gives unlimited permission to copy and/or distribute it,
991 # with or without modifications, as long as this notice is preserved.
992
993 # serial 5
994
995 # AM_MAINTAINER_MODE([DEFAULT-MODE])
996 # ----------------------------------
997 # Control maintainer-specific portions of Makefiles.
998 # Default is to disable them, unless `enable' is passed literally.
999 # For symmetry, `disable' may be passed as well.  Anyway, the user
1000 # can override the default with the --enable/--disable switch.
1001 AC_DEFUN([AM_MAINTAINER_MODE],
1002 [m4_case(m4_default([$1], [disable]),
1003        [enable], [m4_define([am_maintainer_other], [disable])],
1004        [disable], [m4_define([am_maintainer_other], [enable])],
1005        [m4_define([am_maintainer_other], [enable])
1006         m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
1007 AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
1008   dnl maintainer-mode's default is 'disable' unless 'enable' is passed
1009   AC_ARG_ENABLE([maintainer-mode],
1010 [  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
1011                           (and sometimes confusing) to the casual installer],
1012       [USE_MAINTAINER_MODE=$enableval],
1013       [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
1014   AC_MSG_RESULT([$USE_MAINTAINER_MODE])
1015   AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
1016   MAINT=$MAINTAINER_MODE_TRUE
1017   AC_SUBST([MAINT])dnl
1018 ]
1019 )
1020
1021 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
1022
1023 # Check to see how 'make' treats includes.                  -*- Autoconf -*-
1024
1025 # Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
1026 #
1027 # This file is free software; the Free Software Foundation
1028 # gives unlimited permission to copy and/or distribute it,
1029 # with or without modifications, as long as this notice is preserved.
1030
1031 # serial 4
1032
1033 # AM_MAKE_INCLUDE()
1034 # -----------------
1035 # Check to see how make treats includes.
1036 AC_DEFUN([AM_MAKE_INCLUDE],
1037 [am_make=${MAKE-make}
1038 cat > confinc << 'END'
1039 am__doit:
1040         @echo this is the am__doit target
1041 .PHONY: am__doit
1042 END
1043 # If we don't find an include directive, just comment out the code.
1044 AC_MSG_CHECKING([for style of include used by $am_make])
1045 am__include="#"
1046 am__quote=
1047 _am_result=none
1048 # First try GNU make style include.
1049 echo "include confinc" > confmf
1050 # Ignore all kinds of additional output from `make'.
1051 case `$am_make -s -f confmf 2> /dev/null` in #(
1052 *the\ am__doit\ target*)
1053   am__include=include
1054   am__quote=
1055   _am_result=GNU
1056   ;;
1057 esac
1058 # Now try BSD make style include.
1059 if test "$am__include" = "#"; then
1060    echo '.include "confinc"' > confmf
1061    case `$am_make -s -f confmf 2> /dev/null` in #(
1062    *the\ am__doit\ target*)
1063      am__include=.include
1064      am__quote="\""
1065      _am_result=BSD
1066      ;;
1067    esac
1068 fi
1069 AC_SUBST([am__include])
1070 AC_SUBST([am__quote])
1071 AC_MSG_RESULT([$_am_result])
1072 rm -f confinc confmf
1073 ])
1074
1075 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
1076
1077 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
1078 # Free Software Foundation, Inc.
1079 #
1080 # This file is free software; the Free Software Foundation
1081 # gives unlimited permission to copy and/or distribute it,
1082 # with or without modifications, as long as this notice is preserved.
1083
1084 # serial 6
1085
1086 # AM_MISSING_PROG(NAME, PROGRAM)
1087 # ------------------------------
1088 AC_DEFUN([AM_MISSING_PROG],
1089 [AC_REQUIRE([AM_MISSING_HAS_RUN])
1090 $1=${$1-"${am_missing_run}$2"}
1091 AC_SUBST($1)])
1092
1093
1094 # AM_MISSING_HAS_RUN
1095 # ------------------
1096 # Define MISSING if not defined so far and test if it supports --run.
1097 # If it does, set am_missing_run to use it, otherwise, to nothing.
1098 AC_DEFUN([AM_MISSING_HAS_RUN],
1099 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1100 AC_REQUIRE_AUX_FILE([missing])dnl
1101 if test x"${MISSING+set}" != xset; then
1102   case $am_aux_dir in
1103   *\ * | *\     *)
1104     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1105   *)
1106     MISSING="\${SHELL} $am_aux_dir/missing" ;;
1107   esac
1108 fi
1109 # Use eval to expand $SHELL
1110 if eval "$MISSING --run true"; then
1111   am_missing_run="$MISSING --run "
1112 else
1113   am_missing_run=
1114   AC_MSG_WARN([`missing' script is too old or missing])
1115 fi
1116 ])
1117
1118 # Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
1119 #
1120 # This file is free software; the Free Software Foundation
1121 # gives unlimited permission to copy and/or distribute it,
1122 # with or without modifications, as long as this notice is preserved.
1123
1124 # AM_PROG_MKDIR_P
1125 # ---------------
1126 # Check for `mkdir -p'.
1127 AC_DEFUN([AM_PROG_MKDIR_P],
1128 [AC_PREREQ([2.60])dnl
1129 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1130 dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
1131 dnl while keeping a definition of mkdir_p for backward compatibility.
1132 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
1133 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
1134 dnl Makefile.ins that do not define MKDIR_P, so we do our own
1135 dnl adjustment using top_builddir (which is defined more often than
1136 dnl MKDIR_P).
1137 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
1138 case $mkdir_p in
1139   [[\\/$]]* | ?:[[\\/]]*) ;;
1140   */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
1141 esac
1142 ])
1143
1144 # Helper functions for option handling.                     -*- Autoconf -*-
1145
1146 # Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
1147 #
1148 # This file is free software; the Free Software Foundation
1149 # gives unlimited permission to copy and/or distribute it,
1150 # with or without modifications, as long as this notice is preserved.
1151
1152 # serial 4
1153
1154 # _AM_MANGLE_OPTION(NAME)
1155 # -----------------------
1156 AC_DEFUN([_AM_MANGLE_OPTION],
1157 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1158
1159 # _AM_SET_OPTION(NAME)
1160 # ------------------------------
1161 # Set option NAME.  Presently that only means defining a flag for this option.
1162 AC_DEFUN([_AM_SET_OPTION],
1163 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
1164
1165 # _AM_SET_OPTIONS(OPTIONS)
1166 # ----------------------------------
1167 # OPTIONS is a space-separated list of Automake options.
1168 AC_DEFUN([_AM_SET_OPTIONS],
1169 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1170
1171 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1172 # -------------------------------------------
1173 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1174 AC_DEFUN([_AM_IF_OPTION],
1175 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1176
1177 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
1178
1179 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
1180 # Free Software Foundation, Inc.
1181 #
1182 # This file is free software; the Free Software Foundation
1183 # gives unlimited permission to copy and/or distribute it,
1184 # with or without modifications, as long as this notice is preserved.
1185
1186 # serial 5
1187
1188 # AM_SANITY_CHECK
1189 # ---------------
1190 AC_DEFUN([AM_SANITY_CHECK],
1191 [AC_MSG_CHECKING([whether build environment is sane])
1192 # Just in case
1193 sleep 1
1194 echo timestamp > conftest.file
1195 # Reject unsafe characters in $srcdir or the absolute working directory
1196 # name.  Accept space and tab only in the latter.
1197 am_lf='
1198 '
1199 case `pwd` in
1200   *[[\\\"\#\$\&\'\`$am_lf]]*)
1201     AC_MSG_ERROR([unsafe absolute working directory name]);;
1202 esac
1203 case $srcdir in
1204   *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
1205     AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
1206 esac
1207
1208 # Do `set' in a subshell so we don't clobber the current shell's
1209 # arguments.  Must try -L first in case configure is actually a
1210 # symlink; some systems play weird games with the mod time of symlinks
1211 # (eg FreeBSD returns the mod time of the symlink's containing
1212 # directory).
1213 if (
1214    set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1215    if test "$[*]" = "X"; then
1216       # -L didn't work.
1217       set X `ls -t "$srcdir/configure" conftest.file`
1218    fi
1219    rm -f conftest.file
1220    if test "$[*]" != "X $srcdir/configure conftest.file" \
1221       && test "$[*]" != "X conftest.file $srcdir/configure"; then
1222
1223       # If neither matched, then we have a broken ls.  This can happen
1224       # if, for instance, CONFIG_SHELL is bash and it inherits a
1225       # broken ls alias from the environment.  This has actually
1226       # happened.  Such a system could not be considered "sane".
1227       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
1228 alias in your environment])
1229    fi
1230
1231    test "$[2]" = conftest.file
1232    )
1233 then
1234    # Ok.
1235    :
1236 else
1237    AC_MSG_ERROR([newly created file is older than distributed files!
1238 Check your system clock])
1239 fi
1240 AC_MSG_RESULT(yes)])
1241
1242 # Copyright (C) 2009  Free Software Foundation, Inc.
1243 #
1244 # This file is free software; the Free Software Foundation
1245 # gives unlimited permission to copy and/or distribute it,
1246 # with or without modifications, as long as this notice is preserved.
1247
1248 # serial 1
1249
1250 # AM_SILENT_RULES([DEFAULT])
1251 # --------------------------
1252 # Enable less verbose build rules; with the default set to DEFAULT
1253 # (`yes' being less verbose, `no' or empty being verbose).
1254 AC_DEFUN([AM_SILENT_RULES],
1255 [AC_ARG_ENABLE([silent-rules],
1256 [  --enable-silent-rules          less verbose build output (undo: `make V=1')
1257   --disable-silent-rules         verbose build output (undo: `make V=0')])
1258 case $enable_silent_rules in
1259 yes) AM_DEFAULT_VERBOSITY=0;;
1260 no)  AM_DEFAULT_VERBOSITY=1;;
1261 *)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
1262 esac
1263 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1264 AM_BACKSLASH='\'
1265 AC_SUBST([AM_BACKSLASH])dnl
1266 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1267 ])
1268
1269 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
1270 #
1271 # This file is free software; the Free Software Foundation
1272 # gives unlimited permission to copy and/or distribute it,
1273 # with or without modifications, as long as this notice is preserved.
1274
1275 # AM_PROG_INSTALL_STRIP
1276 # ---------------------
1277 # One issue with vendor `install' (even GNU) is that you can't
1278 # specify the program used to strip binaries.  This is especially
1279 # annoying in cross-compiling environments, where the build's strip
1280 # is unlikely to handle the host's binaries.
1281 # Fortunately install-sh will honor a STRIPPROG variable, so we
1282 # always use install-sh in `make install-strip', and initialize
1283 # STRIPPROG with the value of the STRIP variable (set by the user).
1284 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1285 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1286 # Installed binaries are usually stripped using `strip' when the user
1287 # run `make install-strip'.  However `strip' might not be the right
1288 # tool to use in cross-compilation environments, therefore Automake
1289 # will honor the `STRIP' environment variable to overrule this program.
1290 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1291 if test "$cross_compiling" != no; then
1292   AC_CHECK_TOOL([STRIP], [strip], :)
1293 fi
1294 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1295 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1296
1297 # Copyright (C) 2006, 2008  Free Software Foundation, Inc.
1298 #
1299 # This file is free software; the Free Software Foundation
1300 # gives unlimited permission to copy and/or distribute it,
1301 # with or without modifications, as long as this notice is preserved.
1302
1303 # serial 2
1304
1305 # _AM_SUBST_NOTMAKE(VARIABLE)
1306 # ---------------------------
1307 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1308 # This macro is traced by Automake.
1309 AC_DEFUN([_AM_SUBST_NOTMAKE])
1310
1311 # AM_SUBST_NOTMAKE(VARIABLE)
1312 # ---------------------------
1313 # Public sister of _AM_SUBST_NOTMAKE.
1314 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1315
1316 # Check how to create a tarball.                            -*- Autoconf -*-
1317
1318 # Copyright (C) 2004, 2005  Free Software Foundation, Inc.
1319 #
1320 # This file is free software; the Free Software Foundation
1321 # gives unlimited permission to copy and/or distribute it,
1322 # with or without modifications, as long as this notice is preserved.
1323
1324 # serial 2
1325
1326 # _AM_PROG_TAR(FORMAT)
1327 # --------------------
1328 # Check how to create a tarball in format FORMAT.
1329 # FORMAT should be one of `v7', `ustar', or `pax'.
1330 #
1331 # Substitute a variable $(am__tar) that is a command
1332 # writing to stdout a FORMAT-tarball containing the directory
1333 # $tardir.
1334 #     tardir=directory && $(am__tar) > result.tar
1335 #
1336 # Substitute a variable $(am__untar) that extract such
1337 # a tarball read from stdin.
1338 #     $(am__untar) < result.tar
1339 AC_DEFUN([_AM_PROG_TAR],
1340 [# Always define AMTAR for backward compatibility.
1341 AM_MISSING_PROG([AMTAR], [tar])
1342 m4_if([$1], [v7],
1343      [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
1344      [m4_case([$1], [ustar],, [pax],,
1345               [m4_fatal([Unknown tar format])])
1346 AC_MSG_CHECKING([how to create a $1 tar archive])
1347 # Loop over all known methods to create a tar archive until one works.
1348 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1349 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1350 # Do not fold the above two line into one, because Tru64 sh and
1351 # Solaris sh will not grok spaces in the rhs of `-'.
1352 for _am_tool in $_am_tools
1353 do
1354   case $_am_tool in
1355   gnutar)
1356     for _am_tar in tar gnutar gtar;
1357     do
1358       AM_RUN_LOG([$_am_tar --version]) && break
1359     done
1360     am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1361     am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1362     am__untar="$_am_tar -xf -"
1363     ;;
1364   plaintar)
1365     # Must skip GNU tar: if it does not support --format= it doesn't create
1366     # ustar tarball either.
1367     (tar --version) >/dev/null 2>&1 && continue
1368     am__tar='tar chf - "$$tardir"'
1369     am__tar_='tar chf - "$tardir"'
1370     am__untar='tar xf -'
1371     ;;
1372   pax)
1373     am__tar='pax -L -x $1 -w "$$tardir"'
1374     am__tar_='pax -L -x $1 -w "$tardir"'
1375     am__untar='pax -r'
1376     ;;
1377   cpio)
1378     am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1379     am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1380     am__untar='cpio -i -H $1 -d'
1381     ;;
1382   none)
1383     am__tar=false
1384     am__tar_=false
1385     am__untar=false
1386     ;;
1387   esac
1388
1389   # If the value was cached, stop now.  We just wanted to have am__tar
1390   # and am__untar set.
1391   test -n "${am_cv_prog_tar_$1}" && break
1392
1393   # tar/untar a dummy directory, and stop if the command works
1394   rm -rf conftest.dir
1395   mkdir conftest.dir
1396   echo GrepMe > conftest.dir/file
1397   AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1398   rm -rf conftest.dir
1399   if test -s conftest.tar; then
1400     AM_RUN_LOG([$am__untar <conftest.tar])
1401     grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1402   fi
1403 done
1404 rm -rf conftest.dir
1405
1406 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1407 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1408 AC_SUBST([am__tar])
1409 AC_SUBST([am__untar])
1410 ]) # _AM_PROG_TAR
1411