~ubuntu-branches/ubuntu/trusty/patch/trusty-security

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Christoph Berg
  • Date: 2009-12-02 10:25:26 UTC
  • mfrom: (5.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20091202102526-5luk0zsqhghu58l2
Tags: 2.6-2
* Update watch file.
* Section: vcs.
* Suggests: diffutils-doc instead of diff-doc, thanks Christoph Anton
  Mitterer for spotting. Closes: #558974.

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 3 (gettext-0.13)
14
 
dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
15
 
dnl This file is free software, distributed under the terms of the GNU
16
 
dnl General Public License.  As a special exception to the GNU General
17
 
dnl Public License, this file may be distributed as part of a program
18
 
dnl that contains a configuration script generated by Autoconf, under
19
 
dnl the same distribution terms as the rest of that program.
20
 
 
21
 
dnl From Bruno Haible.
22
 
 
23
 
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
24
 
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
25
 
dnl require excessive bracketing.
26
 
ifdef([AC_HELP_STRING],
27
 
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
28
 
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
29
 
 
30
 
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
31
 
dnl to access previously installed libraries. The basic assumption is that
32
 
dnl a user will want packages to use other packages he previously installed
33
 
dnl with the same --prefix option.
34
 
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
35
 
dnl libraries, but is otherwise very convenient.
36
 
AC_DEFUN([AC_LIB_PREFIX],
37
 
[
38
 
  AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
39
 
  AC_REQUIRE([AC_PROG_CC])
40
 
  AC_REQUIRE([AC_CANONICAL_HOST])
41
 
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
42
 
  dnl By default, look in $includedir and $libdir.
43
 
  use_additional=yes
44
 
  AC_LIB_WITH_FINAL_PREFIX([
45
 
    eval additional_includedir=\"$includedir\"
46
 
    eval additional_libdir=\"$libdir\"
47
 
  ])
48
 
  AC_LIB_ARG_WITH([lib-prefix],
49
 
[  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
50
 
  --without-lib-prefix    don't search for libraries in includedir and libdir],
51
 
[
52
 
    if test "X$withval" = "Xno"; then
53
 
      use_additional=no
54
 
    else
55
 
      if test "X$withval" = "X"; then
56
 
        AC_LIB_WITH_FINAL_PREFIX([
57
 
          eval additional_includedir=\"$includedir\"
58
 
          eval additional_libdir=\"$libdir\"
59
 
        ])
60
 
      else
61
 
        additional_includedir="$withval/include"
62
 
        additional_libdir="$withval/lib"
63
 
      fi
64
 
    fi
65
 
])
66
 
  if test $use_additional = yes; then
67
 
    dnl Potentially add $additional_includedir to $CPPFLAGS.
68
 
    dnl But don't add it
69
 
    dnl   1. if it's the standard /usr/include,
70
 
    dnl   2. if it's already present in $CPPFLAGS,
71
 
    dnl   3. if it's /usr/local/include and we are using GCC on Linux,
72
 
    dnl   4. if it doesn't exist as a directory.
73
 
    if test "X$additional_includedir" != "X/usr/include"; then
74
 
      haveit=
75
 
      for x in $CPPFLAGS; do
76
 
        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
77
 
        if test "X$x" = "X-I$additional_includedir"; then
78
 
          haveit=yes
79
 
          break
80
 
        fi
81
 
      done
82
 
      if test -z "$haveit"; then
83
 
        if test "X$additional_includedir" = "X/usr/local/include"; then
84
 
          if test -n "$GCC"; then
85
 
            case $host_os in
86
 
              linux*) haveit=yes;;
87
 
            esac
88
 
          fi
89
 
        fi
90
 
        if test -z "$haveit"; then
91
 
          if test -d "$additional_includedir"; then
92
 
            dnl Really add $additional_includedir to $CPPFLAGS.
93
 
            CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
94
 
          fi
95
 
        fi
96
 
      fi
97
 
    fi
98
 
    dnl Potentially add $additional_libdir to $LDFLAGS.
99
 
    dnl But don't add it
100
 
    dnl   1. if it's the standard /usr/lib,
101
 
    dnl   2. if it's already present in $LDFLAGS,
102
 
    dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
103
 
    dnl   4. if it doesn't exist as a directory.
104
 
    if test "X$additional_libdir" != "X/usr/lib"; then
105
 
      haveit=
106
 
      for x in $LDFLAGS; do
107
 
        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
108
 
        if test "X$x" = "X-L$additional_libdir"; then
109
 
          haveit=yes
110
 
          break
111
 
        fi
112
 
      done
113
 
      if test -z "$haveit"; then
114
 
        if test "X$additional_libdir" = "X/usr/local/lib"; then
115
 
          if test -n "$GCC"; then
116
 
            case $host_os in
117
 
              linux*) haveit=yes;;
118
 
            esac
119
 
          fi
120
 
        fi
121
 
        if test -z "$haveit"; then
122
 
          if test -d "$additional_libdir"; then
123
 
            dnl Really add $additional_libdir to $LDFLAGS.
124
 
            LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
125
 
          fi
126
 
        fi
127
 
      fi
128
 
    fi
129
 
  fi
130
 
])
131
 
 
132
 
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
133
 
dnl acl_final_exec_prefix, containing the values to which $prefix and
134
 
dnl $exec_prefix will expand at the end of the configure script.
135
 
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
136
 
[
137
 
  dnl Unfortunately, prefix and exec_prefix get only finally determined
138
 
  dnl at the end of configure.
139
 
  if test "X$prefix" = "XNONE"; then
140
 
    acl_final_prefix="$ac_default_prefix"
141
 
  else
142
 
    acl_final_prefix="$prefix"
143
 
  fi
144
 
  if test "X$exec_prefix" = "XNONE"; then
145
 
    acl_final_exec_prefix='${prefix}'
146
 
  else
147
 
    acl_final_exec_prefix="$exec_prefix"
148
 
  fi
149
 
  acl_save_prefix="$prefix"
150
 
  prefix="$acl_final_prefix"
151
 
  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
152
 
  prefix="$acl_save_prefix"
153
 
])
154
 
 
155
 
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
156
 
dnl variables prefix and exec_prefix bound to the values they will have
157
 
dnl at the end of the configure script.
158
 
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
159
 
[
160
 
  acl_save_prefix="$prefix"
161
 
  prefix="$acl_final_prefix"
162
 
  acl_save_exec_prefix="$exec_prefix"
163
 
  exec_prefix="$acl_final_exec_prefix"
164
 
  $1
165
 
  exec_prefix="$acl_save_exec_prefix"
166
 
  prefix="$acl_save_prefix"
167
 
])
168
 
 
169
 
# lib-link.m4 serial 4 (gettext-0.12)
170
 
dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
171
 
dnl This file is free software, distributed under the terms of the GNU
172
 
