~ubuntu-branches/ubuntu/utopic/x11proto-core/utopic

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Julien Cristau
  • Date: 2009-03-13 11:06:28 UTC
  • mfrom: (3.1.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090313110628-ggor0eiobws43iv0
Tags: 7.0.15-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# generated automatically by aclocal 1.10.1 -*- Autoconf -*-
 
1
# generated automatically by aclocal 1.10.2 -*- Autoconf -*-
2
2
 
3
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4
4
# 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
13
13
 
14
14
m4_ifndef([AC_AUTOCONF_VERSION],
15
15
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16
 
m4_if(AC_AUTOCONF_VERSION, [2.61],,
17
 
[m4_warning([this file was generated for autoconf 2.61.
 
16
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
 
17
[m4_warning([this file was generated for autoconf 2.63.
18
18
You have another version of autoconf.  It may work, but is not guaranteed to.
19
19
If you have problems, you may need to regenerate the build system entirely.
20
20
To do so, use the procedure documented by the package, typically `autoreconf'.])])
21
21
 
22
 
# Copyright (C) 2002, 2003, 2005, 2006, 2007  Free Software Foundation, Inc.
 
22
dnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
 
23
dnl
 
24
dnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
 
25
dnl 
 
26
dnl Permission is hereby granted, free of charge, to any person obtaining a
 
27
dnl copy of this software and associated documentation files (the
 
28
dnl "Software"), to deal in the Software without restriction, including
 
29
dnl without limitation the rights to use, copy, modify, merge, publish,
 
30
dnl distribute, and/or sell copies of the Software, and to permit persons
 
31
dnl to whom the Software is furnished to do so, provided that the above
 
32
dnl copyright notice(s) and this permission notice appear in all copies of
 
33
dnl the Software and that both the above copyright notice(s) and this
 
34
dnl permission notice appear in supporting documentation.
 
35
dnl
 
36
dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 
37
dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 
38
dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
 
39
dnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
 
40
dnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
 
41
dnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
 
42
dnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
 
43
dnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
 
44
dnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
45
dnl
 
46
dnl Except as contained in this notice, the name of a copyright holder
 
47
dnl shall not be used in advertising or otherwise to promote the sale, use
 
48
dnl or other dealings in this Software without prior written authorization
 
49
dnl of the copyright holder.
 
50
 
 
51
# XORG_MACROS_VERSION(required-version)
 
52
# -------------------------------------
 
53
# Minimum version: 1.1.0
 
54
#
 
55
# If you're using a macro added in Version 1.1 or newer, include this in
 
56
# your configure.ac with the minimum required version, such as:
 
57
# XORG_MACROS_VERSION(1.1)
 
58
#
 
59
# To force at least a version with this macro defined, also add:
 
60
# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])])
 
61
#
 
62
#
 
63
# See the "minimum version" comment for each macro you use to see what 
 
64
# version you require.
 
65
AC_DEFUN([XORG_MACROS_VERSION],[
 
66
        [XORG_MACROS_needed_version=$1
 
67
        XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
 
68
        XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
 
69
        AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
 
70
        [XORG_MACROS_version=1.2.1
 
71
        XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
 
72
        XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
 
73
        if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
 
74
                AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x])
 
75
        fi
 
76
        if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then
 
77
                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])
 
78
        fi
 
79
        AC_MSG_RESULT([yes, $XORG_MACROS_version])
 
80
]) # XORG_MACROS_VERSION
 
81
 
 
82
# XORG_PROG_RAWCPP()
 
83
# ------------------
 
84
# Minimum version: 1.0.0
 
85
#
 
86
# Find cpp program and necessary flags for use in pre-processing text files
 
87
# such as man pages and config files
 
88
AC_DEFUN([XORG_PROG_RAWCPP],[
 
89
AC_REQUIRE([AC_PROG_CPP])
 
90
AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
 
91
   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
 
92
 
 
93
# Check for flag to avoid builtin definitions - assumes unix is predefined,
 
94
# which is not the best choice for supporting other OS'es, but covers most
 
95
# of the ones we need for now.
 
96
AC_MSG_CHECKING([if $RAWCPP requires -undef])
 
97
AC_LANG_CONFTEST([Does cpp redefine unix ?])
 
98
if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
 
99
        AC_MSG_RESULT([no])
 
100
else
 
101
        if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
 
102
                RAWCPPFLAGS=-undef
 
103
                AC_MSG_RESULT([yes])
 
104
        # under Cygwin unix is still defined even with -undef
 
105
        elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
 
106
                RAWCPPFLAGS="-undef -ansi"
 
107
                AC_MSG_RESULT([yes, with -ansi])
 
108
        else
 
109
                AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
 
110
        fi
 
111
fi
 
112
rm -f conftest.$ac_ext
 
113
 
 
114
AC_MSG_CHECKING([if $RAWCPP requires -traditional])
 
115
AC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
 
116
if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
 
117
        AC_MSG_RESULT([no])
 
118
else
 
119
        if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
 
120
                RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
 
121
                AC_MSG_RESULT([yes])
 
122
        else
 
123
                AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
 
124
        fi
 
125
fi
 
126
rm -f conftest.$ac_ext
 
127
AC_SUBST(RAWCPPFLAGS)
 
128
]) # XORG_PROG_RAWCPP
 
129
 
 
130
# XORG_MANPAGE_SECTIONS()
 
131
# -----------------------
 
132
# Minimum version: 1.0.0
 
133
#
 
134
# Determine which sections man pages go in for the different man page types
 
135
# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
 
136
# Not sure if there's any better way than just hardcoding by OS name.
 
137
# Override default settings by setting environment variables
 
138
 
 
139
AC_DEFUN([XORG_MANPAGE_SECTIONS],[
 
140
AC_REQUIRE([AC_CANONICAL_HOST])
 
141
 
 
142
if test x$APP_MAN_SUFFIX = x    ; then
 
143
    APP_MAN_SUFFIX=1
 
144
fi
 
145
if test x$APP_MAN_DIR = x    ; then
 
146
    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
 
147
fi
 
148
 
 
149
if test x$LIB_MAN_SUFFIX = x    ; then
 
150
    LIB_MAN_SUFFIX=3
 
151
fi
 
152
if test x$LIB_MAN_DIR = x    ; then
 
153
    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
 
154
fi
 
155
 
 
156
if test x$FILE_MAN_SUFFIX = x    ; then
 
157
    case $host_os in
 
158
        solaris*)       FILE_MAN_SUFFIX=4  ;;
 
159
        *)              FILE_MAN_SUFFIX=5  ;;
 
160
    esac
 
161
fi
 
162
if test x$FILE_MAN_DIR = x    ; then
 
163
    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
 
164
fi
 
165
 
 
166
if test x$MISC_MAN_SUFFIX = x    ; then
 
167
    case $host_os in
 
168
        solaris*)       MISC_MAN_SUFFIX=5  ;;
 
169
        *)              MISC_MAN_SUFFIX=7  ;;
 
170
    esac
 
171
fi
 
172
if test x$MISC_MAN_DIR = x    ; then
 
173
    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
 
174
fi
 
175
 
 
176
if test x$DRIVER_MAN_SUFFIX = x    ; then
 
177
    case $host_os in
 
178
        solaris*)       DRIVER_MAN_SUFFIX=7  ;;
 
179
        *)              DRIVER_MAN_SUFFIX=4  ;;
 
180
    esac
 
181
fi
 
182
if test x$DRIVER_MAN_DIR = x    ; then
 
183
    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
 
184
fi
 
185
 
 
186
if test x$ADMIN_MAN_SUFFIX = x    ; then
 
187
    case $host_os in
 
188
        solaris*)       ADMIN_MAN_SUFFIX=1m ;;
 
189
        *)              ADMIN_MAN_SUFFIX=8  ;;
 
190
    esac
 
191
fi
 
192
if test x$ADMIN_MAN_DIR = x    ; then
 
193
    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
 
194
fi
 
195
 
 
196
 
 
197
AC_SUBST([APP_MAN_SUFFIX])
 
198
AC_SUBST([LIB_MAN_SUFFIX])
 
199
AC_SUBST([FILE_MAN_SUFFIX])
 
200
AC_SUBST([MISC_MAN_SUFFIX])
 
201
AC_SUBST([DRIVER_MAN_SUFFIX])
 
202
AC_SUBST([ADMIN_MAN_SUFFIX])
 
203
AC_SUBST([APP_MAN_DIR])
 
204
AC_SUBST([LIB_MAN_DIR])
 
205
AC_SUBST([FILE_MAN_DIR])
 
206
AC_SUBST([MISC_MAN_DIR])
 
207
AC_SUBST([DRIVER_MAN_DIR])
 
208
AC_SUBST([ADMIN_MAN_DIR])
 
209
]) # XORG_MANPAGE_SECTIONS
 
210
 
 
211
# XORG_CHECK_LINUXDOC
 
212
# -------------------
 
213
# Minimum version: 1.0.0
 
214
#
 
215
# Defines the variable MAKE_TEXT if the necessary tools and
 
216
# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
 
217
# Whether or not the necessary tools and files are found can be checked
 
218
# with the AM_CONDITIONAL "BUILD_LINUXDOC"
 
219
AC_DEFUN([XORG_CHECK_LINUXDOC],[
 
220
if test x$XORG_SGML_PATH = x ; then
 
221
    XORG_SGML_PATH=$prefix/share/sgml
 
222
fi
 
223
HAVE_DEFS_ENT=
 
224
 
 
225
if test x"$cross_compiling" = x"yes" ; then
 
226
  HAVE_DEFS_ENT=no
 
227
else
 
228
  AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
 
229
fi
 
230
 
 
231
AC_PATH_PROG(LINUXDOC, linuxdoc)
 
232
AC_PATH_PROG(PS2PDF, ps2pdf)
 
233
 
 
234
AC_MSG_CHECKING([Whether to build documentation])
 
235
 
 
236
if test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
 
237
   BUILDDOC=yes
 
238
else
 
239
   BUILDDOC=no
 
240
fi
 
241
 
 
242
AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
 
243
 
 
244
AC_MSG_RESULT([$BUILDDOC])
 
245
 
 
246
AC_MSG_CHECKING([Whether to build pdf documentation])
 
247
 
 
248
if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
 
249
   BUILDPDFDOC=yes
 
250
else
 
251
   BUILDPDFDOC=no
 
252
fi
 
253
 
 
254
AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
 
255
 
 
256
AC_MSG_RESULT([$BUILDPDFDOC])
 
257
 
 
258
MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
 
259
MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
 
260
MAKE_PDF="$PS2PDF"
 
261
MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
 
262
 
 
263
AC_SUBST(MAKE_TEXT)
 
264
AC_SUBST(MAKE_PS)
 
265
AC_SUBST(MAKE_PDF)
 
266
AC_SUBST(MAKE_HTML)
 
267
]) # XORG_CHECK_LINUXDOC
 
268
 
 
269
# XORG_CHECK_DOCBOOK
 
270
# -------------------
 
271
# Minimum version: 1.0.0
 
272
#
 
273
# Checks for the ability to build output formats from SGML DocBook source.
 
274
# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
 
275
# indicates whether the necessary tools and files are found and, if set,
 
276
# $(MAKE_XXX) blah.sgml will produce blah.xxx.
 
277
AC_DEFUN([XORG_CHECK_DOCBOOK],[
 
278
if test x$XORG_SGML_PATH = x ; then
 
279
    XORG_SGML_PATH=$prefix/share/sgml
 
280
fi
 
281
HAVE_DEFS_ENT=
 
282
BUILDTXTDOC=no
 
283
BUILDPDFDOC=no
 
284
BUILDPSDOC=no
 
285
BUILDHTMLDOC=no
 
286
 
 
287
AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
 
288
 
 
289
AC_PATH_PROG(DOCBOOKPS, docbook2ps)
 
290
AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
 
291
AC_PATH_PROG(DOCBOOKHTML, docbook2html)
 
292
AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
 
293
 
 
294
AC_MSG_CHECKING([Whether to build text documentation])
 
295
if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
 
296
   test x$BUILD_TXTDOC != xno; then
 
297
        BUILDTXTDOC=yes
 
298
fi
 
299
AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
 
300
AC_MSG_RESULT([$BUILDTXTDOC])
 
301
 
 
302
AC_MSG_CHECKING([Whether to build PDF documentation])
 
303
if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
 
304
   test x$BUILD_PDFDOC != xno; then
 
305
        BUILDPDFDOC=yes
 
306
fi
 
307
AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
 
308
AC_MSG_RESULT([$BUILDPDFDOC])
 
309
 
 
310
AC_MSG_CHECKING([Whether to build PostScript documentation])
 
311
if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
 
312
   test x$BUILD_PSDOC != xno; then
 
313
        BUILDPSDOC=yes
 
314
fi
 
315
AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
 
316
AC_MSG_RESULT([$BUILDPSDOC])
 
317
 
 
318
AC_MSG_CHECKING([Whether to build HTML documentation])
 
319
if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
 
320
   test x$BUILD_HTMLDOC != xno; then
 
321
        BUILDHTMLDOC=yes
 
322
fi
 
323
AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
 
324
AC_MSG_RESULT([$BUILDHTMLDOC])
 
325
 
 
326
MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
 
327
MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
 
328
MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
 
329
MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
 
330
 
 
331
AC_SUBST(MAKE_TEXT)
 
332
AC_SUBST(MAKE_PS)
 
333
AC_SUBST(MAKE_PDF)
 
334
AC_SUBST(MAKE_HTML)
 
335
]) # XORG_CHECK_DOCBOOK
 
336
 
 
337
# XORG_CHECK_MALLOC_ZERO
 
338
# ----------------------
 
339
# Minimum version: 1.0.0
 
340
#
 
341
# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
 
342
# malloc(0) returns NULL.  Packages should add one of these cflags to
 
343
# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
 
344
AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
 
345
AC_ARG_ENABLE(malloc0returnsnull,
 
346
        AC_HELP_STRING([--enable-malloc0returnsnull],
 
347
                       [malloc(0) returns NULL (default: auto)]),
 
348
        [MALLOC_ZERO_RETURNS_NULL=$enableval],
 
349
        [MALLOC_ZERO_RETURNS_NULL=auto])
 
350
 
 
351
AC_MSG_CHECKING([whether malloc(0) returns NULL])
 
352
if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
 
353
        AC_RUN_IFELSE([
 
354
char *malloc();
 
355
char *realloc();
 
356
char *calloc();
 
357
main() {
 
358
    char *m0, *r0, *c0, *p;
 
359
    m0 = malloc(0);
 
360
    p = malloc(10);
 
361
    r0 = realloc(p,0);
 
362
    c0 = calloc(0);
 
363
    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
 
364
}],
 
365
                [MALLOC_ZERO_RETURNS_NULL=yes],
 
366
                [MALLOC_ZERO_RETURNS_NULL=no])
 
367
fi
 
368
AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
 
369
 
 
370
if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
 
371
        MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
 
372
        XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
 
373
        XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
 
374
else
 
375
        MALLOC_ZERO_CFLAGS=""
 
376
        XMALLOC_ZERO_CFLAGS=""
 
377
        XTMALLOC_ZERO_CFLAGS=""
 
378
fi
 
379
 
 
380
AC_SUBST([MALLOC_ZERO_CFLAGS])
 
381
AC_SUBST([XMALLOC_ZERO_CFLAGS])
 
382
AC_SUBST([XTMALLOC_ZERO_CFLAGS])
 
383
]) # XORG_CHECK_MALLOC_ZERO
 
384
 
 
385
# XORG_WITH_LINT()
 
386
# ----------------
 
387
# Minimum version: 1.1.0
 
388
#
 
389
# Sets up flags for source checkers such as lint and sparse if --with-lint
 
390
# is specified.   (Use --with-lint=sparse for sparse.)
 
391
# Sets $LINT to name of source checker passed with --with-lint (default: lint)
 
392
# Sets $LINT_FLAGS to flags to pass to source checker
 
393
# Sets LINT automake conditional if enabled (default: disabled)
 
394
#
 
395
AC_DEFUN([XORG_WITH_LINT],[
 
396
 
 
397
# Allow checking code with lint, sparse, etc.
 
398
AC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
 
399
                [Use a lint-style source code checker (default: disabled)])],
 
400
                [use_lint=$withval], [use_lint=no])
 
401
if test "x$use_lint" = "xyes" ; then
 
402
        LINT="lint"
 
403
else
 
404
        LINT="$use_lint"
 
405
fi
 
406
if test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
 
407
    case $LINT in
 
408
        lint|*/lint)
 
409
            case $host_os in
 
410
                solaris*)
 
411
                        LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
 
412
                        ;;
 
413
            esac
 
414
            ;;
 
415
    esac
 
416
fi
 
417
 
 
418
AC_SUBST(LINT)
 
419
AC_SUBST(LINT_FLAGS)
 
420
AM_CONDITIONAL(LINT, [test x$LINT != xno])
 
421
 
 
422
]) # XORG_WITH_LINT
 
423
 
 
424
# XORG_LINT_LIBRARY(LIBNAME)
 
425
# --------------------------
 
426
# Minimum version: 1.1.0
 
427
#
 
428
# Sets up flags for building lint libraries for checking programs that call
 
429
# functions in the library.
 
430
# Disabled by default, enable with --enable-lint-library
 
431
# Sets: 
 
432
#       @LINTLIB@               - name of lint library file to make
 
433
#       MAKE_LINT_LIB           - automake conditional
 
434
#
 
435
 
 
436
AC_DEFUN([XORG_LINT_LIBRARY],[
 
437
AC_REQUIRE([XORG_WITH_LINT])
 
438
# Build lint "library" for more indepth checks of programs calling this library
 
439
AC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
 
440
        [Create lint library (default: disabled)])],
 
441
        [make_lint_lib=$enableval], [make_lint_lib=no])
 
442
if test "x$make_lint_lib" != "xno" ; then
 
443
        if test "x$LINT" = "xno" ; then
 
444
                AC_MSG_ERROR([Cannot make lint library without --with-lint])
 
445
        fi
 
446
        if test "x$make_lint_lib" = "xyes" ; then
 
447
                LINTLIB=llib-l$1.ln
 
448
        else
 
449
                LINTLIB=$make_lint_lib
 
450
        fi
 
451
fi
 
452
AC_SUBST(LINTLIB)
 
453
AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
 
454
 
 
455
]) # XORG_LINT_LIBRARY
 
456
 
 
457
# XORG_CWARNFLAGS
 
458
# ---------------
 
459
# Minimum version: 1.2.0
 
460
#
 
461
# Defines CWARNFLAGS to enable C compiler warnings.
 
462
#
 
463
AC_DEFUN([XORG_CWARNFLAGS], [
 
464
AC_REQUIRE([AC_PROG_CC])
 
465
if  test "x$GCC" = xyes ; then
 
466
    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
 
467
-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
 
468
-Wbad-function-cast"
 
469
    case `gcc -dumpversion` in
 
470
    3.4.* | 4.*)
 
471
        CWARNFLAGS+=" -Wold-style-definition -Wdeclaration-after-statement"
 
472
        ;;
 
473
    esac
 
474
else
 
475
    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
 
476
    if test "x$SUNCC" = "xyes"; then
 
477
        CWARNFLAGS="-v"
 
478
    fi
 
479
fi
 
480
AC_SUBST(CWARNFLAGS)
 
481
]) # XORG_CWARNFLAGS
 
482
dnl Copyright 2005 Red Hat, Inc
 
483
dnl
 
484
dnl Permission to use, copy, modify, distribute, and sell this software and its
 
485
dnl documentation for any purpose is hereby granted without fee, provided that
 
486
dnl the above copyright notice appear in all copies and that both that
 
487
dnl copyright notice and this permission notice appear in supporting
 
488
dnl documentation.
 
489
dnl
 
490
dnl The above copyright notice and this permission notice shall be included
 
491
dnl in all copies or substantial portions of the Software.
 
492
dnl
 
493
dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 
494
dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 
495
dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 
496
dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
 
497
dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 
498
dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 
499
dnl OTHER DEALINGS IN THE SOFTWARE.
 
500
dnl
 
501
dnl Except as contained in this notice, the name of the copyright holders shall
 
502
dnl not be used in advertising or otherwise to promote the sale, use or
 
503
dnl other dealings in this Software without prior written authorization
 
504
dnl from the copyright holders.
 
505
dnl
 
506
 
 
507
# XORG_RELEASE_VERSION
 
508
# --------------------
 
509
# Adds --with/without-release-string and changes the PACKAGE and
 
510
# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
 
511
# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
 
512
# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
 
513
 
 
514
AC_DEFUN([XORG_RELEASE_VERSION],[
 
515
        AC_ARG_WITH(release-version,
 
516
                        AC_HELP_STRING([--with-release-version=STRING],
 
517
                                [Use release version string in package name]),
 
518
                        [RELEASE_VERSION="$withval"],
 
519
                        [RELEASE_VERSION=""])
 
520
        if test "x$RELEASE_VERSION" != "x"; then
 
521
                PACKAGE="$PACKAGE-$RELEASE_VERSION"
 
522
                PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
 
523
                AC_MSG_NOTICE([Building with package name set to $PACKAGE])
 
524
        fi
 
525
        AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
 
526
                [`echo $PACKAGE_VERSION | cut -d . -f 1`],
 
527
                [Major version of this package])
 
528
        PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
 
529
        if test "x$PVM" = "x"; then
 
530
                PVM="0"
 
531
        fi
 
532
        AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
 
533
                [$PVM],
 
534
                [Minor version of this package])
 
535
        PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
 
536
        if test "x$PVP" = "x"; then
 
537
                PVP="0"
 
538
        fi
 
539
        AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
 
540
                [$PVP],
 
541
                [Patch version of this package])
 
542
])
 
543
 
 
544
# XORG_CHANGELOG()
 
545
# ----------------
 
546
# Minimum version: 1.2.0
 
547
#
 
548
# Defines the variable CHANGELOG_CMD as the command to generate
 
549
# ChangeLog from git.
 
550
#
 
551
# Arrange that distcleancheck ignores ChangeLog left over by distclean.
 
552
#
 
553
AC_DEFUN([XORG_CHANGELOG], [
 
554
CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \
 
555
mv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
 
556
echo 'git directory not found: installing possibly empty changelog.' >&2)"
 
557
AC_SUBST([CHANGELOG_CMD])
 
558
AC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print'])
 
559
]) # XORG_CHANGELOG
 
560
 
 
561
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
23
562
#
24
563
# This file is free software; the Free Software Foundation
25
564
# gives unlimited permission to copy and/or distribute it,
34
573
[am__api_version='1.10'
35
574
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
36
575
dnl require some minimum version.  Point them to the right macro.
37
 
m4_if([$1], [1.10.1], [],
 
576
m4_if([$1], [1.10.2], [],
38
577
      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
39
578
])
40
579
 
48
587
# AM_SET_CURRENT_AUTOMAKE_VERSION
49
588
# -------------------------------
50
589
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
51
 
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
 
590
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
52
591
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
53
 
[AM_AUTOMAKE_VERSION([1.10.1])dnl
 
592
[AM_AUTOMAKE_VERSION([1.10.2])dnl
54
593
m4_ifndef([AC_AUTOCONF_VERSION],
55
594
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
56
 
_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)])
 
595
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
57
596
 
58
597
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
59
598
 
303
842
 
304
843
# Generate code to set up dependency tracking.              -*- Autoconf -*-
305
844
 
306
 
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
 
845
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
307
846
# Free Software Foundation, Inc.
308
847
#
309
848
# This file is free software; the Free Software Foundation
310
849
# gives unlimited permission to copy and/or distribute it,
311
850
# with or without modifications, as long as this notice is preserved.
312
851
 
313
 
#serial 3
 
852
#serial 4
314
853
 
315
854
# _AM_OUTPUT_DEPENDENCY_COMMANDS
316
855
# ------------------------------
317
856
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
318
 
[for mf in $CONFIG_FILES; do
 
857
[# Autoconf 2.62 quotes --file arguments for eval, but not when files
 
858
# are listed without --file.  Let's play safe and only enable the eval
 
859
# if we detect the quoting.
 
860
case $CONFIG_FILES in
 
861
*\'*) eval set x "$CONFIG_FILES" ;;
 
862
*)   set x $CONFIG_FILES ;;
 
863
esac
 
864
shift
 
865
for mf
 
866
do
319
867
  # Strip MF so we end up with the name of the file.
320
868
  mf=`echo "$mf" | sed -e 's/:.*$//'`
321
869
  # Check whether this is an Automake generated Makefile or not.
647
1195
 
648
1196
# Helper functions for option handling.                     -*- Autoconf -*-
649
1197
 
650
 
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
 
1198
# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
651
1199
#
652
1200
# This file is free software; the Free Software Foundation
653
1201
# gives unlimited permission to copy and/or distribute it,
654
1202
# with or without modifications, as long as this notice is preserved.
655
1203
 
656
 
# serial 3
 
1204
# serial 4
657
1205
 
658
1206
# _AM_MANGLE_OPTION(NAME)
659
1207
# -----------------------
670
1218
# ----------------------------------
671
1219
# OPTIONS is a space-separated list of Automake options.
672
1220
AC_DEFUN([_AM_SET_OPTIONS],
673
 
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 
1221
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
674
1222
 
675
1223
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
676
1224
# -------------------------------------------
866
1414
AC_SUBST([am__untar])
867
1415
]) # _AM_PROG_TAR
868
1416
 
869
 
dnl Copyright 2005 Red Hat, Inc
870
 
dnl
871
 
dnl Permission to use, copy, modify, distribute, and sell this software and its
872
 
dnl documentation for any purpose is hereby granted without fee, provided that
873
 
dnl the above copyright notice appear in all copies and that both that
874
 
dnl copyright notice and this permission notice appear in supporting
875
 
dnl documentation.
876
 
dnl
877
 
dnl The above copyright notice and this permission notice shall be included
878
 
dnl in all copies or substantial portions of the Software.
879
 
dnl
880
 
dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
881
 
dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
882
 
dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
883
 
dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
884
 
dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
885
 
dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
886
 
dnl OTHER DEALINGS IN THE SOFTWARE.
887
 
dnl
888
 
dnl Except as contained in this notice, the name of the copyright holders shall
889
 
dnl not be used in advertising or otherwise to promote the sale, use or
890
 
dnl other dealings in this Software without prior written authorization
891
 
dnl from the copyright holders.
892
 
dnl
893
 
 
894
 
# XORG_RELEASE_VERSION
895
 
# --------------------
896
 
# Adds --with/without-release-string and changes the PACKAGE and
897
 
# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
898
 
# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
899
 
# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
900
 
 
901
 
AC_DEFUN([XORG_RELEASE_VERSION],[
902
 
        AC_ARG_WITH(release-version,
903
 
                        AC_HELP_STRING([--with-release-version=STRING],
904
 
                                [Use release version string in package name]),
905
 
                        [RELEASE_VERSION="$withval"],
906
 
                        [RELEASE_VERSION=""])
907
 
        if test "x$RELEASE_VERSION" != "x"; then
908
 
                PACKAGE="$PACKAGE-$RELEASE_VERSION"
909
 
                PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
910
 
                AC_MSG_NOTICE([Building with package name set to $PACKAGE])
911
 
        fi
912
 
        AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
913
 
                [`echo $PACKAGE_VERSION | cut -d . -f 1`],
914
 
                [Major version of this package])
915
 
        PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
916
 
        if test "x$PVM" = "x"; then
917
 
                PVM="0"
918
 
        fi
919
 
        AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
920
 
                [$PVM],
921
 
                [Minor version of this package])
922
 
        PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
923
 
        if test "x$PVP" = "x"; then
924
 
                PVP="0"
925
 
        fi
926
 
        AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
927
 
                [$PVP],
928
 
                [Patch version of this package])
929
 
])
930