3 dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
5 dnl Permission is hereby granted, free of charge, to any person obtaining a
6 dnl copy of this software and associated documentation files (the "Software"),
7 dnl to deal in the Software without restriction, including without limitation
8 dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 dnl and/or sell copies of the Software, and to permit persons to whom the
10 dnl Software is furnished to do so, subject to the following conditions:
12 dnl The above copyright notice and this permission notice (including the next
13 dnl paragraph) shall be included in all copies or substantial portions of the
16 dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 dnl DEALINGS IN THE SOFTWARE.
24 # XORG_MACROS_VERSION(required-version)
25 # -------------------------------------
26 # Minimum version: 1.1.0
28 # If you're using a macro added in Version 1.1 or newer, include this in
29 # your configure.ac with the minimum required version, such as:
30 # XORG_MACROS_VERSION(1.1)
32 # To ensure that this macro is defined, also add:
33 # m4_ifndef([XORG_MACROS_VERSION],
34 # [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
37 # See the "minimum version" comment for each macro you use to see what
38 # version you require.
39 m4_defun([XORG_MACROS_VERSION],[
40 m4_define([vers_have], [@VERSION@])
41 m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
42 m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
43 m4_if(m4_cmp(maj_have, maj_needed), 0,,
44 [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
45 m4_if(m4_version_compare(vers_have, [$1]), -1,
46 [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
47 m4_undefine([vers_have])
48 m4_undefine([maj_have])
49 m4_undefine([maj_needed])
50 ]) # XORG_MACROS_VERSION
54 # Minimum version: 1.0.0
56 # Find cpp program and necessary flags for use in pre-processing text files
57 # such as man pages and config files
58 AC_DEFUN([XORG_PROG_RAWCPP],[
59 AC_REQUIRE([AC_PROG_CPP])
60 AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}],
61 [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
63 # Check for flag to avoid builtin definitions - assumes unix is predefined,
64 # which is not the best choice for supporting other OS'es, but covers most
65 # of the ones we need for now.
66 AC_MSG_CHECKING([if $RAWCPP requires -undef])
67 AC_LANG_CONFTEST([Does cpp redefine unix ?])
68 if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
71 if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
74 # under Cygwin unix is still defined even with -undef
75 elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
76 RAWCPPFLAGS="-undef -ansi"
77 AC_MSG_RESULT([yes, with -ansi])
79 AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.])
82 rm -f conftest.$ac_ext
84 AC_MSG_CHECKING([if $RAWCPP requires -traditional])
85 AC_LANG_CONFTEST([Does cpp preserve "whitespace"?])
86 if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
89 if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
90 RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
93 AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.])
96 rm -f conftest.$ac_ext
100 # XORG_MANPAGE_SECTIONS()
101 # -----------------------
102 # Minimum version: 1.0.0
104 # Determine which sections man pages go in for the different man page types
105 # on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
106 # Not sure if there's any better way than just hardcoding by OS name.
107 # Override default settings by setting environment variables
108 # Added MAN_SUBSTS in version 1.8
109 # Added AC_PROG_SED in version 1.8
111 AC_DEFUN([XORG_MANPAGE_SECTIONS],[
112 AC_REQUIRE([AC_CANONICAL_HOST])
113 AC_REQUIRE([AC_PROG_SED])
115 if test x$APP_MAN_SUFFIX = x ; then
118 if test x$APP_MAN_DIR = x ; then
119 APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
122 if test x$LIB_MAN_SUFFIX = x ; then
125 if test x$LIB_MAN_DIR = x ; then
126 LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
129 if test x$FILE_MAN_SUFFIX = x ; then
131 solaris*) FILE_MAN_SUFFIX=4 ;;
132 *) FILE_MAN_SUFFIX=5 ;;
135 if test x$FILE_MAN_DIR = x ; then
136 FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
139 if test x$MISC_MAN_SUFFIX = x ; then
141 solaris*) MISC_MAN_SUFFIX=5 ;;
142 *) MISC_MAN_SUFFIX=7 ;;
145 if test x$MISC_MAN_DIR = x ; then
146 MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
149 if test x$DRIVER_MAN_SUFFIX = x ; then
151 solaris*) DRIVER_MAN_SUFFIX=7 ;;
152 *) DRIVER_MAN_SUFFIX=4 ;;
155 if test x$DRIVER_MAN_DIR = x ; then
156 DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
159 if test x$ADMIN_MAN_SUFFIX = x ; then
161 solaris*) ADMIN_MAN_SUFFIX=1m ;;
162 *) ADMIN_MAN_SUFFIX=8 ;;
165 if test x$ADMIN_MAN_DIR = x ; then
166 ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
170 AC_SUBST([APP_MAN_SUFFIX])
171 AC_SUBST([LIB_MAN_SUFFIX])
172 AC_SUBST([FILE_MAN_SUFFIX])
173 AC_SUBST([MISC_MAN_SUFFIX])
174 AC_SUBST([DRIVER_MAN_SUFFIX])
175 AC_SUBST([ADMIN_MAN_SUFFIX])
176 AC_SUBST([APP_MAN_DIR])
177 AC_SUBST([LIB_MAN_DIR])
178 AC_SUBST([FILE_MAN_DIR])
179 AC_SUBST([MISC_MAN_DIR])
180 AC_SUBST([DRIVER_MAN_DIR])
181 AC_SUBST([ADMIN_MAN_DIR])
183 XORG_MAN_PAGE="X Version 11"
184 AC_SUBST([XORG_MAN_PAGE])
186 -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
187 -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
188 -e 's|__xservername__|Xorg|g' \
189 -e 's|__xconfigfile__|xorg.conf|g' \
190 -e 's|__projectroot__|\$(prefix)|g' \
191 -e 's|__apploaddir__|\$(appdefaultdir)|g' \
192 -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
193 -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
194 -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
195 -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
196 -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
197 -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
198 AC_SUBST([MAN_SUBSTS])
200 ]) # XORG_MANPAGE_SECTIONS
202 # XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
203 # ------------------------
204 # Minimum version: 1.7.0
206 # Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
207 # provided by xorg-sgml-doctools, if installed.
208 AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
209 AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
211 PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
212 [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
214 [if test x"$cross_compiling" != x"yes" ; then
215 AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
216 [XORG_SGML_PATH=$prefix/share/sgml])
220 # Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
221 # the path and the name of the doc stylesheet
222 if test "x$XORG_SGML_PATH" != "x" ; then
223 AC_MSG_RESULT([$XORG_SGML_PATH])
224 STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
225 XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
230 AC_SUBST(XORG_SGML_PATH)
231 AC_SUBST(STYLESHEET_SRCDIR)
232 AC_SUBST(XSL_STYLESHEET)
233 AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
234 ]) # XORG_CHECK_SGML_DOCTOOLS
236 # XORG_CHECK_LINUXDOC
237 # -------------------
238 # Minimum version: 1.0.0
240 # Defines the variable MAKE_TEXT if the necessary tools and
241 # files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
242 # Whether or not the necessary tools and files are found can be checked
243 # with the AM_CONDITIONAL "BUILD_LINUXDOC"
244 AC_DEFUN([XORG_CHECK_LINUXDOC],[
245 AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
246 AC_REQUIRE([XORG_WITH_PS2PDF])
248 AC_PATH_PROG(LINUXDOC, linuxdoc)
250 AC_MSG_CHECKING([whether to build documentation])
252 if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
258 AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
260 AC_MSG_RESULT([$BUILDDOC])
262 AC_MSG_CHECKING([whether to build pdf documentation])
264 if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
270 AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
272 AC_MSG_RESULT([$BUILDPDFDOC])
274 MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
275 MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
277 MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0"
283 ]) # XORG_CHECK_LINUXDOC
286 # -------------------
287 # Minimum version: 1.0.0
289 # Checks for the ability to build output formats from SGML DocBook source.
290 # For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
291 # indicates whether the necessary tools and files are found and, if set,
292 # $(MAKE_XXX) blah.sgml will produce blah.xxx.
293 AC_DEFUN([XORG_CHECK_DOCBOOK],[
294 AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
301 AC_PATH_PROG(DOCBOOKPS, docbook2ps)
302 AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
303 AC_PATH_PROG(DOCBOOKHTML, docbook2html)
304 AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
306 AC_MSG_CHECKING([whether to build text documentation])
307 if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
308 test x$BUILD_TXTDOC != xno; then
311 AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
312 AC_MSG_RESULT([$BUILDTXTDOC])
314 AC_MSG_CHECKING([whether to build PDF documentation])
315 if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
316 test x$BUILD_PDFDOC != xno; then
319 AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
320 AC_MSG_RESULT([$BUILDPDFDOC])
322 AC_MSG_CHECKING([whether to build PostScript documentation])
323 if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
324 test x$BUILD_PSDOC != xno; then
327 AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
328 AC_MSG_RESULT([$BUILDPSDOC])
330 AC_MSG_CHECKING([whether to build HTML documentation])
331 if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
332 test x$BUILD_HTMLDOC != xno; then
335 AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
336 AC_MSG_RESULT([$BUILDHTMLDOC])
338 MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
339 MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
340 MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
341 MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
347 ]) # XORG_CHECK_DOCBOOK
349 # XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
351 # Minimum version: 1.5.0
352 # Minimum version for optional DEFAULT argument: 1.11.0
354 # Documentation tools are not always available on all platforms and sometimes
355 # not at the appropriate level. This macro enables a module to test for the
356 # presence of the tool and obtain it's path in separate variables. Coupled with
357 # the --with-xmlto option, it allows maximum flexibilty in making decisions
358 # as whether or not to use the xmlto package. When DEFAULT is not specified,
359 # --with-xmlto assumes 'auto'.
361 # Interface to module:
362 # HAVE_XMLTO: used in makefiles to conditionally generate documentation
363 # XMLTO: returns the path of the xmlto program found
364 # returns the path set by the user in the environment
365 # --with-xmlto: 'yes' user instructs the module to use xmlto
366 # 'no' user instructs the module not to use xmlto
368 # Added in version 1.10.0
369 # HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
370 # xmlto for text output requires either lynx, links, or w3m browsers
372 # If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
374 AC_DEFUN([XORG_WITH_XMLTO],[
375 AC_ARG_VAR([XMLTO], [Path to xmlto command])
376 m4_define([_defopt], m4_default([$2], [auto]))
378 AS_HELP_STRING([--with-xmlto],
379 [Use xmlto to regenerate documentation (default: ]_defopt[)]),
380 [use_xmlto=$withval], [use_xmlto=]_defopt)
381 m4_undefine([_defopt])
383 if test "x$use_xmlto" = x"auto"; then
384 AC_PATH_PROG([XMLTO], [xmlto])
385 if test "x$XMLTO" = "x"; then
386 AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
391 elif test "x$use_xmlto" = x"yes" ; then
392 AC_PATH_PROG([XMLTO], [xmlto])
393 if test "x$XMLTO" = "x"; then
394 AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
397 elif test "x$use_xmlto" = x"no" ; then
398 if test "x$XMLTO" != "x"; then
399 AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
403 AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
406 # Test for a minimum version of xmlto, if provided.
408 [if test "$have_xmlto" = yes; then
409 # scrape the xmlto version
410 AC_MSG_CHECKING([the xmlto version])
411 xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
412 AC_MSG_RESULT([$xmlto_version])
413 AS_VERSION_COMPARE([$xmlto_version], [$1],
414 [if test "x$use_xmlto" = xauto; then
415 AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
418 AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
422 # Test for the ability of xmlto to generate a text target
424 cat > conftest.xml << "EOF"
426 AS_IF([test "$have_xmlto" = yes],
427 [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
428 [have_xmlto_text=yes],
429 [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
431 AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
432 AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
435 # XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
437 # Minimum version: 1.5.0
438 # Minimum version for optional DEFAULT argument: 1.11.0
440 # Documentation tools are not always available on all platforms and sometimes
441 # not at the appropriate level. This macro enables a module to test for the
442 # presence of the tool and obtain it's path in separate variables. Coupled with
443 # the --with-asciidoc option, it allows maximum flexibilty in making decisions
444 # as whether or not to use the asciidoc package. When DEFAULT is not specified,
445 # --with-asciidoc assumes 'auto'.
447 # Interface to module:
448 # HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
449 # ASCIIDOC: returns the path of the asciidoc program found
450 # returns the path set by the user in the environment
451 # --with-asciidoc: 'yes' user instructs the module to use asciidoc
452 # 'no' user instructs the module not to use asciidoc
454 # If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
456 AC_DEFUN([XORG_WITH_ASCIIDOC],[
457 AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
458 m4_define([_defopt], m4_default([$2], [auto]))
459 AC_ARG_WITH(asciidoc,
460 AS_HELP_STRING([--with-asciidoc],
461 [Use asciidoc to regenerate documentation (default: ]_defopt[)]),
462 [use_asciidoc=$withval], [use_asciidoc=]_defopt)
463 m4_undefine([_defopt])
465 if test "x$use_asciidoc" = x"auto"; then
466 AC_PATH_PROG([ASCIIDOC], [asciidoc])
467 if test "x$ASCIIDOC" = "x"; then
468 AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
473 elif test "x$use_asciidoc" = x"yes" ; then
474 AC_PATH_PROG([ASCIIDOC], [asciidoc])
475 if test "x$ASCIIDOC" = "x"; then
476 AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
479 elif test "x$use_asciidoc" = x"no" ; then
480 if test "x$ASCIIDOC" != "x"; then
481 AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
485 AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
488 [if test "$have_asciidoc" = yes; then
489 # scrape the asciidoc version
490 AC_MSG_CHECKING([the asciidoc version])
491 asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
492 AC_MSG_RESULT([$asciidoc_version])
493 AS_VERSION_COMPARE([$asciidoc_version], [$1],
494 [if test "x$use_asciidoc" = xauto; then
495 AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
498 AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
501 AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
502 ]) # XORG_WITH_ASCIIDOC
504 # XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
505 # --------------------------------
506 # Minimum version: 1.5.0
507 # Minimum version for optional DEFAULT argument: 1.11.0
509 # Documentation tools are not always available on all platforms and sometimes
510 # not at the appropriate level. This macro enables a module to test for the
511 # presence of the tool and obtain it's path in separate variables. Coupled with
512 # the --with-doxygen option, it allows maximum flexibilty in making decisions
513 # as whether or not to use the doxygen package. When DEFAULT is not specified,
514 # --with-doxygen assumes 'auto'.
516 # Interface to module:
517 # HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
518 # DOXYGEN: returns the path of the doxygen program found
519 # returns the path set by the user in the environment
520 # --with-doxygen: 'yes' user instructs the module to use doxygen
521 # 'no' user instructs the module not to use doxygen
523 # If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
525 AC_DEFUN([XORG_WITH_DOXYGEN],[
526 AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
527 m4_define([_defopt], m4_default([$2], [auto]))
529 AS_HELP_STRING([--with-doxygen],
530 [Use doxygen to regenerate documentation (default: ]_defopt[)]),
531 [use_doxygen=$withval], [use_doxygen=]_defopt)
532 m4_undefine([_defopt])
534 if test "x$use_doxygen" = x"auto"; then
535 AC_PATH_PROG([DOXYGEN], [doxygen])
536 if test "x$DOXYGEN" = "x"; then
537 AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
542 elif test "x$use_doxygen" = x"yes" ; then
543 AC_PATH_PROG([DOXYGEN], [doxygen])
544 if test "x$DOXYGEN" = "x"; then
545 AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
548 elif test "x$use_doxygen" = x"no" ; then
549 if test "x$DOXYGEN" != "x"; then
550 AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
554 AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
557 [if test "$have_doxygen" = yes; then
558 # scrape the doxygen version
559 AC_MSG_CHECKING([the doxygen version])
560 doxygen_version=`$DOXYGEN --version 2>/dev/null`
561 AC_MSG_RESULT([$doxygen_version])
562 AS_VERSION_COMPARE([$doxygen_version], [$1],
563 [if test "x$use_doxygen" = xauto; then
564 AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
567 AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
570 AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
571 ]) # XORG_WITH_DOXYGEN
573 # XORG_WITH_GROFF([DEFAULT])
575 # Minimum version: 1.6.0
576 # Minimum version for optional DEFAULT argument: 1.11.0
578 # Documentation tools are not always available on all platforms and sometimes
579 # not at the appropriate level. This macro enables a module to test for the
580 # presence of the tool and obtain it's path in separate variables. Coupled with
581 # the --with-groff option, it allows maximum flexibilty in making decisions
582 # as whether or not to use the groff package. When DEFAULT is not specified,
583 # --with-groff assumes 'auto'.
585 # Interface to module:
586 # HAVE_GROFF: used in makefiles to conditionally generate documentation
587 # HAVE_GROFF_MM: the memorandum macros (-mm) package
588 # HAVE_GROFF_MS: the -ms macros package
589 # GROFF: returns the path of the groff program found
590 # returns the path set by the user in the environment
591 # --with-groff: 'yes' user instructs the module to use groff
592 # 'no' user instructs the module not to use groff
594 # Added in version 1.9.0:
595 # HAVE_GROFF_HTML: groff has dependencies to output HTML format:
596 # pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
597 # psselect from the psutils package.
598 # the ghostcript package. Refer to the grohtml man pages
600 # If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
602 # OS and distros often splits groff in a basic and full package, the former
603 # having the groff program and the later having devices, fonts and macros
604 # Checking for the groff executable is not enough.
606 # If macros are missing, we cannot assume that groff is useless, so we don't
607 # unset HAVE_GROFF or GROFF env variables.
608 # HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
610 AC_DEFUN([XORG_WITH_GROFF],[
611 AC_ARG_VAR([GROFF], [Path to groff command])
612 m4_define([_defopt], m4_default([$1], [auto]))
614 AS_HELP_STRING([--with-groff],
615 [Use groff to regenerate documentation (default: ]_defopt[)]),
616 [use_groff=$withval], [use_groff=]_defopt)
617 m4_undefine([_defopt])
619 if test "x$use_groff" = x"auto"; then
620 AC_PATH_PROG([GROFF], [groff])
621 if test "x$GROFF" = "x"; then
622 AC_MSG_WARN([groff not found - documentation targets will be skipped])
627 elif test "x$use_groff" = x"yes" ; then
628 AC_PATH_PROG([GROFF], [groff])
629 if test "x$GROFF" = "x"; then
630 AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
633 elif test "x$use_groff" = x"no" ; then
634 if test "x$GROFF" != "x"; then
635 AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
639 AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
642 # We have groff, test for the presence of the macro packages
643 if test "x$have_groff" = x"yes"; then
644 AC_MSG_CHECKING([for ${GROFF} -ms macros])
645 if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
650 AC_MSG_RESULT([$groff_ms_works])
651 AC_MSG_CHECKING([for ${GROFF} -mm macros])
652 if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
657 AC_MSG_RESULT([$groff_mm_works])
660 # We have groff, test for HTML dependencies, one command per package
661 if test "x$have_groff" = x"yes"; then
662 AC_PATH_PROGS(GS_PATH, [gs gswin32c])
663 AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
664 AC_PATH_PROG(PSSELECT_PATH, [psselect])
665 if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
669 AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
673 # Set Automake conditionals for Makefiles
674 AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
675 AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
676 AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
677 AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
680 # XORG_WITH_FOP([DEFAULT])
682 # Minimum version: 1.6.0
683 # Minimum version for optional DEFAULT argument: 1.11.0
685 # Documentation tools are not always available on all platforms and sometimes
686 # not at the appropriate level. This macro enables a module to test for the
687 # presence of the tool and obtain it's path in separate variables. Coupled with
688 # the --with-fop option, it allows maximum flexibilty in making decisions
689 # as whether or not to use the fop package. When DEFAULT is not specified,
690 # --with-fop assumes 'auto'.
692 # Interface to module:
693 # HAVE_FOP: used in makefiles to conditionally generate documentation
694 # FOP: returns the path of the fop program found
695 # returns the path set by the user in the environment
696 # --with-fop: 'yes' user instructs the module to use fop
697 # 'no' user instructs the module not to use fop
699 # If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
701 AC_DEFUN([XORG_WITH_FOP],[
702 AC_ARG_VAR([FOP], [Path to fop command])
703 m4_define([_defopt], m4_default([$1], [auto]))
705 AS_HELP_STRING([--with-fop],
706 [Use fop to regenerate documentation (default: ]_defopt[)]),
707 [use_fop=$withval], [use_fop=]_defopt)
708 m4_undefine([_defopt])
710 if test "x$use_fop" = x"auto"; then
711 AC_PATH_PROG([FOP], [fop])
712 if test "x$FOP" = "x"; then
713 AC_MSG_WARN([fop not found - documentation targets will be skipped])
718 elif test "x$use_fop" = x"yes" ; then
719 AC_PATH_PROG([FOP], [fop])
720 if test "x$FOP" = "x"; then
721 AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
724 elif test "x$use_fop" = x"no" ; then
725 if test "x$FOP" != "x"; then
726 AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
730 AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
732 AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
735 # XORG_WITH_PS2PDF([DEFAULT])
737 # Minimum version: 1.6.0
738 # Minimum version for optional DEFAULT argument: 1.11.0
740 # Documentation tools are not always available on all platforms and sometimes
741 # not at the appropriate level. This macro enables a module to test for the
742 # presence of the tool and obtain it's path in separate variables. Coupled with
743 # the --with-ps2pdf option, it allows maximum flexibilty in making decisions
744 # as whether or not to use the ps2pdf package. When DEFAULT is not specified,
745 # --with-ps2pdf assumes 'auto'.
747 # Interface to module:
748 # HAVE_PS2PDF: used in makefiles to conditionally generate documentation
749 # PS2PDF: returns the path of the ps2pdf program found
750 # returns the path set by the user in the environment
751 # --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
752 # 'no' user instructs the module not to use ps2pdf
754 # If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
756 AC_DEFUN([XORG_WITH_PS2PDF],[
757 AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
758 m4_define([_defopt], m4_default([$1], [auto]))
760 AS_HELP_STRING([--with-ps2pdf],
761 [Use ps2pdf to regenerate documentation (default: ]_defopt[)]),
762 [use_ps2pdf=$withval], [use_ps2pdf=]_defopt)
763 m4_undefine([_defopt])
765 if test "x$use_ps2pdf" = x"auto"; then
766 AC_PATH_PROG([PS2PDF], [ps2pdf])
767 if test "x$PS2PDF" = "x"; then
768 AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
773 elif test "x$use_ps2pdf" = x"yes" ; then
774 AC_PATH_PROG([PS2PDF], [ps2pdf])
775 if test "x$PS2PDF" = "x"; then
776 AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
779 elif test "x$use_ps2pdf" = x"no" ; then
780 if test "x$PS2PDF" != "x"; then
781 AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
785 AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
787 AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
788 ]) # XORG_WITH_PS2PDF
790 # XORG_ENABLE_DOCS (enable_docs=yes)
792 # Minimum version: 1.6.0
794 # Documentation tools are not always available on all platforms and sometimes
795 # not at the appropriate level. This macro enables a builder to skip all
796 # documentation targets except traditional man pages.
797 # Combined with the specific tool checking macros XORG_WITH_*, it provides
798 # maximum flexibilty in controlling documentation building.
800 # XORG_WITH_XMLTO --with-xmlto
801 # XORG_WITH_ASCIIDOC --with-asciidoc
802 # XORG_WITH_DOXYGEN --with-doxygen
803 # XORG_WITH_FOP --with-fop
804 # XORG_WITH_GROFF --with-groff
805 # XORG_WITH_PS2PDF --with-ps2pdf
807 # Interface to module:
808 # ENABLE_DOCS: used in makefiles to conditionally generate documentation
809 # --enable-docs: 'yes' user instructs the module to generate docs
810 # 'no' user instructs the module not to generate docs
811 # parm1: specify the default value, yes or no.
813 AC_DEFUN([XORG_ENABLE_DOCS],[
814 m4_define([default], m4_default([$1], [yes]))
816 AS_HELP_STRING([--enable-docs],
817 [Enable building the documentation (default: ]default[)]),
818 [build_docs=$enableval], [build_docs=]default)
819 m4_undefine([default])
820 AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
821 AC_MSG_CHECKING([whether to build documentation])
822 AC_MSG_RESULT([$build_docs])
823 ]) # XORG_ENABLE_DOCS
825 # XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
827 # Minimum version: 1.6.0
829 # This macro enables a builder to skip all developer documentation.
830 # Combined with the specific tool checking macros XORG_WITH_*, it provides
831 # maximum flexibilty in controlling documentation building.
833 # XORG_WITH_XMLTO --with-xmlto
834 # XORG_WITH_ASCIIDOC --with-asciidoc
835 # XORG_WITH_DOXYGEN --with-doxygen
836 # XORG_WITH_FOP --with-fop
837 # XORG_WITH_GROFF --with-groff
838 # XORG_WITH_PS2PDF --with-ps2pdf
840 # Interface to module:
841 # ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs
842 # --enable-devel-docs: 'yes' user instructs the module to generate developer docs
843 # 'no' user instructs the module not to generate developer docs
844 # parm1: specify the default value, yes or no.
846 AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
847 m4_define([devel_default], m4_default([$1], [yes]))
848 AC_ARG_ENABLE(devel-docs,
849 AS_HELP_STRING([--enable-devel-docs],
850 [Enable building the developer documentation (default: ]devel_default[)]),
851 [build_devel_docs=$enableval], [build_devel_docs=]devel_default)
852 m4_undefine([devel_default])
853 AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
854 AC_MSG_CHECKING([whether to build developer documentation])
855 AC_MSG_RESULT([$build_devel_docs])
856 ]) # XORG_ENABLE_DEVEL_DOCS
858 # XORG_ENABLE_SPECS (enable_specs=yes)
860 # Minimum version: 1.6.0
862 # This macro enables a builder to skip all functional specification targets.
863 # Combined with the specific tool checking macros XORG_WITH_*, it provides
864 # maximum flexibilty in controlling documentation building.
866 # XORG_WITH_XMLTO --with-xmlto
867 # XORG_WITH_ASCIIDOC --with-asciidoc
868 # XORG_WITH_DOXYGEN --with-doxygen
869 # XORG_WITH_FOP --with-fop
870 # XORG_WITH_GROFF --with-groff
871 # XORG_WITH_PS2PDF --with-ps2pdf
873 # Interface to module:
874 # ENABLE_SPECS: used in makefiles to conditionally generate specs
875 # --enable-specs: 'yes' user instructs the module to generate specs
876 # 'no' user instructs the module not to generate specs
877 # parm1: specify the default value, yes or no.
879 AC_DEFUN([XORG_ENABLE_SPECS],[
880 m4_define([spec_default], m4_default([$1], [yes]))
882 AS_HELP_STRING([--enable-specs],
883 [Enable building the specs (default: ]spec_default[)]),
884 [build_specs=$enableval], [build_specs=]spec_default)
885 m4_undefine([spec_default])
886 AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
887 AC_MSG_CHECKING([whether to build functional specifications])
888 AC_MSG_RESULT([$build_specs])
889 ]) # XORG_ENABLE_SPECS
891 # XORG_CHECK_MALLOC_ZERO
892 # ----------------------
893 # Minimum version: 1.0.0
895 # Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
896 # malloc(0) returns NULL. Packages should add one of these cflags to
897 # their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
898 AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
899 AC_ARG_ENABLE(malloc0returnsnull,
900 AS_HELP_STRING([--enable-malloc0returnsnull],
901 [malloc(0) returns NULL (default: auto)]),
902 [MALLOC_ZERO_RETURNS_NULL=$enableval],
903 [MALLOC_ZERO_RETURNS_NULL=auto])
905 AC_MSG_CHECKING([whether malloc(0) returns NULL])
906 if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
912 char *m0, *r0, *c0, *p;
917 exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
919 [MALLOC_ZERO_RETURNS_NULL=yes],
920 [MALLOC_ZERO_RETURNS_NULL=no],
921 [MALLOC_ZERO_RETURNS_NULL=yes])
923 AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
925 if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
926 MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
927 XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
928 XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
930 MALLOC_ZERO_CFLAGS=""
931 XMALLOC_ZERO_CFLAGS=""
932 XTMALLOC_ZERO_CFLAGS=""
935 AC_SUBST([MALLOC_ZERO_CFLAGS])
936 AC_SUBST([XMALLOC_ZERO_CFLAGS])
937 AC_SUBST([XTMALLOC_ZERO_CFLAGS])
938 ]) # XORG_CHECK_MALLOC_ZERO
942 # Minimum version: 1.1.0
944 # This macro enables the use of a tool that flags some suspicious and
945 # non-portable constructs (likely to be bugs) in C language source code.
946 # It will attempt to locate the tool and use appropriate options.
947 # There are various lint type tools on different platforms.
949 # Interface to module:
950 # LINT: returns the path to the tool found on the platform
951 # or the value set to LINT on the configure cmd line
952 # also an Automake conditional
953 # LINT_FLAGS: an Automake variable with appropriate flags
955 # --with-lint: 'yes' user instructs the module to use lint
956 # 'no' user instructs the module not to use lint (default)
958 # If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
959 # If the user sets the value of LINT_FLAGS, they are used verbatim.
961 AC_DEFUN([XORG_WITH_LINT],[
963 AC_ARG_VAR([LINT], [Path to a lint-style command])
964 AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
965 AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
966 [Use a lint-style source code checker (default: disabled)])],
967 [use_lint=$withval], [use_lint=no])
969 # Obtain platform specific info like program name and options
970 # The lint program on FreeBSD and NetBSD is different from the one on Solaris
972 *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
974 lint_options="-badflag"
976 *freebsd* | *netbsd*)
982 lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
986 # Test for the presence of the program (either guessed by the code or spelled out by the user)
987 if test "x$use_lint" = x"yes" ; then
988 AC_PATH_PROG([LINT], [$lint_name])
989 if test "x$LINT" = "x"; then
990 AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
992 elif test "x$use_lint" = x"no" ; then
993 if test "x$LINT" != "x"; then
994 AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
997 AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
1000 # User supplied flags override default flags
1001 if test "x$LINT_FLAGS" != "x"; then
1002 lint_options=$LINT_FLAGS
1005 AC_SUBST([LINT_FLAGS],[$lint_options])
1006 AM_CONDITIONAL(LINT, [test "x$LINT" != x])
1010 # XORG_LINT_LIBRARY(LIBNAME)
1011 # --------------------------
1012 # Minimum version: 1.1.0
1014 # Sets up flags for building lint libraries for checking programs that call
1015 # functions in the library.
1017 # Interface to module:
1018 # LINTLIB - Automake variable with the name of lint library file to make
1019 # MAKE_LINT_LIB - Automake conditional
1021 # --enable-lint-library: - 'yes' user instructs the module to created a lint library
1022 # - 'no' user instructs the module not to create a lint library (default)
1024 AC_DEFUN([XORG_LINT_LIBRARY],[
1025 AC_REQUIRE([XORG_WITH_LINT])
1026 AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
1027 [Create lint library (default: disabled)])],
1028 [make_lint_lib=$enableval], [make_lint_lib=no])
1030 if test "x$make_lint_lib" = x"yes" ; then
1032 if test "x$LINT" = "x"; then
1033 AC_MSG_ERROR([Cannot make lint library without --with-lint])
1035 elif test "x$make_lint_lib" != x"no" ; then
1036 AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
1040 AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
1042 ]) # XORG_LINT_LIBRARY
1046 # Minimum version: 1.2.0
1048 # Defines CWARNFLAGS to enable C compiler warnings.
1050 AC_DEFUN([XORG_CWARNFLAGS], [
1051 AC_REQUIRE([AC_PROG_CC_C99])
1052 if test "x$GCC" = xyes ; then
1053 CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
1054 -Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
1055 -Wbad-function-cast -Wformat=2"
1056 case `$CC -dumpversion` in
1058 CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
1062 AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
1063 if test "x$SUNCC" = "xyes"; then
1067 AC_SUBST(CWARNFLAGS)
1068 ]) # XORG_CWARNFLAGS
1070 # XORG_STRICT_OPTION
1071 # -----------------------
1072 # Minimum version: 1.3.0
1074 # Add configure option to enable strict compilation
1075 AC_DEFUN([XORG_STRICT_OPTION], [
1076 # If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
1077 AC_REQUIRE([AC_PROG_CC_C99])
1078 AC_REQUIRE([XORG_CWARNFLAGS])
1080 AC_ARG_ENABLE(strict-compilation,
1081 AS_HELP_STRING([--enable-strict-compilation],
1082 [Enable all warnings from compiler and make them errors (default: disabled)]),
1083 [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
1084 if test "x$STRICT_COMPILE" = "xyes"; then
1085 AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
1086 AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
1087 if test "x$GCC" = xyes ; then
1088 STRICT_CFLAGS="-pedantic -Werror"
1089 elif test "x$SUNCC" = "xyes"; then
1090 STRICT_CFLAGS="-errwarn"
1091 elif test "x$INTELCC" = "xyes"; then
1092 STRICT_CFLAGS="-Werror"
1095 CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
1096 AC_SUBST([CWARNFLAGS])
1097 ]) # XORG_STRICT_OPTION
1099 # XORG_DEFAULT_OPTIONS
1100 # --------------------
1101 # Minimum version: 1.3.0
1103 # Defines default options for X.Org modules.
1105 AC_DEFUN([XORG_DEFAULT_OPTIONS], [
1106 AC_REQUIRE([AC_PROG_INSTALL])
1109 XORG_RELEASE_VERSION
1112 XORG_MANPAGE_SECTIONS
1113 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
1114 [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
1115 ]) # XORG_DEFAULT_OPTIONS
1119 # Minimum version: 1.4.0
1121 # Defines the variable INSTALL_CMD as the command to copy
1122 # INSTALL from $prefix/share/util-macros.
1124 AC_DEFUN([XORG_INSTALL], [
1125 AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1126 macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
1127 INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
1128 mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
1129 || (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
1130 echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
1131 AC_SUBST([INSTALL_CMD])