~ubuntu-branches/ubuntu/vivid/emscripten/vivid

« back to all changes in this revision

Viewing changes to tests/poppler/aclocal.m4

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2013-05-02 13:11:51 UTC
  • Revision ID: package-import@ubuntu.com-20130502131151-q8dvteqr1ef2x7xz
Tags: upstream-1.4.1~20130504~adb56cb
ImportĀ upstreamĀ versionĀ 1.4.1~20130504~adb56cb

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
 
2
 
 
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 
4
# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
 
5
# This file is free software; the Free Software Foundation
 
6
# gives unlimited permission to copy and/or distribute it,
 
7
# with or without modifications, as long as this notice is preserved.
 
8
 
 
9
# This program is distributed in the hope that it will be useful,
 
10
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
 
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 
12
# PARTICULAR PURPOSE.
 
13
 
 
14
m4_ifndef([AC_AUTOCONF_VERSION],
 
15
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 
16
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
 
17
[m4_warning([this file was generated for autoconf 2.68.
 
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
# lib-link.m4 serial 21 (gettext-0.18)
 
23
dnl Copyright (C) 2001-2010 Free Software Foundation, Inc.
 
24
dnl This file is free software; the Free Software Foundation
 
25
dnl gives unlimited permission to copy and/or distribute it,
 
26
dnl with or without modifications, as long as this notice is preserved.
 
27
 
 
28
dnl From Bruno Haible.
 
29
 
 
30
AC_PREREQ([2.54])
 
31
 
 
32
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
 
33
dnl the libraries corresponding to explicit and implicit dependencies.
 
34
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
 
35
dnl augments the CPPFLAGS variable.
 
36
dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
 
37
dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
 
38
AC_DEFUN([AC_LIB_LINKFLAGS],
 
39
[
 
40
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
 
41
  AC_REQUIRE([AC_LIB_RPATH])
 
42
  pushdef([Name],[translit([$1],[./-], [___])])
 
43
  pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
 
44
                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
 
45
  AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
 
46
    AC_LIB_LINKFLAGS_BODY([$1], [$2])
 
47
    ac_cv_lib[]Name[]_libs="$LIB[]NAME"
 
48
    ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
 
49
    ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
 
50
    ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
 
51
  ])
 
52
  LIB[]NAME="$ac_cv_lib[]Name[]_libs"
 
53
  LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
 
54
  INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
 
55
  LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
 
56
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
 
57
  AC_SUBST([LIB]NAME)
 
58
  AC_SUBST([LTLIB]NAME)
 
59
  AC_SUBST([LIB]NAME[_PREFIX])
 
60
  dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
 
61
  dnl results of this search when this library appears as a dependency.
 
62
  HAVE_LIB[]NAME=yes
 
63
  popdef([NAME])
 
64
  popdef([Name])
 
65
])
 
66
 
 
67
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
 
68
dnl searches for libname and the libraries corresponding to explicit and
 
69
dnl implicit dependencies, together with the specified include files and
 
70
dnl the ability to compile and link the specified testcode. The missing-message
 
71
dnl defaults to 'no' and may contain additional hints for the user.
 
72
dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
 
73
dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
 
74
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
 
75
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
 
76
dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
 
77
dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
 
78
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
 
79
[
 
80
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
 
81
  AC_REQUIRE([AC_LIB_RPATH])
 
82
  pushdef([Name],[translit([$1],[./-], [___])])
 
83
  pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
 
84
                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
 
85
 
 
86
  dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
 
87
  dnl accordingly.
 
88
  AC_LIB_LINKFLAGS_BODY([$1], [$2])
 
89
 
 
90
  dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
 
91
  dnl because if the user has installed lib[]Name and not disabled its use
 
92
  dnl via --without-lib[]Name-prefix, he wants to use it.
 
93
  ac_save_CPPFLAGS="$CPPFLAGS"
 
94
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
 
95
 
 
96
  AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
 
97
    ac_save_LIBS="$LIBS"
 
98
    dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
 
99
    dnl because these -l options might require -L options that are present in
 
100
    dnl LIBS. -l options benefit only from the -L options listed before it.
 
101
    dnl Otherwise, add it to the front of LIBS, because it may be a static
 
102
    dnl library that depends on another static library that is present in LIBS.
 
103
    dnl Static libraries benefit only from the static libraries listed after
 
104
    dnl it.
 
105
    case " $LIB[]NAME" in
 
106
      *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
 
107
      *)       LIBS="$LIB[]NAME $LIBS" ;;
 
108
    esac
 
109
    AC_TRY_LINK([$3], [$4],
 
110
      [ac_cv_lib[]Name=yes],
 
111
      [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
 
112
    LIBS="$ac_save_LIBS"
 
113
  ])
 
114
  if test "$ac_cv_lib[]Name" = yes; then
 
115
    HAVE_LIB[]NAME=yes
 
116
    AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
 
117
    AC_MSG_CHECKING([how to link with lib[]$1])
 
118
    AC_MSG_RESULT([$LIB[]NAME])
 
119
  else
 
120
    HAVE_LIB[]NAME=no
 
121
    dnl If $LIB[]NAME didn't lead to a usable library, we don't need
 
122
    dnl $INC[]NAME either.
 
123
    CPPFLAGS="$ac_save_CPPFLAGS"
 
124
    LIB[]NAME=
 
125
    LTLIB[]NAME=
 
126
    LIB[]NAME[]_PREFIX=
 
127
  fi
 
128
  AC_SUBST([HAVE_LIB]NAME)
 
129
  AC_SUBST([LIB]NAME)
 
130
  AC_SUBST([LTLIB]NAME)
 
131
  AC_SUBST([LIB]NAME[_PREFIX])
 
132
  popdef([NAME])
 
133
  popdef([Name])
 
134
])
 
135
 
 
136
dnl Determine the platform dependent parameters needed to use rpath:
 
137
dnl   acl_libext,
 
138
dnl   acl_shlibext,
 
139
dnl   acl_hardcode_libdir_flag_spec,
 
140
dnl   acl_hardcode_libdir_separator,
 
141
dnl   acl_hardcode_direct,
 
142
dnl   acl_hardcode_minus_L.
 
143
AC_DEFUN([AC_LIB_RPATH],
 
144
[
 
145
  dnl Tell automake >= 1.10 to complain if config.rpath is missing.
 
146
  m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
 
147
  AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
 
148
  AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
 
149
  AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
 
150
  AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
 
151
  AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
 
152
    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
 
153
    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
 
154
    . ./conftest.sh
 
155
    rm -f ./conftest.sh
 
156
    acl_cv_rpath=done
 
157
  ])
 
158
  wl="$acl_cv_wl"
 
159
  acl_libext="$acl_cv_libext"
 
160
  acl_shlibext="$acl_cv_shlibext"
 
161
  acl_libname_spec="$acl_cv_libname_spec"
 
162
  acl_library_names_spec="$acl_cv_library_names_spec"
 
163
  acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
 
164
  acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
 
165
  acl_hardcode_direct="$acl_cv_hardcode_direct"
 
166
  acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
 
167
  dnl Determine whether the user wants rpath handling at all.
 
168
  AC_ARG_ENABLE([rpath],
 
169
    [  --disable-rpath         do not hardcode runtime library paths],
 
170
    :, enable_rpath=yes)
 
171
])
 
172
 
 
173
dnl AC_LIB_FROMPACKAGE(name, package)
 
174
dnl declares that libname comes from the given package. The configure file
 
175
dnl will then not have a --with-libname-prefix option but a
 
176
dnl --with-package-prefix option. Several libraries can come from the same
 
177
dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
 
178
dnl macro call that searches for libname.
 
179
AC_DEFUN([AC_LIB_FROMPACKAGE],
 
180
[
 
181
  pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
 
182
                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
 
183
  define([acl_frompackage_]NAME, [$2])
 
184
  popdef([NAME])
 
185
  pushdef([PACK],[$2])
 
186
  pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
 
187
                                  [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
 
188
  define([acl_libsinpackage_]PACKUP,
 
189
    m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1])
 
190
  popdef([PACKUP])
 
191
  popdef([PACK])
 
192
])
 
193
 
 
194
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
 
195
dnl the libraries corresponding to explicit and implicit dependencies.
 
196
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
 
197
dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
 
198
dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
 
199
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
 
200
[
 
201
  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
 
202
  pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
 
203
                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
 
204
  pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
 
205
  pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
 
206
                                  [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
 
207
  pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
 
208
  dnl Autoconf >= 2.61 supports dots in --with options.
 
209
  pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)])
 
210
  dnl By default, look in $includedir and $libdir.
 
211
  use_additional=yes
 
212
  AC_LIB_WITH_FINAL_PREFIX([
 
213
    eval additional_includedir=\"$includedir\"
 
214
    eval additional_libdir=\"$libdir\"
 
215
  ])
 