dnl General Public License.  As a special exception to the GNU General
173
 
dnl Public License, this file may be distributed as part of a program
174
 
dnl that contains a configuration script generated by Autoconf, under
175
 
dnl the same distribution terms as the rest of that program.
176
 
 
177
 
dnl From Bruno Haible.
178
 
 
179
 
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
180
 
dnl the libraries corresponding to explicit and implicit dependencies.
181
 
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
182
 
dnl augments the CPPFLAGS variable.
183
 
AC_DEFUN([AC_LIB_LINKFLAGS],
184
 
[
185
 
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
186
 
  AC_REQUIRE([AC_LIB_RPATH])
187
 
  define([Name],[translit([$1],[./-], [___])])
188
 
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
189
 
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
190
 
  AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
191
 
    AC_LIB_LINKFLAGS_BODY([$1], [$2])
192
 
    ac_cv_lib[]Name[]_libs="$LIB[]NAME"
193
 
    ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
194
 
    ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
195
 
  ])
196
 
  LIB[]NAME="$ac_cv_lib[]Name[]_libs"
197
 
  LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
198
 
  INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
199
 
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
200
 
  AC_SUBST([LIB]NAME)
201
 
  AC_SUBST([LTLIB]NAME)
202
 
  dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
203
 
  dnl results of this search when this library appears as a dependency.
204
 
  HAVE_LIB[]NAME=yes
205
 
  undefine([Name])
206
 
  undefine([NAME])
207
 
])
208
 
 
209
 
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
210
 
dnl searches for libname and the libraries corresponding to explicit and
211
 
dnl implicit dependencies, together with the specified include files and
212
 
dnl the ability to compile and link the specified testcode. If found, it
213
 
dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
214
 
dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
215
 
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
216
 
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
217
 
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
218
 
[
219
 
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
220
 
  AC_REQUIRE([AC_LIB_RPATH])
221
 
  define([Name],[translit([$1],[./-], [___])])
222
 
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
223
 
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
224
 
 
225
 
  dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
226
 
  dnl accordingly.
227
 
  AC_LIB_LINKFLAGS_BODY([$1], [$2])
228
 
 
229
 
  dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
230
 
  dnl because if the user has installed lib[]Name and not disabled its use
231
 
  dnl via --without-lib[]Name-prefix, he wants to use it.
232
 
  ac_save_CPPFLAGS="$CPPFLAGS"
233
 
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
234
 
 
235
 
  AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
236
 
    ac_save_LIBS="$LIBS"
237
 
    LIBS="$LIBS $LIB[]NAME"
238
 
    AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
239
 
    LIBS="$ac_save_LIBS"
240
 
  ])
241
 
  if test "$ac_cv_lib[]Name" = yes; then
242
 
    HAVE_LIB[]NAME=yes
243
 
    AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
244
 
    AC_MSG_CHECKING([how to link with lib[]$1])
245
 
    AC_MSG_RESULT([$LIB[]NAME])
246
 
  else
247
 
    HAVE_LIB[]NAME=no
248
 
    dnl If $LIB[]NAME didn't lead to a usable library, we don't need
249
 
    dnl $INC[]NAME either.
250
 
    CPPFLAGS="$ac_save_CPPFLAGS"
251
 
    LIB[]NAME=
252
 
    LTLIB[]NAME=
253
 
  fi
254
 
  AC_SUBST([HAVE_LIB]NAME)
255
 
  AC_SUBST([LIB]NAME)
256
 
  AC_SUBST([LTLIB]NAME)
257
 
  undefine([Name])
258
 
  undefine([NAME])
259
 
])
260
 
 
261
 
dnl Determine the platform dependent parameters needed to use rpath:
262
 
dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
263
 
dnl hardcode_direct, hardcode_minus_L.
264
 
AC_DEFUN([AC_LIB_RPATH],
265
 
[
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*) 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*) 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, distributed under the terms of the GNU
724
 
dnl General Public License.  As a special exception to the GNU General
725
 
dnl Public License, this file may be distributed as part of a program
726
 
dnl that contains a configuration script generated by Autoconf, under
727
 
dnl the same distribution terms as the rest of that program.
728
 
 
729
 
dnl Subroutines of libtool.m4,
730
 
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
731
 
dnl with libtool.m4.
732
 
 
733
 
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
734
 
AC_DEFUN([AC_LIB_PROG_LD_GNU],
735
 
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
736
 
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
737
 
case `$LD -v 2>&1 </dev/null` in
738
 
*GNU* | *'with BFD'*)
739
 
  acl_cv_prog_gnu_ld=yes ;;
740
 
*)
741
 
  acl_cv_prog_gnu_ld=no ;;
742
 
esac])
743
 
with_gnu_ld=$acl_cv_prog_gnu_ld
744
 
])
745
 
 
746
 
dnl From libtool-1.4. Sets the variable LD.
747
 
AC_DEFUN([AC_LIB_PROG_LD],
748
 
[AC_ARG_WITH(gnu-ld,
749
 
[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
750
 
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
751
 
AC_REQUIRE([AC_PROG_CC])dnl
752
 
AC_REQUIRE([AC_CANONICAL_HOST])dnl
753
 
# Prepare PATH_SEPARATOR.
754
 
# The user is always right.
755
 
if test "${PATH_SEPARATOR+set}" != set; then
756
 
  echo "#! /bin/sh" >conf$$.sh
757
 
  echo  "exit 0"   >>conf$$.sh
758
 
  chmod +x conf$$.sh
759
 
  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
760
 
    PATH_SEPARATOR=';'
761
 
  else
762
 
    PATH_SEPARATOR=:
763
 
  fi
764
 
  rm -f conf$$.sh
765
 
fi
766
 
ac_prog=ld
767
 
if test "$GCC" = yes; then
768
 
  # Check if gcc -print-prog-name=ld gives a path.
769
 
  AC_MSG_CHECKING([for ld used by GCC])
770
 
  case $host in
771
 
  *-*-mingw*)
772
 
    # gcc leaves a trailing carriage return which upsets mingw
773
 
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
774
 
  *)
775
 
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
776
 
  esac
777
 
  case $ac_prog in
778
 
    # Accept absolute paths.
779
 
    [[\\/]* | [A-Za-z]:[\\/]*)]
780
 
      [re_direlt='/[^/][^/]*/\.\./']
781
 
      # Canonicalize the path of ld
782
 
      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
783
 
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
784
 
        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
785
 
      done
786
 
      test -z "$LD" && LD="$ac_prog"
787
 
      ;;
788
 
  "")
789
 
    # If it fails, then pretend we aren't using GCC.
790
 
    ac_prog=ld
791
 
    ;;
792
 
  *)
793
 
    # If it is relative, then search for the first ld in PATH.
794
 
    with_gnu_ld=unknown
795
 
    ;;
796
 
  esac
797
 
