~behda/+junk/udisks2.original

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: behda
  • Date: 2014-05-24 15:15:11 UTC
  • Revision ID: pauvitk@gmail.com-20140524151511-3vtr0uubjewx3z2j
Initial commit of source code and Debian packaging.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# generated automatically by aclocal 1.14.1 -*- Autoconf -*-
 
2
 
 
3
# Copyright (C) 1996-2013 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_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
 
15
m4_ifndef([AC_AUTOCONF_VERSION],
 
16
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 
17
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
 
18
[m4_warning([this file was generated for autoconf 2.69.
 
19
You have another version of autoconf.  It may work, but is not guaranteed to.
 
20
If you have problems, you may need to regenerate the build system entirely.
 
21
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
 
22
 
 
23
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
 
24
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
 
25
#
 
26
# This file is free software, distributed under the terms of the GNU
 
27
# General Public License.  As a special exception to the GNU General
 
28
# Public License, this file may be distributed as part of a program
 
29
# that contains a configuration script generated by Autoconf, under
 
30
# the same distribution terms as the rest of that program.
 
31
#
 
32
# This file can be copied and used freely without restrictions.  It can
 
33
# be used in projects which are not available under the GNU Public License
 
34
# but which still want to provide support for the GNU gettext functionality.
 
35
#
 
36
# Macro to add for using GNU gettext.
 
37
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
 
38
#
 
39
# Modified to never use included libintl. 
 
40
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
 
41
#
 
42
# Major rework to remove unused code
 
43
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
 
44
#
 
45
# Added better handling of ALL_LINGUAS from GNU gettext version 
 
46
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
 
47
#
 
48
# Modified to require ngettext
 
49
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
 
50
#
 
51
# We need this here as well, since someone might use autoconf-2.5x
 
52
# to configure GLib then an older version to configure a package
 
53
# using AM_GLIB_GNU_GETTEXT
 
54
AC_PREREQ(2.53)
 
55
 
 
56
dnl
 
57
dnl We go to great lengths to make sure that aclocal won't 
 
58
dnl try to pull in the installed version of these macros
 
59
dnl when running aclocal in the glib directory.
 
60
dnl
 
61
m4_copy([AC_DEFUN],[glib_DEFUN])
 
62
m4_copy([AC_REQUIRE],[glib_REQUIRE])
 
63
dnl
 
64
dnl At the end, if we're not within glib, we'll define the public
 
65
dnl definitions in terms of our private definitions.
 
66
dnl
 
67
 
 
68
# GLIB_LC_MESSAGES
 
69
#--------------------
 
70
glib_DEFUN([GLIB_LC_MESSAGES],
 
71
  [AC_CHECK_HEADERS([locale.h])
 
72
    if test $ac_cv_header_locale_h = yes; then
 
73
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
 
74
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
 
75
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
 
76
    if test $am_cv_val_LC_MESSAGES = yes; then
 
77
      AC_DEFINE(HAVE_LC_MESSAGES, 1,
 
78
        [Define if your <locale.h> file defines LC_MESSAGES.])
 
79
    fi
 
80
  fi])
 
81
 
 
82
# GLIB_PATH_PROG_WITH_TEST
 
83
#----------------------------
 
84
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
 
85
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
 
86
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
 
87
[# Extract the first word of "$2", so it can be a program name with args.
 
88
set dummy $2; ac_word=[$]2
 
89
AC_MSG_CHECKING([for $ac_word])
 
90
AC_CACHE_VAL(ac_cv_path_$1,
 
91
[case "[$]$1" in
 
92
  /*)
 
93
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
 
94
  ;;
 
95
  *)
 
96
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
 
97
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
 
98
    test -z "$ac_dir" && ac_dir=.
 
99
    if test -f $ac_dir/$ac_word; then
 
100
      if [$3]; then
 
101
        ac_cv_path_$1="$ac_dir/$ac_word"
 
102
        break
 
103
      fi
 
104
    fi
 
105
  done
 
106
  IFS="$ac_save_ifs"
 
107
dnl If no 4th arg is given, leave the cache variable unset,
 
108
dnl so AC_PATH_PROGS will keep looking.
 
109
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
 
110
])dnl
 
111
  ;;
 
112
esac])dnl
 
113
$1="$ac_cv_path_$1"
 
114
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
 
115
  AC_MSG_RESULT([$]$1)
 
116
else
 
117
  AC_MSG_RESULT(no)
 
118
fi
 
119
AC_SUBST($1)dnl
 
120
])
 
121
 
 
122
# GLIB_WITH_NLS
 
123
#-----------------
 
124
glib_DEFUN([GLIB_WITH_NLS],
 
125
  dnl NLS is obligatory
 
126
  [USE_NLS=yes
 
127
    AC_SUBST(USE_NLS)
 
128
 
 
129
    gt_cv_have_gettext=no
 
130
 
 
131
    CATOBJEXT=NONE
 
132
    XGETTEXT=:
 
133
    INTLLIBS=
 
134
 
 
135
    AC_CHECK_HEADER(libintl.h,
 
136
     [gt_cv_func_dgettext_libintl="no"
 
137
      libintl_extra_libs=""
 
138
 
 
139
      #
 
140
      # First check in libc
 
141
      #
 
142
      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
 
143
        [AC_TRY_LINK([
 
144
#include <libintl.h>
 
145
],
 
146
         [return !ngettext ("","", 1)],
 
147
          gt_cv_func_ngettext_libc=yes,
 
148
          gt_cv_func_ngettext_libc=no)
 
149
        ])
 
150
  
 
151
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
 
152
              AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
 
153
                [AC_TRY_LINK([
 
154
#include <libintl.h>
 
155
],
 
156
                  [return !dgettext ("","")],
 
157
                  gt_cv_func_dgettext_libc=yes,
 
158
                  gt_cv_func_dgettext_libc=no)
 
159
                ])
 
160
      fi
 
161
  
 
162
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
 
163
        AC_CHECK_FUNCS(bind_textdomain_codeset)
 
164
      fi
 
165
 
 
166
      #
 
167
      # If we don't have everything we want, check in libintl
 
168
      #
 
169
      if test "$gt_cv_func_dgettext_libc" != "yes" \
 
170
         || test "$gt_cv_func_ngettext_libc" != "yes" \
 
171
         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
 
172
        
 
173
        AC_CHECK_LIB(intl, bindtextdomain,
 
174
            [AC_CHECK_LIB(intl, ngettext,
 
175
                    [AC_CHECK_LIB(intl, dgettext,
 
176
                                  gt_cv_func_dgettext_libintl=yes)])])
 
177
 
 
178
        if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
 
179
          AC_MSG_CHECKING([if -liconv is needed to use gettext])
 
180
          AC_MSG_RESULT([])
 
181
          AC_CHECK_LIB(intl, ngettext,
 
182
                [AC_CHECK_LIB(intl, dcgettext,
 
183
                       [gt_cv_func_dgettext_libintl=yes
 
184
                        libintl_extra_libs=-liconv],
 
185
                        :,-liconv)],
 
186
                :,-liconv)
 
187
        fi
 
188
 
 
189
        #
 
190
        # If we found libintl, then check in it for bind_textdomain_codeset();
 
191
        # we'll prefer libc if neither have bind_textdomain_codeset(),
 
192
        # and both have dgettext and ngettext
 
193
        #
 
194
        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
 
195
          glib_save_LIBS="$LIBS"
 
196
          LIBS="$LIBS -lintl $libintl_extra_libs"
 
197
          unset ac_cv_func_bind_textdomain_codeset
 
198
          AC_CHECK_FUNCS(bind_textdomain_codeset)
 
199
          LIBS="$glib_save_LIBS"
 
200
 
 
201
          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
 
202
            gt_cv_func_dgettext_libc=no
 
203
          else
 
204
            if test "$gt_cv_func_dgettext_libc" = "yes" \
 
205
                && test "$gt_cv_func_ngettext_libc" = "yes"; then
 
206
              gt_cv_func_dgettext_libintl=no
 
207
            fi
 
208
          fi
 
209
        fi
 
210
      fi
 
211
 
 
212
      if test "$gt_cv_func_dgettext_libc" = "yes" \
 
213
        || test "$gt_cv_func_dgettext_libintl" = "yes"; then
 
214
        gt_cv_have_gettext=yes
 
215
      fi
 
216
  
 
217
      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
 
218
        INTLLIBS="-lintl $libintl_extra_libs"
 
219
      fi
 
220
  
 
221
      if test "$gt_cv_have_gettext" = "yes"; then
 
222
        AC_DEFINE(HAVE_GETTEXT,1,
 
223
          [Define if the GNU gettext() function is already present or preinstalled.])
 
224
        GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
 
225
          [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
 
226
        if test "$MSGFMT" != "no"; then
 
227
          glib_save_LIBS="$LIBS"
 
228
          LIBS="$LIBS $INTLLIBS"
 
229
          AC_CHECK_FUNCS(dcgettext)
 
230
          MSGFMT_OPTS=
 
231
          AC_MSG_CHECKING([if msgfmt accepts -c])
 
232
          GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
 
233
msgid ""
 
234
msgstr ""
 
235
"Content-Type: text/plain; charset=UTF-8\n"
 
236
"Project-Id-Version: test 1.0\n"
 
237
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
 
238
"Last-Translator: test <foo@bar.xx>\n"
 
239
"Language-Team: C <LL@li.org>\n"
 
240
"MIME-Version: 1.0\n"
 
241
"Content-Transfer-Encoding: 8bit\n"
 
242
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
 
243
          AC_SUBST(MSGFMT_OPTS)
 
244
          AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 
245
          GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
 
246
            [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
 
247
          AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
 
248
                         return _nl_msg_cat_cntr],
 
249
            [CATOBJEXT=.gmo 
 
250
             DATADIRNAME=share],
 
251
            [case $host in
 
252
            *-*-solaris*)
 
253
            dnl On Solaris, if bind_textdomain_codeset is in libc,
 
254
            dnl GNU format message catalog is always supported,
 
255
            dnl since both are added to the libc all together.
 
256
            dnl Hence, we'd like to go with DATADIRNAME=share and
 
257
            dnl and CATOBJEXT=.gmo in this case.
 
258
            AC_CHECK_FUNC(bind_textdomain_codeset,
 
259
              [CATOBJEXT=.gmo 
 
260
               DATADIRNAME=share],
 
261
              [CATOBJEXT=.mo
 
262
               DATADIRNAME=lib])
 
263
            ;;
 
264
            *-*-openbsd*)
 
265
            CATOBJEXT=.mo
 
266
            DATADIRNAME=share
 
267
            ;;
 
268
            *)
 
269
            CATOBJEXT=.mo
 
270
            DATADIRNAME=lib
 
271
            ;;
 
272
            esac])
 
273
          LIBS="$glib_save_LIBS"
 
274
          INSTOBJEXT=.mo
 
275
        else
 
276
          gt_cv_have_gettext=no
 
277
        fi
 
278
      fi
 
279
    ])
 
280
 
 
281
    if test "$gt_cv_have_gettext" = "yes" ; then
 
282
      AC_DEFINE(ENABLE_NLS, 1,
 
283
        [always defined to indicate that i18n is enabled])
 
284
    fi
 
285
 
 
286
    dnl Test whether we really found GNU xgettext.
 
287
    if test "$XGETTEXT" != ":"; then
 
288
      dnl If it is not GNU xgettext we define it as : so that the
 
289
      dnl Makefiles still can work.
 
290
      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
 
291
        : ;
 
292
      else
 
293
        AC_MSG_RESULT(
 
294
          [found xgettext program is not GNU xgettext; ignore it])
 
295
        XGETTEXT=":"
 
296
      fi
 
297
    fi
 
298
 
 
299
    # We need to process the po/ directory.
 
300
    POSUB=po
 
301
 
 
302
    AC_OUTPUT_COMMANDS(
 
303
      [case "$CONFIG_FILES" in *po/Makefile.in*)
 
304
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
 
305
      esac])
 
306
 
 
307
    dnl These rules are solely for the distribution goal.  While doing this
 
308
    dnl we only have to keep exactly one list of the available catalogs
 
309
    dnl in configure.ac.
 
310
    for lang in $ALL_LINGUAS; do
 
311
      GMOFILES="$GMOFILES $lang.gmo"
 
312
      POFILES="$POFILES $lang.po"
 
313
    done
 
314
 
 
315
    dnl Make all variables we use known to autoconf.
 
316
    AC_SUBST(CATALOGS)
 
317
    AC_SUBST(CATOBJEXT)
 
318
    AC_SUBST(DATADIRNAME)
 
319
    AC_SUBST(GMOFILES)
 
320
    AC_SUBST(INSTOBJEXT)
 
321
    AC_SUBST(INTLLIBS)
 
322
    AC_SUBST(PO_IN_DATADIR_TRUE)
 
323
    AC_SUBST(PO_IN_DATADIR_FALSE)
 
324
    AC_SUBST(POFILES)
 
325
    AC_SUBST(POSUB)
 
326
  ])
 
327
 
 
328
# AM_GLIB_GNU_GETTEXT
 
329
# -------------------
 
330
# Do checks necessary for use of gettext. If a suitable implementation 
 
331
# of gettext is found in either in libintl or in the C library,
 
332
# it will set INTLLIBS to the libraries needed for use of gettext
 
333
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
 
334
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
 
335
# on various variables needed by the Makefile.in.in installed by 
 
336
# glib-gettextize.
 
337
dnl
 
338
glib_DEFUN([GLIB_GNU_GETTEXT],
 
339
  [AC_REQUIRE([AC_PROG_CC])dnl
 
340
   
 
341
   GLIB_LC_MESSAGES
 
342
   GLIB_WITH_NLS
 
343
 
 
344
   if test "$gt_cv_have_gettext" = "yes"; then
 
345
     if test "x$ALL_LINGUAS" = "x"; then
 
346
       LINGUAS=
 
347
     else
 
348
       AC_MSG_CHECKING(for catalogs to be installed)
 
349
       NEW_LINGUAS=
 
350
       for presentlang in $ALL_LINGUAS; do
 
351
         useit=no
 
352
         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
 
353
           desiredlanguages="$LINGUAS"
 
354
         else
 
355
           desiredlanguages="$ALL_LINGUAS"
 
356
         fi
 
357
         for desiredlang in $desiredlanguages; do
 
358
           # Use the presentlang catalog if desiredlang is
 
359
           #   a. equal to presentlang, or
 
360
           #   b. a variant of presentlang (because in this case,
 
361
           #      presentlang can be used as a fallback for messages
 
362
           #      which are not translated in the desiredlang catalog).
 
363
           case "$desiredlang" in
 
364
             "$presentlang"*) useit=yes;;
 
365
           esac
 
366
         done
 
367
         if test $useit = yes; then
 
368
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
 
369
         fi
 
370
       done
 
371
       LINGUAS=$NEW_LINGUAS
 
372
       AC_MSG_RESULT($LINGUAS)
 
373
     fi
 
374
 
 
375
     dnl Construct list of names of catalog files to be constructed.
 
376
     if test -n "$LINGUAS"; then
 
377
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
 
378
     fi
 
379
   fi
 
380
 
 
381
   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
 
382
   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
 
383
   dnl Try to locate is.
 
384
   MKINSTALLDIRS=
 
385
   if test -n "$ac_aux_dir"; then
 
386
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
 
387
   fi
 
388
   if test -z "$MKINSTALLDIRS"; then
 
389
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
 
390
   fi
 
391
   AC_SUBST(MKINSTALLDIRS)
 
392
 
 
393
   dnl Generate list of files to be processed by xgettext which will
 
394
   dnl be included in po/Makefile.
 
395
   test -d po || mkdir po
 
396
   if test "x$srcdir" != "x."; then
 
397
     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
 
398
       posrcprefix="$srcdir/"
 
399
     else
 
400
       posrcprefix="../$srcdir/"
 
401
     fi
 
402
   else
 
403
     posrcprefix="../"
 
404
   fi
 
405
   rm -f po/POTFILES
 
406
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
 
407
        < $srcdir/po/POTFILES.in > po/POTFILES
 
408
  ])
 
409
 
 
410
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
 
411
# -------------------------------
 
412
# Define VARIABLE to the location where catalog files will
 
413
# be installed by po/Makefile.
 
414
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
 
415
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
 
416
glib_save_prefix="$prefix"
 
417
glib_save_exec_prefix="$exec_prefix"
 
418
glib_save_datarootdir="$datarootdir"
 
419
test "x$prefix" = xNONE && prefix=$ac_default_prefix
 
420
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
 
421
datarootdir=`eval echo "${datarootdir}"`
 
422
if test "x$CATOBJEXT" = "x.mo" ; then
 
423
  localedir=`eval echo "${libdir}/locale"`
 
424
else
 
425
  localedir=`eval echo "${datadir}/locale"`
 
426
fi
 
427
prefix="$glib_save_prefix"
 
428
exec_prefix="$glib_save_exec_prefix"
 
429
datarootdir="$glib_save_datarootdir"
 
430
AC_DEFINE_UNQUOTED($1, "$localedir",
 
431
  [Define the location where the catalogs will be installed])
 
432
])
 
433
 
 
434
dnl
 
435
dnl Now the definitions that aclocal will find
 
436
dnl
 
437
ifdef(glib_configure_ac,[],[
 
438
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
 
439
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
 
440
])dnl
 
441
 
 
442
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
 
443
 
444
# Create a temporary file with TEST-FILE as its contents and pass the
 
445
# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
 
446
# 0 and perform ACTION-IF-FAIL for any other exit status.
 
447
AC_DEFUN([GLIB_RUN_PROG],
 
448
[cat >conftest.foo <<_ACEOF
 
449
$2
 
450
_ACEOF
 
451
if AC_RUN_LOG([$1 conftest.foo]); then
 
452
  m4_ifval([$3], [$3], [:])
 
453
m4_ifvaln([$4], [else $4])dnl
 
454
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
 
455
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
 
456
fi])
 
457
 
 
458
 
 
459
# gnome-common.m4
 
460
#
 
461
# serial 3
 
462
 
463
 
 
464
dnl GNOME_COMMON_INIT
 
465
 
 
466
AU_DEFUN([GNOME_COMMON_INIT],
 
467
[
 
468
  dnl this macro should come after AC_CONFIG_MACRO_DIR
 
469
  AC_BEFORE([AC_CONFIG_MACRO_DIR], [$0])
 
470
 
 
471
  dnl ensure that when the Automake generated makefile calls aclocal,
 
472
  dnl it honours the $ACLOCAL_FLAGS environment variable
 
473
  ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
 
474
  if test -n "$ac_macro_dir"; then
 
475
    ACLOCAL_AMFLAGS="-I $ac_macro_dir $ACLOCAL_AMFLAGS"
 
476
  fi
 
477
 
 
478
  AC_SUBST([ACLOCAL_AMFLAGS])
 
479
],
 
480
[[$0: This macro is deprecated. You should set put "ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}"
 
481
in your top-level Makefile.am, instead, where "m4" is the macro directory set
 
482
with AC_CONFIG_MACRO_DIR() in your configure.ac]])
 
483
 
 
484
AC_DEFUN([GNOME_DEBUG_CHECK],
 
485
[
 
486
        AC_ARG_ENABLE([debug],
 
487
                      AC_HELP_STRING([--enable-debug],
 
488
                                     [turn on debugging]),,
 
489
                      [enable_debug=no])
 
490
 
 
491
        if test x$enable_debug = xyes ; then
 
492
            AC_DEFINE(GNOME_ENABLE_DEBUG, 1,
 
493
                [Enable additional debugging at the expense of performance and size])
 
494
        fi
 
495
])
 
496
 
 
497
dnl GNOME_MAINTAINER_MODE_DEFINES ()
 
498
dnl define DISABLE_DEPRECATED
 
499
dnl
 
500
AC_DEFUN([GNOME_MAINTAINER_MODE_DEFINES],
 
501
[
 
502
        AC_REQUIRE([AM_MAINTAINER_MODE])
 
503
 
 
504
        DISABLE_DEPRECATED=""
 
505
        if test $USE_MAINTAINER_MODE = yes; then
 
506
                DOMAINS="GCONF BONOBO BONOBO_UI GNOME LIBGLADE GNOME_VFS WNCK LIBSOUP"
 
507
                for DOMAIN in $DOMAINS; do
 
508
                       DISABLE_DEPRECATED="$DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_SINGLE_INCLUDES"
 
509
                done
 
510
        fi
 
511
 
 
512
        AC_SUBST(DISABLE_DEPRECATED)
 
513
])
 
514
 
 
515
# gnome-compiler-flags.m4
 
516
#
 
517
# serial 2
 
518
#
 
519
 
 
520
dnl GNOME_COMPILE_WARNINGS
 
521
dnl Turn on many useful compiler warnings and substitute the result into
 
522
dnl WARN_CFLAGS
 
523
dnl For now, only works on GCC
 
524
dnl Pass the default value of the --enable-compile-warnings configure option as
 
525
dnl the first argument to the macro, defaulting to 'yes'.
 
526
dnl Additional warning/error flags can be passed as an optional second argument.
 
527
dnl
 
528
dnl For example: GNOME_COMPILE_WARNINGS([maximum],[-Werror=some-flag -Wfoobar])
 
529
AC_DEFUN([GNOME_COMPILE_WARNINGS],[
 
530
    dnl ******************************
 
531
    dnl More compiler warnings
 
532
    dnl ******************************
 
533
 
 
534
    AC_ARG_ENABLE(compile-warnings, 
 
535
                  AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
 
536
                                 [Turn on compiler warnings]),,
 
537
                  [enable_compile_warnings="m4_default([$1],[yes])"])
 
538
 
 
539
    if test "x$GCC" != xyes; then
 
540
        enable_compile_warnings=no
 
541
    fi
 
542
 
 
543
    warning_flags=
 
544
    realsave_CFLAGS="$CFLAGS"
 
545
 
 
546
    dnl These are warning flags that aren't marked as fatal.  Can be
 
547
    dnl overridden on a per-project basis with -Wno-foo.
 
548
    base_warn_flags=" \
 
549
        -Wall \
 
550
        -Wstrict-prototypes \
 
551
        -Wnested-externs \
 
552
    "
 
553
 
 
554
    dnl These compiler flags typically indicate very broken or suspicious
 
555
    dnl code.  Some of them such as implicit-function-declaration are
 
556
    dnl just not default because gcc compiles a lot of legacy code.
 
557
    dnl We choose to make this set into explicit errors.
 
558
    base_error_flags=" \
 
559
        -Werror=missing-prototypes \
 
560
        -Werror=implicit-function-declaration \
 
561
        -Werror=pointer-arith \
 
562
        -Werror=init-self \
 
563
        -Werror=format-security \
 
564
        -Werror=format=2 \
 
565
        -Werror=missing-include-dirs \
 
566
    "
 
567
 
 
568
    dnl Additional warning or error flags provided by the module author to
 
569
    dnl allow stricter standards to be imposed on a per-module basis.
 
570
    dnl The author can pass -W or -Werror flags here as they see fit.
 
571
    additional_flags="m4_default([$2],[])"
 
572
 
 
573
    case "$enable_compile_warnings" in
 
574
    no)
 
575
        warning_flags=
 
576
        ;;
 
577
    minimum)
 
578
        warning_flags="-Wall"
 
579
        ;;
 
580
    yes)
 
581
        warning_flags="$base_warn_flags $base_error_flags $additional_flags"
 
582
        ;;
 
583
    maximum|error)
 
584
        warning_flags="$base_warn_flags $base_error_flags $additional_flags"
 
585
        ;;
 
586
    *)
 
587
        AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
 
588
        ;;
 
589
    esac
 
590
 
 
591
    if test "$enable_compile_warnings" = "error" ; then
 
592
        warning_flags="$warning_flags -Werror"
 
593
    fi
 
594
 
 
595
    dnl Check whether GCC supports the warning options
 
596
    for option in $warning_flags; do
 
597
        save_CFLAGS="$CFLAGS"
 
598
        CFLAGS="$CFLAGS $option"
 
599
        AC_MSG_CHECKING([whether gcc understands $option])
 
600
        AC_TRY_COMPILE([], [],
 
601
            has_option=yes,
 
602
            has_option=no,)
 
603
        CFLAGS="$save_CFLAGS"
 
604
        AC_MSG_RESULT([$has_option])
 
605
        if test $has_option = yes; then
 
606
            tested_warning_flags="$tested_warning_flags $option"
 
607
        fi
 
608
        unset has_option
 
609
        unset save_CFLAGS
 
610
    done
 
611
    unset option
 
612
    CFLAGS="$realsave_CFLAGS"
 
613
    AC_MSG_CHECKING(what warning flags to pass to the C compiler)
 
614
    AC_MSG_RESULT($tested_warning_flags)
 
615
 
 
616
    AC_ARG_ENABLE(iso-c,
 
617
                  AC_HELP_STRING([--enable-iso-c],
 
618
                                 [Try to warn if code is not ISO C ]),,
 
619
                  [enable_iso_c=no])
 
620
 
 
621
    AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
 
622
    complCFLAGS=
 
623
    if test "x$enable_iso_c" != "xno"; then
 
624
        if test "x$GCC" = "xyes"; then
 
625
        case " $CFLAGS " in
 
626
            *[\ \       ]-ansi[\ \      ]*) ;;
 
627
            *) complCFLAGS="$complCFLAGS -ansi" ;;
 
628
        esac
 
629
        case " $CFLAGS " in
 
630
            *[\ \       ]-pedantic[\ \  ]*) ;;
 
631
            *) complCFLAGS="$complCFLAGS -pedantic" ;;
 
632
        esac
 
633
        fi
 
634
    fi
 
635
    AC_MSG_RESULT($complCFLAGS)
 
636
 
 
637
    WARN_CFLAGS="$tested_warning_flags $complCFLAGS"
 
638
    AC_SUBST(WARN_CFLAGS)
 
639
])
 
640
 
 
641
dnl For C++, do basically the same thing.
 
642
 
 
643
AC_DEFUN([GNOME_CXX_WARNINGS],[
 
644
  AC_ARG_ENABLE(cxx-warnings,
 
645
                AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
 
646
                               [Turn on compiler warnings.]),,
 
647
                [enable_cxx_warnings="m4_default([$1],[minimum])"])
 
648
 
 
649
  AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
 
650
  warnCXXFLAGS=
 
651
  if test "x$GXX" != xyes; then
 
652
    enable_cxx_warnings=no
 
653
  fi
 
654
  if test "x$enable_cxx_warnings" != "xno"; then
 
655
    if test "x$GXX" = "xyes"; then
 
656
      case " $CXXFLAGS " in
 
657
      *[\ \     ]-Wall[\ \      ]*) ;;
 
658
      *) warnCXXFLAGS="-Wall -Wno-unused" ;;
 
659
      esac
 
660
 
 
661
      ## -W is not all that useful.  And it cannot be controlled
 
662
      ## with individual -Wno-xxx flags, unlike -Wall
 
663
      if test "x$enable_cxx_warnings" = "xyes"; then
 
664
        warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
 
665
      fi
 
666
    fi
 
667
  fi
 
668
  AC_MSG_RESULT($warnCXXFLAGS)
 
669
 
 
670
   AC_ARG_ENABLE(iso-cxx,
 
671
                 AC_HELP_STRING([--enable-iso-cxx],
 
672
                                [Try to warn if code is not ISO C++ ]),,
 
673
                 [enable_iso_cxx=no])
 
674
 
 
675
   AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
 
676
   complCXXFLAGS=
 
677
   if test "x$enable_iso_cxx" != "xno"; then
 
678
     if test "x$GXX" = "xyes"; then
 
679
      case " $CXXFLAGS " in
 
680
      *[\ \     ]-ansi[\ \      ]*) ;;
 
681
      *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
 
682
      esac
 
683
 
 
684
      case " $CXXFLAGS " in
 
685
      *[\ \     ]-pedantic[\ \  ]*) ;;
 
686
      *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
 
687
      esac
 
688
     fi
 
689
   fi
 
690
  AC_MSG_RESULT($complCXXFLAGS)
 
691
 
 
692
  WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
 
693
  AC_SUBST(WARN_CXXFLAGS)
 
694
])
 
695
 
 
696
dnl -*- mode: autoconf -*-
 
697
dnl Copyright 2009 Johan Dahlin
 
698
dnl
 
699
dnl This file is free software; the author(s) gives unlimited
 
700
dnl permission to copy and/or distribute it, with or without
 
701
dnl modifications, as long as this notice is preserved.
 
702
dnl
 
703
 
 
704
# serial 1
 
705
 
 
706
m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
 
707
[
 
708
    AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
 
709
    AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
 
710
    AC_BEFORE([LT_INIT],[$0])dnl setup libtool first
 
711
 
 
712
    dnl enable/disable introspection
 
713
    m4_if([$2], [require],
 
714
    [dnl
 
715
        enable_introspection=yes
 
716
    ],[dnl
 
717
        AC_ARG_ENABLE(introspection,
 
718
                  AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]],
 
719
                                 [Enable introspection for this build]),, 
 
720
                                 [enable_introspection=auto])
 
721
    ])dnl
 
722
 
 
723
    AC_MSG_CHECKING([for gobject-introspection])
 
724
 
 
725
    dnl presence/version checking
 
726
    AS_CASE([$enable_introspection],
 
727
    [no], [dnl
 
728
        found_introspection="no (disabled, use --enable-introspection to enable)"
 
729
    ],dnl
 
730
    [yes],[dnl
 
731
        PKG_CHECK_EXISTS([gobject-introspection-1.0],,
 
732
                         AC_MSG_ERROR([gobject-introspection-1.0 is not installed]))
 
733
        PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1],
 
734
                         found_introspection=yes,
 
735
                         AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME]))
 
736
    ],dnl
 
737
    [auto],[dnl
 
738
        PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no)
 
739
        dnl Canonicalize enable_introspection
 
740
        enable_introspection=$found_introspection
 
741
    ],dnl
 
742
    [dnl        
 
743
        AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@])
 
744
    ])dnl
 
745
 
 
746
    AC_MSG_RESULT([$found_introspection])
 
747
 
 
748
    INTROSPECTION_SCANNER=
 
749
    INTROSPECTION_COMPILER=
 
750
    INTROSPECTION_GENERATE=
 
751
    INTROSPECTION_GIRDIR=
 
752
    INTROSPECTION_TYPELIBDIR=
 
753
    if test "x$found_introspection" = "xyes"; then
 
754
       INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
 
755
       INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
 
756
       INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
 
757
       INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
 
758
       INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
 
759
       INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
 
760
       INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
 
761
       INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
 
762
    fi
 
763
    AC_SUBST(INTROSPECTION_SCANNER)
 
764
    AC_SUBST(INTROSPECTION_COMPILER)
 
765
    AC_SUBST(INTROSPECTION_GENERATE)
 
766
    AC_SUBST(INTROSPECTION_GIRDIR)
 
767
    AC_SUBST(INTROSPECTION_TYPELIBDIR)
 
768
    AC_SUBST(INTROSPECTION_CFLAGS)
 
769
    AC_SUBST(INTROSPECTION_LIBS)
 
770
    AC_SUBST(INTROSPECTION_MAKEFILE)
 
771
 
 
772
    AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
 
773
])
 
774
 
 
775
 
 
776
dnl Usage:
 
777
dnl   GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version])
 
778
 
 
779
AC_DEFUN([GOBJECT_INTROSPECTION_CHECK],
 
780
[
 
781
  _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1])
 
782
])
 
783
 
 
784
dnl Usage:
 
785
dnl   GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version])
 
786
 
 
787
 
 
788
AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE],
 
789
[
 
790
  _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require])
 
791
])
 
792
 
 
793
# nls.m4 serial 5 (gettext-0.18)
 
794
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2013 Free Software Foundation,
 
795
dnl Inc.
 
796
dnl This file is free software; the Free Software Foundation
 
797
dnl gives unlimited permission to copy and/or distribute it,
 
798
dnl with or without modifications, as long as this notice is preserved.
 
799
dnl
 
800
dnl This file can can be used in projects which are not available under
 
801
dnl the GNU General Public License or the GNU Library General Public
 
802
dnl License but which still want to provide support for the GNU gettext
 
803
dnl functionality.
 
804
dnl Please note that the actual code of the GNU gettext library is covered
 
805
dnl by the GNU Library General Public License, and the rest of the GNU
 
806
dnl gettext package package is covered by the GNU General Public License.
 
807
dnl They are *not* in the public domain.
 
808
 
 
809
dnl Authors:
 
810
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
 
811
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
 
812
 
 
813
AC_PREREQ([2.50])
 
814
 
 
815
AC_DEFUN([AM_NLS],
 
816
[
 
817
  AC_MSG_CHECKING([whether NLS is requested])
 
818
  dnl Default is enabled NLS
 
819
  AC_ARG_ENABLE([nls],
 
820
    [  --disable-nls           do not use Native Language Support],
 
821
    USE_NLS=$enableval, USE_NLS=yes)
 
822
  AC_MSG_RESULT([$USE_NLS])
 
823
  AC_SUBST([USE_NLS])
 
824
])
 
825
 
 
826
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
 
827
# serial 1 (pkg-config-0.24)
 
828
 
829
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
 
830
#
 
831
# This program is free software; you can redistribute it and/or modify
 
832
# it under the terms of the GNU General Public License as published by
 
833
# the Free Software Foundation; either version 2 of the License, or
 
834
# (at your option) any later version.
 
835
#
 
836
# This program is distributed in the hope that it will be useful, but
 
837
# WITHOUT ANY WARRANTY; without even the implied warranty of
 
838
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
839
# General Public License for more details.
 
840
#
 
841
# You should have received a copy of the GNU General Public License
 
842
# along with this program; if not, write to the Free Software
 
843
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
844
#
 
845
# As a special exception to the GNU General Public License, if you
 
846
# distribute this file as part of a program that contains a
 
847
# configuration script generated by Autoconf, you may include it under
 
848
# the same distribution terms that you use for the rest of that program.
 
849
 
 
850
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
 
851
# ----------------------------------
 
852
AC_DEFUN([PKG_PROG_PKG_CONFIG],
 
853
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
 
854
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
 
855
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
 
856
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
 
857
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
 
858
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
 
859
 
 
860
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
 
861
        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
 
862
fi
 
863
if test -n "$PKG_CONFIG"; then
 
864
        _pkg_min_version=m4_default([$1], [0.9.0])
 
865
        AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
 
866
        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
 
867
                AC_MSG_RESULT([yes])
 
868
        else
 
869
                AC_MSG_RESULT([no])
 
870
                PKG_CONFIG=""
 
871
        fi
 
872
fi[]dnl
 
873
])# PKG_PROG_PKG_CONFIG
 
874
 
 
875
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 
876
#
 
877
# Check to see whether a particular set of modules exists.  Similar
 
878
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
 
879
#
 
880
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 
881
# only at the first occurence in configure.ac, so if the first place
 
882
# it's called might be skipped (such as if it is within an "if", you
 
883
# have to call PKG_CHECK_EXISTS manually
 
884
# --------------------------------------------------------------
 
885
AC_DEFUN([PKG_CHECK_EXISTS],
 
886
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
887
if test -n "$PKG_CONFIG" && \
 
888
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
 
889
  m4_default([$2], [:])
 
890
m4_ifvaln([$3], [else
 
891
  $3])dnl
 
892
fi])
 
893
 
 
894
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
 
895
# ---------------------------------------------
 
896
m4_define([_PKG_CONFIG],
 
897
[if test -n "$$1"; then
 
898
    pkg_cv_[]$1="$$1"
 
899
 elif test -n "$PKG_CONFIG"; then
 
900
    PKG_CHECK_EXISTS([$3],
 
901
                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
 
902
                      test "x$?" != "x0" && pkg_failed=yes ],
 
903
                     [pkg_failed=yes])
 
904
 else
 
905
    pkg_failed=untried
 
906
fi[]dnl
 
907
])# _PKG_CONFIG
 
908
 
 
909
# _PKG_SHORT_ERRORS_SUPPORTED
 
910
# -----------------------------
 
911
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
 
912
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 
913
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
 
914
        _pkg_short_errors_supported=yes
 
915
else
 
916
        _pkg_short_errors_supported=no
 
917
fi[]dnl
 
918
])# _PKG_SHORT_ERRORS_SUPPORTED
 
919
 
 
920
 
 
921
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
 
922
# [ACTION-IF-NOT-FOUND])
 
923
#
 
924
#
 
925
# Note that if there is a possibility the first call to
 
926
# PKG_CHECK_MODULES might not happen, you should be sure to include an
 
927
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
 
928
#
 
929
#
 
930
# --------------------------------------------------------------
 
931
AC_DEFUN([PKG_CHECK_MODULES],
 
932
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
933
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
 
934
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
 
935
 
 
936
pkg_failed=no
 
937
AC_MSG_CHECKING([for $1])
 
938
 
 
939
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
 
940
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
 
941
 
 
942
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
 
943
and $1[]_LIBS to avoid the need to call pkg-config.
 
944
See the pkg-config man page for more details.])
 
945
 
 
946
if test $pkg_failed = yes; then
 
947
        AC_MSG_RESULT([no])
 
948
        _PKG_SHORT_ERRORS_SUPPORTED
 
949
        if test $_pkg_short_errors_supported = yes; then
 
950
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
 
951
        else 
 
952
                $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
 
953
        fi
 
954
        # Put the nasty error message in config.log where it belongs
 
955
        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
 
956
 
 
957
        m4_default([$4], [AC_MSG_ERROR(
 
958
[Package requirements ($2) were not met:
 
959
 
 
960
$$1_PKG_ERRORS
 
961
 
 
962
Consider adjusting the PKG_CONFIG_PATH environment variable if you
 
963
installed software in a non-standard prefix.
 
964
 
 
965
_PKG_TEXT])[]dnl
 
966
        ])
 
967
elif test $pkg_failed = untried; then
 
968
        AC_MSG_RESULT([no])
 
969
        m4_default([$4], [AC_MSG_FAILURE(
 
970
[The pkg-config script could not be found or is too old.  Make sure it
 
971
is in your PATH or set the PKG_CONFIG environment variable to the full
 
972
path to pkg-config.
 
973
 
 
974
_PKG_TEXT
 
975
 
 
976
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
 
977
        ])
 
978
else
 
979
        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
 
980
        $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
 
981
        AC_MSG_RESULT([yes])
 
982
        $3
 
983
fi[]dnl
 
984
])# PKG_CHECK_MODULES
 
985
 
 
986
# Copyright (C) 2002-2013 Free Software Foundation, Inc.
 
987
#
 
988
# This file is free software; the Free Software Foundation
 
989
# gives unlimited permission to copy and/or distribute it,
 
990
# with or without modifications, as long as this notice is preserved.
 
991
 
 
992
# AM_AUTOMAKE_VERSION(VERSION)
 
993
# ----------------------------
 
994
# Automake X.Y traces this macro to ensure aclocal.m4 has been
 
995
# generated from the m4 files accompanying Automake X.Y.
 
996
# (This private macro should not be called outside this file.)
 
997
AC_DEFUN([AM_AUTOMAKE_VERSION],
 
998
[am__api_version='1.14'
 
999
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 
1000
dnl require some minimum version.  Point them to the right macro.
 
1001
m4_if([$1], [1.14.1], [],
 
1002
      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 
1003
])
 
1004
 
 
1005
# _AM_AUTOCONF_VERSION(VERSION)
 
1006
# -----------------------------
 
1007
# aclocal traces this macro to find the Autoconf version.
 
1008
# This is a private macro too.  Using m4_define simplifies
 
1009
# the logic in aclocal, which can simply ignore this definition.
 
1010
m4_define([_AM_AUTOCONF_VERSION], [])
 
1011
 
 
1012
# AM_SET_CURRENT_AUTOMAKE_VERSION
 
1013
# -------------------------------
 
1014
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 
1015
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 
1016
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
 
1017
[AM_AUTOMAKE_VERSION([1.14.1])dnl
 
1018
m4_ifndef([AC_AUTOCONF_VERSION],
 
1019
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 
1020
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
1021
 
 
1022
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
1023
 
 
1024
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
 
1025
#
 
1026
# This file is free software; the Free Software Foundation
 
1027
# gives unlimited permission to copy and/or distribute it,
 
1028
# with or without modifications, as long as this notice is preserved.
 
1029
 
 
1030
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
 
1031
# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
 
1032
# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
 
1033
#
 
1034
# Of course, Automake must honor this variable whenever it calls a
 
1035
# tool from the auxiliary directory.  The problem is that $srcdir (and
 
1036
# therefore $ac_aux_dir as well) can be either absolute or relative,
 
1037
# depending on how configure is run.  This is pretty annoying, since
 
1038
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
 
1039
# source directory, any form will work fine, but in subdirectories a
 
1040
# relative path needs to be adjusted first.
 
1041
#
 
1042
# $ac_aux_dir/missing
 
1043
#    fails when called from a subdirectory if $ac_aux_dir is relative
 
1044
# $top_srcdir/$ac_aux_dir/missing
 
1045
#    fails if $ac_aux_dir is absolute,
 
1046
#    fails when called from a subdirectory in a VPATH build with
 
1047
#          a relative $ac_aux_dir
 
1048
#
 
1049
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
 
1050
# are both prefixed by $srcdir.  In an in-source build this is usually
 
1051
# harmless because $srcdir is '.', but things will broke when you
 
1052
# start a VPATH build or use an absolute $srcdir.
 
1053
#
 
1054
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
 
1055
# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
 
1056
#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
 
1057
# and then we would define $MISSING as
 
1058
#   MISSING="\${SHELL} $am_aux_dir/missing"
 
1059
# This will work as long as MISSING is not called from configure, because
 
1060
# unfortunately $(top_srcdir) has no meaning in configure.
 
1061
# However there are other variables, like CC, which are often used in
 
1062
# configure, and could therefore not use this "fixed" $ac_aux_dir.
 
1063
#
 
1064
# Another solution, used here, is to always expand $ac_aux_dir to an
 
1065
# absolute PATH.  The drawback is that using absolute paths prevent a
 
1066
# configured tree to be moved without reconfiguration.
 
1067
 
 
1068
AC_DEFUN([AM_AUX_DIR_EXPAND],
 
1069
[dnl Rely on autoconf to set up CDPATH properly.
 
1070
AC_PREREQ([2.50])dnl
 
1071
# expand $ac_aux_dir to an absolute path
 
1072
am_aux_dir=`cd $ac_aux_dir && pwd`
 
1073
])
 
1074
 
 
1075
# AM_CONDITIONAL                                            -*- Autoconf -*-
 
1076
 
 
1077
# Copyright (C) 1997-2013 Free Software Foundation, Inc.
 
1078
#
 
1079
# This file is free software; the Free Software Foundation
 
1080
# gives unlimited permission to copy and/or distribute it,
 
1081
# with or without modifications, as long as this notice is preserved.
 
1082
 
 
1083
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
 
1084
# -------------------------------------
 
1085
# Define a conditional.
 
1086
AC_DEFUN([AM_CONDITIONAL],
 
1087
[AC_PREREQ([2.52])dnl
 
1088
 m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
 
1089
       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
 
1090
AC_SUBST([$1_TRUE])dnl
 
1091
AC_SUBST([$1_FALSE])dnl
 
1092
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
 
1093
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
 
1094
m4_define([_AM_COND_VALUE_$1], [$2])dnl
 
1095
if $2; then
 
1096
  $1_TRUE=
 
1097
  $1_FALSE='#'
 
1098
else
 
1099
  $1_TRUE='#'
 
1100
  $1_FALSE=
 
1101
fi
 
1102
AC_CONFIG_COMMANDS_PRE(
 
1103
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
 
1104
  AC_MSG_ERROR([[conditional "$1" was never defined.
 
1105
Usually this means the macro was only invoked conditionally.]])
 
1106
fi])])
 
1107
 
 
1108
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
 
1109
#
 
1110
# This file is free software; the Free Software Foundation
 
1111
# gives unlimited permission to copy and/or distribute it,
 
1112
# with or without modifications, as long as this notice is preserved.
 
1113
 
 
1114
 
 
1115
# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
 
1116
# written in clear, in which case automake, when reading aclocal.m4,
 
1117
# will think it sees a *use*, and therefore will trigger all it's
 
1118
# C support machinery.  Also note that it means that autoscan, seeing
 
1119
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
 
1120
 
 
1121
 
 
1122
# _AM_DEPENDENCIES(NAME)
 
1123
# ----------------------
 
1124
# See how the compiler implements dependency checking.
 
1125
# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
 
1126
# We try a few techniques and use that to set a single cache variable.
 
1127
#
 
1128
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
 
1129
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
 
1130
# dependency, and given that the user is not expected to run this macro,
 
1131
# just rely on AC_PROG_CC.
 
1132
AC_DEFUN([_AM_DEPENDENCIES],
 
1133
[AC_REQUIRE([AM_SET_DEPDIR])dnl
 
1134
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
 
1135
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
 
1136
AC_REQUIRE([AM_DEP_TRACK])dnl
 
1137
 
 
1138
m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
 
1139
      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
 
1140
      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
 
1141
      [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
 
1142
      [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
 
1143
      [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
 
1144
                    [depcc="$$1"   am_compiler_list=])
 
1145
 
 
1146
AC_CACHE_CHECK([dependency style of $depcc],
 
1147
               [am_cv_$1_dependencies_compiler_type],
 
1148
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
 
1149
  # We make a subdir and do the tests there.  Otherwise we can end up
 
1150
  # making bogus files that we don't know about and never remove.  For
 
1151
  # instance it was reported that on HP-UX the gcc test will end up
 
1152
  # making a dummy file named 'D' -- because '-MD' means "put the output
 
1153
  # in D".
 
1154
  rm -rf conftest.dir
 
1155
  mkdir conftest.dir
 
1156
  # Copy depcomp to subdir because otherwise we won't find it if we're
 
1157
  # using a relative directory.
 
1158
  cp "$am_depcomp" conftest.dir
 
1159
  cd conftest.dir
 
1160
  # We will build objects and dependencies in a subdirectory because
 
1161
  # it helps to detect inapplicable dependency modes.  For instance
 
1162
  # both Tru64's cc and ICC support -MD to output dependencies as a
 
1163
  # side effect of compilation, but ICC will put the dependencies in
 
1164
  # the current directory while Tru64 will put them in the object
 
1165
  # directory.
 
1166
  mkdir sub
 
1167
 
 
1168
  am_cv_$1_dependencies_compiler_type=none
 
1169
  if test "$am_compiler_list" = ""; then
 
1170
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
 
1171
  fi
 
1172
  am__universal=false
 
1173
  m4_case([$1], [CC],
 
1174
    [case " $depcc " in #(
 
1175
     *\ -arch\ *\ -arch\ *) am__universal=true ;;
 
1176
     esac],
 
1177
    [CXX],
 
1178
    [case " $depcc " in #(
 
1179
     *\ -arch\ *\ -arch\ *) am__universal=true ;;
 
1180
     esac])
 
1181
 
 
1182
  for depmode in $am_compiler_list; do
 
1183
    # Setup a source with many dependencies, because some compilers
 
1184
    # like to wrap large dependency lists on column 80 (with \), and
 
1185
    # we should not choose a depcomp mode which is confused by this.
 
1186
    #
 
1187
    # We need to recreate these files for each test, as the compiler may
 
1188
    # overwrite some of them when testing with obscure command lines.
 
1189
    # This happens at least with the AIX C compiler.
 
1190
    : > sub/conftest.c
 
1191
    for i in 1 2 3 4 5 6; do
 
1192
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
 
1193
      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
 
1194
      # Solaris 10 /bin/sh.
 
1195
      echo '/* dummy */' > sub/conftst$i.h
 
1196
    done
 
1197
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
1198
 
 
1199
    # We check with '-c' and '-o' for the sake of the "dashmstdout"
 
1200
    # mode.  It turns out that the SunPro C++ compiler does not properly
 
1201
    # handle '-M -o', and we need to detect this.  Also, some Intel
 
1202
    # versions had trouble with output in subdirs.
 
1203
    am__obj=sub/conftest.${OBJEXT-o}
 
1204
    am__minus_obj="-o $am__obj"
 
1205
    case $depmode in
 
1206
    gcc)
 
1207
      # This depmode causes a compiler race in universal mode.
 
1208
      test "$am__universal" = false || continue
 
1209
      ;;
 
1210
    nosideeffect)
 
1211
      # After this tag, mechanisms are not by side-effect, so they'll
 
1212
      # only be used when explicitly requested.
 
1213
      if test "x$enable_dependency_tracking" = xyes; then
 
1214
        continue
 
1215
      else
 
1216
        break
 
1217
      fi
 
1218
      ;;
 
1219
    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
 
1220
      # This compiler won't grok '-c -o', but also, the minuso test has
 
1221
      # not run yet.  These depmodes are late enough in the game, and
 
1222
      # so weak that their functioning should not be impacted.
 
1223
      am__obj=conftest.${OBJEXT-o}
 
1224
      am__minus_obj=
 
1225
      ;;
 
1226
    none) break ;;
 
1227
    esac
 
1228
    if depmode=$depmode \
 
1229
       source=sub/conftest.c object=$am__obj \
 
1230
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
 
1231
       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
 
1232
         >/dev/null 2>conftest.err &&
 
1233
       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
 
1234
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
 
1235
       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
 
1236
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
 
1237
      # icc doesn't choke on unknown options, it will just issue warnings
 
1238
      # or remarks (even with -Werror).  So we grep stderr for any message
 
1239
      # that says an option was ignored or not supported.
 
1240
      # When given -MP, icc 7.0 and 7.1 complain thusly:
 
1241
      #   icc: Command line warning: ignoring option '-M'; no argument required
 
1242
      # The diagnosis changed in icc 8.0:
 
1243
      #   icc: Command line remark: option '-MP' not supported
 
1244
      if (grep 'ignoring option' conftest.err ||
 
1245
          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
 
1246
        am_cv_$1_dependencies_compiler_type=$depmode
 
1247
        break
 
1248
      fi
 
1249
    fi
 
1250
  done
 
1251
 
 
1252
  cd ..
 
1253
  rm -rf conftest.dir
 
1254
else
 
1255
  am_cv_$1_dependencies_compiler_type=none
 
1256
fi
 
1257
])
 
1258
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
 
1259
AM_CONDITIONAL([am__fastdep$1], [
 
1260
  test "x$enable_dependency_tracking" != xno \
 
1261
  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
 
1262
])
 
1263
 
 
1264
 
 
1265
# AM_SET_DEPDIR
 
1266
# -------------
 
1267
# Choose a directory name for dependency files.
 
1268
# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
 
1269
AC_DEFUN([AM_SET_DEPDIR],
 
1270
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 
1271
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
 
1272
])
 
1273
 
 
1274
 
 
1275
# AM_DEP_TRACK
 
1276
# ------------
 
1277
AC_DEFUN([AM_DEP_TRACK],
 
1278
[AC_ARG_ENABLE([dependency-tracking], [dnl
 
1279
AS_HELP_STRING(
 
1280
  [--enable-dependency-tracking],
 
1281
  [do not reject slow dependency extractors])
 
1282
AS_HELP_STRING(
 
1283
  [--disable-dependency-tracking],
 
1284
  [speeds up one-time build])])
 
1285
if test "x$enable_dependency_tracking" != xno; then
 
1286
  am_depcomp="$ac_aux_dir/depcomp"
 
1287
  AMDEPBACKSLASH='\'
 
1288
  am__nodep='_no'
 
1289
fi
 
1290
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
 
1291
AC_SUBST([AMDEPBACKSLASH])dnl
 
1292
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
 
1293
AC_SUBST([am__nodep])dnl
 
1294
_AM_SUBST_NOTMAKE([am__nodep])dnl
 
1295
])
 
1296
 
 
1297
# Generate code to set up dependency tracking.              -*- Autoconf -*-
 
1298
 
 
1299
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
 
1300
#
 
1301
# This file is free software; the Free Software Foundation
 
1302
# gives unlimited permission to copy and/or distribute it,
 
1303
# with or without modifications, as long as this notice is preserved.
 
1304
 
 
1305
 
 
1306
# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
1307
# ------------------------------
 
1308
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
 
1309
[{
 
1310
  # Older Autoconf quotes --file arguments for eval, but not when files
 
1311
  # are listed without --file.  Let's play safe and only enable the eval
 
1312
  # if we detect the quoting.
 
1313
  case $CONFIG_FILES in
 
1314
  *\'*) eval set x "$CONFIG_FILES" ;;
 
1315
  *)   set x $CONFIG_FILES ;;
 
1316
  esac
 
1317
  shift
 
1318
  for mf
 
1319
  do
 
1320
    # Strip MF so we end up with the name of the file.
 
1321
    mf=`echo "$mf" | sed -e 's/:.*$//'`
 
1322
    # Check whether this is an Automake generated Makefile or not.
 
1323
    # We used to match only the files named 'Makefile.in', but
 
1324
    # some people rename them; so instead we look at the file content.
 
1325
    # Grep'ing the first line is not enough: some people post-process
 
1326
    # each Makefile.in and add a new line on top of each file to say so.
 
1327
    # Grep'ing the whole file is not good either: AIX grep has a line
 
1328
    # limit of 2048, but all sed's we know have understand at least 4000.
 
1329
    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
 
1330
      dirpart=`AS_DIRNAME("$mf")`
 
1331
    else
 
1332
      continue
 
1333
    fi
 
1334
    # Extract the definition of DEPDIR, am__include, and am__quote
 
1335
    # from the Makefile without running 'make'.
 
1336
    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
 
1337
    test -z "$DEPDIR" && continue
 
1338
    am__include=`sed -n 's/^am__include = //p' < "$mf"`
 
1339
    test -z "$am__include" && continue
 
1340
    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
 
1341
    # Find all dependency output files, they are included files with
 
1342
    # $(DEPDIR) in their names.  We invoke sed twice because it is the
 
1343
    # simplest approach to changing $(DEPDIR) to its actual value in the
 
1344
    # expansion.
 
1345
    for file in `sed -n "
 
1346
      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
 
1347
         sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
 
1348
      # Make sure the directory exists.
 
1349
      test -f "$dirpart/$file" && continue
 
1350
      fdir=`AS_DIRNAME(["$file"])`
 
1351
      AS_MKDIR_P([$dirpart/$fdir])
 
1352
      # echo "creating $dirpart/$file"
 
1353
      echo '# dummy' > "$dirpart/$file"
 
1354
    done
 
1355
  done
 
1356
}
 
1357
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
1358
 
 
1359
 
 
1360
# AM_OUTPUT_DEPENDENCY_COMMANDS
 
1361
# -----------------------------
 
1362
# This macro should only be invoked once -- use via AC_REQUIRE.
 
1363
#
 
1364
# This code is only required when automatic dependency tracking
 
1365
# is enabled.  FIXME.  This creates each '.P' file that we will
 
1366
# need in order to bootstrap the dependency handling code.
 
1367
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
1368
[AC_CONFIG_COMMANDS([depfiles],
 
1369
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
 
1370
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
 
1371
])
 
1372
 
 
1373
# Do all the work for Automake.                             -*- Autoconf -*-
 
1374
 
 
1375
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
 
1376
#
 
1377
# This file is free software; the Free Software Foundation
 
1378
# gives unlimited permission to copy and/or distribute it,
 
1379
# with or without modifications, as long as this notice is preserved.
 
1380
 
 
1381
# This macro actually does too much.  Some checks are only needed if
 
1382
# your package does certain things.  But this isn't really a big deal.
 
1383
 
 
1384
dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
 
1385
m4_define([AC_PROG_CC],
 
1386
m4_defn([AC_PROG_CC])
 
1387
[_AM_PROG_CC_C_O
 
1388
])
 
1389
 
 
1390
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
 
1391
# AM_INIT_AUTOMAKE([OPTIONS])
 
1392
# -----------------------------------------------
 
1393
# The call with PACKAGE and VERSION arguments is the old style
 
1394
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
 
1395
# and VERSION should now be passed to AC_INIT and removed from
 
1396
# the call to AM_INIT_AUTOMAKE.
 
1397
# We support both call styles for the transition.  After
 
1398
# the next Automake release, Autoconf can make the AC_INIT
 
1399
# arguments mandatory, and then we can depend on a new Autoconf
 
1400
# release and drop the old call support.
 
1401
AC_DEFUN([AM_INIT_AUTOMAKE],
 
1402
[AC_PREREQ([2.65])dnl
 
1403
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
 
1404
dnl the ones we care about.
 
1405
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
 
1406
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
 
1407
AC_REQUIRE([AC_PROG_INSTALL])dnl
 
1408
if test "`cd $srcdir && pwd`" != "`pwd`"; then
 
1409
  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
 
1410
  # is not polluted with repeated "-I."
 
1411
  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
 
1412
  # test to see if srcdir already configured
 
1413
  if test -f $srcdir/config.status; then
 
1414
    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
 
1415
  fi
 
1416
fi
 
1417
 
 
1418
# test whether we have cygpath
 
1419
if test -z "$CYGPATH_W"; then
 
1420
  if (cygpath --version) >/dev/null 2>/dev/null; then
 
1421
    CYGPATH_W='cygpath -w'
 
1422
  else
 
1423
    CYGPATH_W=echo
 
1424
  fi
 
1425
fi
 
1426
AC_SUBST([CYGPATH_W])
 
1427
 
 
1428
# Define the identity of the package.
 
1429
dnl Distinguish between old-style and new-style calls.
 
1430
m4_ifval([$2],
 
1431
[AC_DIAGNOSE([obsolete],
 
1432
             [$0: two- and three-arguments forms are deprecated.])
 
1433
m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
 
1434
 AC_SUBST([PACKAGE], [$1])dnl
 
1435
 AC_SUBST([VERSION], [$2])],
 
1436
[_AM_SET_OPTIONS([$1])dnl
 
1437
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
 
1438
m4_if(
 
1439
  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
 
1440
  [ok:ok],,
 
1441
  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
 
1442
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
 
1443
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 
1444
 
 
1445
_AM_IF_OPTION([no-define],,
 
1446
[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
 
1447
 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
 
1448
 
 
1449
# Some tools Automake needs.
 
1450
AC_REQUIRE([AM_SANITY_CHECK])dnl
 
1451
AC_REQUIRE([AC_ARG_PROGRAM])dnl
 
1452
AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
 
1453
AM_MISSING_PROG([AUTOCONF], [autoconf])
 
1454
AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
 
1455
AM_MISSING_PROG([AUTOHEADER], [autoheader])
 
1456
AM_MISSING_PROG([MAKEINFO], [makeinfo])
 
1457
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 
1458
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
 
1459
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
 
1460
# For better backward compatibility.  To be removed once Automake 1.9.x
 
1461
# dies out for good.  For more background, see:
 
1462
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
 
1463
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
 
1464
AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
 
1465
# We need awk for the "check" target.  The system "awk" is bad on
 
1466
# some platforms.
 
1467
AC_REQUIRE([AC_PROG_AWK])dnl
 
1468
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 
1469
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 
1470
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
 
1471
              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
 
1472
                             [_AM_PROG_TAR([v7])])])
 
1473
_AM_IF_OPTION([no-dependencies],,
 
1474
[AC_PROVIDE_IFELSE([AC_PROG_CC],
 
1475
                  [_AM_DEPENDENCIES([CC])],
 
1476
                  [m4_define([AC_PROG_CC],
 
1477
                             m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
 
1478
AC_PROVIDE_IFELSE([AC_PROG_CXX],
 
1479
                  [_AM_DEPENDENCIES([CXX])],
 
1480
                  [m4_define([AC_PROG_CXX],
 
1481
                             m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
 
1482
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
 
1483
                  [_AM_DEPENDENCIES([OBJC])],
 
1484
                  [m4_define([AC_PROG_OBJC],
 
1485
                             m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
 
1486
AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
 
1487
                  [_AM_DEPENDENCIES([OBJCXX])],
 
1488
                  [m4_define([AC_PROG_OBJCXX],
 
1489
                             m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
 
1490
])
 
1491
AC_REQUIRE([AM_SILENT_RULES])dnl
 
1492
dnl The testsuite driver may need to know about EXEEXT, so add the
 
1493
dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
 
1494
dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
 
1495
AC_CONFIG_COMMANDS_PRE(dnl
 
1496
[m4_provide_if([_AM_COMPILER_EXEEXT],
 
1497
  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
 
1498
 
 
1499
# POSIX will say in a future version that running "rm -f" with no argument
 
1500
# is OK; and we want to be able to make that assumption in our Makefile
 
1501
# recipes.  So use an aggressive probe to check that the usage we want is
 
1502
# actually supported "in the wild" to an acceptable degree.
 
1503
# See automake bug#10828.
 
1504
# To make any issue more visible, cause the running configure to be aborted
 
1505
# by default if the 'rm' program in use doesn't match our expectations; the
 
1506
# user can still override this though.
 
1507
if rm -f && rm -fr && rm -rf; then : OK; else
 
1508
  cat >&2 <<'END'
 
1509
Oops!
 
1510
 
 
1511
Your 'rm' program seems unable to run without file operands specified
 
1512
on the command line, even when the '-f' option is present.  This is contrary
 
1513
to the behaviour of most rm programs out there, and not conforming with
 
1514
the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
 
1515
 
 
1516
Please tell bug-automake@gnu.org about your system, including the value
 
1517
of your $PATH and any error possibly output before this message.  This
 
1518
can help us improve future automake versions.
 
1519
 
 
1520
END
 
1521
  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
 
1522
    echo 'Configuration will proceed anyway, since you have set the' >&2
 
1523
    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
 
1524
    echo >&2
 
1525
  else
 
1526
    cat >&2 <<'END'
 
1527
Aborting the configuration process, to ensure you take notice of the issue.
 
1528
 
 
1529
You can download and install GNU coreutils to get an 'rm' implementation
 
1530
that behaves properly: <http://www.gnu.org/software/coreutils/>.
 
1531
 
 
1532
If you want to complete the configuration process using your problematic
 
1533
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
 
1534
to "yes", and re-run configure.
 
1535
 
 
1536
END
 
1537
    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
 
1538
  fi
 
1539
fi])
 
1540
 
 
1541
dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
 
1542
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
 
1543
dnl mangled by Autoconf and run in a shell conditional statement.
 
1544
m4_define([_AC_COMPILER_EXEEXT],
 
1545
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
 
1546
 
 
1547
# When config.status generates a header, we must update the stamp-h file.
 
1548
# This file resides in the same directory as the config header
 
1549
# that is generated.  The stamp files are numbered to have different names.
 
1550
 
 
1551
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
 
1552
# loop where config.status creates the headers, so we can generate
 
1553
# our stamp files there.
 
1554
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
 
1555
[# Compute $1's index in $config_headers.
 
1556
_am_arg=$1
 
1557
_am_stamp_count=1
 
1558
for _am_header in $config_headers :; do
 
1559
  case $_am_header in
 
1560
    $_am_arg | $_am_arg:* )
 
1561
      break ;;
 
1562
    * )
 
1563
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
 
1564
  esac
 
1565
done
 
1566
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
1567
 
 
1568
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
 
1569
#
 
1570
# This file is free software; the Free Software Foundation
 
1571
# gives unlimited permission to copy and/or distribute it,
 
1572
# with or without modifications, as long as this notice is preserved.
 
1573
 
 
1574
# AM_PROG_INSTALL_SH
 
1575
# ------------------
 
1576
# Define $install_sh.
 
1577
AC_DEFUN([AM_PROG_INSTALL_SH],
 
1578
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
1579
if test x"${install_sh}" != xset; then
 
1580
  case $am_aux_dir in
 
1581
  *\ * | *\     *)
 
1582
    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
 
1583
  *)
 
1584
    install_sh="\${SHELL} $am_aux_dir/install-sh"
 
1585
  esac
 
1586
fi
 
1587
AC_SUBST([install_sh])])
 
1588
 
 
1589
# Copyright (C) 2003-2013 Free Software Foundation, Inc.
 
1590
#
 
1591
# This file is free software; the Free Software Foundation
 
1592
# gives unlimited permission to copy and/or distribute it,
 
1593
# with or without modifications, as long as this notice is preserved.
 
1594
 
 
1595
# Check whether the underlying file-system supports filenames
 
1596
# with a leading dot.  For instance MS-DOS doesn't.
 
1597
AC_DEFUN([AM_SET_LEADING_DOT],
 
1598
[rm -rf .tst 2>/dev/null
 
1599
mkdir .tst 2>/dev/null
 
1600
if test -d .tst; then
 
1601
  am__leading_dot=.
 
1602
else
 
1603
  am__leading_dot=_
 
1604
fi
 
1605
rmdir .tst 2>/dev/null
 
1606
AC_SUBST([am__leading_dot])])
 
1607
 
 
1608
# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
 
1609
# From Jim Meyering
 
1610
 
 
1611
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
 
1612
#
 
1613
# This file is free software; the Free Software Foundation
 
1614
# gives unlimited permission to copy and/or distribute it,
 
1615
# with or without modifications, as long as this notice is preserved.
 
1616
 
 
1617
# AM_MAINTAINER_MODE([DEFAULT-MODE])
 
1618
# ----------------------------------
 
1619
# Control maintainer-specific portions of Makefiles.
 
1620
# Default is to disable them, unless 'enable' is passed literally.
 
1621
# For symmetry, 'disable' may be passed as well.  Anyway, the user
 
1622
# can override the default with the --enable/--disable switch.
 
1623
AC_DEFUN([AM_MAINTAINER_MODE],
 
1624
[m4_case(m4_default([$1], [disable]),
 
1625
       [enable], [m4_define([am_maintainer_other], [disable])],
 
1626
       [disable], [m4_define([am_maintainer_other], [enable])],
 
1627
       [m4_define([am_maintainer_other], [enable])
 
1628
        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
 
1629
AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
 
1630
  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
 
1631
  AC_ARG_ENABLE([maintainer-mode],
 
1632
    [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
 
1633
      am_maintainer_other[ make rules and dependencies not useful
 
1634
      (and sometimes confusing) to the casual installer])],
 
1635
    [USE_MAINTAINER_MODE=$enableval],
 
1636
    [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
 
1637
  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
 
1638
  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
 
1639
  MAINT=$MAINTAINER_MODE_TRUE
 
1640
  AC_SUBST([MAINT])dnl
 
1641
]
 
1642
)
 
1643
 
 
1644
# Check to see how 'make' treats includes.                  -*- Autoconf -*-
 
1645
 
 
1646
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
 
1647
#
 
1648
# This file is free software; the Free Software Foundation
 
1649
# gives unlimited permission to copy and/or distribute it,
 
1650
# with or without modifications, as long as this notice is preserved.
 
1651
 
 
1652
# AM_MAKE_INCLUDE()
 
1653
# -----------------
 
1654
# Check to see how make treats includes.
 
1655
AC_DEFUN([AM_MAKE_INCLUDE],
 
1656
[am_make=${MAKE-make}
 
1657
cat > confinc << 'END'
 
1658
am__doit:
 
1659
        @echo this is the am__doit target
 
1660
.PHONY: am__doit
 
1661
END
 
1662
# If we don't find an include directive, just comment out the code.
 
1663
AC_MSG_CHECKING([for style of include used by $am_make])
 
1664
am__include="#"
 
1665
am__quote=
 
1666
_am_result=none
 
1667
# First try GNU make style include.
 
1668
echo "include confinc" > confmf
 
1669
# Ignore all kinds of additional output from 'make'.
 
1670
case `$am_make -s -f confmf 2> /dev/null` in #(
 
1671
*the\ am__doit\ target*)
 
1672
  am__include=include
 
1673
  am__quote=
 
1674
  _am_result=GNU
 
1675
  ;;
 
1676
esac
 
1677
# Now try BSD make style include.
 
1678
if test "$am__include" = "#"; then
 
1679
   echo '.include "confinc"' > confmf
 
1680
   case `$am_make -s -f confmf 2> /dev/null` in #(
 
1681
   *the\ am__doit\ target*)
 
1682
     am__include=.include
 
1683
     am__quote="\""
 
1684
     _am_result=BSD
 
1685
     ;;
 
1686
   esac
 
1687
fi
 
1688
AC_SUBST([am__include])
 
1689
AC_SUBST([am__quote])
 
1690
AC_MSG_RESULT([$_am_result])
 
1691
rm -f confinc confmf
 
1692
])
 
1693
 
 
1694
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
1695
 
 
1696
# Copyright (C) 1997-2013 Free Software Foundation, Inc.
 
1697
#
 
1698
# This file is free software; the Free Software Foundation
 
1699
# gives unlimited permission to copy and/or distribute it,
 
1700
# with or without modifications, as long as this notice is preserved.
 
1701
 
 
1702
# AM_MISSING_PROG(NAME, PROGRAM)
 
1703
# ------------------------------
 
1704
AC_DEFUN([AM_MISSING_PROG],
 
1705
[AC_REQUIRE([AM_MISSING_HAS_RUN])
 
1706
$1=${$1-"${am_missing_run}$2"}
 
1707
AC_SUBST($1)])
 
1708
 
 
1709
# AM_MISSING_HAS_RUN
 
1710
# ------------------
 
1711
# Define MISSING if not defined so far and test if it is modern enough.
 
1712
# If it is, set am_missing_run to use it, otherwise, to nothing.
 
1713
AC_DEFUN([AM_MISSING_HAS_RUN],
 
1714
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
1715
AC_REQUIRE_AUX_FILE([missing])dnl
 
1716
if test x"${MISSING+set}" != xset; then
 
1717
  case $am_aux_dir in
 
1718
  *\ * | *\     *)
 
1719
    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
 
1720
  *)
 
1721
    MISSING="\${SHELL} $am_aux_dir/missing" ;;
 
1722
  esac
 
1723
fi
 
1724
# Use eval to expand $SHELL
 
1725
if eval "$MISSING --is-lightweight"; then
 
1726
  am_missing_run="$MISSING "
 
1727
else
 
1728
  am_missing_run=
 
1729
  AC_MSG_WARN(['missing' script is too old or missing])
 
1730
fi
 
1731
])
 
1732
 
 
1733
# Helper functions for option handling.                     -*- Autoconf -*-
 
1734
 
 
1735
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
 
1736
#
 
1737
# This file is free software; the Free Software Foundation
 
1738
# gives unlimited permission to copy and/or distribute it,
 
1739
# with or without modifications, as long as this notice is preserved.
 
1740
 
 
1741
# _AM_MANGLE_OPTION(NAME)
 
1742
# -----------------------
 
1743
AC_DEFUN([_AM_MANGLE_OPTION],
 
1744
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 
1745
 
 
1746
# _AM_SET_OPTION(NAME)
 
1747
# --------------------
 
1748
# Set option NAME.  Presently that only means defining a flag for this option.
 
1749
AC_DEFUN([_AM_SET_OPTION],
 
1750
[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
 
1751
 
 
1752
# _AM_SET_OPTIONS(OPTIONS)
 
1753
# ------------------------
 
1754
# OPTIONS is a space-separated list of Automake options.
 
1755
AC_DEFUN([_AM_SET_OPTIONS],
 
1756
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 
1757
 
 
1758
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
 
1759
# -------------------------------------------
 
1760
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
 
1761
AC_DEFUN([_AM_IF_OPTION],
 
1762
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
1763
 
 
1764
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
 
1765
#
 
1766
# This file is free software; the Free Software Foundation
 
1767
# gives unlimited permission to copy and/or distribute it,
 
1768
# with or without modifications, as long as this notice is preserved.
 
1769
 
 
1770
# _AM_PROG_CC_C_O
 
1771
# ---------------
 
1772
# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
 
1773
# to automatically call this.
 
1774
AC_DEFUN([_AM_PROG_CC_C_O],
 
1775
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
1776
AC_REQUIRE_AUX_FILE([compile])dnl
 
1777
AC_LANG_PUSH([C])dnl
 
1778
AC_CACHE_CHECK(
 
1779
  [whether $CC understands -c and -o together],
 
1780
  [am_cv_prog_cc_c_o],
 
1781
  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
 
1782
  # Make sure it works both with $CC and with simple cc.
 
1783
  # Following AC_PROG_CC_C_O, we do the test twice because some
 
1784
  # compilers refuse to overwrite an existing .o file with -o,
 
1785
  # though they will create one.
 
1786
  am_cv_prog_cc_c_o=yes
 
1787
  for am_i in 1 2; do
 
1788
    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
 
1789
         && test -f conftest2.$ac_objext; then
 
1790
      : OK
 
1791
    else
 
1792
      am_cv_prog_cc_c_o=no
 
1793
      break
 
1794
    fi
 
1795
  done
 
1796
  rm -f core conftest*
 
1797
  unset am_i])
 
1798
if test "$am_cv_prog_cc_c_o" != yes; then
 
1799
   # Losing compiler, so override with the script.
 
1800
   # FIXME: It is wrong to rewrite CC.
 
1801
   # But if we don't then we get into trouble of one sort or another.
 
1802
   # A longer-term fix would be to have automake use am__CC in this case,
 
1803
   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
 
1804
   CC="$am_aux_dir/compile $CC"
 
1805
fi
 
1806
AC_LANG_POP([C])])
 
1807
 
 
1808
# For backward compatibility.
 
1809
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
 
1810
 
 
1811
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
 
1812
#
 
1813
# This file is free software; the Free Software Foundation
 
1814
# gives unlimited permission to copy and/or distribute it,
 
1815
# with or without modifications, as long as this notice is preserved.
 
1816
 
 
1817
# AM_RUN_LOG(COMMAND)
 
1818
# -------------------
 
1819
# Run COMMAND, save the exit status in ac_status, and log it.
 
1820
# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
 
1821
AC_DEFUN([AM_RUN_LOG],
 
1822
[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
 
1823
   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
 
1824
   ac_status=$?
 
1825
   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 
1826
   (exit $ac_status); }])
 
1827
 
 
1828
# Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
1829
 
 
1830
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
 
1831
#
 
1832
# This file is free software; the Free Software Foundation
 
1833
# gives unlimited permission to copy and/or distribute it,
 
1834
# with or without modifications, as long as this notice is preserved.
 
1835
 
 
1836
# AM_SANITY_CHECK
 
1837
# ---------------
 
1838
AC_DEFUN([AM_SANITY_CHECK],
 
1839
[AC_MSG_CHECKING([whether build environment is sane])
 
1840
# Reject unsafe characters in $srcdir or the absolute working directory
 
1841
# name.  Accept space and tab only in the latter.
 
1842
am_lf='
 
1843
'
 
1844
case `pwd` in
 
1845
  *[[\\\"\#\$\&\'\`$am_lf]]*)
 
1846
    AC_MSG_ERROR([unsafe absolute working directory name]);;
 
1847
esac
 
1848
case $srcdir in
 
1849
  *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
 
1850
    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
 
1851
esac
 
1852
 
 
1853
# Do 'set' in a subshell so we don't clobber the current shell's
 
1854
# arguments.  Must try -L first in case configure is actually a
 
1855
# symlink; some systems play weird games with the mod time of symlinks
 
1856
# (eg FreeBSD returns the mod time of the symlink's containing
 
1857
# directory).
 
1858
if (
 
1859
   am_has_slept=no
 
1860
   for am_try in 1 2; do
 
1861
     echo "timestamp, slept: $am_has_slept" > conftest.file
 
1862
     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
 
1863
     if test "$[*]" = "X"; then
 
1864
        # -L didn't work.
 
1865
        set X `ls -t "$srcdir/configure" conftest.file`
 
1866
     fi
 
1867
     if test "$[*]" != "X $srcdir/configure conftest.file" \
 
1868
        && test "$[*]" != "X conftest.file $srcdir/configure"; then
 
1869
 
 
1870
        # If neither matched, then we have a broken ls.  This can happen
 
1871
        # if, for instance, CONFIG_SHELL is bash and it inherits a
 
1872
        # broken ls alias from the environment.  This has actually
 
1873
        # happened.  Such a system could not be considered "sane".
 
1874
        AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
 
1875
  alias in your environment])
 
1876
     fi
 
1877
     if test "$[2]" = conftest.file || test $am_try -eq 2; then
 
1878
       break
 
1879
     fi
 
1880
     # Just in case.
 
1881
     sleep 1
 
1882
     am_has_slept=yes
 
1883
   done
 
1884
   test "$[2]" = conftest.file
 
1885
   )
 
1886
then
 
1887
   # Ok.
 
1888
   :
 
1889
else
 
1890
   AC_MSG_ERROR([newly created file is older than distributed files!
 
1891
Check your system clock])
 
1892
fi
 
1893
AC_MSG_RESULT([yes])
 
1894
# If we didn't sleep, we still need to ensure time stamps of config.status and
 
1895
# generated files are strictly newer.
 
1896
am_sleep_pid=
 
1897
if grep 'slept: no' conftest.file >/dev/null 2>&1; then
 
1898
  ( sleep 1 ) &
 
1899
  am_sleep_pid=$!
 
1900
fi
 
1901
AC_CONFIG_COMMANDS_PRE(
 
1902
  [AC_MSG_CHECKING([that generated files are newer than configure])
 
1903
   if test -n "$am_sleep_pid"; then
 
1904
     # Hide warnings about reused PIDs.
 
1905
     wait $am_sleep_pid 2>/dev/null
 
1906
   fi
 
1907
   AC_MSG_RESULT([done])])
 
1908
rm -f conftest.file
 
1909
])
 
1910
 
 
1911
# Copyright (C) 2009-2013 Free Software Foundation, Inc.
 
1912
#
 
1913
# This file is free software; the Free Software Foundation
 
1914
# gives unlimited permission to copy and/or distribute it,
 
1915
# with or without modifications, as long as this notice is preserved.
 
1916
 
 
1917
# AM_SILENT_RULES([DEFAULT])
 
1918
# --------------------------
 
1919
# Enable less verbose build rules; with the default set to DEFAULT
 
1920
# ("yes" being less verbose, "no" or empty being verbose).
 
1921
AC_DEFUN([AM_SILENT_RULES],
 
1922
[AC_ARG_ENABLE([silent-rules], [dnl
 
1923
AS_HELP_STRING(
 
1924
  [--enable-silent-rules],
 
1925
  [less verbose build output (undo: "make V=1")])
 
1926
AS_HELP_STRING(
 
1927
  [--disable-silent-rules],
 
1928
  [verbose build output (undo: "make V=0")])dnl
 
1929
])
 
1930
case $enable_silent_rules in @%:@ (((
 
1931
  yes) AM_DEFAULT_VERBOSITY=0;;
 
1932
   no) AM_DEFAULT_VERBOSITY=1;;
 
1933
    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
 
1934
esac
 
1935
dnl
 
1936
dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
 
1937
dnl do not support nested variable expansions.
 
1938
dnl See automake bug#9928 and bug#10237.
 
1939
am_make=${MAKE-make}
 
1940
AC_CACHE_CHECK([whether $am_make supports nested variables],
 
1941
   [am_cv_make_support_nested_variables],
 
1942
   [if AS_ECHO([['TRUE=$(BAR$(V))
 
1943
BAR0=false
 
1944
BAR1=true
 
1945
V=1
 
1946
am__doit:
 
1947
        @$(TRUE)
 
1948
.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
 
1949
  am_cv_make_support_nested_variables=yes
 
1950
else
 
1951
  am_cv_make_support_nested_variables=no
 
1952
fi])
 
1953
if test $am_cv_make_support_nested_variables = yes; then
 
1954
  dnl Using '$V' instead of '$(V)' breaks IRIX make.
 
1955
  AM_V='$(V)'
 
1956
  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
 
1957
else
 
1958
  AM_V=$AM_DEFAULT_VERBOSITY
 
1959
  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
 
1960
fi
 
1961
AC_SUBST([AM_V])dnl
 
1962
AM_SUBST_NOTMAKE([AM_V])dnl
 
1963
AC_SUBST([AM_DEFAULT_V])dnl
 
1964
AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
 
1965
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
 
1966
AM_BACKSLASH='\'
 
1967
AC_SUBST([AM_BACKSLASH])dnl
 
1968
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
 
1969
])
 
1970
 
 
1971
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
 
1972
#
 
1973
# This file is free software; the Free Software Foundation
 
1974
# gives unlimited permission to copy and/or distribute it,
 
1975
# with or without modifications, as long as this notice is preserved.
 
1976
 
 
1977
# AM_PROG_INSTALL_STRIP
 
1978
# ---------------------
 
1979
# One issue with vendor 'install' (even GNU) is that you can't
 
1980
# specify the program used to strip binaries.  This is especially
 
1981
# annoying in cross-compiling environments, where the build's strip
 
1982
# is unlikely to handle the host's binaries.
 
1983
# Fortunately install-sh will honor a STRIPPROG variable, so we
 
1984
# always use install-sh in "make install-strip", and initialize
 
1985
# STRIPPROG with the value of the STRIP variable (set by the user).
 
1986
AC_DEFUN([AM_PROG_INSTALL_STRIP],
 
1987
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 
1988
# Installed binaries are usually stripped using 'strip' when the user
 
1989
# run "make install-strip".  However 'strip' might not be the right
 
1990
# tool to use in cross-compilation environments, therefore Automake
 
1991
# will honor the 'STRIP' environment variable to overrule this program.
 
1992
dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
 
1993
if test "$cross_compiling" != no; then
 
1994
  AC_CHECK_TOOL([STRIP], [strip], :)
 
1995
fi
 
1996
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 
1997
AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
1998
 
 
1999
# Copyright (C) 2006-2013 Free Software Foundation, Inc.
 
2000
#
 
2001
# This file is free software; the Free Software Foundation
 
2002
# gives unlimited permission to copy and/or distribute it,
 
2003
# with or without modifications, as long as this notice is preserved.
 
2004
 
 
2005
# _AM_SUBST_NOTMAKE(VARIABLE)
 
2006
# ---------------------------
 
2007
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
 
2008
# This macro is traced by Automake.
 
2009
AC_DEFUN([_AM_SUBST_NOTMAKE])
 
2010
 
 
2011
# AM_SUBST_NOTMAKE(VARIABLE)
 
2012
# --------------------------
 
2013
# Public sister of _AM_SUBST_NOTMAKE.
 
2014
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
2015
 
 
2016
# Check how to create a tarball.                            -*- Autoconf -*-
 
2017
 
 
2018
# Copyright (C) 2004-2013 Free Software Foundation, Inc.
 
2019
#
 
2020
# This file is free software; the Free Software Foundation
 
2021
# gives unlimited permission to copy and/or distribute it,
 
2022
# with or without modifications, as long as this notice is preserved.
 
2023
 
 
2024
# _AM_PROG_TAR(FORMAT)
 
2025
# --------------------
 
2026
# Check how to create a tarball in format FORMAT.
 
2027
# FORMAT should be one of 'v7', 'ustar', or 'pax'.
 
2028
#
 
2029
# Substitute a variable $(am__tar) that is a command
 
2030
# writing to stdout a FORMAT-tarball containing the directory
 
2031
# $tardir.
 
2032
#     tardir=directory && $(am__tar) > result.tar
 
2033
#
 
2034
# Substitute a variable $(am__untar) that extract such
 
2035
# a tarball read from stdin.
 
2036
#     $(am__untar) < result.tar
 
2037
#
 
2038
AC_DEFUN([_AM_PROG_TAR],
 
2039
[# Always define AMTAR for backward compatibility.  Yes, it's still used
 
2040
# in the wild :-(  We should find a proper way to deprecate it ...
 
2041
AC_SUBST([AMTAR], ['$${TAR-tar}'])
 
2042
 
 
2043
# We'll loop over all known methods to create a tar archive until one works.
 
2044
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
 
2045
 
 
2046
m4_if([$1], [v7],
 
2047
  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
 
2048
 
 
2049
  [m4_case([$1],
 
2050
    [ustar],
 
2051
     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
 
2052
      # There is notably a 21 bits limit for the UID and the GID.  In fact,
 
2053
      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
 
2054
      # and bug#13588).
 
2055
      am_max_uid=2097151 # 2^21 - 1
 
2056
      am_max_gid=$am_max_uid
 
2057
      # The $UID and $GID variables are not portable, so we need to resort
 
2058
      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
 
2059
      # below are definitely unexpected, so allow the users to see them
 
2060
      # (that is, avoid stderr redirection).
 
2061
      am_uid=`id -u || echo unknown`
 
2062
      am_gid=`id -g || echo unknown`
 
2063
      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
 
2064
      if test $am_uid -le $am_max_uid; then
 
2065
         AC_MSG_RESULT([yes])
 
2066
      else
 
2067
         AC_MSG_RESULT([no])
 
2068
         _am_tools=none
 
2069
      fi
 
2070
      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
 
2071
      if test $am_gid -le $am_max_gid; then
 
2072
         AC_MSG_RESULT([yes])
 
2073
      else
 
2074
        AC_MSG_RESULT([no])
 
2075
        _am_tools=none
 
2076
      fi],
 
2077
 
 
2078
  [pax],
 
2079
    [],
 
2080
 
 
2081
  [m4_fatal([Unknown tar format])])
 
2082
 
 
2083
  AC_MSG_CHECKING([how to create a $1 tar archive])
 
2084
 
 
2085
  # Go ahead even if we have the value already cached.  We do so because we
 
2086
  # need to set the values for the 'am__tar' and 'am__untar' variables.
 
2087
  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
 
2088
 
 
2089
  for _am_tool in $_am_tools; do
 
2090
    case $_am_tool in
 
2091
    gnutar)
 
2092
      for _am_tar in tar gnutar gtar; do
 
2093
        AM_RUN_LOG([$_am_tar --version]) && break
 
2094
      done
 
2095
      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
 
2096
      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
 
2097
      am__untar="$_am_tar -xf -"
 
2098
      ;;
 
2099
    plaintar)
 
2100
      # Must skip GNU tar: if it does not support --format= it doesn't create
 
2101
      # ustar tarball either.
 
2102
      (tar --version) >/dev/null 2>&1 && continue
 
2103
      am__tar='tar chf - "$$tardir"'
 
2104
      am__tar_='tar chf - "$tardir"'
 
2105
      am__untar='tar xf -'
 
2106
      ;;
 
2107
    pax)
 
2108
      am__tar='pax -L -x $1 -w "$$tardir"'
 
2109
      am__tar_='pax -L -x $1 -w "$tardir"'
 
2110
      am__untar='pax -r'
 
2111
      ;;
 
2112
    cpio)
 
2113
      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
 
2114
      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
 
2115
      am__untar='cpio -i -H $1 -d'
 
2116
      ;;
 
2117
    none)
 
2118
      am__tar=false
 
2119
      am__tar_=false
 
2120
      am__untar=false
 
2121
      ;;
 
2122
    esac
 
2123
 
 
2124
    # If the value was cached, stop now.  We just wanted to have am__tar
 
2125
    # and am__untar set.
 
2126
    test -n "${am_cv_prog_tar_$1}" && break
 
2127
 
 
2128
    # tar/untar a dummy directory, and stop if the command works.
 
2129
    rm -rf conftest.dir
 
2130
    mkdir conftest.dir
 
2131
    echo GrepMe > conftest.dir/file
 
2132
    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
 
2133
    rm -rf conftest.dir
 
2134
    if test -s conftest.tar; then
 
2135
      AM_RUN_LOG([$am__untar <conftest.tar])
 
2136
      AM_RUN_LOG([cat conftest.dir/file])
 
2137
      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
 
2138
    fi
 
2139
  done
 
2140
  rm -rf conftest.dir
 
2141
 
 
2142
  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
 
2143
  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
 
2144
 
 
2145
AC_SUBST([am__tar])
 
2146
AC_SUBST([am__untar])
 
2147
]) # _AM_PROG_TAR
 
2148
 
 
2149
m4_include([m4/gtk-doc.m4])
 
2150
m4_include([m4/intltool.m4])
 
2151
m4_include([m4/libtool.m4])
 
2152
m4_include([m4/ltoptions.m4])
 
2153
m4_include([m4/ltsugar.m4])
 
2154
m4_include([m4/ltversion.m4])
 
2155
m4_include([m4/lt~obsolete.m4])
 
2156
m4_include([acinclude.m4])