Lines Matching +full:fails +full:- +full:without +full:- +full:test +full:- +full:cd

1 # generated automatically by aclocal 1.16.2 -*- Autoconf -*-
3 # Copyright (C) 1996-2020 Free Software Foundation, Inc.
7 # with or without modifications, as long as this notice is preserved.
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
25 dnl This file comes from X.Org's font-util 1.3.2
31 dnl to deal in the Software without restriction, including without limitation
40 dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
48 dnl --------------------------------------------------------------------
53 dnl documentation for any purpose is hereby granted without fee, provided that
61 dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
71 dnl other dealings in this Software without prior written authorization
74 # XORG_FONT_MACROS_VERSION(required-version)
75 # ------------------------------------------
84 # [m4_fatal([must install X.Org font-util 1.1 or later before running autoconf/autogen])])
94 [m4_fatal([font-util major version ]maj_needed[ is required but ]vers_have[ found])])
95 m4_if(m4_version_compare(vers_have, [$1]), -1,
96 [m4_fatal([font-util version $1 or higher is required but ]vers_have[ found])])
103 # ------------------------
105 # These macros add --enable/disable-{maps} where {maps} are ISO8859-*,
108 AC_DEFUN([XORG_FONT_CHECK_ISO8859_1], [XORG_FONT_CHECK_ENCODING(ISO8859-1)])
109 AC_DEFUN([XORG_FONT_CHECK_ISO8859_2], [XORG_FONT_CHECK_ENCODING(ISO8859-2)])
110 AC_DEFUN([XORG_FONT_CHECK_ISO8859_3], [XORG_FONT_CHECK_ENCODING(ISO8859-3)])
111 AC_DEFUN([XORG_FONT_CHECK_ISO8859_4], [XORG_FONT_CHECK_ENCODING(ISO8859-4)])
112 AC_DEFUN([XORG_FONT_CHECK_ISO8859_5], [XORG_FONT_CHECK_ENCODING(ISO8859-5)])
113 AC_DEFUN([XORG_FONT_CHECK_ISO8859_6], [XORG_FONT_CHECK_ENCODING(ISO8859-6)])
114 AC_DEFUN([XORG_FONT_CHECK_ISO8859_7], [XORG_FONT_CHECK_ENCODING(ISO8859-7)])
115 AC_DEFUN([XORG_FONT_CHECK_ISO8859_8], [XORG_FONT_CHECK_ENCODING(ISO8859-8)])
116 AC_DEFUN([XORG_FONT_CHECK_ISO8859_9], [XORG_FONT_CHECK_ENCODING(ISO8859-9)])
117 AC_DEFUN([XORG_FONT_CHECK_ISO8859_10],[XORG_FONT_CHECK_ENCODING(ISO8859-10)])
118 AC_DEFUN([XORG_FONT_CHECK_ISO8859_11],[XORG_FONT_CHECK_ENCODING(ISO8859-11)])
119 AC_DEFUN([XORG_FONT_CHECK_ISO8859_12],[XORG_FONT_CHECK_ENCODING(ISO8859-12)])
120 AC_DEFUN([XORG_FONT_CHECK_ISO8859_13],[XORG_FONT_CHECK_ENCODING(ISO8859-13)])
121 AC_DEFUN([XORG_FONT_CHECK_ISO8859_14],[XORG_FONT_CHECK_ENCODING(ISO8859-14)])
122 AC_DEFUN([XORG_FONT_CHECK_ISO8859_15],[XORG_FONT_CHECK_ENCODING(ISO8859-15)])
123 AC_DEFUN([XORG_FONT_CHECK_ISO8859_16],[XORG_FONT_CHECK_ENCODING(ISO8859-16)])
125 AC_DEFUN([XORG_FONT_CHECK_KOI8_R], [XORG_FONT_CHECK_ENCODING(KOI8-R)])
128 # ----------------------------------
130 # This macro adds --enable/disable-<encoding>, enabled by default.
132 # Currently assumes encoding names will be all upper-case - add m4_toupper
137 AS_HELP_STRING(m4_join([-], [--disable], m4_tolower($1)),
142 AM_CONDITIONAL(AS_TR_SH($1), [test "x$AS_TR_SH($1)" = xyes])
146 # -----------------------------------------------------
149 # Add a shorthand --enable/disable-all-encodings option.
152 AC_ARG_ENABLE([all-encodings],
153 AS_HELP_STRING([--disable-all-encodings],
165 # ------------------------------------------
173 if test x"$$1" = x; then
180 # -------------------
183 # Set FCCACHE to path to fc-cache (fontconfig cache builder) if found
185 # to run fc-cache if found and not installing to $DESTDIR and not
186 # cross-compiling
188 # fc-cache is optional, not required, and should be skipped when making
189 # packages (installing to $DESTDIR) or cross-compiling
192 AC_PATH_PROG(FCCACHE, fc-cache)
193 …ning: fonts.cache not built" ; echo "** Generate this file manually on host system using fc-cache"'
194 if test x"$FCCACHE" = x || test x"$cross_compiling" != x"no" ; then
197 …RUN_FCCACHE='@(if test -z "$(DESTDIR)"; then echo $(FCCACHE) $(fontdir); $(FCCACHE) $(fontdir); el…
204 # -------------------
209 # If cross-compiling, and if mkdir is not found, use a shell command
212 # If not cross-compiling, mkfontdir must be found
215 if test x"$cross_compiling" != x"no" ; then
219 if test x"$MKFONTDIR" = x; then
230 # ------------------------
241 # ------------------------
253 # ---------------------
267 # -----------------------------
270 # Offer a --with-compression flag to control what compression method is
277 [AS_HELP_STRING([--with-compression=<no|compress|gzip|bzip2>],
280 if test x"$compression" = "xyes" ; then
291 if test x"$COMPRESS_SUFFIX" != "x" ; then
298 # -------------------
302 # Unicode-encoded BDF format bitmap fonts into subsets for older encodings.
303 # Also call pkg-config to find the directory with the encoding files needed
311 MAPFILES_PATH=`$PKG_CONFIG --variable=mapdir fontutil`
319 # --------------------
323 # (which should be --with-confdir=... when building fontconfig)
325 # --with-fc-confdir=...
326 # pkg-config --variable=confdir fontconfig
334 AC_ARG_WITH(fc-confdir,
335 AS_HELP_STRING([--with-fc-confdir=DIR],
338 # if --with-fc-confdir was not specified
339 if test "x${FC_CONFDIR}" = "x"; then
340 FC_CONFDIR=`$PKG_CONFIG --variable=confdir fontconfig`
342 # ...and if pkg-config didn't find confdir in fontconfig.pc...
343 if test "x${FC_CONFDIR}" = "x"; then
353 # --------------------
358 # --with-fontrootdir
359 # pkg-config --variable=fontrootdir fontutil
368 AS_HELP_STRING([--with-fontrootdir=DIR],
371 # if --with-fontrootdir not specified...
372 if test "x${FONTROOTDIR}" = "x"; then
373 FONTROOTDIR=`$PKG_CONFIG --variable=fontrootdir fontutil`
375 # ...and if pkg-config didn't find fontdir in fontutil.pc...
376 if test "x${FONTROOTDIR}" = "x"; then
384 # ---------------------------------------
387 # Offer a --with-<flag> flag to control directory for font installation
396 [AS_HELP_STRING([--with-$2=DIR],
404 # --------------------
407 # Offer a --with-fontdir flag to control directory for font installation
413 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
414 # serial 11 (pkg-config-0.29.1)
417 dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
425 dnl WITHOUT ANY WARRANTY; without even the implied warranty of
431 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
432 dnl 02111-1307, USA.
440 dnl PKG_PREREQ(MIN-VERSION)
441 dnl -----------------------
444 dnl Verify that the version of the pkg-config macros are at least
445 dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
446 dnl installed version of pkg-config, this checks the developer's version
451 dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
457 m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
461 dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
462 dnl ----------------------------------
465 dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
466 dnl first found in the path. Checks that the version of pkg-config found
467 dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
469 dnl pkg-config existed.
471 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
474 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
475 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
476 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
478 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
479 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
481 if test -n "$PKG_CONFIG"; then
483 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
484 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
493 dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
494 dnl -------------------------------------------------------------------
506 if test -n "$PKG_CONFIG" && \
507 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
514 dnl ---------------------------------------------
515 dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
518 [if test -n "$$1"; then
520 elif test -n "$PKG_CONFIG"; then
522 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
523 test "x$?" != "x0" && pkg_failed=yes ],
531 dnl ---------------------------
532 dnl Internal check to see if pkg-config supports short errors.
535 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
543 dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
544 dnl [ACTION-IF-NOT-FOUND])
545 dnl --------------------------------------------------------------
553 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
554 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
563 and $1[]_LIBS to avoid the need to call pkg-config.
564 See the pkg-config man page for more details.])
566 if test $pkg_failed = yes; then
569 if test $_pkg_short_errors_supported = yes; then
570 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
572 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
583 installed software in a non-standard prefix.
587 elif test $pkg_failed = untried; then
590 [The pkg-config script could not be found or is too old. Make sure it
592 path to pkg-config.
596 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
607 dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
608 dnl [ACTION-IF-NOT-FOUND])
609 dnl ---------------------------------------------------------------------
613 dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
614 dnl and VARIABLE-PREFIX_LIBS from --libs.
623 PKG_CONFIG="$PKG_CONFIG --static"
630 dnl -------------------------
634 dnl should install pkg-config .pc files. By default the directory is
636 dnl DIRECTORY. The user can override through the --with-pkgconfigdir
641 [pkg-config installation directory @<:@]pkg_default[@:>@])
643 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
652 dnl --------------------------------
656 dnl module should install arch-independent pkg-config .pc files. By
659 dnl --with-noarch-pkgconfigdir parameter.
663 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
664 AC_ARG_WITH([noarch-pkgconfigdir],
665 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
673 dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
674 dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
675 dnl -------------------------------------------
678 dnl Retrieves the value of the pkg-config variable for the given module.
681 AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
689 dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES,
690 dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND],
692 dnl ------------------------------------------
694 dnl Prepare a "--with-" configure option using the lowercase
695 dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and
709 [yes],[m4_pushdef([with_without], [--without-]with_arg)],
710 [m4_pushdef([with_without],[--with-]with_arg)])
728 dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
730 dnl -----------------------------------------------
733 dnl check._[VARIABLE-PREFIX] is exported as make variable.
739 [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"])
742 dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
744 dnl ------------------------------------------------------
747 dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make
753 AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"],
757 dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure.
763 dnl to deal in the Software without restriction, including without limitation
772 dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
780 # XORG_MACROS_VERSION(required-version)
781 # -------------------------------------
790 # [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
800 [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
801 m4_if(m4_version_compare(vers_have, [$1]), -1,
802 [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
809 # ------------------
812 # Find cpp program and necessary flags for use in pre-processing text files
819 # Check for flag to avoid builtin definitions - assumes unix is predefined,
822 AC_MSG_CHECKING([if $RAWCPP requires -undef])
824 if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
827 if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
828 RAWCPPFLAGS=-undef
830 # under Cygwin unix is still defined even with -undef
831 elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
832 RAWCPPFLAGS="-undef -ansi"
833 AC_MSG_RESULT([yes, with -ansi])
835 AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.])
838 rm -f conftest.$ac_ext
840 AC_MSG_CHECKING([if $RAWCPP requires -traditional])
842 if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
845 if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
846 TRADITIONALCPPFLAGS="-traditional"
847 RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
850 …AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know w…
853 rm -f conftest.$ac_ext
859 # -----------------------
863 # on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
875 # Solaris 2.0 - 11.3 use SysV man page section numbers, so we
884 if test x$APP_MAN_SUFFIX = x ; then
887 if test x$APP_MAN_DIR = x ; then
891 if test x$LIB_MAN_SUFFIX = x ; then
894 if test x$LIB_MAN_DIR = x ; then
898 if test x$FILE_MAN_SUFFIX = x ; then
904 if test x$FILE_MAN_DIR = x ; then
908 if test x$MISC_MAN_SUFFIX = x ; then
914 if test x$MISC_MAN_DIR = x ; then
918 if test x$DRIVER_MAN_SUFFIX = x ; then
924 if test x$DRIVER_MAN_DIR = x ; then
928 if test x$ADMIN_MAN_SUFFIX = x ; then
934 if test x$ADMIN_MAN_DIR = x ; then
955 -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
956 -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
957 -e 's|__xservername__|Xorg|g' \
958 -e 's|__xconfigfile__|xorg.conf|g' \
959 -e 's|__projectroot__|\$(prefix)|g' \
960 -e 's|__apploaddir__|\$(appdefaultdir)|g' \
961 -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
962 -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
963 -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
964 -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
965 -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
966 -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
971 # XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
972 # ------------------------
976 # provided by xorg-sgml-doctools, if installed.
980 PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
981 [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
983 [if test x"$cross_compiling" != x"yes" ; then
991 if test "x$XORG_SGML_PATH" != "x" ; then
1002 AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
1006 # -------------------
1021 if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
1027 AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
1033 if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
1039 AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
1043 MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
1044 MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
1046 MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0"
1055 # -------------------
1076 if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
1077 test x$BUILD_TXTDOC != xno; then
1080 AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
1084 if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
1085 test x$BUILD_PDFDOC != xno; then
1088 AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
1092 if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
1093 test x$BUILD_PSDOC != xno; then
1096 AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
1100 if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
1101 test x$BUILD_HTMLDOC != xno; then
1104 AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
1118 # XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
1119 # ----------------
1124 # not at the appropriate level. This macro enables a module to test for the
1126 # the --with-xmlto option, it allows maximum flexibilty in making decisions
1128 # --with-xmlto assumes 'auto'.
1134 # --with-xmlto: 'yes' user instructs the module to use xmlto
1147 AS_HELP_STRING([--with-xmlto],
1152 if test "x$use_xmlto" = x"auto"; then
1154 if test "x$XMLTO" = "x"; then
1155 AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
1160 elif test "x$use_xmlto" = x"yes" ; then
1162 if test "x$XMLTO" = "x"; then
1163 AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
1166 elif test "x$use_xmlto" = x"no" ; then
1167 if test "x$XMLTO" != "x"; then
1168 AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
1172 AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
1175 # Test for a minimum version of xmlto, if provided.
1177 [if test "$have_xmlto" = yes; then
1180 xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
1183 [if test "x$use_xmlto" = xauto; then
1191 # Test for the ability of xmlto to generate a text target
1193 # NOTE: xmlto 0.0.27 or higher return a non-zero return code in the
1194 # following test for empty XML docbook files.
1196 # it fails try it again with a non-empty XML file.
1200 AS_IF([test "$have_xmlto" = yes],
1201 [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
1203 [# Try it again with a non-empty XML file.
1207 AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
1210 rm -f conftest.xml
1211 AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
1212 AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
1215 # XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT])
1216 # --------------------------------------------
1221 # XML-based language used for the transformation of XML documents.
1226 # When DEFAULT is not specified, --with-xsltproc assumes 'auto'.
1232 # --with-xsltproc: 'yes' user instructs the module to use xsltproc
1241 m4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])])
1244 AS_HELP_STRING([--with-xsltproc],
1249 if test "x$use_xsltproc" = x"auto"; then
1251 if test "x$XSLTPROC" = "x"; then
1252 AC_MSG_WARN([xsltproc not found - cannot transform XML documents])
1257 elif test "x$use_xsltproc" = x"yes" ; then
1259 if test "x$XSLTPROC" = "x"; then
1260 AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH])
1263 elif test "x$use_xsltproc" = x"no" ; then
1264 if test "x$XSLTPROC" != "x"; then
1265 AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified])
1269 AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no'])
1272 AM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes])
1275 # XORG_WITH_PERL([MIN-VERSION], [DEFAULT])
1276 # ----------------------------------------
1283 # When DEFAULT is not specified, --with-perl assumes 'auto'.
1289 # --with-perl: 'yes' user instructs the module to use perl
1298 m4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])])
1301 AS_HELP_STRING([--with-perl],
1306 if test "x$use_perl" = x"auto"; then
1308 if test "x$PERL" = "x"; then
1309 AC_MSG_WARN([perl not found - cannot extract information and report])
1314 elif test "x$use_perl" = x"yes" ; then
1316 if test "x$PERL" = "x"; then
1317 AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH])
1320 elif test "x$use_perl" = x"no" ; then
1321 if test "x$PERL" != "x"; then
1322 AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified])
1326 AC_MSG_ERROR([--with-perl expects 'yes' or 'no'])
1329 AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes])
1332 # XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
1333 # ----------------
1338 # not at the appropriate level. This macro enables a module to test for the
1340 # the --with-asciidoc option, it allows maximum flexibilty in making decisions
1342 # --with-asciidoc assumes 'auto'.
1348 # --with-asciidoc: 'yes' user instructs the module to use asciidoc
1357 AS_HELP_STRING([--with-asciidoc],
1362 if test "x$use_asciidoc" = x"auto"; then
1364 if test "x$ASCIIDOC" = "x"; then
1365 AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
1370 elif test "x$use_asciidoc" = x"yes" ; then
1372 if test "x$ASCIIDOC" = "x"; then
1373 AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
1376 elif test "x$use_asciidoc" = x"no" ; then
1377 if test "x$ASCIIDOC" != "x"; then
1378 AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
1382 AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
1385 [if test "$have_asciidoc" = yes; then
1388 asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
1391 [if test "x$use_asciidoc" = xauto; then
1398 AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
1401 # XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
1402 # -------------------------------------------
1408 # not at the appropriate level. This macro enables a module to test for the
1410 # the --with-doxygen option, it allows maximum flexibilty in making decisions
1412 # --with-doxygen assumes 'auto'.
1418 # --with-doxygen: 'yes' user instructs the module to use doxygen
1428 AS_HELP_STRING([--with-doxygen],
1433 if test "x$use_doxygen" = x"auto"; then
1435 if test "x$DOXYGEN" = "x"; then
1436 AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
1441 elif test "x$use_doxygen" = x"yes" ; then
1443 if test "x$DOXYGEN" = "x"; then
1444 AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
1447 elif test "x$use_doxygen" = x"no" ; then
1448 if test "x$DOXYGEN" != "x"; then
1449 AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
1453 AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
1456 [if test "$have_doxygen" = yes; then
1459 doxygen_version=`$DOXYGEN --version 2>/dev/null`
1462 [if test "x$use_doxygen" = xauto; then
1474 if test "x$have_doxygen" = "xyes"; then
1476 if test "x$DOT" != "x"; then
1482 AM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"])
1483 AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
1487 # ----------------
1492 # not at the appropriate level. This macro enables a module to test for the
1494 # the --with-groff option, it allows maximum flexibilty in making decisions
1496 # --with-groff assumes 'auto'.
1500 # HAVE_GROFF_MM: the memorandum macros (-mm) package
1501 # HAVE_GROFF_MS: the -ms macros package
1504 # --with-groff: 'yes' user instructs the module to use groff
1527 AS_HELP_STRING([--with-groff],
1532 if test "x$use_groff" = x"auto"; then
1534 if test "x$GROFF" = "x"; then
1535 AC_MSG_WARN([groff not found - documentation targets will be skipped])
1540 elif test "x$use_groff" = x"yes" ; then
1542 if test "x$GROFF" = "x"; then
1543 AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
1546 elif test "x$use_groff" = x"no" ; then
1547 if test "x$GROFF" != "x"; then
1548 AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
1552 AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
1555 # We have groff, test for the presence of the macro packages
1556 if test "x$have_groff" = x"yes"; then
1557 AC_MSG_CHECKING([for ${GROFF} -ms macros])
1558 if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
1564 AC_MSG_CHECKING([for ${GROFF} -mm macros])
1565 if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
1573 # We have groff, test for HTML dependencies, one command per package
1574 if test "x$have_groff" = x"yes"; then
1578 if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
1582 …AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pag…
1587 AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
1588 AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
1589 AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
1590 AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
1593 # XORG_WITH_FOP([MIN-VERSION], [DEFAULT])
1594 # ---------------------------------------
1597 # Minimum version for optional MIN-VERSION argument: 1.15.0
1600 # not at the appropriate level. This macro enables a module to test for the
1602 # the --with-fop option, it allows maximum flexibilty in making decisions
1604 # --with-fop assumes 'auto'.
1610 # --with-fop: 'yes' user instructs the module to use fop
1619 AS_HELP_STRING([--with-fop],
1624 if test "x$use_fop" = x"auto"; then
1626 if test "x$FOP" = "x"; then
1627 AC_MSG_WARN([fop not found - documentation targets will be skipped])
1632 elif test "x$use_fop" = x"yes" ; then
1634 if test "x$FOP" = "x"; then
1635 AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
1638 elif test "x$use_fop" = x"no" ; then
1639 if test "x$FOP" != "x"; then
1640 AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
1644 AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
1647 # Test for a minimum version of fop, if provided.
1649 [if test "$have_fop" = yes; then
1652 fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3`
1655 [if test "x$use_fop" = xauto; then
1662 AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
1665 # XORG_WITH_M4([MIN-VERSION])
1666 # ---------------------------
1670 # -I option and is only useful for modules relying on M4 in order to
1678 AC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4],
1680 [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \
1682 [AC_MSG_ERROR([could not find m4 that supports -I option])],
1689 # ----------------
1694 # not at the appropriate level. This macro enables a module to test for the
1696 # the --with-ps2pdf option, it allows maximum flexibilty in making decisions
1698 # --with-ps2pdf assumes 'auto'.
1704 # --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
1713 AS_HELP_STRING([--with-ps2pdf],
1718 if test "x$use_ps2pdf" = x"auto"; then
1720 if test "x$PS2PDF" = "x"; then
1721 AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
1726 elif test "x$use_ps2pdf" = x"yes" ; then
1728 if test "x$PS2PDF" = "x"; then
1729 AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
1732 elif test "x$use_ps2pdf" = x"no" ; then
1733 if test "x$PS2PDF" != "x"; then
1734 AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
1738 AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
1740 AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
1744 # ----------------
1753 # XORG_WITH_XMLTO --with-xmlto
1754 # XORG_WITH_ASCIIDOC --with-asciidoc
1755 # XORG_WITH_DOXYGEN --with-doxygen
1756 # XORG_WITH_FOP --with-fop
1757 # XORG_WITH_GROFF --with-groff
1758 # XORG_WITH_PS2PDF --with-ps2pdf
1762 # --enable-docs: 'yes' user instructs the module to generate docs
1769 AS_HELP_STRING([--enable-docs],
1773 AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
1779 # ----------------
1786 # XORG_WITH_XMLTO --with-xmlto
1787 # XORG_WITH_ASCIIDOC --with-asciidoc
1788 # XORG_WITH_DOXYGEN --with-doxygen
1789 # XORG_WITH_FOP --with-fop
1790 # XORG_WITH_GROFF --with-groff
1791 # XORG_WITH_PS2PDF --with-ps2pdf
1795 # --enable-devel-docs: 'yes' user instructs the module to generate developer docs
1801 AC_ARG_ENABLE(devel-docs,
1802 AS_HELP_STRING([--enable-devel-docs],
1806 AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
1812 # ----------------
1819 # XORG_WITH_XMLTO --with-xmlto
1820 # XORG_WITH_ASCIIDOC --with-asciidoc
1821 # XORG_WITH_DOXYGEN --with-doxygen
1822 # XORG_WITH_FOP --with-fop
1823 # XORG_WITH_GROFF --with-groff
1824 # XORG_WITH_PS2PDF --with-ps2pdf
1828 # --enable-specs: 'yes' user instructs the module to generate specs
1835 AS_HELP_STRING([--enable-specs],
1839 AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
1845 # ----------------------------------------------
1849 # It makes no assumption about the test cases implementation
1850 # Test cases may or may not use Automake "Support for test suites"
1860 # --enable-unit-tests: 'yes' user instructs the module to build tests
1869 AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests],
1870 [Enable building unit test cases (default: ]_defopt[)]),
1873 AM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno])
1874 AC_MSG_CHECKING([whether to build unit test cases])
1879 # ------------------------------------------------------
1883 # It makes no assumption about the test cases' implementation
1884 # Test cases may or may not use Automake "Support for test suites"
1886 # Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support
1893 # --enable-integration-tests: 'yes' user instructs the module to build tests
1900 AC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests],
1901 [Enable building integration test cases (default: ]_defopt[)]),
1906 [test "x$enable_integration_tests" != xno])
1907 AC_MSG_CHECKING([whether to build unit test cases])
1911 # XORG_WITH_GLIB([MIN-VERSION], [DEFAULT])
1912 # ----------------------------------------
1916 # This macro enables a module to test for the presence of Glib.
1921 # Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit
1922 # test support usually requires less dependencies and may be built and run under
1928 # --with-glib: 'yes' user instructs the module to use glib
1934 AC_ARG_WITH(glib, AS_HELP_STRING([--with-glib],
1941 if test "x$enable_unit_tests" != x"no"; then
1943 if test "x$with_glib" != x"no"; then
1946 [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])],
1947 [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])]
1953 if test "x$enable_unit_tests" = x"yes"; then
1954 if test "x$have_glib" = x"no"; then
1955 AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
1960 if test "x$enable_unit_tests" = x"no"; then
1961 if test "x$with_glib" = x"yes"; then
1962 AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
1967 if test "x$with_glib" = x"yes"; then
1968 if test "x$have_glib" = x"no"; then
1969 AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found])
1973 AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes])
1977 # ---------------------------------
1980 # Check if linker supports -wrap, passed via compiler flags
1982 # When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing.
1985 # Argument added in 1.16.0 - default is "required", to match existing behavior
1986 # of returning an error if enable_unit_tests is yes, and ld -wrap is not
1988 # ld -wrap and others do not.
1991 XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no],
1996 if test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then
1997 if test "x$have_ld_wrap" = x"no"; then
1998 AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available])
2001 AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes])
2006 # -----------------------
2009 # XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE])
2016 # ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
2019 # PROGRAM-SOURCE is the program source to link with, if needed
2035 # WITHOUT ANY WARRANTY; without even the implied warranty of
2056 dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
2073 if test "x$xorg_check_linker_flags" = xyes; then
2081 # -----------------------
2089 # XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging
2106 *-gnu*) # GNU libc - Value is used as a single byte bit pattern,
2119 if test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then
2127 # ----------------------
2135 AS_HELP_STRING([--enable-malloc0returnsnull],
2141 if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
2159 if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
2160 MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
2162 XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
2175 # ----------------
2179 # non-portable constructs (likely to be bugs) in C language source code.
2189 # --with-lint: 'yes' user instructs the module to use lint
2197 AC_ARG_VAR([LINT], [Path to a lint-style command])
2198 AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
2199 AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
2200 [Use a lint-style source code checker (default: disabled)])],
2206 *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
2208 lint_options="-badflag"
2212 lint_options="-u -b"
2216 lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
2220 # Test for the presence of the program (either guessed by the code or spelled out by the user)
2221 if test "x$use_lint" = x"yes" ; then
2223 if test "x$LINT" = "x"; then
2224 AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
2226 elif test "x$use_lint" = x"no" ; then
2227 if test "x$LINT" != "x"; then
2228 AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
2231 AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
2235 if test "x$LINT_FLAGS" != "x"; then
2240 AM_CONDITIONAL(LINT, [test "x$LINT" != x])
2245 # --------------------------
2252 # LINTLIB - Automake variable with the name of lint library file to make
2253 # MAKE_LINT_LIB - Automake conditional
2255 # --enable-lint-library: - 'yes' user instructs the module to created a lint library
2256 # - 'no' user instructs the module not to create a lint library (default)
2260 AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
2264 if test "x$make_lint_lib" = x"yes" ; then
2265 LINTLIB=llib-l$1.ln
2266 if test "x$LINT" = "x"; then
2267 AC_MSG_ERROR([Cannot make lint library without --with-lint])
2269 elif test "x$make_lint_lib" != x"no" ; then
2270 AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
2274 AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
2279 # -------------------
2283 # GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes"
2284 # GNU g++ - relies on AC_PROG_CXX to set GXX to "yes"
2285 # clang compiler - sets CLANGCC to "yes"
2286 # Intel compiler - sets INTELCC to "yes"
2287 # Sun/Oracle Solaris Studio cc - sets SUNCC to "yes"
2304 # ---------------
2307 # Test if the compiler works when passed the given flag as a command line argument.
2313 # attempt to weed out false positives by using -Werror=unknown-warning-option and
2314 # -Werror=unused-command-line-argument
2338 if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then
2339 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
2340 AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option],
2349 if test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then
2350 if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then
2351 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
2353 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
2354 AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument],
2365 if test $found = "no" ; then
2366 if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then
2367 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
2370 if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then
2371 PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
2376 dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname
2388 if test "$supported" = "yes" ; then
2397 # ---------------
2406 # future versions of util-macros as options are added to new compilers.
2411 AC_ARG_ENABLE(selective-werror,
2412 AS_HELP_STRING([--disable-selective-werror],
2425 # -v is too short to test reliably with XORG_TESTSET_CFLAG
2426 if test "x$SUNCC" = "xyes"; then
2427 [BASE_]PREFIX[FLAGS]="-v"
2433 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall])
2434 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith])
2435 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations])
2436 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat])
2440 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes])
2441 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes])
2442 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs])
2443 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast])
2444 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd])
2445 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement])
2450 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused])
2451 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized])
2452 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow])
2453 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn])
2454 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute])
2455 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls])
2456 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
2461 # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses])
2462 # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
2463 # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
2468 if test "x$SELECTIVE_WERROR" = "xyes" ; then
2469 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -
2470 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull])
2471 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self])
2472 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main])
2473 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces])
2474 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point])
2475 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_ST…
2476 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs])
2477 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds])
2478 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings])
2479 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address])
2480 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_C…
2481 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR…
2484 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit])
2485 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull])
2486 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self])
2487 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain])
2488 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces])
2489 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point])
2490 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type])
2491 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs])
2492 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds])
2493 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings])
2494 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress])
2495 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast])
2496 XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast])
2503 # ---------------
2509 # This function is deprecated because it defines -fno-strict-aliasing
2510 # which alters the code generated by the compiler. If -fno-strict-aliasing
2520 if test "x$GCC" = xyes ; then
2521 CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing"
2529 # -----------------------
2534 # If --enable-strict-compilation is passed to configure, adds strict flags to
2543 AC_ARG_ENABLE(strict-compilation,
2544 AS_HELP_STRING([--enable-strict-compilation],
2558 XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic])
2559 XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn])
2561 # Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not
2562 # activate it with -Werror, so we add it here explicitly.
2563 XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes])
2565 if test "x$STRICT_COMPILE" = "xyes"; then
2575 # --------------------
2594 # ----------------
2598 # INSTALL from $prefix/share/util-macros.
2602 macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
2603 INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
2605 || (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \
2607 echo 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))"
2613 dnl documentation for any purpose is hereby granted without fee, provided that
2621 dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
2631 dnl other dealings in this Software without prior written authorization
2636 # --------------------
2641 [`echo $PACKAGE_VERSION | cut -d . -f 1`],
2643 PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
2644 if test "x$PVM" = "x"; then
2650 PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
2651 if test "x$PVP" = "x"; then
2660 # ----------------
2670 || (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \
2681 dnl to deal in the Software without restriction, including without limitation
2690 dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2700 # ------------------
2706 if test "$ac_cv_search_socket$ac_cv_search_gethostbyname" = "nono"; then
2712 AS_HELP_STRING([--enable-ipv6],[Enable IPv6 support]),
2716 if test "$IPV6CONN" = "yes"; then
2721 # 4.3BSD-Reno added a new member to struct sockaddr_in
2735 # XPG4v2/UNIX95 added msg_control - check to see if we need to define
2743 if test "x$ac_cv_member_struct_msghdr_msg_control" = xno; then
2756 if test "x$ac_cv_member_struct_msghdr_msg_control" = xno; then
2773 # -------------------------
2782 AC_ARG_ENABLE(unix-transport,
2783 AS_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]),
2786 if test "$UNIXCONN" = "yes"; then
2790 AC_ARG_ENABLE(tcp-transport,
2791 AS_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]),
2795 if test "$TCPCONN" = "yes"; then
2803 AC_ARG_ENABLE(local-transport,
2804 AS_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]),
2806 AC_MSG_CHECKING([if Xtrans should support os-specific local connections])
2808 if test "$LOCALCONN" = "yes"; then
2809 AC_DEFINE(LOCALCONN,1,[Support os-specific local connections])
2819 # -------------------------
2820 # Check for Secure RPC functions - must come after XTRANS_TCP_FLAGS
2824 AC_ARG_ENABLE(secure-rpc,
2825 AS_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]),
2828 if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then
2832 if test "x$FOUND_SECURE_RPC" = "xno" ; then
2833 if test "x$SECURE_RPC" = "xyes" ; then
2843 AC_MSG_CHECKING([if Secure RPC authentication ("SUN-DES-1") should be supported])
2844 if test "x$SECURE_RPC" = "xyes" ; then
2845 AC_DEFINE(SECURE_RPC, 1, [Support Secure RPC ("SUN-DES-1") authentication for X11 clients])
2851 # Copyright (C) 2002-2020 Free Software Foundation, Inc.
2855 # with or without modifications, as long as this notice is preserved.
2858 # ----------------------------
2871 # -----------------------------
2878 # -------------------------------
2887 # Figure out how to run the assembler. -*- Autoconf -*-
2889 # Copyright (C) 2001-2020 Free Software Foundation, Inc.
2893 # with or without modifications, as long as this notice is preserved.
2896 # ----------
2900 test "${CCAS+set}" = set || CCAS=$CC
2901 test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
2904 _AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl
2907 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
2909 # Copyright (C) 2001-2020 Free Software Foundation, Inc.
2913 # with or without modifications, as long as this notice is preserved.
2928 # fails when called from a subdirectory if $ac_aux_dir is relative
2930 # fails if $ac_aux_dir is absolute,
2931 # fails when called from a subdirectory in a VPATH build with
2935 # are both prefixed by $srcdir. In an in-source build this is usually
2951 # configured tree to be moved without reconfiguration.
2956 am_aux_dir=`cd "$ac_aux_dir" && pwd`
2959 # AM_CONDITIONAL -*- Autoconf -*-
2961 # Copyright (C) 1997-2020 Free Software Foundation, Inc.
2965 # with or without modifications, as long as this notice is preserved.
2967 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
2968 # -------------------------------------
2987 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
2992 # Copyright (C) 1999-2020 Free Software Foundation, Inc.
2996 # with or without modifications, as long as this notice is preserved.
3007 # ----------------------
3032 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
3035 # instance it was reported that on HP-UX the gcc test will end up
3036 # making a dummy file named 'D' -- because '-MD' means "put the output
3038 rm -rf conftest.dir
3043 cd conftest.dir
3046 # both Tru64's cc and ICC support -MD to output dependencies as a
3053 if test "$am_compiler_list" = ""; then
3054 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
3059 *\ -arch\ *\ -arch\ *) am__universal=true ;;
3063 *\ -arch\ *\ -arch\ *) am__universal=true ;;
3071 # We need to recreate these files for each test, as the compiler may
3083 # We check with '-c' and '-o' for the sake of the "dashmstdout"
3085 # handle '-M -o', and we need to detect this. Also, some Intel
3087 am__obj=sub/conftest.${OBJEXT-o}
3088 am__minus_obj="-o $am__obj"
3092 test "$am__universal" = false || continue
3095 # After this tag, mechanisms are not by side-effect, so they'll
3097 if test "x$enable_dependency_tracking" = xyes; then
3104 # This compiler won't grok '-c -o', but also, the minuso test has
3107 am__obj=conftest.${OBJEXT-o}
3115 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
3120 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
3122 # or remarks (even with -Werror). So we grep stderr for any message
3124 # When given -MP, icc 7.0 and 7.1 complain thusly:
3125 # icc: Command line warning: ignoring option '-M'; no argument required
3127 # icc: Command line remark: option '-MP' not supported
3136 cd ..
3137 rm -rf conftest.dir
3144 test "x$enable_dependency_tracking" != xno \
3145 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
3150 # -------------
3160 # ------------
3162 [AC_ARG_ENABLE([dependency-tracking], [dnl
3164 [--enable-dependency-tracking],
3167 [--disable-dependency-tracking],
3168 [speeds up one-time build])])
3169 if test "x$enable_dependency_tracking" != xno; then
3174 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
3181 # Generate code to set up dependency tracking. -*- Autoconf -*-
3183 # Copyright (C) 1999-2020 Free Software Foundation, Inc.
3187 # with or without modifications, as long as this notice is preserved.
3190 # ------------------------------
3193 # Older Autoconf quotes --file arguments for eval, but not when files
3194 # are listed without --file. Let's play safe and only enable the eval
3207 am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
3209 # dependency-tracking related rules and includes.
3212 sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
3216 AM_RUN_LOG([cd "$am_dirpart" \
3217 && sed -e '/# am--include-marker/d' "$am_filepart" \
3218 | $MAKE -f - am--depfiles]) || am_rc=$?
3220 if test $am_rc -ne 0; then
3223 re-running the configure script with MAKE="gmake" (or whatever is
3224 necessary). You can also try re-running configure with the
3225 '--disable-dependency-tracking' option to at least be able to build
3226 the package (albeit without support for automatic dependency tracking).])
3232 rm -f conftest-deps.mk
3238 # -----------------------------
3239 # This macro should only be invoked once -- use via AC_REQUIRE.
3246 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
3247 [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
3249 # Do all the work for Automake. -*- Autoconf -*-
3251 # Copyright (C) 1996-2020 Free Software Foundation, Inc.
3255 # with or without modifications, as long as this notice is preserved.
3266 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
3268 # -----------------------------------------------
3270 # call (pre autoconf-2.50), which is being phased out. PACKAGE
3281 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
3284 if test "`cd $srcdir && pwd`" != "`pwd`"; then
3285 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3286 # is not polluted with repeated "-I."
3287 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
3288 # test to see if srcdir already configured
3289 if test -f $srcdir/config.status; then
3294 # test whether we have cygpath
3295 if test -z "$CYGPATH_W"; then
3296 if (cygpath --version) >/dev/null 2>/dev/null; then
3297 CYGPATH_W='cygpath -w'
3305 dnl Distinguish between old-style and new-style calls.
3308 [$0: two- and three-arguments forms are deprecated.])
3309 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
3313 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
3321 _AM_IF_OPTION([no-define],,
3328 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
3330 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
3338 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
3339 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
3346 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
3347 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
3349 _AM_IF_OPTION([no-dependencies],,
3373 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
3375 # POSIX will say in a future version that running "rm -f" with no argument
3383 if rm -f && rm -fr && rm -rf; then : OK; else
3387 Your 'rm' program seems unable to run without file operands specified
3388 on the command line, even when the '-f' option is present. This is contrary
3392 Please tell bug-automake@gnu.org about your system, including the value
3397 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
3410 to "yes", and re-run configure.
3417 dnl backward compatibility and to allow trailing 'dnl'-style comments
3427 # When config.status generates a header, we must update the stamp-h file.
3446 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
3448 # Copyright (C) 2001-2020 Free Software Foundation, Inc.
3452 # with or without modifications, as long as this notice is preserved.
3455 # ------------------
3459 if test x"${install_sh+set}" != xset; then
3462 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3464 install_sh="\${SHELL} $am_aux_dir/install-sh"
3469 # Copyright (C) 2003-2020 Free Software Foundation, Inc.
3473 # with or without modifications, as long as this notice is preserved.
3475 # Check whether the underlying file-system supports filenames
3476 # with a leading dot. For instance MS-DOS doesn't.
3478 [rm -rf .tst 2>/dev/null
3480 if test -d .tst; then
3488 # Check to see how 'make' treats includes. -*- Autoconf -*-
3490 # Copyright (C) 2001-2020 Free Software Foundation, Inc.
3494 # with or without modifications, as long as this notice is preserved.
3497 # -----------------
3501 [AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
3515 AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
3521 if test "$am__include" != "#"; then
3526 rm -f confinc.* confmf.*
3531 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
3533 # Copyright (C) 1997-2020 Free Software Foundation, Inc.
3537 # with or without modifications, as long as this notice is preserved.
3540 # ------------------------------
3543 $1=${$1-"${am_missing_run}$2"}
3547 # ------------------
3548 # Define MISSING if not defined so far and test if it is modern enough.
3553 if test x"${MISSING+set}" != xset; then
3562 if eval "$MISSING --is-lightweight"; then
3570 # Helper functions for option handling. -*- Autoconf -*-
3572 # Copyright (C) 2001-2020 Free Software Foundation, Inc.
3576 # with or without modifications, as long as this notice is preserved.
3579 # -----------------------
3581 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
3584 # --------------------
3590 # ------------------------
3591 # OPTIONS is a space-separated list of Automake options.
3595 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
3596 # -------------------------------------------
3597 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
3601 # Copyright (C) 1999-2020 Free Software Foundation, Inc.
3605 # with or without modifications, as long as this notice is preserved.
3608 # ---------------
3616 [whether $CC understands -c and -o together],
3620 # Following AC_PROG_CC_C_O, we do the test twice because some
3621 # compilers refuse to overwrite an existing .o file with -o,
3625 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
3626 && test -f conftest2.$ac_objext; then
3633 rm -f core conftest*
3635 if test "$am_cv_prog_cc_c_o" != yes; then
3639 # A longer-term fix would be to have automake use am__CC in this case,
3648 # Copyright (C) 2001-2020 Free Software Foundation, Inc.
3652 # with or without modifications, as long as this notice is preserved.
3655 # -------------------
3665 # Check to make sure that the build environment is sane. -*- Autoconf -*-
3667 # Copyright (C) 1996-2020 Free Software Foundation, Inc.
3671 # with or without modifications, as long as this notice is preserved.
3674 # ---------------
3691 # arguments. Must try -L first in case configure is actually a
3699 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3700 if test "$[*]" = "X"; then
3701 # -L didn't work.
3702 set X `ls -t "$srcdir/configure" conftest.file`
3704 if test "$[*]" != "X $srcdir/configure conftest.file" \
3705 && test "$[*]" != "X conftest.file $srcdir/configure"; then
3711 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
3714 if test "$[2]" = conftest.file || test $am_try -eq 2; then
3721 test "$[2]" = conftest.file
3740 if test -n "$am_sleep_pid"; then
3745 rm -f conftest.file
3748 # Copyright (C) 2009-2020 Free Software Foundation, Inc.
3752 # with or without modifications, as long as this notice is preserved.
3755 # --------------------------
3759 [AC_ARG_ENABLE([silent-rules], [dnl
3761 [--enable-silent-rules],
3764 [--disable-silent-rules],
3776 am_make=${MAKE-make}
3785 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
3790 if test $am_cv_make_support_nested_variables = yes; then
3808 # Copyright (C) 2001-2020 Free Software Foundation, Inc.
3812 # with or without modifications, as long as this notice is preserved.
3815 # ---------------------
3818 # annoying in cross-compiling environments, where the build's strip
3820 # Fortunately install-sh will honor a STRIPPROG variable, so we
3821 # always use install-sh in "make install-strip", and initialize
3826 # run "make install-strip". However 'strip' might not be the right
3827 # tool to use in cross-compilation environments, therefore Automake
3829 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
3830 if test "$cross_compiling" != no; then
3833 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3836 # Copyright (C) 2006-2020 Free Software Foundation, Inc.
3840 # with or without modifications, as long as this notice is preserved.
3843 # ---------------------------
3849 # --------------------------
3853 # Check how to create a tarball. -*- Autoconf -*-
3855 # Copyright (C) 2004-2020 Free Software Foundation, Inc.
3859 # with or without modifications, as long as this notice is preserved.
3862 # --------------------
3867 # writing to stdout a FORMAT-tarball containing the directory
3877 # in the wild :-( We should find a proper way to deprecate it ...
3878 AC_SUBST([AMTAR], ['$${TAR-tar}'])
3884 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
3888 [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
3892 am_max_uid=2097151 # 2^21 - 1
3895 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
3898 am_uid=`id -u || echo unknown`
3899 am_gid=`id -g || echo unknown`
3901 if test $am_uid -le $am_max_uid; then
3908 if test $am_gid -le $am_max_gid; then
3924 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
3930 AM_RUN_LOG([$_am_tar --version]) && break
3932 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
3933 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
3934 am__untar="$_am_tar -xf -"
3937 # Must skip GNU tar: if it does not support --format= it doesn't create
3939 (tar --version) >/dev/null 2>&1 && continue
3940 am__tar='tar chf - "$$tardir"'
3941 am__tar_='tar chf - "$tardir"'
3942 am__untar='tar xf -'
3945 am__tar='pax -L -x $1 -w "$$tardir"'
3946 am__tar_='pax -L -x $1 -w "$tardir"'
3947 am__untar='pax -r'
3950 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
3951 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
3952 am__untar='cpio -i -H $1 -d'
3963 test -n "${am_cv_prog_tar_$1}" && break
3966 rm -rf conftest.dir
3970 rm -rf conftest.dir
3971 if test -s conftest.tar; then
3977 rm -rf conftest.dir