~ubuntu-branches/ubuntu/hardy/dbacl/hardy

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Zak B. Elep
  • Date: 2006-03-26 22:35:35 UTC
  • mto: (2.1.1 etch) (1.1.2 upstream)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20060326223535-icwiulpkzesds4mq
ImportĀ upstreamĀ versionĀ 1.12

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
dnl aclocal.m4 generated automatically by aclocal 1.4-p6
2
 
 
3
 
dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
4
 
dnl This file is free software; the Free Software Foundation
5
 
dnl gives unlimited permission to copy and/or distribute it,
6
 
dnl with or without modifications, as long as this notice is preserved.
7
 
 
8
 
dnl This program is distributed in the hope that it will be useful,
9
 
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10
 
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11
 
dnl PARTICULAR PURPOSE.
12
 
 
13
 
dnl @synopsis AX_FUNC_POSIX_MEMALIGN
14
 
dnl 
15
 
dnl Some versions of posix_memalign (notably glibc 2.2.5) incorrectly
16
 
dnl apply their power-of-two check to the size argument, not the alignment
17
 
dnl argument.  AX_FUNC_POSIX_MEMALIGN defines HAVE_POSIX_MEMALIGN if the
18
 
dnl power-of-two check is correctly applied to the alignment argument.
19
 
dnl 
20
 
dnl @version $Id: $
21
 
dnl @author Scott Pakin <pakin@uiuc.edu>
22
 
dnl
23
 