216
  AC_ARG_WITH(P_A_C_K[-prefix],
 
217
[[  --with-]]P_A_C_K[[-prefix[=DIR]  search for ]PACKLIBS[ in DIR/include and DIR/lib
 
218
  --without-]]P_A_C_K[[-prefix     don't search for ]PACKLIBS[ in includedir and libdir]],
 
219
[
 
220
    if test "X$withval" = "Xno"; then
 
221
      use_additional=no
 
222
    else
 
223
      if test "X$withval" = "X"; then
 
224
        AC_LIB_WITH_FINAL_PREFIX([
 
225
          eval additional_includedir=\"$includedir\"
 
226
          eval additional_libdir=\"$libdir\"
 
227
        ])
 
228
      else
 
229
        additional_includedir="$withval/include"
 
230
        additional_libdir="$withval/$acl_libdirstem"
 
231
        if test "$acl_libdirstem2" != "$acl_libdirstem" \
 
232
           && ! test -d "$withval/$acl_libdirstem"; then
 
233
          additional_libdir="$withval/$acl_libdirstem2"
 
234
        fi
 
235
      fi
 
236
    fi
 
237
])
 
238
  dnl Search the library and its dependencies in $additional_libdir and
 
239
  dnl $LDFLAGS. Using breadth-first-seach.
 
240
  LIB[]NAME=
 
241
  LTLIB[]NAME=
 
242
  INC[]NAME=
 
243
  LIB[]NAME[]_PREFIX=
 
244
  dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
 
245
  dnl computed. So it has to be reset here.
 
246
  HAVE_LIB[]NAME=
 
247
  rpathdirs=
 
248
  ltrpathdirs=
 
249
  names_already_handled=
 
250
  names_next_round='$1 $2'
 
251
  while test -n "$names_next_round"; do
 
252
    names_this_round="$names_next_round"
 
253
    names_next_round=
 
254
    for name in $names_this_round; do
 
255
      already_handled=
 
256
      for n in $names_already_handled; do
 
257
        if test "$n" = "$name"; then
 
258
          already_handled=yes
 
259
          break
 
260
        fi
 
261
      done
 
262
      if test -z "$already_handled"; then
 
263
        names_already_handled="$names_already_handled $name"
 
264
        dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
 
265
        dnl or AC_LIB_HAVE_LINKFLAGS call.
 
266
        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
 
267
        eval value=\"\$HAVE_LIB$uppername\"
 
268
        if test -n "$value"; then
 
269
          if test "$value" = yes; then
 
270
            eval value=\"\$LIB$uppername\"
 
271
            test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
 
272
            eval value=\"\$LTLIB$uppername\"
 
273
            test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
 
274
          else
 
275
            dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
 
276
            dnl that this library doesn't exist. So just drop it.
 
277
            :
 
278
          fi
 
279
        else
 
280
          dnl Search the library lib$name in $additional_libdir and $LDFLAGS
 
281
          dnl and the already constructed $LIBNAME/$LTLIBNAME.
 
282
          found_dir=
 
283
          found_la=
 
284
          found_so=
 
285
          found_a=
 
286
          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
 
287
          if test -n "$acl_shlibext"; then
 
288
            shrext=".$acl_shlibext"             # typically: shrext=.so
 
289
          else
 
290
            shrext=
 
291
          fi
 
292
          if test $use_additional = yes; then
 
293
            dir="$additional_libdir"
 
294
            dnl The same code as in the loop below:
 
295
            dnl First look for a shared library.
 
296
            if test -n "$acl_shlibext"; then
 
297
              if test -f "$dir/$libname$shrext"; then
 
298
                found_dir="$dir"
 
299
                found_so="$dir/$libname$shrext"
 
300
              else
 
301
                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
 
302
                  ver=`(cd "$dir" && \
 
303
                        for f in "$libname$shrext".*; do echo "$f"; done \
 
304
                        | sed -e "s,^$libname$shrext\\\\.,," \
 
305
                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
 
306
                        | sed 1q ) 2>/dev/null`
 
307
                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
 
308
                    found_dir="$dir"
 
309
                    found_so="$dir/$libname$shrext.$ver"
 
310
                  fi
 
311
                else
 
312
                  eval library_names=\"$acl_library_names_spec\"
 
313
                  for f in $library_names; do
 
314
                    if test -f "$dir/$f"; then
 
315
                      found_dir="$dir"
 
316
                      found_so="$dir/$f"
 
317
                      break
 
318
                    fi
 
319
                  done
 
320
                fi
 
321
              fi
 
322
            fi
 
323
            dnl Then look for a static library.
 
324
            if test "X$found_dir" = "X"; then
 
325
              if test -f "$dir/$libname.$acl_libext"; then
 
326
                found_dir="$dir"
 
327
                found_a="$dir/$libname.$acl_libext"
 
328
              fi
 
329
            fi
 
330
            if test "X$found_dir" != "X"; then
 
331
              if test -f "$dir/$libname.la"; then
 
332
                found_la="$dir/$libname.la"
 
333
              fi
 
334
            fi
 
335
          fi
 
336
          if test "X$found_dir" = "X"; then
 
337
            for x in $LDFLAGS $LTLIB[]NAME; do
 
338
              AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
339
              case "$x" in
 
340
                -L*)
 
341
                  dir=`echo "X$x" | sed -e 's/^X-L//'`
 
342
                  dnl First look for a shared library.
 
343
                  if test -n "$acl_shlibext"; then
 
344
                    if test -f "$dir/$libname$shrext"; then
 
345
                      found_dir="$dir"
 
346
                      found_so="$dir/$libname$shrext"
 
347
                    else
 
348
                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
 
349
                        ver=`(cd "$dir" && \
 
350
                              for f in "$libname$shrext".*; do echo "$f"; done \
 
351
                              | sed -e "s,^$libname$shrext\\\\.,," \
 
352
                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
 
353
                              | sed 1q ) 2>/dev/null`
 
354
                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
 
355
                          found_dir="$dir"
 
356
                          found_so="$dir/$libname$shrext.$ver"
 
357
                        fi
 
358
                      else
 
359
                        eval library_names=\"$acl_library_names_spec\"
 
360
                        for f in $library_names; do
 
361
                          if test -f "$dir/$f"; then
 
362
                            found_dir="$dir"
 
363
                            found_so="$dir/$f"
 
364
                            break
 
365
                          fi
 
366
                        done
 
367
                      fi
 
368
                    fi
 
369
                  fi
 
370
                  dnl Then look for a static library.
 
371
                  if test "X$found_dir" = "X"; then
 
372
                    if test -f "$dir/$libname.$acl_libext"; then
 
373
                      found_dir="$dir"
 
374
                      found_a="$dir/$libname.$acl_libext"
 
375
                    fi
 
376
                  fi
 
377
                  if test "X$found_dir" != "X"; then
 
378
                    if test -f "$dir/$libname.la"; then
 
379
                      found_la="$dir/$libname.la"
 
380
                    fi
 
381
                  fi
 
382
                  ;;
 
383
              esac
 
384
              if test "X$found_dir" != "X"; then
 
385
                break
 
386
              fi
 
387
            done
 
388
          fi
 
389
          if test "X$found_dir" != "X"; then
 
390
            dnl Found the library.
 
391
            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
 
392
            if test "X$found_so" != "X"; then
 
393
              dnl Linking with a shared library. We attempt to hardcode its
 
394
              dnl directory into the executable's runpath, unless it's the
 
395
              dnl standard /usr/lib.
 
396
              if test "$enable_rpath" = no \
 
397
                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
 
398
                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
 
399
                dnl No hardcoding is needed.
 
400
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
 
401
              else
 
402
                dnl Use an explicit option to hardcode DIR into the resulting
 
403
                dnl binary.
 
404
                dnl Potentially add DIR to ltrpathdirs.
 
405
                dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
 
406
                haveit=
 
407
                for x in $ltrpathdirs; do
 
408
                  if test "X$x" = "X$found_dir"; then
 
409
                    haveit=yes
 
410
                    break
 
411
                  fi
 
412
                done
 
413
                if test -z "$haveit"; then
 
414
                  ltrpathdirs="$ltrpathdirs $found_dir"
 
415
                fi
 
416
                dnl The hardcoding into $LIBNAME is system dependent.
 
417
                if test "$acl_hardcode_direct" = yes; then
 
418
                  dnl Using DIR/libNAME.so during linking hardcodes DIR into the
 
419
                  dnl resulting binary.
 
420
                  LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
 
421
                else
 
422
                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
 
423
                    dnl Use an explicit option to hardcode DIR into the resulting
 
424
                    dnl binary.
 
425
                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
 
426
                    dnl Potentially add DIR to rpathdirs.
 
427
                    dnl The rpathdirs will be appended to $LIBNAME at the end.
 
428
                    haveit=
 
429
                    for x in $rpathdirs; do
 
430
                      if test "X$x" = "X$found_dir"; then
 
431
                        haveit=yes
 
432
                        break
 
433
                      fi
 
434
                    done
 
435
                    if test -z "$haveit"; then
 
436
                      rpathdirs="$rpathdirs $found_dir"
 
437
                    fi
 
438
                  else
 
439
                    dnl Rely on "-L$found_dir".
 
440
                    dnl But don't add it if it's already contained in the LDFLAGS
 
441
                    dnl or the already constructed $LIBNAME
 
442
                    haveit=
 
443
                    for x in $LDFLAGS $LIB[]NAME; do
 
444
                      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
445
                      if test "X$x" = "X-L$found_dir"; then
 
446
                        haveit=yes
 
447
                        break
 
448
                      fi
 
449
                    done
 
450
                    if test -z "$haveit"; then
 
451
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
 
452
                    fi
 
453
                    if test "$acl_hardcode_minus_L" != no; then
 
454
                      dnl FIXME: Not sure whether we should use
 
455
                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
 
456
                      dnl here.
 
457
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
 
458
                    else
 
459
                      dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
 
460
                      dnl here, because this doesn't fit in flags passed to the
 
461
                      dnl compiler. So give up. No hardcoding. This affects only
 
462
                      dnl very old systems.
 
463
                      dnl FIXME: Not sure whether we should use
 
464
                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
 
465
                      dnl here.
 
466
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
 
467
                    fi
 
468
                  fi
 
469
                fi
 
470
              fi
 
471
            else
 
472
              if test "X$found_a" != "X"; then
 
473
                dnl Linking with a static library.
 
474
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
 
475
              else
 
476
                dnl We shouldn't come here, but anyway it's good to have a
 
477
                dnl fallback.
 
478
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
 
479
              fi
 
480
            fi
 
481
            dnl Assume the include files are nearby.
 
482
            additional_includedir=
 
483
            case "$found_dir" in
 
484
              */$acl_libdirstem | */$acl_libdirstem/)
 
485
                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
 
486
                if test "$name" = '$1'; then
 
487
                  LIB[]NAME[]_PREFIX="$basedir"
 
488
                fi
 
489
                additional_includedir="$basedir/include"
 
490
                ;;
 
491
              */$acl_libdirstem2 | */$acl_libdirstem2/)
 
492
                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
 
493
                if test "$name" = '$1'; then
 
494
                  LIB[]NAME[]_PREFIX="$basedir"
 
495
                fi
 
496
                additional_includedir="$basedir/include"
 
497
                ;;
 
498
            esac
 
499
            if test "X$additional_includedir" != "X"; then
 
500
              dnl Potentially add $additional_includedir to $INCNAME.
 
501
              dnl But don't add it
 
502
              dnl   1. if it's the standard /usr/include,
 
503
              dnl   2. if it's /usr/local/include and we are using GCC on Linux,
 
504
              dnl   3. if it's already present in $CPPFLAGS or the already
 
505
              dnl      constructed $INCNAME,
 
506
              dnl   4. if it doesn't exist as a directory.
 
507
              if test "X$additional_includedir" != "X/usr/include"; then
 
508
                haveit=
 
509
                if test "X$additional_includedir" = "X/usr/local/include"; then
 
510
                  if test -n "$GCC"; then
 
511
                    case $host_os in
 
512
                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
 
513
                    esac
 
514
                  fi
 
515
                fi
 
516
                if test -z "$haveit"; then
 
517
                  for x in $CPPFLAGS $INC[]NAME; do
 
518
                    AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
519
                    if test "X$x" = "X-I$additional_includedir"; then
 
520
                      haveit=yes
 
521
                      break
 
522
                    fi
 
523
                  done
 
524
                  if test -z "$haveit"; then
 
525
                    if test -d "$additional_includedir"; then
 
526
                      dnl Really add $additional_includedir to $INCNAME.
 
527
                      INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
 
528
                    fi
 
529
                  fi
 
530
                fi
 
531
              fi
 
532
            fi
 
533
            dnl Look for dependencies.
 
534
            if test -n "$found_la"; then
 
535
              dnl Read the .la file. It defines the variables
 
536
              dnl dlname, library_names, old_library, dependency_libs, current,
 
537
              dnl age, revision, installed, dlopen, dlpreopen, libdir.
 