elif test "$with_gnu_ld" = yes; then
798
 
  AC_MSG_CHECKING([for GNU ld])
799
 
else
800
 
  AC_MSG_CHECKING([for non-GNU ld])
801
 
fi
802
 
AC_CACHE_VAL(acl_cv_path_LD,
803
 
[if test -z "$LD"; then
804
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
805
 
  for ac_dir in $PATH; do
806
 
    test -z "$ac_dir" && ac_dir=.
807
 
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
808
 
      acl_cv_path_LD="$ac_dir/$ac_prog"
809
 
      # Check to see if the program is GNU ld.  I'd rather use --version,
810
 
      # but apparently some GNU ld's only accept -v.
811
 
      # Break only if it was the GNU/non-GNU ld that we prefer.
812
 
      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
813
 
      *GNU* | *'with BFD'*)
814
 
        test "$with_gnu_ld" != no && break ;;
815
 
      *)
816
 
        test "$with_gnu_ld" != yes && break ;;
817
 
      esac
818
 
    fi
819
 
  done
820
 
  IFS="$ac_save_ifs"
821
 
else
822
 
  acl_cv_path_LD="$LD" # Let the user override the test with a path.
823
 
fi])
824
 
LD="$acl_cv_path_LD"
825
 
if test -n "$LD"; then
826
 
  AC_MSG_RESULT($LD)
827
 
else
828
 
  AC_MSG_RESULT(no)
829
 
fi
830
 
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
831
 
AC_LIB_PROG_LD_GNU
832
 
])
833
 
 
834
 
# isc-posix.m4 serial 2 (gettext-0.11.2)
835
 
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
836
 
dnl This file is free software, distributed under the terms of the GNU
837
 
dnl General Public License.  As a special exception to the GNU General
838
 
dnl Public License, this file may be distributed as part of a program
839
 
dnl that contains a configuration script generated by Autoconf, under
840
 
dnl the same distribution terms as the rest of that program.
841
 
 
842
 
# This file is not needed with autoconf-2.53 and newer.  Remove it in 2005.
843
 
 
844
 
# This test replaces the one in autoconf.
845
 
# Currently this macro should have the same name as the autoconf macro
846
 
# because gettext's gettext.m4 (distributed in the automake package)
847
 
# still uses it.  Otherwise, the use in gettext.m4 makes autoheader
848
 
# give these diagnostics:
849
 
#   configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
850
 
#   configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
851
 
 
852
 
undefine([AC_ISC_POSIX])
853
 
 
854
 
AC_DEFUN([AC_ISC_POSIX],
855
 
  [
856
 
    dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
857
 
    AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
858
 
  ]
859
 
)
860
 
 
861
 
# Check for stdbool.h that conforms to C99.
862
 
 
863
 
# Copyright (C) 2002-2003 Free Software Foundation, Inc.
864
 
 
865
 
# This program is free software; you can redistribute it and/or modify
866
 
# it under the terms of the GNU General Public License as published by
867
 
# the Free Software Foundation; either version 2, or (at your option)
868
 
# any later version.
869
 
 
870
 
# This program is distributed in the hope that it will be useful,
871
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
872
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
873
 
# GNU General Public License for more details.
874
 
 
875
 
# You should have received a copy of the GNU General Public License
876
 
# along with this program; if not, write to the Free Software
877
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
878
 
# 02111-1307, USA.
879
 
 
880
 
# Prepare for substituting <stdbool.h> if it is not supported.
881
 
 
882
 
AC_DEFUN([AM_STDBOOL_H],
883
 
[
884
 
  AC_REQUIRE([AC_HEADER_STDBOOL])
885
 
 
886
 
  # Define two additional variables used in the Makefile substitution.
887
 
 
888
 
  if test "$ac_cv_header_stdbool_h" = yes; then
889
 
    STDBOOL_H=''
890
 
  else
891
 
    STDBOOL_H='stdbool.h'
892
 
  fi
893
 
  AC_SUBST([STDBOOL_H])
894
 
 
895
 
  if test "$ac_cv_type__Bool" = yes; then
896
 
    HAVE__BOOL=1
897
 
  else
898
 
    HAVE__BOOL=0
899
 
  fi
900
 
  AC_SUBST([HAVE__BOOL])
901
 
])
902
 
 
903
 
# This macro is only needed in autoconf <= 2.54.  Newer versions of autoconf
904
 
# have this macro built-in.
905
 
 
906
 
AC_DEFUN([AC_HEADER_STDBOOL],
907
 
  [AC_CACHE_CHECK([for stdbool.h that conforms to C99],
908
 
     [ac_cv_header_stdbool_h],
909
 
     [AC_TRY_COMPILE(
910
 
        [
911
 
          #include <stdbool.h>
912
 
          #ifndef bool
913
 
           "error: bool is not defined"
914
 
          #endif
915
 
          #ifndef false
916
 
           "error: false is not defined"
917
 
          #endif
918
 
          #if false
919
 
           "error: false is not 0"
920
 
          #endif
921
 
          #ifndef true
922
 
           "error: false is not defined"
923
 
          #endif
924
 
          #if true != 1
925
 
           "error: true is not 1"
926
 
          #endif
927
 
          #ifndef __bool_true_false_are_defined
928
 
           "error: __bool_true_false_are_defined is not defined"
929
 
          #endif
930
 
 
931
 
          struct s { _Bool s: 1; _Bool t; } s;
932
 
 
933
 
          char a[true == 1 ? 1 : -1];
934
 
          char b[false == 0 ? 1 : -1];
935
 
          char c[__bool_true_false_are_defined == 1 ? 1 : -1];
936
 
          char d[(bool) -0.5 == true ? 1 : -1];
937
 
          bool e = &s;
938
 
          char f[(_Bool) -0.0 == false ? 1 : -1];
939
 
          char g[true];
940
 
          char h[sizeof (_Bool)];
941
 
          char i[sizeof s.t];
942
 
        ],
943
 
        [ return !a + !b + !c + !d + !e + !f + !g + !h + !i; ],
944
 
        [ac_cv_header_stdbool_h=yes],
945
 
        [ac_cv_header_stdbool_h=no])])
946
 
   AC_CHECK_TYPES([_Bool])
947
 
   if test $ac_cv_header_stdbool_h = yes; then
948
 
     AC_DEFINE(HAVE_STDBOOL_H, 1, [Define to 1 if stdbool.h conforms to C99.])
949
 
   fi])
950
 
 
951
 
#serial 5
952
 
 
953
 
dnl From Jim Meyering
954
 
 
955
 
