~ubuntu-branches/ubuntu/lucid/x11-xserver-utils/lucid-security

« back to all changes in this revision

Viewing changes to xgamma/aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Bryce Harrington
  • Date: 2010-01-08 18:38:47 UTC
  • mfrom: (5.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20100108183847-wuunshkmhcyh7vzc
Tags: 7.5+1ubuntu1
* Merge from Debian.  Remaining Ubuntu changes:
  - Add 100_xrandr-output.patch: When using --scale or --transform, verify
    a valid output parameter is used; crashes otherwise.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# generated automatically by aclocal 1.10 -*- Autoconf -*-
 
1
# generated automatically by aclocal 1.11 -*- Autoconf -*-
2
2
 
3
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4
 
# 2005, 2006  Free Software Foundation, Inc.
 
4
# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
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_if(m4_PACKAGE_VERSION, [2.61],,
15
 
[m4_fatal([this file was generated for autoconf 2.61.
16
 
You have another version of autoconf.  If you want to use that,
17
 
you should regenerate the build system entirely.], [63])])
 
14
m4_ifndef([AC_AUTOCONF_VERSION],
 
15
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 
16
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
 
17
[m4_warning([this file was generated for autoconf 2.63.
 
18
You have another version of autoconf.  It may work, but is not guaranteed to.
 
19
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'.])])
18
21
 
19
 
# Copyright (C) 2002, 2003, 2005, 2006  Free Software Foundation, Inc.
 
22
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
20
23
#
21
24
# This file is free software; the Free Software Foundation
22
25
# gives unlimited permission to copy and/or distribute it,
28
31
# generated from the m4 files accompanying Automake X.Y.
29
32
# (This private macro should not be called outside this file.)
30
33
AC_DEFUN([AM_AUTOMAKE_VERSION],
31
 
[am__api_version='1.10'
 
34
[am__api_version='1.11'
32
35
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
33
36
dnl require some minimum version.  Point them to the right macro.
34
 
m4_if([$1], [1.10], [],
 
37
m4_if([$1], [1.11], [],
35
38
      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
36
39
])
37
40
 
45
48
# AM_SET_CURRENT_AUTOMAKE_VERSION
46
49
# -------------------------------
47
50
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
48
 
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
 
51
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
49
52
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
50
 
[AM_AUTOMAKE_VERSION([1.10])dnl
51
 
_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
 
53
[AM_AUTOMAKE_VERSION([1.11])dnl
 
54
m4_ifndef([AC_AUTOCONF_VERSION],
 
55
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 
56
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
52
57
 
53
58
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
54
59
 
105
110
 
106
111
# AM_CONDITIONAL                                            -*- Autoconf -*-
107
112
 
108
 
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
 
113
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
109
114
# Free Software Foundation, Inc.
110
115
#
111
116
# This file is free software; the Free Software Foundation
112
117
# gives unlimited permission to copy and/or distribute it,
113
118
# with or without modifications, as long as this notice is preserved.
114
119
 
115
 
# serial 8
 
120
# serial 9
116
121
 
117
122
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
118
123
# -------------------------------------
125
130
AC_SUBST([$1_FALSE])dnl
126
131
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
127
132
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
 
133
m4_define([_AM_COND_VALUE_$1], [$2])dnl
128
134
if $2; then
129
135
  $1_TRUE=
130
136
  $1_FALSE='#'
138
144
Usually this means the macro was only invoked conditionally.]])
139
145
fi])])
140
146
 
141
 
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
 
147
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
142
148
# Free Software Foundation, Inc.
143
149
#
144
150
# This file is free software; the Free Software Foundation
145
151
# gives unlimited permission to copy and/or distribute it,
146
152
# with or without modifications, as long as this notice is preserved.
147
153
 
148
 
# serial 9
 
154
# serial 10
149
155
 
150
156
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
151
157
# written in clear, in which case automake, when reading aclocal.m4,
202
208
  if test "$am_compiler_list" = ""; then
203
209
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
204
210
  fi
 
211
  am__universal=false
 
212
  m4_case([$1], [CC],
 
213
    [case " $depcc " in #(
 
214
     *\ -arch\ *\ -arch\ *) am__universal=true ;;
 
215
     esac],
 
216
    [CXX],
 
217
    [case " $depcc " in #(
 
218
     *\ -arch\ *\ -arch\ *) am__universal=true ;;
 
219
     esac])
 
220
 
205
221
  for depmode in $am_compiler_list; do
206
222
    # Setup a source with many dependencies, because some compilers
207
223
    # like to wrap large dependency lists on column 80 (with \), and
219
235
    done
220
236
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
221
237
 
 
238
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
 
239
    # 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
 
242
    am__obj=sub/conftest.${OBJEXT-o}
 
243
    am__minus_obj="-o $am__obj"
222
244
    case $depmode in
 
245
    gcc)
 
246
      # This depmode causes a compiler race in universal mode.
 
247
      test "$am__universal" = false || continue
 
248
      ;;
223
249
    nosideeffect)
224
250
      # after this tag, mechanisms are not by side-effect, so they'll
