~ubuntu-branches/ubuntu/hardy/atomix/hardy

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Guilherme de S. Pastore
  • Date: 2006-04-18 01:44:40 UTC
  • mfrom: (1.1.4 upstream) (2.1.1 etch)
  • Revision ID: james.westby@ubuntu.com-20060418014440-vqx38k082otjtnps
Tags: 2.14.0-1
* New upstream release
* debian/control: updated my e-mail address

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
 
# lib-prefix.m4 serial 4 (gettext-0.14.2)
14
 
dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
15
 
dnl This file is free software; the Free Software Foundation
16
 
dnl gives unlimited permission to copy and/or distribute it,
17
 
dnl with or without modifications, as long as this notice is preserved.
18
 
 
19
 
dnl From Bruno Haible.
20
 
 
21
 
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
22
 
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
23
 
dnl require excessive bracketing.
24
 
ifdef([AC_HELP_STRING],
25
 
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
26
 
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
27
 
 
28
 
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
29
 
dnl to access previously installed libraries. The basic assumption is that
30
 
dnl a user will want packages to use other packages he previously installed
31
 
dnl with the same --prefix option.
32
 
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
33
 
dnl libraries, but is otherwise very convenient.
34
 
AC_DEFUN([AC_LIB_PREFIX],
35
 
[
36
 
  AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
37
 
  AC_REQUIRE([AC_PROG_CC])
38
 
  AC_REQUIRE([AC_CANONICAL_HOST])
39
 
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
40
 
  dnl By default, look in $includedir and $libdir.
41
 
  use_additional=yes
42
 
  AC_LIB_WITH_FINAL_PREFIX([
43
 
    eval additional_includedir=\"$includedir\"
44
 
    eval additional_libdir=\"$libdir\"
45
 
  ])
46
 
  AC_LIB_ARG_WITH([lib-prefix],
47
 
[  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
48
 
  --without-lib-prefix    don't search for libraries in includedir and libdir],
49
 
[
50
 
    if test "X$withval" = "Xno"; then
51
 
      use_additional=no
52
 
    else
53
 
      if test "X$withval" = "X"; then
54
 
        AC_LIB_WITH_FINAL_PREFIX([
55
 
          eval additional_includedir=\"$includedir\"
56
 
          eval additional_libdir=\"$libdir\"
57
 
        ])
58
 
      else
59
 
        additional_includedir="$withval/include"
60
 
        additional_libdir="$withval/lib"
61
 
      fi
62
 
    fi
63
 
])
64
 
  if test $use_additional = yes; then
65
 
    dnl Potentially add $additional_includedir to $CPPFLAGS.
66
 
    dnl But don't add it
67
 
    dnl   1. if it's the standard /usr/include,
68
 
    dnl   2. if it's already present in $CPPFLAGS,
69
 
    dnl   3. if it's /usr/local/include and we are using GCC on Linux,
70
 
    dnl   4. if it doesn't exist as a directory.
71
 
    if test "X$additional_includedir" != "X/usr/include"; then
72
 
      haveit=
73
 
      for x in $CPPFLAGS; do
74
 
        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
75
 
        if test "X$x" = "X-I$additional_includedir"; then
76
 
          haveit=yes
77
 
          break
78
 
        fi
79
 
      done
80
 
      if test -z "$haveit"; then
81
 
        if test "X$additional_includedir" = "X/usr/local/include"; then
82
 
          if test -n "$GCC"; then
83
 
            case $host_os in
84
 
              linux* | gnu* | k*bsd*-gnu) haveit=yes;;
85
 
            esac
86
 
          fi
87
 
        fi
88
 
        if test -z "$haveit"; then
89
 
          if test -d "$additional_includedir"; then
90
 
            dnl Really add $additional_includedir to $CPPFLAGS.
91
 
            CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
92
 
          fi
93
 
        fi
94
 
      fi
95
 
    fi
96
 
    dnl Potentially add $additional_libdir to $LDFLAGS.
97
 
    dnl But don't add it
98
 
    dnl   1. if it's the standard /usr/lib,
99
 
    dnl   2. if it's already present in $LDFLAGS,
100
 
    dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
101
 
    dnl   4. if it doesn't exist as a directory.
102
 
    if test "X$additional_libdir" != "X/usr/lib"; then
103
 
      haveit=
104
 
      for x in $LDFLAGS; do
105
 
        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
106
 
        if test "X$x" = "X-L$additional_libdir"; then
107
 
          haveit=yes
108
 
          break
109
 
        fi
110
 
      done
111
 
      if test -z "$haveit"; then
112
 
        if test "X$additional_libdir" = "X/usr/local/lib"; then
113
 
          if test -n "$GCC"; then
114
 
            case $host_os in
115
 
              linux*) haveit=yes;;
116
 
            esac
117
 
          fi
118
 
        fi
119
 
        if test -z "$haveit"; then
120
 
          if test -d "$additional_libdir"; then
121
 
            dnl Really add $additional_libdir to $LDFLAGS.
122
 
            LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
123
 
          fi
124
 
        fi
125
 
      fi
126
 
    fi
127
 
  fi
128
 
])
129
 
 
130
 
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
131
 
dnl acl_final_exec_prefix, containing the values to which $prefix and
132
 
dnl $exec_prefix will expand at the end of the configure script.
133
 
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
134
 
[
135
 
  dnl Unfortunately, prefix and exec_prefix get only finally determined
136
 
  dnl at the end of configure.
137
 
  if test "X$prefix" = "XNONE"; then
138
 
    acl_final_prefix="$ac_default_prefix"
139
 
  else
140
 
    acl_final_prefix="$prefix"
141
 
  fi
142
 
  if test "X$exec_prefix" = "XNONE"; then
143
 
    acl_final_exec_prefix='${prefix}'
144
 
  else
145
 
    acl_final_exec_prefix="$exec_prefix"
146
 
  fi
147
 
  acl_save_prefix="$prefix"
148
 
  prefix="$acl_final_prefix"
149
 
  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
150
 
  prefix="$acl_save_prefix"
151
 
])
152
 
 
153
 
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
154
 
dnl variables prefix and exec_prefix bound to the values they will have
155
 
dnl at the end of the configure script.
156
 
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
157
 
[
158
 
  acl_save_prefix="$prefix"
159
 
  prefix="$acl_final_prefix"
160
 
  acl_save_exec_prefix="$exec_prefix"
161
 
  exec_prefix="$acl_final_exec_prefix"
162
 
  $1
163
 
  exec_prefix="$acl_save_exec_prefix"
164
 
  prefix="$acl_save_prefix"
165
 
])
166
 
 
167
 
# lib-link.m4 serial 6 (gettext-0.14.3)
168
 
dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
169
 
dnl This file is free software; the Free Software Foundation
170
 
dnl gives unlimited permission to copy and/or distribute it,
171
 
dnl with or without modifications, as long as this notice is preserved.
172
 
 
173
 
dnl From Bruno Haible.
174
 
 
175
 
AC_PREREQ(2.50)
176
 
 
177
 
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
178
 
dnl the libraries corresponding to explicit and implicit dependencies.
179
 
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
180
 
dnl augments the CPPFLAGS variable.
181
 
AC_DEFUN([AC_LIB_LINKFLAGS],
182
 
[
183
 
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
184
 
  AC_REQUIRE([AC_LIB_RPATH])
185
 
  define([Name],[translit([$1],[./-], [___])])
186
 
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
187
 
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
188
 
  AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
189
 
    AC_LIB_LINKFLAGS_BODY([$1], [$2])
190
 
    ac_cv_lib[]Name[]_libs="$LIB[]NAME"
191
 
    ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
192
 
    ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
193
 
  ])
194
 
  LIB[]NAME="$ac_cv_lib[]Name[]_libs"
195
 
  LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
196
 
  INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
197
 
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
198
 
  AC_SUBST([LIB]NAME)
199
 
  AC_SUBST([LTLIB]NAME)
200
 
  dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
201
 
  dnl results of this search when this library appears as a dependency.
202
 
  HAVE_LIB[]NAME=yes
203
 
  undefine([Name])
204
 
  undefine([NAME])
205
 
])
206
 
 
207
 
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
208
 
dnl searches for libname and the libraries corresponding to explicit and
209
 
dnl implicit dependencies, together with the specified include files and
210
 
dnl the ability to compile and link the specified testcode. If found, it
211
 
dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
212
 
dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
213
 
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
214
 
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
215
 
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
216
 
[
217
 
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
218
 
  AC_REQUIRE([AC_LIB_RPATH])
219
 
  define([Name],[translit([$1],[./-], [___])])
220
 
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
221
 
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
222
 
 
223
 
  dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
224
 
  dnl accordingly.
225
 
  AC_LIB_LINKFLAGS_BODY([$1], [$2])
226
 
 
227
 
  dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
228
 
  dnl because if the user has installed lib[]Name and not disabled its use
229
 
  dnl via --without-lib[]Name-prefix, he wants to use it.
230
 
  ac_save_CPPFLAGS="$CPPFLAGS"
231
 
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
232
 
 
233
 
  AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
234
 
    ac_save_LIBS="$LIBS"
235
 
    LIBS="$LIBS $LIB[]NAME"
236
 
    AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
237
 
    LIBS="$ac_save_LIBS"
238
 
  ])
239
 
  if test "$ac_cv_lib[]Name" = yes; then
240
 
    HAVE_LIB[]NAME=yes
241
 
    AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
242
 
    AC_MSG_CHECKING([how to link with lib[]$1])
243
 
    AC_MSG_RESULT([$LIB[]NAME])
244
 
  else
245
 
    HAVE_LIB[]NAME=no
246
 
    dnl If $LIB[]NAME didn't lead to a usable library, we don't need
247
 
    dnl $INC[]NAME either.
248
 
    CPPFLAGS="$ac_save_CPPFLAGS"
249
 
    LIB[]NAME=
250
 
    LTLIB[]NAME=
251
 
  fi
252
 
  AC_SUBST([HAVE_LIB]NAME)
253
 
  AC_SUBST([LIB]NAME)
254
 
  AC_SUBST([LTLIB]NAME)
255
 
  undefine([Name])
256
 
  undefine([NAME])
257
 
])
258
 
 
259
 
dnl Determine the platform dependent parameters needed to use rpath:
260
 
dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
261
 
dnl hardcode_direct, hardcode_minus_L.
262
 
AC_DEFUN([AC_LIB_RPATH],
263
 
[
264
 
  dnl Tell automake >= 1.10 to complain if config.rpath is missing.
265
 
  m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
266
 
  AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
267
 
  AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
268
 
  AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
269
 
  AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
270
 
  AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
271
 
    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
272
 
    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
273
 
    . ./conftest.sh
274
 
    rm -f ./conftest.sh
275
 
    acl_cv_rpath=done
276
 
  ])
277
 
  wl="$acl_cv_wl"
278
 
  libext="$acl_cv_libext"
279
 
  shlibext="$acl_cv_shlibext"
280
 
  hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
281
 
  hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
282
 
  hardcode_direct="$acl_cv_hardcode_direct"
283
 
  hardcode_minus_L="$acl_cv_hardcode_minus_L"
284
 
  dnl Determine whether the user wants rpath handling at all.
285
 
  AC_ARG_ENABLE(rpath,
286
 
    [  --disable-rpath         do not hardcode runtime library paths],
287
 
    :, enable_rpath=yes)
288
 
])
289
 
 
290
 
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
291
 
dnl the libraries corresponding to explicit and implicit dependencies.
292
 
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
293
 
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
294
 
