~ubuntu-branches/ubuntu/utopic/libice/utopic

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Package Import Robot
  • Author(s): Julien Cristau
  • Date: 2014-07-13 01:38:11 UTC
  • mfrom: (1.1.8) (0.2.10 sid)
  • Revision ID: package-import@ubuntu.com-20140713013811-qtofhjeux1mfmx2j
Tags: 2:1.0.9-1
* New upstream release.
* Remove Cyril from Uploaders.
* Rewrite debian/rules using dh.  Switch to compat level 9.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
2
 
 
3
 
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4
 
# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
 
1
# generated automatically by aclocal 1.14 -*- Autoconf -*-
 
2
 
 
3
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
 
4
 
5
5
# This file is free software; the Free Software Foundation
6
6
# gives unlimited permission to copy and/or distribute it,
7
7
# with or without modifications, as long as this notice is preserved.
11
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12
12
# PARTICULAR PURPOSE.
13
13
 
 
14
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
14
15
m4_ifndef([AC_AUTOCONF_VERSION],
15
16
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16
17
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
17
18
[m4_warning([this file was generated for autoconf 2.68.
18
19
You have another version of autoconf.  It may work, but is not guaranteed to.
19
20
If you have problems, you may need to regenerate the build system entirely.
20
 
To do so, use the procedure documented by the package, typically `autoreconf'.])])
 
21
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
21
22
 
22
 
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 
23
# Copyright (C) 2002-2013 Free Software Foundation, Inc.
23
24
#
24
25
# This file is free software; the Free Software Foundation
25
26
# gives unlimited permission to copy and/or distribute it,
31
32
# generated from the m4 files accompanying Automake X.Y.
32
33
# (This private macro should not be called outside this file.)
33
34
AC_DEFUN([AM_AUTOMAKE_VERSION],
34
 
[am__api_version='1.11'
 
35
[am__api_version='1.14'
35
36
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
36
37
dnl require some minimum version.  Point them to the right macro.
37
 
m4_if([$1], [1.11.1], [],
 
38
m4_if([$1], [1.14], [],
38
39
      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
39
40
])
40
41
 
50
51
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
51
52
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
52
53
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
53
 
[AM_AUTOMAKE_VERSION([1.11.1])dnl
 
54
[AM_AUTOMAKE_VERSION([1.14])dnl
54
55
m4_ifndef([AC_AUTOCONF_VERSION],
55
56
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
56
57
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
57
58
 
58
59
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
59
60
 
60
 
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
61
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
61
62
#
62
63
# This file is free software; the Free Software Foundation
63
64
# gives unlimited permission to copy and/or distribute it,
64
65
# with or without modifications, as long as this notice is preserved.
65
66
 
66
67
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
67
 
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
68
 
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
 
68
# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
 
69
# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
69
70
#
70
71
# Of course, Automake must honor this variable whenever it calls a
71
72
# tool from the auxiliary directory.  The problem is that $srcdir (and
84
85
#
85
86
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
86
87
# are both prefixed by $srcdir.  In an in-source build this is usually
87
 
# harmless because $srcdir is `.', but things will broke when you
 
88
# harmless because $srcdir is '.', but things will broke when you
88
89
# start a VPATH build or use an absolute $srcdir.
89
90
#
90
91
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
110
111
 
111
112
# AM_CONDITIONAL                                            -*- Autoconf -*-
112
113
 
113
 
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
114
 
# Free Software Foundation, Inc.
 
114
# Copyright (C) 1997-2013 Free Software Foundation, Inc.
115
115
#
116
116
# This file is free software; the Free Software Foundation
117
117
# gives unlimited permission to copy and/or distribute it,
118
118
# with or without modifications, as long as this notice is preserved.
119
119
 
120
 
# serial 9
121
 
 
122
120
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
123
121
# -------------------------------------
124
122
# Define a conditional.
125
123
AC_DEFUN([AM_CONDITIONAL],
126
 
[AC_PREREQ(2.52)dnl
127
 
 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
128
 
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
 
124
[AC_PREREQ([2.52])dnl
 
125
 m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
 
126
       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
129
127
AC_SUBST([$1_TRUE])dnl
130
128
AC_SUBST([$1_FALSE])dnl
131
129
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
144
142
Usually this means the macro was only invoked conditionally.]])
145
143
fi])])
146
144
 
147
 
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
148
 
# Free Software Foundation, Inc.
 
145
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
149
146
#
150
147
# This file is free software; the Free Software Foundation
151
148
# gives unlimited permission to copy and/or distribute it,
152
149
# with or without modifications, as long as this notice is preserved.
153
150
 
154
 
# serial 10
155
151
 
156
 
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 
152
# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
157
153
# written in clear, in which case automake, when reading aclocal.m4,
158
154
# will think it sees a *use*, and therefore will trigger all it's
159
155
# C support machinery.  Also note that it means that autoscan, seeing
163
159
# _AM_DEPENDENCIES(NAME)
164
160
# ----------------------
165
161
# See how the compiler implements dependency checking.
166
 
# NAME is "CC", "CXX", "GCJ", or "OBJC".
 
162
# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
167
163
# We try a few techniques and use that to set a single cache variable.
168
164
#
169
165
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
176
172
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
177
173
AC_REQUIRE([AM_DEP_TRACK])dnl
178
174
 
179
 
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
180
 
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
181
 
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
182
 
       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
183
 
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
184
 
                   [depcc="$$1"   am_compiler_list=])
 
175
m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
 
176
      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
 
177
      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
 
178
      [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
 
179
      [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
 
180
      [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
 
181
                    [depcc="$$1"   am_compiler_list=])
185
182
 
186
183
AC_CACHE_CHECK([dependency style of $depcc],
187
184
               [am_cv_$1_dependencies_compiler_type],
189
186
  # We make a subdir and do the tests there.  Otherwise we can end up
190
187
  # making bogus files that we don't know about and never remove.  For
191
188
  # instance it was reported that on HP-UX the gcc test will end up
192
 
  # making a dummy file named `D' -- because `-MD' means `put the output
193
 
  # in D'.
 
189
  # making a dummy file named 'D' -- because '-MD' means "put the output
 
190
  # in D".
 
191
  rm -rf conftest.dir
194
192
  mkdir conftest.dir
195
193
  # Copy depcomp to subdir because otherwise we won't find it if we're
196
194
  # using a relative directory.
229
227
    : > sub/conftest.c
230
228
    for i in 1 2 3 4 5 6; do
231
229
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
232
 
      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
233
 
      # Solaris 8's {/usr,}/bin/sh.
234
 
      touch sub/conftst$i.h
 
230
      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
 
231
      # Solaris 10 /bin/sh.
 
232
      echo '/* dummy */' > sub/conftst$i.h
235
233
    done
236
234
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
237
235
 
238
 
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
 
236
    # We check with '-c' and '-o' for the sake of the "dashmstdout"
239
237
    # mode.  It turns out that the SunPro C++ compiler does not properly
240
 
    # handle `-M -o', and we need to detect this.  Also, some Intel
241
 
    # versions had trouble with output in subdirs
 
238
    # handle '-M -o', and we need to detect this.  Also, some Intel
 
239
    # versions had trouble with output in subdirs.
242
240
    am__obj=sub/conftest.${OBJEXT-o}
243
241
    am__minus_obj="-o $am__obj"
244
242
    case $depmode in
247
245
      test "$am__universal" = false || continue
248
246
      ;;
249
247
    nosideeffect)
250
 
      # after this tag, mechanisms are not by side-effect, so they'll
251
 
      # only be used when explicitly requested
 
248
      # After this tag, mechanisms are not by side-effect, so they'll
 
249
      # only be used when explicitly requested.
252
250
      if test "x$enable_dependency_tracking" = xyes; then
253
251
        continue
254
252
      else
255
253
        break
256
254
      fi
257
255
      ;;
258
 
    msvisualcpp | msvcmsys)
259
 
      # This compiler won't grok `-c -o', but also, the minuso test has
 
256
    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
 
257
      # This compiler won't grok '-c -o', but also, the minuso test has
260
258
      # not run yet.  These depmodes are late enough in the game, and
261
259
      # so weak that their functioning should not be impacted.
262
260
      am__obj=conftest.${OBJEXT-o}
304
302
# AM_SET_DEPDIR
305
303
# -------------
306
304
# Choose a directory name for dependency files.
307
 
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
 
305
# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
308
306
AC_DEFUN([AM_SET_DEPDIR],
309
307
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
310
308
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
314
312
# AM_DEP_TRACK
315
313
# ------------
316
314
AC_DEFUN([AM_DEP_TRACK],
317
 
[AC_ARG_ENABLE(dependency-tracking,
318
 
[  --disable-dependency-tracking  speeds up one-time build
319
 
  --enable-dependency-tracking   do not reject slow dependency extractors])
 
315
[AC_ARG_ENABLE([dependency-tracking], [dnl
 
316
AS_HELP_STRING(
 
317
  [--enable-dependency-tracking],
 
318
  [do not reject slow dependency extractors])
 
319
AS_HELP_STRING(
 
320
  [--disable-dependency-tracking],
 
321
  [speeds up one-time build])])
320
322
if test "x$enable_dependency_tracking" != xno; then
321
323
  am_depcomp="$ac_aux_dir/depcomp"
322
324
  AMDEPBACKSLASH='\'
 
325
  am__nodep='_no'
323
326
fi
324
327
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
325
328
AC_SUBST([AMDEPBACKSLASH])dnl
326
329
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
 
330
AC_SUBST([am__nodep])dnl
 
331
_AM_SUBST_NOTMAKE([am__nodep])dnl
327
332
])
328
333
 
329
334
# Generate code to set up dependency tracking.              -*- Autoconf -*-
330
335
 
331
 
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
332
 
# Free Software Foundation, Inc.
 
336
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
333
337
#
334
338
# This file is free software; the Free Software Foundation
335
339
# gives unlimited permission to copy and/or distribute it,
336
340
# with or without modifications, as long as this notice is preserved.
337
341
 
338
 
#serial 5
339
342
 
340
343
# _AM_OUTPUT_DEPENDENCY_COMMANDS
341
344
# ------------------------------
342
345
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
343
346
[{
344
 
  # Autoconf 2.62 quotes --file arguments for eval, but not when files
 
347
  # Older Autoconf quotes --file arguments for eval, but not when files
345
348
  # are listed without --file.  Let's play safe and only enable the eval
346
349
  # if we detect the quoting.
347
350
  case $CONFIG_FILES in
354
357
    # Strip MF so we end up with the name of the file.
355
358
    mf=`echo "$mf" | sed -e 's/:.*$//'`
356
359
    # Check whether this is an Automake generated Makefile or not.
357
 
    # We used to match only the files named `Makefile.in', but
 
360
    # We used to match only the files named 'Makefile.in', but
358
361
    # some people rename them; so instead we look at the file content.
359
362
    # Grep'ing the first line is not enough: some people post-process
360
363
    # each Makefile.in and add a new line on top of each file to say so.
366
369
      continue
367
370
    fi
368
371
    # Extract the definition of DEPDIR, am__include, and am__quote
369
 
    # from the Makefile without running `make'.
 
372
    # from the Makefile without running 'make'.
370
373
    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
371
374
    test -z "$DEPDIR" && continue
372
375
    am__include=`sed -n 's/^am__include = //p' < "$mf"`
373
 
    test -z "am__include" && continue
 
376
    test -z "$am__include" && continue
374
377
    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
375
 
    # When using ansi2knr, U may be empty or an underscore; expand it
376
 
    U=`sed -n 's/^U = //p' < "$mf"`
377
378
    # Find all dependency output files, they are included files with
378
379
    # $(DEPDIR) in their names.  We invoke sed twice because it is the
379
380
    # simplest approach to changing $(DEPDIR) to its actual value in the
380
381
    # expansion.
381
382
    for file in `sed -n "
382
383
      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
383
 
         sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
 
384
         sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
384
385
      # Make sure the directory exists.
385
386
      test -f "$dirpart/$file" && continue
386
387
      fdir=`AS_DIRNAME(["$file"])`
398
399
# This macro should only be invoked once -- use via AC_REQUIRE.
399
400
#
400
401
# This code is only required when automatic dependency tracking
401
 
# is enabled.  FIXME.  This creates each `.P' file that we will
 
402
# is enabled.  FIXME.  This creates each '.P' file that we will
402
403
# need in order to bootstrap the dependency handling code.
403
404
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
404
405
[AC_CONFIG_COMMANDS([depfiles],
408
409
 
409
410
# Do all the work for Automake.                             -*- Autoconf -*-
410
411
 
411
 
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
412
 
# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
 
412
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
413
413
#
414
414
# This file is free software; the Free Software Foundation
415
415
# gives unlimited permission to copy and/or distribute it,
416
416
# with or without modifications, as long as this notice is preserved.
417
417
 
418
 
# serial 16
419
 
 
420
418
# This macro actually does too much.  Some checks are only needed if
421
419
# your package does certain things.  But this isn't really a big deal.
422
420
 
 
421
dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
 
422
m4_define([AC_PROG_CC],
 
423
m4_defn([AC_PROG_CC])
 
424
[_AM_PROG_CC_C_O
 
425
])
 
426
 
423
427
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
424
428
# AM_INIT_AUTOMAKE([OPTIONS])
425
429
# -----------------------------------------------
432
436
# arguments mandatory, and then we can depend on a new Autoconf
433
437
# release and drop the old call support.
434
438
AC_DEFUN([AM_INIT_AUTOMAKE],
435
 
[AC_PREREQ([2.62])dnl
 
439
[AC_PREREQ([2.65])dnl
436
440
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
437
441
dnl the ones we care about.
438
442
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
461
465
# Define the identity of the package.
462
466
dnl Distinguish between old-style and new-style calls.
463
467
m4_ifval([$2],
464
 
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
 
468
[AC_DIAGNOSE([obsolete],
 
469
             [$0: two- and three-arguments forms are deprecated.])
 
470
m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
465
471
 AC_SUBST([PACKAGE], [$1])dnl
466
472
 AC_SUBST([VERSION], [$2])],
467
473
[_AM_SET_OPTIONS([$1])dnl
468
474
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
469
 
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
 
475
m4_if(
 
476
  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
 
477
  [ok:ok],,
470
478
  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
471
479
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
472
480
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
473
481
 
474
482
_AM_IF_OPTION([no-define],,
475
 
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
476
 
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
 
483
[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
 
484
 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
477
485
 
478
486
# Some tools Automake needs.
479
487
AC_REQUIRE([AM_SANITY_CHECK])dnl
480
488
AC_REQUIRE([AC_ARG_PROGRAM])dnl
481
 
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
482
 
AM_MISSING_PROG(AUTOCONF, autoconf)
483
 
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
484
 
AM_MISSING_PROG(AUTOHEADER, autoheader)
485
 
AM_MISSING_PROG(MAKEINFO, makeinfo)
 
489
AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
 
490
AM_MISSING_PROG([AUTOCONF], [autoconf])
 
491
AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
 
492
AM_MISSING_PROG([AUTOHEADER], [autoheader])
 
493
AM_MISSING_PROG([MAKEINFO], [makeinfo])
486
494
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
487
495
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
488
 
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
 
496
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
 
497
# For better backward compatibility.  To be removed once Automake 1.9.x
 
498
# dies out for good.  For more background, see:
 
499
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
 
500
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
 
501
AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
489
502
# We need awk for the "check" target.  The system "awk" is bad on
490
503
# some platforms.
491
504
AC_REQUIRE([AC_PROG_AWK])dnl
496
509
                             [_AM_PROG_TAR([v7])])])
497
510
_AM_IF_OPTION([no-dependencies],,
498
511
[AC_PROVIDE_IFELSE([AC_PROG_CC],
499
 
                  [_AM_DEPENDENCIES(CC)],
500
 
                  [define([AC_PROG_CC],
501
 
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
 
512
                  [_AM_DEPENDENCIES([CC])],
 
513
                  [m4_define([AC_PROG_CC],
 
514
                             m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
502
515
AC_PROVIDE_IFELSE([AC_PROG_CXX],
503
 
                  [_AM_DEPENDENCIES(CXX)],
504
 
                  [define([AC_PROG_CXX],
505
 
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
 
516
                  [_AM_DEPENDENCIES([CXX])],
 
517
                  [m4_define([AC_PROG_CXX],
 
518
                             m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
506
519
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
507
 
                  [_AM_DEPENDENCIES(OBJC)],
508
 
                  [define([AC_PROG_OBJC],
509
 
                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
 
520
                  [_AM_DEPENDENCIES([OBJC])],
 
521
                  [m4_define([AC_PROG_OBJC],
 
522
                             m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
 
523
AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
 
524
                  [_AM_DEPENDENCIES([OBJCXX])],
 
525
                  [m4_define([AC_PROG_OBJCXX],
 
526
                             m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
510
527
])
511
 
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
512
 
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
513
 
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
514
 
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
 
528
AC_REQUIRE([AM_SILENT_RULES])dnl
 
529
dnl The testsuite driver may need to know about EXEEXT, so add the
 
530
dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
 
531
dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
515
532
AC_CONFIG_COMMANDS_PRE(dnl
516
533
[m4_provide_if([_AM_COMPILER_EXEEXT],
517
534
  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
518
 
])
519
 
 
520
 
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
 
535
 
 
536
# POSIX will say in a future version that running "rm -f" with no argument
 
537
# is OK; and we want to be able to make that assumption in our Makefile
 
538
# recipes.  So use an aggressive probe to check that the usage we want is
 
539
# actually supported "in the wild" to an acceptable degree.
 
540
# See automake bug#10828.
 
541
# To make any issue more visible, cause the running configure to be aborted
 
542
# by default if the 'rm' program in use doesn't match our expectations; the
 
543
# user can still override this though.
 
544
if rm -f && rm -fr && rm -rf; then : OK; else
 
545
  cat >&2 <<'END'
 
546
Oops!
 
547
 
 
548
Your 'rm' program seems unable to run without file operands specified
 
549
on the command line, even when the '-f' option is present.  This is contrary
 
550
to the behaviour of most rm programs out there, and not conforming with
 
551
the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
 
552
 
 
553
Please tell bug-automake@gnu.org about your system, including the value
 
554
of your $PATH and any error possibly output before this message.  This
 
555
can help us improve future automake versions.
 
556
 
 
557
END
 
558
  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
 
559
    echo 'Configuration will proceed anyway, since you have set the' >&2
 
560
    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
 
561
    echo >&2
 
562
  else
 
563
    cat >&2 <<'END'
 
564
Aborting the configuration process, to ensure you take notice of the issue.
 
565
 
 
566
You can download and install GNU coreutils to get an 'rm' implementation
 
567
that behaves properly: <http://www.gnu.org/software/coreutils/>.
 
568
 
 
569
If you want to complete the configuration process using your problematic
 
570
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
 
571
to "yes", and re-run configure.
 
572
 
 
573
END
 
574
    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
 
575
  fi
 
576
fi])
 
577
 
 
578
dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
521
579
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
522
580
dnl mangled by Autoconf and run in a shell conditional statement.
523
581
m4_define([_AC_COMPILER_EXEEXT],
524
582
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
525
583
 
526
 
 
527
584
# When config.status generates a header, we must update the stamp-h file.
528
585
# This file resides in the same directory as the config header
529
586
# that is generated.  The stamp files are numbered to have different names.
545
602
done
546
603
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
547
604
 
548
 
# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
 
605
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
549
606
#
550
607
# This file is free software; the Free Software Foundation
551
608
# gives unlimited permission to copy and/or distribute it,
564
621
    install_sh="\${SHELL} $am_aux_dir/install-sh"
565
622
  esac
566
623
fi
567
 
AC_SUBST(install_sh)])
 
624
AC_SUBST([install_sh])])
568
625
 
569
 
# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
 
626
# Copyright (C) 2003-2013 Free Software Foundation, Inc.
570
627
#
571
628
# This file is free software; the Free Software Foundation
572
629
# gives unlimited permission to copy and/or distribute it,
573
630
# with or without modifications, as long as this notice is preserved.
574
631
 
575
 
# serial 2
576
 
 
577
632
# Check whether the underlying file-system supports filenames
578
633
# with a leading dot.  For instance MS-DOS doesn't.
579
634
AC_DEFUN([AM_SET_LEADING_DOT],
587
642
rmdir .tst 2>/dev/null
588
643
AC_SUBST([am__leading_dot])])
589
644
 
590
 
# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
591
 
# From Jim Meyering
592
 
 
593
 
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
594
 
# Free Software Foundation, Inc.
595
 
#
596
 
# This file is free software; the Free Software Foundation
597
 
# gives unlimited permission to copy and/or distribute it,
598
 
# with or without modifications, as long as this notice is preserved.
599
 
 
600
 
# serial 5
601
 
 
602
 
# AM_MAINTAINER_MODE([DEFAULT-MODE])
603
 
# ----------------------------------
604
 
# Control maintainer-specific portions of Makefiles.
605
 
# Default is to disable them, unless `enable' is passed literally.
606
 
# For symmetry, `disable' may be passed as well.  Anyway, the user
607
 
# can override the default with the --enable/--disable switch.
608
 
AC_DEFUN([AM_MAINTAINER_MODE],
609
 
[m4_case(m4_default([$1], [disable]),
610
 
       [enable], [m4_define([am_maintainer_other], [disable])],
611
 
       [disable], [m4_define([am_maintainer_other], [enable])],
612
 
       [m4_define([am_maintainer_other], [enable])
613
 
        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
614
 
AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
615
 
  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
616
 
  AC_ARG_ENABLE([maintainer-mode],
617
 
[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
618
 
                          (and sometimes confusing) to the casual installer],
619
 
      [USE_MAINTAINER_MODE=$enableval],
620
 
      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
621
 
  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
622
 
  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
623
 
  MAINT=$MAINTAINER_MODE_TRUE
624
 
  AC_SUBST([MAINT])dnl
625
 
]
626
 
)
627
 
 
628
 
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
629
 
 
630
645
# Check to see how 'make' treats includes.                  -*- Autoconf -*-
631
646
 
632
 
# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
 
647
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
633
648
#
634
649
# This file is free software; the Free Software Foundation
635
650
# gives unlimited permission to copy and/or distribute it,
636
651
# with or without modifications, as long as this notice is preserved.
637
652
 
638
 
# serial 4
639
 
 
640
653
# AM_MAKE_INCLUDE()
641
654
# -----------------
642
655
# Check to see how make treats includes.
654
667
_am_result=none
655
668
# First try GNU make style include.
656
669
echo "include confinc" > confmf
657
 
# Ignore all kinds of additional output from `make'.
 
670
# Ignore all kinds of additional output from 'make'.
658
671
case `$am_make -s -f confmf 2> /dev/null` in #(
659
672
*the\ am__doit\ target*)
660
673
  am__include=include
681
694
 
682
695
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
683
696
 
684
 
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
685
 
# Free Software Foundation, Inc.
 
697
# Copyright (C) 1997-2013 Free Software Foundation, Inc.
686
698
#
687
699
# This file is free software; the Free Software Foundation
688
700
# gives unlimited permission to copy and/or distribute it,
689
701
# with or without modifications, as long as this notice is preserved.
690
702
 
691
 
# serial 6
692
 
 
693
703
# AM_MISSING_PROG(NAME, PROGRAM)
694
704
# ------------------------------
695
705
AC_DEFUN([AM_MISSING_PROG],
697
707
$1=${$1-"${am_missing_run}$2"}
698
708
AC_SUBST($1)])
699
709
 
700
 
 
701
710
# AM_MISSING_HAS_RUN
702
711
# ------------------
703
 
# Define MISSING if not defined so far and test if it supports --run.
704
 
# If it does, set am_missing_run to use it, otherwise, to nothing.
 
712
# Define MISSING if not defined so far and test if it is modern enough.
 
713
# If it is, set am_missing_run to use it, otherwise, to nothing.
705
714
AC_DEFUN([AM_MISSING_HAS_RUN],
706
715
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
707
716
AC_REQUIRE_AUX_FILE([missing])dnl
714
723
  esac
715
724
fi
716
725
# Use eval to expand $SHELL
717
 
if eval "$MISSING --run true"; then
718
 
  am_missing_run="$MISSING --run "
 
726
if eval "$MISSING --is-lightweight"; then
 
727
  am_missing_run="$MISSING "
719
728
else
720
729
  am_missing_run=
721
 
  AC_MSG_WARN([`missing' script is too old or missing])
 
730
  AC_MSG_WARN(['missing' script is too old or missing])
722
731
fi
723
732
])
724
733
 
725
 
# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
726
 
#
727
 
# This file is free software; the Free Software Foundation
728
 
# gives unlimited permission to copy and/or distribute it,
729
 
# with or without modifications, as long as this notice is preserved.
730
 
 
731
 
# AM_PROG_MKDIR_P
732
 
# ---------------
733
 
# Check for `mkdir -p'.
734
 
AC_DEFUN([AM_PROG_MKDIR_P],
735
 
[AC_PREREQ([2.60])dnl
736
 
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
737
 
dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
738
 
dnl while keeping a definition of mkdir_p for backward compatibility.
739
 
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
740
 
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
741
 
dnl Makefile.ins that do not define MKDIR_P, so we do our own
742
 
dnl adjustment using top_builddir (which is defined more often than
743
 
dnl MKDIR_P).
744
 
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
745
 
case $mkdir_p in
746
 
  [[\\/$]]* | ?:[[\\/]]*) ;;
747
 
  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
748
 
esac
749
 
])
750
 
 
751
734
# Helper functions for option handling.                     -*- Autoconf -*-
752
735
 
753
 
# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
 
736
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
754
737
#
755
738
# This file is free software; the Free Software Foundation
756
739
# gives unlimited permission to copy and/or distribute it,
757
740
# with or without modifications, as long as this notice is preserved.
758
741
 
759
 
# serial 4
760
 
 
761
742
# _AM_MANGLE_OPTION(NAME)
762
743
# -----------------------
763
744
AC_DEFUN([_AM_MANGLE_OPTION],
764
745
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
765
746
 
766
747
# _AM_SET_OPTION(NAME)
767
 
# ------------------------------
 
748
# --------------------
768
749
# Set option NAME.  Presently that only means defining a flag for this option.
769
750
AC_DEFUN([_AM_SET_OPTION],
770
 
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
 
751
[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
771
752
 
772
753
# _AM_SET_OPTIONS(OPTIONS)
773
 
# ----------------------------------
 
754
# ------------------------
774
755
# OPTIONS is a space-separated list of Automake options.
775
756
AC_DEFUN([_AM_SET_OPTIONS],
776
757
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
781
762
AC_DEFUN([_AM_IF_OPTION],
782
763
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
783
764
 
 
765
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
 
766
#
 
767
# This file is free software; the Free Software Foundation
 
768
# gives unlimited permission to copy and/or distribute it,
 
769
# with or without modifications, as long as this notice is preserved.
 
770
 
 
771
# _AM_PROG_CC_C_O
 
772
# ---------------
 
773
# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
 
774
# to automatically call this.
 
775
AC_DEFUN([_AM_PROG_CC_C_O],
 
776
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
777
AC_REQUIRE_AUX_FILE([compile])dnl
 
778
AC_LANG_PUSH([C])dnl
 
779
AC_CACHE_CHECK(
 
780
  [whether $CC understands -c and -o together],
 
781
  [am_cv_prog_cc_c_o],
 
782
  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
 
783
  # Make sure it works both with $CC and with simple cc.
 
784
  # Following AC_PROG_CC_C_O, we do the test twice because some
 
785
  # compilers refuse to overwrite an existing .o file with -o,
 
786
  # though they will create one.
 
787
  am_cv_prog_cc_c_o=yes
 
788
  for am_i in 1 2; do
 
789
    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
 
790
         && test -f conftest2.$ac_objext; then
 
791
      : OK
 
792
    else
 
793
      am_cv_prog_cc_c_o=no
 
794
      break
 
795
    fi
 
796
  done
 
797
  rm -f core conftest*
 
798
  unset am_i])
 
799
if test "$am_cv_prog_cc_c_o" != yes; then
 
800
   # Losing compiler, so override with the script.
 
801
   # FIXME: It is wrong to rewrite CC.
 
802
   # But if we don't then we get into trouble of one sort or another.
 
803
   # A longer-term fix would be to have automake use am__CC in this case,
 
804
   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
 
805
   CC="$am_aux_dir/compile $CC"
 
806
fi
 
807
AC_LANG_POP([C])])
 
808
 
 
809
# For backward compatibility.
 
810
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
 
811
 
 
812
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
 
813
#
 
814
# This file is free software; the Free Software Foundation
 
815
# gives unlimited permission to copy and/or distribute it,
 
816
# with or without modifications, as long as this notice is preserved.
 
817
 
 
818
# AM_RUN_LOG(COMMAND)
 
819
# -------------------
 
820
# Run COMMAND, save the exit status in ac_status, and log it.
 
821
# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
 
822
AC_DEFUN([AM_RUN_LOG],
 
823
[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
 
824
   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
 
825
   ac_status=$?
 
826
   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 
827
   (exit $ac_status); }])
 
828
 
784
829
# Check to make sure that the build environment is sane.    -*- Autoconf -*-
785
830
 
786
 
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
787
 
# Free Software Foundation, Inc.
 
831
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
788
832
#
789
833
# This file is free software; the Free Software Foundation
790
834
# gives unlimited permission to copy and/or distribute it,
791
835
# with or without modifications, as long as this notice is preserved.
792
836
 
793
 
# serial 5
794
 
 
795
837
# AM_SANITY_CHECK
796
838
# ---------------
797
839
AC_DEFUN([AM_SANITY_CHECK],
798
840
[AC_MSG_CHECKING([whether build environment is sane])
799
 
# Just in case
800
 
sleep 1
801
 
echo timestamp > conftest.file
802
841
# Reject unsafe characters in $srcdir or the absolute working directory
803
842
# name.  Accept space and tab only in the latter.
804
843
am_lf='
809
848
esac
810
849
case $srcdir in
811
850
  *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
812
 
    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
 
851
    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
813
852
esac
814
853
 
815
 
# Do `set' in a subshell so we don't clobber the current shell's
 
854
# Do 'set' in a subshell so we don't clobber the current shell's
816
855
# arguments.  Must try -L first in case configure is actually a
817
856
# symlink; some systems play weird games with the mod time of symlinks
818
857
# (eg FreeBSD returns the mod time of the symlink's containing
819
858
# directory).
820
859
if (
821
 
   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
822
 
   if test "$[*]" = "X"; then
823
 
      # -L didn't work.
824
 
      set X `ls -t "$srcdir/configure" conftest.file`
825
 
   fi
826
 
   rm -f conftest.file
827
 
   if test "$[*]" != "X $srcdir/configure conftest.file" \
828
 
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
829
 
 
830
 
      # If neither matched, then we have a broken ls.  This can happen
831
 
      # if, for instance, CONFIG_SHELL is bash and it inherits a
832
 
      # broken ls alias from the environment.  This has actually
833
 
      # happened.  Such a system could not be considered "sane".
834
 
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
835
 
alias in your environment])
836
 
   fi
837
 
 
 
860
   am_has_slept=no
 
861
   for am_try in 1 2; do
 
862
     echo "timestamp, slept: $am_has_slept" > conftest.file
 
863
     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
 
864
     if test "$[*]" = "X"; then
 
865
        # -L didn't work.
 
866
        set X `ls -t "$srcdir/configure" conftest.file`
 
867
     fi
 
868
     if test "$[*]" != "X $srcdir/configure conftest.file" \
 
869
        && test "$[*]" != "X conftest.file $srcdir/configure"; then
 
870
 
 
871
        # If neither matched, then we have a broken ls.  This can happen
 
872
        # if, for instance, CONFIG_SHELL is bash and it inherits a
 
873
        # broken ls alias from the environment.  This has actually
 
874
        # happened.  Such a system could not be considered "sane".
 
875
        AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
 
876
  alias in your environment])
 
877
     fi
 
878
     if test "$[2]" = conftest.file || test $am_try -eq 2; then
 
879
       break
 
880
     fi
 
881
     # Just in case.
 
882
     sleep 1
 
883
     am_has_slept=yes
 
884
   done
838
885
   test "$[2]" = conftest.file
839
886
   )
840
887
then
844
891
   AC_MSG_ERROR([newly created file is older than distributed files!
845
892
Check your system clock])
846
893
fi
847
 
AC_MSG_RESULT(yes)])
 
894
AC_MSG_RESULT([yes])
 
895
# If we didn't sleep, we still need to ensure time stamps of config.status and
 
896
# generated files are strictly newer.
 
897
am_sleep_pid=
 
898
if grep 'slept: no' conftest.file >/dev/null 2>&1; then
 
899
  ( sleep 1 ) &
 
900
  am_sleep_pid=$!
 
901
fi
 
902
AC_CONFIG_COMMANDS_PRE(
 
903
  [AC_MSG_CHECKING([that generated files are newer than configure])
 
904
   if test -n "$am_sleep_pid"; then
 
905
     # Hide warnings about reused PIDs.
 
906
     wait $am_sleep_pid 2>/dev/null
 
907
   fi
 
908
   AC_MSG_RESULT([done])])
 
909
rm -f conftest.file
 
910
])
848
911
 
849
 
# Copyright (C) 2009  Free Software Foundation, Inc.
 
912
# Copyright (C) 2009-2013 Free Software Foundation, Inc.
850
913
#
851
914
# This file is free software; the Free Software Foundation
852
915
# gives unlimited permission to copy and/or distribute it,
853
916
# with or without modifications, as long as this notice is preserved.
854
917
 
855
 
# serial 1
856
 
 
857
918
# AM_SILENT_RULES([DEFAULT])
858
919
# --------------------------
859
920
# Enable less verbose build rules; with the default set to DEFAULT
860
 
# (`yes' being less verbose, `no' or empty being verbose).
 
921
# ("yes" being less verbose, "no" or empty being verbose).
861
922
AC_DEFUN([AM_SILENT_RULES],
862
 
[AC_ARG_ENABLE([silent-rules],
863
 
[  --enable-silent-rules          less verbose build output (undo: `make V=1')
864
 
  --disable-silent-rules         verbose build output (undo: `make V=0')])
865
 
case $enable_silent_rules in
866
 
yes) AM_DEFAULT_VERBOSITY=0;;
867
 
no)  AM_DEFAULT_VERBOSITY=1;;
868
 
*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
 
923
[AC_ARG_ENABLE([silent-rules], [dnl
 
924
AS_HELP_STRING(
 
925
  [--enable-silent-rules],
 
926
  [less verbose build output (undo: "make V=1")])
 
927
AS_HELP_STRING(
 
928
  [--disable-silent-rules],
 
929
  [verbose build output (undo: "make V=0")])dnl
 
930
])
 
931
case $enable_silent_rules in @%:@ (((
 
932
  yes) AM_DEFAULT_VERBOSITY=0;;
 
933
   no) AM_DEFAULT_VERBOSITY=1;;
 
934
    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
869
935
esac
 
936
dnl
 
937
dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
 
938
dnl do not support nested variable expansions.
 
939
dnl See automake bug#9928 and bug#10237.
 
940
am_make=${MAKE-make}
 
941
AC_CACHE_CHECK([whether $am_make supports nested variables],
 
942
   [am_cv_make_support_nested_variables],
 
943
   [if AS_ECHO([['TRUE=$(BAR$(V))
 
944
BAR0=false
 
945
BAR1=true
 
946
V=1
 
947
am__doit:
 
948
        @$(TRUE)
 
949
.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
 
950
  am_cv_make_support_nested_variables=yes
 
951
else
 
952
  am_cv_make_support_nested_variables=no
 
953
fi])
 
954
if test $am_cv_make_support_nested_variables = yes; then
 
955
  dnl Using '$V' instead of '$(V)' breaks IRIX make.
 
956
  AM_V='$(V)'
 
957
  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
 
958
else
 
959
  AM_V=$AM_DEFAULT_VERBOSITY
 
960
  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
 
961
fi
 
962
AC_SUBST([AM_V])dnl
 
963
AM_SUBST_NOTMAKE([AM_V])dnl
 
964
AC_SUBST([AM_DEFAULT_V])dnl
 
965
AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
870
966
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
871
967
AM_BACKSLASH='\'
872
968
AC_SUBST([AM_BACKSLASH])dnl
873
969
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
874
970
])
875
971
 
876
 
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
972
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
877
973
#
878
974
# This file is free software; the Free Software Foundation
879
975
# gives unlimited permission to copy and/or distribute it,
881
977
 
882
978
# AM_PROG_INSTALL_STRIP
883
979
# ---------------------
884
 
# One issue with vendor `install' (even GNU) is that you can't
 
980
# One issue with vendor 'install' (even GNU) is that you can't
885
981
# specify the program used to strip binaries.  This is especially
886
982
# annoying in cross-compiling environments, where the build's strip
887
983
# is unlikely to handle the host's binaries.
888
984
# Fortunately install-sh will honor a STRIPPROG variable, so we
889
 
# always use install-sh in `make install-strip', and initialize
 
985
# always use install-sh in "make install-strip", and initialize
890
986
# STRIPPROG with the value of the STRIP variable (set by the user).
891
987
AC_DEFUN([AM_PROG_INSTALL_STRIP],
892
988
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
893
 
# Installed binaries are usually stripped using `strip' when the user
894
 
# run `make install-strip'.  However `strip' might not be the right
 
989
# Installed binaries are usually stripped using 'strip' when the user
 
990
# run "make install-strip".  However 'strip' might not be the right
895
991
# tool to use in cross-compilation environments, therefore Automake
896
 
# will honor the `STRIP' environment variable to overrule this program.
897
 
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
 
992
# will honor the 'STRIP' environment variable to overrule this program.
 
993
dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
898
994
if test "$cross_compiling" != no; then
899
995
  AC_CHECK_TOOL([STRIP], [strip], :)
900
996
fi
901
997
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
902
998
AC_SUBST([INSTALL_STRIP_PROGRAM])])
903
999
 
904
 
# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
 
1000
# Copyright (C) 2006-2013 Free Software Foundation, Inc.
905
1001
#
906
1002
# This file is free software; the Free Software Foundation
907
1003
# gives unlimited permission to copy and/or distribute it,
908
1004
# with or without modifications, as long as this notice is preserved.
909
1005
 
910
 
# serial 2
911
 
 
912
1006
# _AM_SUBST_NOTMAKE(VARIABLE)
913
1007
# ---------------------------
914
1008
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
916
1010
AC_DEFUN([_AM_SUBST_NOTMAKE])
917
1011
 
918
1012
# AM_SUBST_NOTMAKE(VARIABLE)
919
 
# ---------------------------
 
1013
# --------------------------
920
1014
# Public sister of _AM_SUBST_NOTMAKE.
921
1015
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
922
1016
 
923
1017
# Check how to create a tarball.                            -*- Autoconf -*-
924
1018
 
925
 
# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
 
1019
# Copyright (C) 2004-2013 Free Software Foundation, Inc.
926
1020
#
927
1021
# This file is free software; the Free Software Foundation
928
1022
# gives unlimited permission to copy and/or distribute it,
929
1023
# with or without modifications, as long as this notice is preserved.
930
1024
 
931
 
# serial 2
932
 
 
933
1025
# _AM_PROG_TAR(FORMAT)
934
1026
# --------------------
935
1027
# Check how to create a tarball in format FORMAT.
936
 
# FORMAT should be one of `v7', `ustar', or `pax'.
 
1028
# FORMAT should be one of 'v7', 'ustar', or 'pax'.
937
1029
#
938
1030
# Substitute a variable $(am__tar) that is a command
939
1031
# writing to stdout a FORMAT-tarball containing the directory
943
1035
# Substitute a variable $(am__untar) that extract such
944
1036
# a tarball read from stdin.
945
1037
#     $(am__untar) < result.tar
 
1038
#
946
1039
AC_DEFUN([_AM_PROG_TAR],
947
 
[# Always define AMTAR for backward compatibility.
948
 
AM_MISSING_PROG([AMTAR], [tar])
 
1040
[# Always define AMTAR for backward compatibility.  Yes, it's still used
 
1041
# in the wild :-(  We should find a proper way to deprecate it ...
 
1042
AC_SUBST([AMTAR], ['$${TAR-tar}'])
 
1043
 
 
1044
# We'll loop over all known methods to create a tar archive until one works.
 
1045
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
 
1046
 
949
1047
m4_if([$1], [v7],
950
 
     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
951
 
     [m4_case([$1], [ustar],, [pax],,
952
 
              [m4_fatal([Unknown tar format])])
953
 
AC_MSG_CHECKING([how to create a $1 tar archive])
954
 
# Loop over all known methods to create a tar archive until one works.
955
 
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
956
 
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
957
 
# Do not fold the above two line into one, because Tru64 sh and
958
 
# Solaris sh will not grok spaces in the rhs of `-'.
959
 
for _am_tool in $_am_tools
960
 
do
961
 
  case $_am_tool in
962
 
  gnutar)
963
 
    for _am_tar in tar gnutar gtar;
964
 
    do
965
 
      AM_RUN_LOG([$_am_tar --version]) && break
966
 
    done
967
 
    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
968
 
    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
969
 
    am__untar="$_am_tar -xf -"
970
 
    ;;
971
 
  plaintar)
972
 
    # Must skip GNU tar: if it does not support --format= it doesn't create
973
 
    # ustar tarball either.
974
 
    (tar --version) >/dev/null 2>&1 && continue
975
 
    am__tar='tar chf - "$$tardir"'
976
 
    am__tar_='tar chf - "$tardir"'
977
 
    am__untar='tar xf -'
978
 
    ;;
979
 
  pax)
980
 
    am__tar='pax -L -x $1 -w "$$tardir"'
981
 
    am__tar_='pax -L -x $1 -w "$tardir"'
982
 
    am__untar='pax -r'
983
 
    ;;
984
 
  cpio)
985
 
    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
986
 
    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
987
 
    am__untar='cpio -i -H $1 -d'
988
 
    ;;
989
 
  none)
990
 
    am__tar=false
991
 
    am__tar_=false
992
 
    am__untar=false
993
 
    ;;
994
 
  esac
995
 
 
996
 
  # If the value was cached, stop now.  We just wanted to have am__tar
997
 
  # and am__untar set.
998
 
  test -n "${am_cv_prog_tar_$1}" && break
999
 
 
1000
 
  # tar/untar a dummy directory, and stop if the command works
1001
 
  rm -rf conftest.dir
1002
 
  mkdir conftest.dir
1003
 
  echo GrepMe > conftest.dir/file
1004
 
  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1005
 
  rm -rf conftest.dir
1006
 
  if test -s conftest.tar; then
1007
 
    AM_RUN_LOG([$am__untar <conftest.tar])
1008
 
    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1009
 
  fi
1010
 
done
1011
 
rm -rf conftest.dir
1012
 
 
1013
 
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1014
 
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
 
1048
  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
 
1049
 
 
1050
  [m4_case([$1],
 
1051
    [ustar],
 
1052
     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
 
1053
      # There is notably a 21 bits limit for the UID and the GID.  In fact,
 
1054
      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
 
1055
      # and bug#13588).
 
1056
      am_max_uid=2097151 # 2^21 - 1
 
1057
      am_max_gid=$am_max_uid
 
1058
      # The $UID and $GID variables are not portable, so we need to resort
 
1059
      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
 
1060
      # below are definitely unexpected, so allow the users to see them
 
1061
      # (that is, avoid stderr redirection).
 
1062
      am_uid=`id -u || echo unknown`
 
1063
      am_gid=`id -g || echo unknown`
 
1064
      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
 
1065
      if test $am_uid -le $am_max_uid; then
 
1066
         AC_MSG_RESULT([yes])
 
1067
      else
 
1068
         AC_MSG_RESULT([no])
 
1069
         _am_tools=none
 
1070
      fi
 
1071
      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
 
1072
      if test $am_gid -le $am_max_gid; then
 
1073
         AC_MSG_RESULT([yes])
 
1074
      else
 
1075
        AC_MSG_RESULT([no])
 
1076
        _am_tools=none
 
1077
      fi],
 
1078
 
 
1079
  [pax],
 
1080
    [],
 
1081
 
 
1082
  [m4_fatal([Unknown tar format])])
 
1083
 
 
1084
  AC_MSG_CHECKING([how to create a $1 tar archive])
 
1085
 
 
1086
  # Go ahead even if we have the value already cached.  We do so because we
 
1087
  # need to set the values for the 'am__tar' and 'am__untar' variables.
 
1088
  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
 
1089
 
 
1090
  for _am_tool in $_am_tools; do
 
1091
    case $_am_tool in
 
1092
    gnutar)
 
1093
      for _am_tar in tar gnutar gtar; do
 
1094
        AM_RUN_LOG([$_am_tar --version]) && break
 
1095
      done
 
1096
      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
 
1097
      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
 
1098
      am__untar="$_am_tar -xf -"
 
1099
      ;;
 
1100
    plaintar)
 
1101
      # Must skip GNU tar: if it does not support --format= it doesn't create
 
1102
      # ustar tarball either.
 
1103
      (tar --version) >/dev/null 2>&1 && continue
 
1104
      am__tar='tar chf - "$$tardir"'
 
1105
      am__tar_='tar chf - "$tardir"'
 
1106
      am__untar='tar xf -'
 
1107
      ;;
 
1108
    pax)
 
1109
      am__tar='pax -L -x $1 -w "$$tardir"'
 
1110
      am__tar_='pax -L -x $1 -w "$tardir"'
 
1111
      am__untar='pax -r'
 
1112
      ;;
 
1113
    cpio)
 
1114
      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
 
1115
      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
 
1116
      am__untar='cpio -i -H $1 -d'
 
1117
      ;;
 
1118
    none)
 
1119
      am__tar=false
 
1120
      am__tar_=false
 
1121
      am__untar=false
 
1122
      ;;
 
1123
    esac
 
1124
 
 
1125
    # If the value was cached, stop now.  We just wanted to have am__tar
 
1126
    # and am__untar set.
 
1127
    test -n "${am_cv_prog_tar_$1}" && break
 
1128
 
 
1129
    # tar/untar a dummy directory, and stop if the command works.
 
1130
    rm -rf conftest.dir
 
1131
    mkdir conftest.dir
 
1132
    echo GrepMe > conftest.dir/file
 
1133
    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
 
1134
    rm -rf conftest.dir
 
1135
    if test -s conftest.tar; then
 
1136
      AM_RUN_LOG([$am__untar <conftest.tar])
 
1137
      AM_RUN_LOG([cat conftest.dir/file])
 
1138
      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
 
1139
    fi
 
1140
  done
 
1141
  rm -rf conftest.dir
 
1142
 
 
1143
  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
 
1144
  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
 
1145
 
1015
1146
AC_SUBST([am__tar])
1016
1147
AC_SUBST([am__untar])
1017
1148
]) # _AM_PROG_TAR
1018
1149
 
1019
 
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
1020
 
1021
 
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
1022
 
#
1023
 
# This program is free software; you can redistribute it and/or modify
1024
 
# it under the terms of the GNU General Public License as published by
1025
 
# the Free Software Foundation; either version 2 of the License, or
1026
 
# (at your option) any later version.
1027
 
#
1028
 
# This program is distributed in the hope that it will be useful, but
1029
 
# WITHOUT ANY WARRANTY; without even the implied warranty of
1030
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
1031
 
# General Public License for more details.
1032
 
#
1033
 
# You should have received a copy of the GNU General Public License
1034
 
# along with this program; if not, write to the Free Software
1035
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1036
 
#
1037
 
# As a special exception to the GNU General Public License, if you
1038
 
# distribute this file as part of a program that contains a
1039
 
# configuration script generated by Autoconf, you may include it under
1040
 
# the same distribution terms that you use for the rest of that program.
1041
 
 
1042
 
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
1043
 
# ----------------------------------
1044
 
AC_DEFUN([PKG_PROG_PKG_CONFIG],
1045
 
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
1046
 
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
1047
 
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
1048
 
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1049
 
        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1050
 
fi
1051
 
if test -n "$PKG_CONFIG"; then
1052
 
        _pkg_min_version=m4_default([$1], [0.9.0])
1053
 
        AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
1054
 
        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1055
 
                AC_MSG_RESULT([yes])
1056
 
        else
1057
 
                AC_MSG_RESULT([no])
1058
 
                PKG_CONFIG=""
1059
 
        fi
1060
 
                
1061
 
fi[]dnl
1062
 
])# PKG_PROG_PKG_CONFIG
1063
 
 
1064
 
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1065
 
#
1066
 
# Check to see whether a particular set of modules exists.  Similar
1067
 
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
1068
 
#
1069
 
#
1070
 
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
1071
 
# this or PKG_CHECK_MODULES is called, or make sure to call
1072
 
# PKG_CHECK_EXISTS manually
1073
 
# --------------------------------------------------------------
1074
 
AC_DEFUN([PKG_CHECK_EXISTS],
1075
 
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1076
 
if test -n "$PKG_CONFIG" && \
1077
 
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
1078
 
  m4_ifval([$2], [$2], [:])
1079
 
m4_ifvaln([$3], [else
1080
 
  $3])dnl
1081
 
fi])
1082
 
 
1083
 
 
1084
 
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
1085
 
# ---------------------------------------------
1086
 
m4_define([_PKG_CONFIG],
1087
 
[if test -n "$$1"; then
1088
 
    pkg_cv_[]$1="$$1"
1089
 
 elif test -n "$PKG_CONFIG"; then
1090
 
    PKG_CHECK_EXISTS([$3],
1091
 
                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
1092
 
                     [pkg_failed=yes])
1093
 
 else
1094
 
    pkg_failed=untried
1095
 
fi[]dnl
1096
 
])# _PKG_CONFIG
1097
 
 
1098
 
# _PKG_SHORT_ERRORS_SUPPORTED
1099
 
# -----------------------------
1100
 
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
1101
 
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1102
 
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1103
 
        _pkg_short_errors_supported=yes
1104
 
else
1105
 
        _pkg_short_errors_supported=no
1106
 
fi[]dnl
1107
 
])# _PKG_SHORT_ERRORS_SUPPORTED
1108
 
 
1109
 
 
1110
 
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1111
 
# [ACTION-IF-NOT-FOUND])
1112
 
#
1113
 
#
1114
 
# Note that if there is a possibility the first call to
1115
 
# PKG_CHECK_MODULES might not happen, you should be sure to include an
1116
 
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
1117
 
#
1118
 
#
1119
 
# --------------------------------------------------------------
1120
 
AC_DEFUN([PKG_CHECK_MODULES],
1121
 
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1122
 
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
1123
 
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
1124
 
 
1125
 
pkg_failed=no
1126
 
AC_MSG_CHECKING([for $1])
1127
 
 
1128
 
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1129
 
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
1130
 
 
1131
 
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
1132
 
and $1[]_LIBS to avoid the need to call pkg-config.
1133
 
See the pkg-config man page for more details.])
1134
 
 
1135
 
if test $pkg_failed = yes; then
1136
 
        _PKG_SHORT_ERRORS_SUPPORTED
1137
 
        if test $_pkg_short_errors_supported = yes; then
1138
 
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
1139
 
        else 
1140
 
                $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
1141
 
        fi
1142
 
        # Put the nasty error message in config.log where it belongs
1143
 
        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1144
 
 
1145
 
        ifelse([$4], , [AC_MSG_ERROR(dnl
1146
 
[Package requirements ($2) were not met:
1147
 
 
1148
 
$$1_PKG_ERRORS
1149
 
 
1150
 
Consider adjusting the PKG_CONFIG_PATH environment variable if you
1151
 
installed software in a non-standard prefix.
1152
 
 
1153
 
_PKG_TEXT
1154
 
])],
1155
 
                [AC_MSG_RESULT([no])
1156
 
                $4])
1157
 
elif test $pkg_failed = untried; then
1158
 
        ifelse([$4], , [AC_MSG_FAILURE(dnl
1159
 
[The pkg-config script could not be found or is too old.  Make sure it
1160
 
is in your PATH or set the PKG_CONFIG environment variable to the full
1161
 
path to pkg-config.
1162
 
 
1163
 
_PKG_TEXT
1164
 
 
1165
 
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
1166
 
                [$4])
1167
 
else
1168
 
        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1169
 
        $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1170
 
        AC_MSG_RESULT([yes])
1171
 
        ifelse([$3], , :, [$3])
1172
 
fi[]dnl
1173
 
])# PKG_CHECK_MODULES
1174
 
 
1175
1150
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1176
1151
#
1177
1152
#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1178
 
#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
1179
 
#                 Inc.
 
1153
#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
 
1154
#                 Foundation, Inc.
1180
1155
#   Written by Gordon Matzigkeit, 1996
1181
1156
#
1182
1157
# This file is free software; the Free Software Foundation gives
1185
1160
 
1186
1161
m4_define([_LT_COPYING], [dnl
1187
1162
#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1188
 
#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
1189
 
#                 Inc.
 
1163
#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
 
1164
#                 Foundation, Inc.
1190
1165
#   Written by Gordon Matzigkeit, 1996
1191
1166
#
1192
1167
#   This file is part of GNU Libtool.
1320
1295
AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
1321
1296
AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
1322
1297
 
 
1298
_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
 
1299
dnl
1323
1300
_LT_DECL([], [host_alias], [0], [The host system])dnl
1324
1301
_LT_DECL([], [host], [0])dnl
1325
1302
_LT_DECL([], [host_os], [0])dnl
1805
1782
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1806
1783
configured by $[0], generated by m4_PACKAGE_STRING.
1807
1784
 
1808
 
Copyright (C) 2010 Free Software Foundation, Inc.
 
1785
Copyright (C) 2011 Free Software Foundation, Inc.
1809
1786
This config.lt script is free software; the Free Software Foundation
1810
1787
gives unlimited permision to copy, distribute and modify it."
1811
1788
 
1969
1946
m4_case([$1],
1970
1947
  [C],                  [_LT_LANG(C)],
1971
1948
  [C++],                [_LT_LANG(CXX)],
 
1949
  [Go],                 [_LT_LANG(GO)],
1972
1950
  [Java],               [_LT_LANG(GCJ)],
1973
1951
  [Fortran 77],         [_LT_LANG(F77)],
1974
1952
  [Fortran],            [_LT_LANG(FC)],
1990
1968
])# _LT_LANG
1991
1969
 
1992
1970
 
 
1971
m4_ifndef([AC_PROG_GO], [
 
1972
# NOTE: This macro has been submitted for inclusion into   #
 
1973
#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
 
1974
#  a released version of Autoconf we should remove this    #
 
1975
#  macro and use it instead.                               #
 
1976
m4_defun([AC_PROG_GO],
 
1977
[AC_LANG_PUSH(Go)dnl
 
1978
AC_ARG_VAR([GOC],     [Go compiler command])dnl
 
1979
AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
 
1980
_AC_ARG_VAR_LDFLAGS()dnl
 
1981
AC_CHECK_TOOL(GOC, gccgo)
 
1982
if test -z "$GOC"; then
 
1983
  if test -n "$ac_tool_prefix"; then
 
1984
    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
 
1985
  fi
 
1986
fi
 
1987
if test -z "$GOC"; then
 
1988
  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
 
1989
fi
 
1990
])#m4_defun
 
1991
])#m4_ifndef
 
1992
 
 
1993
 
1993
1994
# _LT_LANG_DEFAULT_CONFIG
1994
1995
# -----------------------
1995
1996
m4_defun([_LT_LANG_DEFAULT_CONFIG],
2020
2021
       m4_ifdef([LT_PROG_GCJ],
2021
2022
        [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
2022
2023
 
 
2024
AC_PROVIDE_IFELSE([AC_PROG_GO],
 
2025
  [LT_LANG(GO)],
 
2026
  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
 
2027
 
2023
2028
AC_PROVIDE_IFELSE([LT_PROG_RC],
2024
2029
  [LT_LANG(RC)],
2025
2030
  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
2122
2127
        $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2123
2128
          -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
2124
2129
        _lt_result=$?
2125
 
        if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
 
2130
        # If there is a non-empty error log, and "single_module"
 
2131
        # appears in it, assume the flag caused a linker warning
 
2132
        if test -s conftest.err && $GREP single_module conftest.err; then
 
2133
          cat conftest.err >&AS_MESSAGE_LOG_FD
 
2134
        # Otherwise, if the output was created with a 0 exit code from
 
2135
        # the compiler, it worked.
 
2136
        elif test -f libconftest.dylib && test $_lt_result -eq 0; then
2126
2137
          lt_cv_apple_cc_single_mod=yes
2127
2138
        else
2128
2139
          cat conftest.err >&AS_MESSAGE_LOG_FD
2130
2141
        rm -rf libconftest.dylib*
2131
2142
        rm -f conftest.*
2132
2143
      fi])
 
2144
 
2133
2145
    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
2134
2146
      [lt_cv_ld_exported_symbols_list],
2135
2147
      [lt_cv_ld_exported_symbols_list=no
2141
2153
        [lt_cv_ld_exported_symbols_list=no])
2142
2154
        LDFLAGS="$save_LDFLAGS"
2143
2155
    ])
 
2156
 
2144
2157
    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
2145
2158
      [lt_cv_ld_force_load=no
2146
2159
      cat > conftest.c << _LT_EOF
2158
2171
      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
2159
2172
      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
2160
2173
      _lt_result=$?
2161
 
      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
 
2174
      if test -s conftest.err && $GREP force_load conftest.err; then
 
2175
        cat conftest.err >&AS_MESSAGE_LOG_FD
 
2176
      elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
2162
2177
        lt_cv_ld_force_load=yes
2163
2178
      else
2164
2179
        cat conftest.err >&AS_MESSAGE_LOG_FD
2203
2218
])
2204
2219
 
2205
2220
 
2206
 
# _LT_DARWIN_LINKER_FEATURES
2207
 
# --------------------------
 
2221
# _LT_DARWIN_LINKER_FEATURES([TAG])
 
2222
# ---------------------------------
2208
2223
# Checks for linker and compiler features on darwin
2209
2224
m4_defun([_LT_DARWIN_LINKER_FEATURES],
2210
2225
[
2215
2230
  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2216
2231
  if test "$lt_cv_ld_force_load" = "yes"; then
2217
2232
    _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
 
2233
    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
 
2234
                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
2218
2235
  else
2219
2236
    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
2220
2237
  fi
2498
2515
    CFLAGS="$SAVE_CFLAGS"
2499
2516
  fi
2500
2517
  ;;
2501
 
sparc*-*solaris*)
 
2518
*-*solaris*)
2502
2519
  # Find out which ABI we are using.
2503
2520
  echo 'int i;' > conftest.$ac_ext
2504
2521
  if AC_TRY_EVAL(ac_compile); then
2505
2522
    case `/usr/bin/file conftest.o` in
2506
2523
    *64-bit*)
2507
2524
      case $lt_cv_prog_gnu_ld in
2508
 
      yes*) LD="${LD-ld} -m elf64_sparc" ;;
 
2525
      yes*)
 
2526
        case $host in
 
2527
        i?86-*-solaris*)
 
2528
          LD="${LD-ld} -m elf_x86_64"
 
2529
          ;;
 
2530
        sparc*-*-solaris*)
 
2531
          LD="${LD-ld} -m elf64_sparc"
 
2532
          ;;
 
2533
        esac
 
2534
        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
 
2535
        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
 
2536
          LD="${LD-ld}_sol2"
 
2537
        fi
 
2538
        ;;
2509
2539
      *)
2510
2540
        if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2511
2541
          LD="${LD-ld} -64"
2582
2612
if test -n "$RANLIB"; then
2583
2613
  case $host_os in
2584
2614
  openbsd*)
2585
 
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
 
2615
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
2586
2616
    ;;
2587
2617
  *)
2588
 
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
 
2618
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
2589
2619
    ;;
2590
2620
  esac
2591
 
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
 
2621
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
2592
2622
fi
2593
2623
 
2594
2624
case $host_os in
2768
2798
    lt_cv_sys_max_cmd_len=196608
2769
2799
    ;;
2770
2800
 
 
2801
  os2*)
 
2802
    # The test takes a long time on OS/2.
 
2803
    lt_cv_sys_max_cmd_len=8192
 
2804
    ;;
 
2805
 
2771
2806
  osf*)
2772
2807
    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2773
2808
    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2807
2842
      # If test is not a shell built-in, we'll probably end up computing a
2808
2843
      # maximum length that is only half of the actual maximum length, but
2809
2844
      # we can't tell.
2810
 
      while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
 
2845
      while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
2811
2846
                 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
2812
2847
              test $i != 17 # 1/2 MB should be enough
2813
2848
      do
3353
3388
 
3354
3389
case $host_os in
3355
3390
aix3*)
3356
 
  version_type=linux
 
3391
  version_type=linux # correct to gnu/linux during the next big refactor
3357
3392
  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
3358
3393
  shlibpath_var=LIBPATH
3359
3394
 
3362
3397
  ;;
3363
3398
 
3364
3399
aix[[4-9]]*)
3365
 
  version_type=linux
 
3400
  version_type=linux # correct to gnu/linux during the next big refactor
3366
3401
  need_lib_prefix=no
3367
3402
  need_version=no
3368
3403
  hardcode_into_libs=yes
3427
3462
  ;;
3428
3463
 
3429
3464
bsdi[[45]]*)
3430
 
  version_type=linux
 
3465
  version_type=linux # correct to gnu/linux during the next big refactor
3431
3466
  need_version=no
3432
3467
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3433
3468
  soname_spec='${libname}${release}${shared_ext}$major'
3566
3601
  ;;
3567
3602
 
3568
3603
dgux*)
3569
 
  version_type=linux
 
3604
  version_type=linux # correct to gnu/linux during the next big refactor
3570
3605
  need_lib_prefix=no
3571
3606
  need_version=no
3572
3607
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3574
3609
  shlibpath_var=LD_LIBRARY_PATH
3575
3610
  ;;
3576
3611
 
3577
 
freebsd1*)
3578
 
  dynamic_linker=no
3579
 
  ;;
3580
 
 
3581
3612
freebsd* | dragonfly*)
3582
3613
  # DragonFly does not have aout.  When/if they implement a new
3583
3614
  # versioning mechanism, adjust this.
3585
3616
    objformat=`/usr/bin/objformat`
3586
3617
  else
3587
3618
    case $host_os in
3588
 
    freebsd[[123]]*) objformat=aout ;;
 
3619
    freebsd[[23]].*) objformat=aout ;;
3589
3620
    *) objformat=elf ;;
3590
3621
    esac
3591
3622
  fi
3603
3634
  esac
3604
3635
  shlibpath_var=LD_LIBRARY_PATH
3605
3636
  case $host_os in
3606
 
  freebsd2*)
 
3637
  freebsd2.*)
3607
3638
    shlibpath_overrides_runpath=yes
3608
3639
    ;;
3609
3640
  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3623
3654
  ;;
3624
3655
 
3625
3656
gnu*)
3626
 
  version_type=linux
 
3657
  version_type=linux # correct to gnu/linux during the next big refactor
3627
3658
  need_lib_prefix=no
3628
3659
  need_version=no
3629
3660
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3630
3661
  soname_spec='${libname}${release}${shared_ext}$major'
3631
3662
  shlibpath_var=LD_LIBRARY_PATH
 
3663
  shlibpath_overrides_runpath=no
3632
3664
  hardcode_into_libs=yes
3633
3665
  ;;
3634
3666
 
3635
3667
haiku*)
3636
 
  version_type=linux
 
3668
  version_type=linux # correct to gnu/linux during the next big refactor
3637
3669
  need_lib_prefix=no
3638
3670
  need_version=no
3639
3671
  dynamic_linker="$host_os runtime_loader"