dnl Define HAVE_STRUCT_UTIMBUF if `struct utimbuf' is declared --
956
 
dnl usually in <utime.h>.
957
 
dnl Some systems have utime.h but don't declare the struct anywhere.
958
 
 
959
 
AC_DEFUN([jm_CHECK_TYPE_STRUCT_UTIMBUF],
960
 
[
961
 
  AC_CHECK_HEADERS_ONCE(sys/time.h utime.h)
962
 
  AC_REQUIRE([AC_HEADER_TIME])
963
 
  AC_CACHE_CHECK([for struct utimbuf], fu_cv_sys_struct_utimbuf,
964
 
    [AC_TRY_COMPILE(
965
 
      [
966
 
#ifdef TIME_WITH_SYS_TIME
967
 
# include <sys/time.h>
968
 
# include <time.h>
969
 
#else
970
 
# ifdef HAVE_SYS_TIME_H
971
 
#  include <sys/time.h>
972
 
# else
973
 
#  include <time.h>
974
 
# endif
975
 
#endif
976
 
#ifdef HAVE_UTIME_H
977
 
# include <utime.h>
978
 
#endif
979
 
      ],
980
 
      [static struct utimbuf x; x.actime = x.modtime;],
981
 
      fu_cv_sys_struct_utimbuf=yes,
982
 
      fu_cv_sys_struct_utimbuf=no)
983
 
    ])
984
 
 
985
 
  if test $fu_cv_sys_struct_utimbuf = yes; then
986
 
    AC_DEFINE(HAVE_STRUCT_UTIMBUF, 1,
987
 
      [Define if struct utimbuf is declared -- usually in <utime.h>.
988
 
       Some systems have utime.h but don't declare the struct anywhere. ])
989
 
  fi
990
 
])
991
 
 
992
 
# onceonly.m4 serial 3
993
 
dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
994
 
dnl This file is free software, distributed under the terms of the GNU
995
 
dnl General Public License.  As a special exception to the GNU General
996
 
dnl Public License, this file may be distributed as part of a program
997
 
dnl that contains a configuration script generated by Autoconf, under
998
 
dnl the same distribution terms as the rest of that program.
999
 
 
1000
 
dnl This file defines some "once only" variants of standard autoconf macros.
1001
 
dnl   AC_CHECK_HEADERS_ONCE         like  AC_CHECK_HEADERS
1002
 
dnl   AC_CHECK_FUNCS_ONCE           like  AC_CHECK_FUNCS
1003
 
dnl   AC_CHECK_DECLS_ONCE           like  AC_CHECK_DECLS
1004
 
dnl   AC_REQUIRE([AC_HEADER_STDC])  like  AC_HEADER_STDC
1005
 
dnl The advantage is that the check for each of the headers/functions/decls
1006
 
dnl will be put only once into the 'configure' file. It keeps the size of
1007
 
dnl the 'configure' file down, and avoids redundant output when 'configure'
1008
 
dnl is run.
1009
 
dnl The drawback is that the checks cannot be conditionalized. If you write
1010
 
dnl   if some_condition; then gl_CHECK_HEADERS(stdlib.h); fi
1011
 
dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to
1012
 
dnl empty, and the check will be inserted before the body of the AC_DEFUNed
1013
 
dnl function.
1014
 
 
1015
 
dnl Autoconf version 2.57 or newer is recommended.
1016
 
AC_PREREQ(2.54)
1017
 
 
1018
 
# AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of
1019
 
# AC_CHECK_HEADERS(HEADER1 HEADER2 ...).
1020
 
AC_DEFUN([AC_CHECK_HEADERS_ONCE], [
1021
 
  :
1022
 
  AC_FOREACH([gl_HEADER_NAME], [$1], [
1023
 
    AC_DEFUN([gl_CHECK_HEADER_]m4_quote(translit(m4_defn([gl_HEADER_NAME]),
1024
 
                                                 [-./], [___])), [
1025
 
      AC_CHECK_HEADERS(gl_HEADER_NAME)
1026
 
    ])
1027
 
    AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME,
1028
 
                                                   [-./], [___])))
1029
 
  ])
1030
 
])
1031
 
 
1032
 
# AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of
1033
 
# AC_CHECK_FUNCS(FUNC1 FUNC2 ...).
1034
 
AC_DEFUN([AC_CHECK_FUNCS_ONCE], [
1035
 
  :
1036
 
  AC_FOREACH([gl_FUNC_NAME], [$1], [
1037
 
    AC_DEFUN([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]), [
1038
 
      AC_CHECK_FUNCS(m4_defn([gl_FUNC_NAME]))
1039
 
    ])
1040
 
    AC_REQUIRE([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]))
1041
 
  ])
1042
 
])
1043
 
 
1044
 
# AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of
1045
 
# AC_CHECK_DECLS(DECL1, DECL2, ...).
1046
 
AC_DEFUN([AC_CHECK_DECLS_ONCE], [
1047
 
  :
1048
 
  AC_FOREACH([gl_DECL_NAME], [$1], [
1049
 
    AC_DEFUN([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]), [
1050
 
      AC_CHECK_DECLS(m4_defn([gl_DECL_NAME]))
1051
 
    ])
1052
 
    AC_REQUIRE([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]))
1053
 
  ])
1054
 
])
1055
 
 
1056
 
# backupfile.m4 serial 1
1057
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
1058
 
dnl This file is free software, distributed under the terms of the GNU
1059
 
dnl General Public License.  As a special exception to the GNU General
1060
 
dnl Public License, this file may be distributed as part of a program
1061
 
dnl that contains a configuration script generated by Autoconf, under
1062
 
dnl the same distribution terms as the rest of that program.
1063
 
 
1064
 
AC_DEFUN([gl_BACKUPFILE],
1065
 
[
1066
 
  dnl Prerequisites of lib/backupfile.c.
1067
 
  AC_REQUIRE([AC_HEADER_DIRENT])
1068
 
  AC_REQUIRE([AC_FUNC_CLOSEDIR_VOID])
1069
 
  AC_CHECK_HEADERS_ONCE(limits.h stdlib.h string.h)
1070
 
  AC_CHECK_DECLS_ONCE(getenv malloc)
1071
 
  jm_CHECK_TYPE_STRUCT_DIRENT_D_INO
1072
 
 
1073
 
  dnl Prerequisites of lib/addext.c.
1074
 
  AC_REQUIRE([jm_AC_DOS])
1075
 
  AC_SYS_LONG_FILE_NAMES
1076
 
  AC_CHECK_HEADERS_ONCE(limits.h string.h unistd.h)
1077
 
  AC_CHECK_FUNCS(pathconf)
1078
 
])
1079
 
 
1080
 
#serial 5
1081
 
 
1082
 
dnl From Jim Meyering.
1083
 
dnl
1084
 
dnl Check whether struct dirent has a member named d_ino.
1085
 
dnl
1086
 
 
1087
 
AC_DEFUN([jm_CHECK_TYPE_STRUCT_DIRENT_D_INO],
1088
 
  [AC_REQUIRE([AC_HEADER_DIRENT])dnl
1089
 
   AC_CACHE_CHECK([for d_ino member in directory struct],
1090
 
                  jm_cv_struct_dirent_d_ino,
1091
 
     [AC_TRY_LINK(dnl
1092
 
       [
1093
 
#include <sys/types.h>
1094
 
#ifdef HAVE_DIRENT_H
1095
 
# include <dirent.h>
1096
 
#else /* not HAVE_DIRENT_H */
1097
 
# define dirent direct
1098
 
# ifdef HAVE_SYS_NDIR_H
1099
 
#  include <sys/ndir.h>
1100
 
# endif /* HAVE_SYS_NDIR_H */
1101
 
# ifdef HAVE_SYS_DIR_H
1102
 
#  include <sys/dir.h>
1103
 
# endif /* HAVE_SYS_DIR_H */
1104
 
# ifdef HAVE_NDIR_H
1105
 
#  include <ndir.h>
1106
 
# endif /* HAVE_NDIR_H */
1107
 
#endif /* HAVE_DIRENT_H */
1108
 
       ],
1109
 
       [struct dirent dp; dp.d_ino = 0;],
1110
 
 
1111
 
       jm_cv_struct_dirent_d_ino=yes,
1112
 
       jm_cv_struct_dirent_d_ino=no)
1113
 
     ]
1114
 
   )
1115
 
   if test $jm_cv_struct_dirent_d_ino = yes; then
1116
 
     AC_DEFINE(D_INO_IN_DIRENT, 1,
1117
 
       [Define if there is a member named d_ino in the struct describing
1118
 
        directory headers.])
1119
 
   fi
1120
 
  ]
1121
 
)
1122
 
 
1123
 
#serial 5
1124
 
 
1125
 
# Define some macros required for proper operation of code in lib/*.c
1126
 
# on MSDOS/Windows systems.
1127
 
 
1128
 
# From Jim Meyering.
1129
 
 
1130
 
AC_DEFUN([jm_AC_DOS],
1131
 
  [
1132
 
    AC_CACHE_CHECK([whether system is Windows or MSDOS], [ac_cv_win_or_dos],
1133
 
      [
1134
 
        AC_TRY_COMPILE([],
1135
 
        [#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__
1136
 
neither MSDOS nor Windows
1137
 
#endif],
1138
 
        [ac_cv_win_or_dos=yes],
1139
 
        [ac_cv_win_or_dos=no])
1140
 
      ])
1141
 
 
1142
 
    if test x"$ac_cv_win_or_dos" = xyes; then
1143
 
      ac_fs_accepts_drive_letter_prefix=1
1144
 
      ac_fs_backslash_is_file_name_separator=1
1145
 
    else
1146
 
      ac_fs_accepts_drive_letter_prefix=0
1147
 
      ac_fs_backslash_is_file_name_separator=0
1148
 
    fi
1149
 
 
1150
 
    AH_VERBATIM(FILESYSTEM_PREFIX_LEN,
1151
 
    [#if FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX
1152
 
# define FILESYSTEM_PREFIX_LEN(Filename) \
1153
 
  ((Filename)[0] && (Filename)[1] == ':' ? 2 : 0)
1154
 
#else
1155
 
# define FILESYSTEM_PREFIX_LEN(Filename) 0
1156
 
#endif])
1157
 
 
1158
 
    AC_DEFINE_UNQUOTED([FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX],
1159
 
      $ac_fs_accepts_drive_letter_prefix,
1160
 
      [Define on systems for which file names may have a so-called
1161
 
       `drive letter' prefix, define this to compute the length of that
1162
 
       prefix, including the colon.])
1163
 
 
1164
 
    AH_VERBATIM(ISSLASH,
1165
 
    [#if FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
1166
 
# define ISSLASH(C) ((C) == '/' || (C) == '\\')
1167
 
#else
1168
 
# define ISSLASH(C) ((C) == '/')
1169
 
#endif])
1170
 
 
1171
 
    AC_DEFINE_UNQUOTED([FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR],
1172
 
      $ac_fs_backslash_is_file_name_separator,
1173
 
      [Define if the backslash character may also serve as a file name
1174
 
       component separator.])
1175
 
  ])
1176
 
 
1177
 
# dirname.m4 serial 1
1178
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
1179
 
dnl This file is free software, distributed under the terms of the GNU
1180
 
dnl General Public License.  As a special exception to the GNU General
1181
 
dnl Public License, this file may be distributed as part of a program
1182
 
dnl that contains a configuration script generated by Autoconf, under
1183
 
dnl the same distribution terms as the rest of that program.
1184
 
 
1185
 
AC_DEFUN([gl_DIRNAME],
1186
 
[
1187
 
  dnl Prerequisites of lib/dirname.h.
1188
 
  AC_REQUIRE([jm_AC_DOS])
1189
 
 
1190
 
  dnl Prerequisites of lib/dirname.c.
1191
 
  AC_REQUIRE([AC_HEADER_STDC])
1192
 
  AC_CHECK_HEADERS_ONCE(string.h)
1193
 
 
1194
 
  dnl Prerequisites of lib/basename.c.
1195
 
  AC_REQUIRE([AC_HEADER_STDC])
1196
 
  AC_CHECK_HEADERS_ONCE(string.h)
1197
 
 
1198
 
  dnl Prerequisites of lib/stripslash.c.
1199
 
  AC_REQUIRE([AC_HEADER_STDC])
1200
 
  AC_CHECK_HEADERS_ONCE(string.h)
1201
 
])
1202
 
 
1203
 
#serial 7
1204
 
 
1205
 
AC_DEFUN([gl_ERROR],
1206
 
[
1207
 
  AC_FUNC_ERROR_AT_LINE
1208
 
  dnl Note: AC_FUNC_ERROR_AT_LINE does AC_LIBSOURCES([error.h, error.c]).
1209
 
  jm_PREREQ_ERROR
1210
 
])
1211
 
 
1212
 
# Prerequisites of lib/error.c.
1213
 
AC_DEFUN([jm_PREREQ_ERROR],
1214
 
[
1215
 
  AC_REQUIRE([AC_HEADER_STDC])
1216
 
  AC_REQUIRE([AC_FUNC_VPRINTF])
1217
 
  AC_CHECK_FUNCS(strerror)
1218
 
  AC_CHECK_DECLS([strerror])
1219
 
  AC_FUNC_STRERROR_R
1220
 
])
1221
 
 
1222
 
# memchr.m4 serial 1
1223
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
1224
 
dnl This file is free software, distributed under the terms of the GNU
1225
 
dnl General Public License.  As a special exception to the GNU General
1226
 
dnl Public License, this file may be distributed as part of a program
1227
 
dnl that contains a configuration script generated by Autoconf, under
1228
 
dnl the same distribution terms as the rest of that program.
1229
 
 
1230
 