538
              save_libdir="$libdir"
 
539
              case "$found_la" in
 
540
                */* | *\\*) . "$found_la" ;;
 
541
                *) . "./$found_la" ;;
 
542
              esac
 
543
              libdir="$save_libdir"
 
544
              dnl We use only dependency_libs.
 
545
              for dep in $dependency_libs; do
 
546
                case "$dep" in
 
547
                  -L*)
 
548
                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
 
549
                    dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
 
550
                    dnl But don't add it
 
551
                    dnl   1. if it's the standard /usr/lib,
 
552
                    dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
 
553
                    dnl   3. if it's already present in $LDFLAGS or the already
 
554
                    dnl      constructed $LIBNAME,
 
555
                    dnl   4. if it doesn't exist as a directory.
 
556
                    if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
 
557
                       && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
 
558
                      haveit=
 
559
                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
 
560
                         || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
 
561
                        if test -n "$GCC"; then
 
562
                          case $host_os in
 
563
                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
 
564
                          esac
 
565
                        fi
 
566
                      fi
 
567
                      if test -z "$haveit"; then
 
568
                        haveit=
 
569
                        for x in $LDFLAGS $LIB[]NAME; do
 
570
                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
571
                          if test "X$x" = "X-L$additional_libdir"; then
 
572
                            haveit=yes
 
573
                            break
 
574
                          fi
 
575
                        done
 
576
                        if test -z "$haveit"; then
 
577
                          if test -d "$additional_libdir"; then
 
578
                            dnl Really add $additional_libdir to $LIBNAME.
 
579
                            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
 
580
                          fi
 
581
                        fi
 
582
                        haveit=
 
583
                        for x in $LDFLAGS $LTLIB[]NAME; do
 
584
                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
585
                          if test "X$x" = "X-L$additional_libdir"; then
 
586
                            haveit=yes
 
587
                            break
 
588
                          fi
 
589
                        done
 
590
                        if test -z "$haveit"; then
 
591
                          if test -d "$additional_libdir"; then
 
592
                            dnl Really add $additional_libdir to $LTLIBNAME.
 
593
                            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
 
594
                          fi
 
595
                        fi
 
596
                      fi
 
597
                    fi
 
598
                    ;;
 
599
                  -R*)
 
600
                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
 
601
                    if test "$enable_rpath" != no; then
 
602
                      dnl Potentially add DIR to rpathdirs.
 
603
                      dnl The rpathdirs will be appended to $LIBNAME at the end.
 
604
                      haveit=
 
605
                      for x in $rpathdirs; do
 
606
                        if test "X$x" = "X$dir"; then
 
607
                          haveit=yes
 
608
                          break
 
609
                        fi
 
610
                      done
 
611
                      if test -z "$haveit"; then
 
612
                        rpathdirs="$rpathdirs $dir"
 
613
                      fi
 
614
                      dnl Potentially add DIR to ltrpathdirs.
 
615
                      dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
 
616
                      haveit=
 
617
                      for x in $ltrpathdirs; do
 
618
                        if test "X$x" = "X$dir"; then
 
619
                          haveit=yes
 
620
                          break
 
621
                        fi
 
622
                      done
 
623
                      if test -z "$haveit"; then
 
624
                        ltrpathdirs="$ltrpathdirs $dir"
 
625
                      fi
 
626
                    fi
 
627
                    ;;
 
628
                  -l*)
 
629
                    dnl Handle this in the next round.
 
630
                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
 
631
                    ;;
 
632
                  *.la)
 
633
                    dnl Handle this in the next round. Throw away the .la's
 
634
                    dnl directory; it is already contained in a preceding -L
 
635
                    dnl option.
 
636
                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
 
637
                    ;;
 
638
                  *)
 
639
                    dnl Most likely an immediate library name.
 
640
                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
 
641
                    LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
 
642
                    ;;
 
643
                esac
 
644
              done
 
645
            fi
 
646
          else
 
647
            dnl Didn't find the library; assume it is in the system directories
 
648
            dnl known to the linker and runtime loader. (All the system
 
649
            dnl directories known to the linker should also be known to the
 
650
            dnl runtime loader, otherwise the system is severely misconfigured.)
 
651
            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
 
652
            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
 
653
          fi
 
654
        fi
 
655
      fi
 
656
    done
 
657
  done
 
658
  if test "X$rpathdirs" != "X"; then
 
659
    if test -n "$acl_hardcode_libdir_separator"; then
 
660
      dnl Weird platform: only the last -rpath option counts, the user must
 
661
      dnl pass all path elements in one option. We can arrange that for a
 
662
      dnl single library, but not when more than one $LIBNAMEs are used.
 
663
      alldirs=
 
664
      for found_dir in $rpathdirs; do
 
665
        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
 
666
      done
 
667
      dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
 
668
      acl_save_libdir="$libdir"
 
669
      libdir="$alldirs"
 
670
      eval flag=\"$acl_hardcode_libdir_flag_spec\"
 
671
      libdir="$acl_save_libdir"
 
672
      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
 
673
    else
 
674
      dnl The -rpath options are cumulative.
 
675
      for found_dir in $rpathdirs; do
 
676
        acl_save_libdir="$libdir"
 
677
        libdir="$found_dir"
 
678
        eval flag=\"$acl_hardcode_libdir_flag_spec\"
 
679
        libdir="$acl_save_libdir"
 
680
        LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
 
681
      done
 
682
    fi
 
683
  fi
 
684
  if test "X$ltrpathdirs" != "X"; then
 
685
    dnl When using libtool, the option that works for both libraries and
 
686
    dnl executables is -R. The -R options are cumulative.
 
687
    for found_dir in $ltrpathdirs; do
 
688
      LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
 
689
    done
 
690
  fi
 
691
  popdef([P_A_C_K])
 
692
  popdef([PACKLIBS])
 
693
  popdef([PACKUP])
 
694
  popdef([PACK])
 
695
  popdef([NAME])
 
696
])
 
697
 
 
698
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
 
699
dnl unless already present in VAR.
 
700
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
 
701
dnl contains two or three consecutive elements that belong together.
 
702
AC_DEFUN([AC_LIB_APPENDTOVAR],
 
703
[
 
704
  for element in [$2]; do
 
705
    haveit=
 
706
    for x in $[$1]; do
 
707
      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
708
      if test "X$x" = "X$element"; then
 
709
        haveit=yes
 
710
        break
 
711
      fi
 
712
    done
 
713
    if test -z "$haveit"; then
 
714
      [$1]="${[$1]}${[$1]:+ }$element"
 
715
    fi
 
716
  done
 
717
])
 
718
 
 
719
dnl For those cases where a variable contains several -L and -l options
 
720
dnl referring to unknown libraries and directories, this macro determines the
 
721
dnl necessary additional linker options for the runtime path.
 
722
dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
 
723
dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
 
724
dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
 
725
dnl otherwise linking without libtool is assumed.
 
726
AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
 
727
[
 
728
  AC_REQUIRE([AC_LIB_RPATH])
 
729
  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
 
730
  $1=
 
731
  if test "$enable_rpath" != no; then
 
732
    if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
 
733
      dnl Use an explicit option to hardcode directories into the resulting
 
734
      dnl binary.
 
735
      rpathdirs=
 
736
      next=
 
737
      for opt in $2; do
 
738
        if test -n "$next"; then
 
739
          dir="$next"
 
740
          dnl No need to hardcode the standard /usr/lib.
 
741
          if test "X$dir" != "X/usr/$acl_libdirstem" \
 
742
             && test "X$dir" != "X/usr/$acl_libdirstem2"; then
 
743
            rpathdirs="$rpathdirs $dir"
 
744
          fi
 
745
          next=
 
746
        else
 
747
          case $opt in
 
748
            -L) next=yes ;;
 
749
            -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
 
750
                 dnl No need to hardcode the standard /usr/lib.
 
751
                 if test "X$dir" != "X/usr/$acl_libdirstem" \
 
752
                    && test "X$dir" != "X/usr/$acl_libdirstem2"; then
 
753
                   rpathdirs="$rpathdirs $dir"
 
754
                 fi
 
755
                 next= ;;
 
756
            *) next= ;;
 
757
          esac
 
758
        fi
 
759
      done
 
760
      if test "X$rpathdirs" != "X"; then
 
761
        if test -n ""$3""; then
 
762
          dnl libtool is used for linking. Use -R options.
 
763
          for dir in $rpathdirs; do
 
764
            $1="${$1}${$1:+ }-R$dir"
 
765
          done
 
766
        else
 
767
          dnl The linker is used for linking directly.
 
768
          if test -n "$acl_hardcode_libdir_separator"; then
 
769
            dnl Weird platform: only the last -rpath option counts, the user
 
770
            dnl must pass all path elements in one option.
 
771
            alldirs=
 
772
            for dir in $rpathdirs; do
 
773
              alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
 
774
            done
 
775
            acl_save_libdir="$libdir"
 
776
            libdir="$alldirs"
 
777
            eval flag=\"$acl_hardcode_libdir_flag_spec\"
 
778
            libdir="$acl_save_libdir"
 
779
            $1="$flag"
 
780
          else
 
781
            dnl The -rpath options are cumulative.
 
782
            for dir in $rpathdirs; do
 
783
              acl_save_libdir="$libdir"
 
784
              libdir="$dir"
 
785
              eval flag=\"$acl_hardcode_libdir_flag_spec\"
 
786
              libdir="$acl_save_libdir"
 
787
              $1="${$1}${$1:+ }$flag"
 
788
            done
 
789
          fi
 
790
        fi
 
791
      fi
 
792
    fi
 
793
  fi
 
794
  AC_SUBST([$1])
 
795
])
 
796
 
 
797
# lib-prefix.m4 serial 7 (gettext-0.18)
 
798
dnl Copyright (C) 2001-2005, 2008-2010 Free Software Foundation, Inc.
 
799
dnl This file is free software; the Free Software Foundation
 
800
dnl gives unlimited permission to copy and/or distribute it,
 
801
dnl with or without modifications, as long as this notice is preserved.
 
802
 
 
803
dnl From Bruno Haible.
 
804
 
 
805
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
 
806
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
 
807
dnl require excessive bracketing.
 
808
ifdef([AC_HELP_STRING],
 
809
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
 
810
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
 
811
 
 
812
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
 
813
dnl to access previously installed libraries. The basic assumption is that
 
814
dnl a user will want packages to use other packages he previously installed
 
815
dnl with the same --prefix option.
 
816
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
 
817
dnl libraries, but is otherwise very convenient.
 
818
AC_DEFUN([AC_LIB_PREFIX],
 
819
[
 
820
  AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
 
821
  AC_REQUIRE([AC_PROG_CC])
 
822
  AC_REQUIRE([AC_CANONICAL_HOST])
 
823
  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
 
824
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
 
825
  dnl By default, look in $includedir and $libdir.
 
826
  use_additional=yes
 
827
  AC_LIB_WITH_FINAL_PREFIX([
 
828
    eval additional_includedir=\"$includedir\"
 
829
    eval additional_libdir=\"$libdir\"
 
830
  ])
 
831
  AC_LIB_ARG_WITH([lib-prefix],
 
832
[  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
 
833
  --without-lib-prefix    don't search for libraries in includedir and libdir],
 
834
[
 
835
    if test "X$withval" = "Xno"; then
 
836
      use_additional=no
 
837
    else
 
838
      if test "X$withval" = "X"; then
 
839
        AC_LIB_WITH_FINAL_PREFIX([
 
840
          eval additional_includedir=\"$includedir\"
 
841
          eval additional_libdir=\"$libdir\"
 
842
        ])
 
843
      else
 
844
        additional_includedir="$withval/include"
 
845
        additional_libdir="$withval/$acl_libdirstem"
 
846
      fi
 
847
    fi
 
848
])
 
849
  if test $use_additional = yes; then
 
850
    dnl Potentially add $additional_includedir to $CPPFLAGS.
 
851
    dnl But don't add it
 
852
    dnl   1. if it's the standard /usr/include,
 
853
    dnl   2. if it's already present in $CPPFLAGS,
 
854
    dnl   3. if it's /usr/local/include and we are using GCC on Linux,
 
855
    dnl   4. if it doesn't exist as a directory.
 
856
    if test "X$additional_includedir" != "X/usr/include"; then
 
857
      haveit=
 
858
      for x in $CPPFLAGS; do
 
859
        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
860
        if test "X$x" = "X-I$additional_includedir"; then
 
861
          haveit=yes
 
862
          break
 
863
        fi
 
864
      done
 
865
      if test -z "$haveit"; then
 
866
        if test "X$additional_includedir" = "X/usr/local/include"; then
 
867
          if test -n "$GCC"; then
 
868
            case $host_os in
 
869
              linux* | gnu* | k*bsd*-gnu) haveit=yes;;
 
870
            esac
 
871
          fi
 
872
        fi
 
873
        if test -z "$haveit"; then
 
874
          if test -d "$additional_includedir"; then
 
875
            dnl Really add $additional_includedir to $CPPFLAGS.
 
876
            CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
 
877
          fi
 
878
        fi
 
879
      fi
 
880
    fi
 
881
    dnl Potentially add $additional_libdir to $LDFLAGS.
 
882
    dnl But don't add it
 
883
    dnl   1. if it's the standard /usr/lib,
 
884
    dnl   2. if it's already present in $LDFLAGS,
 
885
    dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
 
886
    dnl   4. if it doesn't exist as a directory.
 
887
    if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
 
888
      haveit=
 
889
      for x in $LDFLAGS; do
 
890
        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
891
        if test "X$x" = "X-L$additional_libdir"; then
 
892
          haveit=yes
 
893
          break
 
894
        fi
 
895
      done
 
896
      if test -z "$haveit"; then
 
897
        if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
 
898
          if test -n "$GCC"; then
 
899
            case $host_os in
 
900
              linux*) haveit=yes;;
 
901
            esac
 
902
          fi
 
903
        fi
 
904
        if test -z "$haveit"; then
 
905
          if test -d "$additional_libdir"; then
 
906
            dnl Really add $additional_libdir to $LDFLAGS.
 
907
            LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
 
908
          fi
 
909
        fi
 
910
      fi
 
911
    fi
 
912
  fi
 
913
])
 
914
 
 
915
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
 
916
dnl acl_final_exec_prefix, containing the values to which $prefix and
 
917
dnl $exec_prefix will expand at the end of the configure script.
 
918
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
 
919
[
 
920
  dnl Unfortunately, prefix and exec_prefix get only finally determined
 
921
  dnl at the end of configure.
 
922
  if test "X$prefix" = "XNONE"; then
 
923
    acl_final_prefix="$ac_default_prefix"
 
924
  else
 
925
    acl_final_prefix="$prefix"
 
926
  fi
 
927
  if test "X$exec_prefix" = "XNONE"; then
 
928
    acl_final_exec_prefix='${prefix}'
 
929
  else
 
930
    acl_final_exec_prefix="$exec_prefix"
 
931
  fi
 
932
  acl_save_prefix="$prefix"
 
933
  prefix="$acl_final_prefix"
 
934
  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
 
935
  prefix="$acl_save_prefix"
 
936
])
 
937
 
 
938
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
 
939
dnl variables prefix and exec_prefix bound to the values they will have
 
940
dnl at the end of the configure script.
 
941
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
 
942
[
 
943
  acl_save_prefix="$prefix"
 
944
  prefix="$acl_final_prefix"
 
945
  acl_save_exec_prefix="$exec_prefix"
 
946
  exec_prefix="$acl_final_exec_prefix"
 
947
  $1
 
948
  exec_prefix="$acl_save_exec_prefix"
 
949
  prefix="$acl_save_prefix"
 
950
])
 
951
 
 
952
dnl AC_LIB_PREPARE_MULTILIB creates
 
953
dnl - a variable acl_libdirstem, containing the basename of the libdir, either
 
954
dnl   "lib" or "lib64" or "lib/64",
 
955
dnl - a variable acl_libdirstem2, as a secondary possible value for
 
956
dnl   acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
 
957
dnl   "lib/amd64".
 
958
AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
 
959
[
 
960
  dnl There is no formal standard regarding lib and lib64.
 
961
  dnl On glibc systems, the current practice is that on a system supporting
 
962
  dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
 
963
  dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
 
964
  dnl the compiler's default mode by looking at the compiler's library search
 
965
  dnl path. If at least one of its elements ends in /lib64 or points to a
 
966
  dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
 
967
  dnl Otherwise we use the default, namely "lib".
 
968
  dnl On Solaris systems, the current practice is that on a system supporting
 
969
  dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
 
970
  dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
 
971
  dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
 
972
  AC_REQUIRE([AC_CANONICAL_HOST])
 
973
  acl_libdirstem=lib
 
974
  acl_libdirstem2=
 
975
  case "$host_os" in
 
976
    solaris*)
 
977
      dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
 
978
      dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
 
979
      dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
 
980
      dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
 
981
      dnl symlink is missing, so we set acl_libdirstem2 too.
 
982
      AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
 
983
        [AC_EGREP_CPP([sixtyfour bits], [
 
984
#ifdef _LP64
 
985
sixtyfour bits
 
986
#endif
 
987
           ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
 
988
        ])
 
989
      if test $gl_cv_solaris_64bit = yes; then
 
990
        acl_libdirstem=lib/64
 
991
        case "$host_cpu" in
 
992
          sparc*)        acl_libdirstem2=lib/sparcv9 ;;
 
993
          i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
 
994
        esac
 
995
      fi
 
996
      ;;
 
997
    *)
 
998
      searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
 
999
      if test -n "$searchpath"; then
 
1000
        acl_save_IFS="${IFS=    }"; IFS=":"
 
1001
        for searchdir in $searchpath; do
 
1002
          if test -d "$searchdir"; then
 
1003
            case "$searchdir" in
 
1004
              */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
 
1005
              */../ | */.. )
 
1006
                # Better ignore directories of this form. They are misleading.
 
1007
                ;;
 
1008
              *) searchdir=`cd "$searchdir" && pwd`
 
1009
                 case "$searchdir" in
 
1010
                   */lib64 ) acl_libdirstem=lib64 ;;
 
1011
                 esac ;;
 
1012
            esac
 
1013
          fi
 
1014
        done
 
1015
        IFS="$acl_save_IFS"
 
1016
      fi
 
1017
      ;;
 
1018
  esac
 
1019
  test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
 
1020
])
 
1021
 
 
1022
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
 
1023
# serial 1 (pkg-config-0.24)
 
1024
 
1025
# Copyright Ā© 2004 Scott James Remnant <scott@netsplit.com>.
 
1026
#
 
1027
# This program is free software; you can redistribute it and/or modify
 
1028
# it under the terms of the GNU General Public License as published by
 
1029
# the Free Software Foundation; either version 2 of the License, or
 
1030
# (at your option) any later version.
 
1031
#
 
1032
# This program is distributed in the hope that it will be useful, but
 
1033
# WITHOUT ANY WARRANTY; without even the implied warranty of
 
1034
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
1035
# General Public License for more details.
 
1036
#
 
1037
# You should have received a copy of the GNU General Public License
 
1038
# along with this program; if not, write to the Free Software
 
1039
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
1040
#
 
1041
# As a special exception to the GNU General Public License, if you
 
1042
# distribute this file as part of a program that contains a
 
1043
# configuration script generated by Autoconf, you may include it under
 
1044
# the same distribution terms that you use for the rest of that program.
 
1045
 
 
1046
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
 
1047
# ----------------------------------
 
1048
AC_DEFUN([PKG_PROG_PKG_CONFIG],
 
1049
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
 
1050
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
 
1051
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
 
1052
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
 
1053
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
 
1054
 
 
1055
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
 
1056
        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
 
1057
fi
 
1058
if test -n "$PKG_CONFIG"; then
 
1059
        _pkg_min_version=m4_default([$1], [0.9.0])
 
1060
        AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
 
1061
        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
 
1062
                AC_MSG_RESULT([yes])
 
1063
        else
 
1064
                AC_MSG_RESULT([no])
 
1065
                PKG_CONFIG=""
 
1066
        fi
 
1067
fi[]dnl
 
1068
])# PKG_PROG_PKG_CONFIG
 
1069
 
 
1070
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 
1071
#
 
1072
# Check to see whether a particular set of modules exists.  Similar
 
1073
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
 
1074
#
 
1075
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 
1076
# only at the first occurence in configure.ac, so if the first place
 
1077
# it's called might be skipped (such as if it is within an "if", you
 
1078
# have to call PKG_CHECK_EXISTS manually
 
1079
# --------------------------------------------------------------
 
1080
AC_DEFUN([PKG_CHECK_EXISTS],
 
1081
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
1082
if test -n "$PKG_CONFIG" && \
 
1083
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
 
1084
  m4_default([$2], [:])
 
1085
m4_ifvaln([$3], [else
 
1086
  $3])dnl
 
1087
fi])
 
1088
 
 
1089
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
 
1090
# ---------------------------------------------
 
1091
m4_define([_PKG_CONFIG],
 
1092
[if test -n "$$1"; then
 
1093
    pkg_cv_[]$1="$$1"
 
1094
 elif test -n "$PKG_CONFIG"; then
 
1095
    PKG_CHECK_EXISTS([$3],
 
1096
                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
 
1097
                     [pkg_failed=yes])
 
1098
 else
 
1099
    pkg_failed=untried
 
1100
fi[]dnl
 
1101
])# _PKG_CONFIG
 
1102
 
 
1103
# _PKG_SHORT_ERRORS_SUPPORTED
 
1104
# -----------------------------
 
1105
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
 
1106
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 
1107
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
 