3694
3726
  ;;
3695
3727
 
3696
3728
interix[[3-9]]*)
3697
 
  version_type=linux
 
3729
  version_type=linux # correct to gnu/linux during the next big refactor
3698
3730
  need_lib_prefix=no
3699
3731
  need_version=no
3700
3732
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3710
3742
    nonstopux*) version_type=nonstopux ;;
3711
3743
    *)
3712
3744
        if test "$lt_cv_prog_gnu_ld" = yes; then
3713
 
                version_type=linux
 
3745
                version_type=linux # correct to gnu/linux during the next big refactor
3714
3746
        else
3715
3747
                version_type=irix
3716
3748
        fi ;;
3747
3779
  dynamic_linker=no
3748
3780
  ;;
3749
3781
 
3750
 
# This must be Linux ELF.
 
3782
# This must be glibc/ELF.
3751
3783
linux* | k*bsd*-gnu | kopensolaris*-gnu)
3752
 
  version_type=linux
 
3784
  version_type=linux # correct to gnu/linux during the next big refactor
3753
3785
  need_lib_prefix=no
3754
3786
  need_version=no
3755
3787
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3812
3844
  ;;
3813
3845
 
3814
3846
newsos6)
3815
 
  version_type=linux
 
3847
  version_type=linux # correct to gnu/linux during the next big refactor
3816
3848
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3817
3849
  shlibpath_var=LD_LIBRARY_PATH
3818
3850
  shlibpath_overrides_runpath=yes
3881
3913
  ;;
3882
3914
 
3883
3915
solaris*)
3884
 
  version_type=linux
 
3916
  version_type=linux # correct to gnu/linux during the next big refactor
3885
3917
  need_lib_prefix=no
3886
3918
  need_version=no
3887
3919
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3906
3938
  ;;
3907
3939
 
3908
3940
sysv4 | sysv4.3*)
3909
 
  version_type=linux
 
3941
  version_type=linux # correct to gnu/linux during the next big refactor
3910
3942
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3911
3943
  soname_spec='${libname}${release}${shared_ext}$major'
3912
3944
  shlibpath_var=LD_LIBRARY_PATH
3930
3962
 
3931
3963
sysv4*MP*)
3932
3964
  if test -d /usr/nec ;then
3933
 
    version_type=linux
 
3965
    version_type=linux # correct to gnu/linux during the next big refactor
3934
3966
    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3935
3967
    soname_spec='$libname${shared_ext}.$major'
3936
3968
    shlibpath_var=LD_LIBRARY_PATH
3961
3993
 
3962
3994
tpf*)
3963
3995
  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
3964
 
  version_type=linux
 
3996
  version_type=linux # correct to gnu/linux during the next big refactor
3965
3997
  need_lib_prefix=no
3966
3998
  need_version=no
3967
3999
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3971
4003
  ;;
3972
4004
 
3973
4005
uts4*)
3974
 
  version_type=linux
 
4006
  version_type=linux # correct to gnu/linux during the next big refactor
3975
4007
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3976
4008
  soname_spec='${libname}${release}${shared_ext}$major'
3977
4009
  shlibpath_var=LD_LIBRARY_PATH
4393
4425
  lt_cv_deplibs_check_method=pass_all
4394
4426
  ;;
4395
4427
 
4396
 
# This must be Linux ELF.
 
4428
# This must be glibc/ELF.
4397
4429
linux* | k*bsd*-gnu | kopensolaris*-gnu)
4398
4430
  lt_cv_deplibs_check_method=pass_all
4399
4431
  ;;
4813
4845
    # which start with @ or ?.
4814
4846
    lt_cv_sys_global_symbol_pipe="$AWK ['"\
4815
4847
"     {last_section=section; section=\$ 3};"\
 
4848
"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
4816
4849
"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4817
4850
"     \$ 0!~/External *\|/{next};"\
4818
4851
"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
5397
5430
    case $cc_basename in
5398
5431
    nvcc*) # Cuda Compiler Driver 2.2
5399
5432
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
5400
 
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
 
5433
      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
 
5434
        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
 
5435
      fi
5401
5436
      ;;
5402
5437
    esac
5403
5438
  else
5489
5524
        ;;
5490
5525
      *)
5491
5526
        case `$CC -V 2>&1 | sed 5q` in
5492
 
        *Sun\ F* | *Sun*Fortran*)
 
5527
        *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
5493
5528
          # Sun Fortran 8.3 passes all unrecognized flags to the linker
5494
5529
          _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5495
5530
          _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5496
5531
          _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
5497
5532
          ;;
 
5533
        *Sun\ F* | *Sun*Fortran*)
 
5534
          _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5535
          _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5536
          _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
 
5537
          ;;
5498
5538
        *Sun\ C*)
5499
5539
          # Sun C 5.9
5500
5540
          _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5501
5541
          _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5502
5542
          _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5503
5543
          ;;
 
5544
        *Intel*\ [[CF]]*Compiler*)
 
5545
          _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5546
          _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
5547
          _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
5548
          ;;
 
5549
        *Portland\ Group*)
 
5550
          _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5551
          _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
 
5552
          _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5553
          ;;
5504
5554
        esac
5505
5555
        ;;
5506
5556
      esac
5660
5710
    ;;
5661
5711
  cygwin* | mingw* | cegcc*)
5662
5712
    case $cc_basename in
5663
 
    cl*) ;;
 
5713
    cl*)
 
5714
      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
 
5715
      ;;
5664
5716
    *)
5665
5717
      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
5666
5718
      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5685
5737
  _LT_TAGVAR(hardcode_direct, $1)=no
5686
5738
  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5687
5739
  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5688
 
  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5689
5740
  _LT_TAGVAR(hardcode_libdir_separator, $1)=
5690
5741
  _LT_TAGVAR(hardcode_minus_L, $1)=no
5691
5742
  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5936
5987
        xlf* | bgf* | bgxlf* | mpixlf*)
5937
5988
          # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5938
5989
          _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5939
 
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5940
 
          _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
 
5990
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5941
5991
          _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
5942
5992
          if test "x$supports_anon_versioning" = xyes; then
5943
5993
            _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6232
6282
        # The linker will not automatically build a static lib if we build a DLL.
6233
6283
        # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6234
6284
        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
6285
        _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
6235
6286
        _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
6236
6287
        # Don't use ranlib
6237
6288
        _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6278
6329
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6279
6330
      ;;
6280
6331
 
6281
 
    freebsd1*)
6282
 
      _LT_TAGVAR(ld_shlibs, $1)=no
6283
 
      ;;
6284
 
 
6285
6332
    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6286
6333
    # support.  Future versions do this automatically, but an explicit c++rt0.o
6287
6334
    # does not break anything, and helps significantly (at the cost of a little
6294
6341
      ;;
6295
6342
 
6296
6343
    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6297
 
    freebsd2*)
 
6344
    freebsd2.*)
6298
6345
      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6299
6346
      _LT_TAGVAR(hardcode_direct, $1)=yes
6300
6347
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6333
6380
      fi
6334
6381
      if test "$with_gnu_ld" = no; then
6335
6382
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6336
 
        _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6337
6383
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6338
6384
        _LT_TAGVAR(hardcode_direct, $1)=yes
6339
6385
        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6775
6821
_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6776
6822
    [Flag to hardcode $libdir into a binary during linking.
6777
6823
    This must work even if $libdir does not exist])
6778
 
_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
6779
 
    [[If ld is used when linking, flag to hardcode $libdir into a binary
6780
 
    during linking.  This must work even if $libdir does not exist]])
6781
6824
_LT_TAGDECL([], [hardcode_libdir_separator], [1],
6782
6825
    [Whether we need a single "-rpath" flag with a separated argument])
6783
6826
_LT_TAGDECL([], [hardcode_direct], [0],
6931
6974
_LT_TAGVAR(hardcode_direct, $1)=no
6932
6975
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6933
6976
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6934
 
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6935
6977
_LT_TAGVAR(hardcode_libdir_separator, $1)=
6936
6978
_LT_TAGVAR(hardcode_minus_L, $1)=no
6937
6979
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7301
7343
        esac
7302
7344
        ;;
7303
7345
 
7304
 
      freebsd[[12]]*)
 
7346
      freebsd2.*)
7305
7347
        # C++ shared libraries reported to be fairly broken before
7306
7348
        # switch to ELF
7307
7349
        _LT_TAGVAR(ld_shlibs, $1)=no
8062
8104
  }
8063
8105
};
8064
8106
_LT_EOF
 
8107
], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
 
8108
package foo
 
8109
func foo() {
 
8110
}
 
8111
_LT_EOF
8065
8112
])
8066
8113
 
8067
8114
_lt_libdeps_save_CFLAGS=$CFLAGS
8068
8115
case "$CC $CFLAGS " in #(
8069
8116
*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
8070
8117
*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
 
8118
*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
8071
8119
esac
8072
8120
 
8073
8121
dnl Parse the compiler output and extract the necessary
8264
8312
_LT_TAGVAR(hardcode_direct, $1)=no
8265
8313
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
8266
8314
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8267
 
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8268
8315
_LT_TAGVAR(hardcode_libdir_separator, $1)=
8269
8316
_LT_TAGVAR(hardcode_minus_L, $1)=no
8270
8317
_LT_TAGVAR(hardcode_automatic, $1)=no
8397
8444
_LT_TAGVAR(hardcode_direct, $1)=no
8398
8445
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
8399
8446
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8400
 
_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8401
8447
_LT_TAGVAR(hardcode_libdir_separator, $1)=
8402
8448
_LT_TAGVAR(hardcode_minus_L, $1)=no
8403
8449
_LT_TAGVAR(hardcode_automatic, $1)=no
8580
8626
])# _LT_LANG_GCJ_CONFIG
8581
8627
 
8582
8628
 
 
8629
# _LT_LANG_GO_CONFIG([TAG])
 
8630
# --------------------------
 
8631
# Ensure that the configuration variables for the GNU Go compiler
 
8632
# are suitably defined.  These variables are subsequently used by _LT_CONFIG
 
8633
# to write the compiler configuration to `libtool'.
 
8634
m4_defun([_LT_LANG_GO_CONFIG],
 
8635
[AC_REQUIRE([LT_PROG_GO])dnl
 
8636
AC_LANG_SAVE
 
8637
 
 
8638
# Source file extension for Go test sources.
 
8639
ac_ext=go
 
8640
 
 
8641
# Object file extension for compiled Go test sources.
 
8642
objext=o
 
8643
_LT_TAGVAR(objext, $1)=$objext
 
8644
 
 
8645
# Code to be used in simple compile tests
 
8646
lt_simple_compile_test_code="package main; func main() { }"
 
8647
 
 
8648
# Code to be used in simple link tests
 
8649
lt_simple_link_test_code='package main; func main() { }'
 
8650
 
 
8651
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
8652
_LT_TAG_COMPILER
 
8653
 
 
8654
# save warnings/boilerplate of simple test code
 
8655
_LT_COMPILER_BOILERPLATE
 
8656
_LT_LINKER_BOILERPLATE
 
8657
 
 
8658
# Allow CC to be a program name with arguments.
 
8659
lt_save_CC=$CC
 
8660
lt_save_CFLAGS=$CFLAGS
 
8661
lt_save_GCC=$GCC
 
8662
GCC=yes
 
8663
CC=${GOC-"gccgo"}
 
8664
CFLAGS=$GOFLAGS
 
8665
compiler=$CC
 
8666
_LT_TAGVAR(compiler, $1)=$CC
 
8667
_LT_TAGVAR(LD, $1)="$LD"
 
8668
_LT_CC_BASENAME([$compiler])
 
8669
 
 
8670
# Go did not exist at the time GCC didn't implicitly link libc in.
 
8671
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
8672
 
 
8673
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
8674
_LT_TAGVAR(reload_flag, $1)=$reload_flag
 
8675
_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
 
8676
 
 
8677
if test -n "$compiler"; then
 
8678
  _LT_COMPILER_NO_RTTI($1)
 
8679
  _LT_COMPILER_PIC($1)
 
8680
  _LT_COMPILER_C_O($1)
 
8681
  _LT_COMPILER_FILE_LOCKS($1)
 
8682
  _LT_LINKER_SHLIBS($1)
 
8683
  _LT_LINKER_HARDCODE_LIBPATH($1)
 
8684
 
 
8685
  _LT_CONFIG($1)
 
8686
fi
 
8687
 
 
8688
AC_LANG_RESTORE
 
8689
 
 
8690
GCC=$lt_save_GCC
 
8691
CC=$lt_save_CC
 
8692
CFLAGS=$lt_save_CFLAGS
 
8693
])# _LT_LANG_GO_CONFIG
 
8694
 
 
8695
 
8583
8696
# _LT_LANG_RC_CONFIG([TAG])
8584
8697
# -------------------------
8585
8698
# Ensure that the configuration variables for the Windows resource compiler
8649
8762
dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8650
8763
 
8651
8764
 
 
8765
# LT_PROG_GO
 
8766
# ----------
 
8767
AC_DEFUN([LT_PROG_GO],
 
8768
[AC_CHECK_TOOL(GOC, gccgo,)
 
8769
])
 
8770
 
 
8771
 
8652
8772
# LT_PROG_RC
8653
8773
# ----------
8654
8774
AC_DEFUN([LT_PROG_RC],
9313
9433
# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
9314
9434
m4_define([_LT_WITH_PIC],
9315
9435
[AC_ARG_WITH([pic],
9316
 
    [AS_HELP_STRING([--with-pic],
 
9436
    [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
9317
9437
        [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
9318
 
    [pic_mode="$withval"],
 
9438
    [lt_p=${PACKAGE-default}
 
9439
    case $withval in
 
9440
    yes|no) pic_mode=$withval ;;
 
9441
    *)
 
9442
      pic_mode=default
 
9443
      # Look at the argument we got.  We use all the common list separators.
 
9444
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
9445
      for lt_pkg in $withval; do
 
9446
        IFS="$lt_save_ifs"
 
9447
        if test "X$lt_pkg" = "X$lt_p"; then
 
9448
          pic_mode=yes
 
9449
        fi
 
9450
      done
 
9451
      IFS="$lt_save_ifs"
 
9452
      ;;
 
9453
    esac],
9319
9454
    [pic_mode=default])
9320
9455
 
9321
9456
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
9487
9622
 
9488
9623
# @configure_input@
9489
9624
 
9490
 
# serial 3293 ltversion.m4
 
9625
# serial 3337 ltversion.m4
9491
9626
# This file is part of GNU Libtool
9492
9627
 
9493
 
m4_define([LT_PACKAGE_VERSION], [2.4])
9494
 
m4_define([LT_PACKAGE_REVISION], [1.3293])
 
9628
m4_define([LT_PACKAGE_VERSION], [2.4.2])
 
9629
m4_define([LT_PACKAGE_REVISION], [1.3337])
9495
9630
 
9496
9631
AC_DEFUN([LTVERSION_VERSION],
9497
 
[macro_version='2.4'
9498
 
macro_revision='1.3293'
 
9632
[macro_version='2.4.2'
 
9633
macro_revision='1.3337'
9499
9634
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9500
9635
_LT_DECL(, macro_revision, 0)
9501
9636
])
9599
9734
m4_ifndef([_LT_PROG_FC],                [AC_DEFUN([_LT_PROG_FC])])
9600
9735
m4_ifndef([_LT_PROG_CXX],               [AC_DEFUN([_LT_PROG_CXX])])
9601
9736
 
 
9737
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
 
9738
 
9739
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
 
9740
#
 
9741
# This program is free software; you can redistribute it and/or modify
 
9742
# it under the terms of the GNU General Public License as published by
 
9743
# the Free Software Foundation; either version 2 of the License, or
 
9744
# (at your option) any later version.
 
9745
#
 
9746
# This program is distributed in the hope that it will be useful, but
 
9747
# WITHOUT ANY WARRANTY; without even the implied warranty of
 
9748
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
9749
# General Public License for more details.
 
9750
#
 
9751
# You should have received a copy of the GNU General Public License
 
9752
# along with this program; if not, write to the Free Software
 
9753
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
9754
#
 
9755
# As a special exception to the GNU General Public License, if you
 
9756
# distribute this file as part of a program that contains a
 
9757
# configuration script generated by Autoconf, you may include it under
 
9758
# the same distribution terms that you use for the rest of that program.
 
9759
 
 
9760
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
 
9761
# ----------------------------------
 
9762
AC_DEFUN([PKG_PROG_PKG_CONFIG],
 
9763
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
 
9764
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
 
9765
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
 
9766
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
 
9767
        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
 
9768
fi
 
9769
if test -n "$PKG_CONFIG"; then
 
9770
        _pkg_min_version=m4_default([$1], [0.9.0])
 
9771
        AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
 
9772
        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
 
9773
                AC_MSG_RESULT([yes])
 
9774
        else
 
9775
                AC_MSG_RESULT([no])
 
9776
                PKG_CONFIG=""
 
9777
        fi
 
9778
                
 
9779
fi[]dnl
 
9780
])# PKG_PROG_PKG_CONFIG
 
9781
 
 
9782
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 
9783
#
 
9784
# Check to see whether a particular set of modules exists.  Similar
 
9785
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
 
9786
#
 
9787
#
 
9788
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
 
9789
# this or PKG_CHECK_MODULES is called, or make sure to call
 
9790
# PKG_CHECK_EXISTS manually
 
9791
# --------------------------------------------------------------
 
9792
AC_DEFUN([PKG_CHECK_EXISTS],
 
9793
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
9794
if test -n "$PKG_CONFIG" && \
 
9795
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
 
9796
  m4_ifval([$2], [$2], [:])
 
9797
m4_ifvaln([$3], [else
 
9798
  $3])dnl
 
9799
fi])
 
9800
 
 
9801
 
 
9802
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
 
9803
# ---------------------------------------------
 
9804
m4_define([_PKG_CONFIG],
 
9805
[if test -n "$$1"; then
 
9806
    pkg_cv_[]$1="$$1"
 
9807
 elif test -n "$PKG_CONFIG"; then
 
9808
    PKG_CHECK_EXISTS([$3],
 
9809
                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
 
9810
                     [pkg_failed=yes])
 
9811
 else
 
9812
    pkg_failed=untried
 
9813
fi[]dnl
 
9814
])# _PKG_CONFIG
 
9815
 
 
9816
# _PKG_SHORT_ERRORS_SUPPORTED
 
9817
# -----------------------------
 
9818
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
 
9819
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 
9820
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
 
9821
        _pkg_short_errors_supported=yes
 
9822
else
 
9823
        _pkg_short_errors_supported=no
 
9824
fi[]dnl
 
9825
])# _PKG_SHORT_ERRORS_SUPPORTED
 
9826
 
 
9827
 
 
9828
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
 
9829
# [ACTION-IF-NOT-FOUND])
 
9830
#
 
9831
#
 
9832
# Note that if there is a possibility the first call to
 
9833
# PKG_CHECK_MODULES might not happen, you should be sure to include an
 
9834
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
 
9835
#
 
9836
#
 
9837
# --------------------------------------------------------------
 
9838
AC_DEFUN([PKG_CHECK_MODULES],
 
9839
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
9840
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
 
9841
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
 
9842
 
 
9843
pkg_failed=no
 
9844
AC_MSG_CHECKING([for $1])
 
9845
 
 
9846
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
 
9847
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
 
9848
 
 
9849
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
 
9850
and $1[]_LIBS to avoid the need to call pkg-config.
 
9851
See the pkg-config man page for more details.])
 
9852
 
 
9853
if test $pkg_failed = yes; then
 
9854
        _PKG_SHORT_ERRORS_SUPPORTED
 
9855
        if test $_pkg_short_errors_supported = yes; then
 
9856
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
 
9857
        else 
 
9858
                $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
 
9859
        fi
 
9860
        # Put the nasty error message in config.log where it belongs
 
9861
        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
 
9862
 
 
9863
        ifelse([$4], , [AC_MSG_ERROR(dnl
 
9864
[Package requirements ($2) were not met:
 
9865
 
 
9866
$$1_PKG_ERRORS
 
9867
 
 
9868
Consider adjusting the PKG_CONFIG_PATH environment variable if you
 
9869
installed software in a non-standard prefix.
 
9870
 
 
9871
_PKG_TEXT
 
9872
])],
 
9873
                [AC_MSG_RESULT([no])
 
9874
                $4])
 
9875
elif test $pkg_failed = untried; then
 
9876
        ifelse([$4], , [AC_MSG_FAILURE(dnl
 
9877
[The pkg-config script could not be found or is too old.  Make sure it
 
9878
is in your PATH or set the PKG_CONFIG environment variable to the full
 
9879
path to pkg-config.
 
9880
 
 
9881
_PKG_TEXT
 
9882
 
 
9883
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
 
9884
                [$4])
 
9885
else
 
9886
        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
 
9887
        $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
 
9888
        AC_MSG_RESULT([yes])
 
9889
        ifelse([$3], , :, [$3])
 
9890
fi[]dnl
 
9891
])# PKG_CHECK_MODULES
 
9892
 
9602
9893
dnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
9603
9894
dnl
9604
9895
dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
9605
 
dnl 
 
9896
dnl
9606
9897
dnl Permission is hereby granted, free of charge, to any person obtaining a
9607
9898
dnl copy of this software and associated documentation files (the "Software"),
9608
9899
dnl to deal in the Software without restriction, including without limitation
9635
9926
#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
9636
9927
#
9637
9928
#
9638
 
# See the "minimum version" comment for each macro you use to see what 
 
9929
# See the "minimum version" comment for each macro you use to see what
9639
9930
# version you require.
9640
9931
m4_defun([XORG_MACROS_VERSION],[
9641
 
m4_define([vers_have], [1.16.1])
 
9932
m4_define([vers_have], [1.19.0])
9642
9933
m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
9643
9934
m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
9644
9935
m4_if(m4_cmp(maj_have, maj_needed), 0,,
9658
9949
# such as man pages and config files
9659
9950
AC_DEFUN([XORG_PROG_RAWCPP],[
9660
9951
AC_REQUIRE([AC_PROG_CPP])
9661
 
AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
 
9952
AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}],
9662
9953
   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
9663
9954
 
9664
9955
# Check for flag to avoid builtin definitions - assumes unix is predefined,
9688
9979
        AC_MSG_RESULT([no])
9689
9980
else
9690
9981
        if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
 
9982
                TRADITIONALCPPFLAGS="-traditional"
9691
9983
                RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
9692
9984
                AC_MSG_RESULT([yes])
9693
9985
        else
9696
9988
fi
9697
9989
rm -f conftest.$ac_ext
9698
9990
AC_SUBST(RAWCPPFLAGS)
 
9991
AC_SUBST(TRADITIONALCPPFLAGS)
9699
9992
]) # XORG_PROG_RAWCPP
9700
9993
 
9701
9994
# XORG_MANPAGE_SECTIONS()
10220
10513
]) # XORG_WITH_ASCIIDOC
10221
10514
 
10222
10515
# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
10223
 
# --------------------------------
 
10516
# -------------------------------------------
10224
10517
# Minimum version: 1.5.0
10225
10518
# Minimum version for optional DEFAULT argument: 1.11.0
 
10519
# Minimum version for optional DOT checking: 1.18.0
10226
10520
#
10227
10521
# Documentation tools are not always available on all platforms and sometimes
10228
10522
# not at the appropriate level. This macro enables a module to test for the
10242
10536
#
10243
10537
AC_DEFUN([XORG_WITH_DOXYGEN],[
10244
10538
AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
 
10539
AC_ARG_VAR([DOT], [Path to the dot graphics utility])
10245
10540
m4_define([_defopt], m4_default([$2], [auto]))
10246
10541
AC_ARG_WITH(doxygen,
10247
10542
        AS_HELP_STRING([--with-doxygen],
10285
10580
            AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
10286
10581
        fi])
10287
10582
fi])
 
10583
 
 
10584
dnl Check for DOT if we have doxygen. The caller decides if it is mandatory
 
10585
dnl HAVE_DOT is a variable that can be used in your doxygen.in config file:
 
10586
dnl     HAVE_DOT = @HAVE_DOT@
 
10587
HAVE_DOT=no
 
10588
if test "x$have_doxygen" = "xyes"; then
 
10589
  AC_PATH_PROG([DOT], [dot])
 
10590
    if test "x$DOT" != "x"; then
 
10591
      HAVE_DOT=yes
 
10592
    fi
 
10593
fi
 
10594
 
 
10595
AC_SUBST([HAVE_DOT])
 
10596
AM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"])
10288
10597
AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
10289
10598
]) # XORG_WITH_DOXYGEN
10290
10599
 