AC_DEFUN([gl_FUNC_MEMCHR],
1231
 
[
1232
 
  AC_REPLACE_FUNCS(memchr)
1233
 
  if test $ac_cv_func_memchr = no; then
1234
 
    jm_PREREQ_MEMCHR
1235
 
  fi
1236
 
])
1237
 
 
1238
 
# Prerequisites of lib/memchr.c.
1239
 
AC_DEFUN([jm_PREREQ_MEMCHR], [
1240
 
  AC_CHECK_HEADERS_ONCE(limits.h stdlib.h)
1241
 
  AC_CHECK_HEADERS(bp-sym.h)
1242
 
])
1243
 
 
1244
 
# rmdir.m4 serial 1
1245
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
1246
 
dnl This file is free software, distributed under the terms of the GNU
1247
 
dnl General Public License.  As a special exception to the GNU General
1248
 
dnl Public License, this file may be distributed as part of a program
1249
 
dnl that contains a configuration script generated by Autoconf, under
1250
 
dnl the same distribution terms as the rest of that program.
1251
 
 
1252
 
AC_DEFUN([gl_FUNC_RMDIR],
1253
 
[
1254
 
  AC_REPLACE_FUNCS(rmdir)
1255
 
  if test $ac_cv_func_rmdir = no; then
1256
 
    gl_PREREQ_RMDIR
1257
 
  fi
1258
 
])
1259
 
 
1260
 
# Prerequisites of lib/rmdir.c.
1261
 
AC_DEFUN([gl_PREREQ_RMDIR], [
1262
 
  AC_REQUIRE([AC_HEADER_STAT])
1263
 
  :
1264
 
])
1265
 
 
1266
 
 
1267
 
# getopt.m4 serial 1
1268
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
1269
 
dnl This file is free software, distributed under the terms of the GNU
1270
 
dnl General Public License.  As a special exception to the GNU General
1271
 
dnl Public License, this file may be distributed as part of a program
1272
 
dnl that contains a configuration script generated by Autoconf, under
1273
 
dnl the same distribution terms as the rest of that program.
1274
 
 
1275
 
AC_DEFUN([gl_GETOPT],
1276
 
[
1277
 
  dnl Prerequisites of lib/getopt.c.
1278
 
  AC_CHECK_HEADERS_ONCE(string.h)
1279
 
])
1280
 
 
1281
 
# xalloc.m4 serial 1
1282
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
1283
 
dnl This file is free software, distributed under the terms of the GNU
1284
 
dnl General Public License.  As a special exception to the GNU General
1285
 
dnl Public License, this file may be distributed as part of a program
1286
 
dnl that contains a configuration script generated by Autoconf, under
1287
 
dnl the same distribution terms as the rest of that program.
1288
 
 
1289
 
AC_DEFUN([gl_XALLOC],
1290
 
[
1291
 
  gl_PREREQ_XMALLOC
1292
 
  gl_PREREQ_XSTRDUP
1293
 
])
1294
 
 
1295
 
# Prerequisites of lib/xmalloc.c.
1296
 
AC_DEFUN([gl_PREREQ_XMALLOC], [
1297
 
  AC_REQUIRE([AC_HEADER_STDC])
1298
 
  AC_REQUIRE([jm_FUNC_MALLOC])
1299
 
  AC_REQUIRE([jm_FUNC_REALLOC])
1300
 
])
1301
 
 
1302
 
# Prerequisites of lib/xstrdup.c.
1303
 
AC_DEFUN([gl_PREREQ_XSTRDUP], [
1304
 
  AC_REQUIRE([AC_HEADER_STDC])
1305
 
  AC_CHECK_HEADERS_ONCE(string.h)
1306
 
])
1307
 
 
1308
 
# malloc.m4 serial 7
1309
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
1310
 
dnl This file is free software, distributed under the terms of the GNU
1311
 
dnl General Public License.  As a special exception to the GNU General
1312
 
dnl Public License, this file may be distributed as part of a program
1313
 
dnl that contains a configuration script generated by Autoconf, under
1314
 
dnl the same distribution terms as the rest of that program.
1315
 
 
1316
 
dnl From Jim Meyering.
1317
 
dnl Determine whether malloc accepts 0 as its argument.
1318
 
dnl If it doesn't, arrange to use the replacement function.
1319
 
 
1320
 
AC_DEFUN([jm_FUNC_MALLOC],
1321
 
[
1322
 
  AC_REQUIRE([AC_FUNC_MALLOC])
1323
 
  dnl autoconf < 2.57 used the symbol ac_cv_func_malloc_works.
1324
 
  if test X"$ac_cv_func_malloc_0_nonnull" = Xno || test X"$ac_cv_func_malloc_works" = Xno; then
1325
 
    gl_PREREQ_MALLOC
1326
 
  fi
1327
 
])
1328
 
 
1329
 
# Prerequisites of lib/malloc.c.
1330
 
AC_DEFUN([gl_PREREQ_MALLOC], [
1331
 
  :
1332
 
])
1333
 
 
1334
 
# realloc.m4 serial 7
1335
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
1336
 
dnl This file is free software, distributed under the terms of the GNU
1337
 
dnl General Public License.  As a special exception to the GNU General
1338
 
dnl Public License, this file may be distributed as part of a program
1339
 
dnl that contains a configuration script generated by Autoconf, under
1340
 
dnl the same distribution terms as the rest of that program.
1341
 
 
1342
 
dnl From Jim Meyering.
1343
 
dnl Determine whether realloc works when both arguments are 0.
1344
 
dnl If it doesn't, arrange to use the replacement function.
1345
 
 
1346
 
AC_DEFUN([jm_FUNC_REALLOC],
1347
 
[
1348
 
  AC_REQUIRE([AC_FUNC_REALLOC])
1349
 
  dnl autoconf < 2.57 used the symbol ac_cv_func_realloc_works.
1350
 
  if test X"$ac_cv_func_realloc_0_nonnull" = Xno || test X"$ac_cv_func_realloc_works" = Xno; then
1351
 
    gl_PREREQ_REALLOC
1352
 
  fi
1353
 
])
1354
 
 
1355
 
# Prerequisites of lib/realloc.c.
1356
 
AC_DEFUN([gl_PREREQ_REALLOC], [
1357
 
  :
1358
 
])
1359
 
 
1360
 
# quote.m4 serial 1
1361
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
1362
 
dnl This file is free software, distributed under the terms of the GNU
1363
 
dnl General Public License.  As a special exception to the GNU General
1364
 
dnl Public License, this file may be distributed as part of a program
1365
 
dnl that contains a configuration script generated by Autoconf, under
1366
 
dnl the same distribution terms as the rest of that program.
1367
 
 
1368
 
AC_DEFUN([gl_QUOTE],
1369
 
[
1370
 
  dnl Prerequisites of lib/quote.c.
1371
 
  AC_CHECK_HEADERS_ONCE(stddef.h)
1372
 
])
1373
 
 
1374
 