[
295
 
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
296
 
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
297
 
  dnl By default, look in $includedir and $libdir.
298
 
  use_additional=yes
299
 
  AC_LIB_WITH_FINAL_PREFIX([
300
 
    eval additional_includedir=\"$includedir\"
301
 
    eval additional_libdir=\"$libdir\"
302
 
  ])
303
 
  AC_LIB_ARG_WITH([lib$1-prefix],
304
 
[  --with-lib$1-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib
305
 
  --without-lib$1-prefix     don't search for lib$1 in includedir and libdir],
306
 
[
307
 
    if test "X$withval" = "Xno"; then
308
 
      use_additional=no
309
 
    else
310
 
      if test "X$withval" = "X"; then
311
 
        AC_LIB_WITH_FINAL_PREFIX([
312
 
          eval additional_includedir=\"$includedir\"
313
 
          eval additional_libdir=\"$libdir\"
314
 
        ])
315
 
      else
316
 
        additional_includedir="$withval/include"
317
 
        additional_libdir="$withval/lib"
318
 
      fi
319
 
    fi
320
 
])
321
 
  dnl Search the library and its dependencies in $additional_libdir and
322
 
  dnl $LDFLAGS. Using breadth-first-seach.
323
 
  LIB[]NAME=
324
 
  LTLIB[]NAME=
325
 
  INC[]NAME=
326
 
  rpathdirs=
327
 
  ltrpathdirs=
328
 
  names_already_handled=
329
 
  names_next_round='$1 $2'
330
 
  while test -n "$names_next_round"; do
331
 
    names_this_round="$names_next_round"
332
 
    names_next_round=
333
 
    for name in $names_this_round; do
334
 
      already_handled=
335
 
      for n in $names_already_handled; do
336
 
        if test "$n" = "$name"; then
337
 
          already_handled=yes
338
 
          break
339
 
        fi
340
 
      done
341
 
      if test -z "$already_handled"; then
342
 
        names_already_handled="$names_already_handled $name"
343
 
        dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
344
 
        dnl or AC_LIB_HAVE_LINKFLAGS call.
345
 
        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
346
 
        eval value=\"\$HAVE_LIB$uppername\"
347
 
        if test -n "$value"; then
348
 
          if test "$value" = yes; then
349
 
            eval value=\"\$LIB$uppername\"
350
 
            test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
351
 
            eval value=\"\$LTLIB$uppername\"
352
 
            test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
353
 
          else
354
 
            dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
355
 
            dnl that this library doesn't exist. So just drop it.
356
 
            :
357
 
          fi
358
 
        else
359
 
          dnl Search the library lib$name in $additional_libdir and $LDFLAGS
360
 
          dnl and the already constructed $LIBNAME/$LTLIBNAME.
361
 
          found_dir=
362
 
          found_la=
363
 
          found_so=
364
 
          found_a=
365
 
          if test $use_additional = yes; then
366
 
            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
367
 
              found_dir="$additional_libdir"
368
 
              found_so="$additional_libdir/lib$name.$shlibext"
369
 
              if test -f "$additional_libdir/lib$name.la"; then
370
 
                found_la="$additional_libdir/lib$name.la"
371
 
              fi
372
 
            else
373
 
              if test -f "$additional_libdir/lib$name.$libext"; then
374
 
                found_dir="$additional_libdir"
375
 
                found_a="$additional_libdir/lib$name.$libext"
376
 
                if test -f "$additional_libdir/lib$name.la"; then
377
 
                  found_la="$additional_libdir/lib$name.la"
378
 
                fi
379
 
              fi
380
 
            fi
381
 
          fi
382
 
          if test "X$found_dir" = "X"; then
383
 
            for x in $LDFLAGS $LTLIB[]NAME; do
384
 
              AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
385
 
              case "$x" in
386
 
                -L*)
387
 
                  dir=`echo "X$x" | sed -e 's/^X-L//'`
388
 
                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
389
 
                    found_dir="$dir"
390
 
                    found_so="$dir/lib$name.$shlibext"
391
 
                    if test -f "$dir/lib$name.la"; then
392
 
                      found_la="$dir/lib$name.la"
393
 
                    fi
394
 
                  else
395
 
                    if test -f "$dir/lib$name.$libext"; then
396
 
                      found_dir="$dir"
397
 
                      found_a="$dir/lib$name.$libext"
398
 
                      if test -f "$dir/lib$name.la"; then
399
 
                        found_la="$dir/lib$name.la"
400
 
                      fi
401
 
                    fi
402
 
                  fi
403
 
                  ;;
404
 
              esac
405
 
              if test "X$found_dir" != "X"; then
406
 
                break
407
 
              fi
408
 
            done
409
 
          fi
410
 
          if test "X$found_dir" != "X"; then
411
 
            dnl Found the library.
412
 
            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
413
 
            if test "X$found_so" != "X"; then
414
 
              dnl Linking with a shared library. We attempt to hardcode its
415
 
              dnl directory into the executable's runpath, unless it's the
416
 
              dnl standard /usr/lib.
417
 
              if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
418
 
                dnl No hardcoding is needed.
419
 
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
420
 
              else
421
 
                dnl Use an explicit option to hardcode DIR into the resulting
422
 
                dnl binary.
423
 
                dnl Potentially add DIR to ltrpathdirs.
424
 
                dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
425
 
                haveit=
426
 
                for x in $ltrpathdirs; do
427
 
                  if test "X$x" = "X$found_dir"; then
428
 
                    haveit=yes
429
 
                    break
430
 
                  fi
431
 
                done
432
 
                if test -z "$haveit"; then
433
 
                  ltrpathdirs="$ltrpathdirs $found_dir"
434
 
                fi
435
 
                dnl The hardcoding into $LIBNAME is system dependent.
436
 
                if test "$hardcode_direct" = yes; then
437
 
                  dnl Using DIR/libNAME.so during linking hardcodes DIR into the
438
 
                  dnl resulting binary.
439
 
                  LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
440
 
                else
441
 
                  if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
442
 
                    dnl Use an explicit option to hardcode DIR into the resulting
443
 
                    dnl binary.
444
 
                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
445
 
                    dnl Potentially add DIR to rpathdirs.
446
 
                    dnl The rpathdirs will be appended to $LIBNAME at the end.
447
 
                    haveit=
448
 
                    for x in $rpathdirs; do
449
 
                      if test "X$x" = "X$found_dir"; then
450
 
                        haveit=yes
451
 
                        break
452
 
                      fi
453
 
                    done
454
 
                    if test -z "$haveit"; then
455
 
                      rpathdirs="$rpathdirs $found_dir"
456
 
                    fi
457
 
                  else
458
 
                    dnl Rely on "-L$found_dir".
459
 
                    dnl But don't add it if it's already contained in the LDFLAGS
460
 
                    dnl or the already constructed $LIBNAME
461
 
                    haveit=
462
 
                    for x in $LDFLAGS $LIB[]NAME; do
463
 
                      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
464
 
                      if test "X$x" = "X-L$found_dir"; then
465
 
                        haveit=yes
466
 
                        break
467
 
                      fi
468
 
                    done
469
 
                    if test -z "$haveit"; then
470
 
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
471
 
                    fi
472
 
                    if test "$hardcode_minus_L" != no; then
473
 
                      dnl FIXME: Not sure whether we should use
474
 
                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
475
 
                      dnl here.
476
 
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
477
 
                    else
478
 
                      dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
479
 
                      dnl here, because this doesn't fit in flags passed to the
480
 
                      dnl compiler. So give up. No hardcoding. This affects only
481
 
                      dnl very old systems.
482
 
                      dnl FIXME: Not sure whether we should use
483
 
                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
484
 
                      dnl here.
485
 
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
486
 
                    fi
487
 
                  fi
488
 
                fi
489
 
              fi
490
 
            else
491
 
              if test "X$found_a" != "X"; then
492
 
                dnl Linking with a static library.
493
 
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
494
 
              else
495
 
                dnl We shouldn't come here, but anyway it's good to have a
496
 
                dnl fallback.
497
 
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
498
 
              fi
499
 
            fi
500
 
            dnl Assume the include files are nearby.
501
 
            additional_includedir=
502
 
            case "$found_dir" in
503
 
              */lib | */lib/)
504
 
                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
505
 
                additional_includedir="$basedir/include"
506
 
                ;;
507
 
            esac
508
 
            if test "X$additional_includedir" != "X"; then
509
 
              dnl Potentially add $additional_includedir to $INCNAME.
510
 
              dnl But don't add it
511
 
              dnl   1. if it's the standard /usr/include,
512
 
              dnl   2. if it's /usr/local/include and we are using GCC on Linux,
513
 
              dnl   3. if it's already present in $CPPFLAGS or the already
514
 
              dnl      constructed $INCNAME,
515
 
              dnl   4. if it doesn't exist as a directory.
516
 
              if test "X$additional_includedir" != "X/usr/include"; then
517
 
                haveit=
518
 
                if test "X$additional_includedir" = "X/usr/local/include"; then
519
 
                  if test -n "$GCC"; then
520
 
                    case $host_os in
521
 
                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
522
 
                    esac
523
 
                  fi
524
 
                fi
525
 
                if test -z "$haveit"; then
526
 
                  for x in $CPPFLAGS $INC[]NAME; do
527
 
                    AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
528
 
                    if test "X$x" = "X-I$additional_includedir"; then
529
 
                      haveit=yes
530
 
                      break
531
 
                    fi
532
 
                  done
533
 
                  if test -z "$haveit"; then
534
 
                    if test -d "$additional_includedir"; then
535
 
                      dnl Really add $additional_includedir to $INCNAME.
536
 
                      INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
537
 
                    fi
538
 
                  fi
539
 
                fi
540
 
              fi
541
 
            fi
542
 
            dnl Look for dependencies.
543
 
            if test -n "$found_la"; then
544
 
              dnl Read the .la file. It defines the variables
545
 
              dnl dlname, library_names, old_library, dependency_libs, current,
546
 
              dnl age, revision, installed, dlopen, dlpreopen, libdir.
547
 
              save_libdir="$libdir"
548
 
              case "$found_la" in
549
 
                */* | *\\*) . "$found_la" ;;
550
 
                *) . "./$found_la" ;;
551
 
              esac
552
 
              libdir="$save_libdir"
553
 
              dnl We use only dependency_libs.
554
 
              for dep in $dependency_libs; do
555
 
                case "$dep" in
556
 
                  -L*)
557
 
                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
558
 
                    dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
559
 
                    dnl But don't add it
560
 
                    dnl   1. if it's the standard /usr/lib,
561
 
                    dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
562
 
                    dnl   3. if it's already present in $LDFLAGS or the already
563
 
                    dnl      constructed $LIBNAME,
564
 
                    dnl   4. if it doesn't exist as a directory.
565
 
                    if test "X$additional_libdir" != "X/usr/lib"; then
566
 
                      haveit=
567
 
                      if test "X$additional_libdir" = "X/usr/local/lib"; then
568
 
                        if test -n "$GCC"; then
569
 
                          case $host_os in
570
 
                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
571
 
                          esac
572
 
                        fi
573
 
                      fi
574
 
                      if test -z "$haveit"; then
575
 
                        haveit=
576
 
                        for x in $LDFLAGS $LIB[]NAME; do
577
 
                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
578
 
                          if test "X$x" = "X-L$additional_libdir"; then
579
 
                            haveit=yes
580
 
                            break
581
 
                          fi
582
 
                        done
583
 
                        if test -z "$haveit"; then
584
 
                          if test -d "$additional_libdir"; then
585
 
                            dnl Really add $additional_libdir to $LIBNAME.
586
 
                            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
587
 
                          fi
588
 
                        fi
589
 
                        haveit=
590
 
                        for x in $LDFLAGS $LTLIB[]NAME; do
591
 
                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
592
 
                          if test "X$x" = "X-L$additional_libdir"; then
593
 
                            haveit=yes
594
 
                            break
595
 
                          fi
596
 
                        done
597
 
                        if test -z "$haveit"; then
598
 
                          if test -d "$additional_libdir"; then
599
 
                            dnl Really add $additional_libdir to $LTLIBNAME.
600
 
                            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
601
 
                          fi
602
 
                        fi
603
 
                      fi
604
 
                    fi
605
 
                    ;;
606
 
                  -R*)
607
 
                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
608
 
                    if test "$enable_rpath" != no; then
609
 
                      dnl Potentially add DIR to rpathdirs.
610
 
                      dnl The rpathdirs will be appended to $LIBNAME at the end.
611
 
                      haveit=
612
 
                      for x in $rpathdirs; do
613
 
                        if test "X$x" = "X$dir"; then
614
 
                          haveit=yes
615
 
                          break
616
 
                        fi
617
 
                      done
618
 
                      if test -z "$haveit"; then
619
 
                        rpathdirs="$rpathdirs $dir"
620
 
                      fi
621
 
                      dnl Potentially add DIR to ltrpathdirs.
622
 
                      dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
623
 
                      haveit=
624
 
                      for x in $ltrpathdirs; do
625
 
                        if test "X$x" = "X$dir"; then
626
 
                          haveit=yes
627
 
                          break
628
 
                        fi
629
 
                      done
630
 
                      if test -z "$haveit"; then
631
 
                        ltrpathdirs="$ltrpathdirs $dir"
632
 
                      fi
633
 
                    fi
634
 
                    ;;
635
 
                  -l*)
636
 
                    dnl Handle this in the next round.
637
 
                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
638
 
                    ;;
639
 
                  *.la)
640
 
                    dnl Handle this in the next round. Throw away the .la's
641
 
                    dnl directory; it is already contained in a preceding -L
642
 
                    dnl option.
643
 
                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
644
 
                    ;;
645
 
                  *)
646
 
                    dnl Most likely an immediate library name.
647
 
                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
648
 
                    LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
649
 
                    ;;
650
 
                esac
651
 
              done
652
 
            fi
653
 
          else
654
 
            dnl Didn't find the library; assume it is in the system directories
655
 
            dnl known to the linker and runtime loader. (All the system
656
 
            dnl directories known to the linker should also be known to the
657
 
            dnl runtime loader, otherwise the system is severely misconfigured.)
658
 
            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
659
 
            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
660
 
          fi
661
 
        fi
662
 
      fi
663
 
    done
664
 
  done
665
 
  if test "X$rpathdirs" != "X"; then
666
 
    if test -n "$hardcode_libdir_separator"; then
667
 
      dnl Weird platform: only the last -rpath option counts, the user must
668
 
      dnl pass all path elements in one option. We can arrange that for a
669
 
      dnl single library, but not when more than one $LIBNAMEs are used.
670
 
      alldirs=
671
 
      for found_dir in $rpathdirs; do
672
 
        alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
673
 
      done
674
 
      dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
675
 
      acl_save_libdir="$libdir"
676
 
      libdir="$alldirs"
677
 
      eval flag=\"$hardcode_libdir_flag_spec\"
678
 
      libdir="$acl_save_libdir"
679
 
      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
680
 
    else
681
 
      dnl The -rpath options are cumulative.
682
 
      for found_dir in $rpathdirs; do
683
 
        acl_save_libdir="$libdir"
684
 
        libdir="$found_dir"
685
 
        eval flag=\"$hardcode_libdir_flag_spec\"
686
 
        libdir="$acl_save_libdir"
687
 
        LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
688
 
      done
689
 
    fi
690
 
  fi
691
 
  if test "X$ltrpathdirs" != "X"; then
692
 
    dnl When using libtool, the option that works for both libraries and
693
 
    dnl executables is -R. The -R options are cumulative.
694
 
    for found_dir in $ltrpathdirs; do
695
 
      LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
696
 
    done
697
 
  fi
698
 
])
699
 
 
700
 
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
701
 
dnl unless already present in VAR.
702
 
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
703
 
dnl contains two or three consecutive elements that belong together.
704
 
AC_DEFUN([AC_LIB_APPENDTOVAR],
705
 
[
706
 
  for element in [$2]; do
707
 
    haveit=
708
 
    for x in $[$1]; do
709
 
      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
710
 
      if test "X$x" = "X$element"; then
711
 
        haveit=yes
712
 
        break
713
 
      fi
714
 
    done
715
 
    if test -z "$haveit"; then
716
 
      [$1]="${[$1]}${[$1]:+ }$element"
717
 
    fi
718
 
  done
719
 
])
720
 
 
721
 
# lib-ld.m4 serial 3 (gettext-0.13)
722
 
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
723
 
dnl This file is free software; the Free Software Foundation
724
 
dnl gives unlimited permission to copy and/or distribute it,
725
 
dnl with or without modifications, as long as this notice is preserved.
726
 
 
727
 
dnl Subroutines of libtool.m4,
728
 
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
729
 
dnl with libtool.m4.
730
 
 
731
 
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
732
 
AC_DEFUN([AC_LIB_PROG_LD_GNU],
733
 
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
734
 
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
735
 
case `$LD -v 2>&1 </dev/null` in
736
 
*GNU* | *'with BFD'*)
737
 
  acl_cv_prog_gnu_ld=yes ;;
738
 
*)
739
 
  acl_cv_prog_gnu_ld=no ;;
740
 
esac])
741
 
with_gnu_ld=$acl_cv_prog_gnu_ld
742
 
])
743
 
 
744
 
dnl From libtool-1.4. Sets the variable LD.
745
 
AC_DEFUN([AC_LIB_PROG_LD],
746
 
[AC_ARG_WITH(gnu-ld,
747
 
[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
748
 
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
749
 
AC_REQUIRE([AC_PROG_CC])dnl
750
 
AC_REQUIRE([AC_CANONICAL_HOST])dnl
751
 
# Prepare PATH_SEPARATOR.
752
 
# The user is always right.
753
 
if test "${PATH_SEPARATOR+set}" != set; then
754
 
  echo "#! /bin/sh" >conf$$.sh
755
 
  echo  "exit 0"   >>conf$$.sh
756
 
  chmod +x conf$$.sh
757
 
  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
758
 
    PATH_SEPARATOR=';'
759
 
  else
760
 
    PATH_SEPARATOR=:
761
 
  fi
762
 
  rm -f conf$$.sh
763
 
fi
764
 
ac_prog=ld
765
 
if test "$GCC" = yes; then
766
 
  # Check if gcc -print-prog-name=ld gives a path.
767
 
  AC_MSG_CHECKING([for ld used by GCC])
768
 
  case $host in
769
 
  *-*-mingw*)
770
 
    # gcc leaves a trailing carriage return which upsets mingw
771
 
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
772
 
  *)
773
 
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
774
 
  esac
775
 
  case $ac_prog in
776
 
    # Accept absolute paths.
777
 
    [[\\/]* | [A-Za-z]:[\\/]*)]
778
 
      [re_direlt='/[^/][^/]*/\.\./']
779
 
      # Canonicalize the path of ld
780
 
      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
781
 
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
782
 
        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
783
 
      done
784
 
      test -z "$LD" && LD="$ac_prog"
785
 
      ;;
786
 
  "")
787
 
    # If it fails, then pretend we aren't using GCC.
788
 
    ac_prog=ld
789
 
    ;;
790
 
  *)
791
 
    # If it is relative, then search for the first ld in PATH.
792
 
    with_gnu_ld=unknown
793
 
    ;;
794
 
  esac
795
 
elif test "$with_gnu_ld" = yes; then
796
 
  AC_MSG_CHECKING([for GNU ld])
797
 
else
798
 
  AC_MSG_CHECKING([for non-GNU ld])
799
 
fi
800
 
AC_CACHE_VAL(acl_cv_path_LD,
801
 
[if test -z "$LD"; then
802
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
803
 
  for ac_dir in $PATH; do
804
 
    test -z "$ac_dir" && ac_dir=.
805
 
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
806
 
      acl_cv_path_LD="$ac_dir/$ac_prog"
807
 
      # Check to see if the program is GNU ld.  I'd rather use --version,
808
 
      # but apparently some GNU ld's only accept -v.
809
 
      # Break only if it was the GNU/non-GNU ld that we prefer.
810
 
      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
811
 
      *GNU* | *'with BFD'*)
812
 
        test "$with_gnu_ld" != no && break ;;
813
 
      *)
814
 
        test "$with_gnu_ld" != yes && break ;;
815
 
      esac
816
 
    fi
817
 
  done
818
 
  IFS="$ac_save_ifs"
819
 
else
820
 
  acl_cv_path_LD="$LD" # Let the user override the test with a path.
821
 
fi])
822
 
LD="$acl_cv_path_LD"
823
 
if test -n "$LD"; then
824
 
  AC_MSG_RESULT($LD)
825
 
else
826
 
  AC_MSG_RESULT(no)
827
 
fi
828
 
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
829
 
AC_LIB_PROG_LD_GNU
830
 
])
831
 
 
832
 
# Do all the work for Automake.  This macro actually does too much --
833
 
# some checks are only needed if your package does certain things.
834
 
# But this isn't really a big deal.
835
 
 
836
 
# serial 1
837
 
 
838
 
dnl Usage:
839
 
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
840
 
 
841
 
AC_DEFUN([AM_INIT_AUTOMAKE],
842
 
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
843
 
AC_REQUIRE([AC_PROG_INSTALL])
844
 
PACKAGE=[$1]
845
 
AC_SUBST(PACKAGE)
846
 
VERSION=[$2]
847
 
AC_SUBST(VERSION)
848
 
dnl test to see if srcdir already configured
849
 
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
850
 
  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
851
 
fi
852
 
ifelse([$3],,
853
 
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
854
 
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
855
 
AC_REQUIRE([AM_SANITY_CHECK])
856
 
AC_REQUIRE([AC_ARG_PROGRAM])
857
 
dnl FIXME This is truly gross.
858
 
missing_dir=`cd $ac_aux_dir && pwd`
859
 
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
860
 
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
861
 
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
862
 
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
863
 
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
864
 
AC_REQUIRE([AC_PROG_MAKE_SET])])
865
 
 
866
 
# Copyright 2002  Free Software Foundation, Inc.
867
 
 
868
 
# This program is free software; you can redistribute it and/or modify
869
 
# it under the terms of the GNU General Public License as published by
870
 
# the Free Software Foundation; either version 2, or (at your option)
871
 
# 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.
872
8
 
873
9
# This program is distributed in the hope that it will be useful,
874
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
875
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
876
 
# GNU General Public License for more details.
877
 
 
878
 
# You should have received a copy of the GNU General Public License
879
 
# along with this program; if not, write to the Free Software
880
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
881
 
 
882
 
# AM_AUTOMAKE_VERSION(VERSION)
883
 
# ----------------------------
884
 
# Automake X.Y traces this macro to ensure aclocal.m4 has been
885
 
# generated from the m4 files accompanying Automake X.Y.
886
 
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
887
 
 
888
 
# AM_SET_CURRENT_AUTOMAKE_VERSION
889
 
# -------------------------------
890
 
# Call AM_AUTOMAKE_VERSION so it can be traced.
891
 
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
892
 
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
893
 
         [AM_AUTOMAKE_VERSION([1.4-p6])])
894
 
 
895
 
#
896
 
# Check to make sure that the build environment is sane.
897
 
#
898
 
 
899
 
AC_DEFUN([AM_SANITY_CHECK],
900
 
[AC_MSG_CHECKING([whether build environment is sane])
901
 
# Just in case
902
 
sleep 1
903
 
echo timestamp > conftestfile
904
 
# Do `set' in a subshell so we don't clobber the current shell's
905
 
# arguments.  Must try -L first in case configure is actually a
906
 
# symlink; some systems play weird games with the mod time of symlinks
907
 
# (eg FreeBSD returns the mod time of the symlink's containing
908
 
# directory).
909
 
if (
910
 
   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
911
 
   if test "[$]*" = "X"; then
912
 
      # -L didn't work.
913
 
      set X `ls -t $srcdir/configure conftestfile`
914
 
   fi
915
 
   if test "[$]*" != "X $srcdir/configure conftestfile" \
916
 
      && test "[$]*" != "X conftestfile $srcdir/configure"; then
917
 
 
918
 
      # If neither matched, then we have a broken ls.  This can happen
919
 
      # if, for instance, CONFIG_SHELL is bash and it inherits a
920
 
      # broken ls alias from the environment.  This has actually
921
 
      # happened.  Such a system could not be considered "sane".
922
 
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
923
 
alias in your environment])
924
 
   fi
925
 
 
926
 
   test "[$]2" = conftestfile
927
 
   )
928
 
then
929
 
   # Ok.
930
 
   :
931
 
else
932
 
   AC_MSG_ERROR([newly created file is older than distributed files!
933
 
Check your system clock])
934
 
fi
935
 
rm -f conftest*
936
 
AC_MSG_RESULT(yes)])
937
 
 
938
 
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
939
 
dnl The program must properly implement --version.
940
 
AC_DEFUN([AM_MISSING_PROG],
941
 
[AC_MSG_CHECKING(for working $2)
942
 
# Run test in a subshell; some versions of sh will print an error if
943
 
# an executable is not found, even if stderr is redirected.
944
 
# Redirect stdin to placate older versions of autoconf.  Sigh.
945
 
if ($2 --version) < /dev/null > /dev/null 2>&1; then
946
 
   $1=$2
947
 
   AC_MSG_RESULT(found)
948
 
else
949
 
   $1="$3/missing $2"
950
 
   AC_MSG_RESULT(missing)
951
 
fi
952
 
AC_SUBST($1)])
953
 
 
954
 
# Like AC_CONFIG_HEADER, but automatically create stamp file.
955
 
 
956
 
AC_DEFUN([AM_CONFIG_HEADER],
957
 
[AC_PREREQ([2.12])
958
 
AC_CONFIG_HEADER([$1])
959
 
dnl When config.status generates a header, we must update the stamp-h file.
960
 
dnl This file resides in the same directory as the config header
961
 
dnl that is generated.  We must strip everything past the first ":",
962
 
dnl and everything past the last "/".
963
 
AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
964
 
ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
965
 
<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
966
 
<<am_indx=1
967
 
for am_file in <<$1>>; do
968
 
  case " <<$>>CONFIG_HEADERS " in
969
 
  *" <<$>>am_file "*<<)>>
970
 
    echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
971
 
    ;;
972
 
  esac
973
 
  am_indx=`expr "<<$>>am_indx" + 1`
974
 
done<<>>dnl>>)
975
 
changequote([,]))])
976
 
 
977
 
 
978
 
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
979
 
# serial 2 IT_PROG_INTLTOOL
980
 
AC_DEFUN([IT_PROG_INTLTOOL],
981
 
[
982
 
 
983
 
if test -n "$1"; then
984
 
    AC_MSG_CHECKING(for intltool >= $1)
985
 
 
986
 
    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ printf "%d", $[1] * 100 + $[2]; }'`
987
 
    INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $[2]; }'  < ${ac_aux_dir}/intltool-update.in`
988
 
    changequote({{,}})