10467
10776
AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
10468
10777
]) # XORG_WITH_FOP
10469
10778
 
 
10779
# XORG_WITH_M4([MIN-VERSION])
 
10780
# ---------------------------
 
10781
# Minimum version: 1.19.0
 
10782
#
 
10783
# This macro attempts to locate an m4 macro processor which supports
 
10784
# -I option and is only useful for modules relying on M4 in order to
 
10785
# expand macros in source code files.
 
10786
#
 
10787
# Interface to module:
 
10788
# M4:           returns the path of the m4 program found
 
10789
#               returns the path set by the user in the environment
 
10790
#
 
10791
AC_DEFUN([XORG_WITH_M4], [
 
10792
AC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4],
 
10793
   [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4],
 
10794
       [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \
 
10795
         ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]],
 
10796
   [AC_MSG_ERROR([could not find m4 that supports -I option])],
 
10797
   [$PATH:/usr/gnu/bin])])
 
10798
 
 
10799
AC_SUBST([M4], [$ac_cv_path_M4])
 
10800
]) # XORG_WITH_M4
 
10801
 
10470
10802
# XORG_WITH_PS2PDF([DEFAULT])
10471
10803
# ----------------
10472
10804
# Minimum version: 1.6.0
10657
10989
AC_MSG_RESULT([$enable_unit_tests])
10658
10990
]) # XORG_ENABLE_UNIT_TESTS
10659
10991
 
 
10992
# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto)
 
10993
# ------------------------------------------------------
 
10994
# Minimum version: 1.17.0
 
10995
#
 
10996
# This macro enables a builder to enable/disable integration testing
 
10997
# It makes no assumption about the test cases' implementation
 
10998
# Test cases may or may not use Automake "Support for test suites"
 
10999
#
 
11000
# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support
 
11001
# usually requires less dependencies and may be built and run under less
 
11002
# stringent environments than integration tests.
 
11003
#
 
11004
# Interface to module:
 
11005
# ENABLE_INTEGRATION_TESTS:   used in makefiles to conditionally build tests
 
11006
# enable_integration_tests:   used in configure.ac for additional configuration
 
11007
# --enable-integration-tests: 'yes' user instructs the module to build tests
 
11008
#                             'no' user instructs the module not to build tests
 
11009
# parm1:                      specify the default value, yes or no.
 
11010
#
 
11011
AC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[
 
11012
AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS])
 
11013
m4_define([_defopt], m4_default([$1], [auto]))
 
11014
AC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests],
 
11015
        [Enable building integration test cases (default: ]_defopt[)]),
 
11016
        [enable_integration_tests=$enableval],
 
11017
        [enable_integration_tests=]_defopt)
 
11018
m4_undefine([_defopt])
 
11019
AM_CONDITIONAL([ENABLE_INTEGRATION_TESTS],
 
11020
        [test "x$enable_integration_tests" != xno])
 
11021
AC_MSG_CHECKING([whether to build unit test cases])
 
11022
AC_MSG_RESULT([$enable_integration_tests])
 
11023
]) # XORG_ENABLE_INTEGRATION_TESTS
 
11024
 
10660
11025
# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT])
10661
11026
# ----------------------------------------
10662
11027
# Minimum version: 1.13.0
10667
11032
# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing.
10668
11033
# Otherwise the value of $enable_unit_tests is blank.
10669
11034
#
 
11035
# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit
 
11036
# test support usually requires less dependencies and may be built and run under
 
11037
# less stringent environments than integration tests.
 
11038
#
10670
11039
# Interface to module:
10671
11040
# HAVE_GLIB: used in makefiles to conditionally build targets
10672
11041
# with_glib: used in configure.ac to know if GLib has been found
10884
11253
 
10885
11254
AC_MSG_CHECKING([whether malloc(0) returns NULL])
10886
11255
if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
10887
 
        AC_RUN_IFELSE([AC_LANG_PROGRAM([
 
11256
AC_CACHE_VAL([xorg_cv_malloc0_returns_null],
 
11257
        [AC_RUN_IFELSE([AC_LANG_PROGRAM([
10888
11258
#include <stdlib.h>
10889
11259
],[
10890
11260
    char *m0, *r0, *c0, *p;
10894
11264
    c0 = calloc(0,10);
10895
11265
    exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1);
10896
11266
])],
10897
 
                [MALLOC_ZERO_RETURNS_NULL=yes],
10898
 
                [MALLOC_ZERO_RETURNS_NULL=no],
10899
 
                [MALLOC_ZERO_RETURNS_NULL=yes])
 
11267
                [xorg_cv_malloc0_returns_null=yes],
 
11268
                [xorg_cv_malloc0_returns_null=no])])
 
11269
MALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null
10900
11270
fi
10901
11271
AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
10902
11272
 
11025
11395
#
11026
11396
# Checks for various brands of compilers and sets flags as appropriate:
11027
11397
#   GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes"
 
11398
#   GNU g++ - relies on AC_PROG_CXX to set GXX to "yes"
11028
11399
#   clang compiler - sets CLANGCC to "yes"
11029
11400
#   Intel compiler - sets INTELCC to "yes"
11030
11401
#   Sun/Oracle Solaris Studio cc - sets SUNCC to "yes"
11031
11402
#
11032
11403
AC_DEFUN([XORG_COMPILER_BRAND], [
11033
 
AC_REQUIRE([AC_PROG_CC_C99])
 
11404
AC_LANG_CASE(
 
11405
        [C], [
 
11406
                AC_REQUIRE([AC_PROG_CC_C99])
 
11407
        ],
 
11408
        [C++], [
 
11409
                AC_REQUIRE([AC_PROG_CXX])
 
11410
        ]
 
11411
)
11034
11412
AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"])
11035
11413
AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
11036
11414
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
11050
11428
# -Werror=unused-command-line-argument
11051
11429
#
11052
11430
AC_DEFUN([XORG_TESTSET_CFLAG], [
11053
 
AC_REQUIRE([AC_PROG_CC_C99])
11054
11431
m4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
11055
11432
m4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
11056
11433
 
11057
 
xorg_testset_save_CFLAGS="$CFLAGS"
11058
 
 
11059
 
if test "x$xorg_testset_unknown_warning_option" = "x" ; then
11060
 
        CFLAGS="$CFLAGS -Werror=unknown-warning-option"
11061
 
        AC_CACHE_CHECK([if $CC supports -Werror=unknown-warning-option],
11062
 
                        xorg_cv_cc_flag_unknown_warning_option,
 
11434
AC_LANG_COMPILER_REQUIRE
 
11435
 
 
11436
AC_LANG_CASE(
 
11437
        [C], [
 
11438
                AC_REQUIRE([AC_PROG_CC_C99])
 
11439
                define([PREFIX], [C])
 
11440
                define([CACHE_PREFIX], [cc])
 
11441
                define([COMPILER], [$CC])
 
11442
        ],
 
11443
        [C++], [
 
11444
                define([PREFIX], [CXX])
 
11445
                define([CACHE_PREFIX], [cxx])
 
11446
                define([COMPILER], [$CXX])
 
11447
        ]
 
11448
)
 
11449
 
 
11450
[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]"
 
11451
 
 
11452
if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then
 
11453
        PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
 
11454
        AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option],
 
11455
                        [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option],
11063
11456
                        AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
11064
 
                                          [xorg_cv_cc_flag_unknown_warning_option=yes],
11065
 
                                          [xorg_cv_cc_flag_unknown_warning_option=no]))
11066
 
        xorg_testset_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
11067
 
        CFLAGS="$xorg_testset_save_CFLAGS"
 
11457
                                          [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes],
 
11458
                                          [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no]))
 
11459
        [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option]
 
11460
        PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
11068
11461
fi
11069
11462
 
11070
 
if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
11071
 
        if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
11072
 
                CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 
11463
if test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then
 
11464
        if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then
 
11465
                PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
11073
11466
        fi
11074
 
        CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
11075
 
        AC_CACHE_CHECK([if $CC supports -Werror=unused-command-line-argument],
11076
 
                        xorg_cv_cc_flag_unused_command_line_argument,
 
11467
        PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
 
11468
        AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument],
 
11469
                        [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument],
11077
11470
                        AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
11078
 
                                          [xorg_cv_cc_flag_unused_command_line_argument=yes],
11079
 
                                          [xorg_cv_cc_flag_unused_command_line_argument=no]))
11080
 
        xorg_testset_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
11081
 
        CFLAGS="$xorg_testset_save_CFLAGS"
 
11471
                                          [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes],
 
11472
                                          [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no]))
 
11473
        [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument]
 
11474
        PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
11082
11475
fi
11083
11476
 
11084
11477
found="no"
11085
11478
m4_foreach([flag], m4_cdr($@), [
11086
11479
        if test $found = "no" ; then
11087
 
                if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
11088
 
                        CFLAGS="$CFLAGS -Werror=unknown-warning-option"
11089
 
                fi
11090
 
 
11091
 
                if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
11092
 
                        CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
11093
 
                fi
11094
 
 
11095
 
                CFLAGS="$CFLAGS ]flag["
 
11480
                if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then
 
11481
                        PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
 
11482
                fi
 
11483
 
 
11484
                if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then
 
11485
                        PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
 
11486
                fi
 
11487
 
 
11488
                PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag["
11096
11489
 
11097
11490
dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname
11098
 
                AC_MSG_CHECKING([if $CC supports ]flag[])
11099
 
                cacheid=`AS_ECHO([xorg_cv_cc_flag_]flag[])`
11100
 
                AC_CACHE_VAL(AS_TR_SH($cacheid),
 
11491
                AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[])
 
11492
                cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[])
 
11493
                AC_CACHE_VAL($cacheid,
11101
11494
                             [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])],
11102
 
                                             [eval AS_TR_SH($cacheid)=yes],
11103
 
                                             [eval AS_TR_SH($cacheid)=no])])
11104
 
 
11105
 
                CFLAGS="$xorg_testset_save_CFLAGS"
11106
 
 
11107
 
                eval supported=$AS_TR_SH($cacheid)
 
11495
                                             [eval $cacheid=yes],
 
11496
                                             [eval $cacheid=no])])
 
11497
 
 
11498
                PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
 
11499
 
 
11500
                eval supported=\$$cacheid
11108
11501
                AC_MSG_RESULT([$supported])
11109
11502
                if test "$supported" = "yes" ; then
11110
11503
                        $1="$$1 ]flag["
11118
11511
# ---------------
11119
11512
# Minimum version: 1.16.0
11120
11513
#
11121
 
# Defines BASE_CFLAGS to contain a set of command line arguments supported
11122
 
# by the selected compiler which do NOT alter the generated code.  These
11123
 
# arguments will cause the compiler to print various warnings during
11124
 
# compilation AND turn a conservative set of warnings into errors.
 
11514
# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line
 
11515
# arguments supported by the selected compiler which do NOT alter the generated
 
11516
# code.  These arguments will cause the compiler to print various warnings
 
11517
# during compilation AND turn a conservative set of warnings into errors.
11125
11518
#
11126
 
# The set of flags supported by BASE_CFLAGS will grow in future
11127
 
# versions of util-macros as options are added to new compilers.
 
11519
# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in
 
11520
# future versions of util-macros as options are added to new compilers.
11128
11521
#
11129
11522
AC_DEFUN([XORG_COMPILER_FLAGS], [
11130
11523
AC_REQUIRE([XORG_COMPILER_BRAND])
11135
11528
              [SELECTIVE_WERROR=$enableval],
11136
11529
              [SELECTIVE_WERROR=yes])
11137
11530
 
 
11531
AC_LANG_CASE(
 
11532
        [C], [
 
11533
                define([PREFIX], [C])
 
11534
        ],
 
11535
        [C++], [
 
11536
                define([PREFIX], [CXX])
 
11537
        ]
 
11538
)
11138
11539
# -v is too short to test reliably with XORG_TESTSET_CFLAG
11139
11540
if test "x$SUNCC" = "xyes"; then
11140
 
    BASE_CFLAGS="-v"
 
11541
    [BASE_]PREFIX[FLAGS]="-v"
11141
11542
else
11142
 
    BASE_CFLAGS=""
 
11543
    [BASE_]PREFIX[FLAGS]=""
11143
11544
fi
11144
11545
 
11145
11546
# This chunk of warnings were those that existed in the legacy CWARNFLAGS
11146
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wall])
11147
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wpointer-arith])
11148
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wstrict-prototypes])
11149
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmissing-prototypes])
11150
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmissing-declarations])
11151
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wnested-externs])
11152
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wbad-function-cast])
11153
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wformat=2], [-Wformat])
11154
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wold-style-definition])
11155
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wdeclaration-after-statement])
 
11547
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall])
 
11548
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith])
 
11549
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations])
 
11550
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat])
 
11551
 
 
11552
AC_LANG_CASE(
 
11553
        [C], [
 
11554
                XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes])
 
11555
                XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes])
 
11556
                XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs])
 
11557
                XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast])
 
11558
                XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd])
 
11559
                XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement])
 
11560
        ]
 
11561
)
11156
11562
 
11157
11563
# This chunk adds additional warnings that could catch undesired effects.
11158
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wunused])
11159
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wuninitialized])
11160
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wshadow])
11161
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wcast-qual])
11162
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmissing-noreturn])
11163
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmissing-format-attribute])
11164
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wredundant-decls])
 
11564
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused])
 
11565
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized])
 
11566
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow])
 
11567
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn])
 
11568
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute])
 
11569
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls])
 
11570
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
11165
11571
 
11166
11572
# These are currently disabled because they are noisy.  They will be enabled
11167
11573
# in the future once the codebase is sufficiently modernized to silence
11168
11574
# them.  For now, I don't want them to drown out the other warnings.
11169
 
# XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wlogical-op])
11170
 
# XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wparentheses])
11171
 
# XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wcast-align])
 
11575
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses])
 
11576
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
 
11577
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
11172
11578
 
11173
11579
# Turn some warnings into errors, so we don't accidently get successful builds
11174
11580
# when there are problems that should be fixed.
11175
11581
 
11176
11582
if test "x$SELECTIVE_WERROR" = "xyes" ; then
11177
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED])
11178
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=nonnull])
11179
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=init-self])
11180
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=main])
11181
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=missing-braces])
11182
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=sequence-point])
11183
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT])
11184
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=trigraphs])
11185
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=array-bounds])
11186
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=write-strings])
11187
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=address])
11188
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION])
11189
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION
 
11583
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED])
 
11584
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull])
 
11585
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self])
 
11586
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main])
 
11587
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces])
 
11588
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point])
 
11589
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT])
 
11590
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs])
 
11591
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds])
 
11592
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings])
 
11593
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address])
 
11594
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION])
 
11595
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION
11190
11596
else
11191
11597
AC_MSG_WARN([You have chosen not to turn some select compiler warnings into errors.  This should not be necessary.  Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT])
11192
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wimplicit])
11193
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wnonnull])
11194
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Winit-self])
11195
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmain])
11196
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmissing-braces])
11197
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wsequence-point])
11198
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wreturn-type])
11199
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wtrigraphs])
11200
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Warray-bounds])
11201
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wwrite-strings])
11202
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Waddress])
11203
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wint-to-pointer-cast])
11204
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wpointer-to-int-cast])
 
11598
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit])
 
11599
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull])
 
11600
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self])
 
11601
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain])
 
11602
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces])
 
11603
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point])
 
11604
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type])
 
11605
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs])
 
11606
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds])
 
11607
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings])
 
11608
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress])
 
11609
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast])
 
11610
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast])
11205
11611
fi
11206
11612
 
11207
 
AC_SUBST([BASE_CFLAGS])
 
11613
AC_SUBST([BASE_]PREFIX[FLAGS])
11208
11614
]) # XORG_COMPILER_FLAGS
11209
11615
 
11210
11616
# XORG_CWARNFLAGS
11222
11628
AC_DEFUN([XORG_CWARNFLAGS], [
11223
11629
AC_REQUIRE([XORG_COMPILER_FLAGS])
11224
11630
AC_REQUIRE([XORG_COMPILER_BRAND])
11225
 
CWARNFLAGS="$BASE_CFLAGS"
11226
 
if  test "x$GCC" = xyes ; then
11227
 
    CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing"
11228
 
fi
11229
 
AC_SUBST(CWARNFLAGS)
 
11631
AC_LANG_CASE(
 
11632
        [C], [
 
11633
                CWARNFLAGS="$BASE_CFLAGS"
 
11634
                if  test "x$GCC" = xyes ; then
 
11635
                    CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing"
 
11636
                fi
 
11637
                AC_SUBST(CWARNFLAGS)
 
11638
        ]
 
11639
)
11230
11640
]) # XORG_CWARNFLAGS
11231
11641
 
11232
11642
# XORG_STRICT_OPTION
11236
11646
# Add configure option to enable strict compilation flags, such as treating
11237
11647
# warnings as fatal errors.
11238
11648
# If --enable-strict-compilation is passed to configure, adds strict flags to
11239
 
# $BASE_CFLAGS and the deprecated $CWARNFLAGS.
 
11649
# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS.
11240
11650
#
11241
11651
# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or
11242
11652
# when strict compilation is unconditionally desired.
11249
11659
                          [Enable all warnings from compiler and make them errors (default: disabled)]),
11250
11660
                          [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
11251
11661
 
11252
 
STRICT_CFLAGS=""
11253
 
XORG_TESTSET_CFLAG([STRICT_CFLAGS], [-pedantic])
11254
 
XORG_TESTSET_CFLAG([STRICT_CFLAGS], [-Werror], [-errwarn])
 
11662
AC_LANG_CASE(
 
11663
        [C], [
 
11664
                define([PREFIX], [C])
 
11665
        ],
 
11666
        [C++], [
 
11667
                define([PREFIX], [CXX])
 
11668
        ]
 
11669
)
 
11670
 
 
11671
[STRICT_]PREFIX[FLAGS]=""
 
11672
XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic])
 
11673
XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn])
11255
11674
 
11256
11675
# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not
11257
11676
# activate it with -Werror, so we add it here explicitly.
11258
 
XORG_TESTSET_CFLAG([STRICT_CFLAGS], [-Werror=attributes])
 
11677
XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes])
11259
11678
 
11260
11679
if test "x$STRICT_COMPILE" = "xyes"; then
11261
 
    BASE_CFLAGS="$BASE_CFLAGS $STRICT_CFLAGS"
11262
 
    CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
 
11680
    [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]"
 
11681
    AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"])
11263
11682
fi
11264
 
AC_SUBST([STRICT_CFLAGS])
11265
 
AC_SUBST([BASE_CFLAGS])
11266
 
AC_SUBST([CWARNFLAGS])
 
11683
AC_SUBST([STRICT_]PREFIX[FLAGS])
 
11684
AC_SUBST([BASE_]PREFIX[FLAGS])
 
11685
AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS]))
11267
11686
]) # XORG_STRICT_OPTION
11268
11687
 
11269
11688
# XORG_DEFAULT_OPTIONS
11329
11748
# XORG_RELEASE_VERSION
11330
11749
# --------------------
11331
11750
# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
11332
 
 
 
11751
 
11333
11752
AC_DEFUN([XORG_RELEASE_VERSION],[
11334
11753
        AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
11335
11754
                [`echo $PACKAGE_VERSION | cut -d . -f 1`],
11397
11816
 AC_SEARCH_LIBS(socket, [socket])
11398
11817
 AC_SEARCH_LIBS(gethostbyname, [nsl])
11399
11818
 if test "$ac_cv_search_socket$ac_cv_search_gethostbyname" = "nono"; then
11400
 
   AC_HAVE_LIBRARY([ws2_32])
 
11819
   AC_CHECK_LIB([ws2_32],[main])
11401
11820
 fi
11402
11821
 
11403
11822
 # Needs to come after above checks for libsocket & libnsl for SVR4 systems
11404
11823
 AC_ARG_ENABLE(ipv6,
11405
 
        AC_HELP_STRING([--enable-ipv6],[Enable IPv6 support]),
 
11824
        AS_HELP_STRING([--enable-ipv6],[Enable IPv6 support]),
11406
11825
        [IPV6CONN=$enableval],
11407
11826
        [AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])])
11408
11827
 AC_MSG_CHECKING([if IPv6 support should be built])
11425
11844
AC_INCLUDES_DEFAULT
11426
11845
#include <sys/socket.h>])
11427
11846
 
 
11847
 # XPG4v2/UNIX95 added msg_control - check to see if we need to define
 
11848
 # _XOPEN_SOURCE to get it (such as on Solaris)
 
11849
 AC_CHECK_MEMBER([struct msghdr.msg_control], [], [],
 
11850
                 [
 
11851
AC_INCLUDES_DEFAULT
 
11852
#include <sys/socket.h>
 
11853
                 ])
 
11854
 # First try for Solaris in C99 compliant mode, which requires XPG6/UNIX03
 
11855
 if test "x$ac_cv_member_struct_msghdr_msg_control" = xno; then
 
11856
     unset ac_cv_member_struct_msghdr_msg_control
 
11857
     AC_MSG_NOTICE([trying again with _XOPEN_SOURCE=600])
 
11858
     AC_CHECK_MEMBER([struct msghdr.msg_control],
 
11859
                     [AC_DEFINE([_XOPEN_SOURCE], [600],
 
11860
                       [Defined if needed to expose struct msghdr.msg_control])
 
11861
                     ], [], [
 
11862
#define _XOPEN_SOURCE 600
 
11863
AC_INCLUDES_DEFAULT
 
11864
#include <sys/socket.h>
 
11865
                     ])
 
11866
 fi
 
11867
 # If that didn't work, fall back to XPG5/UNIX98 with C89
 
11868
 if test "x$ac_cv_member_struct_msghdr_msg_control" = xno; then
 
11869
     unset ac_cv_member_struct_msghdr_msg_control
 
11870
     AC_MSG_NOTICE([trying again with _XOPEN_SOURCE=500])
 
11871
     AC_CHECK_MEMBER([struct msghdr.msg_control],
 
11872
                     [AC_DEFINE([_XOPEN_SOURCE], [500],
 
11873
                       [Defined if needed to expose struct msghdr.msg_control])
 
11874
                     ], [], [
 
11875
#define _XOPEN_SOURCE 500
 
11876
AC_INCLUDES_DEFAULT
 
11877
#include <sys/socket.h>
 
11878
                     ])
 
11879
 fi
 
11880
 
 
11881
 
11428
11882
]) # XTRANS_TCP_FLAGS
11429
11883
 
11430
11884
# XTRANS_CONNECTION_FLAGS()
11433
11887
# that use Xtrans functions
11434
11888
AC_DEFUN([XTRANS_CONNECTION_FLAGS],[
11435
11889
 AC_REQUIRE([AC_CANONICAL_HOST])
11436
 
 AC_REQUIRE([AC_TYPE_SIGNAL])
11437
11890
 [case $host_os in
11438
11891
        mingw*) unixdef="no"   ;;
11439
11892
        *)      unixdef="yes"  ;;
11440
11893
 esac]
11441
11894
 AC_ARG_ENABLE(unix-transport,
11442
 
        AC_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]),
 
11895
        AS_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]),
11443
11896
        [UNIXCONN=$enableval], [UNIXCONN=$unixdef])
11444
11897
 AC_MSG_CHECKING([if Xtrans should support UNIX socket connections])
11445
11898
 if test "$UNIXCONN" = "yes"; then
11447
11900
 fi
11448
11901
 AC_MSG_RESULT($UNIXCONN)
11449
11902
 AC_ARG_ENABLE(tcp-transport,
11450
 
        AC_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]),
 
11903
        AS_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]),
11451
11904
        [TCPCONN=$enableval], [TCPCONN=yes])
11452
11905
 AC_MSG_CHECKING([if Xtrans should support TCP socket connections])
11453
11906
 AC_MSG_RESULT($TCPCONN)
11460
11913
        *)                      localdef="no"  ;;
11461
11914
 esac]
11462
11915
 AC_ARG_ENABLE(local-transport,
11463
 
        AC_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]),
 
11916
        AS_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]),
11464
11917
        [LOCALCONN=$enableval], [LOCALCONN=$localdef])
11465
11918
 AC_MSG_CHECKING([if Xtrans should support os-specific local connections])
11466
11919
 AC_MSG_RESULT($LOCALCONN)
11478
11931
AC_DEFUN([XTRANS_SECURE_RPC_FLAGS],
11479
11932
[AC_REQUIRE([XTRANS_TCP_FLAGS])
11480
11933
 AC_ARG_ENABLE(secure-rpc,
11481
 
        AC_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]),
 
11934
        AS_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]),
11482
11935
        [SECURE_RPC=$enableval], [SECURE_RPC="try"])
11483
11936
 
11484
11937
 if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then