AC_DEFUN([AX_FUNC_POSIX_MEMALIGN],
24
 
[AC_CACHE_CHECK([for working posix_memalign],
25
 
  [ax_cv_func_posix_memalign_works],
26
 
  [AC_TRY_RUN([
27
 
#include <stdlib.h>
28
 
 
29
 
int
30
 
main ()
31
 
{
32
 
  void *buffer;
33
 
 
34
 
  /* Some versions of glibc incorrectly perform the alignment check on
35
 
   * the size word. */
36
 
  exit (posix_memalign (&buffer, sizeof(void *), 123) != 0);
37
 
}
38
 
    ],
39
 
    [ax_cv_func_posix_memalign_works=yes],
40
 
    [ax_cv_func_posix_memalign_works=no],
41
 
    [ax_cv_func_posix_memalign_works=no])])
42
 
if test "$ax_cv_func_posix_memalign_works" = "yes" ; then
43
 
  AC_DEFINE([HAVE_POSIX_MEMALIGN], [1],
44
 
    [Define to 1 if `posix_memalign' works.])
45
 
fi
46
 
])
47
 
 
48
 
# lib-prefix.m4 serial 3 (gettext-0.13)
49
 
dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
50
 
dnl This file is free software, distributed under the terms of the GNU
51
 
dnl General Public License.  As a special exception to the GNU General
52
 
dnl Public License, this file may be distributed as part of a program
53
 
dnl that contains a configuration script generated by Autoconf, under
54
 
dnl the same distribution terms as the rest of that program.
55
 
 
56
 
dnl From Bruno Haible.
57
 
 
58
 
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
59
 
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
60
 
dnl require excessive bracketing.
61
 
ifdef([AC_HELP_STRING],
62
 
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
63
 
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
64
 
 
65
 
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
66
 
dnl to access previously installed libraries. The basic assumption is that
67
 
dnl a user will want packages to use other packages he previously installed
68
 
dnl with the same --prefix option.
69
 
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
70
 
dnl libraries, but is otherwise very convenient.
71
 
AC_DEFUN([AC_LIB_PREFIX],
72
 
[
73
 
  AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
74
 
  AC_REQUIRE([AC_PROG_CC])
75
 
  AC_REQUIRE([AC_CANONICAL_HOST])
76
 
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
77
 
  dnl By default, look in $includedir and $libdir.
78
 
  use_additional=yes
79
 
  AC_LIB_WITH_FINAL_PREFIX([
80
 
    eval additional_includedir=\"$includedir\"
81
 
    eval additional_libdir=\"$libdir\"
82
 
  ])
83
 
  AC_LIB_ARG_WITH([lib-prefix],
84
 
[  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
85
 
  --without-lib-prefix    don't search for libraries in includedir and libdir],
86
 
[
87
 
    if test "X$withval" = "Xno"; then
88
 
      use_additional=no
89
 
    else
90
 
      if test "X$withval" = "X"; then
91
 
        AC_LIB_WITH_FINAL_PREFIX([
92
 
          eval additional_includedir=\"$includedir\"
93
 
          eval additional_libdir=\"$libdir\"
94
 
        ])
95
 
      else
96
 
        additional_includedir="$withval/include"
97
 
        additional_libdir="$withval/lib"
98
 
      fi
99
 
    fi
100
 
])
101
 
  if test $use_additional = yes; then
102
 
    dnl Potentially add $additional_includedir to $CPPFLAGS.
103
 
    dnl But don't add it
104
 
    dnl   1. if it's the standard /usr/include,
105
 
    dnl   2. if it's already present in $CPPFLAGS,
106
 
    dnl   3. if it's /usr/local/include and we are using GCC on Linux,
107
 
    dnl   4. if it doesn't exist as a directory.
108
 
    if test "X$additional_includedir" != "X/usr/include"; then
109
 
      haveit=
110
 
      for x in $CPPFLAGS; do
111
 
        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
112
 
        if test "X$x" = "X-I$additional_includedir"; then
113
 
          haveit=yes
114
 
          break
115
 
        fi
116
 
      done
117
 
      if test -z "$haveit"; then
118
 
        if test "X$additional_includedir" = "X/usr/local/include"; then
119
 
          if test -n "$GCC"; then
120
 
            case $host_os in
121
 
              linux*) haveit=yes;;
122
 
            esac
123
 
          fi
124
 
        fi
125
 
        if test -z "$haveit"; then
126
 
          if test -d "$additional_includedir"; then
127
 
            dnl Really add $additional_includedir to $CPPFLAGS.
128
 
            CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
129
 
          fi
130
 
        fi
131
 
      fi
132
 
    fi
133
 
    dnl Potentially add $additional_libdir to $LDFLAGS.
134
 
    dnl But don't add it
135
 
    dnl   1. if it's the standard /usr/lib,
136
 
    dnl   2. if it's already present in $LDFLAGS,
137
 
    dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
138
 
    dnl   4. if it doesn't exist as a directory.
139
 
    if test "X$additional_libdir" != "X/usr/lib"; then
140
 
      haveit=
141
 
      for x in $LDFLAGS; do
142
 
        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
143
 
        if test "X$x" = "X-L$additional_libdir"; then
144
 
          haveit=yes
145
 
          break
146
 
        fi
147
 
      done
148
 
      if test -z "$haveit"; then
149
 
        if test "X$additional_libdir" = "X/usr/local/lib"; then
150
 
          if test -n "$GCC"; then
151
 
            case $host_os in
152
 
              linux*) haveit=yes;;
153
 
            esac
154
 
          fi
155
 
        fi
156
 
        if test -z "$haveit"; then
157
 
          if test -d "$additional_libdir"; then
158
 
            dnl Really add $additional_libdir to $LDFLAGS.
159
 
            LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
160
 
          fi
161
 
        fi
162
 
      fi
163
 
    fi
164
 
  fi
165
 
])
166
 
 
167
 
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
168
 
dnl acl_final_exec_prefix, containing the values to which $prefix and
169
 
dnl $exec_prefix will expand at the end of the configure script.
170
 
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
171
 
[
172
 
  dnl Unfortunately, prefix and exec_prefix get only finally determined
173
 
  dnl at the end of configure.
174
 
  if test "X$prefix" = "XNONE"; then
175
 
    acl_final_prefix="$ac_default_prefix"
176
 
  else
177
 
    acl_final_prefix="$prefix"
178
 
  fi
179
 
  if test "X$exec_prefix" = "XNONE"; then
180
 
    acl_final_exec_prefix='${prefix}'
181
 
  else
182
 
    acl_final_exec_prefix="$exec_prefix"
183
 
  fi
184
 
  acl_save_prefix="$prefix"
185
 
  prefix="$acl_final_prefix"
186
 
  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
187
 
  prefix="$acl_save_prefix"
188
 
])
189
 
 
190
 
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
191
 
dnl variables prefix and exec_prefix bound to the values they will have
192
 
dnl at the end of the configure script.
193
 
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
194
 
[
195
 
  acl_save_prefix="$prefix"
196
 
  prefix="$acl_final_prefix"
197
 
  acl_save_exec_prefix="$exec_prefix"
198
 
  exec_prefix="$acl_final_exec_prefix"
199
 
  $1
200
 
  exec_prefix="$acl_save_exec_prefix"
201
 
  prefix="$acl_save_prefix"
202
 
])
203
 
 
204
 
# lib-link.m4 serial 4 (gettext-0.12)
205
 
dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
206
 
dnl This file is free software, distributed under the terms of the GNU
207
 
dnl General Public License.  As a special exception to the GNU General
208
 
dnl Public License, this file may be distributed as part of a program
209
 
dnl that contains a configuration script generated by Autoconf, under
210
 
dnl the same distribution terms as the rest of that program.
211
 
 
212
 
dnl From Bruno Haible.
213
 
 
214
 
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
215
 
dnl the libraries corresponding to explicit and implicit dependencies.
216
 
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
217
 
dnl augments the CPPFLAGS variable.
218
 
AC_DEFUN([AC_LIB_LINKFLAGS],
219
 
[
220
 
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
221
 
  AC_REQUIRE([AC_LIB_RPATH])
222
 
  define([Name],[translit([$1],[./-], [___])])
223
 
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
224
 
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
225
 
  AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
226
 
    AC_LIB_LINKFLAGS_BODY([$1], [$2])
227
 
    ac_cv_lib[]Name[]_libs="$LIB[]NAME"
228
 
    ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
229
 
    ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
230
 
  ])
231
 
  LIB[]NAME="$ac_cv_lib[]Name[]_libs"
232
 
  LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
233
 
  INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
234
 
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
235
 
  AC_SUBST([LIB]NAME)
236
 
  AC_SUBST([LTLIB]NAME)
237
 
  dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
238
 
  dnl results of this search when this library appears as a dependency.
239
 
  HAVE_LIB[]NAME=yes
240
 
  undefine([Name])
241
 
  undefine([NAME])
242
 
])
243
 
 
244
 
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
245
 
dnl searches for libname and the libraries corresponding to explicit and
246
 
dnl implicit dependencies, together with the specified include files and
247
 
dnl the ability to compile and link the specified testcode. If found, it
248
 
dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
249
 
dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
250
 
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
251
 
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
252
 
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
253
 
[
254
 
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
255
 
  AC_REQUIRE([AC_LIB_RPATH])
256
 
  define([Name],[translit([$1],[./-], [___])])
257
 
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
258
 
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
259
 
 
260
 
  dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
261
 
  dnl accordingly.
262
 
  AC_LIB_LINKFLAGS_BODY([$1], [$2])
263
 
 
264
 
  dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
265
 
  dnl because if the user has installed lib[]Name and not disabled its use
266
 
  dnl via --without-lib[]Name-prefix, he wants to use it.
267
 
  ac_save_CPPFLAGS="$CPPFLAGS"
268
 
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
269
 
 
270
 
  AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
271
 
    ac_save_LIBS="$LIBS"
272
 
    LIBS="$LIBS $LIB[]NAME"
273
 
    AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
274
 
    LIBS="$ac_save_LIBS"
275
 
  ])
276
 
  if test "$ac_cv_lib[]Name" = yes; then
277
 
    HAVE_LIB[]NAME=yes
278
 
    AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
279
 
    AC_MSG_CHECKING([how to link with lib[]$1])
280
 
    AC_MSG_RESULT([$LIB[]NAME])
281
 
  else
282
 
    HAVE_LIB[]NAME=no
283
 
    dnl If $LIB[]NAME didn't lead to a usable library, we don't need
284
 
    dnl $INC[]NAME either.
285
 
    CPPFLAGS="$ac_save_CPPFLAGS"
286
 
    LIB[]NAME=
287
 
    LTLIB[]NAME=
288
 
  fi
289
 
  AC_SUBST([HAVE_LIB]NAME)
290
 
  AC_SUBST([LIB]NAME)
291
 
  AC_SUBST([LTLIB]NAME)
292
 
  undefine([Name])
293
 
  undefine([NAME])
294
 
])
295
 
 
296
 
dnl Determine the platform dependent parameters needed to use rpath:
297
 
dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
298
 
dnl hardcode_direct, hardcode_minus_L.
299
 
AC_DEFUN([AC_LIB_RPATH],
300
 
[
301
 
  AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
302
 
  AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
303
 
  AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
304
 
  AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
305
 
  AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
306
 
    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
307
 
    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
308
 
    . ./conftest.sh
309
 
    rm -f ./conftest.sh
310
 
    acl_cv_rpath=done
311
 
  ])
312
 
  wl="$acl_cv_wl"
313
 
  libext="$acl_cv_libext"
314
 
  shlibext="$acl_cv_shlibext"
315
 
  hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
316
 
  hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
317
 
  hardcode_direct="$acl_cv_hardcode_direct"
318
 
  hardcode_minus_L="$acl_cv_hardcode_minus_L"
319
 
  dnl Determine whether the user wants rpath handling at all.
320
 
  AC_ARG_ENABLE(rpath,
321
 
    [  --disable-rpath         do not hardcode runtime library paths],
322
 
    :, enable_rpath=yes)
323
 
])
324
 
 
325
 
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
326
 
dnl the libraries corresponding to explicit and implicit dependencies.
327
 
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
328
 
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
329
 
[
330
 
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
331
 
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
332
 
  dnl By default, look in $includedir and $libdir.
333
 
  use_additional=yes
334
 
  AC_LIB_WITH_FINAL_PREFIX([
335
 
    eval additional_includedir=\"$includedir\"
336
 
    eval additional_libdir=\"$libdir\"
337
 
  ])
338
 
  AC_LIB_ARG_WITH([lib$1-prefix],
339
 
[  --with-lib$1-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib
340
 
  --without-lib$1-prefix     don't search for lib$1 in includedir and libdir],
341
 
[
342
 
    if test "X$withval" = "Xno"; then
343
 
      use_additional=no
344
 
    else
345
 
      if test "X$withval" = "X"; then
346
 
        AC_LIB_WITH_FINAL_PREFIX([
347
 
          eval additional_includedir=\"$includedir\"
348
 
          eval additional_libdir=\"$libdir\"
349
 
        ])
350
 
      else
351
 
        additional_includedir="$withval/include"
352
 
        additional_libdir="$withval/lib"
353
 
      fi
354
 
    fi
355
 
])
356
 
  dnl Search the library and its dependencies in $additional_libdir and
357
 
  dnl $LDFLAGS. Using breadth-first-seach.
358
 
  LIB[]NAME=
359
 
  LTLIB[]NAME=
360
 
  INC[]NAME=
361
 
  rpathdirs=
362
 
  ltrpathdirs=
363
 
  names_already_handled=
364
 
  names_next_round='$1 $2'
365
 
  while test -n "$names_next_round"; do
366
 
    names_this_round="$names_next_round"
367
 
    names_next_round=
368
 
    for name in $names_this_round; do
369
 
      already_handled=
370
 
      for n in $names_already_handled; do
371
 
        if test "$n" = "$name"; then
372
 
          already_handled=yes
373
 
          break
374
 
        fi
375
 
      done
376
 
      if test -z "$already_handled"; then
377
 
        names_already_handled="$names_already_handled $name"
378
 
        dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
379
 
        dnl or AC_LIB_HAVE_LINKFLAGS call.
380
 
        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
381
 
        eval value=\"\$HAVE_LIB$uppername\"
382
 
        if test -n "$value"; then
383
 
          if test "$value" = yes; then
384
 
            eval value=\"\$LIB$uppername\"
385
 
            test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
386
 
            eval value=\"\$LTLIB$uppername\"
387
 
            test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
388
 
          else
389
 
            dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
390
 
            dnl that this library doesn't exist. So just drop it.
391
 
            :
392
 
          fi
393
 
        else
394
 
          dnl Search the library lib$name in $additional_libdir and $LDFLAGS
395
 
          dnl and the already constructed $LIBNAME/$LTLIBNAME.
396
 
          found_dir=
397
 
          found_la=
398
 
          found_so=
399
 
          found_a=
400
 
          if test $use_additional = yes; then
401
 
            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
402
 
              found_dir="$additional_libdir"
403
 
              found_so="$additional_libdir/lib$name.$shlibext"
404
 
              if test -f "$additional_libdir/lib$name.la"; then
405
 
                found_la="$additional_libdir/lib$name.la"
406
 
              fi
407
 
            else
408
 
              if test -f "$additional_libdir/lib$name.$libext"; then
409
 
                found_dir="$additional_libdir"
410
 
                found_a="$additional_libdir/lib$name.$libext"
411
 
                if test -f "$additional_libdir/lib$name.la"; then
412
 
                  found_la="$additional_libdir/lib$name.la"
413
 
                fi
414
 
              fi
415
 
            fi
416
 
          fi
417
 
          if test "X$found_dir" = "X"; then
418
 
            for x in $LDFLAGS $LTLIB[]NAME; do
419
 
              AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
420
 
              case "$x" in
421
 
                -L*)
422
 
                  dir=`echo "X$x" | sed -e 's/^X-L//'`
423
 
                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
424
 
                    found_dir="$dir"
425
 
                    found_so="$dir/lib$name.$shlibext"
426
 
                    if test -f "$dir/lib$name.la"; then
427
 
                      found_la="$dir/lib$name.la"
428
 
                    fi
429
 
                  else
430
 
                    if test -f "$dir/lib$name.$libext"; then
431
 
                      found_dir="$dir"
432
 
                      found_a="$dir/lib$name.$libext"
433
 
                      if test -f "$dir/lib$name.la"; then
434
 
                        found_la="$dir/lib$name.la"
435
 
                      fi
436
 
                    fi
437
 
                  fi
438
 
                  ;;
439
 
              esac
440
 
              if test "X$found_dir" != "X"; then
441
 
                break
442
 
              fi
443
 
            done
444
 
          fi
445
 
          if test "X$found_dir" != "X"; then
446
 
            dnl Found the library.
447
 
            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
448
 
            if test "X$found_so" != "X"; then
449
 
              dnl Linking with a shared library. We attempt to hardcode its
450
 
              dnl directory into the executable's runpath, unless it's the
451
 
              dnl standard /usr/lib.
452
 
              if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
453
 
                dnl No hardcoding is needed.
454
 
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
455
 
              else
456
 
                dnl Use an explicit option to hardcode DIR into the resulting
457
 
                dnl binary.
458
 
                dnl Potentially add DIR to ltrpathdirs.
459
 
                dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
460
 
                haveit=
461
 
                for x in $ltrpathdirs; do
462
 
                  if test "X$x" = "X$found_dir"; then
463
 
                    haveit=yes
464
 
                    break
465
 
                  fi
466
 
                done
467
 
                if test -z "$haveit"; then
468
 
                  ltrpathdirs="$ltrpathdirs $found_dir"
469
 
                fi
470
 
                dnl The hardcoding into $LIBNAME is system dependent.
471
 
                if test "$hardcode_direct" = yes; then
472
 
                  dnl Using DIR/libNAME.so during linking hardcodes DIR into the
473
 
                  dnl resulting binary.
474
 
                  LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
475
 
                else
476
 
                  if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
477
 
                    dnl Use an explicit option to hardcode DIR into the resulting
478
 
                    dnl binary.
479
 
                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
480
 
                    dnl Potentially add DIR to rpathdirs.
481
 
                    dnl The rpathdirs will be appended to $LIBNAME at the end.
482
 
                    haveit=
483
 
                    for x in $rpathdirs; do
484
 
                      if test "X$x" = "X$found_dir"; then
485
 
                        haveit=yes
486
 
                        break
487
 
                      fi
488
 
                    done
489
 
                    if test -z "$haveit"; then
490
 
                      rpathdirs="$rpathdirs $found_dir"
491
 
                    fi
492
 
                  else
493
 
                    dnl Rely on "-L$found_dir".
494
 
                    dnl But don't add it if it's already contained in the LDFLAGS
495
 
                    dnl or the already constructed $LIBNAME
496
 
                    haveit=
497
 
                    for x in $LDFLAGS $LIB[]NAME; do
498
 
                      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
499
 
                      if test "X$x" = "X-L$found_dir"; then
500
 
                        haveit=yes
501
 
                        break
502
 
                      fi
503
 
                    done
504
 
                    if test -z "$haveit"; then
505
 
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
506
 
                    fi
507
 
                    if test "$hardcode_minus_L" != no; then
508
 
                      dnl FIXME: Not sure whether we should use
509
 
                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
510
 
                      dnl here.
511
 
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
512
 
                    else
513
 
                      dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
514
 
                      dnl here, because this doesn't fit in flags passed to the
515
 
                      dnl compiler. So give up. No hardcoding. This affects only
516
 
                      dnl very old systems.
517
 
                      dnl FIXME: Not sure whether we should use
518
 
                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
519
 
                      dnl here.
520
 
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
521
 
                    fi
522
 
                  fi
523
 
                fi
524
 
              fi
525
 
            else
526
 
              if test "X$found_a" != "X"; then
527
 
                dnl Linking with a static library.
528
 
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
529
 
              else
530
 
                dnl We shouldn't come here, but anyway it's good to have a
531
 
                dnl fallback.
532
 
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
533
 
              fi
534
 
            fi
535
 
            dnl Assume the include files are nearby.
536
 
            additional_includedir=
537
 
            case "$found_dir" in
538
 
              */lib | */lib/)
539
 
                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
540
 
                additional_includedir="$basedir/include"
541
 
                ;;
542
 
            esac
543
 
            if test "X$additional_includedir" != "X"; then
544
 
              dnl Potentially add $additional_includedir to $INCNAME.
545
 
              dnl But don't add it
546
 
              dnl   1. if it's the standard /usr/include,
547
 
              dnl   2. if it's /usr/local/include and we are using GCC on Linux,
548
 
              dnl   3. if it's already present in $CPPFLAGS or the already
549
 
              dnl      constructed $INCNAME,
550
 
              dnl   4. if it doesn't exist as a directory.
551
 
              if test "X$additional_includedir" != "X/usr/include"; then
552
 
                haveit=
553
 
                if test "X$additional_includedir" = "X/usr/local/include"; then
554
 
                  if test -n "$GCC"; then
555
 
                    case $host_os in
556
 
                      linux*) haveit=yes;;
557
 
                    esac
558
 
                  fi
559
 
                fi
560
 
                if test -z "$haveit"; then
561
 
                  for x in $CPPFLAGS $INC[]NAME; do
562
 
                    AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
563
 
                    if test "X$x" = "X-I$additional_includedir"; then
564
 
                      haveit=yes
565
 
                      break
566
 
                    fi
567
 
                  done
568
 
                  if test -z "$haveit"; then
569
 
                    if test -d "$additional_includedir"; then
570
 
                      dnl Really add $additional_includedir to $INCNAME.
571
 
                      INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
572
 
                    fi
573
 
                  fi
574
 
                fi
575
 
              fi
576
 
            fi
577
 
            dnl Look for dependencies.
578
 
            if test -n "$found_la"; then
579
 
              dnl Read the .la file. It defines the variables
580
 
              dnl dlname, library_names, old_library, dependency_libs, current,
581
 
              dnl age, revision, installed, dlopen, dlpreopen, libdir.
582
 
              save_libdir="$libdir"
583
 
              case "$found_la" in
584
 
                */* | *\\*) . "$found_la" ;;
585
 
                *) . "./$found_la" ;;
586
 
              esac
587
 
              libdir="$save_libdir"
588
 
              dnl We use only dependency_libs.
589
 
              for dep in $dependency_libs; do
590
 
                case "$dep" in
591
 
                  -L*)
592
 
                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
593
 
                    dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
594
 
                    dnl But don't add it
595
 
                    dnl   1. if it's the standard /usr/lib,
596
 
                    dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
597
 
                    dnl   3. if it's already present in $LDFLAGS or the already
598
 
                    dnl      constructed $LIBNAME,
599
 
                    dnl   4. if it doesn't exist as a directory.
600
 
                    if test "X$additional_libdir" != "X/usr/lib"; then
601
 
                      haveit=
602
 
                      if test "X$additional_libdir" = "X/usr/local/lib"; then
603
 
                        if test -n "$GCC"; then
604
 
                          case $host_os in
605
 
                            linux*) haveit=yes;;
606
 
                          esac
607
 
                        fi
608
 
                      fi
609
 
                      if test -z "$haveit"; then
610
 
                        haveit=
611
 
                        for x in $LDFLAGS $LIB[]NAME; do
612
 
                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
613
 
                          if test "X$x" = "X-L$additional_libdir"; then
614
 
                            haveit=yes
615
 
                            break
616
 
                          fi
617
 
                        done
618
 
                        if test -z "$haveit"; then
619
 
                          if test -d "$additional_libdir"; then
620
 
                            dnl Really add $additional_libdir to $LIBNAME.
621
 
                            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
622
 
                          fi
623
 
                        fi
624
 
                        haveit=
625
 
                        for x in $LDFLAGS $LTLIB[]NAME; do
626
 
                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
627
 
                          if test "X$x" = "X-L$additional_libdir"; then
628
 
                            haveit=yes
629
 
                            break
630
 
                          fi
631
 
                        done
632
 
                        if test -z "$haveit"; then
633
 
                          if test -d "$additional_libdir"; then
634
 
                            dnl Really add $additional_libdir to $LTLIBNAME.
635
 
                            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
636
 
                          fi
637
 
                        fi
638
 
                      fi
639
 
                    fi
640
 
                    ;;
641
 
                  -R*)
642
 
                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
643
 
                    if test "$enable_rpath" != no; then
644
 
                      dnl Potentially add DIR to rpathdirs.
645
 
                      dnl The rpathdirs will be appended to $LIBNAME at the end.
646
 
                      haveit=
647
 
                      for x in $rpathdirs; do
648
 
                        if test "X$x" = "X$dir"; then
649
 
                          haveit=yes
650
 
                          break
651
 
                        fi
652
 
                      done
653
 
                      if test -z "$haveit"; then
654
 
                        rpathdirs="$rpathdirs $dir"
655
 
                      fi
656
 
                      dnl Potentially add DIR to ltrpathdirs.
657
 
                      dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
658
 
                      haveit=
659
 
                      for x in $ltrpathdirs; do
660
 
                        if test "X$x" = "X$dir"; then
661
 
                          haveit=yes
662
 
                          break
663
 
                        fi
664
 
                      done
665
 
                      if test -z "$haveit"; then
666
 
                        ltrpathdirs="$ltrpathdirs $dir"
667
 
                      fi
668
 
                    fi
669
 
                    ;;
670
 
                  -l*)
671
 
                    dnl Handle this in the next round.
672
 
                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
673
 
                    ;;
674
 
                  *.la)
675
 
                    dnl Handle this in the next round. Throw away the .la's
676
 
                    dnl directory; it is already contained in a preceding -L
677
 
                    dnl option.
678
 
                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
679
 
                    ;;
680
 
                  *)
681
 
                    dnl Most likely an immediate library name.
682
 
                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
683
 
                    LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
684
 
                    ;;
685
 
                esac
686
 
              done
687
 
            fi
688
 
          else
689
 
            dnl Didn't find the library; assume it is in the system directories
690
 
            dnl known to the linker and runtime loader. (All the system
691
 
            dnl directories known to the linker should also be known to the
692
 
            dnl runtime loader, otherwise the system is severely misconfigured.)
693
 
            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
694
 
            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
695
 
          fi
696
 
        fi
697
 
      fi
698
 
    done
699
 
  done
700
 
  if test "X$rpathdirs" != "X"; then
701
 
    if test -n "$hardcode_libdir_separator"; then
702
 
      dnl Weird platform: only the last -rpath option counts, the user must
703
 
      dnl pass all path elements in one option. We can arrange that for a
704
 
      dnl single library, but not when more than one $LIBNAMEs are used.
705
 
      alldirs=
706
 
      for found_dir in $rpathdirs; do
707
 
        alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
708
 
      done
709
 
      dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
710
 
      acl_save_libdir="$libdir"
711
 
      libdir="$alldirs"
712
 
      eval flag=\"$hardcode_libdir_flag_spec\"
713
 
      libdir="$acl_save_libdir"
714
 
      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
715
 
    else
716
 
      dnl The -rpath options are cumulative.
717
 
      for found_dir in $rpathdirs; do
718
 
        acl_save_libdir="$libdir"
719
 
        libdir="$found_dir"
720
 
        eval flag=\"$hardcode_libdir_flag_spec\"
721
 
        libdir="$acl_save_libdir"
722
 
        LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
723
 
      done
724
 
    fi
725
 
  fi
726
 
  if test "X$ltrpathdirs" != "X"; then
727
 
    dnl When using libtool, the option that works for both libraries and
728
 
    dnl executables is -R. The -R options are cumulative.
729
 
    for found_dir in $ltrpathdirs; do
730
 
      LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
731
 
    done
732
 
  fi
733
 
])
734
 
 
735
 
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
736
 
dnl unless already present in VAR.
737
 
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
738
 
dnl contains two or three consecutive elements that belong together.
739
 
AC_DEFUN([AC_LIB_APPENDTOVAR],
740
 
[
741
 
  for element in [$2]; do
742
 
    haveit=
743
 
    for x in $[$1]; do
744
 
      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
745
 
      if test "X$x" = "X$element"; then
746
 
        haveit=yes
747
 
        break
748
 
      fi
749
 
    done
750
 
    if test -z "$haveit"; then
751
 
      [$1]="${[$1]}${[$1]:+ }$element"
752
 
    fi
753
 
  done
754
 
])
755
 
 
756
 
# lib-ld.m4 serial 3 (gettext-0.13)
757
 
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
758
 
dnl This file is free software, distributed under the terms of the GNU
759
 
dnl General Public License.  As a special exception to the GNU General
760
 
dnl Public License, this file may be distributed as part of a program
761
 
dnl that contains a configuration script generated by Autoconf, under
762
 
dnl the same distribution terms as the rest of that program.
763
 
 
764
 
dnl Subroutines of libtool.m4,
765
 
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
766
 
dnl with libtool.m4.
767
 
 
768
 
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
769
 
AC_DEFUN([AC_LIB_PROG_LD_GNU],
770
 
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
771
 
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
772
 
case `$LD -v 2>&1 </dev/null` in
773
 
*GNU* | *'with BFD'*)
774
 
  acl_cv_prog_gnu_ld=yes ;;
775
 
*)
776
 
  acl_cv_prog_gnu_ld=no ;;
777
 
esac])
778
 
with_gnu_ld=$acl_cv_prog_gnu_ld
779
 
])
780
 
 
781
 
dnl From libtool-1.4. Sets the variable LD.
782
 
AC_DEFUN([AC_LIB_PROG_LD],
783
 
[AC_ARG_WITH(gnu-ld,
784
 
[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
785
 
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
786
 
AC_REQUIRE([AC_PROG_CC])dnl
787
 
AC_REQUIRE([AC_CANONICAL_HOST])dnl
788
 
# Prepare PATH_SEPARATOR.
789
 
# The user is always right.
790
 
if test "${PATH_SEPARATOR+set}" != set; then
791
 
  echo "#! /bin/sh" >conf$$.sh
792
 
  echo  "exit 0"   >>conf$$.sh
793
 
  chmod +x conf$$.sh
794
 
  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
795
 
    PATH_SEPARATOR=';'
796
 
  else
797
 
    PATH_SEPARATOR=:
798
 
  fi
799
 
  rm -f conf$$.sh
800
 
fi
801
 
ac_prog=ld
802
 
if test "$GCC" = yes; then
803
 
  # Check if gcc -print-prog-name=ld gives a path.
804
 
  AC_MSG_CHECKING([for ld used by GCC])
805
 
  case $host in
806
 
  *-*-mingw*)
807
 
    # gcc leaves a trailing carriage return which upsets mingw
808
 
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
809
 
  *)
810
 
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
811
 
  esac
812
 
  case $ac_prog in
813
 
    # Accept absolute paths.
814
 
    [[\\/]* | [A-Za-z]:[\\/]*)]
815
 
      [re_direlt='/[^/][^/]*/\.\./']
816
 
      # Canonicalize the path of ld
817
 
      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
818
 
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
819
 
        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
820
 
      done
821
 
      test -z "$LD" && LD="$ac_prog"
822
 
      ;;
823
 
  "")
824
 
    # If it fails, then pretend we aren't using GCC.
825
 
    ac_prog=ld
826
 
    ;;
827
 
  *)
828
 
    # If it is relative, then search for the first ld in PATH.
829
 
    with_gnu_ld=unknown
830
 
    ;;
831
 
  esac
832
 
elif test "$with_gnu_ld" = yes; then
833
 
  AC_MSG_CHECKING([for GNU ld])
834
 
else
835
 
  AC_MSG_CHECKING([for non-GNU ld])
836
 
fi
837
 
AC_CACHE_VAL(acl_cv_path_LD,
838
 
[if test -z "$LD"; then
839
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
840
 
  for ac_dir in $PATH; do
841
 
    test -z "$ac_dir" && ac_dir=.
842
 
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
843
 
      acl_cv_path_LD="$ac_dir/$ac_prog"
844
 
      # Check to see if the program is GNU ld.  I'd rather use --version,
845
 
      # but apparently some GNU ld's only accept -v.
846
 
      # Break only if it was the GNU/non-GNU ld that we prefer.
847
 
      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
848
 
      *GNU* | *'with BFD'*)
849
 
        test "$with_gnu_ld" != no && break ;;
850
 
      *)
851
 
        test "$with_gnu_ld" != yes && break ;;
852
 
      esac
853
 
    fi
854
 
  done
855
 
  IFS="$ac_save_ifs"
856
 
else
857
 
  acl_cv_path_LD="$LD" # Let the user override the test with a path.
858
 
fi])
859
 
LD="$acl_cv_path_LD"
860
 
if test -n "$LD"; then
861
 
  AC_MSG_RESULT($LD)
862
 
else
863
 
  AC_MSG_RESULT(no)
864
 
fi
865
 
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
866
 
AC_LIB_PROG_LD_GNU
867
 
])
868
 
 
869
 
# Do all the work for Automake.  This macro actually does too much --
870
 
# some checks are only needed if your package does certain things.
871
 
# But this isn't really a big deal.
872
 
 
873
 
# serial 1
874
 
 
875
 
dnl Usage:
876
 
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
877
 
 
878
 
AC_DEFUN([AM_INIT_AUTOMAKE],
879
 
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
880
 
AC_REQUIRE([AC_PROG_INSTALL])
881
 
PACKAGE=[$1]
882
 
AC_SUBST(PACKAGE)
883
 
VERSION=[$2]
884
 
AC_SUBST(VERSION)
885
 
dnl test to see if srcdir already configured
886
 
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
887
 
  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
888
 
fi
889
 
ifelse([$3],,
890
 
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
891
 
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
892
 
AC_REQUIRE([AM_SANITY_CHECK])
893
 
AC_REQUIRE([AC_ARG_PROGRAM])
894
 
dnl FIXME This is truly gross.
895
 
missing_dir=`cd $ac_aux_dir && pwd`
896
 
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
897
 
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
898
 
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
899
 
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
900
 
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
901
 
AC_REQUIRE([AC_PROG_MAKE_SET])])
902
 
 
903
 
# Copyright 2002  Free Software Foundation, Inc.
904
 
 
905
 
# This program is free software; you can redistribute it and/or modify
906
 
# it under the terms of the GNU General Public License as published by
907
 
# the Free Software Foundation; either version 2, or (at your option)
908
 
# any later version.
 
1
# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
 
2
 
 
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 
4
# 2005  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.
909
8
 
910
9
# This program is distributed in the hope that it will be useful,
911
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
912
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
913
 
# GNU General Public License for more details.
 
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.
914
13
 
915
 
# You should have received a copy of the GNU General Public License
916
 
# along with this program; if not, write to the Free Software
917
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
14
# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
 
15
#
 
16
# This file is free software; the Free Software Foundation
 
17
# gives unlimited permission to copy and/or distribute it,
 
18
# with or without modifications, as long as this notice is preserved.
918
19
 
919
20
# AM_AUTOMAKE_VERSION(VERSION)
920
21
# ----------------------------
921
22
# Automake X.Y traces this macro to ensure aclocal.m4 has been
922
23
# generated from the m4 files accompanying Automake X.Y.
923
 
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
 
24
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
924
25
 
925
26
# AM_SET_CURRENT_AUTOMAKE_VERSION
926
27
# -------------------------------
927
28
# Call AM_AUTOMAKE_VERSION so it can be traced.
928
29
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
929
30
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
930
 
         [AM_AUTOMAKE_VERSION([1.4-p6])])
931
 
 
932
 
#
933
 
# Check to make sure that the build environment is sane.
934
 
#
935
 
 
 
31
         [AM_AUTOMAKE_VERSION([1.9.6])])
 
32
 
 
33
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
34
 
 
35
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
36
#
 
37
# This file is free software; the Free Software Foundation
 
38
# gives unlimited permission to copy and/or distribute it,
 
39
# with or without modifications, as long as this notice is preserved.
 
40
 
 
41
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
 
42
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
 
43
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
 
44
#
 
45
# Of course, Automake must honor this variable whenever it calls a
 
46
# tool from the auxiliary directory.  The problem is that $srcdir (and
 
47
# therefore $ac_aux_dir as well) can be either absolute or relative,
 
48
# depending on how configure is run.  This is pretty annoying, since
 
49
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
 
50
# source directory, any form will work fine, but in subdirectories a
 
51
# relative path needs to be adjusted first.
 
52
#
 
53
# $ac_aux_dir/missing
 
54
#    fails when called from a subdirectory if $ac_aux_dir is relative
 
55
# $top_srcdir/$ac_aux_dir/missing
 
56
#    fails if $ac_aux_dir is absolute,
 
57
#    fails when called from a subdirectory in a VPATH build with
 
58
#          a relative $ac_aux_dir
 
59
#
 
60
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
 
61
# are both prefixed by $srcdir.  In an in-source build this is usually
 
62
# harmless because $srcdir is `.', but things will broke when you
 
63
# start a VPATH build or use an absolute $srcdir.
 
64
#
 
65
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
 
66
# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
 
67
#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
 
68
# and then we would define $MISSING as
 
69
#   MISSING="\${SHELL} $am_aux_dir/missing"
 
70
# This will work as long as MISSING is not called from configure, because
 
71
# unfortunately $(top_srcdir) has no meaning in configure.
 
72
# However there are other variables, like CC, which are often used in
 
73
# configure, and could therefore not use this "fixed" $ac_aux_dir.
 
74
#
 
75
# Another solution, used here, is to always expand $ac_aux_dir to an
 
76
# absolute PATH.  The drawback is that using absolute paths prevent a
 
77
# configured tree to be moved without reconfiguration.
 
78
 
 
79
AC_DEFUN([AM_AUX_DIR_EXPAND],
 
80
[dnl Rely on autoconf to set up CDPATH properly.
 
81
AC_PREREQ([2.50])dnl
 
82
# expand $ac_aux_dir to an absolute path
 
83
am_aux_dir=`cd $ac_aux_dir && pwd`
 
84
])
 
85
 
 
86
# AM_CONDITIONAL                                            -*- Autoconf -*-
 
87
 
 
88
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
 
89
# Free Software Foundation, Inc.
 
90
#
 
91
# This file is free software; the Free Software Foundation
 
92
# gives unlimited permission to copy and/or distribute it,
 
93
# with or without modifications, as long as this notice is preserved.
 
94
 
 
95
# serial 7
 
96
 
 
97
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
 
98
# -------------------------------------
 
99
# Define a conditional.
 
100
AC_DEFUN([AM_CONDITIONAL],
 
101
[AC_PREREQ(2.52)dnl
 
102
 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
 
103
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
 
104
AC_SUBST([$1_TRUE])
 
105
AC_SUBST([$1_FALSE])
 
106
if $2; then
 
107
  $1_TRUE=
 
108
  $1_FALSE='#'
 
109
else
 
110
  $1_TRUE='#'
 
111
  $1_FALSE=
 
112
fi
 
113
AC_CONFIG_COMMANDS_PRE(
 
114
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
 
115
  AC_MSG_ERROR([[conditional "$1" was never defined.
 
116
Usually this means the macro was only invoked conditionally.]])
 
117
fi])])
 
118
 
 
119
 
 
120
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
 
121
# Free Software Foundation, Inc.
 
122
#
 
123
# This file is free software; the Free Software Foundation
 
124
# gives unlimited permission to copy and/or distribute it,
 
125
# with or without modifications, as long as this notice is preserved.
 
126
 
 
127
# serial 8
 
128
 
 
129
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 
130
# written in clear, in which case automake, when reading aclocal.m4,
 
131
# will think it sees a *use*, and therefore will trigger all it's
 
132
# C support machinery.  Also note that it means that autoscan, seeing
 
133
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
 
134
 
 
135
 
 
136
# _AM_DEPENDENCIES(NAME)
 
137
# ----------------------
 
138
# See how the compiler implements dependency checking.
 
139
# NAME is "CC", "CXX", "GCJ", or "OBJC".
 
140
# We try a few techniques and use that to set a single cache variable.
 
141
#
 
142
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
 
143
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
 
144
# dependency, and given that the user is not expected to run this macro,
 
145
# just rely on AC_PROG_CC.
 
146
AC_DEFUN([_AM_DEPENDENCIES],
 
147
[AC_REQUIRE([AM_SET_DEPDIR])dnl
 
148
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
 
149
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
 
150
AC_REQUIRE([AM_DEP_TRACK])dnl
 
151
 
 
152
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
 
153
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
 
154
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
 
155
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
 
156
                   [depcc="$$1"   am_compiler_list=])
 
157
 
 
158
AC_CACHE_CHECK([dependency style of $depcc],
 
159
               [am_cv_$1_dependencies_compiler_type],
 
160
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
 
161
  # We make a subdir and do the tests there.  Otherwise we can end up
 
162
  # making bogus files that we don't know about and never remove.  For
 
163
  # instance it was reported that on HP-UX the gcc test will end up
 
164
  # making a dummy file named `D' -- because `-MD' means `put the output
 
165
  # in D'.
 
166
  mkdir conftest.dir
 
167
  # Copy depcomp to subdir because otherwise we won't find it if we're
 
168
  # using a relative directory.
 
169
  cp "$am_depcomp" conftest.dir
 
170
  cd conftest.dir
 
171
  # We will build objects and dependencies in a subdirectory because
 
172
  # it helps to detect inapplicable dependency modes.  For instance
 
173
  # both Tru64's cc and ICC support -MD to output dependencies as a
 
174
  # side effect of compilation, but ICC will put the dependencies in
 
175
  # the current directory while Tru64 will put them in the object
 
176
  # directory.
 
177
  mkdir sub
 
178
 
 
179
  am_cv_$1_dependencies_compiler_type=none
 
180
  if test "$am_compiler_list" = ""; then
 
181
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
 
182
  fi
 
183
  for depmode in $am_compiler_list; do
 
184
    # Setup a source with many dependencies, because some compilers
 
185
    # like to wrap large dependency lists on column 80 (with \), and
 
186
    # we should not choose a depcomp mode which is confused by this.
 
187
    #
 
188
    # We need to recreate these files for each test, as the compiler may
 
189
    # overwrite some of them when testing with obscure command lines.
 
190
    # This happens at least with the AIX C compiler.
 
191
    : > sub/conftest.c
 
192
    for i in 1 2 3 4 5 6; do
 
193
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
 
194
      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
 
195
      # Solaris 8's {/usr,}/bin/sh.
 
196
      touch sub/conftst$i.h
 
197
    done
 
198
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
199
 
 
200
    case $depmode in
 
201
    nosideeffect)
 
202
      # after this tag, mechanisms are not by side-effect, so they'll
 
203
      # only be used when explicitly requested
 
204
      if test "x$enable_dependency_tracking" = xyes; then
 
205
        continue
 
206
      else
 
207
        break
 
208
      fi
 
209
      ;;
 
210
    none) break ;;
 
211
    esac
 
212
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
 
213
    # mode.  It turns out that the SunPro C++ compiler does not properly
 
214
    # handle `-M -o', and we need to detect this.
 
215
    if depmode=$depmode \
 
216
       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
 
217
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
 
218
       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
 
219
         >/dev/null 2>conftest.err &&
 
220
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
 
221
       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
 
222
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
 
223
      # icc doesn't choke on unknown options, it will just issue warnings
 
224
      # or remarks (even with -Werror).  So we grep stderr for any message
 
225
      # that says an option was ignored or not supported.
 
226
      # When given -MP, icc 7.0 and 7.1 complain thusly:
 
227
      #   icc: Command line warning: ignoring option '-M'; no argument required
 
228
      # The diagnosis changed in icc 8.0:
 
229
      #   icc: Command line remark: option '-MP' not supported
 
230
      if (grep 'ignoring option' conftest.err ||
 
231
          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
 
232
        am_cv_$1_dependencies_compiler_type=$depmode
 
233
        break
 
234
      fi
 
235
    fi
 
236
  done
 
237
 
 
238
  cd ..
 
239
  rm -rf conftest.dir
 
240
else
 
241
  am_cv_$1_dependencies_compiler_type=none
 
242
fi
 
243
])
 
244
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
 
245
AM_CONDITIONAL([am__fastdep$1], [
 
246
  test "x$enable_dependency_tracking" != xno \
 
247
  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
 
248
])
 
249
 
 
250
 
 
251
# AM_SET_DEPDIR
 
252
# -------------
 
253
# Choose a directory name for dependency files.
 
254
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
 
255
AC_DEFUN([AM_SET_DEPDIR],
 
256
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 
257
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
 
258
])
 
259
 
 
260
 
 
261
# AM_DEP_TRACK
 
262
# ------------
 
263
AC_DEFUN([AM_DEP_TRACK],
 
264
[AC_ARG_ENABLE(dependency-tracking,
 
265
[  --disable-dependency-tracking  speeds up one-time build
 
266
  --enable-dependency-tracking   do not reject slow dependency extractors])
 
267
if test "x$enable_dependency_tracking" != xno; then
 
268
  am_depcomp="$ac_aux_dir/depcomp"
 
269
  AMDEPBACKSLASH='\'
 
270
fi
 
271
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
 
272
AC_SUBST([AMDEPBACKSLASH])
 
273
])
 
274
 
 
275
# Generate code to set up dependency tracking.              -*- Autoconf -*-
 
276
 
 
277
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
 
278
# Free Software Foundation, Inc.
 
279
#
 
280
# This file is free software; the Free Software Foundation
 
281
# gives unlimited permission to copy and/or distribute it,
 
282
# with or without modifications, as long as this notice is preserved.
 
283
 
 
284
#serial 3
 
285
 
 
286
# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
287
# ------------------------------
 
288
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
 
289
[for mf in $CONFIG_FILES; do
 
290
  # Strip MF so we end up with the name of the file.
 
291
  mf=`echo "$mf" | sed -e 's/:.*$//'`
 
292
  # Check whether this is an Automake generated Makefile or not.
 
293
  # We used to match only the files named `Makefile.in', but
 
294
  # some people rename them; so instead we look at the file content.
 
295
  # Grep'ing the first line is not enough: some people post-process
 
296
  # each Makefile.in and add a new line on top of each file to say so.
 
297
  # So let's grep whole file.
 
298
  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
 
299
    dirpart=`AS_DIRNAME("$mf")`
 
300
  else
 
301
    continue
 
302
  fi
 
303
  # Extract the definition of DEPDIR, am__include, and am__quote
 
304
  # from the Makefile without running `make'.
 
305
  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
 
306
  test -z "$DEPDIR" && continue
 
307
  am__include=`sed -n 's/^am__include = //p' < "$mf"`
 
308
  test -z "am__include" && continue
 
309
  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
 
310
  # When using ansi2knr, U may be empty or an underscore; expand it
 
311
  U=`sed -n 's/^U = //p' < "$mf"`
 
312
  # Find all dependency output files, they are included files with
 
313
  # $(DEPDIR) in their names.  We invoke sed twice because it is the
 
314
  # simplest approach to changing $(DEPDIR) to its actual value in the
 
315
  # expansion.
 
316
  for file in `sed -n "
 
317
    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
 
318
       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
 
319
    # Make sure the directory exists.
 
320
    test -f "$dirpart/$file" && continue
 
321
    fdir=`AS_DIRNAME(["$file"])`
 
322
    AS_MKDIR_P([$dirpart/$fdir])
 
323
    # echo "creating $dirpart/$file"
 
324
    echo '# dummy' > "$dirpart/$file"
 
325
  done
 
326
done
 
327
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
328
 
 
329
 
 
330
# AM_OUTPUT_DEPENDENCY_COMMANDS
 
331
# -----------------------------
 
332
# This macro should only be invoked once -- use via AC_REQUIRE.
 
333
#
 
334
# This code is only required when automatic dependency tracking
 
335
# is enabled.  FIXME.  This creates each `.P' file that we will
 
336
# need in order to bootstrap the dependency handling code.
 
337
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
338
[AC_CONFIG_COMMANDS([depfiles],
 
339
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
 
340
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
 
341
])
 
342
 
 
343
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
 
344
# Free Software Foundation, Inc.
 
345
#
 
346
# This file is free software; the Free Software Foundation
 
347
# gives unlimited permission to copy and/or distribute it,
 
348
# with or without modifications, as long as this notice is preserved.
 
349
 
 
350
# serial 8
 
351
 
 
352
# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
 
353
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
 
354
 
 
355
# Do all the work for Automake.                             -*- Autoconf -*-
 
356
 
 
357
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
 
358
# Free Software Foundation, Inc.
 
359
#
 
360
# This file is free software; the Free Software Foundation
 
361
# gives unlimited permission to copy and/or distribute it,
 
362
# with or without modifications, as long as this notice is preserved.
 
363
 
 
364
# serial 12
 
365
 
 
366
# This macro actually does too much.  Some checks are only needed if
 
367
# your package does certain things.  But this isn't really a big deal.
 
368
 
 
369
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
 
370
# AM_INIT_AUTOMAKE([OPTIONS])
 
371
# -----------------------------------------------
 
372
# The call with PACKAGE and VERSION arguments is the old style
 
373
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
 
374
# and VERSION should now be passed to AC_INIT and removed from
 
375
# the call to AM_INIT_AUTOMAKE.
 
376
# We support both call styles for the transition.  After
 
377
# the next Automake release, Autoconf can make the AC_INIT
 
378
# arguments mandatory, and then we can depend on a new Autoconf
 
379
# release and drop the old call support.
 
380
AC_DEFUN([AM_INIT_AUTOMAKE],
 
381
[AC_PREREQ([2.58])dnl
 
382
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
 
383
dnl the ones we care about.
 
384
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
 
385
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
 
386
AC_REQUIRE([AC_PROG_INSTALL])dnl
 
387
# test to see if srcdir already configured
 
388
if test "`cd $srcdir && pwd`" != "`pwd`" &&
 
389
   test -f $srcdir/config.status; then
 
390
  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
 
391
fi
 
392
 
 
393
# test whether we have cygpath
 
394
if test -z "$CYGPATH_W"; then
 
395
  if (cygpath --version) >/dev/null 2>/dev/null; then
 
396
    CYGPATH_W='cygpath -w'
 
397
  else
 
398
    CYGPATH_W=echo
 
399
  fi
 
400
fi
 
401
AC_SUBST([CYGPATH_W])
 
402
 
 
403
# Define the identity of the package.
 
404
dnl Distinguish between old-style and new-style calls.
 
405
m4_ifval([$2],
 
406
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
 
407
 AC_SUBST([PACKAGE], [$1])dnl
 
408
 AC_SUBST([VERSION], [$2])],
 
409
[_AM_SET_OPTIONS([$1])dnl
 
410
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
 
411
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 
412
 
 
413
_AM_IF_OPTION([no-define],,
 
414
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
 
415
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
 
416
 
 
417
# Some tools Automake needs.
 
418
AC_REQUIRE([AM_SANITY_CHECK])dnl
 
419
AC_REQUIRE([AC_ARG_PROGRAM])dnl
 
420
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
 
421
AM_MISSING_PROG(AUTOCONF, autoconf)
 
422
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
 
423
AM_MISSING_PROG(AUTOHEADER, autoheader)
 
424
AM_MISSING_PROG(MAKEINFO, makeinfo)
 
425
AM_PROG_INSTALL_SH
 
426
AM_PROG_INSTALL_STRIP
 
427
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
 
428
# We need awk for the "check" target.  The system "awk" is bad on
 
429
# some platforms.
 
430
AC_REQUIRE([AC_PROG_AWK])dnl
 
431
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 
432
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 
433
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
 
434
              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
 
435
                             [_AM_PROG_TAR([v7])])])
 
436
_AM_IF_OPTION([no-dependencies],,
 
437
[AC_PROVIDE_IFELSE([AC_PROG_CC],
 
438
                  [_AM_DEPENDENCIES(CC)],
 
439
                  [define([AC_PROG_CC],
 
440
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
 
441
AC_PROVIDE_IFELSE([AC_PROG_CXX],
 
442
                  [_AM_DEPENDENCIES(CXX)],
 
443
                  [define([AC_PROG_CXX],
 
444
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
 
445
])
 
446
])
 
447
 
 
448
 
 
449
# When config.status generates a header, we must update the stamp-h file.
 
450
# This file resides in the same directory as the config header
 
451
# that is generated.  The stamp files are numbered to have different names.
 
452
 
 
453
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
 
454
# loop where config.status creates the headers, so we can generate
 
455
# our stamp files there.
 
456
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
 
457
[# Compute $1's index in $config_headers.
 
458
_am_stamp_count=1
 
459
for _am_header in $config_headers :; do
 
460
  case $_am_header in
 
461
    $1 | $1:* )
 
462
      break ;;
 
463
    * )
 
464
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
 
465
  esac
 
466
done
 
467
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
 
468
 
 
469
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
470
#
 
471
# This file is free software; the Free Software Foundation
 
472
# gives unlimited permission to copy and/or distribute it,
 
473
# with or without modifications, as long as this notice is preserved.
 
474
 
 
475
# AM_PROG_INSTALL_SH
 
476
# ------------------
 
477
# Define $install_sh.
 
478
AC_DEFUN([AM_PROG_INSTALL_SH],
 
479
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
480
install_sh=${install_sh-"$am_aux_dir/install-sh"}
 
481
AC_SUBST(install_sh)])
 
482
 
 
483
# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
 
484
#
 
485
# This file is free software; the Free Software Foundation
 
486
# gives unlimited permission to copy and/or distribute it,
 
487
# with or without modifications, as long as this notice is preserved.
 
488
 
 
489
# serial 2
 
490
 
 
491
# Check whether the underlying file-system supports filenames
 
492
# with a leading dot.  For instance MS-DOS doesn't.
 
493
AC_DEFUN([AM_SET_LEADING_DOT],
 
494
[rm -rf .tst 2>/dev/null
 
495
mkdir .tst 2>/dev/null
 
496
if test -d .tst; then
 
497
  am__leading_dot=.
 
498
else
 
499
  am__leading_dot=_
 
500
fi
 
501
rmdir .tst 2>/dev/null
 
502
AC_SUBST([am__leading_dot])])
 
503
 
 
504
# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005
 
505
# Free Software Foundation, Inc.
 
506
#
 
507
# This file is free software; the Free Software Foundation
 
508
# gives unlimited permission to copy and/or distribute it,
 
509
# with or without modifications, as long as this notice is preserved.
 
510
 
 
511
# serial 5
 
512
 
 
513
# AM_PROG_LEX
 
514
# -----------
 
515
# Autoconf leaves LEX=: if lex or flex can't be found.  Change that to a
 
516
# "missing" invocation, for better error output.
 
517
AC_DEFUN([AM_PROG_LEX],
 
518
[AC_PREREQ(2.50)dnl
 
519
AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
 
520
AC_REQUIRE([AC_PROG_LEX])dnl
 
521
if test "$LEX" = :; then
 
522
  LEX=${am_missing_run}flex
 
523
fi])
 
524
 
 
525
# Check to see how 'make' treats includes.                  -*- Autoconf -*-
 
526
 
 
527
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
 
528
#
 
529
# This file is free software; the Free Software Foundation
 
530
# gives unlimited permission to copy and/or distribute it,
 
531
# with or without modifications, as long as this notice is preserved.
 
532
 
 
533
# serial 3
 
534
 
 
535
# AM_MAKE_INCLUDE()
 
536
# -----------------
 
537
# Check to see how make treats includes.
 
538
AC_DEFUN([AM_MAKE_INCLUDE],
 
539
[am_make=${MAKE-make}
 
540
cat > confinc << 'END'
 
541
am__doit:
 
542
        @echo done
 
543
.PHONY: am__doit
 
544
END
 
545
# If we don't find an include directive, just comment out the code.
 
546
AC_MSG_CHECKING([for style of include used by $am_make])
 
547
am__include="#"
 
548
am__quote=
 
549
_am_result=none
 
550
# First try GNU make style include.
 
551
echo "include confinc" > confmf
 
552
# We grep out `Entering directory' and `Leaving directory'
 
553
# messages which can occur if `w' ends up in MAKEFLAGS.
 
554
# In particular we don't look at `^make:' because GNU make might
 
555
# be invoked under some other name (usually "gmake"), in which
 
556
# case it prints its new name instead of `make'.
 
557
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
 
558
   am__include=include
 
559
   am__quote=
 
560
   _am_result=GNU
 
561
fi
 
562
# Now try BSD make style include.
 
563
if test "$am__include" = "#"; then
 
564
   echo '.include "confinc"' > confmf
 
565
   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
 
566
      am__include=.include
 
567
      am__quote="\""
 
568
      _am_result=BSD
 
569
   fi
 
570
fi
 
571
AC_SUBST([am__include])
 
572
AC_SUBST([am__quote])
 
573
AC_MSG_RESULT([$_am_result])
 
574
rm -f confinc confmf
 
575
])
 
576
 
 
577
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
578
 
 
579
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
 
580
# Free Software Foundation, Inc.
 
581
#
 
582
# This file is free software; the Free Software Foundation
 
583
# gives unlimited permission to copy and/or distribute it,
 
584
# with or without modifications, as long as this notice is preserved.
 
585
 
 
586
# serial 4
 
587
 
 
588
# AM_MISSING_PROG(NAME, PROGRAM)
 
589
# ------------------------------
 
590
AC_DEFUN([AM_MISSING_PROG],
 
591
[AC_REQUIRE([AM_MISSING_HAS_RUN])
 
592
$1=${$1-"${am_missing_run}$2"}
 
593
AC_SUBST($1)])
 
594
 
 
595
 
 
596
# AM_MISSING_HAS_RUN
 
597
# ------------------
 
598
# Define MISSING if not defined so far and test if it supports --run.
 
599
# If it does, set am_missing_run to use it, otherwise, to nothing.
 
600
AC_DEFUN([AM_MISSING_HAS_RUN],
 
601
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
602
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
 
603
# Use eval to expand $SHELL
 
604
if eval "$MISSING --run true"; then
 
605
  am_missing_run="$MISSING --run "
 
606
else
 
607
  am_missing_run=
 
608
  AC_MSG_WARN([`missing' script is too old or missing])
 
609
fi
 
610
])
 
611
 
 
612
# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
 
613
#
 
614
# This file is free software; the Free Software Foundation
 
615
# gives unlimited permission to copy and/or distribute it,
 
616
# with or without modifications, as long as this notice is preserved.
 
617
 
 
618
# AM_PROG_MKDIR_P
 
619
# ---------------
 
620
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
 
621
#
 
622
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
 
623
# created by `make install' are always world readable, even if the
 
624
# installer happens to have an overly restrictive umask (e.g. 077).
 
625
# This was a mistake.  There are at least two reasons why we must not
 
626
# use `-m 0755':
 
627
#   - it causes special bits like SGID to be ignored,
 
628
#   - it may be too restrictive (some setups expect 775 directories).
 
629
#
 
630
# Do not use -m 0755 and let people choose whatever they expect by
 
631
# setting umask.
 
632
#
 
633
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
 
634
# Some implementations (such as Solaris 8's) are not thread-safe: if a
 
635
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
 
636
# concurrently, both version can detect that a/ is missing, but only
 
637
# one can create it and the other will error out.  Consequently we
 
638
# restrict ourselves to GNU make (using the --version option ensures
 
639
# this.)
 
640
AC_DEFUN([AM_PROG_MKDIR_P],
 
641
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
 
642
  # We used to keeping the `.' as first argument, in order to
 
643
  # allow $(mkdir_p) to be used without argument.  As in
 
644
  #   $(mkdir_p) $(somedir)
 
645
  # where $(somedir) is conditionally defined.  However this is wrong
 
646
  # for two reasons:
 
647
  #  1. if the package is installed by a user who cannot write `.'
 
648
  #     make install will fail,
 
649
  #  2. the above comment should most certainly read
 
650
  #     $(mkdir_p) $(DESTDIR)$(somedir)
 
651
  #     so it does not work when $(somedir) is undefined and
 
652
  #     $(DESTDIR) is not.
 
653
  #  To support the latter case, we have to write
 
654
  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
 
655
  #  so the `.' trick is pointless.
 
656
  mkdir_p='mkdir -p --'
 
657
else
 
658
  # On NextStep and OpenStep, the `mkdir' command does not
 
659
  # recognize any option.  It will interpret all options as
 
660
  # directories to create, and then abort because `.' already
 
661
  # exists.
 
662
  for d in ./-p ./--version;
 
663
  do
 
664
    test -d $d && rmdir $d
 
665
  done
 
666
  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
 
667
  if test -f "$ac_aux_dir/mkinstalldirs"; then
 
668
    mkdir_p='$(mkinstalldirs)'
 
669
  else
 
670
    mkdir_p='$(install_sh) -d'
 
671
  fi
 
672
fi
 
673
AC_SUBST([mkdir_p])])
 
674
 
 
675
# Helper functions for option handling.                     -*- Autoconf -*-
 
676
 
 
677
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
 
678
#
 
679
# This file is free software; the Free Software Foundation
 
680
# gives unlimited permission to copy and/or distribute it,
 
681
# with or without modifications, as long as this notice is preserved.
 
682
 
 
683
# serial 3
 
684
 
 
685
# _AM_MANGLE_OPTION(NAME)
 
686
# -----------------------
 
687
AC_DEFUN([_AM_MANGLE_OPTION],
 
688
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 
689
 
 
690
# _AM_SET_OPTION(NAME)
 
691
# ------------------------------
 
692
# Set option NAME.  Presently that only means defining a flag for this option.
 
693
AC_DEFUN([_AM_SET_OPTION],
 
694
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
 
695
 
 
696
# _AM_SET_OPTIONS(OPTIONS)
 
697
# ----------------------------------
 
698
# OPTIONS is a space-separated list of Automake options.
 
699
AC_DEFUN([_AM_SET_OPTIONS],
 
700
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 
701
 
 
702
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
 
703
# -------------------------------------------
 
704
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
 
705
AC_DEFUN([_AM_IF_OPTION],
 
706
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
707
 
 
708
# Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
709
 
 
710
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
 
711
# Free Software Foundation, Inc.
 
712
#
 
713
# This file is free software; the Free Software Foundation
 
714
# gives unlimited permission to copy and/or distribute it,
 
715
# with or without modifications, as long as this notice is preserved.
 
716
 
 
717
# serial 4
 
718
 
 
719
# AM_SANITY_CHECK
 
720
# ---------------
936
721
AC_DEFUN([AM_SANITY_CHECK],
937
722
[AC_MSG_CHECKING([whether build environment is sane])
938
723
# Just in case
939
724
sleep 1
940
 
echo timestamp > conftestfile
 
725
echo timestamp > conftest.file
941
726
# Do `set' in a subshell so we don't clobber the current shell's
942
727
# arguments.  Must try -L first in case configure is actually a
943
728
# symlink; some systems play weird games with the mod time of symlinks
944
729
# (eg FreeBSD returns the mod time of the symlink's containing
945
730
# directory).
946
731
if (
947
 
   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
948
 
   if test "[$]*" = "X"; then
 
732
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
 
733
   if test "$[*]" = "X"; then
949
734
      # -L didn't work.
950
 
      set X `ls -t $srcdir/configure conftestfile`
 
735
      set X `ls -t $srcdir/configure conftest.file`
951
736
   fi
952
 
   if test "[$]*" != "X $srcdir/configure conftestfile" \
953
 
      && test "[$]*" != "X conftestfile $srcdir/configure"; then
 
737
   rm -f conftest.file
 
738
   if test "$[*]" != "X $srcdir/configure conftest.file" \
 
739
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
954
740
 
955
741
      # If neither matched, then we have a broken ls.  This can happen
956
742
      # if, for instance, CONFIG_SHELL is bash and it inherits a
960
746
alias in your environment])
961
747
   fi
962
748
 
963
 
   test "[$]2" = conftestfile
 
749
   test "$[2]" = conftest.file
964
750
   )
965
751
then
966
752
   # Ok.
969
755
   AC_MSG_ERROR([newly created file is older than distributed files!
970
756
Check your system clock])
971
757
fi
972
 
rm -f conftest*
973
758
AC_MSG_RESULT(yes)])
974
759
 
975
 
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
976
 
dnl The program must properly implement --version.
977
 
AC_DEFUN([AM_MISSING_PROG],
978
 
[AC_MSG_CHECKING(for working $2)
979
 
# Run test in a subshell; some versions of sh will print an error if
980
 
# an executable is not found, even if stderr is redirected.
981
 
# Redirect stdin to placate older versions of autoconf.  Sigh.
982
 
if ($2 --version) < /dev/null > /dev/null 2>&1; then
983
 
   $1=$2
984
 
   AC_MSG_RESULT(found)
985
 
else
986
 
   $1="$3/missing $2"
987
 
   AC_MSG_RESULT(missing)
 
760
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
761
#
 
762
# This file is free software; the Free Software Foundation
 
763
# gives unlimited permission to copy and/or distribute it,
 
764
# with or without modifications, as long as this notice is preserved.
 
765
 
 
766
# AM_PROG_INSTALL_STRIP
 
767
# ---------------------
 
768
# One issue with vendor `install' (even GNU) is that you can't
 
769
# specify the program used to strip binaries.  This is especially
 
770
# annoying in cross-compiling environments, where the build's strip
 
771
# is unlikely to handle the host's binaries.
 
772
# Fortunately install-sh will honor a STRIPPROG variable, so we
 
773
# always use install-sh in `make install-strip', and initialize
 
774
# STRIPPROG with the value of the STRIP variable (set by the user).
 
775
AC_DEFUN([AM_PROG_INSTALL_STRIP],
 
776
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 
777
# Installed binaries are usually stripped using `strip' when the user
 
778
# run `make install-strip'.  However `strip' might not be the right
 
779
# tool to use in cross-compilation environments, therefore Automake
 
780
# will honor the `STRIP' environment variable to overrule this program.
 
781
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
 
782
if test "$cross_compiling" != no; then
 
783
  AC_CHECK_TOOL([STRIP], [strip], :)
988
784
fi
989
 
AC_SUBST($1)])
990
 
 
991
 
# Like AC_CONFIG_HEADER, but automatically create stamp file.
992
 
 
993
 
AC_DEFUN([AM_CONFIG_HEADER],
994
 
[AC_PREREQ([2.12])
995
 
AC_CONFIG_HEADER([$1])
996
 
dnl When config.status generates a header, we must update the stamp-h file.
997
 
dnl This file resides in the same directory as the config header
998
 
dnl that is generated.  We must strip everything past the first ":",
999
 
dnl and everything past the last "/".
1000
 
AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
1001
 
ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
1002
 
<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
1003
 
<<am_indx=1
1004
 
for am_file in <<$1>>; do
1005
 
  case " <<$>>CONFIG_HEADERS " in
1006
 
  *" <<$>>am_file "*<<)>>
1007
 
    echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
 
785
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
 
786
AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
787
 
 
788
# Check how to create a tarball.                            -*- Autoconf -*-
 
789
 
 
790
# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
 
791
#
 
792
# This file is free software; the Free Software Foundation
 
793
# gives unlimited permission to copy and/or distribute it,
 
794
# with or without modifications, as long as this notice is preserved.
 
795
 
 
796
# serial 2
 
797
 
 
798
# _AM_PROG_TAR(FORMAT)
 
799
# --------------------
 
800
# Check how to create a tarball in format FORMAT.
 
801
# FORMAT should be one of `v7', `ustar', or `pax'.
 
802
#
 
803
# Substitute a variable $(am__tar) that is a command
 
804
# writing to stdout a FORMAT-tarball containing the directory
 
805
# $tardir.
 
806
#     tardir=directory && $(am__tar) > result.tar
 
807
#
 
808
# Substitute a variable $(am__untar) that extract such
 
809
# a tarball read from stdin.
 
810
#     $(am__untar) < result.tar
 
811
AC_DEFUN([_AM_PROG_TAR],
 
812
[# Always define AMTAR for backward compatibility.
 
813
AM_MISSING_PROG([AMTAR], [tar])
 
814
m4_if([$1], [v7],
 
815
     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
 
816
     [m4_case([$1], [ustar],, [pax],,
 
817
              [m4_fatal([Unknown tar format])])
 
818
AC_MSG_CHECKING([how to create a $1 tar archive])
 
819
# Loop over all known methods to create a tar archive until one works.
 
820
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
 
821
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
 
822
# Do not fold the above two line into one, because Tru64 sh and
 
823
# Solaris sh will not grok spaces in the rhs of `-'.
 
824
for _am_tool in $_am_tools
 
825
do
 
826
  case $_am_tool in
 
827
  gnutar)
 
828
    for _am_tar in tar gnutar gtar;
 
829
    do
 
830
      AM_RUN_LOG([$_am_tar --version]) && break
 
831
    done
 
832
    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
 
833
    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
 
834
    am__untar="$_am_tar -xf -"
 
835
    ;;
 
836
  plaintar)
 
837
    # Must skip GNU tar: if it does not support --format= it doesn't create
 
838
    # ustar tarball either.
 
839
    (tar --version) >/dev/null 2>&1 && continue
 
840
    am__tar='tar chf - "$$tardir"'
 
841
    am__tar_='tar chf - "$tardir"'
 
842
    am__untar='tar xf -'
 
843
    ;;
 
844
  pax)
 
845
    am__tar='pax -L -x $1 -w "$$tardir"'
 
846
    am__tar_='pax -L -x $1 -w "$tardir"'
 
847
    am__untar='pax -r'
 
848
    ;;
 
849
  cpio)
 
850
    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
 
851
    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
 
852
    am__untar='cpio -i -H $1 -d'
 
853
    ;;
 
854
  none)
 
855
    am__tar=false
 
856
    am__tar_=false
 
857
    am__untar=false
1008
858
    ;;
1009
859
  esac
1010
 
  am_indx=`expr "<<$>>am_indx" + 1`
1011
 
done<<>>dnl>>)
1012
 
changequote([,]))])
1013
 
 
1014
 
 
1015
 
dnl AM_PROG_LEX
1016
 
dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
1017
 
AC_DEFUN([AM_PROG_LEX],
1018
 
[missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1)
1019
 
AC_CHECK_PROGS(LEX, flex lex, $missing_dir/missing flex)
1020
 
AC_PROG_LEX
1021
 
AC_DECL_YYTEXT])
1022
 
 
 
860
 
 
861
  # If the value was cached, stop now.  We just wanted to have am__tar
 
862
  # and am__untar set.
 
863
  test -n "${am_cv_prog_tar_$1}" && break
 
864
 
 
865
  # tar/untar a dummy directory, and stop if the command works
 
866
  rm -rf conftest.dir
 
867
  mkdir conftest.dir
 
868
  echo GrepMe > conftest.dir/file
 
869
  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
 
870
  rm -rf conftest.dir
 
871
  if test -s conftest.tar; then
 
872
    AM_RUN_LOG([$am__untar <conftest.tar])
 
873
    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
 
874
  fi
 
875
done
 
876
rm -rf conftest.dir
 
877
 
 
878
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
 
879
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
 
880
AC_SUBST([am__tar])
 
881
AC_SUBST([am__untar])
 
882
]) # _AM_PROG_TAR
 
883
 
 
884
m4_include([acinclude.m4])