989
 
    INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split(${{2}}, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < ${ac_aux_dir}/intltool-update.in`
990
 
    changequote([,])
991
 
 
992
 
    if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
993
 
        AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
994
 
    else
995
 
        AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool $1 or later.])
996
 
        exit 1
997
 
    fi
998
 
fi
999
 
 
1000
 
  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1001
 
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1002
 
     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1003
 
     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1004
 
      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
1005
 
     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1006
 
   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1007
 
    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1008
 
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1009
 
       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1010
 
      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1011
 
      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' 
1012
 
      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1013
 
      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1014
 
    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1015
 
  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1016
 
    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1017
 
 
1018
 
AC_SUBST(INTLTOOL_DESKTOP_RULE)
1019
 
AC_SUBST(INTLTOOL_DIRECTORY_RULE)
1020
 
AC_SUBST(INTLTOOL_KEYS_RULE)
1021
 
AC_SUBST(INTLTOOL_PROP_RULE)
1022
 
AC_SUBST(INTLTOOL_OAF_RULE)
1023
 
AC_SUBST(INTLTOOL_PONG_RULE)
1024
 
AC_SUBST(INTLTOOL_SERVER_RULE)
1025
 
AC_SUBST(INTLTOOL_SHEET_RULE)
1026
 
AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
1027
 
AC_SUBST(INTLTOOL_UI_RULE)
1028
 
AC_SUBST(INTLTOOL_XAM_RULE)
1029
 
AC_SUBST(INTLTOOL_KBD_RULE)
1030
 
AC_SUBST(INTLTOOL_XML_RULE)
1031
 
AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
1032
 
AC_SUBST(INTLTOOL_CAVES_RULE)
1033
 
AC_SUBST(INTLTOOL_SCHEMAS_RULE)
1034
 
AC_SUBST(INTLTOOL_THEME_RULE)
1035
 
 
1036
 
# Use the tools built into the package, not the ones that are installed.
1037
 
 
1038
 
INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
1039
 
INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
1040
 
INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
1041
 
 
1042
 
AC_SUBST(INTLTOOL_EXTRACT)
1043
 
AC_SUBST(INTLTOOL_MERGE)
1044
 
AC_SUBST(INTLTOOL_UPDATE)
1045
 
 
1046
 
AC_PATH_PROG(INTLTOOL_PERL, perl)
1047
 
if test -z "$INTLTOOL_PERL"; then
1048
 
   AC_MSG_ERROR([perl not found; required for intltool])
1049
 
fi
1050
 
if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
1051
 
   AC_MSG_ERROR([perl 5.x required for intltool])
1052
 
fi
1053
 
if test "x$2" != "xno-xml"; then
1054
 
   AC_MSG_CHECKING([for XML::Parser])
1055
 
   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
1056
 
       AC_MSG_RESULT([ok])
1057
 
   else
1058
 
       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
1059
 
   fi
1060
 
fi
1061
 
 
1062
 
AC_PATH_PROG(INTLTOOL_ICONV, iconv, iconv)
1063
 
AC_PATH_PROG(INTLTOOL_MSGFMT, msgfmt, msgfmt)
1064
 
AC_PATH_PROG(INTLTOOL_MSGMERGE, msgmerge, msgmerge)
1065
 
AC_PATH_PROG(INTLTOOL_XGETTEXT, xgettext, xgettext)
1066
 
 
1067
 
# Remove file type tags (using []) from po/POTFILES.
1068
 
 
1069
 
ifdef([AC_DIVERSION_ICMDS],[
1070
 
  AC_DIVERT_PUSH(AC_DIVERSION_ICMDS)
1071
 
     [mv -f po/POTFILES po/POTFILES.tmp
1072
 
      sed -e '/[[]encoding.*]/d' -e 's/[[].*] *//' < po/POTFILES.tmp > po/POTFILES
1073
 
      rm -f po/POTFILES.tmp
1074
 
     ]dnl
1075
 
  AC_DIVERT_POP()
1076
 
],[
1077
 
  ifdef([AC_CONFIG_COMMANDS_PRE],[
1078
 
    AC_CONFIG_COMMANDS_PRE([
1079
 
       [mv -f po/POTFILES po/POTFILES.tmp
1080
 
        sed -e '/[[]encoding.*]/d' -e 's/[[].*] *//' < po/POTFILES.tmp > po/POTFILES
1081
 
        rm -f po/POTFILES.tmp
1082
 
       ]dnl
1083
 
    ])
1084
 
  ])
1085
 
])
1086
 
 
1087
 
# Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
1088
 
 
1089
 
AC_CONFIG_COMMANDS([intltool], [
1090
 
 
1091
 
intltool_edit="-e 's#@INTLTOOL_EXTRACT@#`pwd`/intltool-extract#g' \
1092
 
               -e 's#@INTLTOOL_ICONV@#${INTLTOOL_ICONV}#g' \
1093
 
               -e 's#@INTLTOOL_MSGFMT@#${INTLTOOL_MSGFMT}#g' \
1094
 
               -e 's#@INTLTOOL_MSGMERGE@#${INTLTOOL_MSGMERGE}#g' \
1095
 
               -e 's#@INTLTOOL_XGETTEXT@#${INTLTOOL_XGETTEXT}#g' \
1096
 
               -e 's#@INTLTOOL_PERL@#${INTLTOOL_PERL}#g'"
1097
 
 
1098
 
eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-extract.in \
1099
 
  > intltool-extract.out
1100
 
if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
1101
 
  rm -f intltool-extract.out
1102
 
else
1103
 
  mv -f intltool-extract.out intltool-extract
1104
 
fi
1105
 
chmod ugo+x intltool-extract
1106
 
chmod u+w intltool-extract
1107
 
 
1108
 
eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-merge.in \
1109
 
  > intltool-merge.out
1110
 
if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
1111
 
  rm -f intltool-merge.out
1112
 
else
1113
 
  mv -f intltool-merge.out intltool-merge
1114
 
fi
1115
 
chmod ugo+x intltool-merge
1116
 
chmod u+w intltool-merge
1117
 
 
1118
 
eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-update.in \
1119
 
  > intltool-update.out
1120
 
if cmp -s intltool-update intltool-update.out 2>/dev/null; then
1121
 
  rm -f intltool-update.out
1122
 
else
1123
 
  mv -f intltool-update.out intltool-update
1124
 
fi
1125
 
chmod ugo+x intltool-update
1126
 
chmod u+w intltool-update
1127
 
 
1128
 
], INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir=${ac_aux_dir}
1129
 
INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' ICONV='${INTLTOOL_ICONV}'
1130
 
MSGFMT='${INTLTOOL_MSGFMT}' MSGMERGE='${INTLTOOL_MSGMERGE}'
1131
 
XGETTEXT='${INTLTOOL_XGETTEXT}')
1132
 
 
1133
 
])
1134
 
 
1135
 
# deprecated macros
1136
 
AC_DEFUN([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL($@)])
1137
 
 
1138
 
 
1139
 
# isc-posix.m4 serial 2 (gettext-0.11.2)
1140
 
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
1141
 
dnl This file is free software; the Free Software Foundation
1142
 
dnl gives unlimited permission to copy and/or distribute it,
1143
 
dnl with or without modifications, as long as this notice is preserved.
1144
 
 
1145
 
# This file is not needed with autoconf-2.53 and newer.  Remove it in 2005.
1146
 
 
1147
 
# This test replaces the one in autoconf.
1148
 
# Currently this macro should have the same name as the autoconf macro
1149
 
# because gettext's gettext.m4 (distributed in the automake package)
1150
 
# still uses it.  Otherwise, the use in gettext.m4 makes autoheader
1151
 
# give these diagnostics:
1152
 
#   configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
1153
 
#   configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
1154
 
 
1155
 
undefine([AC_ISC_POSIX])
1156
 
 
1157
 
AC_DEFUN([AC_ISC_POSIX],
1158
 
  [
1159
 
    dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
1160
 
    AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
1161
 
  ]
1162
 
)
1163
 
 
1164
 
 
1165
 
# serial 1
1166
 
 
1167
 
# @defmac AC_PROG_CC_STDC
1168
 
# @maindex PROG_CC_STDC
1169
 
# @ovindex CC
1170
 
# If the C compiler in not in ANSI C mode by default, try to add an option
1171
 
# to output variable @code{CC} to make it so.  This macro tries various
1172
 
# options that select ANSI C on some system or another.  It considers the
1173
 
# compiler to be in ANSI C mode if it handles function prototypes correctly.
1174
 
#
1175
 
# If you use this macro, you should check after calling it whether the C
1176
 
# compiler has been set to accept ANSI C; if not, the shell variable
1177
 
# @code{am_cv_prog_cc_stdc} is set to @samp{no}.  If you wrote your source
1178
 
# code in ANSI C, you can make an un-ANSIfied copy of it by using the
1179
 
# program @code{ansi2knr}, which comes with Ghostscript.
1180
 
# @end defmac
1181
 
 
1182
 
AC_DEFUN([AM_PROG_CC_STDC],
1183
 
[AC_REQUIRE([AC_PROG_CC])
1184
 
AC_BEFORE([$0], [AC_C_INLINE])
1185
 
AC_BEFORE([$0], [AC_C_CONST])
1186
 
dnl Force this before AC_PROG_CPP.  Some cpp's, eg on HPUX, require
1187
 
dnl a magic option to avoid problems with ANSI preprocessor commands
1188
 
dnl like #elif.
1189
 
dnl FIXME: can't do this because then AC_AIX won't work due to a
1190
 
dnl circular dependency.
1191
 
dnl AC_BEFORE([$0], [AC_PROG_CPP])
1192
 
AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
1193
 
AC_CACHE_VAL(am_cv_prog_cc_stdc,
1194
 
[am_cv_prog_cc_stdc=no
1195
 
ac_save_CC="$CC"
1196
 
# Don't try gcc -ansi; that turns off useful extensions and
1197
 
# breaks some systems' header files.
1198
 
# AIX                   -qlanglvl=ansi
1199
 
# Ultrix and OSF/1      -std1
1200
 
# HP-UX                 -Aa -D_HPUX_SOURCE
1201
 
# SVR4                  -Xc -D__EXTENSIONS__
1202
 
for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1203
 
do
1204
 
  CC="$ac_save_CC $ac_arg"
1205
 
  AC_TRY_COMPILE(
1206
 
[#include <stdarg.h>
1207
 
#include <stdio.h>
1208
 
#include <sys/types.h>
1209
 
#include <sys/stat.h>
1210
 
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
1211
 
struct buf { int x; };
1212
 
FILE * (*rcsopen) (struct buf *, struct stat *, int);
1213
 
static char *e (p, i)
1214
 
     char **p;
1215
 
     int i;
1216
 
{
1217
 
  return p[i];
1218
 
}
1219
 
static char *f (char * (*g) (char **, int), char **p, ...)
1220
 
{
1221
 
  char *s;
1222
 
  va_list v;
1223
 
  va_start (v,p);
1224
 
  s = g (p, va_arg (v,int));
1225
 
  va_end (v);
1226
 
  return s;
1227
 
}
1228
 
int test (int i, double x);
1229
 
struct s1 {int (*f) (int a);};
1230
 
struct s2 {int (*f) (double a);};
1231
 
int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1232
 
int argc;
1233
 
char **argv;
1234
 
], [
1235
 
return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
1236
 
],
1237
 
[am_cv_prog_cc_stdc="$ac_arg"; break])
1238
 
done
1239
 
CC="$ac_save_CC"
1240
 
])
1241
 
if test -z "$am_cv_prog_cc_stdc"; then
1242
 
  AC_MSG_RESULT([none needed])
1243
 
else
1244
 
  AC_MSG_RESULT($am_cv_prog_cc_stdc)
1245
 
fi
1246
 
case "x$am_cv_prog_cc_stdc" in
1247
 
  x|xno) ;;
1248
 
  *) CC="$CC $am_cv_prog_cc_stdc" ;;
1249
 
esac
1250
 
])
1251
 
 
1252
 
dnl GNOME_COMPILE_WARNINGS
1253
 
dnl Turn on many useful compiler warnings
1254
 
dnl For now, only works on GCC
1255
 
AC_DEFUN([GNOME_COMPILE_WARNINGS],[
1256
 
    dnl ******************************
1257
 
    dnl More compiler warnings
1258
 
    dnl ******************************
1259
 
 
1260
 
    AC_ARG_ENABLE(compile-warnings, 
1261
 
                  AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
1262
 
                                 [Turn on compiler warnings]),,
1263
 
                  [enable_compile_warnings="m4_default([$1],[yes])"])
1264
 
 
1265
 
    warnCFLAGS=
1266
 
    if test "x$GCC" != xyes; then
1267
 
        enable_compile_warnings=no
1268
 
    fi
1269
 
 
1270
 
    warning_flags=
1271
 
    realsave_CFLAGS="$CFLAGS"
1272
 
 
1273
 
    case "$enable_compile_warnings" in
1274
 
    no)
1275
 
        warning_flags=
1276
 
        ;;
1277
 
    minimum)
1278
 
        warning_flags="-Wall"
1279
 
        ;;
1280
 
    yes)
1281
 
        warning_flags="-Wall -Wmissing-prototypes"
1282
 
        ;;
1283
 
    maximum|error)
1284
 
        warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
1285
 
        CFLAGS="$warning_flags $CFLAGS"
1286
 
        for option in -Wno-sign-compare; do
1287
 
                SAVE_CFLAGS="$CFLAGS"
1288
 
                CFLAGS="$CFLAGS $option"
1289
 
                AC_MSG_CHECKING([whether gcc understands $option])
1290
 
                AC_TRY_COMPILE([], [],
1291
 
                        has_option=yes,
1292
 
                        has_option=no,)
1293
 
                CFLAGS="$SAVE_CFLAGS"
1294
 
                AC_MSG_RESULT($has_option)
1295
 
                if test $has_option = yes; then
1296
 
                  warning_flags="$warning_flags $option"
1297
 
                fi
1298
 
                unset has_option
1299
 
                unset SAVE_CFLAGS
1300
 
        done
1301
 
        unset option
1302
 
        if test "$enable_compile_warnings" = "error" ; then
1303
 
            warning_flags="$warning_flags -Werror"
1304
 
        fi
1305
 
        ;;
1306
 
    *)
1307
 
        AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
1308
 
        ;;
1309
 
    esac
1310
 
    CFLAGS="$realsave_CFLAGS"
1311
 
    AC_MSG_CHECKING(what warning flags to pass to the C compiler)
1312
 
    AC_MSG_RESULT($warning_flags)
1313
 
 
1314
 
    AC_ARG_ENABLE(iso-c,
1315
 
                  AC_HELP_STRING([--enable-iso-c],
1316
 
                                 [Try to warn if code is not ISO C ]),,
1317
 
                  [enable_iso_c=no])
1318
 
 
1319
 
    AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
1320
 
    complCFLAGS=
1321
 
    if test "x$enable_iso_c" != "xno"; then
1322
 
        if test "x$GCC" = "xyes"; then
1323
 
        case " $CFLAGS " in
1324
 
            *[\ \       ]-ansi[\ \      ]*) ;;
1325
 
            *) complCFLAGS="$complCFLAGS -ansi" ;;
1326
 
        esac
1327
 
        case " $CFLAGS " in
1328
 
            *[\ \       ]-pedantic[\ \  ]*) ;;
1329
 
            *) complCFLAGS="$complCFLAGS -pedantic" ;;
1330
 
        esac
1331
 
        fi
1332
 
    fi
1333
 
    AC_MSG_RESULT($complCFLAGS)
1334
 
 
1335
 
    WARN_CFLAGS="$warning_flags $complCFLAGS"
1336
 
    AC_SUBST(WARN_CFLAGS)
1337
 
])
1338
 
 
1339
 
dnl For C++, do basically the same thing.
1340
 
 
1341
 
AC_DEFUN([GNOME_CXX_WARNINGS],[
1342
 
  AC_ARG_ENABLE(cxx-warnings,
1343
 
                AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
1344
 
                               [Turn on compiler warnings.]),,
1345
 
                [enable_cxx_warnings="m4_default([$1],[minimum])"])
1346
 
 
1347
 
  AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
1348
 
  warnCXXFLAGS=
1349
 
  if test "x$GCC" != xyes; then
1350
 
    enable_compile_warnings=no
1351
 
  fi
1352
 
  if test "x$enable_cxx_warnings" != "xno"; then
1353
 
    if test "x$GCC" = "xyes"; then
1354
 
      case " $CXXFLAGS " in
1355
 
      *[\ \     ]-Wall[\ \      ]*) ;;
1356
 
      *) warnCXXFLAGS="-Wall -Wno-unused" ;;
1357
 
      esac
1358
 
 
1359
 
      ## -W is not all that useful.  And it cannot be controlled
1360
 
      ## with individual -Wno-xxx flags, unlike -Wall
1361
 
      if test "x$enable_cxx_warnings" = "xyes"; then
1362
 
        warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
1363
 
      fi
1364
 
    fi
1365
 
  fi
1366
 
  AC_MSG_RESULT($warnCXXFLAGS)
1367
 
 
1368
 
   AC_ARG_ENABLE(iso-cxx,
1369
 
                 AC_HELP_STRING([--enable-iso-cxx],
1370
 
                                [Try to warn if code is not ISO C++ ]),,
1371
 
                 [enable_iso_cxx=no])
1372
 
 
1373
 
   AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
1374
 
   complCXXFLAGS=
1375
 
   if test "x$enable_iso_cxx" != "xno"; then
1376
 
     if test "x$GCC" = "xyes"; then
1377
 
      case " $CXXFLAGS " in
1378
 
      *[\ \     ]-ansi[\ \      ]*) ;;
1379
 
      *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
1380
 
      esac
1381
 
 
1382
 
      case " $CXXFLAGS " in
1383
 
      *[\ \     ]-pedantic[\ \  ]*) ;;
1384
 
      *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
1385
 
      esac
1386
 
     fi
1387
 
   fi
1388
 
  AC_MSG_RESULT($complCXXFLAGS)
1389
 
 
1390
 
  WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
1391
 
  AC_SUBST(WARN_CXXFLAGS)
1392
 
])
1393
 
 
1394
 
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
1395
 
1396
 
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
1397
 
#
1398
 
# This program is free software; you can redistribute it and/or modify
1399
 
# it under the terms of the GNU General Public License as published by
1400
 
# the Free Software Foundation; either version 2 of the License, or
1401
 
# (at your option) any later version.
1402
 
#
1403
 
# This program is distributed in the hope that it will be useful, but
1404
 
# WITHOUT ANY WARRANTY; without even the implied warranty of
1405
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
1406
 
# General Public License for more details.
1407
 
#
1408
 
# You should have received a copy of the GNU General Public License
1409
 
# along with this program; if not, write to the Free Software
1410
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1411
 
#
1412
 
# As a special exception to the GNU General Public License, if you
1413
 
# distribute this file as part of a program that contains a
1414
 
# configuration script generated by Autoconf, you may include it under
1415
 
# the same distribution terms that you use for the rest of that program.
1416
 
 
1417
 
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
1418
 
# ----------------------------------
1419
 
AC_DEFUN([PKG_PROG_PKG_CONFIG],
1420
 
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
1421
 
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
1422
 
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
1423
 
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1424
 
        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1425
 
fi
1426
 
if test -n "$PKG_CONFIG"; then
1427
 
        _pkg_min_version=m4_default([$1], [0.9.0])
1428
 
        AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
1429
 
        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1430
 
                AC_MSG_RESULT([yes])
1431
 
        else
1432
 
                AC_MSG_RESULT([no])
1433
 
                PKG_CONFIG=""
1434
 
        fi
1435
 
                
1436
 
fi[]dnl
1437
 
])# PKG_PROG_PKG_CONFIG
1438
 
 
1439
 
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1440
 
#
1441
 
# Check to see whether a particular set of modules exists.  Similar
1442
 
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
1443
 
#
1444
 
#
1445
 
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
1446
 
# this or PKG_CHECK_MODULES is called, or make sure to call
1447
 
# PKG_CHECK_EXISTS manually
1448
 
# --------------------------------------------------------------
1449
 
AC_DEFUN([PKG_CHECK_EXISTS],
1450
 
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1451
 
if test -n "$PKG_CONFIG" && \
1452
 
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
1453
 
  m4_ifval([$2], [$2], [:])
1454
 
m4_ifvaln([$3], [else
1455
 
  $3])dnl
1456
 
fi])
1457
 
 
1458
 
 
1459
 
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
1460
 
# ---------------------------------------------
1461
 
m4_define([_PKG_CONFIG],
1462
 
[if test -n "$PKG_CONFIG"; then
1463
 
    if test -n "$$1"; then
1464
 
        pkg_cv_[]$1="$$1"
1465
 
    else
1466
 
        PKG_CHECK_EXISTS([$3],
1467
 
                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
1468
 
                         [pkg_failed=yes])
1469
 
    fi
1470
 
else
1471
 
        pkg_failed=untried
1472
 
fi[]dnl
1473
 
])# _PKG_CONFIG
1474
 
 
1475
 
# _PKG_SHORT_ERRORS_SUPPORTED
1476
 
# -----------------------------
1477
 
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
1478
 
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1479
 
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1480
 
        _pkg_short_errors_supported=yes
1481
 
else
1482
 
        _pkg_short_errors_supported=no
1483
 
fi[]dnl
1484
 
])# _PKG_SHORT_ERRORS_SUPPORTED
1485
 
 
1486
 
 
1487
 
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1488
 
# [ACTION-IF-NOT-FOUND])
1489
 
#
1490
 
#
1491
 
# Note that if there is a possibility the first call to
1492
 
# PKG_CHECK_MODULES might not happen, you should be sure to include an
1493
 
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
1494
 
#
1495
 
#
1496
 
# --------------------------------------------------------------
1497
 
AC_DEFUN([PKG_CHECK_MODULES],
1498
 
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1499
 
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
1500
 
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
1501
 
 
1502
 
pkg_failed=no
1503
 
AC_MSG_CHECKING([for $1])
1504
 
 
1505
 
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1506
 
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
1507
 
 
1508
 
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
1509
 
and $1[]_LIBS to avoid the need to call pkg-config.
1510
 
See the pkg-config man page for more details.])
1511
 
 
1512
 
if test $pkg_failed = yes; then
1513
 
        _PKG_SHORT_ERRORS_SUPPORTED
1514
 
        if test $_pkg_short_errors_supported = yes; then
1515
 
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
1516
 
        else 
1517
 
                $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
1518
 
        fi
1519
 
        # Put the nasty error message in config.log where it belongs
1520
 
        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1521
 
 
1522
 
        ifelse([$4], , [AC_MSG_ERROR(dnl
1523
 
[Package requirements ($2) were not met:
1524
 
 
1525
 
$$1_PKG_ERRORS
1526
 
 
1527
 
Consider adjusting the PKG_CONFIG_PATH environment variable if you
1528
 
installed software in a non-standard prefix.
1529
 
 
1530
 
_PKG_TEXT
1531
 
])],
1532
 
                [$4])
1533
 
elif test $pkg_failed = untried; then
1534
 
        ifelse([$4], , [AC_MSG_FAILURE(dnl
1535
 
[The pkg-config script could not be found or is too old.  Make sure it
1536
 
is in your PATH or set the PKG_CONFIG environment variable to the full
1537
 
path to pkg-config.
1538
 
 
1539
 
_PKG_TEXT
1540
 
 
1541
 
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
1542
 
                [$4])
1543
 
else
1544
 
        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1545
 
        $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1546
 
        AC_MSG_RESULT([yes])
1547
 
        ifelse([$3], , :, [$3])
1548
 
fi[]dnl
1549
 
])# PKG_CHECK_MODULES
 
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.
1550
13
 
1551
14
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
1552
15
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
1947
410
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
1948
411
])dnl
1949
412
 
 
413
dnl GNOME_COMPILE_WARNINGS
 
414
dnl Turn on many useful compiler warnings
 
415
dnl For now, only works on GCC
 
416
AC_DEFUN([GNOME_COMPILE_WARNINGS],[
 
417
    dnl ******************************
 
418
    dnl More compiler warnings
 
419
    dnl ******************************
 
420
 
 
421
    AC_ARG_ENABLE(compile-warnings, 
 
422
                  AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
 
423
                                 [Turn on compiler warnings]),,
 
424
                  [enable_compile_warnings="m4_default([$1],[yes])"])
 
425
 
 
426
    warnCFLAGS=
 
427
    if test "x$GCC" != xyes; then
 
428
        enable_compile_warnings=no
 
429
    fi
 
430
 
 
431
    warning_flags=
 
432
    realsave_CFLAGS="$CFLAGS"
 
433
 
 
434
    case "$enable_compile_warnings" in
 
435
    no)
 
436
        warning_flags=
 
437
        ;;
 
438
    minimum)
 
439
        warning_flags="-Wall"
 
440
        ;;
 
441
    yes)
 
442
        warning_flags="-Wall -Wmissing-prototypes"
 
443
        ;;
 
444
    maximum|error)
 
445
        warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
 
446
        CFLAGS="$warning_flags $CFLAGS"
 
447
        for option in -Wno-sign-compare; do
 
448
                SAVE_CFLAGS="$CFLAGS"
 
449
                CFLAGS="$CFLAGS $option"
 
450
                AC_MSG_CHECKING([whether gcc understands $option])
 
451
                AC_TRY_COMPILE([], [],
 
452
                        has_option=yes,
 
453
                        has_option=no,)
 
454
                CFLAGS="$SAVE_CFLAGS"
 
455
                AC_MSG_RESULT($has_option)
 
456
                if test $has_option = yes; then
 
457
                  warning_flags="$warning_flags $option"
 
458
                fi
 
459
                unset has_option
 
460
                unset SAVE_CFLAGS
 
461
        done
 
462
        unset option
 
463
        if test "$enable_compile_warnings" = "error" ; then
 
464
            warning_flags="$warning_flags -Werror"
 
465
        fi
 
466
        ;;
 
467
    *)
 
468
        AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
 
469
        ;;
 
470
    esac
 
471
    CFLAGS="$realsave_CFLAGS"
 
472
    AC_MSG_CHECKING(what warning flags to pass to the C compiler)
 
473
    AC_MSG_RESULT($warning_flags)
 
474
 
 
475
    AC_ARG_ENABLE(iso-c,
 
476
                  AC_HELP_STRING([--enable-iso-c],
 
477
                                 [Try to warn if code is not ISO C ]),,
 
478
                  [enable_iso_c=no])
 
479
 
 
480
    AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
 
481
    complCFLAGS=
 
482
    if test "x$enable_iso_c" != "xno"; then
 
483
        if test "x$GCC" = "xyes"; then
 
484
        case " $CFLAGS " in
 
485
            *[\ \       ]-ansi[\ \      ]*) ;;
 
486
            *) complCFLAGS="$complCFLAGS -ansi" ;;
 
487
        esac
 
488
        case " $CFLAGS " in
 
489
            *[\ \       ]-pedantic[\ \  ]*) ;;
 
490
            *) complCFLAGS="$complCFLAGS -pedantic" ;;
 
491
        esac
 
492
        fi
 
493
    fi
 
494
    AC_MSG_RESULT($complCFLAGS)
 
495
 
 
496
    WARN_CFLAGS="$warning_flags $complCFLAGS"
 
497
    AC_SUBST(WARN_CFLAGS)
 
498
])
 
499
 
 
500
dnl For C++, do basically the same thing.
 
501
 
 
502
AC_DEFUN([GNOME_CXX_WARNINGS],[
 
503
  AC_ARG_ENABLE(cxx-warnings,
 
504
                AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
 
505
                               [Turn on compiler warnings.]),,
 
506
                [enable_cxx_warnings="m4_default([$1],[minimum])"])
 
507
 
 
508
  AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
 
509
  warnCXXFLAGS=
 
510
  if test "x$GCC" != xyes; then
 
511
    enable_compile_warnings=no
 
512
  fi
 
513
  if test "x$enable_cxx_warnings" != "xno"; then
 
514
    if test "x$GCC" = "xyes"; then
 
515
      case " $CXXFLAGS " in
 
516
      *[\ \     ]-Wall[\ \      ]*) ;;
 
517
      *) warnCXXFLAGS="-Wall -Wno-unused" ;;
 
518
      esac
 
519
 
 
520
      ## -W is not all that useful.  And it cannot be controlled
 
521
      ## with individual -Wno-xxx flags, unlike -Wall
 
522
      if test "x$enable_cxx_warnings" = "xyes"; then
 
523
        warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
 
524
      fi
 
525
    fi
 
526
  fi
 
527
  AC_MSG_RESULT($warnCXXFLAGS)
 
528
 
 
529
   AC_ARG_ENABLE(iso-cxx,
 
530
                 AC_HELP_STRING([--enable-iso-cxx],
 
531
                                [Try to warn if code is not ISO C++ ]),,
 
532
                 [enable_iso_cxx=no])
 
533
 
 
534
   AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
 
535
   complCXXFLAGS=
 
536
   if test "x$enable_iso_cxx" != "xno"; then
 
537
     if test "x$GCC" = "xyes"; then
 
538
      case " $CXXFLAGS " in
 
539
      *[\ \     ]-ansi[\ \      ]*) ;;
 
540
      *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
 
541
      esac
 
542
 
 
543
      case " $CXXFLAGS " in
 
544
      *[\ \     ]-pedantic[\ \  ]*) ;;
 
545
      *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
 
546
      esac
 
547
     fi
 
548
   fi
 
549
  AC_MSG_RESULT($complCXXFLAGS)
 
550
 
 
551
  WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
 
552
  AC_SUBST(WARN_CXXFLAGS)
 
553
])
 
554
 
 
555
 
 
556
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
 
557
# serial 2 IT_PROG_INTLTOOL
 
558
AC_DEFUN([IT_PROG_INTLTOOL],
 
559
[AC_PREREQ([2.50])dnl
 
560
 
 
561
case "$am__api_version" in
 
562
    1.[01234])
 
563
        AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
 
564
    ;;
 
565
    *)
 
566
    ;;
 
567
esac
 
568
 
 
569
if test -n "$1"; then
 
570
    AC_MSG_CHECKING(for intltool >= $1)
 
571
 
 
572
    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 100 + $ 2; }'`
 
573
    INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`
 
574
    [INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 100 + VERSION[2];}' ${ac_aux_dir}/intltool-update.in`
 
575
    ]
 