1108
        _pkg_short_errors_supported=yes
 
1109
else
 
1110
        _pkg_short_errors_supported=no
 
1111
fi[]dnl
 
1112
])# _PKG_SHORT_ERRORS_SUPPORTED
 
1113
 
 
1114
 
 
1115
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
 
1116
# [ACTION-IF-NOT-FOUND])
 
1117
#
 
1118
#
 
1119
# Note that if there is a possibility the first call to
 
1120
# PKG_CHECK_MODULES might not happen, you should be sure to include an
 
1121
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
 
1122
#
 
1123
#
 
1124
# --------------------------------------------------------------
 
1125
AC_DEFUN([PKG_CHECK_MODULES],
 
1126
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
1127
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
 
1128
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
 
1129
 
 
1130
pkg_failed=no
 
1131
AC_MSG_CHECKING([for $1])
 
1132
 
 
1133
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
 
1134
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
 
1135
 
 
1136
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
 
1137
and $1[]_LIBS to avoid the need to call pkg-config.
 
1138
See the pkg-config man page for more details.])
 
1139
 
 
1140
if test $pkg_failed = yes; then
 
1141
        AC_MSG_RESULT([no])
 
1142
        _PKG_SHORT_ERRORS_SUPPORTED
 
1143
        if test $_pkg_short_errors_supported = yes; then
 
1144
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
 
1145
        else 
 
1146
                $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
 
1147
        fi
 
1148
        # Put the nasty error message in config.log where it belongs
 
1149
        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
 
1150
 
 
1151
        m4_default([$4], [AC_MSG_ERROR(
 
1152
[Package requirements ($2) were not met:
 
1153
 
 
1154
$$1_PKG_ERRORS
 
1155
 
 
1156
Consider adjusting the PKG_CONFIG_PATH environment variable if you
 
1157
installed software in a non-standard prefix.
 
1158
 
 
1159
_PKG_TEXT])[]dnl
 
1160
        ])
 
1161
elif test $pkg_failed = untried; then
 
1162
        AC_MSG_RESULT([no])
 
1163
        m4_default([$4], [AC_MSG_FAILURE(
 
1164
[The pkg-config script could not be found or is too old.  Make sure it
 
1165
is in your PATH or set the PKG_CONFIG environment variable to the full
 
1166
path to pkg-config.
 
1167
 
 
1168
_PKG_TEXT
 
1169
 
 
1170
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])dnl
 
1171
        ])
 
1172
else
 
1173
        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
 
1174
        $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
 
1175
        AC_MSG_RESULT([yes])
 
1176
        $3
 
1177
fi[]dnl
 
1178
])# PKG_CHECK_MODULES
 
1179
 
 
1180
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 
1181
#
 
1182
# This file is free software; the Free Software Foundation
 
1183
# gives unlimited permission to copy and/or distribute it,
 
1184
# with or without modifications, as long as this notice is preserved.
 
1185
 
 
1186
# AM_AUTOMAKE_VERSION(VERSION)
 
1187
# ----------------------------
 
1188
# Automake X.Y traces this macro to ensure aclocal.m4 has been
 
1189
# generated from the m4 files accompanying Automake X.Y.
 
1190
# (This private macro should not be called outside this file.)
 
1191
AC_DEFUN([AM_AUTOMAKE_VERSION],
 
1192
[am__api_version='1.11'
 
1193
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 
1194
dnl require some minimum version.  Point them to the right macro.
 
1195
m4_if([$1], [1.11.1], [],
 
1196
      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 
1197
])
 
1198
 
 
1199
# _AM_AUTOCONF_VERSION(VERSION)
 
1200
# -----------------------------
 
1201
# aclocal traces this macro to find the Autoconf version.
 
1202
# This is a private macro too.  Using m4_define simplifies
 
1203
# the logic in aclocal, which can simply ignore this definition.
 
1204
m4_define([_AM_AUTOCONF_VERSION], [])
 
1205
 
 
1206
# AM_SET_CURRENT_AUTOMAKE_VERSION
 
1207
# -------------------------------
 
1208
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 
1209
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 
1210
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
 
1211
[AM_AUTOMAKE_VERSION([1.11.1])dnl
 
1212
m4_ifndef([AC_AUTOCONF_VERSION],
 
1213
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 
1214
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
1215
 
 
1216
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
1217
 
 
1218
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
1219
#
 
1220
# This file is free software; the Free Software Foundation
 
1221
# gives unlimited permission to copy and/or distribute it,
 
1222
# with or without modifications, as long as this notice is preserved.
 
1223
 
 
1224
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
 
1225
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
 
1226
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
 
1227
#
 
1228
# Of course, Automake must honor this variable whenever it calls a
 
1229
# tool from the auxiliary directory.  The problem is that $srcdir (and
 
1230
# therefore $ac_aux_dir as well) can be either absolute or relative,
 
1231
# depending on how configure is run.  This is pretty annoying, since
 
1232
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
 
1233
# source directory, any form will work fine, but in subdirectories a
 
1234
# relative path needs to be adjusted first.
 
1235
#
 
1236
# $ac_aux_dir/missing
 
1237
#    fails when called from a subdirectory if $ac_aux_dir is relative
 
1238
# $top_srcdir/$ac_aux_dir/missing
 
1239
#    fails if $ac_aux_dir is absolute,
 
1240
#    fails when called from a subdirectory in a VPATH build with
 
1241
#          a relative $ac_aux_dir
 
1242
#
 
1243
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
 
1244
# are both prefixed by $srcdir.  In an in-source build this is usually
 
1245
# harmless because $srcdir is `.', but things will broke when you
 
1246
# start a VPATH build or use an absolute $srcdir.
 
1247
#
 
1248
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
 
1249
# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
 
1250
#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
 
1251
# and then we would define $MISSING as
 
1252
#   MISSING="\${SHELL} $am_aux_dir/missing"
 
1253
# This will work as long as MISSING is not called from configure, because
 
1254
# unfortunately $(top_srcdir) has no meaning in configure.
 
1255
# However there are other variables, like CC, which are often used in
 
1256
# configure, and could therefore not use this "fixed" $ac_aux_dir.
 
1257
#
 
1258
# Another solution, used here, is to always expand $ac_aux_dir to an
 
1259
# absolute PATH.  The drawback is that using absolute paths prevent a
 
1260
# configured tree to be moved without reconfiguration.
 
1261
 
 
1262
AC_DEFUN([AM_AUX_DIR_EXPAND],
 
1263
[dnl Rely on autoconf to set up CDPATH properly.
 
1264
AC_PREREQ([2.50])dnl
 
1265
# expand $ac_aux_dir to an absolute path
 
1266
am_aux_dir=`cd $ac_aux_dir && pwd`
 
1267
])
 
1268
 
 
1269
# AM_CONDITIONAL                                            -*- Autoconf -*-
 
1270
 
 
1271
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
 
1272
# Free Software Foundation, Inc.
 
1273
#
 
1274
# This file is free software; the Free Software Foundation
 
1275
# gives unlimited permission to copy and/or distribute it,
 
1276
# with or without modifications, as long as this notice is preserved.
 
1277
 
 
1278
# serial 9
 
1279
 
 
1280
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
 
1281
# -------------------------------------
 
1282
# Define a conditional.
 
1283
AC_DEFUN([AM_CONDITIONAL],
 
1284
[AC_PREREQ(2.52)dnl
 
1285
 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
 
1286
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
 
1287
AC_SUBST([$1_TRUE])dnl
 
1288
AC_SUBST([$1_FALSE])dnl
 
1289
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
 
1290
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
 
1291
m4_define([_AM_COND_VALUE_$1], [$2])dnl
 
1292
if $2; then
 
1293
  $1_TRUE=
 
1294
  $1_FALSE='#'
 
1295
else
 
1296
  $1_TRUE='#'
 
1297
  $1_FALSE=
 
1298
fi
 
1299
AC_CONFIG_COMMANDS_PRE(
 
1300
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
 
1301
  AC_MSG_ERROR([[conditional "$1" was never defined.
 
1302
Usually this means the macro was only invoked conditionally.]])
 
1303
fi])])
 
1304
 
 
1305
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
 
1306
# Free Software Foundation, Inc.
 
1307
#
 
1308
# This file is free software; the Free Software Foundation
 
1309
# gives unlimited permission to copy and/or distribute it,
 
1310
# with or without modifications, as long as this notice is preserved.
 
1311
 
 
1312
# serial 10
 
1313
 
 
1314
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 
1315
# written in clear, in which case automake, when reading aclocal.m4,
 
1316
# will think it sees a *use*, and therefore will trigger all it's
 
1317
# C support machinery.  Also note that it means that autoscan, seeing
 
1318
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
 
1319
 
 
1320
 
 
1321
# _AM_DEPENDENCIES(NAME)
 
1322
# ----------------------
 
1323
# See how the compiler implements dependency checking.
 
1324
# NAME is "CC", "CXX", "GCJ", or "OBJC".
 
1325
# We try a few techniques and use that to set a single cache variable.
 
1326
#
 
1327
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
 
1328
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
 
1329
# dependency, and given that the user is not expected to run this macro,
 
1330
# just rely on AC_PROG_CC.
 
1331
AC_DEFUN([_AM_DEPENDENCIES],
 
1332
[AC_REQUIRE([AM_SET_DEPDIR])dnl
 
1333
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
 
1334
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
 
1335
AC_REQUIRE([AM_DEP_TRACK])dnl
 
1336
 
 
1337
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
 
1338
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
 
1339
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
 
1340
       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
 
1341
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
 
1342
                   [depcc="$$1"   am_compiler_list=])
 
1343
 
 
1344
AC_CACHE_CHECK([dependency style of $depcc],
 
1345
               [am_cv_$1_dependencies_compiler_type],
 
1346
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
 
1347
  # We make a subdir and do the tests there.  Otherwise we can end up
 
1348
  # making bogus files that we don't know about and never remove.  For
 
1349
  # instance it was reported that on HP-UX the gcc test will end up
 
1350
  # making a dummy file named `D' -- because `-MD' means `put the output
 
1351
  # in D'.
 
1352
  mkdir conftest.dir
 
1353
  # Copy depcomp to subdir because otherwise we won't find it if we're
 
1354
  # using a relative directory.
 
1355
  cp "$am_depcomp" conftest.dir
 
1356
  cd conftest.dir
 
1357
  # We will build objects and dependencies in a subdirectory because
 
1358
  # it helps to detect inapplicable dependency modes.  For instance
 
1359
  # both Tru64's cc and ICC support -MD to output dependencies as a
 
1360
  # side effect of compilation, but ICC will put the dependencies in
 
1361
  # the current directory while Tru64 will put them in the object
 
1362
  # directory.
 
1363
  mkdir sub
 
1364
 
 
1365
  am_cv_$1_dependencies_compiler_type=none
 
1366
  if test "$am_compiler_list" = ""; then
 
1367
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
 
1368
  fi
 
1369
  am__universal=false
 
1370
  m4_case([$1], [CC],
 
1371
    [case " $depcc " in #(
 
1372
     *\ -arch\ *\ -arch\ *) am__universal=true ;;
 
1373
     esac],
 
1374
    [CXX],
 
1375
    [case " $depcc " in #(
 
1376
     *\ -arch\ *\ -arch\ *) am__universal=true ;;
 
1377
     esac])
 
1378
 
 
1379
  for depmode in $am_compiler_list; do
 
1380
    # Setup a source with many dependencies, because some compilers
 
1381
    # like to wrap large dependency lists on column 80 (with \), and
 
1382
    # we should not choose a depcomp mode which is confused by this.
 
1383
    #
 
1384
    # We need to recreate these files for each test, as the compiler may
 
1385
    # overwrite some of them when testing with obscure command lines.
 
1386
    # This happens at least with the AIX C compiler.
 
1387
    : > sub/conftest.c
 
1388
    for i in 1 2 3 4 5 6; do
 
1389
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
 
1390
      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
 
1391
      # Solaris 8's {/usr,}/bin/sh.
 
1392
      touch sub/conftst$i.h
 
1393
    done
 
1394
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
1395
 
 
1396
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
 
1397
    # mode.  It turns out that the SunPro C++ compiler does not properly
 
1398
    # handle `-M -o', and we need to detect this.  Also, some Intel
 
1399
    # versions had trouble with output in subdirs
 
1400
    am__obj=sub/conftest.${OBJEXT-o}
 
1401
    am__minus_obj="-o $am__obj"
 
1402
    case $depmode in
 
1403
    gcc)
 
1404
      # This depmode causes a compiler race in universal mode.
 
1405
      test "$am__universal" = false || continue
 
1406
      ;;
 
1407
    nosideeffect)
 
1408
      # after this tag, mechanisms are not by side-effect, so they'll
 
1409
      # only be used when explicitly requested
 
1410
      if test "x$enable_dependency_tracking" = xyes; then
 
1411
        continue
 
1412
      else
 
1413
        break
 
1414
      fi
 
1415
      ;;
 
1416
    msvisualcpp | msvcmsys)
 
1417
      # This compiler won't grok `-c -o', but also, the minuso test has
 
1418
      # not run yet.  These depmodes are late enough in the game, and
 
1419
      # so weak that their functioning should not be impacted.
 
1420
      am__obj=conftest.${OBJEXT-o}
 
1421
      am__minus_obj=
 
1422
      ;;
 
1423
    none) break ;;
 
1424
    esac
 
1425
    if depmode=$depmode \
 
1426
       source=sub/conftest.c object=$am__obj \
 
1427
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
 
1428
       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
 
1429
         >/dev/null 2>conftest.err &&
 
1430
       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
 
1431
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
 
1432
       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
 
1433
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
 
1434
      # icc doesn't choke on unknown options, it will just issue warnings
 
1435
      # or remarks (even with -Werror).  So we grep stderr for any message
 
1436
      # that says an option was ignored or not supported.
 
1437
      # When given -MP, icc 7.0 and 7.1 complain thusly:
 
1438
      #   icc: Command line warning: ignoring option '-M'; no argument required
 
1439
      # The diagnosis changed in icc 8.0:
 
1440
      #   icc: Command line remark: option '-MP' not supported
 
1441
      if (grep 'ignoring option' conftest.err ||
 
1442
          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
 
1443
        am_cv_$1_dependencies_compiler_type=$depmode
 
1444
        break
 
1445
      fi
 
1446
    fi
 
1447
  done
 
1448
 
 
1449
  cd ..
 
1450
  rm -rf conftest.dir
 
1451
else
 
1452
  am_cv_$1_dependencies_compiler_type=none
 
1453
fi
 
1454
])
 
1455
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
 
1456
AM_CONDITIONAL([am__fastdep$1], [
 
1457
  test "x$enable_dependency_tracking" != xno \
 
1458
  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
 
1459
])
 
1460
 
 
1461
 
 
1462
# AM_SET_DEPDIR
 
1463
# -------------
 
1464
# Choose a directory name for dependency files.
 
1465
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
 
1466
AC_DEFUN([AM_SET_DEPDIR],
 
1467
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 
1468
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
 
1469
])
 
1470
 
 
1471
 
 
1472
# AM_DEP_TRACK
 
1473
# ------------
 
1474
AC_DEFUN([AM_DEP_TRACK],
 
1475
[AC_ARG_ENABLE(dependency-tracking,
 
1476
[  --disable-dependency-tracking  speeds up one-time build
 
1477
  --enable-dependency-tracking   do not reject slow dependency extractors])
 
1478
if test "x$enable_dependency_tracking" != xno; then
 
1479
  am_depcomp="$ac_aux_dir/depcomp"
 
1480
  AMDEPBACKSLASH='\'
 
1481
fi
 
1482
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
 
1483
AC_SUBST([AMDEPBACKSLASH])dnl
 
1484
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
 
1485
])
 
1486
 
 
1487
# Generate code to set up dependency tracking.              -*- Autoconf -*-
 
1488
 
 
1489
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
 
1490
# Free Software Foundation, Inc.
 
1491
#
 
1492
# This file is free software; the Free Software Foundation
 
1493
# gives unlimited permission to copy and/or distribute it,
 
1494
# with or without modifications, as long as this notice is preserved.
 
1495
 
 
1496
#serial 5
 
1497
 
 
1498
# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
1499
# ------------------------------
 
1500
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
 
1501
[{
 
1502
  # Autoconf 2.62 quotes --file arguments for eval, but not when files
 
1503
  # are listed without --file.  Let's play safe and only enable the eval
 
1504
  # if we detect the quoting.
 
1505
  case $CONFIG_FILES in
 
1506
  *\'*) eval set x "$CONFIG_FILES" ;;
 
1507
  *)   set x $CONFIG_FILES ;;
 
1508
  esac
 
1509
  shift
 
1510
  for mf
 
1511
  do
 
1512
    # Strip MF so we end up with the name of the file.
 
1513
    mf=`echo "$mf" | sed -e 's/:.*$//'`
 
1514
    # Check whether this is an Automake generated Makefile or not.
 
1515
    # We used to match only the files named `Makefile.in', but
 
1516
    # some people rename them; so instead we look at the file content.
 
1517
    # Grep'ing the first line is not enough: some people post-process
 
1518
    # each Makefile.in and add a new line on top of each file to say so.
 
1519
    # Grep'ing the whole file is not good either: AIX grep has a line
 
1520
    # limit of 2048, but all sed's we know have understand at least 4000.
 
1521
    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
 
1522
      dirpart=`AS_DIRNAME("$mf")`
 
1523
    else
 
1524
      continue
 
1525
    fi
 
1526
    # Extract the definition of DEPDIR, am__include, and am__quote
 
1527
    # from the Makefile without running `make'.
 
1528
    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
 
1529
    test -z "$DEPDIR" && continue
 
1530
    am__include=`sed -n 's/^am__include = //p' < "$mf"`
 
1531
    test -z "am__include" && continue
 
1532
    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
 
1533
    # When using ansi2knr, U may be empty or an underscore; expand it
 
1534
    U=`sed -n 's/^U = //p' < "$mf"`
 
1535
    # Find all dependency output files, they are included files with
 
1536
    # $(DEPDIR) in their names.  We invoke sed twice because it is the
 
1537
    # simplest approach to changing $(DEPDIR) to its actual value in the
 
1538
    # expansion.
 
1539
    for file in `sed -n "
 
1540
      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
 
1541
         sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
 
1542
      # Make sure the directory exists.
 
1543
      test -f "$dirpart/$file" && continue
 
1544
      fdir=`AS_DIRNAME(["$file"])`
 
1545
      AS_MKDIR_P([$dirpart/$fdir])
 
1546
      # echo "creating $dirpart/$file"
 
1547
      echo '# dummy' > "$dirpart/$file"
 
1548
    done
 
1549
  done
 
1550
}
 
1551
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
1552
 
 
1553
 
 
1554
# AM_OUTPUT_DEPENDENCY_COMMANDS
 
1555
# -----------------------------
 
1556
# This macro should only be invoked once -- use via AC_REQUIRE.
 
1557
#
 
1558
# This code is only required when automatic dependency tracking
 
1559
# is enabled.  FIXME.  This creates each `.P' file that we will
 
1560
# need in order to bootstrap the dependency handling code.
 
1561
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
1562
[AC_CONFIG_COMMANDS([depfiles],
 
1563
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
 
1564
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
 
1565
])
 
1566
 
 
1567
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
 
1568
# 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
# serial 8
 
1575
 
 
1576
# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
 
1577
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
 
1578
 
 
1579
# Do all the work for Automake.                             -*- Autoconf -*-
 
1580
 
 
1581
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 
1582
# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
 
1583
#
 
1584
# This file is free software; the Free Software Foundation
 
1585
# gives unlimited permission to copy and/or distribute it,
 
1586
# with or without modifications, as long as this notice is preserved.
 
1587
 
 
1588
# serial 16
 
1589
 
 
1590
# This macro actually does too much.  Some checks are only needed if
 
1591
# your package does certain things.  But this isn't really a big deal.
 
1592
 
 
1593
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
 
1594
# AM_INIT_AUTOMAKE([OPTIONS])
 
1595
# -----------------------------------------------
 
1596
# The call with PACKAGE and VERSION arguments is the old style
 
1597
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
 
1598
# and VERSION should now be passed to AC_INIT and removed from
 
1599
# the call to AM_INIT_AUTOMAKE.
 
1600
# We support both call styles for the transition.  After
 
1601
# the next Automake release, Autoconf can make the AC_INIT
 
1602
# arguments mandatory, and then we can depend on a new Autoconf
 
1603
# release and drop the old call support.
 
1604
AC_DEFUN([AM_INIT_AUTOMAKE],
 
1605
[AC_PREREQ([2.62])dnl
 
1606
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
 
1607
dnl the ones we care about.
 
1608
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
 
1609
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
 
1610
AC_REQUIRE([AC_PROG_INSTALL])dnl
 
1611
if test "`cd $srcdir && pwd`" != "`pwd`"; then
 
1612
  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
 
1613
  # is not polluted with repeated "-I."
 
1614
  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
 
1615
  # test to see if srcdir already configured
 
1616
  if test -f $srcdir/config.status; then
 
1617
    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
 
1618
  fi
 
1619
fi
 
1620
 
 
1621
# test whether we have cygpath
 
1622
if test -z "$CYGPATH_W"; then
 
1623
  if (cygpath --version) >/dev/null 2>/dev/null; then
 
1624
    CYGPATH_W='cygpath -w'
 
1625
  else
 
1626
    CYGPATH_W=echo
 
1627
  fi
 
1628
fi
 
1629
AC_SUBST([CYGPATH_W])
 
1630
 
 
1631
# Define the identity of the package.
 
1632
dnl Distinguish between old-style and new-style calls.
 
1633
m4_ifval([$2],
 
1634
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
 
1635
 AC_SUBST([PACKAGE], [$1])dnl
 
1636
 AC_SUBST([VERSION], [$2])],
 
1637
[_AM_SET_OPTIONS([$1])dnl
 
1638
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
 
1639
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
 
1640
  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
 
1641
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
 
1642
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 
1643
 
 
1644
_AM_IF_OPTION([no-define],,
 
1645
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
 
1646
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
 
1647
 
 
1648
# Some tools Automake needs.
 
1649
AC_REQUIRE([AM_SANITY_CHECK])dnl
 
1650
AC_REQUIRE([AC_ARG_PROGRAM])dnl
 
1651
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
 
1652
AM_MISSING_PROG(AUTOCONF, autoconf)
 
1653
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
 
1654
AM_MISSING_PROG(AUTOHEADER, autoheader)
 
1655
AM_MISSING_PROG(MAKEINFO, makeinfo)
 
1656
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 
1657
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
 
1658
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
 
1659
# We need awk for the "check" target.  The system "awk" is bad on
 
1660
# some platforms.
 
1661
AC_REQUIRE([AC_PROG_AWK])dnl
 
1662
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 
1663
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 
1664
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
 
1665
              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
 
1666
                             [_AM_PROG_TAR([v7])])])
 
1667
_AM_IF_OPTION([no-dependencies],,
 
1668
[AC_PROVIDE_IFELSE([AC_PROG_CC],
 
1669
                  [_AM_DEPENDENCIES(CC)],
 
1670
                  [define([AC_PROG_CC],
 
1671
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
 
1672
AC_PROVIDE_IFELSE([AC_PROG_CXX],
 
1673
                  [_AM_DEPENDENCIES(CXX)],
 
1674
                  [define([AC_PROG_CXX],
 
1675
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
 
1676
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
 
1677
                  [_AM_DEPENDENCIES(OBJC)],
 
1678
                  [define([AC_PROG_OBJC],
 
1679
                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
 
1680
])
 
1681
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
 
1682
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
 
1683
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
 
1684
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
 
1685
AC_CONFIG_COMMANDS_PRE(dnl
 
1686
[m4_provide_if([_AM_COMPILER_EXEEXT],
 
1687
  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
 
1688
])
 
1689
 
 
1690
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
 
1691
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
 
1692
dnl mangled by Autoconf and run in a shell conditional statement.
 
1693
m4_define([_AC_COMPILER_EXEEXT],
 
1694
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
 
1695
 
 
1696
 
 
1697
# When config.status generates a header, we must update the stamp-h file.
 
1698
# This file resides in the same directory as the config header
 
1699
# that is generated.  The stamp files are numbered to have different names.
 
1700
 
 
1701
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
 
1702
# loop where config.status creates the headers, so we can generate
 
1703
# our stamp files there.
 
1704
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
 
1705
[# Compute $1's index in $config_headers.
 
1706
_am_arg=$1
 
1707
_am_stamp_count=1
 
1708
for _am_header in $config_headers :; do
 
1709
  case $_am_header in
 
1710
    $_am_arg | $_am_arg:* )
 
1711
      break ;;
 
1712
    * )
 
1713
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
 
1714
  esac
 
1715
done
 
1716
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
1717
 
 
1718
# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
 
1719
#
 
1720
# This file is free software; the Free Software Foundation
 
1721
# gives unlimited permission to copy and/or distribute it,
 
1722
# with or without modifications, as long as this notice is preserved.
 
1723
 
 
1724
# AM_PROG_INSTALL_SH
 
1725
# ------------------
 
1726
# Define $install_sh.
 
1727
AC_DEFUN([AM_PROG_INSTALL_SH],
 
1728
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
1729
if test x"${install_sh}" != xset; then
 
1730
  case $am_aux_dir in
 
1731
  *\ * | *\     *)
 
1732
    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
 
1733
  *)
 
1734
    install_sh="\${SHELL} $am_aux_dir/install-sh"
 
1735
  esac
 
1736
fi
 
1737
AC_SUBST(install_sh)])
 
1738
 
 
1739
# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
 
1740
#
 
1741
# This file is free software; the Free Software Foundation
 
1742
# gives unlimited permission to copy and/or distribute it,
 
1743
# with or without modifications, as long as this notice is preserved.
 
1744
 
 
1745
# serial 2
 
1746
 
 
1747
# Check whether the underlying file-system supports filenames
 
1748
# with a leading dot.  For instance MS-DOS doesn't.
 
1749
AC_DEFUN([AM_SET_LEADING_DOT],
 
1750
[rm -rf .tst 2>/dev/null
 
1751
mkdir .tst 2>/dev/null
 
1752
if test -d .tst; then
 
1753
  am__leading_dot=.
 
1754
else
 
1755
  am__leading_dot=_
 
1756
fi
 
1757
rmdir .tst 2>/dev/null
 
1758
AC_SUBST([am__leading_dot])])
 
1759
 
 
1760
# Check to see how 'make' treats includes.                  -*- Autoconf -*-
 
1761
 
 
1762
# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
 
1763
#
 
1764
# This file is free software; the Free Software Foundation
 
1765
# gives unlimited permission to copy and/or distribute it,
 
1766
# with or without modifications, as long as this notice is preserved.
 
1767
 
 
1768
# serial 4
 
1769
 
 
1770
# AM_MAKE_INCLUDE()
 
1771
# -----------------
 
1772
# Check to see how make treats includes.
 
1773
AC_DEFUN([AM_MAKE_INCLUDE],
 
1774
[am_make=${MAKE-make}
 
1775
cat > confinc << 'END'
 
1776
am__doit:
 
1777
        @echo this is the am__doit target
 
1778
.PHONY: am__doit
 
1779
END
 
1780
# If we don't find an include directive, just comment out the code.
 
1781
AC_MSG_CHECKING([for style of include used by $am_make])
 
1782
am__include="#"
 
1783
am__quote=
 
1784
_am_result=none
 
1785
# First try GNU make style include.
 
1786
echo "include confinc" > confmf
 
1787
# Ignore all kinds of additional output from `make'.
 
1788
case `$am_make -s -f confmf 2> /dev/null` in #(
 
1789
*the\ am__doit\ target*)
 
1790
  am__include=include
 
1791
  am__quote=
 
1792
  _am_result=GNU
 
1793
  ;;
 
1794
esac
 
1795
# Now try BSD make style include.
 
1796
if test "$am__include" = "#"; then
 
1797
   echo '.include "confinc"' > confmf
 
1798
   case `$am_make -s -f confmf 2> /dev/null` in #(
 
1799
   *the\ am__doit\ target*)
 
1800
     am__include=.include
 
1801
     am__quote="\""
 
1802
     _am_result=BSD
 
1803
     ;;
 
1804
   esac
 
1805
fi
 
1806
AC_SUBST([am__include])
 
1807
AC_SUBST([am__quote])
 
1808
AC_MSG_RESULT([$_am_result])
 
1809
rm -f confinc confmf
 
1810
])
 
1811
 
 
1812
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
1813
 
 
1814
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
 
1815
# Free Software Foundation, Inc.
 
1816
#
 
1817
# This file is free software; the Free Software Foundation
 
1818
# gives unlimited permission to copy and/or distribute it,
 
1819
# with or without modifications, as long as this notice is preserved.
 
1820
 
 
1821
# serial 6
 
1822
 
 
1823
# AM_MISSING_PROG(NAME, PROGRAM)
 
1824
# ------------------------------
 
1825
AC_DEFUN([AM_MISSING_PROG],
 
1826
[AC_REQUIRE([AM_MISSING_HAS_RUN])
 
1827
$1=${$1-"${am_missing_run}$2"}
 
1828
AC_SUBST($1)])
 
1829
 
 
1830
 
 
1831
# AM_MISSING_HAS_RUN
 
1832
# ------------------
 
1833
# Define MISSING if not defined so far and test if it supports --run.
 
1834
# If it does, set am_missing_run to use it, otherwise, to nothing.
 
1835
AC_DEFUN([AM_MISSING_HAS_RUN],
 
1836
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
1837
AC_REQUIRE_AUX_FILE([missing])dnl
 
1838
if test x"${MISSING+set}" != xset; then
 
1839
  case $am_aux_dir in
 
1840
  *\ * | *\     *)
 
1841
    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
 
1842
  *)
 
1843
    MISSING="\${SHELL} $am_aux_dir/missing" ;;
 
1844
  esac
 
1845
fi
 
1846
# Use eval to expand $SHELL
 
1847
if eval "$MISSING --run true"; then
 
1848
  am_missing_run="$MISSING --run "
 
1849
else
 
1850
  am_missing_run=
 
1851
  AC_MSG_WARN([`missing' script is too old or missing])
 
1852
fi
 
1853
])
 
1854
 
 
1855
# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
 
1856
#
 
1857
# This file is free software; the Free Software Foundation
 
1858
# gives unlimited permission to copy and/or distribute it,
 
1859
# with or without modifications, as long as this notice is preserved.
 
1860
 
 
1861
# AM_PROG_MKDIR_P
 
1862
# ---------------
 
1863
# Check for `mkdir -p'.
 
1864
AC_DEFUN([AM_PROG_MKDIR_P],
 
1865
[AC_PREREQ([2.60])dnl
 
1866
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
 
1867
dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
 
1868
dnl while keeping a definition of mkdir_p for backward compatibility.
 
1869
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
 
1870
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
 
1871
dnl Makefile.ins that do not define MKDIR_P, so we do our own
 
1872
dnl adjustment using top_builddir (which is defined more often than
 
1873
dnl MKDIR_P).
 
1874
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
 
1875
case $mkdir_p in
 
1876
  [[\\/$]]* | ?:[[\\/]]*) ;;
 
1877
  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
 
1878
esac
 
1879
])
 
1880
 
 
1881
# Helper functions for option handling.                     -*- Autoconf -*-
 
1882
 
 
1883
# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
 
1884
#
 
1885
# This file is free software; the Free Software Foundation
 
1886
# gives unlimited permission to copy and/or distribute it,
 
1887
# with or without modifications, as long as this notice is preserved.
 
1888
 
 
1889
# serial 4
 
1890
 
 
1891
# _AM_MANGLE_OPTION(NAME)
 
1892
# -----------------------
 
1893
AC_DEFUN([_AM_MANGLE_OPTION],
 
1894
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 
1895
 
 
1896
# _AM_SET_OPTION(NAME)
 
1897
# ------------------------------
 
1898
# Set option NAME.  Presently that only means defining a flag for this option.
 
1899
AC_DEFUN([_AM_SET_OPTION],
 
1900
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
 
1901
 
 
1902
# _AM_SET_OPTIONS(OPTIONS)
 
1903
# ----------------------------------
 
1904
# OPTIONS is a space-separated list of Automake options.
 
1905
AC_DEFUN([_AM_SET_OPTIONS],
 
1906
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 
1907
 
 
1908
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
 
1909
# -------------------------------------------
 
1910
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
 
1911
AC_DEFUN([_AM_IF_OPTION],
 
1912
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
1913
 
 
1914
# Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
1915
 
 
1916
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
 
1917
# Free Software Foundation, Inc.
 
1918
#
 
1919
# This file is free software; the Free Software Foundation
 
1920
# gives unlimited permission to copy and/or distribute it,
 
1921
# with or without modifications, as long as this notice is preserved.
 
1922
 
 
1923
# serial 5
 
1924
 
 
1925
# AM_SANITY_CHECK
 
1926
# ---------------
 
1927
AC_DEFUN([AM_SANITY_CHECK],
 
1928
[AC_MSG_CHECKING([whether build environment is sane])
 
1929
# Just in case
 
1930
sleep 1
 
1931
echo timestamp > conftest.file
 
1932
# Reject unsafe characters in $srcdir or the absolute working directory
 
1933
# name.  Accept space and tab only in the latter.
 
1934
am_lf='
 
1935
'
 
1936
case `pwd` in
 
1937
  *[[\\\"\#\$\&\'\`$am_lf]]*)
 
1938
    AC_MSG_ERROR([unsafe absolute working directory name]);;
 
1939
esac
 
1940
case $srcdir in
 
1941
  *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
 
1942
    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
 
1943
esac
 
1944
 
 
1945
# Do `set' in a subshell so we don't clobber the current shell's
 
1946
# arguments.  Must try -L first in case configure is actually a
 
1947
# symlink; some systems play weird games with the mod time of symlinks
 
1948
# (eg FreeBSD returns the mod time of the symlink's containing
 
1949
# directory).
 
1950
if (
 
1951
   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
 
1952
   if test "$[*]" = "X"; then
 
1953
      # -L didn't work.
 
1954
      set X `ls -t "$srcdir/configure" conftest.file`
 
1955
   fi
 
1956
   rm -f conftest.file
 
1957
   if test "$[*]" != "X $srcdir/configure conftest.file" \
 
1958
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
 
1959
 
 
1960
      # If neither matched, then we have a broken ls.  This can happen
 
1961
      # if, for instance, CONFIG_SHELL is bash and it inherits a
 
1962
      # broken ls alias from the environment.  This has actually
 
1963
      # happened.  Such a system could not be considered "sane".
 
1964
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
 
1965
alias in your environment])
 
1966
   fi
 
1967
 
 
1968
   test "$[2]" = conftest.file
 
1969
   )
 
1970
then
 
1971
   # Ok.
 
1972
   :
 
1973
else
 
1974
   AC_MSG_ERROR([newly created file is older than distributed files!
 
1975
Check your system clock])
 
1976
fi
 
1977
AC_MSG_RESULT(yes)])
 
1978
 
 
1979
# Copyright (C) 2009  Free Software Foundation, Inc.
 
1980
#
 
1981
# This file is free software; the Free Software Foundation
 
1982
# gives unlimited permission to copy and/or distribute it,
 
1983
# with or without modifications, as long as this notice is preserved.
 
1984
 
 
1985
# serial 1
 
1986
 
 
1987
# AM_SILENT_RULES([DEFAULT])
 
1988
# --------------------------
 
1989
# Enable less verbose build rules; with the default set to DEFAULT
 
1990
# (`yes' being less verbose, `no' or empty being verbose).
 
1991
AC_DEFUN([AM_SILENT_RULES],
 
1992
[AC_ARG_ENABLE([silent-rules],
 
1993
[  --enable-silent-rules          less verbose build output (undo: `make V=1')
 
1994
  --disable-silent-rules         verbose build output (undo: `make V=0')])
 
1995
case $enable_silent_rules in
 
1996
yes) AM_DEFAULT_VERBOSITY=0;;
 
1997
no)  AM_DEFAULT_VERBOSITY=1;;
 
1998
*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
 
1999
esac
 
2000
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
 
2001
AM_BACKSLASH='\'
 
2002
AC_SUBST([AM_BACKSLASH])dnl
 
2003
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
 
2004
])
 
2005
 
 
2006
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
2007
#
 
2008
# This file is free software; the Free Software Foundation
 
2009
# gives unlimited permission to copy and/or distribute it,
 
2010
# with or without modifications, as long as this notice is preserved.
 
2011
 
 
2012
# AM_PROG_INSTALL_STRIP
 
2013
# ---------------------
 
2014
# One issue with vendor `install' (even GNU) is that you can't
 
2015
# specify the program used to strip binaries.  This is especially
 
2016
# annoying in cross-compiling environments, where the build's strip
 
2017
# is unlikely to handle the host's binaries.
 
2018
# Fortunately install-sh will honor a STRIPPROG variable, so we
 
2019
# always use install-sh in `make install-strip', and initialize
 
2020
# STRIPPROG with the value of the STRIP variable (set by the user).
 
2021
AC_DEFUN([AM_PROG_INSTALL_STRIP],
 
2022
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 
2023
# Installed binaries are usually stripped using `strip' when the user
 
2024
# run `make install-strip'.  However `strip' might not be the right
 
2025
# tool to use in cross-compilation environments, therefore Automake
 
2026
# will honor the `STRIP' environment variable to overrule this program.
 
2027
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
 
2028
if test "$cross_compiling" != no; then
 
2029
  AC_CHECK_TOOL([STRIP], [strip], :)
 
2030
fi
 
2031
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 
2032
AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
2033
 
 
2034
# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
 
2035
#
 
2036
# This file is free software; the Free Software Foundation
 
2037
# gives unlimited permission to copy and/or distribute it,
 
2038
# with or without modifications, as long as this notice is preserved.
 
2039
 
 
2040
# serial 2
 
2041
 
 
2042
# _AM_SUBST_NOTMAKE(VARIABLE)
 
2043
# ---------------------------
 
2044
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
 
2045
# This macro is traced by Automake.
 
2046
AC_DEFUN([_AM_SUBST_NOTMAKE])
 
2047
 
 
2048
# AM_SUBST_NOTMAKE(VARIABLE)
 
2049
# ---------------------------
 
2050
# Public sister of _AM_SUBST_NOTMAKE.
 
2051
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
2052
 
 
2053
# Check how to create a tarball.                            -*- Autoconf -*-
 
2054
 
 
2055
# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
 
2056
#
 
2057
# This file is free software; the Free Software Foundation
 
2058
# gives unlimited permission to copy and/or distribute it,
 
2059
# with or without modifications, as long as this notice is preserved.
 
2060
 
 
2061
# serial 2
 
2062
 
 
2063
# _AM_PROG_TAR(FORMAT)
 
2064
# --------------------
 
2065
# Check how to create a tarball in format FORMAT.
 
2066
# FORMAT should be one of `v7', `ustar', or `pax'.
 
2067
#
 
2068
# Substitute a variable $(am__tar) that is a command
 
2069
# writing to stdout a FORMAT-tarball containing the directory
 
2070
# $tardir.
 
2071
#     tardir=directory && $(am__tar) > result.tar
 
2072
#
 
2073
# Substitute a variable $(am__untar) that extract such
 
2074
# a tarball read from stdin.
 
2075
#     $(am__untar) < result.tar
 
2076
AC_DEFUN([_AM_PROG_TAR],
 
2077
[# Always define AMTAR for backward compatibility.
 
2078
AM_MISSING_PROG([AMTAR], [tar])
 
2079
m4_if([$1], [v7],
 
2080
     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
 
2081
     [m4_case([$1], [ustar],, [pax],,
 
2082
              [m4_fatal([Unknown tar format])])
 
2083
AC_MSG_CHECKING([how to create a $1 tar archive])
 
2084
# Loop over all known methods to create a tar archive until one works.
 
2085
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
 
2086
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
 
2087
# Do not fold the above two line into one, because Tru64 sh and
 
2088
# Solaris sh will not grok spaces in the rhs of `-'.
 
2089
for _am_tool in $_am_tools
 
2090
do
 
2091
  case $_am_tool in
 
2092
  gnutar)
 
2093
    for _am_tar in tar gnutar gtar;
 
2094
    do
 
2095
      AM_RUN_LOG([$_am_tar --version]) && break
 
2096
    done
 
2097
    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
 
2098
    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
 
2099
    am__untar="$_am_tar -xf -"
 
2100
    ;;
 
2101
  plaintar)
 
2102
    # Must skip GNU tar: if it does not support --format= it doesn't create
 
2103
    # ustar tarball either.
 
2104
    (tar --version) >/dev/null 2>&1 && continue
 
2105
    am__tar='tar chf - "$$tardir"'
 
2106
    am__tar_='tar chf - "$tardir"'
 
2107
    am__untar='tar xf -'
 
2108
    ;;
 
2109
  pax)
 
2110
    am__tar='pax -L -x $1 -w "$$tardir"'
 
2111
    am__tar_='pax -L -x $1 -w "$tardir"'
 
2112
    am__untar='pax -r'
 
2113
    ;;
 
2114
  cpio)
 
2115
    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
 
2116
    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
 
2117
    am__untar='cpio -i -H $1 -d'
 
2118
    ;;
 
2119
  none)
 
2120
    am__tar=false
 
2121
    am__tar_=false
 
2122
    am__untar=false
 
2123
    ;;
 
2124
  esac
 
2125
 
 
2126
  # If the value was cached, stop now.  We just wanted to have am__tar
 
2127
  # and am__untar set.
 
2128
  test -n "${am_cv_prog_tar_$1}" && break
 
2129
 
 
2130
  # tar/untar a dummy directory, and stop if the command works
 
2131
  rm -rf conftest.dir
 
2132
  mkdir conftest.dir
 
2133
  echo GrepMe > conftest.dir/file
 
2134
  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
 
2135
  rm -rf conftest.dir
 
2136
  if test -s conftest.tar; then
 
2137
    AM_RUN_LOG([$am__untar <conftest.tar])
 
2138
    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
 
2139
  fi
 
2140
done
 
2141
rm -rf conftest.dir
 
2142
 
 
2143
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
 
2144
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
 
2145
AC_SUBST([am__tar])
 
2146
AC_SUBST([am__untar])
 
2147
]) # _AM_PROG_TAR
 
2148
 
 
2149
m4_include([m4/acx_pthread.m4])
 
2150
m4_include([m4/define-dir.m4])
 
2151
m4_include([m4/gtk-doc.m4])
 
2152
m4_include([m4/iconv.m4])
 
2153
m4_include([m4/introspection.m4])
 
2154
m4_include([m4/libjpeg.m4])
 
2155
m4_include([m4/libtool.m4])
 
2156
m4_include([m4/ltoptions.m4])
 
2157
m4_include([m4/ltsugar.m4])
 
2158
m4_include([m4/ltversion.m4])
 
2159
m4_include([m4/lt~obsolete.m4])
 
2160
m4_include([m4/qt.m4])