packaging: exclude on non X11 configuration
[platform/core/uifw/at-spi2-core.git] / aclocal.m4
1 # generated automatically by aclocal 1.12.1 -*- Autoconf -*-
2
3 # Copyright (C) 1996-2012 Free Software Foundation, Inc.
4
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.69],,
17 [m4_warning([this file was generated for autoconf 2.69.
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 # Copyright (C) 2002-2012 Free Software Foundation, Inc.
23 #
24 # This file is free software; the Free Software Foundation
25 # gives unlimited permission to copy and/or distribute it,
26 # with or without modifications, as long as this notice is preserved.
27
28 # serial 8
29
30 # AM_AUTOMAKE_VERSION(VERSION)
31 # ----------------------------
32 # Automake X.Y traces this macro to ensure aclocal.m4 has been
33 # generated from the m4 files accompanying Automake X.Y.
34 # (This private macro should not be called outside this file.)
35 AC_DEFUN([AM_AUTOMAKE_VERSION],
36 [am__api_version='1.12'
37 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
38 dnl require some minimum version.  Point them to the right macro.
39 m4_if([$1], [1.12.1], [],
40       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
41 ])
42
43 # _AM_AUTOCONF_VERSION(VERSION)
44 # -----------------------------
45 # aclocal traces this macro to find the Autoconf version.
46 # This is a private macro too.  Using m4_define simplifies
47 # the logic in aclocal, which can simply ignore this definition.
48 m4_define([_AM_AUTOCONF_VERSION], [])
49
50 # AM_SET_CURRENT_AUTOMAKE_VERSION
51 # -------------------------------
52 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
53 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
54 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
55 [AM_AUTOMAKE_VERSION([1.12.1])dnl
56 m4_ifndef([AC_AUTOCONF_VERSION],
57   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
58 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
59
60 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
61
62 # Copyright (C) 2001-2012 Free Software Foundation, Inc.
63 #
64 # This file is free software; the Free Software Foundation
65 # gives unlimited permission to copy and/or distribute it,
66 # with or without modifications, as long as this notice is preserved.
67
68 # serial 2
69
70 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
71 # $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
72 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
73 #
74 # Of course, Automake must honor this variable whenever it calls a
75 # tool from the auxiliary directory.  The problem is that $srcdir (and
76 # therefore $ac_aux_dir as well) can be either absolute or relative,
77 # depending on how configure is run.  This is pretty annoying, since
78 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
79 # source directory, any form will work fine, but in subdirectories a
80 # relative path needs to be adjusted first.
81 #
82 # $ac_aux_dir/missing
83 #    fails when called from a subdirectory if $ac_aux_dir is relative
84 # $top_srcdir/$ac_aux_dir/missing
85 #    fails if $ac_aux_dir is absolute,
86 #    fails when called from a subdirectory in a VPATH build with
87 #          a relative $ac_aux_dir
88 #
89 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
90 # are both prefixed by $srcdir.  In an in-source build this is usually
91 # harmless because $srcdir is '.', but things will broke when you
92 # start a VPATH build or use an absolute $srcdir.
93 #
94 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
95 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
96 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
97 # and then we would define $MISSING as
98 #   MISSING="\${SHELL} $am_aux_dir/missing"
99 # This will work as long as MISSING is not called from configure, because
100 # unfortunately $(top_srcdir) has no meaning in configure.
101 # However there are other variables, like CC, which are often used in
102 # configure, and could therefore not use this "fixed" $ac_aux_dir.
103 #
104 # Another solution, used here, is to always expand $ac_aux_dir to an
105 # absolute PATH.  The drawback is that using absolute paths prevent a
106 # configured tree to be moved without reconfiguration.
107
108 AC_DEFUN([AM_AUX_DIR_EXPAND],
109 [dnl Rely on autoconf to set up CDPATH properly.
110 AC_PREREQ([2.50])dnl
111 # expand $ac_aux_dir to an absolute path
112 am_aux_dir=`cd $ac_aux_dir && pwd`
113 ])
114
115 # AM_CONDITIONAL                                            -*- Autoconf -*-
116
117 # Copyright (C) 1997-2012 Free Software Foundation, Inc.
118 #
119 # This file is free software; the Free Software Foundation
120 # gives unlimited permission to copy and/or distribute it,
121 # with or without modifications, as long as this notice is preserved.
122
123 # serial 10
124
125 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
126 # -------------------------------------
127 # Define a conditional.
128 AC_DEFUN([AM_CONDITIONAL],
129 [AC_PREREQ([2.52])dnl
130  m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
131        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
132 AC_SUBST([$1_TRUE])dnl
133 AC_SUBST([$1_FALSE])dnl
134 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
135 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
136 m4_define([_AM_COND_VALUE_$1], [$2])dnl
137 if $2; then
138   $1_TRUE=
139   $1_FALSE='#'
140 else
141   $1_TRUE='#'
142   $1_FALSE=
143 fi
144 AC_CONFIG_COMMANDS_PRE(
145 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
146   AC_MSG_ERROR([[conditional "$1" was never defined.
147 Usually this means the macro was only invoked conditionally.]])
148 fi])])
149
150 # Copyright (C) 1999-2012 Free Software Foundation, Inc.
151 #
152 # This file is free software; the Free Software Foundation
153 # gives unlimited permission to copy and/or distribute it,
154 # with or without modifications, as long as this notice is preserved.
155
156 # serial 17
157
158 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
159 # written in clear, in which case automake, when reading aclocal.m4,
160 # will think it sees a *use*, and therefore will trigger all it's
161 # C support machinery.  Also note that it means that autoscan, seeing
162 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
163
164
165 # _AM_DEPENDENCIES(NAME)
166 # ----------------------
167 # See how the compiler implements dependency checking.
168 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
169 # We try a few techniques and use that to set a single cache variable.
170 #
171 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
172 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
173 # dependency, and given that the user is not expected to run this macro,
174 # just rely on AC_PROG_CC.
175 AC_DEFUN([_AM_DEPENDENCIES],
176 [AC_REQUIRE([AM_SET_DEPDIR])dnl
177 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
178 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
179 AC_REQUIRE([AM_DEP_TRACK])dnl
180
181 m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
182       [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
183       [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
184       [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
185       [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
186       [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
187                     [depcc="$$1"   am_compiler_list=])
188
189 AC_CACHE_CHECK([dependency style of $depcc],
190                [am_cv_$1_dependencies_compiler_type],
191 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
192   # We make a subdir and do the tests there.  Otherwise we can end up
193   # making bogus files that we don't know about and never remove.  For
194   # instance it was reported that on HP-UX the gcc test will end up
195   # making a dummy file named 'D' -- because '-MD' means "put the output
196   # in D".
197   rm -rf conftest.dir
198   mkdir conftest.dir
199   # Copy depcomp to subdir because otherwise we won't find it if we're
200   # using a relative directory.
201   cp "$am_depcomp" conftest.dir
202   cd conftest.dir
203   # We will build objects and dependencies in a subdirectory because
204   # it helps to detect inapplicable dependency modes.  For instance
205   # both Tru64's cc and ICC support -MD to output dependencies as a
206   # side effect of compilation, but ICC will put the dependencies in
207   # the current directory while Tru64 will put them in the object
208   # directory.
209   mkdir sub
210
211   am_cv_$1_dependencies_compiler_type=none
212   if test "$am_compiler_list" = ""; then
213      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
214   fi
215   am__universal=false
216   m4_case([$1], [CC],
217     [case " $depcc " in #(
218      *\ -arch\ *\ -arch\ *) am__universal=true ;;
219      esac],
220     [CXX],
221     [case " $depcc " in #(
222      *\ -arch\ *\ -arch\ *) am__universal=true ;;
223      esac])
224
225   for depmode in $am_compiler_list; do
226     # Setup a source with many dependencies, because some compilers
227     # like to wrap large dependency lists on column 80 (with \), and
228     # we should not choose a depcomp mode which is confused by this.
229     #
230     # We need to recreate these files for each test, as the compiler may
231     # overwrite some of them when testing with obscure command lines.
232     # This happens at least with the AIX C compiler.
233     : > sub/conftest.c
234     for i in 1 2 3 4 5 6; do
235       echo '#include "conftst'$i'.h"' >> sub/conftest.c
236       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
237       # Solaris 10 /bin/sh.
238       echo '/* dummy */' > sub/conftst$i.h
239     done
240     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
241
242     # We check with '-c' and '-o' for the sake of the "dashmstdout"
243     # mode.  It turns out that the SunPro C++ compiler does not properly
244     # handle '-M -o', and we need to detect this.  Also, some Intel
245     # versions had trouble with output in subdirs.
246     am__obj=sub/conftest.${OBJEXT-o}
247     am__minus_obj="-o $am__obj"
248     case $depmode in
249     gcc)
250       # This depmode causes a compiler race in universal mode.
251       test "$am__universal" = false || continue
252       ;;
253     nosideeffect)
254       # After this tag, mechanisms are not by side-effect, so they'll
255       # only be used when explicitly requested.
256       if test "x$enable_dependency_tracking" = xyes; then
257         continue
258       else
259         break
260       fi
261       ;;
262     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
263       # This compiler won't grok '-c -o', but also, the minuso test has
264       # not run yet.  These depmodes are late enough in the game, and
265       # so weak that their functioning should not be impacted.
266       am__obj=conftest.${OBJEXT-o}
267       am__minus_obj=
268       ;;
269     none) break ;;
270     esac
271     if depmode=$depmode \
272        source=sub/conftest.c object=$am__obj \
273        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
274        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
275          >/dev/null 2>conftest.err &&
276        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
277        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
278        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
279        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
280       # icc doesn't choke on unknown options, it will just issue warnings
281       # or remarks (even with -Werror).  So we grep stderr for any message
282       # that says an option was ignored or not supported.
283       # When given -MP, icc 7.0 and 7.1 complain thusly:
284       #   icc: Command line warning: ignoring option '-M'; no argument required
285       # The diagnosis changed in icc 8.0:
286       #   icc: Command line remark: option '-MP' not supported
287       if (grep 'ignoring option' conftest.err ||
288           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
289         am_cv_$1_dependencies_compiler_type=$depmode
290         break
291       fi
292     fi
293   done
294
295   cd ..
296   rm -rf conftest.dir
297 else
298   am_cv_$1_dependencies_compiler_type=none
299 fi
300 ])
301 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
302 AM_CONDITIONAL([am__fastdep$1], [
303   test "x$enable_dependency_tracking" != xno \
304   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
305 ])
306
307
308 # AM_SET_DEPDIR
309 # -------------
310 # Choose a directory name for dependency files.
311 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
312 AC_DEFUN([AM_SET_DEPDIR],
313 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
314 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
315 ])
316
317
318 # AM_DEP_TRACK
319 # ------------
320 AC_DEFUN([AM_DEP_TRACK],
321 [AC_ARG_ENABLE([dependency-tracking], [dnl
322 AS_HELP_STRING(
323   [--enable-dependency-tracking],
324   [do not reject slow dependency extractors])
325 AS_HELP_STRING(
326   [--disable-dependency-tracking],
327   [speeds up one-time build])])
328 if test "x$enable_dependency_tracking" != xno; then
329   am_depcomp="$ac_aux_dir/depcomp"
330   AMDEPBACKSLASH='\'
331   am__nodep='_no'
332 fi
333 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
334 AC_SUBST([AMDEPBACKSLASH])dnl
335 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
336 AC_SUBST([am__nodep])dnl
337 _AM_SUBST_NOTMAKE([am__nodep])dnl
338 ])
339
340 # Generate code to set up dependency tracking.              -*- Autoconf -*-
341
342 # Copyright (C) 1999-2012 Free Software Foundation, Inc.
343 #
344 # This file is free software; the Free Software Foundation
345 # gives unlimited permission to copy and/or distribute it,
346 # with or without modifications, as long as this notice is preserved.
347
348 # serial 6
349
350 # _AM_OUTPUT_DEPENDENCY_COMMANDS
351 # ------------------------------
352 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
353 [{
354   # Autoconf 2.62 quotes --file arguments for eval, but not when files
355   # are listed without --file.  Let's play safe and only enable the eval
356   # if we detect the quoting.
357   case $CONFIG_FILES in
358   *\'*) eval set x "$CONFIG_FILES" ;;
359   *)   set x $CONFIG_FILES ;;
360   esac
361   shift
362   for mf
363   do
364     # Strip MF so we end up with the name of the file.
365     mf=`echo "$mf" | sed -e 's/:.*$//'`
366     # Check whether this is an Automake generated Makefile or not.
367     # We used to match only the files named 'Makefile.in', but
368     # some people rename them; so instead we look at the file content.
369     # Grep'ing the first line is not enough: some people post-process
370     # each Makefile.in and add a new line on top of each file to say so.
371     # Grep'ing the whole file is not good either: AIX grep has a line
372     # limit of 2048, but all sed's we know have understand at least 4000.
373     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
374       dirpart=`AS_DIRNAME("$mf")`
375     else
376       continue
377     fi
378     # Extract the definition of DEPDIR, am__include, and am__quote
379     # from the Makefile without running 'make'.
380     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
381     test -z "$DEPDIR" && continue
382     am__include=`sed -n 's/^am__include = //p' < "$mf"`
383     test -z "am__include" && continue
384     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
385     # Find all dependency output files, they are included files with
386     # $(DEPDIR) in their names.  We invoke sed twice because it is the
387     # simplest approach to changing $(DEPDIR) to its actual value in the
388     # expansion.
389     for file in `sed -n "
390       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
391          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
392       # Make sure the directory exists.
393       test -f "$dirpart/$file" && continue
394       fdir=`AS_DIRNAME(["$file"])`
395       AS_MKDIR_P([$dirpart/$fdir])
396       # echo "creating $dirpart/$file"
397       echo '# dummy' > "$dirpart/$file"
398     done
399   done
400 }
401 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
402
403
404 # AM_OUTPUT_DEPENDENCY_COMMANDS
405 # -----------------------------
406 # This macro should only be invoked once -- use via AC_REQUIRE.
407 #
408 # This code is only required when automatic dependency tracking
409 # is enabled.  FIXME.  This creates each '.P' file that we will
410 # need in order to bootstrap the dependency handling code.
411 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
412 [AC_CONFIG_COMMANDS([depfiles],
413      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
414      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
415 ])
416
417 # Do all the work for Automake.                             -*- Autoconf -*-
418
419 # Copyright (C) 1996-2012 Free Software Foundation, Inc.
420 #
421 # This file is free software; the Free Software Foundation
422 # gives unlimited permission to copy and/or distribute it,
423 # with or without modifications, as long as this notice is preserved.
424
425 # serial 19
426
427 # This macro actually does too much.  Some checks are only needed if
428 # your package does certain things.  But this isn't really a big deal.
429
430 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
431 # AM_INIT_AUTOMAKE([OPTIONS])
432 # -----------------------------------------------
433 # The call with PACKAGE and VERSION arguments is the old style
434 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
435 # and VERSION should now be passed to AC_INIT and removed from
436 # the call to AM_INIT_AUTOMAKE.
437 # We support both call styles for the transition.  After
438 # the next Automake release, Autoconf can make the AC_INIT
439 # arguments mandatory, and then we can depend on a new Autoconf
440 # release and drop the old call support.
441 AC_DEFUN([AM_INIT_AUTOMAKE],
442 [AC_PREREQ([2.62])dnl
443 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
444 dnl the ones we care about.
445 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
446 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
447 AC_REQUIRE([AC_PROG_INSTALL])dnl
448 if test "`cd $srcdir && pwd`" != "`pwd`"; then
449   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
450   # is not polluted with repeated "-I."
451   AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
452   # test to see if srcdir already configured
453   if test -f $srcdir/config.status; then
454     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
455   fi
456 fi
457
458 # test whether we have cygpath
459 if test -z "$CYGPATH_W"; then
460   if (cygpath --version) >/dev/null 2>/dev/null; then
461     CYGPATH_W='cygpath -w'
462   else
463     CYGPATH_W=echo
464   fi
465 fi
466 AC_SUBST([CYGPATH_W])
467
468 # Define the identity of the package.
469 dnl Distinguish between old-style and new-style calls.
470 m4_ifval([$2],
471 [AC_DIAGNOSE([obsolete],
472 [$0: two- and three-arguments forms are deprecated.  For more info, see:
473 http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation])
474 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
475  AC_SUBST([PACKAGE], [$1])dnl
476  AC_SUBST([VERSION], [$2])],
477 [_AM_SET_OPTIONS([$1])dnl
478 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
479 m4_if(
480   m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
481   [ok:ok],,
482   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
483  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
484  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
485
486 _AM_IF_OPTION([no-define],,
487 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
488  AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
489
490 # Some tools Automake needs.
491 AC_REQUIRE([AM_SANITY_CHECK])dnl
492 AC_REQUIRE([AC_ARG_PROGRAM])dnl
493 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
494 AM_MISSING_PROG([AUTOCONF], [autoconf])
495 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
496 AM_MISSING_PROG([AUTOHEADER], [autoheader])
497 AM_MISSING_PROG([MAKEINFO], [makeinfo])
498 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
499 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
500 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
501 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
502 # We need awk for the "check" target.  The system "awk" is bad on
503 # some platforms.
504 AC_REQUIRE([AC_PROG_AWK])dnl
505 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
506 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
507 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
508               [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
509                              [_AM_PROG_TAR([v7])])])
510 _AM_IF_OPTION([no-dependencies],,
511 [AC_PROVIDE_IFELSE([AC_PROG_CC],
512                   [_AM_DEPENDENCIES([CC])],
513                   [m4_define([AC_PROG_CC],
514                              m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
515 AC_PROVIDE_IFELSE([AC_PROG_CXX],
516                   [_AM_DEPENDENCIES([CXX])],
517                   [m4_define([AC_PROG_CXX],
518                              m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
519 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
520                   [_AM_DEPENDENCIES([OBJC])],
521                   [m4_define([AC_PROG_OBJC],
522                              m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
523 dnl Support for Objective C++ was only introduced in Autoconf 2.65,
524 dnl but we still cater to Autoconf 2.62.
525 m4_ifdef([AC_PROG_OBJCXX],
526 [AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
527                   [_AM_DEPENDENCIES([OBJCXX])],
528                   [m4_define([AC_PROG_OBJCXX],
529                              m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl
530 ])
531 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
532 dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the
533 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
534 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
535 AC_CONFIG_COMMANDS_PRE(dnl
536 [m4_provide_if([_AM_COMPILER_EXEEXT],
537   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
538 ])
539
540 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
541 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
542 dnl mangled by Autoconf and run in a shell conditional statement.
543 m4_define([_AC_COMPILER_EXEEXT],
544 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
545
546
547 # When config.status generates a header, we must update the stamp-h file.
548 # This file resides in the same directory as the config header
549 # that is generated.  The stamp files are numbered to have different names.
550
551 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
552 # loop where config.status creates the headers, so we can generate
553 # our stamp files there.
554 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
555 [# Compute $1's index in $config_headers.
556 _am_arg=$1
557 _am_stamp_count=1
558 for _am_header in $config_headers :; do
559   case $_am_header in
560     $_am_arg | $_am_arg:* )
561       break ;;
562     * )
563       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
564   esac
565 done
566 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
567
568 # Copyright (C) 2001-2012 Free Software Foundation, Inc.
569 #
570 # This file is free software; the Free Software Foundation
571 # gives unlimited permission to copy and/or distribute it,
572 # with or without modifications, as long as this notice is preserved.
573
574 # serial 8
575
576 # AM_PROG_INSTALL_SH
577 # ------------------
578 # Define $install_sh.
579 AC_DEFUN([AM_PROG_INSTALL_SH],
580 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
581 if test x"${install_sh}" != xset; then
582   case $am_aux_dir in
583   *\ * | *\     *)
584     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
585   *)
586     install_sh="\${SHELL} $am_aux_dir/install-sh"
587   esac
588 fi
589 AC_SUBST([install_sh])])
590
591 # Copyright (C) 2003-2012 Free Software Foundation, Inc.
592 #
593 # This file is free software; the Free Software Foundation
594 # gives unlimited permission to copy and/or distribute it,
595 # with or without modifications, as long as this notice is preserved.
596
597 # serial 2
598
599 # Check whether the underlying file-system supports filenames
600 # with a leading dot.  For instance MS-DOS doesn't.
601 AC_DEFUN([AM_SET_LEADING_DOT],
602 [rm -rf .tst 2>/dev/null
603 mkdir .tst 2>/dev/null
604 if test -d .tst; then
605   am__leading_dot=.
606 else
607   am__leading_dot=_
608 fi
609 rmdir .tst 2>/dev/null
610 AC_SUBST([am__leading_dot])])
611
612 # Check to see how 'make' treats includes.                  -*- Autoconf -*-
613
614 # Copyright (C) 2001-2012 Free Software Foundation, Inc.
615 #
616 # This file is free software; the Free Software Foundation
617 # gives unlimited permission to copy and/or distribute it,
618 # with or without modifications, as long as this notice is preserved.
619
620 # serial 5
621
622 # AM_MAKE_INCLUDE()
623 # -----------------
624 # Check to see how make treats includes.
625 AC_DEFUN([AM_MAKE_INCLUDE],
626 [am_make=${MAKE-make}
627 cat > confinc << 'END'
628 am__doit:
629         @echo this is the am__doit target
630 .PHONY: am__doit
631 END
632 # If we don't find an include directive, just comment out the code.
633 AC_MSG_CHECKING([for style of include used by $am_make])
634 am__include="#"
635 am__quote=
636 _am_result=none
637 # First try GNU make style include.
638 echo "include confinc" > confmf
639 # Ignore all kinds of additional output from 'make'.
640 case `$am_make -s -f confmf 2> /dev/null` in #(
641 *the\ am__doit\ target*)
642   am__include=include
643   am__quote=
644   _am_result=GNU
645   ;;
646 esac
647 # Now try BSD make style include.
648 if test "$am__include" = "#"; then
649    echo '.include "confinc"' > confmf
650    case `$am_make -s -f confmf 2> /dev/null` in #(
651    *the\ am__doit\ target*)
652      am__include=.include
653      am__quote="\""
654      _am_result=BSD
655      ;;
656    esac
657 fi
658 AC_SUBST([am__include])
659 AC_SUBST([am__quote])
660 AC_MSG_RESULT([$_am_result])
661 rm -f confinc confmf
662 ])
663
664 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
665
666 # Copyright (C) 1997-2012 Free Software Foundation, Inc.
667 #
668 # This file is free software; the Free Software Foundation
669 # gives unlimited permission to copy and/or distribute it,
670 # with or without modifications, as long as this notice is preserved.
671
672 # serial 7
673
674 # AM_MISSING_PROG(NAME, PROGRAM)
675 # ------------------------------
676 AC_DEFUN([AM_MISSING_PROG],
677 [AC_REQUIRE([AM_MISSING_HAS_RUN])
678 $1=${$1-"${am_missing_run}$2"}
679 AC_SUBST($1)])
680
681
682 # AM_MISSING_HAS_RUN
683 # ------------------
684 # Define MISSING if not defined so far and test if it supports --run.
685 # If it does, set am_missing_run to use it, otherwise, to nothing.
686 AC_DEFUN([AM_MISSING_HAS_RUN],
687 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
688 AC_REQUIRE_AUX_FILE([missing])dnl
689 if test x"${MISSING+set}" != xset; then
690   case $am_aux_dir in
691   *\ * | *\     *)
692     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
693   *)
694     MISSING="\${SHELL} $am_aux_dir/missing" ;;
695   esac
696 fi
697 # Use eval to expand $SHELL
698 if eval "$MISSING --run true"; then
699   am_missing_run="$MISSING --run "
700 else
701   am_missing_run=
702   AC_MSG_WARN(['missing' script is too old or missing])
703 fi
704 ])
705
706 # Helper functions for option handling.                     -*- Autoconf -*-
707
708 # Copyright (C) 2001-2012 Free Software Foundation, Inc.
709 #
710 # This file is free software; the Free Software Foundation
711 # gives unlimited permission to copy and/or distribute it,
712 # with or without modifications, as long as this notice is preserved.
713
714 # serial 6
715
716 # _AM_MANGLE_OPTION(NAME)
717 # -----------------------
718 AC_DEFUN([_AM_MANGLE_OPTION],
719 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
720
721 # _AM_SET_OPTION(NAME)
722 # --------------------
723 # Set option NAME.  Presently that only means defining a flag for this option.
724 AC_DEFUN([_AM_SET_OPTION],
725 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
726
727 # _AM_SET_OPTIONS(OPTIONS)
728 # ------------------------
729 # OPTIONS is a space-separated list of Automake options.
730 AC_DEFUN([_AM_SET_OPTIONS],
731 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
732
733 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
734 # -------------------------------------------
735 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
736 AC_DEFUN([_AM_IF_OPTION],
737 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
738
739 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
740
741 # Copyright (C) 1996-2012 Free Software Foundation, Inc.
742 #
743 # This file is free software; the Free Software Foundation
744 # gives unlimited permission to copy and/or distribute it,
745 # with or without modifications, as long as this notice is preserved.
746
747 # serial 9
748
749 # AM_SANITY_CHECK
750 # ---------------
751 AC_DEFUN([AM_SANITY_CHECK],
752 [AC_MSG_CHECKING([whether build environment is sane])
753 # Reject unsafe characters in $srcdir or the absolute working directory
754 # name.  Accept space and tab only in the latter.
755 am_lf='
756 '
757 case `pwd` in
758   *[[\\\"\#\$\&\'\`$am_lf]]*)
759     AC_MSG_ERROR([unsafe absolute working directory name]);;
760 esac
761 case $srcdir in
762   *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
763     AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
764 esac
765
766 # Do 'set' in a subshell so we don't clobber the current shell's
767 # arguments.  Must try -L first in case configure is actually a
768 # symlink; some systems play weird games with the mod time of symlinks
769 # (eg FreeBSD returns the mod time of the symlink's containing
770 # directory).
771 if (
772    am_has_slept=no
773    for am_try in 1 2; do
774      echo "timestamp, slept: $am_has_slept" > conftest.file
775      set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
776      if test "$[*]" = "X"; then
777         # -L didn't work.
778         set X `ls -t "$srcdir/configure" conftest.file`
779      fi
780      if test "$[*]" != "X $srcdir/configure conftest.file" \
781         && test "$[*]" != "X conftest.file $srcdir/configure"; then
782
783         # If neither matched, then we have a broken ls.  This can happen
784         # if, for instance, CONFIG_SHELL is bash and it inherits a
785         # broken ls alias from the environment.  This has actually
786         # happened.  Such a system could not be considered "sane".
787         AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
788   alias in your environment])
789      fi
790      if test "$[2]" = conftest.file || test $am_try -eq 2; then
791        break
792      fi
793      # Just in case.
794      sleep 1
795      am_has_slept=yes
796    done
797    test "$[2]" = conftest.file
798    )
799 then
800    # Ok.
801    :
802 else
803    AC_MSG_ERROR([newly created file is older than distributed files!
804 Check your system clock])
805 fi
806 AC_MSG_RESULT([yes])
807 # If we didn't sleep, we still need to ensure time stamps of config.status and
808 # generated files are strictly newer.
809 am_sleep_pid=
810 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
811   ( sleep 1 ) &
812   am_sleep_pid=$!
813 fi
814 AC_CONFIG_COMMANDS_PRE(
815   [AC_MSG_CHECKING([that generated files are newer than configure])
816    if test -n "$am_sleep_pid"; then
817      # Hide warnings about reused PIDs.
818      wait $am_sleep_pid 2>/dev/null
819    fi
820    AC_MSG_RESULT([done])])
821 rm -f conftest.file
822 ])
823
824 # Copyright (C) 2009-2012 Free Software Foundation, Inc.
825 #
826 # This file is free software; the Free Software Foundation
827 # gives unlimited permission to copy and/or distribute it,
828 # with or without modifications, as long as this notice is preserved.
829
830 # serial 3
831
832 # AM_SILENT_RULES([DEFAULT])
833 # --------------------------
834 # Enable less verbose build rules; with the default set to DEFAULT
835 # ("yes" being less verbose, "no" or empty being verbose).
836 AC_DEFUN([AM_SILENT_RULES],
837 [AC_ARG_ENABLE([silent-rules], [dnl
838 AS_HELP_STRING(
839   [--enable-silent-rules],
840   [less verbose build output (undo: "make V=1")])
841 AS_HELP_STRING(
842   [--disable-silent-rules],
843   [verbose build output (undo: "make V=0")])dnl
844 ])
845 case $enable_silent_rules in @%:@ (((
846   yes) AM_DEFAULT_VERBOSITY=0;;
847    no) AM_DEFAULT_VERBOSITY=1;;
848     *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
849 esac
850 dnl
851 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
852 dnl do not support nested variable expansions.
853 dnl See automake bug#9928 and bug#10237.
854 am_make=${MAKE-make}
855 AC_CACHE_CHECK([whether $am_make supports nested variables],
856    [am_cv_make_support_nested_variables],
857    [if AS_ECHO([['TRUE=$(BAR$(V))
858 BAR0=false
859 BAR1=true
860 V=1
861 am__doit:
862         @$(TRUE)
863 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
864   am_cv_make_support_nested_variables=yes
865 else
866   am_cv_make_support_nested_variables=no
867 fi])
868 if test $am_cv_make_support_nested_variables = yes; then
869   dnl Using '$V' instead of '$(V)' breaks IRIX make.
870   AM_V='$(V)'
871   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
872 else
873   AM_V=$AM_DEFAULT_VERBOSITY
874   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
875 fi
876 AC_SUBST([AM_V])dnl
877 AM_SUBST_NOTMAKE([AM_V])dnl
878 AC_SUBST([AM_DEFAULT_V])dnl
879 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
880 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
881 AM_BACKSLASH='\'
882 AC_SUBST([AM_BACKSLASH])dnl
883 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
884 ])
885
886 # Copyright (C) 2001-2012 Free Software Foundation, Inc.
887 #
888 # This file is free software; the Free Software Foundation
889 # gives unlimited permission to copy and/or distribute it,
890 # with or without modifications, as long as this notice is preserved.
891
892 # serial 2
893
894 # AM_PROG_INSTALL_STRIP
895 # ---------------------
896 # One issue with vendor 'install' (even GNU) is that you can't
897 # specify the program used to strip binaries.  This is especially
898 # annoying in cross-compiling environments, where the build's strip
899 # is unlikely to handle the host's binaries.
900 # Fortunately install-sh will honor a STRIPPROG variable, so we
901 # always use install-sh in "make install-strip", and initialize
902 # STRIPPROG with the value of the STRIP variable (set by the user).
903 AC_DEFUN([AM_PROG_INSTALL_STRIP],
904 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
905 # Installed binaries are usually stripped using 'strip' when the user
906 # run "make install-strip".  However 'strip' might not be the right
907 # tool to use in cross-compilation environments, therefore Automake
908 # will honor the 'STRIP' environment variable to overrule this program.
909 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
910 if test "$cross_compiling" != no; then
911   AC_CHECK_TOOL([STRIP], [strip], :)
912 fi
913 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
914 AC_SUBST([INSTALL_STRIP_PROGRAM])])
915
916 # Copyright (C) 2006-2012 Free Software Foundation, Inc.
917 #
918 # This file is free software; the Free Software Foundation
919 # gives unlimited permission to copy and/or distribute it,
920 # with or without modifications, as long as this notice is preserved.
921
922 # serial 3
923
924 # _AM_SUBST_NOTMAKE(VARIABLE)
925 # ---------------------------
926 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
927 # This macro is traced by Automake.
928 AC_DEFUN([_AM_SUBST_NOTMAKE])
929
930 # AM_SUBST_NOTMAKE(VARIABLE)
931 # --------------------------
932 # Public sister of _AM_SUBST_NOTMAKE.
933 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
934
935 # Check how to create a tarball.                            -*- Autoconf -*-
936
937 # Copyright (C) 2004-2012 Free Software Foundation, Inc.
938 #
939 # This file is free software; the Free Software Foundation
940 # gives unlimited permission to copy and/or distribute it,
941 # with or without modifications, as long as this notice is preserved.
942
943 # serial 3
944
945 # _AM_PROG_TAR(FORMAT)
946 # --------------------
947 # Check how to create a tarball in format FORMAT.
948 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
949 #
950 # Substitute a variable $(am__tar) that is a command
951 # writing to stdout a FORMAT-tarball containing the directory
952 # $tardir.
953 #     tardir=directory && $(am__tar) > result.tar
954 #
955 # Substitute a variable $(am__untar) that extract such
956 # a tarball read from stdin.
957 #     $(am__untar) < result.tar
958 AC_DEFUN([_AM_PROG_TAR],
959 [# Always define AMTAR for backward compatibility.  Yes, it's still used
960 # in the wild :-(  We should find a proper way to deprecate it ...
961 AC_SUBST([AMTAR], ['$${TAR-tar}'])
962 m4_if([$1], [v7],
963      [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
964      [m4_case([$1], [ustar],, [pax],,
965               [m4_fatal([Unknown tar format])])
966 AC_MSG_CHECKING([how to create a $1 tar archive])
967 # Loop over all known methods to create a tar archive until one works.
968 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
969 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
970 # Do not fold the above two line into one, because Tru64 sh and
971 # Solaris sh will not grok spaces in the rhs of '-'.
972 for _am_tool in $_am_tools
973 do
974   case $_am_tool in
975   gnutar)
976     for _am_tar in tar gnutar gtar;
977     do
978       AM_RUN_LOG([$_am_tar --version]) && break
979     done
980     am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
981     am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
982     am__untar="$_am_tar -xf -"
983     ;;
984   plaintar)
985     # Must skip GNU tar: if it does not support --format= it doesn't create
986     # ustar tarball either.
987     (tar --version) >/dev/null 2>&1 && continue
988     am__tar='tar chf - "$$tardir"'
989     am__tar_='tar chf - "$tardir"'
990     am__untar='tar xf -'
991     ;;
992   pax)
993     am__tar='pax -L -x $1 -w "$$tardir"'
994     am__tar_='pax -L -x $1 -w "$tardir"'
995     am__untar='pax -r'
996     ;;
997   cpio)
998     am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
999     am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1000     am__untar='cpio -i -H $1 -d'
1001     ;;
1002   none)
1003     am__tar=false
1004     am__tar_=false
1005     am__untar=false
1006     ;;
1007   esac
1008
1009   # If the value was cached, stop now.  We just wanted to have am__tar
1010   # and am__untar set.
1011   test -n "${am_cv_prog_tar_$1}" && break
1012
1013   # tar/untar a dummy directory, and stop if the command works
1014   rm -rf conftest.dir
1015   mkdir conftest.dir
1016   echo GrepMe > conftest.dir/file
1017   AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1018   rm -rf conftest.dir
1019   if test -s conftest.tar; then
1020     AM_RUN_LOG([$am__untar <conftest.tar])
1021     grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1022   fi
1023 done
1024 rm -rf conftest.dir
1025
1026 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1027 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1028 AC_SUBST([am__tar])
1029 AC_SUBST([am__untar])
1030 ]) # _AM_PROG_TAR
1031
1032 # nls.m4 serial 5 (gettext-0.18)
1033 dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
1034 dnl Inc.
1035 dnl This file is free software; the Free Software Foundation
1036 dnl gives unlimited permission to copy and/or distribute it,
1037 dnl with or without modifications, as long as this notice is preserved.
1038 dnl
1039 dnl This file can can be used in projects which are not available under
1040 dnl the GNU General Public License or the GNU Library General Public
1041 dnl License but which still want to provide support for the GNU gettext
1042 dnl functionality.
1043 dnl Please note that the actual code of the GNU gettext library is covered
1044 dnl by the GNU Library General Public License, and the rest of the GNU
1045 dnl gettext package package is covered by the GNU General Public License.
1046 dnl They are *not* in the public domain.
1047
1048 dnl Authors:
1049 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1050 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
1051
1052 AC_PREREQ([2.50])
1053
1054 AC_DEFUN([AM_NLS],
1055 [
1056   AC_MSG_CHECKING([whether NLS is requested])
1057   dnl Default is enabled NLS
1058   AC_ARG_ENABLE([nls],
1059     [  --disable-nls           do not use Native Language Support],
1060     USE_NLS=$enableval, USE_NLS=yes)
1061   AC_MSG_RESULT([$USE_NLS])
1062   AC_SUBST([USE_NLS])
1063 ])
1064
1065 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
1066 # serial 1 (pkg-config-0.24)
1067
1068 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
1069 #
1070 # This program is free software; you can redistribute it and/or modify
1071 # it under the terms of the GNU General Public License as published by
1072 # the Free Software Foundation; either version 2 of the License, or
1073 # (at your option) any later version.
1074 #
1075 # This program is distributed in the hope that it will be useful, but
1076 # WITHOUT ANY WARRANTY; without even the implied warranty of
1077 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
1078 # General Public License for more details.
1079 #
1080 # You should have received a copy of the GNU General Public License
1081 # along with this program; if not, write to the Free Software
1082 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1083 #
1084 # As a special exception to the GNU General Public License, if you
1085 # distribute this file as part of a program that contains a
1086 # configuration script generated by Autoconf, you may include it under
1087 # the same distribution terms that you use for the rest of that program.
1088
1089 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
1090 # ----------------------------------
1091 AC_DEFUN([PKG_PROG_PKG_CONFIG],
1092 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
1093 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
1094 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
1095 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
1096 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
1097
1098 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1099         AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1100 fi
1101 if test -n "$PKG_CONFIG"; then
1102         _pkg_min_version=m4_default([$1], [0.9.0])
1103         AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
1104         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1105                 AC_MSG_RESULT([yes])
1106         else
1107                 AC_MSG_RESULT([no])
1108                 PKG_CONFIG=""
1109         fi
1110 fi[]dnl
1111 ])# PKG_PROG_PKG_CONFIG
1112
1113 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1114 #
1115 # Check to see whether a particular set of modules exists.  Similar
1116 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
1117 #
1118 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1119 # only at the first occurence in configure.ac, so if the first place
1120 # it's called might be skipped (such as if it is within an "if", you
1121 # have to call PKG_CHECK_EXISTS manually
1122 # --------------------------------------------------------------
1123 AC_DEFUN([PKG_CHECK_EXISTS],
1124 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1125 if test -n "$PKG_CONFIG" && \
1126     AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
1127   m4_default([$2], [:])
1128 m4_ifvaln([$3], [else
1129   $3])dnl
1130 fi])
1131
1132 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
1133 # ---------------------------------------------
1134 m4_define([_PKG_CONFIG],
1135 [if test -n "$$1"; then
1136     pkg_cv_[]$1="$$1"
1137  elif test -n "$PKG_CONFIG"; then
1138     PKG_CHECK_EXISTS([$3],
1139                      [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
1140                      [pkg_failed=yes])
1141  else
1142     pkg_failed=untried
1143 fi[]dnl
1144 ])# _PKG_CONFIG
1145
1146 # _PKG_SHORT_ERRORS_SUPPORTED
1147 # -----------------------------
1148 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
1149 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1150 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1151         _pkg_short_errors_supported=yes
1152 else
1153         _pkg_short_errors_supported=no
1154 fi[]dnl
1155 ])# _PKG_SHORT_ERRORS_SUPPORTED
1156
1157
1158 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1159 # [ACTION-IF-NOT-FOUND])
1160 #
1161 #
1162 # Note that if there is a possibility the first call to
1163 # PKG_CHECK_MODULES might not happen, you should be sure to include an
1164 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
1165 #
1166 #
1167 # --------------------------------------------------------------
1168 AC_DEFUN([PKG_CHECK_MODULES],
1169 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1170 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
1171 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
1172
1173 pkg_failed=no
1174 AC_MSG_CHECKING([for $1])
1175
1176 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1177 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
1178
1179 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
1180 and $1[]_LIBS to avoid the need to call pkg-config.
1181 See the pkg-config man page for more details.])
1182
1183 if test $pkg_failed = yes; then
1184         AC_MSG_RESULT([no])
1185         _PKG_SHORT_ERRORS_SUPPORTED
1186         if test $_pkg_short_errors_supported = yes; then
1187                 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
1188         else 
1189                 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
1190         fi
1191         # Put the nasty error message in config.log where it belongs
1192         echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1193
1194         m4_default([$4], [AC_MSG_ERROR(
1195 [Package requirements ($2) were not met:
1196
1197 $$1_PKG_ERRORS
1198
1199 Consider adjusting the PKG_CONFIG_PATH environment variable if you
1200 installed software in a non-standard prefix.
1201
1202 _PKG_TEXT])[]dnl
1203         ])
1204 elif test $pkg_failed = untried; then
1205         AC_MSG_RESULT([no])
1206         m4_default([$4], [AC_MSG_FAILURE(
1207 [The pkg-config script could not be found or is too old.  Make sure it
1208 is in your PATH or set the PKG_CONFIG environment variable to the full
1209 path to pkg-config.
1210
1211 _PKG_TEXT
1212
1213 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
1214         ])
1215 else
1216         $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1217         $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1218         AC_MSG_RESULT([yes])
1219         $3
1220 fi[]dnl
1221 ])# PKG_CHECK_MODULES
1222
1223 m4_include([m4/gtk-doc.m4])
1224 m4_include([m4/intltool.m4])
1225 m4_include([m4/introspection.m4])
1226 m4_include([m4/libtool.m4])
1227 m4_include([m4/ltoptions.m4])
1228 m4_include([m4/ltsugar.m4])
1229 m4_include([m4/ltversion.m4])
1230 m4_include([m4/lt~obsolete.m4])
1231 m4_include([acinclude.m4])