576
    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
 
577
    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
 
578
        AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
 
579
fi
 
580
 
 
581
  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
582
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
583
     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
584
     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
585
      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
 
586
     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
587
   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
588
    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
589
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
590
       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
591
      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
592
      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' 
 
593
      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
594
      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
595
    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
596
  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
597
    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
598
    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
 
599
 
 
600
AC_SUBST(INTLTOOL_DESKTOP_RULE)
 
601
AC_SUBST(INTLTOOL_DIRECTORY_RULE)
 
602
AC_SUBST(INTLTOOL_KEYS_RULE)
 
603
AC_SUBST(INTLTOOL_PROP_RULE)
 
604
AC_SUBST(INTLTOOL_OAF_RULE)
 
605
AC_SUBST(INTLTOOL_PONG_RULE)
 
606
AC_SUBST(INTLTOOL_SERVER_RULE)
 
607
AC_SUBST(INTLTOOL_SHEET_RULE)
 
608
AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
 
609
AC_SUBST(INTLTOOL_UI_RULE)
 
610
AC_SUBST(INTLTOOL_XAM_RULE)
 
611
AC_SUBST(INTLTOOL_KBD_RULE)
 
612
AC_SUBST(INTLTOOL_XML_RULE)
 
613
AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
 
614
AC_SUBST(INTLTOOL_CAVES_RULE)
 
615
AC_SUBST(INTLTOOL_SCHEMAS_RULE)
 
616
AC_SUBST(INTLTOOL_THEME_RULE)
 
617
AC_SUBST(INTLTOOL_SERVICE_RULE)
 
618
 
 
619
# Use the tools built into the package, not the ones that are installed.
 
620
AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract')
 
621
AC_SUBST(INTLTOOL_MERGE, '$(top_builddir)/intltool-merge')
 
622
AC_SUBST(INTLTOOL_UPDATE, '$(top_builddir)/intltool-update')
 
623
 
 
624
AC_PATH_PROG(INTLTOOL_PERL, perl)
 
625
if test -z "$INTLTOOL_PERL"; then
 
626
   AC_MSG_ERROR([perl not found; required for intltool])
 
627
fi
 
628
if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
 
629
   AC_MSG_ERROR([perl 5.x required for intltool])
 
630
fi
 
631
if test "x$2" != "xno-xml"; then
 
632
   AC_MSG_CHECKING([for XML::Parser])
 
633
   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
 
634
       AC_MSG_RESULT([ok])
 
635
   else
 
636
       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
 
637
   fi
 
638
fi
 
639
 
 
640
AC_PATH_PROG(INTLTOOL_ICONV, iconv, iconv)
 
641
AC_PATH_PROG(INTLTOOL_MSGFMT, msgfmt, msgfmt)
 
642
AC_PATH_PROG(INTLTOOL_MSGMERGE, msgmerge, msgmerge)
 
643
AC_PATH_PROG(INTLTOOL_XGETTEXT, xgettext, xgettext)
 
644
 
 
645
IT_PO_SUBDIR([po])
 
646
 
 
647
dnl The following is very similar to
 
648
dnl
 
649
dnl     AC_CONFIG_FILES([intltool-extract intltool-merge intltool-update])
 
650
dnl
 
651
dnl with the following slight differences:
 
652
dnl  - the *.in files are in ac_aux_dir,
 
653
dnl  - if the file haven't changed upon reconfigure, it's not touched,
 
654
dnl  - the evaluation of the third parameter enables a hack which computes
 
655
dnl    the actual value of $libdir,
 
656
dnl  - the user sees "executing intltool commands", instead of
 
657
dnl    "creating intltool-extract" and such.
 
658
dnl
 
659
dnl Nothing crucial here, and we could use AC_CONFIG_FILES, if there were
 
660
dnl a reason for it.
 
661
 
 
662
AC_CONFIG_COMMANDS([intltool], [
 
663
 
 
664
for file in intltool-extract intltool-merge intltool-update; do
 
665
  sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
 
666
      -e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
 
667
      -e "s|@INTLTOOL_ICONV@|${INTLTOOL_ICONV}|g" \
 
668
      -e "s|@INTLTOOL_MSGFMT@|${INTLTOOL_MSGFMT}|g" \
 
669
      -e "s|@INTLTOOL_MSGMERGE@|${INTLTOOL_MSGMERGE}|g" \
 
670
      -e "s|@INTLTOOL_XGETTEXT@|${INTLTOOL_XGETTEXT}|g" \
 
671
      -e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
 
672
        < ${ac_aux_dir}/${file}.in > ${file}.out
 
673
  if cmp -s ${file} ${file}.out 2>/dev/null; then
 
674
    rm -f ${file}.out
 
675
  else
 
676
    mv -f ${file}.out ${file}
 
677
  fi
 
678
  chmod ugo+x ${file}
 
679
  chmod u+w ${file}
 
680
done
 
681
 
 
682
],
 
683
[INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
 
684
prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir" 
 
685
INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' INTLTOOL_ICONV='${INTLTOOL_ICONV}'
 
686
INTLTOOL_MSGFMT='${INTLTOOL_MSGFMT}' INTLTOOL_MSGMERGE='${INTLTOOL_MSGMERGE}'
 
687
INTLTOOL_XGETTEXT='${INTLTOOL_XGETTEXT}'])
 
688
 
 
689
])
 
690
 
 
691
 
 
692
# IT_PO_SUBDIR(DIRNAME)
 
693
# ---------------------
 
694
# All po subdirs have to be declared with this macro; the subdir "po" is
 
695
# declared by IT_PROG_INTLTOOL.
 
696
#
 
697
AC_DEFUN([IT_PO_SUBDIR],
 
698
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
 
699
dnl
 
700
dnl The following CONFIG_COMMANDS should be exetuted at the very end
 
701
dnl of config.status.
 
702
AC_CONFIG_COMMANDS_PRE([
 
703
  AC_CONFIG_COMMANDS([$1/stamp-it], [
 
704
    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
 
705
    >"$1/stamp-it.tmp"
 
706
    [sed '/^#/d
 
707
         s/^[[].*] *//
 
708
         /^[    ]*$/d
 
709
        '"s|^|  $ac_top_srcdir/|" \
 
710
      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
 
711
    ]
 
712
    if test ! -f "$1/Makefile"; then
 
713
      AC_MSG_ERROR([$1/Makefile is not ready.])
 
714
    fi
 
715
    mv "$1/Makefile" "$1/Makefile.tmp"
 
716
    [sed '/^POTFILES =/,/[^\\]$/ {
 
717
                /^POTFILES =/!d
 
718
                r $1/POTFILES
 
719
          }
 
720
         ' "$1/Makefile.tmp" >"$1/Makefile"]
 
721
    rm -f "$1/Makefile.tmp"
 
722
    mv "$1/stamp-it.tmp" "$1/stamp-it"
 
723
  ])
 
724
])dnl
 
725
])
 
726
 
 
727
 
 
728
# deprecated macros
 
729
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
 
730
# A hint is needed for aclocal from Automake <= 1.9.4:
 
731
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
 
732
 
 
733
 
 
734
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
 
735
 
736
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
 
737
#
 
738
# This program is free software; you can redistribute it and/or modify
 
739
# it under the terms of the GNU General Public License as published by
 
740
# the Free Software Foundation; either version 2 of the License, or
 
741
# (at your option) any later version.
 
742
#
 
743
# This program is distributed in the hope that it will be useful, but
 
744
# WITHOUT ANY WARRANTY; without even the implied warranty of
 
745
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
746
# General Public License for more details.
 
747
#
 
748
# You should have received a copy of the GNU General Public License
 
749
# along with this program; if not, write to the Free Software
 
750
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
751
#
 
752
# As a special exception to the GNU General Public License, if you
 
753
# distribute this file as part of a program that contains a
 
754
# configuration script generated by Autoconf, you may include it under
 
755
# the same distribution terms that you use for the rest of that program.
 
756
 
 
757
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
 
758
# ----------------------------------
 
759
AC_DEFUN([PKG_PROG_PKG_CONFIG],
 
760
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
 
761
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
 
762
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
 
763
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
 
764
        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
 
765
fi
 
766
if test -n "$PKG_CONFIG"; then
 
767
        _pkg_min_version=m4_default([$1], [0.9.0])
 
768
        AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
 
769
        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
 
770
                AC_MSG_RESULT([yes])
 
771
        else
 
772
                AC_MSG_RESULT([no])
 
773
                PKG_CONFIG=""
 
774
        fi
 
775
                
 
776
fi[]dnl
 
777
])# PKG_PROG_PKG_CONFIG
 
778
 
 
779
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 
780
#
 
781
# Check to see whether a particular set of modules exists.  Similar
 
782
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
 
783
#
 
784
#
 
785
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
 
786
# this or PKG_CHECK_MODULES is called, or make sure to call
 
787
# PKG_CHECK_EXISTS manually
 
788
# --------------------------------------------------------------
 
789
AC_DEFUN([PKG_CHECK_EXISTS],
 
790
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
791
if test -n "$PKG_CONFIG" && \
 
792
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
 
793
  m4_ifval([$2], [$2], [:])
 
794
m4_ifvaln([$3], [else
 
795
  $3])dnl
 
796
fi])
 
797
 
 
798
 
 
799
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
 
800
# ---------------------------------------------
 
801
m4_define([_PKG_CONFIG],
 
802
[if test -n "$PKG_CONFIG"; then
 
803
    if test -n "$$1"; then
 
804
        pkg_cv_[]$1="$$1"
 
805
    else
 
806
        PKG_CHECK_EXISTS([$3],
 
807
                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
 
808
                         [pkg_failed=yes])
 
809
    fi
 
810
else
 
811
        pkg_failed=untried
 
812
fi[]dnl
 
813
])# _PKG_CONFIG
 
814
 
 
815
# _PKG_SHORT_ERRORS_SUPPORTED
 
816
# -----------------------------
 
817
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
 
818
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 
819
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
 
820
        _pkg_short_errors_supported=yes
 
821
else
 
822
        _pkg_short_errors_supported=no
 
823
fi[]dnl
 
824
])# _PKG_SHORT_ERRORS_SUPPORTED
 
825
 
 
826
 
 
827
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
 
828
# [ACTION-IF-NOT-FOUND])
 
829
#
 
830
#
 
831
# Note that if there is a possibility the first call to
 
832
# PKG_CHECK_MODULES might not happen, you should be sure to include an
 
833
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
 
834
#
 
835
#
 
836
# --------------------------------------------------------------
 
837
AC_DEFUN([PKG_CHECK_MODULES],
 
838
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
839
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
 
840
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
 
841
 
 
842
pkg_failed=no
 
843
AC_MSG_CHECKING([for $1])
 
844
 
 
845
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
 
846
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
 
847
 
 
848
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
 
849
and $1[]_LIBS to avoid the need to call pkg-config.
 
850
See the pkg-config man page for more details.])
 
851
 
 
852
if test $pkg_failed = yes; then
 
853
        _PKG_SHORT_ERRORS_SUPPORTED
 
854
        if test $_pkg_short_errors_supported = yes; then
 
855
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
 
856
        else 
 
857
                $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
 
858
        fi
 
859
        # Put the nasty error message in config.log where it belongs
 
860
        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
 
861
 
 
862
        ifelse([$4], , [AC_MSG_ERROR(dnl
 
863
[Package requirements ($2) were not met:
 
864
 
 
865
$$1_PKG_ERRORS
 
866
 
 
867
Consider adjusting the PKG_CONFIG_PATH environment variable if you
 
868
installed software in a non-standard prefix.
 
869
 
 
870
_PKG_TEXT
 
871
])],
 
872
                [$4])
 
873
elif test $pkg_failed = untried; then
 
874
        ifelse([$4], , [AC_MSG_FAILURE(dnl
 
875
[The pkg-config script could not be found or is too old.  Make sure it
 
876
is in your PATH or set the PKG_CONFIG environment variable to the full
 
877
path to pkg-config.
 
878
 
 
879
_PKG_TEXT
 
880
 
 
881
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
 
882
                [$4])
 
883
else
 
884
        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
 
885
        $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
 
886
        AC_MSG_RESULT([yes])
 
887
        ifelse([$3], , :, [$3])
 
888
fi[]dnl
 
889
])# PKG_CHECK_MODULES
 
890
 
 
891
# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
 
892
#
 
893
# This file is free software; the Free Software Foundation
 
894
# gives unlimited permission to copy and/or distribute it,
 
895
# with or without modifications, as long as this notice is preserved.
 
896
 
 
897
# AM_AUTOMAKE_VERSION(VERSION)
 
898
# ----------------------------
 
899
# Automake X.Y traces this macro to ensure aclocal.m4 has been
 
900
# generated from the m4 files accompanying Automake X.Y.
 
901
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
 
902
 
 
903
# AM_SET_CURRENT_AUTOMAKE_VERSION
 
904
# -------------------------------
 
905
# Call AM_AUTOMAKE_VERSION so it can be traced.
 
906
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
 
907
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
 
908
         [AM_AUTOMAKE_VERSION([1.9.6])])
 
909
 
 
910
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
911
 
 
912
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
913
#
 
914
# This file is free software; the Free Software Foundation
 
915
# gives unlimited permission to copy and/or distribute it,
 
916
# with or without modifications, as long as this notice is preserved.
 
917
 
 
918
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
 
919
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
 
920
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
 
921
#
 
922
# Of course, Automake must honor this variable whenever it calls a
 
923
# tool from the auxiliary directory.  The problem is that $srcdir (and
 
924
# therefore $ac_aux_dir as well) can be either absolute or relative,
 
925
# depending on how configure is run.  This is pretty annoying, since
 
926
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
 
927
# source directory, any form will work fine, but in subdirectories a
 
928
# relative path needs to be adjusted first.
 
929
#
 
930
# $ac_aux_dir/missing
 
931
#    fails when called from a subdirectory if $ac_aux_dir is relative
 
932
# $top_srcdir/$ac_aux_dir/missing
 
933
#    fails if $ac_aux_dir is absolute,
 
934
#    fails when called from a subdirectory in a VPATH build with
 
935
#          a relative $ac_aux_dir
 
936
#
 
937
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
 
938
# are both prefixed by $srcdir.  In an in-source build this is usually
 
939
# harmless because $srcdir is `.', but things will broke when you
 
940
# start a VPATH build or use an absolute $srcdir.
 
941
#
 
942
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
 
943
# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
 
944
#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
 
945
# and then we would define $MISSING as
 
946
#   MISSING="\${SHELL} $am_aux_dir/missing"
 
947
# This will work as long as MISSING is not called from configure, because
 
948
# unfortunately $(top_srcdir) has no meaning in configure.
 
949
# However there are other variables, like CC, which are often used in
 
950
# configure, and could therefore not use this "fixed" $ac_aux_dir.
 
951
#
 
952
# Another solution, used here, is to always expand $ac_aux_dir to an
 
953
# absolute PATH.  The drawback is that using absolute paths prevent a
 
954
# configured tree to be moved without reconfiguration.
 
955
 
 
956
AC_DEFUN([AM_AUX_DIR_EXPAND],
 
957
[dnl Rely on autoconf to set up CDPATH properly.
 
958
AC_PREREQ([2.50])dnl
 
959
# expand $ac_aux_dir to an absolute path
 
960
am_aux_dir=`cd $ac_aux_dir && pwd`
 
961
])
 
962
 
 
963
 
 
964
# Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2005
 
965
# Free Software Foundation, Inc.
 
966
#
 
967
# This file is free software; the Free Software Foundation
 
968
# gives unlimited permission to copy and/or distribute it,
 
969
# with or without modifications, as long as this notice is preserved.
 
970
 
 
971
# serial 4
 
972
 
 
973
# This was merged into AC_PROG_CC in Autoconf.
 
974
 
 
975
AU_DEFUN([AM_PROG_CC_STDC],
 
976
[AC_PROG_CC
 
977
AC_DIAGNOSE([obsolete], [$0:
 
978
        your code should no longer depend upon `am_cv_prog_cc_stdc', but upon
 
979
        `ac_cv_prog_cc_stdc'.  Remove this warning and the assignment when
 
980
        you adjust the code.  You can also remove the above call to
 
981
        AC_PROG_CC if you already called it elsewhere.])
 
982
am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
 
983
])
 
984
AU_DEFUN([fp_PROG_CC_STDC])
 
985
 
 
986
# AM_CONDITIONAL                                            -*- Autoconf -*-
 
987
 
 
988
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
 
989
# Free Software Foundation, Inc.
 
990
#
 
991
# This file is free software; the Free Software Foundation
 
992
# gives unlimited permission to copy and/or distribute it,
 
993
# with or without modifications, as long as this notice is preserved.
 
994
 
 
995
# serial 7
 
996
 
 
997
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
 
998
# -------------------------------------
 
999
# Define a conditional.
 
1000
AC_DEFUN([AM_CONDITIONAL],
 
1001
[AC_PREREQ(2.52)dnl
 
1002
 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
 
1003
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
 
1004
AC_SUBST([$1_TRUE])
 
1005
AC_SUBST([$1_FALSE])
 
1006
if $2; then
 
1007
  $1_TRUE=
 
1008
  $1_FALSE='#'
 
1009
else
 
1010
  $1_TRUE='#'
 
1011
  $1_FALSE=
 
1012
fi
 
1013
AC_CONFIG_COMMANDS_PRE(
 
1014
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
 
1015
  AC_MSG_ERROR([[conditional "$1" was never defined.
 
1016
Usually this means the macro was only invoked conditionally.]])
 
1017
fi])])
 
1018
 
 
1019
 
 
1020
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
 
1021
# Free Software Foundation, Inc.
 
1022
#
 
1023
# This file is free software; the Free Software Foundation
 
1024
# gives unlimited permission to copy and/or distribute it,
 
1025
# with or without modifications, as long as this notice is preserved.
 
1026
 
 
1027
# serial 8
 
1028
 
 
1029
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 
1030
# written in clear, in which case automake, when reading aclocal.m4,
 
1031
# will think it sees a *use*, and therefore will trigger all it's
 
1032
# C support machinery.  Also note that it means that autoscan, seeing
 
1033
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
 
1034
 
 
1035
 
 
1036
# _AM_DEPENDENCIES(NAME)
 
1037
# ----------------------
 
1038
# See how the compiler implements dependency checking.
 
1039
# NAME is "CC", "CXX", "GCJ", or "OBJC".
 
1040
# We try a few techniques and use that to set a single cache variable.
 
1041
#
 
1042
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
 
1043
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
 
1044
# dependency, and given that the user is not expected to run this macro,
 
1045
# just rely on AC_PROG_CC.
 