225
251
      # only be used when explicitly requested
229
255
        break
230
256
      fi
231
257
      ;;
 
258
    msvisualcpp | msvcmsys)
 
259
      # This compiler won't grok `-c -o', but also, the minuso test has
 
260
      # not run yet.  These depmodes are late enough in the game, and
 
261
      # so weak that their functioning should not be impacted.
 
262
      am__obj=conftest.${OBJEXT-o}
 
263
      am__minus_obj=
 
264
      ;;
232
265
    none) break ;;
233
266
    esac
234
 
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
235
 
    # mode.  It turns out that the SunPro C++ compiler does not properly
236
 
    # handle `-M -o', and we need to detect this.
237
267
    if depmode=$depmode \
238
 
       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
 
268
       source=sub/conftest.c object=$am__obj \
239
269
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
240
 
       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
 
270
       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
241
271
         >/dev/null 2>conftest.err &&
242
272
       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
243
273
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
244
 
       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
 
274
       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
245
275
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
246
276
      # icc doesn't choke on unknown options, it will just issue warnings
247
277
      # or remarks (even with -Werror).  So we grep stderr for any message
298
328
 
299
329
# Generate code to set up dependency tracking.              -*- Autoconf -*-
300
330
 
301
 
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
 
331
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
302
332
# Free Software Foundation, Inc.
303
333
#
304
334
# This file is free software; the Free Software Foundation
305
335
# gives unlimited permission to copy and/or distribute it,
306
336
# with or without modifications, as long as this notice is preserved.
307
337
 
308
 
#serial 3
 
338
#serial 5
309
339
 
310
340
# _AM_OUTPUT_DEPENDENCY_COMMANDS
311
341
# ------------------------------
312
342
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
313
 
