1
# generated automatically by aclocal 1.10 -*- Autoconf -*-
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4
# 2005, 2006 Free Software Foundation, Inc.
5
# This file is free software; the Free Software Foundation
6
# gives unlimited permission to copy and/or distribute it,
7
# with or without modifications, as long as this notice is preserved.
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
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])])
19
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
21
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
23
# This program is free software; you can redistribute it and/or modify
24
# it under the terms of the GNU General Public License as published by
25
# the Free Software Foundation; either version 2 of the License, or
26
# (at your option) any later version.
28
# This program is distributed in the hope that it will be useful, but
29
# WITHOUT ANY WARRANTY; without even the implied warranty of
30
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
31
# General Public License for more details.
33
# You should have received a copy of the GNU General Public License
34
# along with this program; if not, write to the Free Software
35
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
37
# As a special exception to the GNU General Public License, if you
38
# distribute this file as part of a program that contains a
39
# configuration script generated by Autoconf, you may include it under
40
# the same distribution terms that you use for the rest of that program.
42
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
43
# ----------------------------------
44
AC_DEFUN([PKG_PROG_PKG_CONFIG],
45
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
46
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
47
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
48
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
49
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
51
if test -n "$PKG_CONFIG"; then
52
_pkg_min_version=m4_default([$1], [0.9.0])
53
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
54
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
62
])# PKG_PROG_PKG_CONFIG
64
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
66
# Check to see whether a particular set of modules exists. Similar
67
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
70
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
71
# this or PKG_CHECK_MODULES is called, or make sure to call
72
# PKG_CHECK_EXISTS manually
73
# --------------------------------------------------------------
74
AC_DEFUN([PKG_CHECK_EXISTS],
75
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
76
if test -n "$PKG_CONFIG" && \
77
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
78
m4_ifval([$2], [$2], [:])
84
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
85
# ---------------------------------------------
86
m4_define([_PKG_CONFIG],
87
[if test -n "$PKG_CONFIG"; then
88
if test -n "$$1"; then
91
PKG_CHECK_EXISTS([$3],
92
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
100
# _PKG_SHORT_ERRORS_SUPPORTED
101
# -----------------------------
102
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
103
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
104
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
105
_pkg_short_errors_supported=yes
107
_pkg_short_errors_supported=no
109
])# _PKG_SHORT_ERRORS_SUPPORTED
112
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
113
# [ACTION-IF-NOT-FOUND])
116
# Note that if there is a possibility the first call to
117
# PKG_CHECK_MODULES might not happen, you should be sure to include an
118
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
121
# --------------------------------------------------------------
122
AC_DEFUN([PKG_CHECK_MODULES],
123
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
124
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
125
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
128
AC_MSG_CHECKING([for $1])
130
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
131
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
133
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
134
and $1[]_LIBS to avoid the need to call pkg-config.
135
See the pkg-config man page for more details.])
137
if test $pkg_failed = yes; then
138
_PKG_SHORT_ERRORS_SUPPORTED
139
if test $_pkg_short_errors_supported = yes; then
140
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
142
$1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
144
# Put the nasty error message in config.log where it belongs
145
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
147
ifelse([$4], , [AC_MSG_ERROR(dnl
148
[Package requirements ($2) were not met:
152
Consider adjusting the PKG_CONFIG_PATH environment variable if you
153
installed software in a non-standard prefix.
159
elif test $pkg_failed = untried; then
160
ifelse([$4], , [AC_MSG_FAILURE(dnl
161
[The pkg-config script could not be found or is too old. Make sure it
162
is in your PATH or set the PKG_CONFIG environment variable to the full
167
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
170
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
171
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
173
ifelse([$3], , :, [$3])
175
])# PKG_CHECK_MODULES
178
dnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved.
180
dnl Permission is hereby granted, free of charge, to any person obtaining a
181
dnl copy of this software and associated documentation files (the
182
dnl "Software"), to deal in the Software without restriction, including
183
dnl without limitation the rights to use, copy, modify, merge, publish,
184
dnl distribute, and/or sell copies of the Software, and to permit persons
185
dnl to whom the Software is furnished to do so, provided that the above
186
dnl copyright notice(s) and this permission notice appear in all copies of
187
dnl the Software and that both the above copyright notice(s) and this
188
dnl permission notice appear in supporting documentation.
190
dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
191
dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
192
dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
193
dnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
194
dnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
195
dnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
196
dnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
197
dnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
198
dnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
200
dnl Except as contained in this notice, the name of a copyright holder
201
dnl shall not be used in advertising or otherwise to promote the sale, use
202
dnl or other dealings in this Software without prior written authorization
203
dnl of the copyright holder.
205
# XORG_MACROS_VERSION(required-version)
206
# -------------------------------------
207
# Minimum version: 1.1.0
209
# If you're using a macro added in Version 1.1 or newer, include this in
210
# your configure.ac with the minimum required version, such as:
211
# XORG_MACROS_VERSION(1.1)
213
# To force at least a version with this macro defined, also add:
214
# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])])
217
# See the "minimum version" comment for each macro you use to see what
218
# version you require.
219
AC_DEFUN([XORG_MACROS_VERSION],[
220
[XORG_MACROS_needed_version=$1
221
XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
222
XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
223
AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
224
[XORG_MACROS_version=1.1.5
225
XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
226
XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
227
if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
228
AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x])
230
if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then
231
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])
233
AC_MSG_RESULT([yes, $XORG_MACROS_version])
234
]) # XORG_MACROS_VERSION
238
# Minimum version: 1.0.0
240
# Find cpp program and necessary flags for use in pre-processing text files
241
# such as man pages and config files
242
AC_DEFUN([XORG_PROG_RAWCPP],[
243
AC_REQUIRE([AC_PROG_CPP])
244
AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}],
245
[$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
247
# Check for flag to avoid builtin definitions - assumes unix is predefined,
248
# which is not the best choice for supporting other OS'es, but covers most
249
# of the ones we need for now.
250
AC_MSG_CHECKING([if $RAWCPP requires -undef])
251
AC_LANG_CONFTEST([Does cpp redefine unix ?])
252
if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
255
if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
259
AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.])
262
rm -f conftest.$ac_ext
264
AC_MSG_CHECKING([if $RAWCPP requires -traditional])
265
AC_LANG_CONFTEST([Does cpp preserve "whitespace"?])
266
if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
269
if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
270
RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
273
AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.])
276
rm -f conftest.$ac_ext
277
AC_SUBST(RAWCPPFLAGS)
278
]) # XORG_PROG_RAWCPP
280
# XORG_MANPAGE_SECTIONS()
281
# -----------------------
282
# Minimum version: 1.0.0
284
# Determine which sections man pages go in for the different man page types
285
# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
286
# Not sure if there's any better way than just hardcoding by OS name.
287
# Override default settings by setting environment variables
289
AC_DEFUN([XORG_MANPAGE_SECTIONS],[
290
AC_REQUIRE([AC_CANONICAL_HOST])
292
if test x$APP_MAN_SUFFIX = x ; then
295
if test x$APP_MAN_DIR = x ; then
296
APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
299
if test x$LIB_MAN_SUFFIX = x ; then
302
if test x$LIB_MAN_DIR = x ; then
303
LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
306
if test x$FILE_MAN_SUFFIX = x ; then
308
solaris*) FILE_MAN_SUFFIX=4 ;;
309
*) FILE_MAN_SUFFIX=5 ;;
312
if test x$FILE_MAN_DIR = x ; then
313
FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
316
if test x$MISC_MAN_SUFFIX = x ; then
318
solaris*) MISC_MAN_SUFFIX=5 ;;
319
*) MISC_MAN_SUFFIX=7 ;;
322
if test x$MISC_MAN_DIR = x ; then
323
MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
326
if test x$DRIVER_MAN_SUFFIX = x ; then
328
solaris*) DRIVER_MAN_SUFFIX=7 ;;
329
*) DRIVER_MAN_SUFFIX=4 ;;
332
if test x$DRIVER_MAN_DIR = x ; then
333
DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
336
if test x$ADMIN_MAN_SUFFIX = x ; then
338
solaris*) ADMIN_MAN_SUFFIX=1m ;;
339
*) ADMIN_MAN_SUFFIX=8 ;;
342
if test x$ADMIN_MAN_DIR = x ; then
343
ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
347
AC_SUBST([APP_MAN_SUFFIX])
348
AC_SUBST([LIB_MAN_SUFFIX])
349
AC_SUBST([FILE_MAN_SUFFIX])
350
AC_SUBST([MISC_MAN_SUFFIX])
351
AC_SUBST([DRIVER_MAN_SUFFIX])
352
AC_SUBST([ADMIN_MAN_SUFFIX])
353
AC_SUBST([APP_MAN_DIR])
354
AC_SUBST([LIB_MAN_DIR])
355
AC_SUBST([FILE_MAN_DIR])
356
AC_SUBST([MISC_MAN_DIR])
357
AC_SUBST([DRIVER_MAN_DIR])
358
AC_SUBST([ADMIN_MAN_DIR])
359
]) # XORG_MANPAGE_SECTIONS
361
# XORG_CHECK_LINUXDOC
362
# -------------------
363
# Minimum version: 1.0.0
365
# Defines the variable MAKE_TEXT if the necessary tools and
366
# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
367
# Whether or not the necessary tools and files are found can be checked
368
# with the AM_CONDITIONAL "BUILD_LINUXDOC"
369
AC_DEFUN([XORG_CHECK_LINUXDOC],[
370
XORG_SGML_PATH=$prefix/share/sgml
373
AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
375
AC_PATH_PROG(LINUXDOC, linuxdoc)
376
AC_PATH_PROG(PS2PDF, ps2pdf)
378
AC_MSG_CHECKING([Whether to build documentation])
380
if test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
386
AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
388
AC_MSG_RESULT([$BUILDDOC])
390
AC_MSG_CHECKING([Whether to build pdf documentation])
392
if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
398
AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
400
AC_MSG_RESULT([$BUILDPDFDOC])
402
MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
403
MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
405
MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0"
411
]) # XORG_CHECK_LINUXDOC
414
# -------------------
415
# Minimum version: 1.0.0
417
# Checks for the ability to build output formats from SGML DocBook source.
418
# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
419
# indicates whether the necessary tools and files are found and, if set,
420
# $(MAKE_XXX) blah.sgml will produce blah.xxx.
421
AC_DEFUN([XORG_CHECK_DOCBOOK],[
422
XORG_SGML_PATH=$prefix/share/sgml
429
AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
431
AC_PATH_PROG(DOCBOOKPS, docbook2ps)
432
AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
433
AC_PATH_PROG(DOCBOOKHTML, docbook2html)
434
AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
436
AC_MSG_CHECKING([Whether to build text documentation])
437
if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
438
test x$BUILD_TXTDOC != xno; then
441
AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
442
AC_MSG_RESULT([$BUILDTXTDOC])
444
AC_MSG_CHECKING([Whether to build PDF documentation])
445
if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
446
test x$BUILD_PDFDOC != xno; then
449
AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
450
AC_MSG_RESULT([$BUILDPDFDOC])
452
AC_MSG_CHECKING([Whether to build PostScript documentation])
453
if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
454
test x$BUILD_PSDOC != xno; then
457
AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
458
AC_MSG_RESULT([$BUILDPSDOC])
460
AC_MSG_CHECKING([Whether to build HTML documentation])
461
if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
462
test x$BUILD_HTMLDOC != xno; then
465
AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
466
AC_MSG_RESULT([$BUILDHTMLDOC])
468
MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
469
MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
470
MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
471
MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
477
]) # XORG_CHECK_DOCBOOK
479
# XORG_CHECK_MALLOC_ZERO
480
# ----------------------
481
# Minimum version: 1.0.0
483
# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
484
# malloc(0) returns NULL. Packages should add one of these cflags to
485
# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
486
AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
487
AC_ARG_ENABLE(malloc0returnsnull,
488
AC_HELP_STRING([--enable-malloc0returnsnull],
489
[malloc(0) returns NULL (default: auto)]),
490
[MALLOC_ZERO_RETURNS_NULL=$enableval],
491
[MALLOC_ZERO_RETURNS_NULL=auto])
493
AC_MSG_CHECKING([whether malloc(0) returns NULL])
494
if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
500
char *m0, *r0, *c0, *p;
505
exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
507
[MALLOC_ZERO_RETURNS_NULL=yes],
508
[MALLOC_ZERO_RETURNS_NULL=no])
510
AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
512
if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
513
MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
514
XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
515
XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
517
MALLOC_ZERO_CFLAGS=""
518
XMALLOC_ZERO_CFLAGS=""
519
XTMALLOC_ZERO_CFLAGS=""
522
AC_SUBST([MALLOC_ZERO_CFLAGS])
523
AC_SUBST([XMALLOC_ZERO_CFLAGS])
524
AC_SUBST([XTMALLOC_ZERO_CFLAGS])
525
]) # XORG_CHECK_MALLOC_ZERO
529
# Minimum version: 1.1.0
531
# Sets up flags for source checkers such as lint and sparse if --with-lint
532
# is specified. (Use --with-lint=sparse for sparse.)
533
# Sets $LINT to name of source checker passed with --with-lint (default: lint)
534
# Sets $LINT_FLAGS to flags to pass to source checker
535
# Sets LINT automake conditional if enabled (default: disabled)
537
AC_DEFUN([XORG_WITH_LINT],[
539
# Allow checking code with lint, sparse, etc.
540
AC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
541
[Use a lint-style source code checker (default: disabled)])],
542
[use_lint=$withval], [use_lint=no])
543
if test "x$use_lint" = "xyes" ; then
548
if test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
553
LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
562
AM_CONDITIONAL(LINT, [test x$LINT != xno])
566
# XORG_LINT_LIBRARY(LIBNAME)
567
# --------------------------
568
# Minimum version: 1.1.0
570
# Sets up flags for building lint libraries for checking programs that call
571
# functions in the library.
572
# Disabled by default, enable with --enable-lint-library
574
# @LINTLIB@ - name of lint library file to make
575
# MAKE_LINT_LIB - automake conditional
578
AC_DEFUN([XORG_LINT_LIBRARY],[
579
AC_REQUIRE([XORG_WITH_LINT])
580
# Build lint "library" for more indepth checks of programs calling this library
581
AC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
582
[Create lint library (default: disabled)])],
583
[make_lint_lib=$enableval], [make_lint_lib=no])
584
if test "x$make_lint_lib" != "xno" ; then
585
if test "x$LINT" = "xno" ; then
586
AC_MSG_ERROR([Cannot make lint library without --with-lint])
588
if test "x$make_lint_lib" = "xyes" ; then
591
LINTLIB=$make_lint_lib
595
AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
597
]) # XORG_LINT_LIBRARY
599
dnl Copyright 2005 Red Hat, Inc
601
dnl Permission to use, copy, modify, distribute, and sell this software and its
602
dnl documentation for any purpose is hereby granted without fee, provided that
603
dnl the above copyright notice appear in all copies and that both that
604
dnl copyright notice and this permission notice appear in supporting
607
dnl The above copyright notice and this permission notice shall be included
608
dnl in all copies or substantial portions of the Software.
610
dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
611
dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
612
dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
613
dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
614
dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
615
dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
616
dnl OTHER DEALINGS IN THE SOFTWARE.
618
dnl Except as contained in this notice, the name of the copyright holders shall
619
dnl not be used in advertising or otherwise to promote the sale, use or
620
dnl other dealings in this Software without prior written authorization
621
dnl from the copyright holders.
624
# XORG_RELEASE_VERSION
625
# --------------------
626
# Adds --with/without-release-string and changes the PACKAGE and
627
# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If
628
# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also
629
# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
631
AC_DEFUN([XORG_RELEASE_VERSION],[
632
AC_ARG_WITH(release-version,
633
AC_HELP_STRING([--with-release-version=STRING],
634
[Use release version string in package name]),
635
[RELEASE_VERSION="$withval"],
636
[RELEASE_VERSION=""])
637
if test "x$RELEASE_VERSION" != "x"; then
638
PACKAGE="$PACKAGE-$RELEASE_VERSION"
639
PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
640
AC_MSG_NOTICE([Building with package name set to $PACKAGE])
642
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
643
[`echo $PACKAGE_VERSION | cut -d . -f 1`],
644
[Major version of this package])
645
PVM=`echo $PACKAGE_VERSION | cut -d . -f 2`
646
if test "x$PVM" = "x"; then
649
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
651
[Minor version of this package])
652
PVP=`echo $PACKAGE_VERSION | cut -d . -f 3`
653
if test "x$PVP" = "x"; then
656
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
658
[Patch version of this package])
661
dnl $XdotOrg: lib/xtrans/xtrans.m4,v 1.6 2005/07/26 18:59:11 alanc Exp $
663
dnl Copyright 2005 Sun Microsystems, Inc. All rights reserved.
665
dnl Permission to use, copy, modify, distribute, and sell this software and its
666
dnl documentation for any purpose is hereby granted without fee, provided that
667
dnl the above copyright notice appear in all copies and that both that
668
dnl copyright notice and this permission notice appear in supporting
671
dnl The above copyright notice and this permission notice shall be included
672
dnl in all copies or substantial portions of the Software.
674
dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
675
dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
676
dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
677
dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
678
dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
679
dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
680
dnl OTHER DEALINGS IN THE SOFTWARE.
682
dnl Except as contained in this notice, the name of the copyright holders shall
683
dnl not be used in advertising or otherwise to promote the sale, use or
684
dnl other dealings in this Software without prior written authorization
685
dnl from the copyright holders.
690
# Find needed libraries for TCP sockets, and check for IPv6 support
691
AC_DEFUN([XTRANS_TCP_FLAGS],[
692
# SVR4 hides these in libraries other than libc
693
AC_SEARCH_LIBS(socket, [socket])
694
AC_SEARCH_LIBS(gethostbyname, [nsl])
696
# Needs to come after above checks for libsocket & libnsl for SVR4 systems
698
AC_HELP_STRING([--enable-IPv6],[Enable IPv6 support]),
699
[IPV6CONN=$enableval],
700
[AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])])
701
AC_MSG_CHECKING([if IPv6 support should be built])
702
if test "$IPV6CONN" = "yes"; then
703
AC_DEFINE(IPv6,1,[Support IPv6 for TCP connections])
705
AC_MSG_RESULT($IPV6CONN)
707
# 4.3BSD-Reno added a new member to struct sockaddr_in
708
AC_CHECK_MEMBER([struct sockaddr_in.sin_len],
709
AC_DEFINE([BSD44SOCKETS],1,
710
[Define to 1 if `struct sockaddr_in' has a `sin_len' member]), [], [
711
#include <sys/types.h>
712
#include <sys/socket.h>
713
#include <netinet/in.h>
715
]) # XTRANS_TCP_FLAGS
717
# XTRANS_CONNECTION_FLAGS()
718
# -------------------------
719
# Standard checks for which Xtrans transports to use by the Xorg packages
720
# that use Xtrans functions
721
AC_DEFUN([XTRANS_CONNECTION_FLAGS],[
722
AC_REQUIRE([AC_CANONICAL_HOST])
723
AC_REQUIRE([AC_TYPE_SIGNAL])
724
AC_ARG_ENABLE(unix-transport,
725
AC_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]),
726
[UNIXCONN=$enableval], [UNIXCONN=yes])
727
AC_ARG_ENABLE(tcp-transport,
728
AC_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]),
729
[TCPCONN=$enableval], [TCPCONN=yes])
730
AC_MSG_CHECKING([if Xtrans should support UNIX socket connections])
731
if test "$UNIXCONN" = "yes"; then
732
AC_DEFINE(UNIXCONN,1,[Support UNIX socket connections])
734
AC_MSG_RESULT($UNIXCONN)
735
AC_MSG_CHECKING([if Xtrans should support TCP socket connections])
736
AC_MSG_RESULT($TCPCONN)
737
if test "$TCPCONN" = "yes"; then
738
AC_DEFINE(TCPCONN,1,[Support TCP socket connections])
742
solaris*|sco*|sysv4*) localdef="yes" ;;
745
AC_ARG_ENABLE(local-transport,
746
AC_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]),
747
[LOCALCONN=$enableval], [LOCALCONN=$localdef])
748
AC_MSG_CHECKING([if Xtrans should support os-specific local connections])
749
AC_MSG_RESULT($LOCALCONN)
750
if test "$LOCALCONN" = "yes"; then
751
AC_DEFINE(LOCALCONN,1,[Support os-specific local connections])
754
]) # XTRANS_CONNECTION_FLAGS
757
# XTRANS_SECURE_RPC_FLAGS()
758
# -------------------------
759
# Check for Secure RPC functions - must come after XTRANS_TCP_FLAGS
760
# so that any necessary networking libraries are already found
761
AC_DEFUN([XTRANS_SECURE_RPC_FLAGS],
762
[AC_REQUIRE([XTRANS_TCP_FLAGS])
763
AC_ARG_ENABLE(secure-rpc,
764
AC_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]),
765
[SECURE_RPC=$enableval], [SECURE_RPC="try"])
767
if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then
768
FOUND_SECURE_RPC="no"
769
AC_CHECK_FUNCS([authdes_seccreate authdes_create],
770
[FOUND_SECURE_RPC="yes"])
771
if test "x$FOUND_SECURE_RPC" = "xno" ; then
772
if test "x$SECURE_RPC" = "xyes" ; then
773
AC_MSG_ERROR([Secure RPC requested, but required functions not found])
777
dnl FreeBSD keeps getsecretkey in librpcsvc
778
AC_SEARCH_LIBS(getsecretkey, [rpcsvc])
782
AC_MSG_CHECKING([if Secure RPC authentication ("SUN-DES-1") should be supported])
783
if test "x$SECURE_RPC" = "xyes" ; then
784
AC_DEFINE(SECURE_RPC, 1, [Support Secure RPC ("SUN-DES-1") authentication for X11 clients])
786
AC_MSG_RESULT($SECURE_RPC)
787
]) # XTRANS_SECURE_RPC_FLAGS
790
# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
792
# This file is free software; the Free Software Foundation
793
# gives unlimited permission to copy and/or distribute it,
794
# with or without modifications, as long as this notice is preserved.
796
# AM_AUTOMAKE_VERSION(VERSION)
797
# ----------------------------
798
# Automake X.Y traces this macro to ensure aclocal.m4 has been
799
# generated from the m4 files accompanying Automake X.Y.
800
# (This private macro should not be called outside this file.)
801
AC_DEFUN([AM_AUTOMAKE_VERSION],
802
[am__api_version='1.10'
803
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
804
dnl require some minimum version. Point them to the right macro.
805
m4_if([$1], [1.10], [],
806
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
809
# _AM_AUTOCONF_VERSION(VERSION)
810
# -----------------------------
811
# aclocal traces this macro to find the Autoconf version.
812
# This is a private macro too. Using m4_define simplifies
813
# the logic in aclocal, which can simply ignore this definition.
814
m4_define([_AM_AUTOCONF_VERSION], [])
816
# AM_SET_CURRENT_AUTOMAKE_VERSION
817
# -------------------------------
818
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
819
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
820
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
821
[AM_AUTOMAKE_VERSION([1.10])dnl
822
_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
824
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
826
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
828
# This file is free software; the Free Software Foundation
829
# gives unlimited permission to copy and/or distribute it,
830
# with or without modifications, as long as this notice is preserved.
832
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
833
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
834
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
836
# Of course, Automake must honor this variable whenever it calls a
837
# tool from the auxiliary directory. The problem is that $srcdir (and
838
# therefore $ac_aux_dir as well) can be either absolute or relative,
839
# depending on how configure is run. This is pretty annoying, since
840
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
841
# source directory, any form will work fine, but in subdirectories a
842
# relative path needs to be adjusted first.
844
# $ac_aux_dir/missing
845
# fails when called from a subdirectory if $ac_aux_dir is relative
846
# $top_srcdir/$ac_aux_dir/missing
847
# fails if $ac_aux_dir is absolute,
848
# fails when called from a subdirectory in a VPATH build with
849
# a relative $ac_aux_dir
851
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
852
# are both prefixed by $srcdir. In an in-source build this is usually
853
# harmless because $srcdir is `.', but things will broke when you
854
# start a VPATH build or use an absolute $srcdir.
856
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
857
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
858
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
859
# and then we would define $MISSING as
860
# MISSING="\${SHELL} $am_aux_dir/missing"
861
# This will work as long as MISSING is not called from configure, because
862
# unfortunately $(top_srcdir) has no meaning in configure.
863
# However there are other variables, like CC, which are often used in
864
# configure, and could therefore not use this "fixed" $ac_aux_dir.
866
# Another solution, used here, is to always expand $ac_aux_dir to an
867
# absolute PATH. The drawback is that using absolute paths prevent a
868
# configured tree to be moved without reconfiguration.
870
AC_DEFUN([AM_AUX_DIR_EXPAND],
871
[dnl Rely on autoconf to set up CDPATH properly.
873
# expand $ac_aux_dir to an absolute path
874
am_aux_dir=`cd $ac_aux_dir && pwd`
877
# AM_CONDITIONAL -*- Autoconf -*-
879
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
880
# Free Software Foundation, Inc.
882
# This file is free software; the Free Software Foundation
883
# gives unlimited permission to copy and/or distribute it,
884
# with or without modifications, as long as this notice is preserved.
888
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
889
# -------------------------------------
890
# Define a conditional.
891
AC_DEFUN([AM_CONDITIONAL],
893
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
894
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
895
AC_SUBST([$1_TRUE])dnl
896
AC_SUBST([$1_FALSE])dnl
897
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
898
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
906
AC_CONFIG_COMMANDS_PRE(
907
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
908
AC_MSG_ERROR([[conditional "$1" was never defined.
909
Usually this means the macro was only invoked conditionally.]])
912
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
913
# Free Software Foundation, Inc.
915
# This file is free software; the Free Software Foundation
916
# gives unlimited permission to copy and/or distribute it,
917
# with or without modifications, as long as this notice is preserved.
921
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
922
# written in clear, in which case automake, when reading aclocal.m4,
923
# will think it sees a *use*, and therefore will trigger all it's
924
# C support machinery. Also note that it means that autoscan, seeing
925
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
928
# _AM_DEPENDENCIES(NAME)
929
# ----------------------
930
# See how the compiler implements dependency checking.
931
# NAME is "CC", "CXX", "GCJ", or "OBJC".
932
# We try a few techniques and use that to set a single cache variable.
934
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
935
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
936
# dependency, and given that the user is not expected to run this macro,
937
# just rely on AC_PROG_CC.
938
AC_DEFUN([_AM_DEPENDENCIES],
939
[AC_REQUIRE([AM_SET_DEPDIR])dnl
940
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
941
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
942
AC_REQUIRE([AM_DEP_TRACK])dnl
944
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
945
[$1], CXX, [depcc="$CXX" am_compiler_list=],
946
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
947
[$1], UPC, [depcc="$UPC" am_compiler_list=],
948
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
949
[depcc="$$1" am_compiler_list=])
951
AC_CACHE_CHECK([dependency style of $depcc],
952
[am_cv_$1_dependencies_compiler_type],
953
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
954
# We make a subdir and do the tests there. Otherwise we can end up
955
# making bogus files that we don't know about and never remove. For
956
# instance it was reported that on HP-UX the gcc test will end up
957
# making a dummy file named `D' -- because `-MD' means `put the output
960
# Copy depcomp to subdir because otherwise we won't find it if we're
961
# using a relative directory.
962
cp "$am_depcomp" conftest.dir
964
# We will build objects and dependencies in a subdirectory because
965
# it helps to detect inapplicable dependency modes. For instance
966
# both Tru64's cc and ICC support -MD to output dependencies as a
967
# side effect of compilation, but ICC will put the dependencies in
968
# the current directory while Tru64 will put them in the object
972
am_cv_$1_dependencies_compiler_type=none
973
if test "$am_compiler_list" = ""; then
974
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
976
for depmode in $am_compiler_list; do
977
# Setup a source with many dependencies, because some compilers
978
# like to wrap large dependency lists on column 80 (with \), and
979
# we should not choose a depcomp mode which is confused by this.
981
# We need to recreate these files for each test, as the compiler may
982
# overwrite some of them when testing with obscure command lines.
983
# This happens at least with the AIX C compiler.
985
for i in 1 2 3 4 5 6; do
986
echo '#include "conftst'$i'.h"' >> sub/conftest.c
987
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
988
# Solaris 8's {/usr,}/bin/sh.
989
touch sub/conftst$i.h
991
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
995
# after this tag, mechanisms are not by side-effect, so they'll
996
# only be used when explicitly requested
997
if test "x$enable_dependency_tracking" = xyes; then
1005
# We check with `-c' and `-o' for the sake of the "dashmstdout"
1006
# mode. It turns out that the SunPro C++ compiler does not properly
1007
# handle `-M -o', and we need to detect this.
1008
if depmode=$depmode \
1009
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
1010
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
1011
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
1012
>/dev/null 2>conftest.err &&
1013
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
1014
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
1015
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
1016
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1017
# icc doesn't choke on unknown options, it will just issue warnings
1018
# or remarks (even with -Werror). So we grep stderr for any message
1019
# that says an option was ignored or not supported.
1020
# When given -MP, icc 7.0 and 7.1 complain thusly:
1021
# icc: Command line warning: ignoring option '-M'; no argument required
1022
# The diagnosis changed in icc 8.0:
1023
# icc: Command line remark: option '-MP' not supported
1024
if (grep 'ignoring option' conftest.err ||
1025
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
1026
am_cv_$1_dependencies_compiler_type=$depmode
1035
am_cv_$1_dependencies_compiler_type=none
1038
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
1039
AM_CONDITIONAL([am__fastdep$1], [
1040
test "x$enable_dependency_tracking" != xno \
1041
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
1047
# Choose a directory name for dependency files.
1048
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
1049
AC_DEFUN([AM_SET_DEPDIR],
1050
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1051
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
1057
AC_DEFUN([AM_DEP_TRACK],
1058
[AC_ARG_ENABLE(dependency-tracking,
1059
[ --disable-dependency-tracking speeds up one-time build
1060
--enable-dependency-tracking do not reject slow dependency extractors])
1061
if test "x$enable_dependency_tracking" != xno; then
1062
am_depcomp="$ac_aux_dir/depcomp"
1065
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1066
AC_SUBST([AMDEPBACKSLASH])dnl
1067
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
1070
# Generate code to set up dependency tracking. -*- Autoconf -*-
1072
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
1073
# Free Software Foundation, Inc.
1075
# This file is free software; the Free Software Foundation
1076
# gives unlimited permission to copy and/or distribute it,
1077
# with or without modifications, as long as this notice is preserved.
1081
# _AM_OUTPUT_DEPENDENCY_COMMANDS
1082
# ------------------------------
1083
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1084
[for mf in $CONFIG_FILES; do
1085
# Strip MF so we end up with the name of the file.
1086
mf=`echo "$mf" | sed -e 's/:.*$//'`
1087
# Check whether this is an Automake generated Makefile or not.
1088
# We used to match only the files named `Makefile.in', but
1089
# some people rename them; so instead we look at the file content.
1090
# Grep'ing the first line is not enough: some people post-process
1091
# each Makefile.in and add a new line on top of each file to say so.
1092
# Grep'ing the whole file is not good either: AIX grep has a line
1093
# limit of 2048, but all sed's we know have understand at least 4000.
1094
if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
1095
dirpart=`AS_DIRNAME("$mf")`
1099
# Extract the definition of DEPDIR, am__include, and am__quote
1100
# from the Makefile without running `make'.
1101
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
1102
test -z "$DEPDIR" && continue
1103
am__include=`sed -n 's/^am__include = //p' < "$mf"`
1104
test -z "am__include" && continue
1105
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
1106
# When using ansi2knr, U may be empty or an underscore; expand it
1107
U=`sed -n 's/^U = //p' < "$mf"`
1108
# Find all dependency output files, they are included files with
1109
# $(DEPDIR) in their names. We invoke sed twice because it is the
1110
# simplest approach to changing $(DEPDIR) to its actual value in the
1112
for file in `sed -n "
1113
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
1114
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
1115
# Make sure the directory exists.
1116
test -f "$dirpart/$file" && continue
1117
fdir=`AS_DIRNAME(["$file"])`
1118
AS_MKDIR_P([$dirpart/$fdir])
1119
# echo "creating $dirpart/$file"
1120
echo '# dummy' > "$dirpart/$file"
1123
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1126
# AM_OUTPUT_DEPENDENCY_COMMANDS
1127
# -----------------------------
1128
# This macro should only be invoked once -- use via AC_REQUIRE.
1130
# This code is only required when automatic dependency tracking
1131
# is enabled. FIXME. This creates each `.P' file that we will
1132
# need in order to bootstrap the dependency handling code.
1133
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1134
[AC_CONFIG_COMMANDS([depfiles],
1135
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1136
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1139
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
1140
# Free Software Foundation, Inc.
1142
# This file is free software; the Free Software Foundation
1143
# gives unlimited permission to copy and/or distribute it,
1144
# with or without modifications, as long as this notice is preserved.
1148
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
1149
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
1151
# Do all the work for Automake. -*- Autoconf -*-
1153
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
1154
# 2005, 2006 Free Software Foundation, Inc.
1156
# This file is free software; the Free Software Foundation
1157
# gives unlimited permission to copy and/or distribute it,
1158
# with or without modifications, as long as this notice is preserved.
1162
# This macro actually does too much. Some checks are only needed if
1163
# your package does certain things. But this isn't really a big deal.
1165
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1166
# AM_INIT_AUTOMAKE([OPTIONS])
1167
# -----------------------------------------------
1168
# The call with PACKAGE and VERSION arguments is the old style
1169
# call (pre autoconf-2.50), which is being phased out. PACKAGE
1170
# and VERSION should now be passed to AC_INIT and removed from
1171
# the call to AM_INIT_AUTOMAKE.
1172
# We support both call styles for the transition. After
1173
# the next Automake release, Autoconf can make the AC_INIT
1174
# arguments mandatory, and then we can depend on a new Autoconf
1175
# release and drop the old call support.
1176
AC_DEFUN([AM_INIT_AUTOMAKE],
1177
[AC_PREREQ([2.60])dnl
1178
dnl Autoconf wants to disallow AM_ names. We explicitly allow
1179
dnl the ones we care about.
1180
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1181
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1182
AC_REQUIRE([AC_PROG_INSTALL])dnl
1183
if test "`cd $srcdir && pwd`" != "`pwd`"; then
1184
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1185
# is not polluted with repeated "-I."
1186
AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1187
# test to see if srcdir already configured
1188
if test -f $srcdir/config.status; then
1189
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1193
# test whether we have cygpath
1194
if test -z "$CYGPATH_W"; then
1195
if (cygpath --version) >/dev/null 2>/dev/null; then
1196
CYGPATH_W='cygpath -w'
1201
AC_SUBST([CYGPATH_W])
1203
# Define the identity of the package.
1204
dnl Distinguish between old-style and new-style calls.
1206
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1207
AC_SUBST([PACKAGE], [$1])dnl
1208
AC_SUBST([VERSION], [$2])],
1209
[_AM_SET_OPTIONS([$1])dnl
1210
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
1211
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
1212
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1213
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1214
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1216
_AM_IF_OPTION([no-define],,
1217
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
1218
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
1220
# Some tools Automake needs.
1221
AC_REQUIRE([AM_SANITY_CHECK])dnl
1222
AC_REQUIRE([AC_ARG_PROGRAM])dnl
1223
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
1224
AM_MISSING_PROG(AUTOCONF, autoconf)
1225
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
1226
AM_MISSING_PROG(AUTOHEADER, autoheader)
1227
AM_MISSING_PROG(MAKEINFO, makeinfo)
1229
AM_PROG_INSTALL_STRIP
1230
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
1231
# We need awk for the "check" target. The system "awk" is bad on
1233
AC_REQUIRE([AC_PROG_AWK])dnl
1234
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1235
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1236
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1237
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1238
[_AM_PROG_TAR([v7])])])
1239
_AM_IF_OPTION([no-dependencies],,
1240
[AC_PROVIDE_IFELSE([AC_PROG_CC],
1241
[_AM_DEPENDENCIES(CC)],
1242
[define([AC_PROG_CC],
1243
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1244
AC_PROVIDE_IFELSE([AC_PROG_CXX],
1245
[_AM_DEPENDENCIES(CXX)],
1246
[define([AC_PROG_CXX],
1247
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1248
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1249
[_AM_DEPENDENCIES(OBJC)],
1250
[define([AC_PROG_OBJC],
1251
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
1256
# When config.status generates a header, we must update the stamp-h file.
1257
# This file resides in the same directory as the config header
1258
# that is generated. The stamp files are numbered to have different names.
1260
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1261
# loop where config.status creates the headers, so we can generate
1262
# our stamp files there.
1263
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1264
[# Compute $1's index in $config_headers.
1266
for _am_header in $config_headers :; do
1271
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
1274
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
1276
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
1278
# This file is free software; the Free Software Foundation
1279
# gives unlimited permission to copy and/or distribute it,
1280
# with or without modifications, as long as this notice is preserved.
1282
# AM_PROG_INSTALL_SH
1283
# ------------------
1284
# Define $install_sh.
1285
AC_DEFUN([AM_PROG_INSTALL_SH],
1286
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1287
install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
1288
AC_SUBST(install_sh)])
1290
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
1292
# This file is free software; the Free Software Foundation
1293
# gives unlimited permission to copy and/or distribute it,
1294
# with or without modifications, as long as this notice is preserved.
1298
# Check whether the underlying file-system supports filenames
1299
# with a leading dot. For instance MS-DOS doesn't.
1300
AC_DEFUN([AM_SET_LEADING_DOT],
1301
[rm -rf .tst 2>/dev/null
1302
mkdir .tst 2>/dev/null
1303
if test -d .tst; then
1308
rmdir .tst 2>/dev/null
1309
AC_SUBST([am__leading_dot])])
1311
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
1314
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
1315
# Free Software Foundation, Inc.
1317
# This file is free software; the Free Software Foundation
1318
# gives unlimited permission to copy and/or distribute it,
1319
# with or without modifications, as long as this notice is preserved.
1323
AC_DEFUN([AM_MAINTAINER_MODE],
1324
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
1325
dnl maintainer-mode is disabled by default
1326
AC_ARG_ENABLE(maintainer-mode,
1327
[ --enable-maintainer-mode enable make rules and dependencies not useful
1328
(and sometimes confusing) to the casual installer],
1329
USE_MAINTAINER_MODE=$enableval,
1330
USE_MAINTAINER_MODE=no)
1331
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
1332
AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
1333
MAINT=$MAINTAINER_MODE_TRUE
1338
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
1340
# Check to see how 'make' treats includes. -*- Autoconf -*-
1342
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
1344
# This file is free software; the Free Software Foundation
1345
# gives unlimited permission to copy and/or distribute it,
1346
# with or without modifications, as long as this notice is preserved.
1352
# Check to see how make treats includes.
1353
AC_DEFUN([AM_MAKE_INCLUDE],
1354
[am_make=${MAKE-make}
1355
cat > confinc << 'END'
1360
# If we don't find an include directive, just comment out the code.
1361
AC_MSG_CHECKING([for style of include used by $am_make])
1365
# First try GNU make style include.
1366
echo "include confinc" > confmf
1367
# We grep out `Entering directory' and `Leaving directory'
1368
# messages which can occur if `w' ends up in MAKEFLAGS.
1369
# In particular we don't look at `^make:' because GNU make might
1370
# be invoked under some other name (usually "gmake"), in which
1371
# case it prints its new name instead of `make'.
1372
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
1377
# Now try BSD make style include.
1378
if test "$am__include" = "#"; then
1379
echo '.include "confinc"' > confmf
1380
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
1381
am__include=.include
1386
AC_SUBST([am__include])
1387
AC_SUBST([am__quote])
1388
AC_MSG_RESULT([$_am_result])
1389
rm -f confinc confmf
1392
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
1394
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
1395
# Free Software Foundation, Inc.
1397
# This file is free software; the Free Software Foundation
1398
# gives unlimited permission to copy and/or distribute it,
1399
# with or without modifications, as long as this notice is preserved.
1403
# AM_MISSING_PROG(NAME, PROGRAM)
1404
# ------------------------------
1405
AC_DEFUN([AM_MISSING_PROG],
1406
[AC_REQUIRE([AM_MISSING_HAS_RUN])
1407
$1=${$1-"${am_missing_run}$2"}
1411
# AM_MISSING_HAS_RUN
1412
# ------------------
1413
# Define MISSING if not defined so far and test if it supports --run.
1414
# If it does, set am_missing_run to use it, otherwise, to nothing.
1415
AC_DEFUN([AM_MISSING_HAS_RUN],
1416
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1417
AC_REQUIRE_AUX_FILE([missing])dnl
1418
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
1419
# Use eval to expand $SHELL
1420
if eval "$MISSING --run true"; then
1421
am_missing_run="$MISSING --run "
1424
AC_MSG_WARN([`missing' script is too old or missing])
1428
# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1430
# This file is free software; the Free Software Foundation
1431
# gives unlimited permission to copy and/or distribute it,
1432
# with or without modifications, as long as this notice is preserved.
1436
# Check for `mkdir -p'.
1437
AC_DEFUN([AM_PROG_MKDIR_P],
1438
[AC_PREREQ([2.60])dnl
1439
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1440
dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
1441
dnl while keeping a definition of mkdir_p for backward compatibility.
1442
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
1443
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
1444
dnl Makefile.ins that do not define MKDIR_P, so we do our own
1445
dnl adjustment using top_builddir (which is defined more often than
1447
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
1449
[[\\/$]]* | ?:[[\\/]]*) ;;
1450
*/*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
1454
# Helper functions for option handling. -*- Autoconf -*-
1456
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
1458
# This file is free software; the Free Software Foundation
1459
# gives unlimited permission to copy and/or distribute it,
1460
# with or without modifications, as long as this notice is preserved.
1464
# _AM_MANGLE_OPTION(NAME)
1465
# -----------------------
1466
AC_DEFUN([_AM_MANGLE_OPTION],
1467
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1469
# _AM_SET_OPTION(NAME)
1470
# ------------------------------
1471
# Set option NAME. Presently that only means defining a flag for this option.
1472
AC_DEFUN([_AM_SET_OPTION],
1473
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
1475
# _AM_SET_OPTIONS(OPTIONS)
1476
# ----------------------------------
1477
# OPTIONS is a space-separated list of Automake options.
1478
AC_DEFUN([_AM_SET_OPTIONS],
1479
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1481
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1482
# -------------------------------------------
1483
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1484
AC_DEFUN([_AM_IF_OPTION],
1485
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1487
# Check to make sure that the build environment is sane. -*- Autoconf -*-
1489
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
1490
# Free Software Foundation, Inc.
1492
# This file is free software; the Free Software Foundation
1493
# gives unlimited permission to copy and/or distribute it,
1494
# with or without modifications, as long as this notice is preserved.
1500
AC_DEFUN([AM_SANITY_CHECK],
1501
[AC_MSG_CHECKING([whether build environment is sane])
1504
echo timestamp > conftest.file
1505
# Do `set' in a subshell so we don't clobber the current shell's
1506
# arguments. Must try -L first in case configure is actually a
1507
# symlink; some systems play weird games with the mod time of symlinks
1508
# (eg FreeBSD returns the mod time of the symlink's containing
1511
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
1512
if test "$[*]" = "X"; then
1514
set X `ls -t $srcdir/configure conftest.file`
1517
if test "$[*]" != "X $srcdir/configure conftest.file" \
1518
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
1520
# If neither matched, then we have a broken ls. This can happen
1521
# if, for instance, CONFIG_SHELL is bash and it inherits a
1522
# broken ls alias from the environment. This has actually
1523
# happened. Such a system could not be considered "sane".
1524
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1525
alias in your environment])
1528
test "$[2]" = conftest.file
1534
AC_MSG_ERROR([newly created file is older than distributed files!
1535
Check your system clock])
1537
AC_MSG_RESULT(yes)])
1539
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
1541
# This file is free software; the Free Software Foundation
1542
# gives unlimited permission to copy and/or distribute it,
1543
# with or without modifications, as long as this notice is preserved.
1545
# AM_PROG_INSTALL_STRIP
1546
# ---------------------
1547
# One issue with vendor `install' (even GNU) is that you can't
1548
# specify the program used to strip binaries. This is especially
1549
# annoying in cross-compiling environments, where the build's strip
1550
# is unlikely to handle the host's binaries.
1551
# Fortunately install-sh will honor a STRIPPROG variable, so we
1552
# always use install-sh in `make install-strip', and initialize
1553
# STRIPPROG with the value of the STRIP variable (set by the user).
1554
AC_DEFUN([AM_PROG_INSTALL_STRIP],
1555
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1556
# Installed binaries are usually stripped using `strip' when the user
1557
# run `make install-strip'. However `strip' might not be the right
1558
# tool to use in cross-compilation environments, therefore Automake
1559
# will honor the `STRIP' environment variable to overrule this program.
1560
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1561
if test "$cross_compiling" != no; then
1562
AC_CHECK_TOOL([STRIP], [strip], :)
1564
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1565
AC_SUBST([INSTALL_STRIP_PROGRAM])])
1567
# Copyright (C) 2006 Free Software Foundation, Inc.
1569
# This file is free software; the Free Software Foundation
1570
# gives unlimited permission to copy and/or distribute it,
1571
# with or without modifications, as long as this notice is preserved.
1573
# _AM_SUBST_NOTMAKE(VARIABLE)
1574
# ---------------------------
1575
# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in.
1576
# This macro is traced by Automake.
1577
AC_DEFUN([_AM_SUBST_NOTMAKE])
1579
# Check how to create a tarball. -*- Autoconf -*-
1581
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
1583
# This file is free software; the Free Software Foundation
1584
# gives unlimited permission to copy and/or distribute it,
1585
# with or without modifications, as long as this notice is preserved.
1589
# _AM_PROG_TAR(FORMAT)
1590
# --------------------
1591
# Check how to create a tarball in format FORMAT.
1592
# FORMAT should be one of `v7', `ustar', or `pax'.
1594
# Substitute a variable $(am__tar) that is a command
1595
# writing to stdout a FORMAT-tarball containing the directory
1597
# tardir=directory && $(am__tar) > result.tar
1599
# Substitute a variable $(am__untar) that extract such
1600
# a tarball read from stdin.
1601
# $(am__untar) < result.tar
1602
AC_DEFUN([_AM_PROG_TAR],
1603
[# Always define AMTAR for backward compatibility.
1604
AM_MISSING_PROG([AMTAR], [tar])
1606
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
1607
[m4_case([$1], [ustar],, [pax],,
1608
[m4_fatal([Unknown tar format])])
1609
AC_MSG_CHECKING([how to create a $1 tar archive])
1610
# Loop over all known methods to create a tar archive until one works.
1611
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1612
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
1613
# Do not fold the above two line into one, because Tru64 sh and
1614
# Solaris sh will not grok spaces in the rhs of `-'.
1615
for _am_tool in $_am_tools
1619
for _am_tar in tar gnutar gtar;
1621
AM_RUN_LOG([$_am_tar --version]) && break
1623
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1624
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1625
am__untar="$_am_tar -xf -"
1628
# Must skip GNU tar: if it does not support --format= it doesn't create
1629
# ustar tarball either.
1630
(tar --version) >/dev/null 2>&1 && continue
1631
am__tar='tar chf - "$$tardir"'
1632
am__tar_='tar chf - "$tardir"'
1633
am__untar='tar xf -'
1636
am__tar='pax -L -x $1 -w "$$tardir"'
1637
am__tar_='pax -L -x $1 -w "$tardir"'
1641
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1642
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1643
am__untar='cpio -i -H $1 -d'
1652
# If the value was cached, stop now. We just wanted to have am__tar
1653
# and am__untar set.
1654
test -n "${am_cv_prog_tar_$1}" && break
1656
# tar/untar a dummy directory, and stop if the command works
1659
echo GrepMe > conftest.dir/file
1660
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1662
if test -s conftest.tar; then
1663
AM_RUN_LOG([$am__untar <conftest.tar])
1664
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1669
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1670
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1672
AC_SUBST([am__untar])