1046
AC_DEFUN([_AM_DEPENDENCIES],
 
1047
[AC_REQUIRE([AM_SET_DEPDIR])dnl
 
1048
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
 
1049
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
 
1050
AC_REQUIRE([AM_DEP_TRACK])dnl
 
1051
 
 
1052
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
 
1053
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
 
1054
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
 
1055
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
 
1056
                   [depcc="$$1"   am_compiler_list=])
 
1057
 
 
1058
AC_CACHE_CHECK([dependency style of $depcc],
 
1059
               [am_cv_$1_dependencies_compiler_type],
 
1060
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
 
1061
  # We make a subdir and do the tests there.  Otherwise we can end up
 
1062
  # making bogus files that we don't know about and never remove.  For
 
1063
  # instance it was reported that on HP-UX the gcc test will end up
 
1064
  # making a dummy file named `D' -- because `-MD' means `put the output
 
1065
  # in D'.
 
1066
  mkdir conftest.dir
 
1067
  # Copy depcomp to subdir because otherwise we won't find it if we're
 
1068
  # using a relative directory.
 
1069
  cp "$am_depcomp" conftest.dir
 
1070
  cd conftest.dir
 
1071
  # We will build objects and dependencies in a subdirectory because
 
1072
  # it helps to detect inapplicable dependency modes.  For instance
 
1073
  # both Tru64's cc and ICC support -MD to output dependencies as a
 
1074
  # side effect of compilation, but ICC will put the dependencies in
 
1075
  # the current directory while Tru64 will put them in the object
 
1076
  # directory.
 
1077
  mkdir sub
 
1078
 
 
1079
  am_cv_$1_dependencies_compiler_type=none
 
1080
  if test "$am_compiler_list" = ""; then
 
1081
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
 
1082
  fi
 
1083
  for depmode in $am_compiler_list; do
 
1084
    # Setup a source with many dependencies, because some compilers
 
1085
    # like to wrap large dependency lists on column 80 (with \), and
 
1086
    # we should not choose a depcomp mode which is confused by this.
 
1087
    #
 
1088
    # We need to recreate these files for each test, as the compiler may
 
1089
    # overwrite some of them when testing with obscure command lines.
 
1090
    # This happens at least with the AIX C compiler.
 
1091
    : > sub/conftest.c
 
1092
    for i in 1 2 3 4 5 6; do
 
1093
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
 
1094
      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
 
1095
      # Solaris 8's {/usr,}/bin/sh.
 
1096
      touch sub/conftst$i.h
 
1097
    done
 
1098
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
1099
 
 
1100
    case $depmode in
 
1101
    nosideeffect)
 
1102
      # after this tag, mechanisms are not by side-effect, so they'll
 
1103
      # only be used when explicitly requested
 
1104
      if test "x$enable_dependency_tracking" = xyes; then
 
1105
        continue
 
1106
      else
 
1107
        break
 
1108
      fi
 
1109
      ;;
 
1110
    none) break ;;
 
1111
    esac
 
1112
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
 
1113
    # mode.  It turns out that the SunPro C++ compiler does not properly
 
1114
    # handle `-M -o', and we need to detect this.
 
1115
    if depmode=$depmode \
 
1116
       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
 
1117
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
 
1118
       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
 
1119
         >/dev/null 2>conftest.err &&
 
1120
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
 
1121
       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
 
1122
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
 
1123
      # icc doesn't choke on unknown options, it will just issue warnings
 
1124
      # or remarks (even with -Werror).  So we grep stderr for any message
 
1125
      # that says an option was ignored or not supported.
 
1126
      # When given -MP, icc 7.0 and 7.1 complain thusly:
 
1127
      #   icc: Command line warning: ignoring option '-M'; no argument required
 
1128
      # The diagnosis changed in icc 8.0:
 
1129
      #   icc: Command line remark: option '-MP' not supported
 
1130
      if (grep 'ignoring option' conftest.err ||
 
1131
          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
 
1132
        am_cv_$1_dependencies_compiler_type=$depmode
 
1133
        break
 
1134
      fi
 
1135
    fi
 
1136
  done
 
1137
 
 
1138
  cd ..
 
1139
  rm -rf conftest.dir
 
1140
else
 
1141
  am_cv_$1_dependencies_compiler_type=none
 
1142
fi
 
1143
])
 
1144
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
 
1145
AM_CONDITIONAL([am__fastdep$1], [
 
1146
  test "x$enable_dependency_tracking" != xno \
 
1147
  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
 
1148
])
 
1149
 
 
1150
 
 
1151
# AM_SET_DEPDIR
 
1152
# -------------
 
1153
# Choose a directory name for dependency files.
 
1154
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
 
1155
AC_DEFUN([AM_SET_DEPDIR],
 
1156
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 
1157
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
 
1158
])
 
1159
 
 
1160
 
 
1161
# AM_DEP_TRACK
 
1162
# ------------
 
1163
AC_DEFUN([AM_DEP_TRACK],
 
1164
[AC_ARG_ENABLE(dependency-tracking,
 
1165
[  --disable-dependency-tracking  speeds up one-time build
 
1166
  --enable-dependency-tracking   do not reject slow dependency extractors])
 
1167
if test "x$enable_dependency_tracking" != xno; then
 
1168
  am_depcomp="$ac_aux_dir/depcomp"
 
1169
  AMDEPBACKSLASH='\'
 
1170
fi
 
1171
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
 
1172
AC_SUBST([AMDEPBACKSLASH])
 
1173
])
 
1174
 
 
1175
# Generate code to set up dependency tracking.              -*- Autoconf -*-
 
1176
 
 
1177
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
 
1178
# Free Software Foundation, Inc.
 
1179
#
 
1180
# This file is free software; the Free Software Foundation
 
1181
# gives unlimited permission to copy and/or distribute it,
 
1182
# with or without modifications, as long as this notice is preserved.
 
1183
 
 
1184
#serial 3
 
1185
 
 
1186
# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
1187
# ------------------------------
 
1188
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
 
1189
[for mf in $CONFIG_FILES; do
 
1190
  # Strip MF so we end up with the name of the file.
 
1191
  mf=`echo "$mf" | sed -e 's/:.*$//'`
 
1192
  # Check whether this is an Automake generated Makefile or not.
 
1193
  # We used to match only the files named `Makefile.in', but
 
1194
  # some people rename them; so instead we look at the file content.
 
1195
  # Grep'ing the first line is not enough: some people post-process
 
1196
  # each Makefile.in and add a new line on top of each file to say so.
 
1197
  # So let's grep whole file.
 
1198
  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
 
1199
    dirpart=`AS_DIRNAME("$mf")`
 
1200
  else
 
1201
    continue
 
1202
  fi
 
1203
  # Extract the definition of DEPDIR, am__include, and am__quote
 
1204
  # from the Makefile without running `make'.
 
1205
  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
 
1206
  test -z "$DEPDIR" && continue
 
1207
  am__include=`sed -n 's/^am__include = //p' < "$mf"`
 
1208
  test -z "am__include" && continue
 
1209
  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
 
1210
  # When using ansi2knr, U may be empty or an underscore; expand it
 
1211
  U=`sed -n 's/^U = //p' < "$mf"`
 
1212
  # Find all dependency output files, they are included files with
 
1213
  # $(DEPDIR) in their names.  We invoke sed twice because it is the
 
1214
  # simplest approach to changing $(DEPDIR) to its actual value in the
 
1215
  # expansion.
 
1216
  for file in `sed -n "
 
1217
    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
 
1218
       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
 
1219
    # Make sure the directory exists.
 
1220
    test -f "$dirpart/$file" && continue
 
1221
    fdir=`AS_DIRNAME(["$file"])`
 
1222
    AS_MKDIR_P([$dirpart/$fdir])
 
1223
    # echo "creating $dirpart/$file"
 
1224
    echo '# dummy' > "$dirpart/$file"
 
1225
  done
 
1226
done
 
1227
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
1228
 
 
1229
 
 
1230
# AM_OUTPUT_DEPENDENCY_COMMANDS
 
1231
# -----------------------------
 
1232
# This macro should only be invoked once -- use via AC_REQUIRE.
 
1233
#
 
1234
# This code is only required when automatic dependency tracking
 
1235
# is enabled.  FIXME.  This creates each `.P' file that we will
 
1236
# need in order to bootstrap the dependency handling code.
 
1237
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
1238
[AC_CONFIG_COMMANDS([depfiles],
 
1239
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
 
1240
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
 
1241
])
 
1242
 
 
1243
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
 
1244
# Free Software Foundation, Inc.
 
1245
#
 
1246
# This file is free software; the Free Software Foundation
 
1247
# gives unlimited permission to copy and/or distribute it,
 
1248
# with or without modifications, as long as this notice is preserved.
 
1249
 
 
1250
# serial 8
 
1251
 
 
1252
# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
 
1253
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
 
1254
 
 
1255
# Do all the work for Automake.                             -*- Autoconf -*-
 
1256
 
 
1257
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
 
1258
# Free Software Foundation, Inc.
 
1259
#
 
1260
# This file is free software; the Free Software Foundation
 
1261
# gives unlimited permission to copy and/or distribute it,
 
1262
# with or without modifications, as long as this notice is preserved.
 
1263
 
 
1264
# serial 12
 
1265
 
 
1266
# This macro actually does too much.  Some checks are only needed if
 
1267
# your package does certain things.  But this isn't really a big deal.
 
1268
 
 
1269
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
 
1270
# AM_INIT_AUTOMAKE([OPTIONS])
 
1271
# -----------------------------------------------
 
1272
# The call with PACKAGE and VERSION arguments is the old style
 
1273
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
 
1274
# and VERSION should now be passed to AC_INIT and removed from
 
1275
# the call to AM_INIT_AUTOMAKE.
 
1276
# We support both call styles for the transition.  After
 
1277
# the next Automake release, Autoconf can make the AC_INIT
 
1278
# arguments mandatory, and then we can depend on a new Autoconf
 
1279
# release and drop the old call support.
 
1280
AC_DEFUN([AM_INIT_AUTOMAKE],
 
1281
[AC_PREREQ([2.58])dnl
 
1282
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
 
1283
dnl the ones we care about.
 
1284
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
 
1285
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
 
1286
AC_REQUIRE([AC_PROG_INSTALL])dnl
 
1287
# test to see if srcdir already configured
 
1288
if test "`cd $srcdir && pwd`" != "`pwd`" &&
 
1289
   test -f $srcdir/config.status; then
 
1290
  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
 
1291
fi
 
1292
 
 
1293
# test whether we have cygpath
 
1294
if test -z "$CYGPATH_W"; then
 
1295
  if (cygpath --version) >/dev/null 2>/dev/null; then
 
1296
    CYGPATH_W='cygpath -w'
 
1297
  else
 
1298
    CYGPATH_W=echo
 
1299
  fi
 
1300
fi
 
1301
AC_SUBST([CYGPATH_W])
 
1302
 
 
1303
# Define the identity of the package.
 
1304
dnl Distinguish between old-style and new-style calls.
 
1305
m4_ifval([$2],
 
1306
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
 
1307
 AC_SUBST([PACKAGE], [$1])dnl
 
1308
 AC_SUBST([VERSION], [$2])],
 
1309
[_AM_SET_OPTIONS([$1])dnl
 
1310
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
 
1311
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 
1312
 
 
1313
_AM_IF_OPTION([no-define],,
 
1314
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
 
1315
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
 
1316
 
 
1317
# Some tools Automake needs.
 
1318
AC_REQUIRE([AM_SANITY_CHECK])dnl
 
1319
AC_REQUIRE([AC_ARG_PROGRAM])dnl
 
1320
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
 
1321
AM_MISSING_PROG(AUTOCONF, autoconf)
 
1322
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
 
1323
AM_MISSING_PROG(AUTOHEADER, autoheader)
 
1324
AM_MISSING_PROG(MAKEINFO, makeinfo)
 
1325
AM_PROG_INSTALL_SH
 
1326
AM_PROG_INSTALL_STRIP
 
1327
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
 
1328
# We need awk for the "check" target.  The system "awk" is bad on
 
1329
# some platforms.
 
1330
AC_REQUIRE([AC_PROG_AWK])dnl
 
1331
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 
1332
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 
1333
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
 
1334
              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
 
1335
                             [_AM_PROG_TAR([v7])])])
 
1336
_AM_IF_OPTION([no-dependencies],,
 
1337
[AC_PROVIDE_IFELSE([AC_PROG_CC],
 
1338
                  [_AM_DEPENDENCIES(CC)],
 
1339
                  [define([AC_PROG_CC],
 
1340
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
 
1341
AC_PROVIDE_IFELSE([AC_PROG_CXX],
 
1342
                  [_AM_DEPENDENCIES(CXX)],
 
1343
                  [define([AC_PROG_CXX],
 
1344
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
 
1345
])
 
1346
])
 
1347
 
 
1348
 
 
1349
# When config.status generates a header, we must update the stamp-h file.
 
1350
# This file resides in the same directory as the config header
 
1351
# that is generated.  The stamp files are numbered to have different names.
 
1352
 
 
1353
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
 
1354
# loop where config.status creates the headers, so we can generate
 
1355
# our stamp files there.
 
1356
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
 
1357
[# Compute $1's index in $config_headers.
 
1358
_am_stamp_count=1
 
1359
for _am_header in $config_headers :; do
 
1360
  case $_am_header in
 
1361
    $1 | $1:* )
 
1362
      break ;;
 
1363
    * )
 
1364
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
 
1365
  esac
 
1366
done
 
1367
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
 
1368
 
 
1369
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
1370
#
 
1371
# This file is free software; the Free Software Foundation
 
1372
# gives unlimited permission to copy and/or distribute it,
 
1373
# with or without modifications, as long as this notice is preserved.
 
1374
 
 
1375
# AM_PROG_INSTALL_SH
 
1376
# ------------------
 
1377
# Define $install_sh.
 
1378
AC_DEFUN([AM_PROG_INSTALL_SH],
 
1379
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
1380
install_sh=${install_sh-"$am_aux_dir/install-sh"}
 
1381
AC_SUBST(install_sh)])
 
1382
 
 
1383
# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
 
1384
#
 
1385
# This file is free software; the Free Software Foundation
 
1386
# gives unlimited permission to copy and/or distribute it,
 
1387
# with or without modifications, as long as this notice is preserved.
 
1388
 
 
1389
# serial 2
 
1390
 
 
1391
# Check whether the underlying file-system supports filenames
 
1392
# with a leading dot.  For instance MS-DOS doesn't.
 
1393
AC_DEFUN([AM_SET_LEADING_DOT],
 
1394
[rm -rf .tst 2>/dev/null
 
1395
mkdir .tst 2>/dev/null
 
1396
if test -d .tst; then
 
1397
  am__leading_dot=.
 
1398
else
 
1399
  am__leading_dot=_
 
1400
fi
 
1401
rmdir .tst 2>/dev/null
 
1402
AC_SUBST([am__leading_dot])])
 
1403
 
 
1404
# Check to see how 'make' treats includes.                  -*- Autoconf -*-
 
1405
 
 
1406
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
 
1407
#
 
1408
# This file is free software; the Free Software Foundation
 
1409
# gives unlimited permission to copy and/or distribute it,
 
1410
# with or without modifications, as long as this notice is preserved.
 
1411
 
 
1412
# serial 3
 
1413
 
 
1414
# AM_MAKE_INCLUDE()
 
1415
# -----------------
 
1416
# Check to see how make treats includes.
 
1417
AC_DEFUN([AM_MAKE_INCLUDE],
 
1418
[am_make=${MAKE-make}
 
1419
cat > confinc << 'END'
 
1420
am__doit:
 
1421
        @echo done
 
1422
.PHONY: am__doit
 
1423
END
 
1424
# If we don't find an include directive, just comment out the code.
 
1425
AC_MSG_CHECKING([for style of include used by $am_make])
 
1426
am__include="#"
 
1427
am__quote=
 
1428
_am_result=none
 
1429
# First try GNU make style include.
 
1430
echo "include confinc" > confmf
 
1431
# We grep out `Entering directory' and `Leaving directory'
 
1432
# messages which can occur if `w' ends up in MAKEFLAGS.
 
1433
# In particular we don't look at `^make:' because GNU make might
 
1434
# be invoked under some other name (usually "gmake"), in which
 
1435
# case it prints its new name instead of `make'.
 
1436
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
 
1437
   am__include=include
 
1438
   am__quote=
 
1439
   _am_result=GNU
 
1440
fi
 
1441
# Now try BSD make style include.
 
1442
if test "$am__include" = "#"; then
 
1443
   echo '.include "confinc"' > confmf
 
1444
   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
 
1445
      am__include=.include
 
1446
      am__quote="\""
 
1447
      _am_result=BSD
 
1448
   fi
 
1449
fi
 
1450
AC_SUBST([am__include])
 
1451
AC_SUBST([am__quote])
 
1452
AC_MSG_RESULT([$_am_result])
 
1453
rm -f confinc confmf
 
1454
])
 
1455
 
 
1456
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
1457
 
 
1458
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
 
1459
# Free Software Foundation, Inc.
 
1460
#
 
1461
# This file is free software; the Free Software Foundation
 
1462
# gives unlimited permission to copy and/or distribute it,
 
1463
# with or without modifications, as long as this notice is preserved.
 
1464
 
 
1465
# serial 4
 
1466
 
 
1467
# AM_MISSING_PROG(NAME, PROGRAM)
 
1468
# ------------------------------
 
1469
AC_DEFUN([AM_MISSING_PROG],
 
1470
[AC_REQUIRE([AM_MISSING_HAS_RUN])
 
1471
$1=${$1-"${am_missing_run}$2"}
 
1472
AC_SUBST($1)])
 
1473
 
 
1474
 
 
1475
# AM_MISSING_HAS_RUN
 
1476
# ------------------
 
1477
# Define MISSING if not defined so far and test if it supports --run.
 
1478
# If it does, set am_missing_run to use it, otherwise, to nothing.
 
1479
AC_DEFUN([AM_MISSING_HAS_RUN],
 
1480
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
1481
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
 
1482
# Use eval to expand $SHELL
 
1483
if eval "$MISSING --run true"; then
 
1484
  am_missing_run="$MISSING --run "
 
1485
else
 
1486
  am_missing_run=
 
1487
  AC_MSG_WARN([`missing' script is too old or missing])
 
1488
fi
 
1489
])
 
1490
 
 
1491
# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
 
1492
#
 
1493
# This file is free software; the Free Software Foundation
 
1494
# gives unlimited permission to copy and/or distribute it,
 
1495
# with or without modifications, as long as this notice is preserved.
 
1496
 
 
1497
# AM_PROG_MKDIR_P
 
1498
# ---------------
 
1499
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
 
1500
#
 
1501
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
 
1502
# created by `make install' are always world readable, even if the
 
1503
# installer happens to have an overly restrictive umask (e.g. 077).
 
1504
# This was a mistake.  There are at least two reasons why we must not
 
1505
# use `-m 0755':
 
1506
#   - it causes special bits like SGID to be ignored,
 
1507
#   - it may be too restrictive (some setups expect 775 directories).
 
1508
#
 
1509
# Do not use -m 0755 and let people choose whatever they expect by
 
1510
# setting umask.
 
1511
#
 
1512
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
 
1513
# Some implementations (such as Solaris 8's) are not thread-safe: if a
 
1514
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
 
1515
# concurrently, both version can detect that a/ is missing, but only
 
1516
# one can create it and the other will error out.  Consequently we
 
1517
# restrict ourselves to GNU make (using the --version option ensures
 
1518
# this.)
 
1519
AC_DEFUN([AM_PROG_MKDIR_P],
 
1520
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
 
1521
  # We used to keeping the `.' as first argument, in order to
 
1522
  # allow $(mkdir_p) to be used without argument.  As in
 
1523
  #   $(mkdir_p) $(somedir)
 
1524
  # where $(somedir) is conditionally defined.  However this is wrong
 
1525
  # for two reasons:
 
1526
  #  1. if the package is installed by a user who cannot write `.'
 
1527
  #     make install will fail,
 
1528
  #  2. the above comment should most certainly read
 
1529
  #     $(mkdir_p) $(DESTDIR)$(somedir)
 
1530
  #     so it does not work when $(somedir) is undefined and
 
1531
  #     $(DESTDIR) is not.
 
1532
  #  To support the latter case, we have to write
 
1533
  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
 
1534
  #  so the `.' trick is pointless.
 
1535
  mkdir_p='mkdir -p --'
 
1536
else
 
1537
  # On NextStep and OpenStep, the `mkdir' command does not
 
1538
  # recognize any option.  It will interpret all options as
 
1539
  # directories to create, and then abort because `.' already
 
1540
  # exists.
 
1541
  for d in ./-p ./--version;
 
1542
  do
 
1543
    test -d $d && rmdir $d
 
1544
  done
 
1545
  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
 
1546
  if test -f "$ac_aux_dir/mkinstalldirs"; then
 
1547
    mkdir_p='$(mkinstalldirs)'
 
1548
  else
 
1549
    mkdir_p='$(install_sh) -d'
 
1550
  fi
 
1551
fi
 
1552
AC_SUBST([mkdir_p])])
 
1553
 
 
1554
# Helper functions for option handling.                     -*- Autoconf -*-
 
1555
 
 
1556
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
 
1557
#
 
1558
# This file is free software; the Free Software Foundation
 
1559
# gives unlimited permission to copy and/or distribute it,
 
1560
# with or without modifications, as long as this notice is preserved.
 
1561
 
 
1562
# serial 3
 
1563
 
 
1564
# _AM_MANGLE_OPTION(NAME)
 
1565
# -----------------------
 
1566
AC_DEFUN([_AM_MANGLE_OPTION],
 
1567
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 
1568
 
 
1569
# _AM_SET_OPTION(NAME)
 
1570
# ------------------------------
 
1571
# Set option NAME.  Presently that only means defining a flag for this option.
 
1572
AC_DEFUN([_AM_SET_OPTION],
 
1573
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
 
1574
 
 
1575
# _AM_SET_OPTIONS(OPTIONS)
 
1576
# ----------------------------------
 
1577
# OPTIONS is a space-separated list of Automake options.
 
1578
AC_DEFUN([_AM_SET_OPTIONS],
 
1579
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 
1580
 
 
1581
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
 
1582
# -------------------------------------------
 
1583
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
 
1584
AC_DEFUN([_AM_IF_OPTION],
 
1585
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
1586
 
 
1587
# Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
1588
 
 
1589
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
 
1590
# Free Software Foundation, Inc.
 
1591
#
 
1592
# This file is free software; the Free Software Foundation
 
1593
# gives unlimited permission to copy and/or distribute it,
 
1594
# with or without modifications, as long as this notice is preserved.
 
1595
 
 
1596
# serial 4
 
1597
 
 
1598
# AM_SANITY_CHECK
 
1599
# ---------------
 
1600
AC_DEFUN([AM_SANITY_CHECK],
 
1601
[AC_MSG_CHECKING([whether build environment is sane])
 
1602
# Just in case
 
1603
sleep 1
 
1604
echo timestamp > conftest.file
 
1605
# Do `set' in a subshell so we don't clobber the current shell's
 
1606
# arguments.  Must try -L first in case configure is actually a
 
1607
# symlink; some systems play weird games with the mod time of symlinks
 
1608
# (eg FreeBSD returns the mod time of the symlink's containing
 
1609
# directory).
 
1610
if (
 
1611
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
 
1612
   if test "$[*]" = "X"; then
 
1613
      # -L didn't work.
 
1614
      set X `ls -t $srcdir/configure conftest.file`
 
1615
   fi
 
1616
   rm -f conftest.file
 
1617
   if test "$[*]" != "X $srcdir/configure conftest.file" \
 
1618
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
 
1619
 
 
1620
      # If neither matched, then we have a broken ls.  This can happen
 
1621
      # if, for instance, CONFIG_SHELL is bash and it inherits a
 
1622
      # broken ls alias from the environment.  This has actually
 
1623
      # happened.  Such a system could not be considered "sane".
 
1624
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
 
1625
alias in your environment])
 
1626
   fi
 
1627
 
 
1628
   test "$[2]" = conftest.file
 
1629
   )
 
1630
then
 
1631
   # Ok.
 
1632
   :
 
1633
else
 
1634
   AC_MSG_ERROR([newly created file is older than distributed files!
 
1635
Check your system clock])
 
1636
fi
 
1637
AC_MSG_RESULT(yes)])
 
1638
 
 
1639
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
1640
#
 
1641
# This file is free software; the Free Software Foundation
 
1642
# gives unlimited permission to copy and/or distribute it,
 
1643
# with or without modifications, as long as this notice is preserved.
 
1644
 
 
1645
# AM_PROG_INSTALL_STRIP
 
1646
# ---------------------
 
1647
# One issue with vendor `install' (even GNU) is that you can't
 
1648
# specify the program used to strip binaries.  This is especially
 
1649
# annoying in cross-compiling environments, where the build's strip
 
1650
# is unlikely to handle the host's binaries.
 
1651
# Fortunately install-sh will honor a STRIPPROG variable, so we
 
1652
# always use install-sh in `make install-strip', and initialize
 
1653
# STRIPPROG with the value of the STRIP variable (set by the user).
 
1654
AC_DEFUN([AM_PROG_INSTALL_STRIP],
 
1655
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 
1656
# Installed binaries are usually stripped using `strip' when the user
 
1657
# run `make install-strip'.  However `strip' might not be the right
 
1658
# tool to use in cross-compilation environments, therefore Automake
 
1659
# will honor the `STRIP' environment variable to overrule this program.
 
1660
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
 
1661
if test "$cross_compiling" != no; then
 
1662
  AC_CHECK_TOOL([STRIP], [strip], :)
 
1663
fi
 
1664
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
 
1665
AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
1666
 
 
1667
# Check how to create a tarball.                            -*- Autoconf -*-
 
1668
 
 
1669
# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
 
1670
#
 
1671
# This file is free software; the Free Software Foundation
 
1672
# gives unlimited permission to copy and/or distribute it,
 
1673
# with or without modifications, as long as this notice is preserved.
 
1674
 
 
1675
# serial 2
 
1676
 
 
1677
# _AM_PROG_TAR(FORMAT)
 
1678
# --------------------
 
1679
# Check how to create a tarball in format FORMAT.
 
1680
# FORMAT should be one of `v7', `ustar', or `pax'.
 
1681
#
 
1682
# Substitute a variable $(am__tar) that is a command
 
1683
# writing to stdout a FORMAT-tarball containing the directory
 
1684
# $tardir.
 
1685
#     tardir=directory && $(am__tar) > result.tar
 
1686
#
 
1687
# Substitute a variable $(am__untar) that extract such
 
1688
# a tarball read from stdin.
 
1689
#     $(am__untar) < result.tar
 
1690
AC_DEFUN([_AM_PROG_TAR],
 
1691
[# Always define AMTAR for backward compatibility.
 
1692
AM_MISSING_PROG([AMTAR], [tar])
 
1693
m4_if([$1], [v7],
 
1694
     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
 
1695
     [m4_case([$1], [ustar],, [pax],,
 
1696
              [m4_fatal([Unknown tar format])])
 
1697
AC_MSG_CHECKING([how to create a $1 tar archive])
 
1698
# Loop over all known methods to create a tar archive until one works.
 
1699
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
 
1700
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
 
1701
# Do not fold the above two line into one, because Tru64 sh and
 
1702
# Solaris sh will not grok spaces in the rhs of `-'.
 
1703
for _am_tool in $_am_tools
 
1704
do
 
1705
  case $_am_tool in
 
1706
  gnutar)
 
1707
    for _am_tar in tar gnutar gtar;
 
1708
    do
 
1709
      AM_RUN_LOG([$_am_tar --version]) && break
 
1710
    done
 
1711
    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
 
1712
    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
 
1713
    am__untar="$_am_tar -xf -"
 
1714
    ;;
 
1715
  plaintar)
 
1716
    # Must skip GNU tar: if it does not support --format= it doesn't create
 
1717
    # ustar tarball either.
 
1718
    (tar --version) >/dev/null 2>&1 && continue
 
1719
    am__tar='tar chf - "$$tardir"'
 
1720
    am__tar_='tar chf - "$tardir"'
 
1721
    am__untar='tar xf -'
 
1722
    ;;
 
1723
  pax)
 
1724
    am__tar='pax -L -x $1 -w "$$tardir"'
 
1725
    am__tar_='pax -L -x $1 -w "$tardir"'
 
1726
    am__untar='pax -r'
 
1727
    ;;
 
1728
  cpio)
 
1729
    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
 
1730
    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
 
1731
    am__untar='cpio -i -H $1 -d'
 
1732
    ;;
 
1733
  none)
 
1734
    am__tar=false
 
1735
    am__tar_=false
 
1736
    am__untar=false
 
1737
    ;;
 
1738
  esac
 
1739
 
 
1740
  # If the value was cached, stop now.  We just wanted to have am__tar
 
1741
  # and am__untar set.
 
1742
  test -n "${am_cv_prog_tar_$1}" && break
 
1743
 
 
1744
  # tar/untar a dummy directory, and stop if the command works
 
1745
  rm -rf conftest.dir
 
1746
  mkdir conftest.dir
 
1747
  echo GrepMe > conftest.dir/file
 
1748
  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
 
1749
  rm -rf conftest.dir
 
1750
  if test -s conftest.tar; then
 
1751
    AM_RUN_LOG([$am__untar <conftest.tar])
 
1752
    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
 
1753
  fi
 
1754
done
 
1755
rm -rf conftest.dir
 
1756
 
 
1757
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
 
1758
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
 
1759
AC_SUBST([am__tar])
 
1760
AC_SUBST([am__untar])
 
1761
]) # _AM_PROG_TAR
 
1762