~ubuntu-branches/ubuntu/lucid/autoconf/lucid

« back to all changes in this revision

Viewing changes to lib/autoconf/general.m4

  • Committer: Bazaar Package Importer
  • Author(s): Ben Pfaff
  • Date: 2002-03-27 21:52:33 UTC
  • Revision ID: james.westby@ubuntu.com-20020327215233-r3gmxall0x27s306
Tags: upstream-2.53
ImportĀ upstreamĀ versionĀ 2.53

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# This file is part of Autoconf.                       -*- Autoconf -*-
 
2
# Parameterized macros.
 
3
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
 
4
# Free Software Foundation, Inc.
 
5
 
 
6
# This program is free software; you can redistribute it and/or modify
 
7
# it under the terms of the GNU General Public License as published by
 
8
# the Free Software Foundation; either version 2, or (at your option)
 
9
# any later version.
 
10
#
 
11
# This program is distributed in the hope that it will be useful,
 
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
# GNU General Public License for more details.
 
15
#
 
16
# You should have received a copy of the GNU General Public License
 
17
# along with this program; if not, write to the Free Software
 
18
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
19
# 02111-1307, USA.
 
20
 
 
21
# As a special exception, the Free Software Foundation gives unlimited
 
22
# permission to copy, distribute and modify the configure scripts that
 
23
# are the output of Autoconf.  You need not follow the terms of the GNU
 
24
# General Public License when using or distributing such scripts, even
 
25
# though portions of the text of Autoconf appear in them.  The GNU
 
26
# General Public License (GPL) does govern all other use of the material
 
27
# that constitutes the Autoconf program.
 
28
#
 
29
# Certain portions of the Autoconf source text are designed to be copied
 
30
# (in certain cases, depending on the input) into the output of
 
31
# Autoconf.  We call these the "data" portions.  The rest of the Autoconf
 
32
# source text consists of comments plus executable code that decides which
 
33
# of the data portions to output in any given case.  We call these
 
34
# comments and executable code the "non-data" portions.  Autoconf never
 
35
# copies any of the non-data portions into its output.
 
36
#
 
37
# This special exception to the GPL applies to versions of Autoconf
 
38
# released by the Free Software Foundation.  When you make and
 
39
# distribute a modified version of Autoconf, you may extend this special
 
40
# exception to the GPL to apply to your modified version as well, *unless*
 
41
# your modified version has the potential to copy into its output some
 
42
# of the text that was the non-data portion of the version that you started
 
43
# with.  (In other words, unless your change moves or copies text from
 
44
# the non-data portions to the data portions.)  If your modification has
 
45
# such potential, you must delete any notice of this special exception
 
46
# to the GPL from your modified version.
 
47
#
 
48
# Written by David MacKenzie, with help from
 
49
# Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
 
50
# Roland McGrath, Noah Friedman, david d zuhn, and many others.
 
51
 
 
52
 
 
53
## ---------------- ##
 
54
## The diversions.  ##
 
55
## ---------------- ##
 
56
 
 
57
 
 
58
# We heavily use m4's diversions both for the initializations and for
 
59
# required macros (see AC_REQUIRE), because in both cases we have to
 
60
# issue high in `configure' something which is discovered late.
 
61
#
 
62
# KILL is only used to suppress output.
 
63
#
 
64
# The layers of `configure'.  We let m4 undivert them by itself, when
 
65
# it reaches the end of `configure.ac'.
 
66
#
 
67
# - BINSH
 
68
#   #! /bin/sh
 
69
# - HEADER-REVISION
 
70
#   Sent by AC_REVISION
 
71
# - HEADER-COMMENT
 
72
#   Purpose of the script.
 
73
# - HEADER-COPYRIGHT
 
74
#   Copyright notice(s)
 
75
# - M4SH-INIT
 
76
#   Initialization of bottom layers.
 
77
#
 
78
# - DEFAULTS
 
79
#   early initializations (defaults)
 
80
# - PARSE_ARGS
 
81
#   initialization code, option handling loop.
 
82
#
 
83
# - HELP_BEGIN
 
84
#   Handling `configure --help'.
 
85
# - HELP_CANON
 
86
#   Help msg for AC_CANONICAL_*
 
87
# - HELP_ENABLE
 
88
#   Help msg from AC_ARG_ENABLE.
 
89
# - HELP_WITH
 
90
#   Help msg from AC_ARG_WITH.
 
91
# - HELP_VAR
 
92
#   Help msg from AC_ARG_VAR.
 
93
# - HELP_VAR_END
 
94
#   A small paragraph on the use of the variables.
 
95
# - HELP_END
 
96
#   Tail of the handling of --help.
 
97
#
 
98
# - VERSION_BEGIN
 
99
#   Head of the handling of --version.
 
100
# - VERSION_FSF
 
101
#   FSF copyright notice for --version.
 
102
# - VERSION_USER
 
103
#   User copyright notice for --version.
 
104
# - VERSION_END
 
105
#   Tail of the handling of --version.
 
106
#
 
107
# - INIT_PREPARE
 
108
#   Tail of initialization code.
 
109
#
 
110
# - BODY
 
111
#   the tests and output code
 
112
#
 
113
 
 
114
 
 
115
# _m4_divert(DIVERSION-NAME)
 
116
# --------------------------
 
117
# Convert a diversion name into its number.  Otherwise, return
 
118
# DIVERSION-NAME which is supposed to be an actual diversion number.
 
119
# Of course it would be nicer to use m4_case here, instead of zillions
 
120
# of little macros, but it then takes twice longer to run `autoconf'!
 
121
#
 
122
# From M4sugar:
 
123
#    -1. KILL
 
124
# 10000. GROW
 
125
#
 
126
# From M4sh:
 
127
#    0. BINSH
 
128
#    1. HEADER-REVISION
 
129
#    2. HEADER-COMMENT
 
130
#    3. HEADER-COPYRIGHT
 
131
#    4. M4SH-INIT
 
132
# 1000. BODY
 
133
m4_define([_m4_divert(DEFAULTS)],        10)
 
134
m4_define([_m4_divert(PARSE_ARGS)],      20)
 
135
 
 
136
m4_define([_m4_divert(HELP_BEGIN)],     100)
 
137
m4_define([_m4_divert(HELP_CANON)],     101)
 
138
m4_define([_m4_divert(HELP_ENABLE)],    102)
 
139
m4_define([_m4_divert(HELP_WITH)],      103)
 
140
m4_define([_m4_divert(HELP_VAR)],       104)
 
141
m4_define([_m4_divert(HELP_VAR_END)],   105)
 
142
m4_define([_m4_divert(HELP_END)],       106)
 
143
 
 
144
m4_define([_m4_divert(VERSION_BEGIN)],  200)
 
145
m4_define([_m4_divert(VERSION_FSF)],    201)
 
146
m4_define([_m4_divert(VERSION_USER)],   202)
 
147
m4_define([_m4_divert(VERSION_END)],    203)
 
148
 
 
149
m4_define([_m4_divert(INIT_PREPARE)],   300)
 
150
 
 
151
 
 
152
 
 
153
# AC_DIVERT_PUSH(DIVERSION-NAME)
 
154
# AC_DIVERT_POP
 
155
# ------------------------------
 
156
m4_copy([m4_divert_push],[AC_DIVERT_PUSH])
 
157
m4_copy([m4_divert_pop], [AC_DIVERT_POP])
 
158
 
 
159
 
 
160
 
 
161
## ------------------------------------ ##
 
162
## Defining/requiring Autoconf macros.  ##
 
163
## ------------------------------------ ##
 
164
 
 
165
 
 
166
# AC_DEFUN(NAME, EXPANSION)
 
167
# AC_DEFUN_ONCE(NAME, EXPANSION)
 
168
# AC_BEFORE(THIS-MACRO-NAME, CALLED-MACRO-NAME)
 
169
# AC_REQUIRE(STRING)
 
170
# AC_PROVIDE(MACRO-NAME)
 
171
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
 
172
# -----------------------------------------------------------
 
173
m4_copy([m4_defun],       [AC_DEFUN])
 
174
m4_copy([m4_defun_once],  [AC_DEFUN_ONCE])
 
175
m4_copy([m4_before],      [AC_BEFORE])
 
176
m4_copy([m4_require],     [AC_REQUIRE])
 
177
m4_copy([m4_provide],     [AC_PROVIDE])
 
178
m4_copy([m4_provide_if],  [AC_PROVIDE_IFELSE])
 
179
 
 
180
 
 
181
# AC_OBSOLETE(THIS-MACRO-NAME, [SUGGESTION])
 
182
# ------------------------------------------
 
183
m4_define([AC_OBSOLETE],
 
184
[AC_DIAGNOSE([obsolete], [$1 is obsolete$2])])
 
185
 
 
186
 
 
187
 
 
188
## ----------------------------- ##
 
189
## Implementing Autoconf loops.  ##
 
190
## ----------------------------- ##
 
191
 
 
192
 
 
193
# AC_FOREACH(VARIABLE, LIST, EXPRESSION)
 
194
# --------------------------------------
 
195
#
 
196
# Compute EXPRESSION assigning to VARIABLE each value of the LIST.
 
197
# LIST is a /bin/sh list, i.e., it has the form ` item_1 item_2
 
198
# ... item_n ': white spaces are separators, and leading and trailing
 
199
# spaces are meaningless.
 
200
#
 
201
# This macro is robust to active symbols:
 
202
#    AC_FOREACH([Var], [ active
 
203
#    b  act\
 
204
#    ive  ], [-Var-])end
 
205
#    => -active--b--active-end
 
206
m4_define([AC_FOREACH],
 
207
[m4_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
 
208
 
 
209
 
 
210
 
 
211
 
 
212
## ----------------------------------- ##
 
213
## Helping macros to display strings.  ##
 
214
## ----------------------------------- ##
 
215
 
 
216
 
 
217
# AC_HELP_STRING(LHS, RHS, [COLUMN])
 
218
# ----------------------------------
 
219
#
 
220
# Format an Autoconf macro's help string so that it looks pretty when
 
221
# the user executes "configure --help".  This macro takes three
 
222
# arguments, a "left hand side" (LHS), a "right hand side" (RHS), and
 
223
# the COLUMN which is a string of white spaces which leads to the
 
224
# the RHS column (default: 26 white spaces).
 
225
#
 
226
# The resulting string is suitable for use in other macros that require
 
227
# a help string (e.g. AC_ARG_WITH).
 
228
#
 
229
# Here is the sample string from the Autoconf manual (Node: External
 
230
# Software) which shows the proper spacing for help strings.
 
231
#
 
232
#    --with-readline         support fancy command line editing
 
233
#  ^ ^                       ^
 
234
#  | |                       |
 
235
#  | column 2                column 26
 
236
#  |
 
237
#  column 0
 
238
#
 
239
# A help string is made up of a "left hand side" (LHS) and a "right
 
240
# hand side" (RHS).  In the example above, the LHS is
 
241
# "--with-readline", while the RHS is "support fancy command line
 
242
# editing".
 
243
#
 
244
# If the LHS extends past column 24, then the LHS is terminated with a
 
245
# newline so that the RHS is on a line of its own beginning in column
 
246
# 26.
 
247
#
 
248
# Therefore, if the LHS were instead "--with-readline-blah-blah-blah",
 
249
# then the AC_HELP_STRING macro would expand into:
 
250
#
 
251
#
 
252
#    --with-readline-blah-blah-blah
 
253
#  ^ ^                       support fancy command line editing
 
254
#  | |                       ^
 
255
#  | column 2                |
 
256
#  column 0                  column 26
 
257
#
 
258
m4_define([AC_HELP_STRING],
 
259
[m4_pushdef([AC_Prefix], m4_default([$3], [                          ]))dnl
 
260
m4_pushdef([AC_Prefix_Format],
 
261
           [  %-]m4_eval(m4_len(AC_Prefix) - 3)[s ])dnl [  %-23s ]
 
262
m4_text_wrap([$2], AC_Prefix, m4_format(AC_Prefix_Format, [$1]))dnl
 
263
m4_popdef([AC_Prefix_Format])dnl
 
264
m4_popdef([AC_Prefix])dnl
 
265
])
 
266
 
 
267
 
 
268
 
 
269
 
 
270
## ---------------------------------------------- ##
 
271
## Information on the package being Autoconf'ed.  ##
 
272
## ---------------------------------------------- ##
 
273
 
 
274
 
 
275
# It is suggested that the macros in this section appear before
 
276
# AC_INIT in `configure.ac'.  Nevertheless, this is just stylistic,
 
277
# and from the implementation point of, AC_INIT *must* be expanded
 
278
# beforehand: it puts data in diversions which must appear before the
 
279
# data provided by the macros of this section.
 
280
 
 
281
# The solution is to require AC_INIT in each of these macros.  AC_INIT
 
282
# has the needed magic so that it can't be expanded twice.
 
283
 
 
284
 
 
285
 
 
286
# _AC_INIT_PACKAGE(PACKAGE-NAME, VERSION, BUG-REPORT, [TARNAME])
 
287
# --------------------------------------------------------------
 
288
m4_define([_AC_INIT_PACKAGE],
 
289
[AS_LITERAL_IF([$1], [], [m4_warn([syntax], [AC_INIT: not a literal: $1])])
 
290
AS_LITERAL_IF([$2], [],  [m4_warn([syntax], [AC_INIT: not a literal: $2])])
 
291
AS_LITERAL_IF([$3], [],  [m4_warn([syntax], [AC_INIT: not a literal: $3])])
 
292
m4_ifndef([AC_PACKAGE_NAME],
 
293
          [m4_define([AC_PACKAGE_NAME],     [$1])])
 
294
m4_ifndef([AC_PACKAGE_TARNAME],
 
295
          [m4_define([AC_PACKAGE_TARNAME],
 
296
                     m4_default([$4],
 
297
                                [m4_bpatsubst(m4_tolower(m4_bpatsubst([[[$1]]],
 
298
                                                                     [GNU ])),
 
299
                                 [[^abcdefghijklmnopqrstuvwxyz0123456789]],
 
300
                                 [-])]))])
 
301
m4_ifndef([AC_PACKAGE_VERSION],
 
302
          [m4_define([AC_PACKAGE_VERSION],   [$2])])
 
303
m4_ifndef([AC_PACKAGE_STRING],
 
304
          [m4_define([AC_PACKAGE_STRING],    [$1 $2])])
 
305
m4_ifndef([AC_PACKAGE_BUGREPORT],
 
306
          [m4_define([AC_PACKAGE_BUGREPORT], [$3])])
 
307
])
 
308
 
 
309
 
 
310
# AC_COPYRIGHT(TEXT, [VERSION-DIVERSION = VERSION_USER])
 
311
# ------------------------------------------------------
 
312
# Append Copyright information in the top of `configure'.  TEXT is
 
313
# evaluated once, hence TEXT can use macros.  Note that we do not
 
314
# prepend `# ' but `@%:@ ', since m4 does not evaluate the comments.
 
315
# Had we used `# ', the Copyright sent in the beginning of `configure'
 
316
# would have not been evaluated.  Another solution, a bit fragile,
 
317
# would have be to use m4_quote to force an evaluation:
 
318
#
 
319
#     m4_bpatsubst(m4_quote($1), [^], [# ])
 
320
m4_define([AC_COPYRIGHT],
 
321
[m4_divert_text([HEADER-COPYRIGHT],
 
322
[m4_bpatsubst([
 
323
$1], [^], [@%:@ ])])dnl
 
324
m4_divert_text(m4_default([$2], [VERSION_USER]),
 
325
[
 
326
$1])dnl
 
327
])# AC_COPYRIGHT
 
328
 
 
329
 
 
330
# AC_REVISION(REVISION-INFO)
 
331
# --------------------------
 
332
# The second quote in the translit is just to cope with font-lock-mode
 
333
# which sees the opening of a string.
 
334
m4_define([AC_REVISION],
 
335
[m4_divert_text([HEADER-REVISION],
 
336
                [@%:@ From __file__ m4_translit([$1], [$""]).])dnl
 
337
])
 
338
 
 
339
 
 
340
 
 
341
 
 
342
## ---------------------------------------- ##
 
343
## Requirements over the Autoconf version.  ##
 
344
## ---------------------------------------- ##
 
345
 
 
346
 
 
347
# AU::AC_PREREQ(VERSION)
 
348
# ----------------------
 
349
# Update this `AC_PREREQ' statement to require the current version of
 
350
# Autoconf.  But fail if ever this autoupdate is too old.
 
351
#
 
352
# Note that `m4_defn([m4_PACKAGE_VERSION])' below are expanded before
 
353
# calling `AU_DEFUN', i.e., it is hard coded.  Otherwise it would be
 
354
# quite complex for autoupdate to import the value of
 
355
# `m4_PACKAGE_VERSION'.  We could `AU_DEFUN' `m4_PACKAGE_VERSION', but
 
356
# this would replace all its occurrences with the current version of
 
357
# Autoconf, which is certainly not what the user intended.
 
358
AU_DEFUN([AC_PREREQ],
 
359
[m4_version_prereq([$1])[]dnl
 
360
[AC_PREREQ(]]m4_defn([m4_PACKAGE_VERSION])[[)]])
 
361
 
 
362
 
 
363
# AC_PREREQ(VERSION)
 
364
# ------------------
 
365
# Complain and exit if the Autoconf version is less than VERSION.
 
366
m4_copy([m4_version_prereq], [AC_PREREQ])
 
367
 
 
368
 
 
369
 
 
370
 
 
371
 
 
372
 
 
373
## ---------------- ##
 
374
## Initialization.  ##
 
375
## ---------------- ##
 
376
 
 
377
 
 
378
# All the following macros are used by AC_INIT.  Ideally, they should
 
379
# be presented in the order in which they are output.  Please, help us
 
380
# sorting it, or at least, don't augment the entropy.
 
381
 
 
382
 
 
383
# _AC_INIT_NOTICE
 
384
# ---------------
 
385
m4_define([_AC_INIT_NOTICE],
 
386
[m4_divert_text([HEADER-COMMENT],
 
387
[@%:@ Guess values for system-dependent variables and create Makefiles.
 
388
@%:@ Generated by m4_PACKAGE_STRING[]dnl
 
389
m4_ifset([AC_PACKAGE_STRING], [ for AC_PACKAGE_STRING]).])
 
390
 
 
391
m4_ifset([AC_PACKAGE_BUGREPORT],
 
392
         [m4_divert_text([HEADER-COMMENT],
 
393
                         [@%:@
 
394
@%:@ Report bugs to <AC_PACKAGE_BUGREPORT>.])])
 
395
])
 
396
 
 
397
 
 
398
# _AC_INIT_COPYRIGHT
 
399
# ------------------
 
400
# We dump to VERSION_FSF to make sure we are inserted before the
 
401
# user copyrights, and after the setup of the --version handling.
 
402
m4_define([_AC_INIT_COPYRIGHT],
 
403
[AC_COPYRIGHT(
 
404
[Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
 
405
Free Software Foundation, Inc.
 
406
This configure script is free software; the Free Software Foundation
 
407
gives unlimited permission to copy, distribute and modify it.],
 
408
              [VERSION_FSF])dnl
 
409
])
 
410
 
 
411
 
 
412
# File Descriptors
 
413
# ----------------
 
414
# Set up the file descriptors used by `configure'.
 
415
# File descriptor usage:
 
416
# 0 standard input
 
417
# 1 file creation
 
418
# 2 errors and warnings
 
419
# AS_MESSAGE_LOG_FD compiler messages saved in config.log
 
420
# AS_MESSAGE_FD checking for... messages and results
 
421
 
 
422
m4_define([AS_MESSAGE_FD], 6)
 
423
# That's how they used to be named.
 
424
AU_ALIAS([AC_FD_CC],  [AS_MESSAGE_LOG_FD])
 
425
AU_ALIAS([AC_FD_MSG], [AS_MESSAGE_FD])
 
426
 
 
427
 
 
428
# _AC_INIT_DEFAULTS
 
429
# -----------------
 
430
# Values which defaults can be set from `configure.ac'.
 
431
# `/bin/machine' is used in `glibcbug'.  The others are used in config.*
 
432
m4_define([_AC_INIT_DEFAULTS],
 
433
[m4_divert_push([DEFAULTS])dnl
 
434
 
 
435
AS_SHELL_SANITIZE
 
436
 
 
437
# Name of the host.
 
438
# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
 
439
# so uname gets run too.
 
440
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 
441
 
 
442
exec AS_MESSAGE_FD>&1
 
443
 
 
444
#
 
445
# Initializations.
 
446
#
 
447
ac_default_prefix=/usr/local
 
448
cross_compiling=no
 
449
subdirs=
 
450
MFLAGS=
 
451
MAKEFLAGS=
 
452
AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}])dnl
 
453
AC_SUBST([PATH_SEPARATOR])dnl
 
454
 
 
455
# Maximum number of lines to put in a shell here document.
 
456
# This variable seems obsolete.  It should probably be removed, and
 
457
# only ac_max_sed_lines should be used.
 
458
: ${ac_max_here_lines=38}
 
459
 
 
460
# Identity of this package.
 
461
AC_SUBST([PACKAGE_NAME],
 
462
         [m4_ifdef([AC_PACKAGE_NAME],      ['AC_PACKAGE_NAME'])])dnl
 
463
AC_SUBST([PACKAGE_TARNAME],
 
464
         [m4_ifdef([AC_PACKAGE_TARNAME],   ['AC_PACKAGE_TARNAME'])])dnl
 
465
AC_SUBST([PACKAGE_VERSION],
 
466
         [m4_ifdef([AC_PACKAGE_VERSION],   ['AC_PACKAGE_VERSION'])])dnl
 
467
AC_SUBST([PACKAGE_STRING],
 
468
         [m4_ifdef([AC_PACKAGE_STRING],    ['AC_PACKAGE_STRING'])])dnl
 
469
AC_SUBST([PACKAGE_BUGREPORT],
 
470
         [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])dnl
 
471
 
 
472
m4_divert_pop([DEFAULTS])dnl
 
473
])# _AC_INIT_DEFAULTS
 
474
 
 
475
 
 
476
# AC_PREFIX_DEFAULT(PREFIX)
 
477
# -------------------------
 
478
AC_DEFUN([AC_PREFIX_DEFAULT],
 
479
[m4_divert_text([DEFAULTS], [ac_default_prefix=$1])])
 
480
 
 
481
 
 
482
# AC_PREFIX_PROGRAM(PROGRAM)
 
483
# --------------------------
 
484
# Guess the value for the `prefix' variable by looking for
 
485
# the argument program along PATH and taking its parent.
 
486
# Example: if the argument is `gcc' and we find /usr/local/gnu/bin/gcc,
 
487
# set `prefix' to /usr/local/gnu.
 
488
# This comes too late to find a site file based on the prefix,
 
489
# and it might use a cached value for the path.
 
490
# No big loss, I think, since most configures don't use this macro anyway.
 
491
AC_DEFUN([AC_PREFIX_PROGRAM],
 
492
[if test "x$prefix" = xNONE; then
 
493
dnl We reimplement AC_MSG_CHECKING (mostly) to avoid the ... in the middle.
 
494
  _AS_ECHO_N([checking for prefix by ])
 
495
  AC_PATH_PROG(ac_prefix_program, [$1])
 
496
  if test -n $ac_prefix_program; then
 
497
    prefix=`AS_DIRNAME(["$ac_prefix_program"])`
 
498
    prefix=`AS_DIRNAME(["$prefix"])`
 
499
  fi
 
500
fi
 
501
])# AC_PREFIX_PROGRAM
 
502
 
 
503
 
 
504
# AC_CONFIG_SRCDIR([UNIQUE-FILE-IN-SOURCE-DIR])
 
505
# ---------------------------------------------
 
506
# UNIQUE-FILE-IN-SOURCE-DIR is a filename unique to this package,
 
507
# relative to the directory that configure is in, which we can look
 
508
# for to find out if srcdir is correct.
 
509
AC_DEFUN([AC_CONFIG_SRCDIR],
 
510
[m4_divert_text([DEFAULTS], [ac_unique_file="$1"])])
 
511
 
 
512
 
 
513
# _AC_INIT_SRCDIR
 
514
# ---------------
 
515
# Compute `srcdir' based on `$ac_unique_file'.
 
516
m4_define([_AC_INIT_SRCDIR],
 
517
[m4_divert_push([PARSE_ARGS])dnl
 
518
 
 
519
# Find the source files, if location was not specified.
 
520
if test -z "$srcdir"; then
 
521
  ac_srcdir_defaulted=yes
 
522
  # Try the directory containing this script, then its parent.
 
523
  ac_confdir=`AS_DIRNAME(["$[0]"])`
 
524
  srcdir=$ac_confdir
 
525
  if test ! -r $srcdir/$ac_unique_file; then
 
526
    srcdir=..
 
527
  fi
 
528
else
 
529
  ac_srcdir_defaulted=no
 
530
fi
 
531
if test ! -r $srcdir/$ac_unique_file; then
 
532
  if test "$ac_srcdir_defaulted" = yes; then
 
533
    AC_MSG_ERROR([cannot find sources ($ac_unique_file) in $ac_confdir or ..])
 
534
  else
 
535
    AC_MSG_ERROR([cannot find sources ($ac_unique_file) in $srcdir])
 
536
  fi
 
537
fi
 
538
dnl Double slashes in pathnames in object file debugging info
 
539
dnl mess up M-x gdb in Emacs.
 
540
srcdir=`echo "$srcdir" | sed 's%\([[^\\/]]\)[[\\/]]*$%\1%'`
 
541
m4_divert_pop([PARSE_ARGS])dnl
 
542
])# _AC_INIT_SRCDIR
 
543
 
 
544
 
 
545
# _AC_INIT_PARSE_ARGS
 
546
# -------------------
 
547
m4_define([_AC_INIT_PARSE_ARGS],
 
548
[m4_divert_push([PARSE_ARGS])dnl
 
549
 
 
550
# Initialize some variables set by options.
 
551
ac_init_help=
 
552
ac_init_version=false
 
553
# The variables have the same names as the options, with
 
554
# dashes changed to underlines.
 
555
cache_file=/dev/null
 
556
AC_SUBST(exec_prefix, NONE)dnl
 
557
no_create=
 
558
no_recursion=
 
559
AC_SUBST(prefix, NONE)dnl
 
560
program_prefix=NONE
 
561
program_suffix=NONE
 
562
AC_SUBST(program_transform_name, [s,x,x,])dnl
 
563
silent=
 
564
site=
 
565
srcdir=
 
566
verbose=
 
567
x_includes=NONE
 
568
x_libraries=NONE
 
569
 
 
570
# Installation directory options.
 
571
# These are left unexpanded so users can "make install exec_prefix=/foo"
 
572
# and all the variables that are supposed to be based on exec_prefix
 
573
# by default will actually change.
 
574
# Use braces instead of parens because sh, perl, etc. also accept them.
 
575
AC_SUBST([bindir],         ['${exec_prefix}/bin'])dnl
 
576
AC_SUBST([sbindir],        ['${exec_prefix}/sbin'])dnl
 
577
AC_SUBST([libexecdir],     ['${exec_prefix}/libexec'])dnl
 
578
AC_SUBST([datadir],        ['${prefix}/share'])dnl
 
579
AC_SUBST([sysconfdir],     ['${prefix}/etc'])dnl
 
580
AC_SUBST([sharedstatedir], ['${prefix}/com'])dnl
 
581
AC_SUBST([localstatedir],  ['${prefix}/var'])dnl
 
582
AC_SUBST([libdir],         ['${exec_prefix}/lib'])dnl
 
583
AC_SUBST([includedir],     ['${prefix}/include'])dnl
 
584
AC_SUBST([oldincludedir],  ['/usr/include'])dnl
 
585
AC_SUBST([infodir],        ['${prefix}/info'])dnl
 
586
AC_SUBST([mandir],         ['${prefix}/man'])dnl
 
587
 
 
588
ac_prev=
 
589
for ac_option
 
590
do
 
591
  # If the previous option needs an argument, assign it.
 
592
  if test -n "$ac_prev"; then
 
593
    eval "$ac_prev=\$ac_option"
 
594
    ac_prev=
 
595
    continue
 
596
  fi
 
597
 
 
598
  ac_optarg=`expr "x$ac_option" : 'x[[^=]]*=\(.*\)'`
 
599
 
 
600
  # Accept the important Cygnus configure options, so we can diagnose typos.
 
601
 
 
602
  case $ac_option in
 
603
 
 
604
  -bindir | --bindir | --bindi | --bind | --bin | --bi)
 
605
    ac_prev=bindir ;;
 
606
  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
 
607
    bindir=$ac_optarg ;;
 
608
 
 
609
  -build | --build | --buil | --bui | --bu)
 
610
    ac_prev=build_alias ;;
 
611
  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
 
612
    build_alias=$ac_optarg ;;
 
613
 
 
614
  -cache-file | --cache-file | --cache-fil | --cache-fi \
 
615
  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
 
616
    ac_prev=cache_file ;;
 
617
  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
 
618
  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
 
619
    cache_file=$ac_optarg ;;
 
620
 
 
621
  --config-cache | -C)
 
622
    cache_file=config.cache ;;
 
623
 
 
624
  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
 
625
    ac_prev=datadir ;;
 
626
  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
 
627
  | --da=*)
 
628
    datadir=$ac_optarg ;;
 
629
 
 
630
  -disable-* | --disable-*)
 
631
    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
 
632
    # Reject names that are not valid shell variable names.
 
633
    expr "x$ac_feature" : "[.*[^-_$as_cr_alnum]]" >/dev/null &&
 
634
      AC_MSG_ERROR([invalid feature name: $ac_feature])
 
635
    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
 
636
    eval "enable_$ac_feature=no" ;;
 
637
 
 
638
  -enable-* | --enable-*)
 
639
    ac_feature=`expr "x$ac_option" : 'x-*enable-\([[^=]]*\)'`
 
640
    # Reject names that are not valid shell variable names.
 
641
    expr "x$ac_feature" : "[.*[^-_$as_cr_alnum]]" >/dev/null &&
 
642
      AC_MSG_ERROR([invalid feature name: $ac_feature])
 
643
    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
 
644
    case $ac_option in
 
645
      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
 
646
      *) ac_optarg=yes ;;
 
647
    esac
 
648
    eval "enable_$ac_feature='$ac_optarg'" ;;
 
649
 
 
650
  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
 
651
  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
 
652
  | --exec | --exe | --ex)
 
653
    ac_prev=exec_prefix ;;
 
654
  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
 
655
  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
 
656
  | --exec=* | --exe=* | --ex=*)
 
657
    exec_prefix=$ac_optarg ;;
 
658
 
 
659
  -gas | --gas | --ga | --g)
 
660
    # Obsolete; use --with-gas.
 
661
    with_gas=yes ;;
 
662
 
 
663
  -help | --help | --hel | --he | -h)
 
664
    ac_init_help=long ;;
 
665
  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
 
666
    ac_init_help=recursive ;;
 
667
  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
 
668
    ac_init_help=short ;;
 
669
 
 
670
  -host | --host | --hos | --ho)
 
671
    ac_prev=host_alias ;;
 
672
  -host=* | --host=* | --hos=* | --ho=*)
 
673
    host_alias=$ac_optarg ;;
 
674
 
 
675
  -includedir | --includedir | --includedi | --included | --include \
 
676
  | --includ | --inclu | --incl | --inc)
 
677
    ac_prev=includedir ;;
 
678
  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
 
679
  | --includ=* | --inclu=* | --incl=* | --inc=*)
 
680
    includedir=$ac_optarg ;;
 
681
 
 
682
  -infodir | --infodir | --infodi | --infod | --info | --inf)
 
683
    ac_prev=infodir ;;
 
684
  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
 
685
    infodir=$ac_optarg ;;
 
686
 
 
687
  -libdir | --libdir | --libdi | --libd)
 
688
    ac_prev=libdir ;;
 
689
  -libdir=* | --libdir=* | --libdi=* | --libd=*)
 
690
    libdir=$ac_optarg ;;
 
691
 
 
692
  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
 
693
  | --libexe | --libex | --libe)
 
694
    ac_prev=libexecdir ;;
 
695
  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
 
696
  | --libexe=* | --libex=* | --libe=*)
 
697
    libexecdir=$ac_optarg ;;
 
698
 
 
699
  -localstatedir | --localstatedir | --localstatedi | --localstated \
 
700
  | --localstate | --localstat | --localsta | --localst \
 
701
  | --locals | --local | --loca | --loc | --lo)
 
702
    ac_prev=localstatedir ;;
 
703
  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
 
704
  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
 
705
  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
 
706
    localstatedir=$ac_optarg ;;
 
707
 
 
708
  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
 
709
    ac_prev=mandir ;;
 
710
  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
 
711
    mandir=$ac_optarg ;;
 
712
 
 
713
  -nfp | --nfp | --nf)
 
714
    # Obsolete; use --without-fp.
 
715
    with_fp=no ;;
 
716
 
 
717
  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
 
718
  | --no-cr | --no-c | -n)
 
719
    no_create=yes ;;
 
720
 
 
721
  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
 
722
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
 
723
    no_recursion=yes ;;
 
724
 
 
725
  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
 
726
  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
 
727
  | --oldin | --oldi | --old | --ol | --o)
 
728
    ac_prev=oldincludedir ;;
 
729
  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
 
730
  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
 
731
  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
 
732
    oldincludedir=$ac_optarg ;;
 
733
 
 
734
  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
 
735
    ac_prev=prefix ;;
 
736
  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
 
737
    prefix=$ac_optarg ;;
 
738
 
 
739
  -program-prefix | --program-prefix | --program-prefi | --program-pref \
 
740
  | --program-pre | --program-pr | --program-p)
 
741
    ac_prev=program_prefix ;;
 
742
  -program-prefix=* | --program-prefix=* | --program-prefi=* \
 
743
  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
 
744
    program_prefix=$ac_optarg ;;
 
745
 
 
746
  -program-suffix | --program-suffix | --program-suffi | --program-suff \
 
747
  | --program-suf | --program-su | --program-s)
 
748
    ac_prev=program_suffix ;;
 
749
  -program-suffix=* | --program-suffix=* | --program-suffi=* \
 
750
  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
 
751
    program_suffix=$ac_optarg ;;
 
752
 
 
753
  -program-transform-name | --program-transform-name \
 
754
  | --program-transform-nam | --program-transform-na \
 
755
  | --program-transform-n | --program-transform- \
 
756
  | --program-transform | --program-transfor \
 
757
  | --program-transfo | --program-transf \
 
758
  | --program-trans | --program-tran \
 
759
  | --progr-tra | --program-tr | --program-t)
 
760
    ac_prev=program_transform_name ;;
 
761
  -program-transform-name=* | --program-transform-name=* \
 
762
  | --program-transform-nam=* | --program-transform-na=* \
 
763
  | --program-transform-n=* | --program-transform-=* \
 
764
  | --program-transform=* | --program-transfor=* \
 
765
  | --program-transfo=* | --program-transf=* \
 
766
  | --program-trans=* | --program-tran=* \
 
767
  | --progr-tra=* | --program-tr=* | --program-t=*)
 
768
    program_transform_name=$ac_optarg ;;
 
769
 
 
770
  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
 
771
  | -silent | --silent | --silen | --sile | --sil)
 
772
    silent=yes ;;
 
773
 
 
774
  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
 
775
    ac_prev=sbindir ;;
 
776
  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
 
777
  | --sbi=* | --sb=*)
 
778
    sbindir=$ac_optarg ;;
 
779
 
 
780
  -sharedstatedir | --sharedstatedir | --sharedstatedi \
 
781
  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
 
782
  | --sharedst | --shareds | --shared | --share | --shar \
 
783
  | --sha | --sh)
 
784
    ac_prev=sharedstatedir ;;
 
785
  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
 
786
  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
 
787
  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
 
788
  | --sha=* | --sh=*)
 
789
    sharedstatedir=$ac_optarg ;;
 
790
 
 
791
  -site | --site | --sit)
 
792
    ac_prev=site ;;
 
793
  -site=* | --site=* | --sit=*)
 
794
    site=$ac_optarg ;;
 
795
 
 
796
  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
 
797
    ac_prev=srcdir ;;
 
798
  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
 
799
    srcdir=$ac_optarg ;;
 
800
 
 
801
  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
 
802
  | --syscon | --sysco | --sysc | --sys | --sy)
 
803
    ac_prev=sysconfdir ;;
 
804
  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
 
805
  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
 
806
    sysconfdir=$ac_optarg ;;
 
807
 
 
808
  -target | --target | --targe | --targ | --tar | --ta | --t)
 
809
    ac_prev=target_alias ;;
 
810
  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
 
811
    target_alias=$ac_optarg ;;
 
812
 
 
813
  -v | -verbose | --verbose | --verbos | --verbo | --verb)
 
814
    verbose=yes ;;
 
815
 
 
816
  -version | --version | --versio | --versi | --vers | -V)
 
817
    ac_init_version=: ;;
 
818
 
 
819
  -with-* | --with-*)
 
820
    ac_package=`expr "x$ac_option" : 'x-*with-\([[^=]]*\)'`
 
821
    # Reject names that are not valid shell variable names.
 
822
    expr "x$ac_package" : "[.*[^-_$as_cr_alnum]]" >/dev/null &&
 
823
      AC_MSG_ERROR([invalid package name: $ac_package])
 
824
    ac_package=`echo $ac_package| sed 's/-/_/g'`
 
825
    case $ac_option in
 
826
      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
 
827
      *) ac_optarg=yes ;;
 
828
    esac
 
829
    eval "with_$ac_package='$ac_optarg'" ;;
 
830
 
 
831
  -without-* | --without-*)
 
832
    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
 
833
    # Reject names that are not valid shell variable names.
 
834
    expr "x$ac_package" : "[.*[^-_$as_cr_alnum]]" >/dev/null &&
 
835
      AC_MSG_ERROR([invalid package name: $ac_package])
 
836
    ac_package=`echo $ac_package | sed 's/-/_/g'`
 
837
    eval "with_$ac_package=no" ;;
 
838
 
 
839
  --x)
 
840
    # Obsolete; use --with-x.
 
841
    with_x=yes ;;
 
842
 
 
843
  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
 
844
  | --x-incl | --x-inc | --x-in | --x-i)
 
845
    ac_prev=x_includes ;;
 
846
  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
 
847
  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
 
848
    x_includes=$ac_optarg ;;
 
849
 
 
850
  -x-libraries | --x-libraries | --x-librarie | --x-librari \
 
851
  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
 
852
    ac_prev=x_libraries ;;
 
853
  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
 
854
  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
 
855
    x_libraries=$ac_optarg ;;
 
856
 
 
857
  -*) AC_MSG_ERROR([unrecognized option: $ac_option
 
858
Try `$[0] --help' for more information.])
 
859
    ;;
 
860
 
 
861
  *=*)
 
862
    ac_envvar=`expr "x$ac_option" : 'x\([[^=]]*\)='`
 
863
    # Reject names that are not valid shell variable names.
 
864
    expr "x$ac_envvar" : "[.*[^_$as_cr_alnum]]" >/dev/null &&
 
865
      AC_MSG_ERROR([invalid variable name: $ac_envvar])
 
866
    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
 
867
    eval "$ac_envvar='$ac_optarg'"
 
868
    export $ac_envvar ;;
 
869
 
 
870
  *)
 
871
    # FIXME: should be removed in autoconf 3.0.
 
872
    AC_MSG_WARN([you should use --build, --host, --target])
 
873
    expr "x$ac_option" : "[.*[^-._$as_cr_alnum]]" >/dev/null &&
 
874
      AC_MSG_WARN([invalid host type: $ac_option])
 
875
    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
 
876
    ;;
 
877
 
 
878
  esac
 
879
done
 
880
 
 
881
if test -n "$ac_prev"; then
 
882
  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
 
883
  AC_MSG_ERROR([missing argument to $ac_option])
 
884
fi
 
885
 
 
886
# Be sure to have absolute paths.
 
887
for ac_var in exec_prefix prefix
 
888
do
 
889
  eval ac_val=$`echo $ac_var`
 
890
  case $ac_val in
 
891
    [[\\/$]]* | ?:[[\\/]]* | NONE | '' ) ;;
 
892
    *)  AC_MSG_ERROR([expected an absolute directory name for --$ac_var: $ac_val]);;
 
893
  esac
 
894
done
 
895
 
 
896
# Be sure to have absolute paths.
 
897
for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
 
898
              localstatedir libdir includedir oldincludedir infodir mandir
 
899
do
 
900
  eval ac_val=$`echo $ac_var`
 
901
  case $ac_val in
 
902
    [[\\/$]]* | ?:[[\\/]]* ) ;;
 
903
    *)  AC_MSG_ERROR([expected an absolute directory name for --$ac_var: $ac_val]);;
 
904
  esac
 
905
done
 
906
 
 
907
# There might be people who depend on the old broken behavior: `$host'
 
908
# used to hold the argument of --host etc.
 
909
# FIXME: To remove some day.
 
910
build=$build_alias
 
911
host=$host_alias
 
912
target=$target_alias
 
913
 
 
914
# FIXME: To remove some day.
 
915
if test "x$host_alias" != x; then
 
916
  if test "x$build_alias" = x; then
 
917
    cross_compiling=maybe
 
918
    AC_MSG_WARN([If you wanted to set the --build type, don't use --host.
 
919
    If a cross compiler is detected then cross compile mode will be used.])
 
920
  elif test "x$build_alias" != "x$host_alias"; then
 
921
    cross_compiling=yes
 
922
  fi
 
923
fi
 
924
 
 
925
ac_tool_prefix=
 
926
test -n "$host_alias" && ac_tool_prefix=$host_alias-
 
927
 
 
928
test "$silent" = yes && exec AS_MESSAGE_FD>/dev/null
 
929
 
 
930
m4_divert_pop([PARSE_ARGS])dnl
 
931
])# _AC_INIT_PARSE_ARGS
 
932
 
 
933
 
 
934
# _AC_INIT_HELP
 
935
# -------------
 
936
# Handle the `configure --help' message.
 
937
m4_define([_AC_INIT_HELP],
 
938
[m4_divert_push([HELP_BEGIN])dnl
 
939
 
 
940
#
 
941
# Report the --help message.
 
942
#
 
943
if test "$ac_init_help" = "long"; then
 
944
  # Omit some internal or obsolete options to make the list less imposing.
 
945
  # This message is too long to be a string in the A/UX 3.1 sh.
 
946
  cat <<_ACEOF
 
947
\`configure' configures m4_ifset([AC_PACKAGE_STRING],
 
948
                        [AC_PACKAGE_STRING],
 
949
                        [this package]) to adapt to many kinds of systems.
 
950
 
 
951
Usage: $[0] [[OPTION]]... [[VAR=VALUE]]...
 
952
 
 
953
[To assign environment variables (e.g., CC, CFLAGS...), specify them as
 
954
VAR=VALUE.  See below for descriptions of some of the useful variables.
 
955
 
 
956
Defaults for the options are specified in brackets.
 
957
 
 
958
Configuration:
 
959
  -h, --help              display this help and exit
 
960
      --help=short        display options specific to this package
 
961
      --help=recursive    display the short help of all the included packages
 
962
  -V, --version           display version information and exit
 
963
  -q, --quiet, --silent   do not print \`checking...' messages
 
964
      --cache-file=FILE   cache test results in FILE [disabled]
 
965
  -C, --config-cache      alias for \`--cache-file=config.cache'
 
966
  -n, --no-create         do not create output files
 
967
      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
 
968
 
 
969
_ACEOF
 
970
 
 
971
  cat <<_ACEOF
 
972
Installation directories:
 
973
  --prefix=PREFIX         install architecture-independent files in PREFIX
 
974
                          [$ac_default_prefix]
 
975
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
 
976
                          [PREFIX]
 
977
 
 
978
By default, \`make install' will install all the files in
 
979
\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
 
980
an installation prefix other than \`$ac_default_prefix' using \`--prefix',
 
981
for instance \`--prefix=\$HOME'.
 
982
 
 
983
For better control, use the options below.
 
984
 
 
985
Fine tuning of the installation directories:
 
986
  --bindir=DIR           user executables [EPREFIX/bin]
 
987
  --sbindir=DIR          system admin executables [EPREFIX/sbin]
 
988
  --libexecdir=DIR       program executables [EPREFIX/libexec]
 
989
  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
 
990
  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
 
991
  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
 
992
  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
 
993
  --libdir=DIR           object code libraries [EPREFIX/lib]
 
994
  --includedir=DIR       C header files [PREFIX/include]
 
995
  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
 
996
  --infodir=DIR          info documentation [PREFIX/info]
 
997
  --mandir=DIR           man documentation [PREFIX/man]
 
998
_ACEOF
 
999
 
 
1000
  cat <<\_ACEOF]
 
1001
m4_divert_pop([HELP_BEGIN])dnl
 
1002
dnl The order of the diversions here is
 
1003
dnl - HELP_BEGIN
 
1004
dnl   which may be prolongated by extra generic options such as with X or
 
1005
dnl   AC_ARG_PROGRAM.  Displayed only in long --help.
 
1006
dnl
 
1007
dnl - HELP_CANON
 
1008
dnl   Support for cross compilation (--build, --host and --target).
 
1009
dnl   Display only in long --help.
 
1010
dnl
 
1011
dnl - HELP_ENABLE
 
1012
dnl   which starts with the trailer of the HELP_BEGIN, HELP_CANON section,
 
1013
dnl   then implements the header of the non generic options.
 
1014
dnl
 
1015
dnl - HELP_WITH
 
1016
dnl
 
1017
dnl - HELP_VAR
 
1018
dnl
 
1019
dnl - HELP_VAR_END
 
1020
dnl
 
1021
dnl - HELP_END
 
1022
dnl   initialized below, in which we dump the trailer (handling of the
 
1023
dnl   recursion for instance).
 
1024
m4_divert_push([HELP_ENABLE])dnl
 
1025
_ACEOF
 
1026
fi
 
1027
 
 
1028
if test -n "$ac_init_help"; then
 
1029
m4_ifset([AC_PACKAGE_STRING],
 
1030
[  case $ac_init_help in
 
1031
     short | recursive ) echo "Configuration of AC_PACKAGE_STRING:";;
 
1032
   esac])
 
1033
  cat <<\_ACEOF
 
1034
m4_divert_pop([HELP_ENABLE])dnl
 
1035
m4_divert_push([HELP_END])dnl
 
1036
m4_ifset([AC_PACKAGE_BUGREPORT], [
 
1037
Report bugs to <AC_PACKAGE_BUGREPORT>.])
 
1038
_ACEOF
 
1039
fi
 
1040
 
 
1041
if test "$ac_init_help" = "recursive"; then
 
1042
  # If there are subdirs, report their specific --help.
 
1043
  ac_popdir=`pwd`
 
1044
  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
 
1045
    test -d $ac_dir || continue
 
1046
    _AC_SRCPATHS(["$ac_dir"])
 
1047
    cd $ac_dir
 
1048
    # Check for guested configure; otherwise get Cygnus style configure.
 
1049
    if test -f $ac_srcdir/configure.gnu; then
 
1050
      echo
 
1051
      $SHELL $ac_srcdir/configure.gnu  --help=recursive
 
1052
    elif test -f $ac_srcdir/configure; then
 
1053
      echo
 
1054
      $SHELL $ac_srcdir/configure  --help=recursive
 
1055
    elif test -f $ac_srcdir/configure.ac ||
 
1056
           test -f $ac_srcdir/configure.in; then
 
1057
      echo
 
1058
      $ac_configure --help
 
1059
    else
 
1060
      AC_MSG_WARN([no configuration information is in $ac_dir])
 
1061
    fi
 
1062
    cd $ac_popdir
 
1063
  done
 
1064
fi
 
1065
 
 
1066
test -n "$ac_init_help" && exit 0
 
1067
m4_divert_pop([HELP_END])dnl
 
1068
])# _AC_INIT_HELP
 
1069
 
 
1070
 
 
1071
# _AC_INIT_VERSION
 
1072
# ----------------
 
1073
# Handle the `configure --version' message.
 
1074
m4_define([_AC_INIT_VERSION],
 
1075
[m4_divert_text([VERSION_BEGIN],
 
1076
[if $ac_init_version; then
 
1077
  cat <<\_ACEOF])dnl
 
1078
m4_ifset([AC_PACKAGE_STRING],
 
1079
         [m4_divert_text([VERSION_BEGIN],
 
1080
                         [dnl
 
1081
m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])configure[]dnl
 
1082
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
 
1083
generated by m4_PACKAGE_STRING])])
 
1084
m4_divert_text([VERSION_END],
 
1085
[_ACEOF
 
1086
  exit 0
 
1087
fi])dnl
 
1088
])# _AC_INIT_VERSION
 
1089
 
 
1090
 
 
1091
# _AC_INIT_CONFIG_LOG
 
1092
# -------------------
 
1093
# Initialize the config.log file descriptor and write header to it.
 
1094
m4_define([_AC_INIT_CONFIG_LOG],
 
1095
[m4_divert_text([INIT_PREPARE],
 
1096
[m4_define([AS_MESSAGE_LOG_FD], 5)dnl
 
1097
exec AS_MESSAGE_LOG_FD>config.log
 
1098
cat >&AS_MESSAGE_LOG_FD <<_ACEOF
 
1099
This file contains any messages produced by compilers while
 
1100
running configure, to aid debugging if configure makes a mistake.
 
1101
 
 
1102
It was created by m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])dnl
 
1103
$as_me[]m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]), which was
 
1104
generated by m4_PACKAGE_STRING.  Invocation command line was
 
1105
 
 
1106
  $ $[0] $[@]
 
1107
 
 
1108
_ACEOF
 
1109
AS_UNAME >&AS_MESSAGE_LOG_FD
 
1110
 
 
1111
cat >&AS_MESSAGE_LOG_FD <<_ACEOF
 
1112
 
 
1113
 
 
1114
m4_text_box([Core tests.])
 
1115
 
 
1116
_ACEOF
 
1117
])])# _AC_INIT_CONFIG_LOG
 
1118
 
 
1119
 
 
1120
# _AC_INIT_PREPARE
 
1121
# ----------------
 
1122
# Called by AC_INIT to build the preamble of the `configure' scripts.
 
1123
# 1. Trap and clean up various tmp files.
 
1124
# 2. Set up the fd and output files
 
1125
# 3. Remember the options given to `configure' for `config.status --recheck'.
 
1126
# 4. Ensure a correct environment
 
1127
# 5. Required macros (cache, default AC_SUBST etc.)
 
1128
m4_define([_AC_INIT_PREPARE],
 
1129
[m4_divert_push([INIT_PREPARE])dnl
 
1130
 
 
1131
# Keep a trace of the command line.
 
1132
# Strip out --no-create and --no-recursion so they do not pile up.
 
1133
# Also quote any args containing shell meta-characters.
 
1134
ac_configure_args=
 
1135
ac_sep=
 
1136
for ac_arg
 
1137
do
 
1138
  case $ac_arg in
 
1139
  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
 
1140
  | --no-cr | --no-c | -n ) continue ;;
 
1141
  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
 
1142
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
 
1143
    continue ;;
 
1144
dnl If you change this globbing pattern, test it on an old shell --
 
1145
dnl it's sensitive.  Putting any kind of quote in it causes syntax errors.
 
1146
[  *" "*|*"     "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)]
 
1147
    ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
 
1148
  esac
 
1149
  case " $ac_configure_args " in
 
1150
    *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
 
1151
    *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
 
1152
       ac_sep=" " ;;
 
1153
  esac
 
1154
  # Get rid of the leading space.
 
1155
done
 
1156
 
 
1157
# When interrupted or exit'd, cleanup temporary files, and complete
 
1158
# config.log.  We remove comments because anyway the quotes in there
 
1159
# would cause problems or look ugly.
 
1160
# WARNING: Be sure not to use single quotes in there, as some shells,
 
1161
# such as our DU 5.0 friend, will then `close' the trap.
 
1162
trap 'exit_status=$?
 
1163
  # Save into config.log some information that might help in debugging.
 
1164
  {
 
1165
    echo
 
1166
    AS_BOX([Cache variables.])
 
1167
    echo
 
1168
    m4_bpatsubsts(m4_defn([_AC_CACHE_DUMP]),
 
1169
                  [^ *\(#.*\)?
 
1170
],                [],
 
1171
                  ['], ['"'"'])
 
1172
    echo
 
1173
    if test -s confdefs.h; then
 
1174
      AS_BOX([confdefs.h.])
 
1175
      echo
 
1176
      sed "/^$/d" confdefs.h
 
1177
      echo
 
1178
    fi
 
1179
    test "$ac_signal" != 0 &&
 
1180
      echo "$as_me: caught signal $ac_signal"
 
1181
    echo "$as_me: exit $exit_status"
 
1182
  } >&AS_MESSAGE_LOG_FD
 
1183
  rm -f core core.* *.core &&
 
1184
  rm -rf conftest* confdefs* conf$[$]* $ac_clean_files &&
 
1185
    exit $exit_status
 
1186
     ' 0
 
1187
for ac_signal in 1 2 13 15; do
 
1188
  trap 'ac_signal='$ac_signal'; AS_EXIT([1])' $ac_signal
 
1189
done
 
1190
ac_signal=0
 
1191
 
 
1192
# confdefs.h avoids OS command line length limits that DEFS can exceed.
 
1193
rm -rf conftest* confdefs.h
 
1194
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
 
1195
echo >confdefs.h
 
1196
 
 
1197
# Predefined preprocessor variables.
 
1198
AC_DEFINE_UNQUOTED([PACKAGE_NAME], ["$PACKAGE_NAME"],
 
1199
                   [Define to the full name of this package.])
 
1200
AC_DEFINE_UNQUOTED([PACKAGE_TARNAME], ["$PACKAGE_TARNAME"],
 
1201
                   [Define to the one symbol short name of this package.])
 
1202
AC_DEFINE_UNQUOTED([PACKAGE_VERSION], ["$PACKAGE_VERSION"],
 
1203
                   [Define to the version of this package.])
 
1204
AC_DEFINE_UNQUOTED([PACKAGE_STRING], ["$PACKAGE_STRING"],
 
1205
                   [Define to the full name and version of this package.])
 
1206
AC_DEFINE_UNQUOTED([PACKAGE_BUGREPORT], ["$PACKAGE_BUGREPORT"],
 
1207
                   [Define to the address where bug reports for this package
 
1208
                    should be sent.])
 
1209
 
 
1210
# Let the site file select an alternate cache file if it wants to.
 
1211
AC_SITE_LOAD
 
1212
AC_CACHE_LOAD
 
1213
_AC_ARG_VAR_VALIDATE
 
1214
_AC_ARG_VAR_PRECIOUS([build_alias])dnl
 
1215
_AC_ARG_VAR_PRECIOUS([host_alias])dnl
 
1216
_AC_ARG_VAR_PRECIOUS([target_alias])dnl
 
1217
AC_LANG_PUSH(C)
 
1218
 
 
1219
dnl Substitute for predefined variables.
 
1220
AC_SUBST([DEFS])dnl
 
1221
AC_SUBST([ECHO_C])dnl
 
1222
AC_SUBST([ECHO_N])dnl
 
1223
AC_SUBST([ECHO_T])dnl
 
1224
AC_SUBST([LIBS])dnl
 
1225
m4_divert_pop([INIT_PREPARE])dnl
 
1226
])# _AC_INIT_PREPARE
 
1227
 
 
1228
 
 
1229
# AU::AC_INIT([UNIQUE-FILE-IN-SOURCE-DIR])
 
1230
# ----------------------------------------
 
1231
# This macro is used only for Autoupdate.
 
1232
AU_DEFUN([AC_INIT],
 
1233
[m4_ifval([$2], [[AC_INIT($@)]],
 
1234
          [m4_ifval([$1],
 
1235
[[AC_INIT]
 
1236
AC_CONFIG_SRCDIR([$1])], [[AC_INIT]])])[]dnl
 
1237
])
 
1238
 
 
1239
 
 
1240
# AC_INIT([PACKAGE, VERSION, [BUG-REPORT])
 
1241
# ----------------------------------------
 
1242
# Include the user macro files, prepare the diversions, and output the
 
1243
# preamble of the `configure' script.
 
1244
# Note that the order is important: first initialize, then set the
 
1245
# AC_CONFIG_SRCDIR.
 
1246
m4_define([AC_INIT],
 
1247
[# Forbidden tokens and exceptions.
 
1248
m4_pattern_forbid([^_?A[CHUM]_])
 
1249
m4_pattern_forbid([_AC_])
 
1250
m4_pattern_forbid([^LIBOBJS$],
 
1251
                  [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs. LIBOBJS'])
 
1252
# Actually reserved by M4sh.
 
1253
m4_pattern_allow([^AS_FLAGS$])
 
1254
AS_INIT
 
1255
m4_ifval([$2], [_AC_INIT_PACKAGE($@)])
 
1256
_AC_INIT_DEFAULTS
 
1257
_AC_INIT_PARSE_ARGS
 
1258
_AC_INIT_SRCDIR
 
1259
_AC_INIT_HELP
 
1260
_AC_INIT_VERSION
 
1261
_AC_INIT_CONFIG_LOG
 
1262
_AC_INIT_PREPARE
 
1263
_AC_INIT_NOTICE
 
1264
_AC_INIT_COPYRIGHT
 
1265
m4_ifval([$2], , [m4_ifval([$1], [AC_CONFIG_SRCDIR([$1])])])dnl
 
1266
])
 
1267
 
 
1268
 
 
1269
 
 
1270
 
 
1271
## ----------------------------- ##
 
1272
## Selecting optional features.  ##
 
1273
## ----------------------------- ##
 
1274
 
 
1275
 
 
1276
# AC_ARG_ENABLE(FEATURE, HELP-STRING, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
 
1277
# ------------------------------------------------------------------------
 
1278
AC_DEFUN([AC_ARG_ENABLE],
 
1279
[m4_divert_once([HELP_ENABLE], [[
 
1280
Optional Features:
 
1281
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
 
1282
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]]])dnl
 
1283
m4_divert_once([HELP_ENABLE], [$2])dnl
 
1284
# Check whether --enable-$1 or --disable-$1 was given.
 
1285
if test "[${enable_]m4_bpatsubst([$1], -, _)+set}" = set; then
 
1286
  enableval="[$enable_]m4_bpatsubst([$1], -, _)"
 
1287
  $3
 
1288
m4_ifvaln([$4], [else
 
1289
  $4])dnl
 
1290
fi; dnl
 
1291
])# AC_ARG_ENABLE
 
1292
 
 
1293
 
 
1294
AU_DEFUN([AC_ENABLE],
 
1295
[AC_ARG_ENABLE([$1], [  --enable-$1], [$2], [$3])])
 
1296
 
 
1297
 
 
1298
## ------------------------------ ##
 
1299
## Working with optional software ##
 
1300
## ------------------------------ ##
 
1301
 
 
1302
 
 
1303
 
 
1304
# AC_ARG_WITH(PACKAGE, HELP-STRING, ACTION-IF-TRUE, [ACTION-IF-FALSE])
 
1305
# --------------------------------------------------------------------
 
1306
AC_DEFUN([AC_ARG_WITH],
 
1307
[m4_divert_once([HELP_WITH], [[
 
1308
Optional Packages:
 
1309
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
 
1310
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)]])
 
1311
m4_divert_once([HELP_WITH], [$2])dnl
 
1312
# Check whether --with-$1 or --without-$1 was given.
 
1313
if test "[${with_]m4_bpatsubst([$1], -, _)+set}" = set; then
 
1314
  withval="[$with_]m4_bpatsubst([$1], -, _)"
 
1315
  $3
 
1316
m4_ifvaln([$4], [else
 
1317
  $4])dnl
 
1318
fi; dnl
 
1319
])# AC_ARG_WITH
 
1320
 
 
1321
AU_DEFUN([AC_WITH],
 
1322
[AC_ARG_WITH([$1], [  --with-$1], [$2], [$3])])
 
1323
 
 
1324
 
 
1325
 
 
1326
## ----------------------------------------- ##
 
1327
## Remembering variables for reconfiguring.  ##
 
1328
## ----------------------------------------- ##
 
1329
 
 
1330
 
 
1331
# _AC_ARG_VAR_PRECIOUS(VARNAME)
 
1332
# -----------------------------
 
1333
# Declare VARNAME is precious.
 
1334
#
 
1335
# We try to diagnose when precious variables have changed.  To do this,
 
1336
# make two early snapshots (after the option processing to take
 
1337
# explicit variables into account) of those variables: one (ac_env_)
 
1338
# which represents the current run, and a second (ac_cv_env_) which,
 
1339
# at the first run, will be saved in the cache.  As an exception to
 
1340
# the cache mechanism, its loading will override these variables (non
 
1341
# `ac_cv_env_' cache value are only set when unset).
 
1342
#
 
1343
# In subsequent runs, after having loaded the cache, compare
 
1344
# ac_cv_env_foo against ac_env_foo.  See _AC_ARG_VAR_VALIDATE.
 
1345
m4_define([_AC_ARG_VAR_PRECIOUS],
 
1346
[AC_SUBST([$1])dnl
 
1347
m4_divert_once([PARSE_ARGS],
 
1348
[ac_env_$1_set=${$1+set}
 
1349
ac_env_$1_value=$$1
 
1350
ac_cv_env_$1_set=${$1+set}
 
1351
ac_cv_env_$1_value=$$1])dnl
 
1352
])
 
1353
 
 
1354
 
 
1355
# _AC_ARG_VAR_VALIDATE
 
1356
# --------------------
 
1357
# The precious variables are saved twice at the beginning of
 
1358
# configure.  E.g., PRECIOUS, is saved as `ac_env_PRECIOUS_SET' and
 
1359
# `ac_env_PRECIOUS_VALUE' on the one hand and `ac_cv_env_PRECIOUS_SET'
 
1360
# and `ac_cv_env_PRECIOUS_VALUE' on the other hand.
 
1361
#
 
1362
# Now the cache has just been load, so `ac_cv_env_' represents the
 
1363
# content of the cached values, while `ac_env_' represents that of the
 
1364
# current values.
 
1365
#
 
1366
# So we check that `ac_env_' and `ac_cv_env_' are consistant.  If
 
1367
# they aren't, die.
 
1368
m4_define([_AC_ARG_VAR_VALIDATE],
 
1369
[# Check that the precious variables saved in the cache have kept the same
 
1370
# value.
 
1371
ac_cache_corrupted=false
 
1372
for ac_var in `(set) 2>&1 |
 
1373
               sed -n 's/^ac_env_\([[a-zA-Z_0-9]]*\)_set=.*/\1/p'`; do
 
1374
  eval ac_old_set=\$ac_cv_env_${ac_var}_set
 
1375
  eval ac_new_set=\$ac_env_${ac_var}_set
 
1376
  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
 
1377
  eval ac_new_val="\$ac_env_${ac_var}_value"
 
1378
  case $ac_old_set,$ac_new_set in
 
1379
    set,)
 
1380
      AS_MESSAGE([error: `$ac_var' was set to `$ac_old_val' in the previous run], 2)
 
1381
      ac_cache_corrupted=: ;;
 
1382
    ,set)
 
1383
      AS_MESSAGE([error: `$ac_var' was not set in the previous run], 2)
 
1384
      ac_cache_corrupted=: ;;
 
1385
    ,);;
 
1386
    *)
 
1387
      if test "x$ac_old_val" != "x$ac_new_val"; then
 
1388
        AS_MESSAGE([error: `$ac_var' has changed since the previous run:], 2)
 
1389
        AS_MESSAGE([  former value:  $ac_old_val], 2)
 
1390
        AS_MESSAGE([  current value: $ac_new_val], 2)
 
1391
        ac_cache_corrupted=:
 
1392
      fi;;
 
1393
  esac
 
1394
  # Pass precious variables to config.status.
 
1395
  if test "$ac_new_set" = set; then
 
1396
    case $ac_new_val in
 
1397
dnl If you change this globbing pattern, test it on an old shell --
 
1398
dnl it's sensitive.  Putting any kind of quote in it causes syntax errors.
 
1399
[    *" "*|*"   "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)]
 
1400
      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
 
1401
    *) ac_arg=$ac_var=$ac_new_val ;;
 
1402
    esac
 
1403
    case " $ac_configure_args " in
 
1404
      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
 
1405
      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
 
1406
    esac
 
1407
  fi
 
1408
done
 
1409
if $ac_cache_corrupted; then
 
1410
  AS_MESSAGE([error: changes in the environment can compromise the build], 2)
 
1411
  AS_ERROR([run `make distclean' and/or `rm $cache_file' and start over])
 
1412
fi
 
1413
])# _AC_ARG_VAR_VALIDATE
 
1414
 
 
1415
 
 
1416
# AC_ARG_VAR(VARNAME, DOCUMENTATION)
 
1417
# ----------------------------------
 
1418
# Register VARNAME as a precious variable, and document it in
 
1419
# `configure --help' (but only once).
 
1420
AC_DEFUN([AC_ARG_VAR],
 
1421
[m4_divert_once([HELP_VAR], [[
 
1422
Some influential environment variables:]])dnl
 
1423
m4_divert_once([HELP_VAR_END], [[
 
1424
Use these variables to override the choices made by `configure' or to help
 
1425
it to find libraries and programs with nonstandard names/locations.]])dnl
 
1426
m4_expand_once([m4_divert_once([HELP_VAR],
 
1427
                               [AC_HELP_STRING([$1], [$2], [              ])])],
 
1428
               [$0($1)])dnl
 
1429
_AC_ARG_VAR_PRECIOUS([$1])dnl
 
1430
])# AC_ARG_VAR
 
1431
 
 
1432
 
 
1433
 
 
1434
 
 
1435
 
 
1436
## ---------------------------- ##
 
1437
## Transforming program names.  ##
 
1438
## ---------------------------- ##
 
1439
 
 
1440
 
 
1441
# AC_ARG_PROGRAM
 
1442
# --------------
 
1443
# This macro is expanded only once, to avoid that `foo' ends up being
 
1444
# installed as `ggfoo'.
 
1445
AC_DEFUN_ONCE([AC_ARG_PROGRAM],
 
1446
[dnl Document the options.
 
1447
m4_divert_push([HELP_BEGIN])dnl
 
1448
 
 
1449
Program names:
 
1450
  --program-prefix=PREFIX            prepend PREFIX to installed program names
 
1451
  --program-suffix=SUFFIX            append SUFFIX to installed program names
 
1452
  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
 
1453
m4_divert_pop([HELP_BEGIN])dnl
 
1454
test "$program_prefix" != NONE &&
 
1455
  program_transform_name="s,^,$program_prefix,;$program_transform_name"
 
1456
# Use a double $ so make ignores it.
 
1457
test "$program_suffix" != NONE &&
 
1458
  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
 
1459
# Double any \ or $.  echo might interpret backslashes.
 
1460
# By default was `s,x,x', remove it if useless.
 
1461
cat <<\_ACEOF >conftest.sed
 
1462
[s/[\\$]/&&/g;s/;s,x,x,$//]
 
1463
_ACEOF
 
1464
program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
 
1465
rm conftest.sed
 
1466
])# AC_ARG_PROGRAM
 
1467
 
 
1468
 
 
1469
 
 
1470
 
 
1471
 
 
1472
## ------------------------- ##
 
1473
## Finding auxiliary files.  ##
 
1474
## ------------------------- ##
 
1475
 
 
1476
 
 
1477
# AC_CONFIG_AUX_DIR(DIR)
 
1478
# ----------------------
 
1479
# Find install-sh, config.sub, config.guess, and Cygnus configure
 
1480
# in directory DIR.  These are auxiliary files used in configuration.
 
1481
# DIR can be either absolute or relative to $srcdir.
 
1482
AC_DEFUN([AC_CONFIG_AUX_DIR],
 
1483
[AC_CONFIG_AUX_DIRS($1 $srcdir/$1)])
 
1484
 
 
1485
 
 
1486
# AC_CONFIG_AUX_DIR_DEFAULT
 
1487
# -------------------------
 
1488
# The default is `$srcdir' or `$srcdir/..' or `$srcdir/../..'.
 
1489
# There's no need to call this macro explicitly; just AC_REQUIRE it.
 
1490
AC_DEFUN([AC_CONFIG_AUX_DIR_DEFAULT],
 
1491
[AC_CONFIG_AUX_DIRS($srcdir $srcdir/.. $srcdir/../..)])
 
1492
 
 
1493
 
 
1494
# AC_CONFIG_AUX_DIRS(DIR ...)
 
1495
# ---------------------------
 
1496
# Internal subroutine.
 
1497
# Search for the configuration auxiliary files in directory list $1.
 
1498
# We look only for install-sh, so users of AC_PROG_INSTALL
 
1499
# do not automatically need to distribute the other auxiliary files.
 
1500
AC_DEFUN([AC_CONFIG_AUX_DIRS],
 
1501
[ac_aux_dir=
 
1502
for ac_dir in $1; do
 
1503
  if test -f $ac_dir/install-sh; then
 
1504
    ac_aux_dir=$ac_dir
 
1505
    ac_install_sh="$ac_aux_dir/install-sh -c"
 
1506
    break
 
1507
  elif test -f $ac_dir/install.sh; then
 
1508
    ac_aux_dir=$ac_dir
 
1509
    ac_install_sh="$ac_aux_dir/install.sh -c"
 
1510
    break
 
1511
  elif test -f $ac_dir/shtool; then
 
1512
    ac_aux_dir=$ac_dir
 
1513
    ac_install_sh="$ac_aux_dir/shtool install -c"
 
1514
    break
 
1515
  fi
 
1516
done
 
1517
if test -z "$ac_aux_dir"; then
 
1518
  AC_MSG_ERROR([cannot find install-sh or install.sh in $1])
 
1519
fi
 
1520
ac_config_guess="$SHELL $ac_aux_dir/config.guess"
 
1521
ac_config_sub="$SHELL $ac_aux_dir/config.sub"
 
1522
ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
 
1523
AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
 
1524
])# AC_CONFIG_AUX_DIRS
 
1525
 
 
1526
 
 
1527
 
 
1528
 
 
1529
## ----------------------------------- ##
 
1530
## Getting the canonical system type.  ##
 
1531
## ----------------------------------- ##
 
1532
 
 
1533
# The inputs are:
 
1534
#    configure --host=HOST --target=TARGET --build=BUILD
 
1535
#
 
1536
# The rules are:
 
1537
# 1. Build defaults to the current platform, as determined by config.guess.
 
1538
# 2. Host defaults to build.
 
1539
# 3. Target defaults to host.
 
1540
 
 
1541
 
 
1542
# _AC_CANONICAL_SPLIT(THING)
 
1543
# --------------------------
 
1544
# Generate the variables THING, THING_{alias cpu vendor os}.
 
1545
m4_define([_AC_CANONICAL_SPLIT],
 
1546
[AC_SUBST([$1],       [$ac_cv_$1])dnl
 
1547
dnl FIXME: AC_SUBST([$1_alias],  [$ac_cv_$1_alias])dnl
 
1548
AC_SUBST([$1_cpu],
 
1549
         [`echo $ac_cv_$1 | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`])dnl
 
1550
AC_SUBST([$1_vendor],
 
1551
         [`echo $ac_cv_$1 | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`])dnl
 
1552
AC_SUBST([$1_os],
 
1553
         [`echo $ac_cv_$1 | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`])dnl
 
1554
])# _AC_CANONICAL_SPLIT
 
1555
 
 
1556
 
 
1557
# AC_CANONICAL_BUILD
 
1558
# ------------------
 
1559
AC_DEFUN_ONCE([AC_CANONICAL_BUILD],
 
1560
[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
 
1561
m4_divert_text([HELP_CANON],
 
1562
[[
 
1563
System types:
 
1564
  --build=BUILD     configure for building on BUILD [guessed]]])dnl
 
1565
# Make sure we can run config.sub.
 
1566
$ac_config_sub sun4 >/dev/null 2>&1 ||
 
1567
  AC_MSG_ERROR([cannot run $ac_config_sub])
 
1568
 
 
1569
AC_CACHE_CHECK([build system type], [ac_cv_build],
 
1570
[ac_cv_build_alias=$build_alias
 
1571
test -z "$ac_cv_build_alias" &&
 
1572
  ac_cv_build_alias=`$ac_config_guess`
 
1573
test -z "$ac_cv_build_alias" &&
 
1574
  AC_MSG_ERROR([cannot guess build type; you must specify one])
 
1575
ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
 
1576
  AC_MSG_ERROR([$ac_config_sub $ac_cv_build_alias failed])
 
1577
])
 
1578
_AC_CANONICAL_SPLIT(build)
 
1579
])# AC_CANONICAL_BUILD
 
1580
 
 
1581
 
 
1582
# AC_CANONICAL_HOST
 
1583
# -----------------
 
1584
AC_DEFUN_ONCE([AC_CANONICAL_HOST],
 
1585
[AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 
1586
m4_divert_text([HELP_CANON],
 
1587
[[  --host=HOST       cross-compile to build programs to run on HOST [BUILD]]])dnl
 
1588
AC_CACHE_CHECK([host system type], [ac_cv_host],
 
1589
[ac_cv_host_alias=$host_alias
 
1590
test -z "$ac_cv_host_alias" &&
 
1591
  ac_cv_host_alias=$ac_cv_build_alias
 
1592
ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
 
1593
  AC_MSG_ERROR([$ac_config_sub $ac_cv_host_alias failed])
 
1594
])
 
1595
_AC_CANONICAL_SPLIT([host])
 
1596
])# AC_CANONICAL_HOST
 
1597
 
 
1598
 
 
1599
# AC_CANONICAL_TARGET
 
1600
# -------------------
 
1601
AC_DEFUN_ONCE([AC_CANONICAL_TARGET],
 
1602
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
1603
AC_BEFORE([$0], [AC_ARG_PROGRAM])dnl
 
1604
m4_divert_text([HELP_CANON],
 
1605
[[  --target=TARGET   configure for building compilers for TARGET [HOST]]])dnl
 
1606
AC_CACHE_CHECK([target system type], [ac_cv_target],
 
1607
[dnl Set target_alias.
 
1608
ac_cv_target_alias=$target_alias
 
1609
test "x$ac_cv_target_alias" = "x" &&
 
1610
  ac_cv_target_alias=$ac_cv_host_alias
 
1611
ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
 
1612
  AC_MSG_ERROR([$ac_config_sub $ac_cv_target_alias failed])
 
1613
])
 
1614
_AC_CANONICAL_SPLIT([target])
 
1615
 
 
1616
# The aliases save the names the user supplied, while $host etc.
 
1617
# will get canonicalized.
 
1618
test -n "$target_alias" &&
 
1619
  test "$program_prefix$program_suffix$program_transform_name" = \
 
1620
    NONENONEs,x,x, &&
 
1621
  program_prefix=${target_alias}-[]dnl
 
1622
])# AC_CANONICAL_TARGET
 
1623
 
 
1624
 
 
1625
AU_ALIAS([AC_CANONICAL_SYSTEM], [AC_CANONICAL_TARGET])
 
1626
 
 
1627
 
 
1628
# AU::AC_VALIDATE_CACHED_SYSTEM_TUPLE([CMD])
 
1629
# ------------------------------------------
 
1630
# If the cache file is inconsistent with the current host,
 
1631
# target and build system types, execute CMD or print a default
 
1632
# error message.  Now handled via _AC_ARG_VAR_PRECIOUS.
 
1633
AU_DEFUN([AC_VALIDATE_CACHED_SYSTEM_TUPLE], [])
 
1634
 
 
1635
 
 
1636
## ---------------------- ##
 
1637
## Caching test results.  ##
 
1638
## ---------------------- ##
 
1639
 
 
1640
 
 
1641
# AC_SITE_LOAD
 
1642
# ------------
 
1643
# Look for site or system specific initialization scripts.
 
1644
m4_define([AC_SITE_LOAD],
 
1645
[# Prefer explicitly selected file to automatically selected ones.
 
1646
if test -z "$CONFIG_SITE"; then
 
1647
  if test "x$prefix" != xNONE; then
 
1648
    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
 
1649
  else
 
1650
    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
 
1651
  fi
 
1652
fi
 
1653
for ac_site_file in $CONFIG_SITE; do
 
1654
  if test -r "$ac_site_file"; then
 
1655
    AC_MSG_NOTICE([loading site script $ac_site_file])
 
1656
    sed 's/^/| /' "$ac_site_file" >&AS_MESSAGE_LOG_FD
 
1657
    . "$ac_site_file"
 
1658
  fi
 
1659
done
 
1660
])
 
1661
 
 
1662
 
 
1663
# AC_CACHE_LOAD
 
1664
# -------------
 
1665
m4_define([AC_CACHE_LOAD],
 
1666
[if test -r "$cache_file"; then
 
1667
  # Some versions of bash will fail to source /dev/null (special
 
1668
  # files actually), so we avoid doing that.
 
1669
  if test -f "$cache_file"; then
 
1670
    AC_MSG_NOTICE([loading cache $cache_file])
 
1671
    case $cache_file in
 
1672
      [[\\/]]* | ?:[[\\/]]* ) . $cache_file;;
 
1673
      *)                      . ./$cache_file;;
 
1674
    esac
 
1675
  fi
 
1676
else
 
1677
  AC_MSG_NOTICE([creating cache $cache_file])
 
1678
  >$cache_file
 
1679
fi
 
1680
])# AC_CACHE_LOAD
 
1681
 
 
1682
 
 
1683
# _AC_CACHE_DUMP
 
1684
# --------------
 
1685
# Dump the cache to stdout.  It can be in a pipe (this is a requirement).
 
1686
m4_define([_AC_CACHE_DUMP],
 
1687
[# The following way of writing the cache mishandles newlines in values,
 
1688
# but we know of no workaround that is simple, portable, and efficient.
 
1689
# So, don't put newlines in cache variables' values.
 
1690
# Ultrix sh set writes to stderr and can't be redirected directly,
 
1691
# and sets the high bit in the cache file unless we assign to the vars.
 
1692
{
 
1693
  (set) 2>&1 |
 
1694
    case `(ac_space=' '; set | grep ac_space) 2>&1` in
 
1695
    *ac_space=\ *)
 
1696
      # `set' does not quote correctly, so add quotes (double-quote
 
1697
      # substitution turns \\\\ into \\, and sed turns \\ into \).
 
1698
      sed -n \
 
1699
        ["s/'/'\\\\''/g;
 
1700
          s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"]
 
1701
      ;;
 
1702
    *)
 
1703
      # `set' quotes correctly as required by POSIX, so do not add quotes.
 
1704
      sed -n \
 
1705
        ["s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"]
 
1706
      ;;
 
1707
    esac;
 
1708
}dnl
 
1709
])# _AC_CACHE_DUMP
 
1710
 
 
1711
 
 
1712
# AC_CACHE_SAVE
 
1713
# -------------
 
1714
# Save the cache.
 
1715
# Allow a site initialization script to override cache values.
 
1716
m4_define([AC_CACHE_SAVE],
 
1717
[cat >confcache <<\_ACEOF
 
1718
# This file is a shell script that caches the results of configure
 
1719
# tests run on this system so they can be shared between configure
 
1720
# scripts and configure runs, see configure's option --config-cache.
 
1721
# It is not useful on other systems.  If it contains results you don't
 
1722
# want to keep, you may remove or edit it.
 
1723
#
 
1724
# config.status only pays attention to the cache file if you give it
 
1725
# the --recheck option to rerun configure.
 
1726
#
 
1727
# `ac_cv_env_foo' variables (set or unset) will be overriden when
 
1728
# loading this file, other *unset* `ac_cv_foo' will be assigned the
 
1729
# following values.
 
1730
 
 
1731
_ACEOF
 
1732
 
 
1733
_AC_CACHE_DUMP() |
 
1734
  sed ['
 
1735
     t clear
 
1736
     : clear
 
1737
     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
 
1738
     t end
 
1739
     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
 
1740
     : end'] >>confcache
 
1741
if cmp -s $cache_file confcache; then :; else
 
1742
  if test -w $cache_file; then
 
1743
    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
 
1744
    cat confcache >$cache_file
 
1745
  else
 
1746
    echo "not updating unwritable cache $cache_file"
 
1747
  fi
 
1748
fi
 
1749
rm -f confcache[]dnl
 
1750
])# AC_CACHE_SAVE
 
1751
 
 
1752
 
 
1753
# AC_CACHE_VAL(CACHE-ID, COMMANDS-TO-SET-IT)
 
1754
# ------------------------------------------
 
1755
# The name of shell var CACHE-ID must contain `_cv_' in order to get saved.
 
1756
# Should be dnl'ed.  Try to catch common mistakes.
 
1757
m4_define([AC_CACHE_VAL],
 
1758
[m4_bmatch([$2], [AC_DEFINE],
 
1759
          [AC_DIAGNOSE(syntax,
 
1760
[$0($1, ...): suspicious presence of an AC_DEFINE in the second argument, ]dnl
 
1761
[where no actions should be taken])])dnl
 
1762
AS_VAR_SET_IF([$1],
 
1763
              [_AS_ECHO_N([(cached) ])],
 
1764
              [$2])])
 
1765
 
 
1766
 
 
1767
# AC_CACHE_CHECK(MESSAGE, CACHE-ID, COMMANDS)
 
1768
# -------------------------------------------
 
1769
# Do not call this macro with a dnl right behind.
 
1770
m4_define([AC_CACHE_CHECK],
 
1771
[AC_MSG_CHECKING([$1])
 
1772
AC_CACHE_VAL([$2], [$3])dnl
 
1773
AC_MSG_RESULT_UNQUOTED([AS_VAR_GET([$2])])])
 
1774
 
 
1775
 
 
1776
 
 
1777
## ---------------------- ##
 
1778
## Defining CPP symbols.  ##
 
1779
## ---------------------- ##
 
1780
 
 
1781
 
 
1782
# AC_DEFINE_TRACE_LITERAL(LITERAL-CPP-SYMBOL)
 
1783
# -------------------------------------------
 
1784
# This macro is useless, it is used only with --trace to collect the
 
1785
# list of *literals* CPP values passed to AC_DEFINE/AC_DEFINE_UNQUOTED.
 
1786
m4_define([AC_DEFINE_TRACE_LITERAL])
 
1787
 
 
1788
 
 
1789
# AC_DEFINE_TRACE(CPP-SYMBOL)
 
1790
# ---------------------------
 
1791
# This macro is a wrapper around AC_DEFINE_TRACE_LITERAL which filters
 
1792
# out non literal symbols.
 
1793
m4_define([AC_DEFINE_TRACE],
 
1794
[AS_LITERAL_IF([$1], [AC_DEFINE_TRACE_LITERAL([$1])])])
 
1795
 
 
1796
 
 
1797
# AC_DEFINE(VARIABLE, [VALUE], [DESCRIPTION])
 
1798
# -------------------------------------------
 
1799
# Set VARIABLE to VALUE, verbatim, or 1.  Remember the value
 
1800
# and if VARIABLE is affected the same VALUE, do nothing, else
 
1801
# die.  The third argument is used by autoheader.
 
1802
m4_define([AC_DEFINE],
 
1803
[AC_DEFINE_TRACE([$1])dnl
 
1804
m4_ifval([$3], [_AH_TEMPLATE_OLD([$1], [$3])])dnl
 
1805
cat >>confdefs.h <<\_ACEOF
 
1806
[@%:@define] $1 m4_if($#, 2, [$2], $#, 3, [$2], 1)
 
1807
_ACEOF
 
1808
])
 
1809
 
 
1810
 
 
1811
# AC_DEFINE_UNQUOTED(VARIABLE, [VALUE], [DESCRIPTION])
 
1812
# ----------------------------------------------------
 
1813
# Similar, but perform shell substitutions $ ` \ once on VALUE.
 
1814
m4_define([AC_DEFINE_UNQUOTED],
 
1815
[AC_DEFINE_TRACE([$1])dnl
 
1816
m4_ifval([$3], [_AH_TEMPLATE_OLD([$1], [$3])])dnl
 
1817
cat >>confdefs.h <<_ACEOF
 
1818
[@%:@define] $1 m4_if($#, 2, [$2], $#, 3, [$2], 1)
 
1819
_ACEOF
 
1820
])
 
1821
 
 
1822
 
 
1823
 
 
1824
## -------------------------- ##
 
1825
## Setting output variables.  ##
 
1826
## -------------------------- ##
 
1827
 
 
1828
 
 
1829
# _AC_SUBST(VARIABLE, PROGRAM)
 
1830
# ----------------------------
 
1831
# If VARIABLE has not already been AC_SUBST'ed, append the sed PROGRAM
 
1832
# to `_AC_SUBST_SED_PROGRAM'.
 
1833
m4_define([_AC_SUBST],
 
1834
[m4_expand_once([m4_append([_AC_SUBST_SED_PROGRAM],
 
1835
[$2
 
1836
])])dnl
 
1837
])
 
1838
 
 
1839
# Initialize.
 
1840
m4_define([_AC_SUBST_SED_PROGRAM])
 
1841
 
 
1842
 
 
1843
# AC_SUBST(VARIABLE, [VALUE])
 
1844
# ---------------------------
 
1845
# Create an output variable from a shell VARIABLE.  If VALUE is given
 
1846
# assign it to VARIABLE.  Use `""' is you want to set VARIABLE to an
 
1847
# empty value, not an empty second argument.
 
1848
#
 
1849
# Beware that if you change this macro, you also have to change the
 
1850
# sed script at the top of _AC_OUTPUT_FILES.
 
1851
m4_define([AC_SUBST],
 
1852
[m4_ifvaln([$2], [$1=$2])[]dnl
 
1853
_AC_SUBST([$1], [s,@$1@,[$]$1,;t t])dnl
 
1854
])# AC_SUBST
 
1855
 
 
1856
 
 
1857
# AC_SUBST_FILE(VARIABLE)
 
1858
# -----------------------
 
1859
# Read the comments of the preceding macro.
 
1860
m4_define([AC_SUBST_FILE],
 
1861
[_AC_SUBST([$1], [/@$1@/r [$]$1
 
1862
s,@$1@,,;t t])])
 
1863
 
 
1864
 
 
1865
 
 
1866
## --------------------------------------- ##
 
1867
## Printing messages at autoconf runtime.  ##
 
1868
## --------------------------------------- ##
 
1869
 
 
1870
# In fact, I think we should promote the use of m4_warn and m4_fatal
 
1871
# directly.  This will also avoid to some people to get it wrong
 
1872
# between AC_FATAL and AC_MSG_ERROR.
 
1873
 
 
1874
 
 
1875
# AC_DIAGNOSE(CATEGORY, MESSAGE)
 
1876
# AC_FATAL(MESSAGE, [EXIT-STATUS])
 
1877
# --------------------------------
 
1878
m4_copy([m4_warn],  [AC_DIAGNOSE])
 
1879
m4_copy([m4_fatal], [AC_FATAL])
 
1880
 
 
1881
 
 
1882
# AC_WARNING(MESSAGE)
 
1883
# -------------------
 
1884
# Report a MESSAGE to the user of autoconf if `-W' or `-W all' was
 
1885
# specified.
 
1886
m4_define([AC_WARNING],
 
1887
[AC_DIAGNOSE([syntax], [$1])])
 
1888
 
 
1889
 
 
1890
 
 
1891
 
 
1892
## ---------------------------------------- ##
 
1893
## Printing messages at configure runtime.  ##
 
1894
## ---------------------------------------- ##
 
1895
 
 
1896
 
 
1897
# AC_MSG_CHECKING(FEATURE)
 
1898
# ------------------------
 
1899
m4_define([AC_MSG_CHECKING],
 
1900
[_AS_ECHO([$as_me:$LINENO: checking $1], AS_MESSAGE_LOG_FD)
 
1901
_AS_ECHO_N([checking $1... ])[]dnl
 
1902
])
 
1903
 
 
1904
 
 
1905
# AC_MSG_RESULT(RESULT)
 
1906
# ---------------------
 
1907
m4_define([AC_MSG_RESULT],
 
1908
[_AS_ECHO([$as_me:$LINENO: result: $1], AS_MESSAGE_LOG_FD)
 
1909
_AS_ECHO([${ECHO_T}$1])[]dnl
 
1910
])
 
1911
 
 
1912
 
 
1913
# AC_MSG_RESULT_UNQUOTED(RESULT)
 
1914
# ------------------------------
 
1915
# Likewise, but perform $ ` \ shell substitutions.
 
1916
m4_define([AC_MSG_RESULT_UNQUOTED],
 
1917
[_AS_ECHO_UNQUOTED([$as_me:$LINENO: result: $1], AS_MESSAGE_LOG_FD)
 
1918
_AS_ECHO_UNQUOTED([${ECHO_T}$1])[]dnl
 
1919
])
 
1920
 
 
1921
 
 
1922
# AC_MSG_WARN(PROBLEM)
 
1923
# AC_MSG_NOTICE(STRING)
 
1924
# AC_MSG_ERROR(ERROR, [EXIT-STATUS = 1])
 
1925
# --------------------------------------
 
1926
m4_copy([AS_WARN],    [AC_MSG_WARN])
 
1927
m4_copy([AS_MESSAGE], [AC_MSG_NOTICE])
 
1928
m4_copy([AS_ERROR],   [AC_MSG_ERROR])
 
1929
 
 
1930
 
 
1931
# AU::AC_CHECKING(FEATURE)
 
1932
# ------------------------
 
1933
AU_DEFUN([AC_CHECKING],
 
1934
[AS_MESSAGE([checking $1...])])
 
1935
 
 
1936
 
 
1937
# AU::AC_VERBOSE(STRING)
 
1938
# ----------------------
 
1939
AU_ALIAS([AC_VERBOSE], [AC_MSG_RESULT])
 
1940
 
 
1941
 
 
1942
 
 
1943
 
 
1944
 
 
1945
 
 
1946
## ---------------------------- ##
 
1947
## Compiler-running mechanics.  ##
 
1948
## ---------------------------- ##
 
1949
 
 
1950
 
 
1951
# _AC_RUN_LOG(COMMAND, LOG-COMMANDS)
 
1952
# ----------------------------------
 
1953
# Eval COMMAND, save the exit status in ac_status, and log it.
 
1954
AC_DEFUN([_AC_RUN_LOG],
 
1955
[{ ($2) >&AS_MESSAGE_LOG_FD
 
1956
  ($1) 2>&AS_MESSAGE_LOG_FD
 
1957
  ac_status=$?
 
1958
  echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 
1959
  (exit $ac_status); }])
 
1960
 
 
1961
 
 
1962
# _AC_RUN_LOG_STDERR(COMMAND, LOG-COMMANDS)
 
1963
# -----------------------------------------
 
1964
# Eval COMMAND, save its stderr into conftest.err, save the exit status
 
1965
# in ac_status, and log it.
 
1966
# Note that when tracing, most shells will leave the traces in stderr
 
1967
AC_DEFUN([_AC_RUN_LOG_STDERR],
 
1968
[{ ($2) >&AS_MESSAGE_LOG_FD
 
1969
  ($1) 2>conftest.er1
 
1970
  ac_status=$?
 
1971
  egrep -v '^ *\+' conftest.er1 >conftest.err
 
1972
  rm -f conftest.er1
 
1973
  cat conftest.err >&AS_MESSAGE_LOG_FD
 
1974
  echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 
1975
  (exit $ac_status); }])
 
1976
 
 
1977
 
 
1978
# _AC_EVAL(COMMAND)
 
1979
# -----------------
 
1980
# Eval COMMAND, save the exit status in ac_status, and log it.
 
1981
AC_DEFUN([_AC_EVAL],
 
1982
[_AC_RUN_LOG([eval $1],
 
1983
             [eval echo "$as_me:$LINENO: \"$1\""])])
 
1984
 
 
1985
 
 
1986
# _AC_EVAL_STDERR(COMMAND)
 
1987
# ------------------------
 
1988
# Eval COMMAND, save its stderr into conftest.err, save the exit status
 
1989
# in ac_status, and log it.
 
1990
# Note that when tracing, most shells will leave the traces in stderr
 
1991
AC_DEFUN([_AC_EVAL_STDERR],
 
1992
[_AC_RUN_LOG_STDERR([eval $1],
 
1993
                    [eval echo "$as_me:$LINENO: \"$1\""])])
 
1994
 
 
1995
 
 
1996
# AC_TRY_EVAL(VARIABLE)
 
1997
# ---------------------
 
1998
# The purpose of this macro is to "configure:123: command line"
 
1999
# written into config.log for every test run.
 
2000
AC_DEFUN([AC_TRY_EVAL],
 
2001
[_AC_EVAL([$$1])])
 
2002
 
 
2003
 
 
2004
# AC_TRY_COMMAND(COMMAND)
 
2005
# -----------------------
 
2006
AC_DEFUN([AC_TRY_COMMAND],
 
2007
[{ ac_try='$1'
 
2008
  _AC_EVAL([$ac_try]); }])
 
2009
 
 
2010
 
 
2011
# AC_RUN_LOG(COMMAND)
 
2012
# -------------------
 
2013
AC_DEFUN([AC_RUN_LOG],
 
2014
[_AC_RUN_LOG([$1],
 
2015
             [echo "$as_me:$LINENO: AS_ESCAPE([$1])"])])
 
2016
 
 
2017
 
 
2018
 
 
2019
 
 
2020
## ------------------------ ##
 
2021
## Examining declarations.  ##
 
2022
## ------------------------ ##
 
2023
 
 
2024
 
 
2025
 
 
2026
# _AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
 
2027
# ----------------------------------------------------------------
 
2028
# Try to preprocess PROGRAM.
 
2029
#
 
2030
# This macro can be used during the selection of a preprocessor.
 
2031
# Run cpp and set ac_cpp_err to "yes" for an error, to
 
2032
# "$ac_(c,cxx)_preproc_warn_flag" if there are warnings or to "" if
 
2033
# neither warnings nor errors have been detected.  eval is necessary
 
2034
# to expand ac_cpp.
 
2035
AC_DEFUN([_AC_PREPROC_IFELSE],
 
2036
[m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
 
2037
if _AC_EVAL_STDERR([$ac_cpp conftest.$ac_ext]) >/dev/null; then
 
2038
  if test -s conftest.err; then
 
2039
    ac_cpp_err=$ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag
 
2040
  else
 
2041
    ac_cpp_err=
 
2042
  fi
 
2043
else
 
2044
  ac_cpp_err=yes
 
2045
fi
 
2046
if test -z "$ac_cpp_err"; then
 
2047
  m4_default([$2], :)
 
2048
else
 
2049
  echo "$as_me: failed program was:" >&AS_MESSAGE_LOG_FD
 
2050
  cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD
 
2051
  $3
 
2052
fi
 
2053
rm -f conftest.err m4_ifval([$1], [conftest.$ac_ext])[]dnl
 
2054
])# _AC_PREPROC_IFELSE
 
2055
 
 
2056
 
 
2057
# AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
 
2058
# ---------------------------------------------------------------
 
2059
# Try to preprocess PROGRAM.  Requires that the preprocessor for the
 
2060
# current language was checked for, hence do not use this macro in macros
 
2061
# looking for a preprocessor.
 
2062
AC_DEFUN([AC_PREPROC_IFELSE],
 
2063
[AC_LANG_PREPROC_REQUIRE()dnl
 
2064
_AC_PREPROC_IFELSE($@)])
 
2065
 
 
2066
 
 
2067
# AC_TRY_CPP(INCLUDES, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
 
2068
# ---------------------------------------------------------
 
2069
# AC_TRY_CPP is used to check whether particular header files exist.
 
2070
# (But it actually tests whether INCLUDES produces no CPP errors.)
 
2071
#
 
2072
# INCLUDES are not defaulted and are double quoted.
 
2073
AC_DEFUN([AC_TRY_CPP],
 
2074
[AC_PREPROC_IFELSE([AC_LANG_SOURCE([[$1]])], [$2], [$3])])
 
2075
 
 
2076
 
 
2077
# AC_EGREP_CPP(PATTERN, PROGRAM,
 
2078
#              [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 
2079
# ------------------------------------------------------
 
2080
# Because this macro is used by AC_PROG_GCC_TRADITIONAL, which must
 
2081
# come early, it is not included in AC_BEFORE checks.
 
2082
AC_DEFUN([AC_EGREP_CPP],
 
2083
[AC_LANG_PREPROC_REQUIRE()dnl
 
2084
AC_LANG_CONFTEST([AC_LANG_SOURCE([[$2]])])
 
2085
dnl eval is necessary to expand ac_cpp.
 
2086
dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell.
 
2087
if (eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
 
2088
dnl Quote $1 to prevent m4 from eating character classes
 
2089
  egrep "[$1]" >/dev/null 2>&1; then
 
2090
  m4_default([$3], :)
 
2091
m4_ifvaln([$4], [else
 
2092
  $4])dnl
 
2093
fi
 
2094
rm -f conftest*
 
2095
])# AC_EGREP_CPP
 
2096
 
 
2097
 
 
2098
# AC_EGREP_HEADER(PATTERN, HEADER-FILE,
 
2099
#                 [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 
2100
# ---------------------------------------------------------
 
2101
AC_DEFUN([AC_EGREP_HEADER],
 
2102
[AC_EGREP_CPP([$1],
 
2103
[#include <$2>
 
2104
], [$3], [$4])])
 
2105
 
 
2106
 
 
2107
 
 
2108
 
 
2109
## ------------------ ##
 
2110
## Examining syntax.  ##
 
2111
## ------------------ ##
 
2112
 
 
2113
 
 
2114
# _AC_COMPILE_IFELSE(PROGRAM, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 
2115
# ---------------------------------------------------------------------
 
2116
# Try to compile PROGRAM.
 
2117
# This macro can be used during the selection of a compiler.
 
2118
m4_define([_AC_COMPILE_IFELSE],
 
2119
[m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
 
2120
rm -f conftest.$ac_objext
 
2121
AS_IF([AC_TRY_EVAL(ac_compile) &&
 
2122
         AC_TRY_COMMAND([test -s conftest.$ac_objext])],
 
2123
      [$2],
 
2124
      [echo "$as_me: failed program was:" >&AS_MESSAGE_LOG_FD
 
2125
cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD
 
2126
m4_ifvaln([$3],[$3])dnl])dnl
 
2127
rm -f conftest.$ac_objext m4_ifval([$1], [conftest.$ac_ext])[]dnl
 
2128
])# _AC_COMPILE_IFELSE
 
2129
 
 
2130
 
 
2131
# AC_COMPILE_IFELSE(PROGRAM, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 
2132
# --------------------------------------------------------------------
 
2133
# Try to compile PROGRAM.  Requires that the compiler for the current
 
2134
# language was checked for, hence do not use this macro in macros looking
 
2135
# for a compiler.
 
2136
AC_DEFUN([AC_COMPILE_IFELSE],
 
2137
[AC_LANG_COMPILER_REQUIRE()dnl
 
2138
_AC_COMPILE_IFELSE($@)])
 
2139
 
 
2140
 
 
2141
# AC_TRY_COMPILE(INCLUDES, FUNCTION-BODY,
 
2142
#                [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 
2143
# --------------------------------------------------------
 
2144
AC_DEFUN([AC_TRY_COMPILE],
 
2145
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4])])
 
2146
 
 
2147
 
 
2148
 
 
2149
## --------------------- ##
 
2150
## Examining libraries.  ##
 
2151
## --------------------- ##
 
2152
 
 
2153
 
 
2154
# _AC_LINK_IFELSE(PROGRAM, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 
2155
# ------------------------------------------------------------------
 
2156
# Try to link PROGRAM.
 
2157
# This macro can be used during the selection of a compiler.
 
2158
m4_define([_AC_LINK_IFELSE],
 
2159
[m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
 
2160
rm -f conftest.$ac_objext conftest$ac_exeext
 
2161
AS_IF([AC_TRY_EVAL(ac_link) &&
 
2162
         AC_TRY_COMMAND([test -s conftest$ac_exeext])],
 
2163
      [$2],
 
2164
      [echo "$as_me: failed program was:" >&AS_MESSAGE_LOG_FD
 
2165
cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD
 
2166
m4_ifvaln([$3], [$3])dnl])[]dnl
 
2167
rm -f conftest.$ac_objext conftest$ac_exeext m4_ifval([$1], [conftest.$ac_ext])[]dnl
 
2168
])# _AC_LINK_IFELSE
 
2169
 
 
2170
 
 
2171
# AC_LINK_IFELSE(PROGRAM, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 
2172
# -----------------------------------------------------------------
 
2173
# Try to link PROGRAM.  Requires that the compiler for the current
 
2174
# language was checked for, hence do not use this macro in macros looking
 
2175
# for a compiler.
 
2176
AC_DEFUN([AC_LINK_IFELSE],
 
2177
[AC_LANG_COMPILER_REQUIRE()dnl
 
2178
_AC_LINK_IFELSE($@)])
 
2179
 
 
2180
 
 
2181
# AC_TRY_LINK(INCLUDES, FUNCTION-BODY,
 
2182
#             [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 
2183
# -----------------------------------------------------
 
2184
# Should the INCLUDES be defaulted here?
 
2185
# Contrarily to AC_LINK_IFELSE, this macro double quote its first two args.
 
2186
# FIXME: WARNING: The code to compile was different in the case of
 
2187
# Fortran between AC_TRY_COMPILE and AC_TRY_LINK, though they should
 
2188
# equivalent as far as I can tell from the semantics and the docs.  In
 
2189
# the former, $[2] is used as is, in the latter, it is `call' ed.
 
2190
# Remove these FIXME: once truth established.
 
2191
AC_DEFUN([AC_TRY_LINK],
 
2192
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4])])
 
2193
 
 
2194
 
 
2195
# AC_COMPILE_CHECK(ECHO-TEXT, INCLUDES, FUNCTION-BODY,
 
2196
#                  ACTION-IF-FOUND, [ACTION-IF-NOT-FOUND])
 
2197
# --------------------------------------------------------
 
2198
AU_DEFUN([AC_COMPILE_CHECK],
 
2199
[m4_ifvaln([$1], [AC_CHECKING([for $1])])dnl
 
2200
AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2]], [[$3]])], [$4], [$5])
 
2201
])
 
2202
 
 
2203
 
 
2204
 
 
2205
 
 
2206
## -------------------------------- ##
 
2207
## Checking for run-time features.  ##
 
2208
## -------------------------------- ##
 
2209
 
 
2210
 
 
2211
# _AC_RUN_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
 
2212
# ------------------------------------------------------------
 
2213
# Compile, link, and run.
 
2214
# This macro can be used during the selection of a compiler.
 
2215
# We also remove conftest.o as if the compilation fails, some compilers
 
2216
# don't remove it.
 
2217
m4_define([_AC_RUN_IFELSE],
 
2218
[m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
 
2219
rm -f conftest$ac_exeext
 
2220
AS_IF([AC_TRY_EVAL(ac_link) && AC_TRY_COMMAND(./conftest$ac_exeext)],
 
2221
      [$2],
 
2222
      [echo "$as_me: program exited with status $ac_status" >&AS_MESSAGE_LOG_FD
 
2223
echo "$as_me: failed program was:" >&AS_MESSAGE_LOG_FD
 
2224
cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD
 
2225
m4_ifvaln([$3],
 
2226
          [( exit $ac_status )
 
2227
$3])dnl])[]dnl
 
2228
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext m4_ifval([$1],
 
2229
                                                     [conftest.$ac_ext])[]dnl
 
2230
])# _AC_RUN_IFELSE
 
2231
 
 
2232
 
 
2233
# AC_RUN_IFELSE(PROGRAM,
 
2234
#               [ACTION-IF-TRUE], [ACTION-IF-FALSE],
 
2235
#               [ACTION-IF-CROSS-COMPILING = RUNTIME-ERROR])
 
2236
# ----------------------------------------------------------
 
2237
# Compile, link, and run. Requires that the compiler for the current
 
2238
# language was checked for, hence do not use this macro in macros looking
 
2239
# for a compiler.
 
2240
AC_DEFUN([AC_RUN_IFELSE],
 
2241
[AC_LANG_COMPILER_REQUIRE()dnl
 
2242
m4_ifval([$4], [],
 
2243
         [AC_DIAGNOSE([cross],
 
2244
                     [$0 called without default to allow cross compiling])])dnl
 
2245
if test "$cross_compiling" = yes; then
 
2246
  m4_default([$4],
 
2247
             [AC_MSG_ERROR([cannot run test program while cross compiling])])
 
2248
else
 
2249
  _AC_RUN_IFELSE($@)
 
2250
fi])
 
2251
 
 
2252
 
 
2253
# AC_TRY_RUN(PROGRAM,
 
2254
#            [ACTION-IF-TRUE], [ACTION-IF-FALSE],
 
2255
#            [ACTION-IF-CROSS-COMPILING = RUNTIME-ERROR])
 
2256
# --------------------------------------------------------
 
2257
AC_DEFUN([AC_TRY_RUN],
 
2258
[AC_RUN_IFELSE([AC_LANG_SOURCE([[$1]])], [$2], [$3], [$4])])
 
2259
 
 
2260
 
 
2261
 
 
2262
## ------------------------------------- ##
 
2263
## Checking for the existence of files.  ##
 
2264
## ------------------------------------- ##
 
2265
 
 
2266
# AC_CHECK_FILE(FILE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 
2267
# -------------------------------------------------------------
 
2268
#
 
2269
# Check for the existence of FILE.
 
2270
AC_DEFUN([AC_CHECK_FILE],
 
2271
[AC_DIAGNOSE([cross],
 
2272
             [cannot check for file existence when cross compiling])dnl
 
2273
AS_VAR_PUSHDEF([ac_File], [ac_cv_file_$1])dnl
 
2274
AC_CACHE_CHECK([for $1], ac_File,
 
2275
[test "$cross_compiling" = yes &&
 
2276
  AC_MSG_ERROR([cannot check for file existence when cross compiling])
 
2277
if test -r "$1"; then
 
2278
  AS_VAR_SET(ac_File, yes)
 
2279
else
 
2280
  AS_VAR_SET(ac_File, no)
 
2281
fi])
 
2282
AS_IF([test AS_VAR_GET(ac_File) = yes], [$2], [$3])[]dnl
 
2283
AS_VAR_POPDEF([ac_File])dnl
 
2284
])# AC_CHECK_FILE
 
2285
 
 
2286
 
 
2287
# AC_CHECK_FILES(FILE..., [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 
2288
# -----------------------------------------------------------------
 
2289
AC_DEFUN([AC_CHECK_FILES],
 
2290
[AC_FOREACH([AC_FILE_NAME], [$1],
 
2291
  [AC_CHECK_FILE(AC_FILE_NAME,
 
2292
                 [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]AC_FILE_NAME), 1,
 
2293
                                    [Define to 1 if you have the
 
2294
                                     file `]AC_File['.])
 
2295
$2],
 
2296
                 [$3])])])
 
2297
 
 
2298
 
 
2299
## ------------------------------- ##
 
2300
## Checking for declared symbols.  ##
 
2301
## ------------------------------- ##
 
2302
 
 
2303
 
 
2304
# AC_CHECK_DECL(SYMBOL,
 
2305
#               [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
 
2306
#               [INCLUDES = DEFAULT-INCLUDES])
 
2307
# -------------------------------------------------------
 
2308
# Check if SYMBOL (a variable or a function) is declared.
 
2309
AC_DEFUN([AC_CHECK_DECL],
 
2310
[AS_VAR_PUSHDEF([ac_Symbol], [ac_cv_have_decl_$1])dnl
 
2311
AC_CACHE_CHECK([whether $1 is declared], ac_Symbol,
 
2312
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])],
 
2313
[#ifndef $1
 
2314
  char *p = (char *) $1;
 
2315
#endif
 
2316
])],
 
2317
                   [AS_VAR_SET(ac_Symbol, yes)],
 
2318
                   [AS_VAR_SET(ac_Symbol, no)])])
 
2319
AS_IF([test AS_VAR_GET(ac_Symbol) = yes], [$2], [$3])[]dnl
 
2320
AS_VAR_POPDEF([ac_Symbol])dnl
 
2321
])# AC_CHECK_DECL
 
2322
 
 
2323
 
 
2324
# AC_CHECK_DECLS(SYMBOLS,
 
2325
#                [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
 
2326
#                [INCLUDES = DEFAULT-INCLUDES])
 
2327
# --------------------------------------------------------
 
2328
# Defines HAVE_DECL_SYMBOL to 1 if declared, 0 otherwise.  See the
 
2329
# documentation for a detailed explanation of this difference with
 
2330
# other AC_CHECK_*S macros.  SYMBOLS is an m4 list.
 
2331
AC_DEFUN([AC_CHECK_DECLS],
 
2332
[m4_foreach([AC_Symbol], [$1],
 
2333
  [AC_CHECK_DECL(AC_Symbol,
 
2334
                 [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_DECL_]AC_Symbol), 1,
 
2335
                                     [Define to 1 if you have the declaration
 
2336
                                     of `]AC_Symbol[', and to 0 if you don't.])
 
2337
$2],
 
2338
                 [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_DECL_]AC_Symbol), 0)
 
2339
$3],
 
2340
                 [$4])])
 
2341
])# AC_CHECK_DECLS
 
2342
 
 
2343
 
 
2344
## -------------------------------- ##
 
2345
## Checking for library functions.  ##
 
2346
## -------------------------------- ##
 
2347
 
 
2348
 
 
2349
# AC_LIBSOURCE(FILENAME)
 
2350
# ----------------------
 
2351
# Announce we might need the file `FILENAME'.
 
2352
m4_define([AC_LIBSOURCE], [])
 
2353
 
 
2354
 
 
2355
# AC_LIBSOURCES([FILENAME1, ...])
 
2356
# -------------------------------
 
2357
# Announce we might need these files.
 
2358
m4_define([AC_LIBSOURCES],
 
2359
[m4_foreach([_AC_FILENAME], [$1],
 
2360
            [AC_LIBSOURCE(_AC_FILENAME)])])
 
2361
 
 
2362
 
 
2363
# _AC_LIBOBJ(FILENAME-NOEXT, ACTION-IF-INDIR)
 
2364
# -------------------------------------------
 
2365
# We need `FILENAME-NOEXT.o', save this into `LIBOBJS'.
 
2366
# We don't use AC_SUBST/2 because it forces an unneeded eol.
 
2367
m4_define([_AC_LIBOBJ],
 
2368
[AS_LITERAL_IF([$1],
 
2369
               [AC_LIBSOURCE([$1.c])],
 
2370
               [$2])dnl
 
2371
AC_SUBST([LIB@&t@OBJS])dnl
 
2372
LIB@&t@OBJS="$LIB@&t@OBJS $1.$ac_objext"])
 
2373
 
 
2374
 
 
2375
# AC_LIBOBJ(FILENAME-NOEXT)
 
2376
# -------------------------
 
2377
# We need `FILENAME-NOEXT.o', save this into `LIBOBJS'.
 
2378
# We don't use AC_SUBST/2 because it forces an unneeded eol.
 
2379
m4_define([AC_LIBOBJ],
 
2380
[_AC_LIBOBJ([$1],
 
2381
            [AC_DIAGNOSE(syntax,
 
2382
                         [$0($1): you should use literals])])dnl
 
2383
])
 
2384
 
 
2385
 
 
2386
 
 
2387
## ----------------------------------- ##
 
2388
## Checking compiler characteristics.  ##
 
2389
## ----------------------------------- ##
 
2390
 
 
2391
 
 
2392
# _AC_COMPUTE_INT_COMPILE(EXPRESSION, VARIABLE, [INCLUDES], [IF-FAILS])
 
2393
# ---------------------------------------------------------------------
 
2394
# Compute the integer EXPRESSION and store the result in the VARIABLE.
 
2395
# Works OK if cross compiling, but assumes twos-complement arithmetic.
 
2396
m4_define([_AC_COMPUTE_INT_COMPILE],
 
2397
[# Depending upon the size, compute the lo and hi bounds.
 
2398
AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) >= 0])],
 
2399
 [ac_lo=0 ac_mid=0
 
2400
  while :; do
 
2401
    AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) <= $ac_mid])],
 
2402
                   [ac_hi=$ac_mid; break],
 
2403
                   [ac_lo=`expr $ac_mid + 1`
 
2404
                    if test $ac_lo -le $ac_mid; then
 
2405
                      ac_lo= ac_hi=
 
2406
                      break
 
2407
                    fi
 
2408
                    ac_mid=`expr 2 '*' $ac_mid + 1`])
 
2409
  done],
 
2410
[AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) < 0])],
 
2411
 [ac_hi=-1 ac_mid=-1
 
2412
  while :; do
 
2413
    AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) >= $ac_mid])],
 
2414
                      [ac_lo=$ac_mid; break],
 
2415
                      [ac_hi=`expr '(' $ac_mid ')' - 1`
 
2416
                       if test $ac_mid -le $ac_hi; then
 
2417
                         ac_lo= ac_hi=
 
2418
                         break
 
2419
                       fi
 
2420
                       ac_mid=`expr 2 '*' $ac_mid`])
 
2421
  done],
 
2422
 [ac_lo= ac_hi=])])
 
2423
# Binary search between lo and hi bounds.
 
2424
while test "x$ac_lo" != "x$ac_hi"; do
 
2425
  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
 
2426
  AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) <= $ac_mid])],
 
2427
                     [ac_hi=$ac_mid], [ac_lo=`expr '(' $ac_mid ')' + 1`])
 
2428
done
 
2429
case $ac_lo in
 
2430
?*) $2=$ac_lo;;
 
2431
'') $4 ;;
 
2432
esac[]dnl
 
2433
])# _AC_COMPUTE_INT_COMPILE
 
2434
 
 
2435
 
 
2436
# _AC_COMPUTE_INT_RUN(EXPRESSION, VARIABLE, [INCLUDES], [IF-FAILS])
 
2437
# -----------------------------------------------------------------
 
2438
# Store the evaluation of the integer EXPRESSION in VARIABLE.
 
2439
m4_define([_AC_COMPUTE_INT_RUN],
 
2440
[AC_RUN_IFELSE([AC_LANG_INT_SAVE([$3], [$1])],
 
2441
               [$2=`cat conftest.val`], [$4])])
 
2442
 
 
2443
 
 
2444
# _AC_COMPUTE_INT(EXPRESSION, VARIABLE, INCLUDES, IF-FAILS)
 
2445
# ---------------------------------------------------------
 
2446
m4_define([_AC_COMPUTE_INT],
 
2447
[if test "$cross_compiling" = yes; then
 
2448
  _AC_COMPUTE_INT_COMPILE([$1], [$2], [$3], [$4])
 
2449
else
 
2450
  _AC_COMPUTE_INT_RUN([$1], [$2], [$3], [$4])
 
2451
fi
 
2452
rm -f conftest.val[]dnl
 
2453
])# _AC_COMPUTE_INT