# quotearg.m4 serial 1
1375
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
1376
 
dnl This file is free software, distributed under the terms of the GNU
1377
 
dnl General Public License.  As a special exception to the GNU General
1378
 
dnl Public License, this file may be distributed as part of a program
1379
 
dnl that contains a configuration script generated by Autoconf, under
1380
 
dnl the same distribution terms as the rest of that program.
1381
 
 
1382
 
AC_DEFUN([gl_QUOTEARG],
1383
 
[
1384
 
  dnl Prerequisites of lib/quotearg.c.
1385
 
  AC_CHECK_HEADERS_ONCE(wchar.h wctype.h)
1386
 
  AC_CHECK_FUNCS_ONCE(iswprint mbsinit)
1387
 
  AC_TYPE_MBSTATE_T
1388
 
  jm_FUNC_MBRTOWC
1389
 
])
1390
 
 
1391
 
# mbstate_t.m4 serial 9
1392
 
dnl Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
1393
 
dnl This file is free software, distributed under the terms of the GNU
1394
 
dnl General Public License.  As a special exception to the GNU General
1395
 
dnl Public License, this file may be distributed as part of a program
1396
 
dnl that contains a configuration script generated by Autoconf, under
1397
 
dnl the same distribution terms as the rest of that program.
1398
 
 
1399
 
# From Paul Eggert.
1400
 
 
1401
 
# BeOS 5 has <wchar.h> but does not define mbstate_t,
1402
 
# so you can't declare an object of that type.
1403
 
# Check for this incompatibility with Standard C.
1404
 
 
1405
 
# AC_TYPE_MBSTATE_T
1406
 
# -----------------
1407
 
AC_DEFUN([AC_TYPE_MBSTATE_T],
1408
 
  [AC_CACHE_CHECK([for mbstate_t], ac_cv_type_mbstate_t,
1409
 
     [AC_COMPILE_IFELSE(
1410
 
        [AC_LANG_PROGRAM(
1411
 
           [AC_INCLUDES_DEFAULT
1412
 
#           include <wchar.h>],
1413
 
           [mbstate_t x; return sizeof x;])],
1414
 
        [ac_cv_type_mbstate_t=yes],
1415
 
        [ac_cv_type_mbstate_t=no])])
1416
 
   if test $ac_cv_type_mbstate_t = yes; then
1417
 
     AC_DEFINE([HAVE_MBSTATE_T], 1,
1418
 
               [Define to 1 if <wchar.h> declares mbstate_t.])
1419
 
   else
1420
 
     AC_DEFINE([mbstate_t], int,
1421
 
               [Define to a type if <wchar.h> does not define.])
1422
 
   fi])
1423
 
 
1424
 
# mbrtowc.m4 serial 5
1425
 
dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
1426
 
dnl This file is free software, distributed under the terms of the GNU
1427
 
dnl General Public License.  As a special exception to the GNU General
1428
 
dnl Public License, this file may be distributed as part of a program
1429
 
dnl that contains a configuration script generated by Autoconf, under
1430
 
dnl the same distribution terms as the rest of that program.
1431
 
 
1432
 
dnl From Paul Eggert
1433
 
 
1434
 
dnl This file can be removed, and jm_FUNC_MBRTOWC replaced with
1435
 
dnl AC_FUNC_MBRTOWC, when autoconf 2.57 can be assumed everywhere.
1436
 
 
1437
 
AC_DEFUN([jm_FUNC_MBRTOWC],
1438
 
[
1439
 
  AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared],
1440
 
    jm_cv_func_mbrtowc,
1441
 
    [AC_TRY_LINK(
1442
 
       [#include <wchar.h>],
1443
 
       [mbstate_t state; return ! (sizeof state && mbrtowc);],
1444
 
       jm_cv_func_mbrtowc=yes,
1445
 
       jm_cv_func_mbrtowc=no)])
1446
 
  if test $jm_cv_func_mbrtowc = yes; then
1447
 
    AC_DEFINE(HAVE_MBRTOWC, 1,
1448
 
      [Define to 1 if mbrtowc and mbstate_t are properly declared.])
1449
 
  fi
1450
 
])
1451
 
 
1452
 
# hash.m4 serial 1
1453
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
1454
 
dnl This file is free software, distributed under the terms of the GNU
1455
 
dnl General Public License.  As a special exception to the GNU General
1456
 
dnl Public License, this file may be distributed as part of a program
1457
 
dnl that contains a configuration script generated by Autoconf, under
1458
 
dnl the same distribution terms as the rest of that program.
1459
 
 
1460
 
AC_DEFUN([gl_HASH],
1461
 
[
1462
 
  dnl Prerequisites of lib/hash.c.
1463
 
  AC_CHECK_HEADERS_ONCE(stdlib.h)
1464
 
  AC_HEADER_STDBOOL
1465
 
  AC_CHECK_DECLS_ONCE(free malloc)
1466
 
])
1467
 
 
1468
 
AC_DEFUN([ag_CHECK_NANOSECOND_STAT],
1469
 
  [AC_CACHE_CHECK([for nanosecond timestamps in struct stat],
1470
 
     [ac_cv_stat_nsec],
1471
 
     [AC_TRY_COMPILE(
1472
 
        [
1473
 
          #include <sys/types.h>
1474
 
          #include <sys/stat.h>
1475
 
          #include <unistd.h>
1476
 
          struct stat st;
1477
 
        ],
1478
 
        [ return st.st_atimensec + st.st_mtimensec + st.st_ctimensec; ],
1479
 
        [ac_cv_stat_nsec=yes],
1480
 
        [ac_cv_stat_nsec=no])
1481
 
     ])
1482
 
   if test $ac_cv_stat_nsec = yes; then
1483
 
     AC_DEFINE(HAVE_STAT_NSEC, 1, [Define to 1 if struct stat has nanosecond timestamps.])
1484
 
   fi
1485
 
 
1486
 
   AC_CACHE_CHECK([for nanosecond timestamps in struct stat],
1487
 
     [ac_cv_stat_timeval],
1488
 
     [AC_TRY_COMPILE(
1489
 
        [
1490
 
          #include <time.h>
1491
 
          #include <sys/types.h>
1492
 
          #include <sys/stat.h>
1493
 
          #include <unistd.h>
1494
 
          struct stat st;
1495
 
        ],
1496
 
        [ return st.st_atim.tv_nsec + st.st_mtim.tv_nsec + st.st_ctim.tv_nsec; ],
1497
 
        [ac_cv_stat_timeval=yes],
1498
 
        [ac_cv_stat_timeval=no])
1499
 
     ])
1500
 
   if test $ac_cv_stat_timeval = yes; then
1501
 
     AC_DEFINE(HAVE_STAT_TIMEVAL, 1, [Define to 1 if struct stat comtains struct timeval's.])
1502
 
   fi])
1503
 
 
1504
 
#serial 7 -*- autoconf -*-
1505
 
 
1506
 
dnl From Jim Meyering.
1507
 
dnl
1508
 
dnl See if the glibc *_unlocked I/O macros or functions are available.
1509
 
dnl Use only those *_unlocked macros or functions that are declared
1510
 
dnl (because some of them were declared in Solaris 2.5.1 but were removed
1511
 
dnl in Solaris 2.6, whereas we want binaries built on Solaris 2.5.1 to run
1512
 
dnl on Solaris 2.6).
1513
 
 
1514
 
AC_DEFUN([jm_FUNC_GLIBC_UNLOCKED_IO],
1515
 
[
1516
 
  dnl Persuade glibc <stdio.h> to declare fgets_unlocked(), fputs_unlocked()
1517
 
  dnl etc.
1518
 
  AC_REQUIRE([AC_GNU_SOURCE])
1519
 
 
1520
 
  AC_CHECK_DECLS_ONCE(
1521
 
     [clearerr_unlocked feof_unlocked ferror_unlocked
1522
 
      fflush_unlocked fgets_unlocked fputc_unlocked fputs_unlocked
1523
 
      fread_unlocked fwrite_unlocked getc_unlocked
1524
 
      getchar_unlocked putc_unlocked putchar_unlocked])
1525
 
])
1526
 
 
1527
 
# Check for setmode, DOS style.
1528
 
 
1529
 
# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
1530
 
 
1531
 
# This program is free software; you can redistribute it and/or modify
1532
 
# it under the terms of the GNU General Public License as published by
1533
 
# the Free Software Foundation; either version 2, or (at your option)
1534
 
# any later version.
1535
 
 
1536
 
# This program is distributed in the hope that it will be useful,
1537
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1538
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1539
 
# GNU General Public License for more details.
1540
 
 
1541
 
# You should have received a copy of the GNU General Public License
1542
 
# along with this program; if not, write to the Free Software
1543
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1544
 
# 02111-1307, USA.
1545
 
 
1546
 
AC_DEFUN([AC_FUNC_SETMODE_DOS],
1547
 
  [AC_CHECK_HEADERS(fcntl.h unistd.h)
1548
 
   AC_CACHE_CHECK([for DOS-style setmode],
1549
 
     [ac_cv_func_setmode_dos],
1550
 
     [AC_TRY_LINK(
1551
 
        [#include <io.h>
1552
 
         #if HAVE_FCNTL_H
1553
 
         # include <fcntl.h>
1554
 
         #endif
1555
 
         #if HAVE_UNISTD_H
1556
 
         # include <unistd.h>
1557
 
         #endif],
1558
 
        [int ret = setmode && setmode (1, O_BINARY);],
1559
 
        [ac_cv_func_setmode_dos=yes],
1560
 
        [ac_cv_func_setmode_dos=no])])
1561
 
   if test $ac_cv_func_setmode_dos = yes; then
1562
 
     AC_DEFINE(HAVE_SETMODE_DOS, 1,
1563
 
       [Define to 1 if you have the DOS-style `setmode' function.])
1564
 
   fi])
1565
 
 
1566
 
#serial 1
1567
 
 
1568
 
dnl From Mumit Khan and Paul Eggert
1569
 
dnl Determine whether mkdir accepts only one argument instead of the usual two.
1570
 
 
1571
 
AC_DEFUN([PATCH_FUNC_MKDIR_TAKES_ONE_ARG],
1572
 
  [AC_CHECK_FUNCS(mkdir)
1573
 
   AC_CACHE_CHECK([whether mkdir takes only one argument],
1574
 
     patch_cv_mkdir_takes_one_arg,
1575
 
     [patch_cv_mkdir_takes_one_arg=no
1576
 
      if test $ac_cv_func_mkdir = yes; then
1577
 
        AC_TRY_COMPILE([
1578
 
#include <sys/types.h>
1579
 
#include <sys/stat.h>
1580
 
          ],
1581
 
          [mkdir (".", 0);],
1582
 
          ,
1583
 
          [AC_TRY_COMPILE([
1584
 
#include <sys/types.h>
1585
 
#include <sys/stat.h>
1586
 
             ],
1587
 
             [mkdir (".");],
1588
 
             patch_cv_mkdir_takes_one_arg=yes
1589
 
          )]
1590
 
        )
1591
 
      fi
1592
 
     ]
1593
 
   )
1594
 
   if test $patch_cv_mkdir_takes_one_arg = yes; then
1595
 
     AC_DEFINE([MKDIR_TAKES_ONE_ARG], 1,
1596
 
       [Define if mkdir takes only one argument.])
1597
 
   fi
1598
 
  ]
1599
 
)
1600
 
 
 
1
# generated automatically by aclocal 1.11 -*- Autoconf -*-
 
2
 
 
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 
4
# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
 
5
# This file is free software; the Free Software Foundation
 
6
# gives unlimited permission to copy and/or distribute it,
 
7
# with or without modifications, as long as this notice is preserved.
 
8
 
 
9
# This program is distributed in the hope that it will be useful,
 
10
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
 
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 
12
# PARTICULAR PURPOSE.
 
13
 
 
14
m4_include([gl/m4/argmatch.m4])
 
15
m4_include([gl/m4/backupfile.m4])
 
16
m4_include([gl/m4/d-ino.m4])
 
17
m4_include([gl/m4/dirname.m4])
 
18
m4_include([gl/m4/dos.m4])
 
19
m4_include([gl/m4/double-slash-root.m4])
 
20
m4_include([gl/m4/error.m4])
 
21
m4_include([gl/m4/exitfail.m4])
 
22
m4_include([gl/m4/extensions.m4])
 
23
m4_include([gl/m4/getopt.m4])
 
24
m4_include([gl/m4/hash.m4])
 
25
m4_include([gl/m4/inline.m4])
 
26
m4_include([gl/m4/malloc.m4])
 
27
m4_include([gl/m4/memchr.m4])
 
28
m4_include([gl/m4/onceonly.m4])
 
29
m4_include([gl/m4/quote.m4])
 
30
m4_include([gl/m4/quotearg.m4])
 
31
m4_include([gl/m4/realloc.m4])
 
32
m4_include([gl/m4/safe-read.m4])
 
33
m4_include([gl/m4/safe-write.m4])
 
34
m4_include([gl/m4/ssize_t.m4])
 
35
m4_include([gl/m4/stdbool.m4])
 
36
m4_include([gl/m4/strcase.m4])
 
37
m4_include([gl/m4/unlocked-io.m4])
 
38
m4_include([gl/m4/utimbuf.m4])
 
39
m4_include([gl/m4/xalloc.m4])
 
40
m4_include([gl/m4/xstrndup.m4])
 
41
m4_include([m4/mkdir.m4])
 
42
m4_include([m4/setmode.m4])