[for mf in $CONFIG_FILES; do
314
 
  # Strip MF so we end up with the name of the file.
315
 
  mf=`echo "$mf" | sed -e 's/:.*$//'`
316
 
  # Check whether this is an Automake generated Makefile or not.
317
 
  # We used to match only the files named `Makefile.in', but
318
 
  # some people rename them; so instead we look at the file content.
319
 
  # Grep'ing the first line is not enough: some people post-process
320
 
  # each Makefile.in and add a new line on top of each file to say so.
321
 
  # Grep'ing the whole file is not good either: AIX grep has a line
322
 
  # limit of 2048, but all sed's we know have understand at least 4000.
323
 
  if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
324
 
    dirpart=`AS_DIRNAME("$mf")`
325
 
  else
326
 
    continue
327
 
  fi
328
 
  # Extract the definition of DEPDIR, am__include, and am__quote
329
 
  # from the Makefile without running `make'.
330
 
  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
331
 
  test -z "$DEPDIR" && continue
332
 
  am__include=`sed -n 's/^am__include = //p' < "$mf"`
333
 
  test -z "am__include" && continue
334
 
  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
335
 
  # When using ansi2knr, U may be empty or an underscore; expand it
336
 
  U=`sed -n 's/^U = //p' < "$mf"`
337
 
  # Find all dependency output files, they are included files with
338
 
  # $(DEPDIR) in their names.  We invoke sed twice because it is the
339
 
  # simplest approach to changing $(DEPDIR) to its actual value in the
340
 
  # expansion.
341
 
  for file in `sed -n "
342
 
    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
343
 
       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
344
 
    # Make sure the directory exists.
345
 
    test -f "$dirpart/$file" && continue
346
 
    fdir=`AS_DIRNAME(["$file"])`
347
 
    AS_MKDIR_P([$dirpart/$fdir])
348
 
    # echo "creating $dirpart/$file"
349
 
    echo '# dummy' > "$dirpart/$file"
 
343
[{
 
344
  # Autoconf 2.62 quotes --file arguments for eval, but not when files
 
345
  # are listed without --file.  Let's play safe and only enable the eval
 
346
  # if we detect the quoting.
 
347
  case $CONFIG_FILES in
 
348
  *\'*) eval set x "$CONFIG_FILES" ;;
 
349
  *)   set x $CONFIG_FILES ;;
 
350
  esac
 
351
  shift
 
352
  for mf
 
353
  do
 
354
    # Strip MF so we end up with the name of the file.
 
355
    mf=`echo "$mf" | sed -e 's/:.*$//'`
 
356
    # Check whether this is an Automake generated Makefile or not.
 
357
    # We used to match only the files named `Makefile.in', but
 
358
    # some people rename them; so instead we look at the file content.
 
359
    # Grep'ing the first line is not enough: some people post-process
 
360
    # each Makefile.in and add a new line on top of each file to say so.
 
361
    # Grep'ing the whole file is not good either: AIX grep has a line
 
362
    # limit of 2048, but all sed's we know have understand at least 4000.
 
363
    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
 
364
      dirpart=`AS_DIRNAME("$mf")`
 
365
    else
 
366
      continue
 
367
    fi
 
368
    # Extract the definition of DEPDIR, am__include, and am__quote
 
369
    # from the Makefile without running `make'.
 
370
    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
 
371
    test -z "$DEPDIR" && continue
 
372
    am__include=`sed -n 's/^am__include = //p' < "$mf"`
 
373
    test -z "am__include" && continue
 
374
    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
    # Find all dependency output files, they are included files with
 
378
    # $(DEPDIR) in their names.  We invoke sed twice because it is the
 
379
    # simplest approach to changing $(DEPDIR) to its actual value in the
 
380
    # expansion.
 
381
    for file in `sed -n "
 
382
      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
      # Make sure the directory exists.
 
385
      test -f "$dirpart/$file" && continue
 
386
      fdir=`AS_DIRNAME(["$file"])`
 
387
      AS_MKDIR_P([$dirpart/$fdir])
 
388
      # echo "creating $dirpart/$file"
 
389
      echo '# dummy' > "$dirpart/$file"
 
390
    done
350
391
  done
351
 
done
 
392
}
352
393
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
353
394
 
354
395
 
380
421
# Do all the work for Automake.                             -*- Autoconf -*-
381
422
 
382
423
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
383
 
# 2005, 2006 Free Software Foundation, Inc.
 
424
# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
384
425
#
385
426
# This file is free software; the Free Software Foundation
386
427
# gives unlimited permission to copy and/or distribute it,
387
428
# with or without modifications, as long as this notice is preserved.
388
429
 
389
 
# serial 12
 
430
# serial 16
390
431
 
391
432
# This macro actually does too much.  Some checks are only needed if
392
433
# your package does certain things.  But this isn't really a big deal.
403
444
# arguments mandatory, and then we can depend on a new Autoconf
404
445
# release and drop the old call support.
405
446
AC_DEFUN([AM_INIT_AUTOMAKE],
406
 
[AC_PREREQ([2.60])dnl
 
447
[AC_PREREQ([2.62])dnl
407
448
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
408
449
dnl the ones we care about.
409
450
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
454
495
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
455
496
AM_MISSING_PROG(AUTOHEADER, autoheader)
456
497
AM_MISSING_PROG(MAKEINFO, makeinfo)
457
 
AM_PROG_INSTALL_SH
458
 
AM_PROG_INSTALL_STRIP
 
498
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 
499
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
459
500
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
460
501
# We need awk for the "check" target.  The system "awk" is bad on
461
502
# some platforms.
463
504
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
464
505
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
465
506
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
466
 
              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
467
 
                             [_AM_PROG_TAR([v7])])])
 
507
              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
 
508
                             [_AM_PROG_TAR([v7])])])
468
509
_AM_IF_OPTION([no-dependencies],,
469
510
[AC_PROVIDE_IFELSE([AC_PROG_CC],
470
 
                  [_AM_DEPENDENCIES(CC)],
471
 
                  [define([AC_PROG_CC],
472
 
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
 
511
                  [_AM_DEPENDENCIES(CC)],
 
512
                  [define([AC_PROG_CC],
 
513
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
473
514
AC_PROVIDE_IFELSE([AC_PROG_CXX],
474
 
                  [_AM_DEPENDENCIES(CXX)],
475
 
                  [define([AC_PROG_CXX],
476
 
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
 
515
                  [_AM_DEPENDENCIES(CXX)],
 
516
                  [define([AC_PROG_CXX],
 
517
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
477
518
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
478
 
                  [_AM_DEPENDENCIES(OBJC)],
479
 
                  [define([AC_PROG_OBJC],
480
 
                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
481
 
])
482
 
])
 
519
                  [_AM_DEPENDENCIES(OBJC)],
 
520
                  [define([AC_PROG_OBJC],
 
521
                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
 
522
])
 
523
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
 
524
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
 
525
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
 
526
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
 
527
AC_CONFIG_COMMANDS_PRE(dnl
 
528
[m4_provide_if([_AM_COMPILER_EXEEXT],
 
529
  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
 
530
])
 
531
 
 
532
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
 
533
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
 
534
dnl mangled by Autoconf and run in a shell conditional statement.
 
535
m4_define([_AC_COMPILER_EXEEXT],
 
536
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
483
537
 
484
538
 
485
539
# When config.status generates a header, we must update the stamp-h file.
491
545
# our stamp files there.
492
546
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
493
547
[# Compute $1's index in $config_headers.
 
548
_am_arg=$1
494
549
_am_stamp_count=1
495
550
for _am_header in $config_headers :; do
496
551
  case $_am_header in
497
 
    $1 | $1:* )
 
552
    $_am_arg | $_am_arg:* )
498
553
      break ;;
499
554
    * )
500
555
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
501
556
  esac
502
557
done
503
 
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
 
558
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
504
559
 
505
 
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
560
# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
506
561
#
507
562
# This file is free software; the Free Software Foundation
508
563
# gives unlimited permission to copy and/or distribute it,
513
568
# Define $install_sh.
514
569
AC_DEFUN([AM_PROG_INSTALL_SH],
515
570
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
516
 
install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
 
571
if test x"${install_sh}" != xset; then
 
572
  case $am_aux_dir in
 
573
  *\ * | *\     *)
 
574
    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
 
575
  *)
 
576
    install_sh="\${SHELL} $am_aux_dir/install-sh"
 
577
  esac
 
578
fi
517
579
AC_SUBST(install_sh)])
518
580
 
519
581
# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
540
602
# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
541
603
# From Jim Meyering
542
604
 
543
 
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
 
605
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
544
606
# Free Software Foundation, Inc.
545
607
#
546
608
# This file is free software; the Free Software Foundation
547
609
# gives unlimited permission to copy and/or distribute it,
548
610
# with or without modifications, as long as this notice is preserved.
549
611
 
550
 
# serial 4
 
612
# serial 5
551
613
 
 
614
# AM_MAINTAINER_MODE([DEFAULT-MODE])
 
615
# ----------------------------------
 
616
# Control maintainer-specific portions of Makefiles.
 
617
# Default is to disable them, unless `enable' is passed literally.
 
618
# For symmetry, `disable' may be passed as well.  Anyway, the user
 
619
# can override the default with the --enable/--disable switch.
552
620
AC_DEFUN([AM_MAINTAINER_MODE],
553
 
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
554
 
  dnl maintainer-mode is disabled by default
555
 
  AC_ARG_ENABLE(maintainer-mode,
556
 
[  --enable-maintainer-mode  enable make rules and dependencies not useful
 
621
[m4_case(m4_default([$1], [disable]),
 
622
       [enable], [m4_define([am_maintainer_other], [disable])],
 
623
       [disable], [m4_define([am_maintainer_other], [enable])],
 
624
       [m4_define([am_maintainer_other], [enable])
 
625
        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
 
626
AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
 
627
  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
 
628
  AC_ARG_ENABLE([maintainer-mode],
 
629
[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
557
630
                          (and sometimes confusing) to the casual installer],
558
 
      USE_MAINTAINER_MODE=$enableval,
559
 
      USE_MAINTAINER_MODE=no)
 
631
      [USE_MAINTAINER_MODE=$enableval],
 
632
      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
560
633
  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
561
 
  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
 
634
  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
562
635
  MAINT=$MAINTAINER_MODE_TRUE
563
 
  AC_SUBST(MAINT)dnl
 
636
  AC_SUBST([MAINT])dnl
564
637
]
565
638
)
566
639
 
568
641
 
569
642
# Check to see how 'make' treats includes.                  -*- Autoconf -*-
570
643
 
571
 
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
 
644
# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
572
645
#
573
646
# This file is free software; the Free Software Foundation
574
647
# gives unlimited permission to copy and/or distribute it,
575
648
# with or without modifications, as long as this notice is preserved.
576
649
 
577
 
# serial 3
 
650
# serial 4
578
651
 
579
652
# AM_MAKE_INCLUDE()
580
653
# -----------------
583
656
[am_make=${MAKE-make}
584
657
cat > confinc << 'END'
585
658
am__doit:
586
 
        @echo done
 
659
        @echo this is the am__doit target
587
660
.PHONY: am__doit
588
661
END
589
662
# If we don't find an include directive, just comment out the code.
593
666
_am_result=none
594
667
# First try GNU make style include.
595
668
echo "include confinc" > confmf
596
 
# We grep out `Entering directory' and `Leaving directory'
597
 
# messages which can occur if `w' ends up in MAKEFLAGS.
598
 
# In particular we don't look at `^make:' because GNU make might
599
 
# be invoked under some other name (usually "gmake"), in which
600
 
# case it prints its new name instead of `make'.
601
 
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
602
 
   am__include=include
603
 
   am__quote=
604
 
   _am_result=GNU
605
 
fi
 
669
# Ignore all kinds of additional output from `make'.
 
670
case `$am_make -s -f confmf 2> /dev/null` in #(
 
671
*the\ am__doit\ target*)
 
672
  am__include=include
 
673
  am__quote=
 
674
  _am_result=GNU
 
675
  ;;
 
676
esac
606
677
# Now try BSD make style include.
607
678
if test "$am__include" = "#"; then
608
679
   echo '.include "confinc"' > confmf
609
 
   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
610
 
      am__include=.include
611
 
      am__quote="\""
612
 
      _am_result=BSD
613
 
   fi
 
680
   case `$am_make -s -f confmf 2> /dev/null` in #(
 
681
   *the\ am__doit\ target*)
 
682
     am__include=.include
 
683
     am__quote="\""
 
684
     _am_result=BSD
 
685
     ;;
 
686
   esac
614
687
fi
615
688
AC_SUBST([am__include])
616
689
AC_SUBST([am__quote])
620
693
 
621
694
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
622
695
 
623
 
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
 
696
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
624
697
# Free Software Foundation, Inc.
625
698
#
626
699
# This file is free software; the Free Software Foundation
627
700
# gives unlimited permission to copy and/or distribute it,
628
701
# with or without modifications, as long as this notice is preserved.
629
702
 
630
 
# serial 5
 
703
# serial 6
631
704
 
632
705
# AM_MISSING_PROG(NAME, PROGRAM)
633
706
# ------------------------------
644
717
AC_DEFUN([AM_MISSING_HAS_RUN],
645
718
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
646
719
AC_REQUIRE_AUX_FILE([missing])dnl
647
 
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
 
720
if test x"${MISSING+set}" != xset; then
 
721
  case $am_aux_dir in
 
722
  *\ * | *\     *)
 
723
    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
 
724
  *)
 
725
    MISSING="\${SHELL} $am_aux_dir/missing" ;;
 
726
  esac
 
727
fi
648
728
# Use eval to expand $SHELL
649
729
if eval "$MISSING --run true"; then
650
730
  am_missing_run="$MISSING --run "
682
762
 
683
763
# Helper functions for option handling.                     -*- Autoconf -*-
684
764
 
685
 
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
 
765
# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
686
766
#
687
767
# This file is free software; the Free Software Foundation
688
768
# gives unlimited permission to copy and/or distribute it,
689
769
# with or without modifications, as long as this notice is preserved.
690
770
 
691
 
# serial 3
 
771
# serial 4
692
772
 
693
773
# _AM_MANGLE_OPTION(NAME)
694
774
# -----------------------
705
785
# ----------------------------------
706
786
# OPTIONS is a space-separated list of Automake options.
707
787
AC_DEFUN([_AM_SET_OPTIONS],
708
 
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 
788
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
709
789
 
710
790
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
711
791
# -------------------------------------------
715
795
 
716
796
# Check to make sure that the build environment is sane.    -*- Autoconf -*-
717
797
 
718
 
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
 
798
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
719
799
# Free Software Foundation, Inc.
720
800
#
721
801
# This file is free software; the Free Software Foundation
722
802
# gives unlimited permission to copy and/or distribute it,
723
803
# with or without modifications, as long as this notice is preserved.
724
804
 
725
 
# serial 4
 
805
# serial 5
726
806
 
727
807
# AM_SANITY_CHECK
728
808
# ---------------
731
811
# Just in case
732
812
sleep 1
733
813
echo timestamp > conftest.file
 
814
# Reject unsafe characters in $srcdir or the absolute working directory
 
815
# name.  Accept space and tab only in the latter.
 
816
am_lf='
 
817
'
 
818
case `pwd` in
 
819
  *[[\\\"\#\$\&\'\`$am_lf]]*)
 
820
    AC_MSG_ERROR([unsafe absolute working directory name]);;
 
821
esac
 
822
case $srcdir in
 
823
  *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
 
824
    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
 
825
esac
 
826
 
734
827
# Do `set' in a subshell so we don't clobber the current shell's
735
828
# arguments.  Must try -L first in case configure is actually a
736
829
# symlink; some systems play weird games with the mod time of symlinks
737
830
# (eg FreeBSD returns the mod time of the symlink's containing
738
831
# directory).
739
832
if (
740
 
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
 
833
   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
741
834
   if test "$[*]" = "X"; then
742
835
      # -L didn't work.
743
 
      set X `ls -t $srcdir/configure conftest.file`
 
836
      set X `ls -t "$srcdir/configure" conftest.file`
744
837
   fi
745
838
   rm -f conftest.file
746
839
   if test "$[*]" != "X $srcdir/configure conftest.file" \
765
858
fi
766
859
AC_MSG_RESULT(yes)])
767
860
 
 
861
# Copyright (C) 2009  Free Software Foundation, Inc.
 
862
#
 
863
# This file is free software; the Free Software Foundation
 
864
# gives unlimited permission to copy and/or distribute it,
 
865
# with or without modifications, as long as this notice is preserved.
 
866
 
 
867
# serial 1
 
868
 
 
869
# AM_SILENT_RULES([DEFAULT])
 
870
# --------------------------
 
871
# Enable less verbose build rules; with the default set to DEFAULT
 
872
# (`yes' being less verbose, `no' or empty being verbose).
 
873
AC_DEFUN([AM_SILENT_RULES],
 
874
[AC_ARG_ENABLE([silent-rules],
 
875
[  --enable-silent-rules          less verbose build output (undo: `make V=1')
 
876
  --disable-silent-rules         verbose build output (undo: `make V=0')])
 
877
case $enable_silent_rules in
 
878
yes) AM_DEFAULT_VERBOSITY=0;;
 
879
no)  AM_DEFAULT_VERBOSITY=1;;
 
880
*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
 
881
esac
 
882
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
 
883
AM_BACKSLASH='\'
 
884
AC_SUBST([AM_BACKSLASH])dnl
 
885
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
 
886
])
 
887
 
768
888
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
769
889
#
770
890
# This file is free software; the Free Software Foundation
793
913
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
794
914
AC_SUBST([INSTALL_STRIP_PROGRAM])])
795
915
 
796
 
# Copyright (C) 2006  Free Software Foundation, Inc.
 
916
# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
797
917
#
798
918
# This file is free software; the Free Software Foundation
799
919
# gives unlimited permission to copy and/or distribute it,
800
920
# with or without modifications, as long as this notice is preserved.
801
921
 
 
922
# serial 2
 
923
 
802
924
# _AM_SUBST_NOTMAKE(VARIABLE)
803
925
# ---------------------------
804
 
# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in.
 
926
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
805
927
# This macro is traced by Automake.
806
928
AC_DEFUN([_AM_SUBST_NOTMAKE])
807
929
 
 
930
# AM_SUBST_NOTMAKE(VARIABLE)
 
931
# ---------------------------
 
932
# Public sister of _AM_SUBST_NOTMAKE.
 
933
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
934
 
808
935
# Check how to create a tarball.                            -*- Autoconf -*-
809
936
 
810
937
# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
901
1028
AC_SUBST([am__untar])
902
1029
]) # _AM_PROG_TAR
903
1030
 
 
1031
dnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
904
1032
dnl
905
1033
dnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
906
1034
dnl 
937
1065
# your configure.ac with the minimum required version, such as:
938
1066
# XORG_MACROS_VERSION(1.1)
939
1067
#
940
 
# To force at least a version with this macro defined, also add:
941
 
# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])])
 
1068
# To ensure that this macro is defined, also add:
 
1069
# m4_ifndef([XORG_MACROS_VERSION],
 
1070
#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
942
1071
#
943
1072
#
944
1073
# See the "minimum version" comment for each macro you use to see what 
945
1074
# version you require.
946
 
AC_DEFUN([XORG_MACROS_VERSION],[
947
 
        [XORG_MACROS_needed_version=$1
948
 
        XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
949
 
        XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
950
 
        AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
951
 
        [XORG_MACROS_version=1.1.5
952
 
        XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
953
 
        XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
954
 
        if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
955
 
                AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x])
956
 
        fi
957
 
        if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then
958
 
                AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer])
959
 
        fi
960
 
        AC_MSG_RESULT([yes, $XORG_MACROS_version])
 
1075
m4_defun([XORG_MACROS_VERSION],[
 
1076
m4_define([vers_have], [1.3.0])
 
1077
m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
 
1078
m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
 
1079
m4_if(m4_cmp(maj_have, maj_needed), 0,,
 
1080
    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
 
1081
m4_if(m4_version_compare(vers_have, [$1]), -1,
 
1082
    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
 
1083
m4_undefine([vers_have])
 
1084
m4_undefine([maj_have])
 
1085
m4_undefine([maj_needed])
961
1086
]) # XORG_MACROS_VERSION
962
1087
 
963
1088
# XORG_PROG_RAWCPP()
982
1107
        if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
983
1108
                RAWCPPFLAGS=-undef
984
1109
                AC_MSG_RESULT([yes])
 
1110
        # under Cygwin unix is still defined even with -undef
 
1111
        elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
 
1112
                RAWCPPFLAGS="-undef -ansi"
 
1113
                AC_MSG_RESULT([yes, with -ansi])
985
1114
        else
986
1115
                AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
987
1116
        fi
1094
1223
# Whether or not the necessary tools and files are found can be checked
1095
1224
# with the AM_CONDITIONAL "BUILD_LINUXDOC"
1096
1225
AC_DEFUN([XORG_CHECK_LINUXDOC],[
1097
 
XORG_SGML_PATH=$prefix/share/sgml
 
1226
if test x$XORG_SGML_PATH = x ; then
 
1227
    XORG_SGML_PATH=$prefix/share/sgml
 
1228
fi
1098
1229
HAVE_DEFS_ENT=
1099
1230
 
1100
 
AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
 
1231
if test x"$cross_compiling" = x"yes" ; then
 
1232
  HAVE_DEFS_ENT=no
 
1233
else
 
1234
  AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
 
1235
fi
1101
1236
 
1102
1237
AC_PATH_PROG(LINUXDOC, linuxdoc)
1103
1238
AC_PATH_PROG(PS2PDF, ps2pdf)
1146
1281
# indicates whether the necessary tools and files are found and, if set,
1147
1282
# $(MAKE_XXX) blah.sgml will produce blah.xxx.
1148
1283
AC_DEFUN([XORG_CHECK_DOCBOOK],[
1149
 
XORG_SGML_PATH=$prefix/share/sgml
 
1284
if test x$XORG_SGML_PATH = x ; then
 
1285
    XORG_SGML_PATH=$prefix/share/sgml
 
1286
fi
1150
1287
HAVE_DEFS_ENT=
1151
1288
BUILDTXTDOC=no
1152
1289
BUILDPDFDOC=no
1212
1349
# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
1213
1350
AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
1214
1351
AC_ARG_ENABLE(malloc0returnsnull,
1215
 
        AC_HELP_STRING([--enable-malloc0returnsnull],
 
1352
        AS_HELP_STRING([--enable-malloc0returnsnull],
1216
1353
                       [malloc(0) returns NULL (default: auto)]),
1217
1354
        [MALLOC_ZERO_RETURNS_NULL=$enableval],
1218
1355
        [MALLOC_ZERO_RETURNS_NULL=auto])
1264
1401
AC_DEFUN([XORG_WITH_LINT],[
1265
1402
 
1266
1403
# Allow checking code with lint, sparse, etc.
1267
 
AC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
 
1404
AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
1268
1405
                [Use a lint-style source code checker (default: disabled)])],
1269
1406
                [use_lint=$withval], [use_lint=no])
1270
1407
if test "x$use_lint" = "xyes" ; then
1305
1442
AC_DEFUN([XORG_LINT_LIBRARY],[
1306
1443
AC_REQUIRE([XORG_WITH_LINT])
1307
1444
# Build lint "library" for more indepth checks of programs calling this library
1308
 
AC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
 
1445
AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
1309
1446
        [Create lint library (default: disabled)])],
1310
1447
        [make_lint_lib=$enableval], [make_lint_lib=no])
1311
1448
if test "x$make_lint_lib" != "xno" ; then
1323
1460
 
1324
1461
]) # XORG_LINT_LIBRARY
1325
1462
 
 
1463
# XORG_CWARNFLAGS
 
1464
# ---------------
 
1465
# Minimum version: 1.2.0
 
1466
#
 
1467
# Defines CWARNFLAGS to enable C compiler warnings.
 
1468
#
 
1469
AC_DEFUN([XORG_CWARNFLAGS], [
 
1470
AC_REQUIRE([AC_PROG_CC])
 
1471
if  test "x$GCC" = xyes ; then
 
1472
    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
 
1473
-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
 
1474
-Wbad-function-cast"
 
1475
    case `$CC -dumpversion` in
 
1476
    3.4.* | 4.*)
 
1477
        CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
 
1478
        ;;
 
1479
    esac
 
1480
else
 
1481
    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
 
1482
    if test "x$SUNCC" = "xyes"; then
 
1483
        CWARNFLAGS="-v"
 
1484
    fi
 
1485
fi
 
1486
AC_SUBST(CWARNFLAGS)
 
1487
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
1488
]) # XORG_CWARNFLAGS
 
1489
 
 
1490
# XORG_STRICT_OPTION
 
1491
# -----------------------
 
1492
# Minimum version: 1.3.0
 
1493
#
 
1494
# Add configure option to enable strict compilation
 
1495
AC_DEFUN([XORG_STRICT_OPTION], [
 
1496
AC_REQUIRE([AC_PROG_CC])
 
1497
AC_REQUIRE([AC_PROG_CC_C99])
 
1498
AC_REQUIRE([XORG_CWARNFLAGS])
 
1499
 
 
1500
AC_ARG_ENABLE(strict-compilation,
 
1501
                          AS_HELP_STRING([--enable-strict-compilation],
 
1502
                          [Enable all warnings from compiler and make them errors (default: disabled)]),
 
1503
                          [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
 
1504
if test "x$STRICT_COMPILE" = "xyes"; then
 
1505
        AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
 
1506
        AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
 
1507
        if test "x$GCC" = xyes ; then
 
1508
                STRICT_CFLAGS="-pedantic -Werror"
 
1509
        elif test "x$SUNCC" = "xyes"; then
 
1510
                STRICT_CFLAGS="-errwarn"
 
1511
    elif test "x$INTELCC" = "xyes"; then
 
1512
                STRICT_CFLAGS="-Werror"
 
1513
        fi
 
1514
fi
 
1515
CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
 
1516
AC_SUBST([CWARNFLAGS])
 
1517
]) # XORG_STRICT_OPTION
 
1518
 
 
1519
# XORG_DEFAULT_OPTIONS
 
1520
# --------------------
 
1521
# Minimum version: 1.3.0
 
1522
#
 
1523
# Defines default options for X.Org modules.
 
1524
#
 
1525
AC_DEFUN([XORG_DEFAULT_OPTIONS], [
 
1526
XORG_CWARNFLAGS
 
1527
XORG_STRICT_OPTION
 
1528
XORG_RELEASE_VERSION
 
1529
XORG_CHANGELOG
 
1530
XORG_MANPAGE_SECTIONS
 
1531
]) # XORG_DEFAULT_OPTIONS
1326
1532
dnl Copyright 2005 Red Hat, Inc
1327
1533
dnl
1328
1534
dnl Permission to use, copy, modify, distribute, and sell this software and its
1357
1563
 
1358
1564
AC_DEFUN([XORG_RELEASE_VERSION],[
1359
1565
        AC_ARG_WITH(release-version,
1360
 
                        AC_HELP_STRING([--with-release-version=STRING],
 
1566
                        AS_HELP_STRING([--with-release-version=STRING],
1361
1567
                                [Use release version string in package name]),
1362
1568
                        [RELEASE_VERSION="$withval"],
1363
1569
                        [RELEASE_VERSION=""])
1369
1575
        AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
1370
1576
                [`echo $PACKAGE_VERSION | cut -d . -f 1`],
1371
1577
                [Major version of this package])
1372
 
        PVM=`echo $PACKAGE_VERSION | cut -d . -f 2`
 
1578
        PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
1373
1579
        if test "x$PVM" = "x"; then
1374
1580
                PVM="0"
1375
1581
        fi
1376
1582
        AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
1377
1583
                [$PVM],
1378
1584
                [Minor version of this package])
1379
 
        PVP=`echo $PACKAGE_VERSION | cut -d . -f 3`
 
1585
        PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
1380
1586
        if test "x$PVP" = "x"; then
1381
1587
                PVP="0"
1382
1588
        fi
1385
1591
                [Patch version of this package])
1386
1592
])
1387
1593
 
 
1594
# XORG_CHANGELOG()
 
1595
# ----------------
 
1596
# Minimum version: 1.2.0
 
1597
#
 
1598
# Defines the variable CHANGELOG_CMD as the command to generate
 
1599
# ChangeLog from git.
 
1600
#
 
1601
# Arrange that distcleancheck ignores ChangeLog left over by distclean.
 
1602
#
 
1603
AC_DEFUN([XORG_CHANGELOG], [
 
1604
CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \
 
1605
mv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
 
1606
echo 'git directory not found: installing possibly empty changelog.' >&2)"
 
1607
AC_SUBST([CHANGELOG_CMD])
 
1608
AC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print'])
 
1609
]) # XORG_CHANGELOG
 
1610
 
1388
1611
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
1389
1612
1390
1613
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
1418
1641
        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1419
1642
fi
1420
1643
if test -n "$PKG_CONFIG"; then
1421
 
        _pkg_min_version=m4_ifval([$1], [$1], [0.9.0])
 
1644
        _pkg_min_version=m4_default([$1], [0.9.0])
1422
1645
        AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
1423
1646
        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1424
1647
                AC_MSG_RESULT([yes])
1453
1676
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
1454
1677
# ---------------------------------------------
1455
1678
m4_define([_PKG_CONFIG],
1456
 
[if test -n "$PKG_CONFIG"; then
1457
 
        PKG_CHECK_EXISTS([$3],
1458
 
                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
1459
 
                         [pkg_failed=yes])
1460
 
else
1461
 
        pkg_failed=untried
 
1679
[if test -n "$$1"; then
 
1680
    pkg_cv_[]$1="$$1"
 
1681
 elif test -n "$PKG_CONFIG"; then
 
1682
    PKG_CHECK_EXISTS([$3],
 
1683
                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
 
1684
                     [pkg_failed=yes])
 
1685
 else
 
1686
    pkg_failed=untried
1462
1687
fi[]dnl
1463
1688
])# _PKG_CONFIG
1464
1689
 
 
1690
# _PKG_SHORT_ERRORS_SUPPORTED
 
1691
# -----------------------------
 
1692
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
 
1693
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 
1694
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
 
1695
        _pkg_short_errors_supported=yes
 
1696
else
 
1697
        _pkg_short_errors_supported=no
 
1698
fi[]dnl
 
1699
])# _PKG_SHORT_ERRORS_SUPPORTED
 
1700
 
 
1701
 
1465
1702
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1466
1703
# [ACTION-IF-NOT-FOUND])
1467
1704
#
1483
1720
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1484
1721
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
1485
1722
 
 
1723
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
 
1724
and $1[]_LIBS to avoid the need to call pkg-config.
 
1725
See the pkg-config man page for more details.])
 
1726
 
1486
1727
if test $pkg_failed = yes; then
1487
 
        $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
 
1728
        _PKG_SHORT_ERRORS_SUPPORTED
 
1729
        if test $_pkg_short_errors_supported = yes; then
 
1730
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
 
1731
        else 
 
1732
                $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
 
1733
        fi
1488
1734
        # Put the nasty error message in config.log where it belongs
1489
 
        echo "$$1[]_PKG_ERRORS" 1>&AS_MESSAGE_LOG_FD
 
1735
        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1490
1736
 
1491
1737
        ifelse([$4], , [AC_MSG_ERROR(dnl
1492
 
[Package requirements ($2) were not met.
 
1738
[Package requirements ($2) were not met:
 
1739
 
 
1740
$$1_PKG_ERRORS
 
1741
 
1493
1742
Consider adjusting the PKG_CONFIG_PATH environment variable if you
1494
1743
installed software in a non-standard prefix.
1495
1744
 
1496
 
Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables
1497
 
to avoid the need to call pkg-config.  See the pkg-config man page for
1498
 
more details.])],
1499
 
                [$4])
 
1745
_PKG_TEXT
 
1746
])],
 
1747
                [AC_MSG_RESULT([no])
 
1748
                $4])
1500
1749
elif test $pkg_failed = untried; then
1501
1750
        ifelse([$4], , [AC_MSG_FAILURE(dnl
1502
1751
[The pkg-config script could not be found or is too old.  Make sure it
1503
1752
is in your PATH or set the PKG_CONFIG environment variable to the full
1504
1753
path to pkg-config.
1505
1754
 
1506
 
Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables
1507
 
to avoid the need to call pkg-config.  See the pkg-config man page for
1508
 
more details.
 
1755
_PKG_TEXT
1509
1756
 
1510
 
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
 
1757
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
1511
1758
                [$4])
1512
1759
else
1513
1760
        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS