1
# generated automatically by aclocal 1.10 -*- Autoconf -*-
1
# generated automatically by aclocal 1.11 -*- Autoconf -*-
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.
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'.])])
19
# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
22
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
21
24
# This file is free software; the Free Software Foundation
22
25
# gives unlimited permission to copy and/or distribute it,
106
111
# AM_CONDITIONAL -*- Autoconf -*-
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.
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.
117
122
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
118
123
# -------------------------------------
138
144
Usually this means the macro was only invoked conditionally.]])
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.
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.
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,
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}
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
299
329
# Generate code to set up dependency tracking. -*- Autoconf -*-
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.
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.
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")`
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
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"
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 ;;
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")`
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
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"
352
393
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
380
421
# Do all the work for Automake. -*- Autoconf -*-
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.
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.
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.
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
519
[_AM_DEPENDENCIES(OBJC)],
520
[define([AC_PROG_OBJC],
521
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
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
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])])
485
539
# When config.status generates a header, we must update the stamp-h file.
540
602
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
541
603
# From Jim Meyering
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.
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.
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
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
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*)
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
680
case `$am_make -s -f confmf 2> /dev/null` in #(
681
*the\ am__doit\ target*)
615
688
AC_SUBST([am__include])
616
689
AC_SUBST([am__quote])
621
694
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
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.
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.
632
705
# AM_MISSING_PROG(NAME, PROGRAM)
633
706
# ------------------------------
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.
819
*[[\\\"\#\$\&\'\`$am_lf]]*)
820
AC_MSG_ERROR([unsafe absolute working directory name]);;
823
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
824
AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
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
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`
745
838
rm -f conftest.file
746
839
if test "$[*]" != "X $srcdir/configure conftest.file" \
766
859
AC_MSG_RESULT(yes)])
861
# Copyright (C) 2009 Free Software Foundation, Inc.
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.
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]);;
882
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
884
AC_SUBST([AM_BACKSLASH])dnl
885
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
768
888
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
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])])
796
# Copyright (C) 2006 Free Software Foundation, Inc.
916
# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
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.
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])
930
# AM_SUBST_NOTMAKE(VARIABLE)
931
# ---------------------------
932
# Public sister of _AM_SUBST_NOTMAKE.
933
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
808
935
# Check how to create a tarball. -*- Autoconf -*-
810
937
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
937
1065
# your configure.ac with the minimum required version, such as:
938
1066
# XORG_MACROS_VERSION(1.1)
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])])
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])
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])
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
963
1088
# XORG_PROG_RAWCPP()
1324
1461
]) # XORG_LINT_LIBRARY
1465
# Minimum version: 1.2.0
1467
# Defines CWARNFLAGS to enable C compiler warnings.
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
1477
CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
1481
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
1482
if test "x$SUNCC" = "xyes"; then
1486
AC_SUBST(CWARNFLAGS)
1487
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
1488
]) # XORG_CWARNFLAGS
1490
# XORG_STRICT_OPTION
1491
# -----------------------
1492
# Minimum version: 1.3.0
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])
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"
1515
CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
1516
AC_SUBST([CWARNFLAGS])
1517
]) # XORG_STRICT_OPTION
1519
# XORG_DEFAULT_OPTIONS
1520
# --------------------
1521
# Minimum version: 1.3.0
1523
# Defines default options for X.Org modules.
1525
AC_DEFUN([XORG_DEFAULT_OPTIONS], [
1528
XORG_RELEASE_VERSION
1530
XORG_MANPAGE_SECTIONS
1531
]) # XORG_DEFAULT_OPTIONS
1326
1532
dnl Copyright 2005 Red Hat, Inc
1328
1534
dnl Permission to use, copy, modify, distribute, and sell this software and its
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`],
1679
[if test -n "$$1"; then
1681
elif test -n "$PKG_CONFIG"; then
1682
PKG_CHECK_EXISTS([$3],
1683
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
1463
1688
])# _PKG_CONFIG
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
1697
_pkg_short_errors_supported=no
1699
])# _PKG_SHORT_ERRORS_SUPPORTED
1465
1702
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1466
1703
# [ACTION-IF-NOT-FOUND])
1483
1720
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1484
1721
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
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.])
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`
1732
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
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
1491
1737
ifelse([$4], , [AC_MSG_ERROR(dnl
1492
[Package requirements ($2) were not met.
1738
[Package requirements ($2) were not met:
1493
1742
Consider adjusting the PKG_CONFIG_PATH environment variable if you
1494
1743
installed software in a non-standard prefix.
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
1747
[AC_MSG_RESULT([no])
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.
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
1510
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
1757
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
1513
1760
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS