diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2010-05-31 20:21:50 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2010-05-31 20:21:50 +0000 |
commit | 29015ca70850043409add64627eaa86633c66ef9 (patch) | |
tree | f0b19e293a587d9175812b0dd6da38ef1961e707 /util | |
parent | 11a72e7025b15c51f0c4e4e6fc8497bbdba6c809 (diff) |
Update to xorg-macros 1.8.0
Diffstat (limited to 'util')
-rw-r--r-- | util/macros/ChangeLog | 174 | ||||
-rw-r--r-- | util/macros/Makefile.am | 2 | ||||
-rw-r--r-- | util/macros/Makefile.in | 1 | ||||
-rw-r--r-- | util/macros/configure | 46 | ||||
-rw-r--r-- | util/macros/configure.ac | 2 | ||||
-rw-r--r-- | util/macros/xorg-macros.m4.in | 193 | ||||
-rw-r--r-- | util/macros/xorgversion.m4 | 15 |
7 files changed, 317 insertions, 116 deletions
diff --git a/util/macros/ChangeLog b/util/macros/ChangeLog index 2ea646db3..d8cd9dd16 100644 --- a/util/macros/ChangeLog +++ b/util/macros/ChangeLog @@ -1,3 +1,177 @@ +commit f0590edffe21ac6b7a11eab7caf6c8aad7c8bc07 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Thu May 27 09:27:54 2010 -0400 + + Version bump: 1.8.0 + + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + +commit ce3ece9cbf2380ab0e0535f52f0c6c6507d779c8 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Wed May 26 21:09:31 2010 -0400 + + config: XORG_MANPAGE_SECTIONS: add AC_PROG_SED + + The sed command is required to create the man pages. + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + +commit 8cb69a59d54656d17ea7bcf479b0f27a17dc559e +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Mon May 17 10:36:48 2010 -0400 + + XORG_MANPAGE_SECTIONS: add MAN_SUBSTS automake variable + + It will replace the 155 copies in package makefiles + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + +commit 2dd06a9bcfa6868260421ae803fa7d34a5d3a0c9 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Mon May 17 07:37:28 2010 -0400 + + XORG_RELEASE_VERSION: remove option --with-release-version #24816 + + The short story: + - this option has never been used by OS builders as intended + - the implementation changes automake internals + - the implementation breaks a few makefiles (if used) + - one less option for the user to be confused with on all 240 xorg modules + + The long story: + https://bugs.freedesktop.org/show_bug.cgi?id=24816 + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + +commit 99f9a3efe2ba46f9ba446b72a402f239e3357c12 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Sun May 16 16:46:17 2010 -0400 + + XORG_LINT_LIBRARY: rework to match XORG_WITH_LINT + + XORG_LINT_LIBRARY has implementations dependencies on XORG_WITH_LINT + The library name can no longer be set by overloading the semantic + of --enable-lint-library. + If this function is required it should be added using an AC_ARG_VAR. + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + +commit 2cbe2acb5c70a76830f6ddc1bdc66c333507996f +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Sat May 15 14:16:36 2010 -0400 + + XORG_WITH_LINT: rework and extend platform coverage + + Guess the lint program name by platform. + Use ARG variable for user input values. + Provide default flags per platform. + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + +commit 4fd20af3ebf6bcfa4e991af6fd11d78494e4b95b +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Fri May 14 20:19:15 2010 -0400 + + XORG_DEFAULT_OPTIONS: add AC_PROG_INSTALL + + All modules install something. + This makes it clear it can removed from modules config. + + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + +commit 958c872c82c0612911e398304111ea5d98dbe973 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Fri May 14 17:55:13 2010 -0400 + + XORG_STRICT_OPTION: remove redundant expansion of AC_PROG_CC macro + + Calling AC_PROG_CC before AC_PROG_CC_C99 is not required. + C99 is not an add-on to CC although either one will cache results + than can be used by the other. + + This is effectively a no-op. Note that if a module configure.ac + file calls AC_PROG_CC after AC_PROG_CC_C99, the compiler will be reset + to ISO_C89 from ISO_C99. + Currently about half the xorg modules use C89 while the other half use C99. + + Reviewed-by: RĂ©mi Cardona <remi@gentoo.org> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + +commit 795e808cb32d183f9d8040749899e325420e9798 +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Tue Apr 13 03:57:58 2010 -0500 + + doctools: accept an optional minimal version + + Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + +commit 0913df6f5f24ea589b254d6f2a78483bf3a3c5d6 +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Fri Apr 9 12:40:12 2010 -0500 + + linuxdoc: Use XORG_WITH_PS2PDF to check for ps2pdf + + Besides reusing existing code, this allows linuxdoc PDF output to be + enabled or disabled by configure. + + Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> + Reviewed-by: Gaetan Nadon <memsize@videotron.ca> + +commit e78c909f0e8ea3ee4a38fb7d93fe350bfae7990b +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Tue Apr 27 15:00:37 2010 -0400 + + LinuxDoc: add -f option to filter out the ^H in text output + + Remove backspace-overstrikes from the intermediate + form generated by groff. + These appear as blocks in some text editors and as ^H in vi. + + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + +commit def9ff6a564b6b3a81a862e0db1673b3cd77d5ea +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Mon Apr 5 08:02:28 2010 -0400 + + Version bump: 1.7.0 + + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + +commit 5d7f8c2638a3b2c3bba8deb01e94703310b62cc4 +Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> +Date: Thu Mar 25 18:10:00 2010 -0500 + + doc: add XORG_CHECK_SGML_DOCTOOLS to detect xorg-sgml-doctools + + Trying to find X11/defs.ent with AC_CHECK_FILE does not work when + cross-compiling, and the check assumed that xorg-sgml-doctools is + installed to the same prefix which need not always be the case. + + xorg-sgml-doctools 1.4 provides a pkg-config file which we can use + instead, fixing both those cases. This macro is provided in util-macros + instead of with xorg-sgml-doctools, otherwise the latter would become a + hard dependency just to run autoreconf. + + Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + Reviewed-by: Gaetan Nadon <memsize@videotron.ca> + +commit c03e7dbca608f6fa3f1f53f5fc9f279eab62bdb4 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Mon Mar 29 11:53:10 2010 -0400 + + config: remove the xorg-macros pc.in file from EXTRA_DIST + + Automake always includes it in the tarball. + + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + commit be6c44abf825a5814ca836165f62b66c30e7a966 Author: Gaetan Nadon <memsize@videotron.ca> Date: Thu Mar 11 11:11:42 2010 -0500 diff --git a/util/macros/Makefile.am b/util/macros/Makefile.am index 2367a8bcb..eafc2c706 100644 --- a/util/macros/Makefile.am +++ b/util/macros/Makefile.am @@ -32,8 +32,6 @@ install-data-hook: pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = xorg-macros.pc -EXTRA_DIST = xorg-macros.pc.in - .PHONY: ChangeLog ChangeLog: diff --git a/util/macros/Makefile.in b/util/macros/Makefile.in index 85149a812..67c868aa6 100644 --- a/util/macros/Makefile.in +++ b/util/macros/Makefile.in @@ -164,7 +164,6 @@ aclocal_DATA = xorg-macros.m4 dist_pkgdata_DATA = INSTALL pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = xorg-macros.pc -EXTRA_DIST = xorg-macros.pc.in all: all-am .SUFFIXES: diff --git a/util/macros/configure b/util/macros/configure index 7abb69749..82a9d42b6 100644 --- a/util/macros/configure +++ b/util/macros/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.62 for util-macros 1.6.1. +# Generated by GNU Autoconf 2.62 for util-macros 1.8.0. # # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>. # @@ -596,8 +596,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='util-macros' PACKAGE_TARNAME='util-macros' -PACKAGE_VERSION='1.6.1' -PACKAGE_STRING='util-macros 1.6.1' +PACKAGE_VERSION='1.8.0' +PACKAGE_STRING='util-macros 1.8.0' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg' ac_unique_file="Makefile.am" @@ -669,7 +669,6 @@ ac_subst_files='' ac_user_opts=' enable_option_checking enable_maintainer_mode -with_release_version ' ac_precious_vars='build_alias host_alias @@ -1226,7 +1225,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures util-macros 1.6.1 to adapt to many kinds of systems. +\`configure' configures util-macros 1.8.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1292,7 +1291,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of util-macros 1.6.1:";; + short | recursive ) echo "Configuration of util-macros 1.8.0:";; esac cat <<\_ACEOF @@ -1303,12 +1302,6 @@ Optional Features: --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-release-version=STRING - Use release version string in package name - Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>. _ACEOF ac_status=$? @@ -1372,7 +1365,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -util-macros configure 1.6.1 +util-macros configure 1.8.0 generated by GNU Autoconf 2.62 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1386,7 +1379,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by util-macros $as_me 1.6.1, which was +It was created by util-macros $as_me 1.8.0, which was generated by GNU Autoconf 2.62. Invocation command line was $ $0 $@ @@ -2036,7 +2029,7 @@ fi # Define the identity of the package. PACKAGE='util-macros' - VERSION='1.6.1' + VERSION='1.8.0' cat >>confdefs.h <<_ACEOF @@ -2307,10 +2300,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # XORG_RELEASE_VERSION # -------------------- -# Adds --with/without-release-string and changes the PACKAGE and -# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If -# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also -# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. +# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. @@ -2327,20 +2317,6 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -# Check whether --with-release-version was given. -if test "${with_release_version+set}" = set; then - withval=$with_release_version; RELEASE_VERSION="$withval" -else - RELEASE_VERSION="" -fi - - if test "x$RELEASE_VERSION" != "x"; then - PACKAGE="$PACKAGE-$RELEASE_VERSION" - PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" - { $as_echo "$as_me:$LINENO: Building with package name set to $PACKAGE" >&5 -$as_echo "$as_me: Building with package name set to $PACKAGE" >&6;} - fi - cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1` _ACEOF @@ -2836,7 +2812,7 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by util-macros $as_me 1.6.1, which was +This file was extended by util-macros $as_me 1.8.0, which was generated by GNU Autoconf 2.62. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -2879,7 +2855,7 @@ Report bugs to <bug-autoconf@gnu.org>." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -util-macros config.status 1.6.1 +util-macros config.status 1.8.0 configured by $0, generated by GNU Autoconf 2.62, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff --git a/util/macros/configure.ac b/util/macros/configure.ac index b69a6b1ac..4aab44dfa 100644 --- a/util/macros/configure.ac +++ b/util/macros/configure.ac @@ -23,7 +23,7 @@ dnl Process this file with autoconf to create configure. AC_PREREQ([2.60]) AC_INIT([util-macros], - [1.6.1], + [1.8.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [util-macros]) AC_CONFIG_SRCDIR([Makefile.am]) diff --git a/util/macros/xorg-macros.m4.in b/util/macros/xorg-macros.m4.in index 055c83eeb..a8e12ed30 100644 --- a/util/macros/xorg-macros.m4.in +++ b/util/macros/xorg-macros.m4.in @@ -105,9 +105,12 @@ AC_SUBST(RAWCPPFLAGS) # on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. # Not sure if there's any better way than just hardcoding by OS name. # Override default settings by setting environment variables +# Added MAN_SUBSTS in version 1.8 +# Added AC_PROG_SED in version 1.8 AC_DEFUN([XORG_MANPAGE_SECTIONS],[ AC_REQUIRE([AC_CANONICAL_HOST]) +AC_REQUIRE([AC_PROG_SED]) if test x$APP_MAN_SUFFIX = x ; then APP_MAN_SUFFIX=1 @@ -176,8 +179,52 @@ AC_SUBST([FILE_MAN_DIR]) AC_SUBST([MISC_MAN_DIR]) AC_SUBST([DRIVER_MAN_DIR]) AC_SUBST([ADMIN_MAN_DIR]) + +XORG_MAN_PAGE="X Version 11" +AC_SUBST([XORG_MAN_PAGE]) +MAN_SUBSTS="\ + -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ + -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ + -e 's|__xservername__|Xorg|g' \ + -e 's|__xconfigfile__|xorg.conf|g' \ + -e 's|__projectroot__|\$(prefix)|g' \ + -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ + -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ + -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ + -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ + -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ + -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" +AC_SUBST([MAN_SUBSTS]) + ]) # XORG_MANPAGE_SECTIONS +# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) +# ------------------------ +# Minimum version: 1.7.0 +# +# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent +# provided by xorg-sgml-doctools, if installed. +AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ +AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) +XORG_SGML_PATH= +PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], + [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], + [m4_ifval([$1],[:], + [if test x"$cross_compiling" != x"yes" ; then + AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], + [XORG_SGML_PATH=$prefix/share/sgml]) + fi]) + ]) + +if test "x$XORG_SGML_PATH" != "x" ; then + AC_MSG_RESULT([$XORG_SGML_PATH]) +else + AC_MSG_RESULT([no]) +fi + +AC_SUBST(XORG_SGML_PATH) +]) # XORG_CHECK_SGML_DOCTOOLS + # XORG_CHECK_LINUXDOC # ------------------- # Minimum version: 1.0.0 @@ -187,23 +234,14 @@ AC_SUBST([ADMIN_MAN_DIR]) # Whether or not the necessary tools and files are found can be checked # with the AM_CONDITIONAL "BUILD_LINUXDOC" AC_DEFUN([XORG_CHECK_LINUXDOC],[ -if test x$XORG_SGML_PATH = x ; then - XORG_SGML_PATH=$prefix/share/sgml -fi -HAVE_DEFS_ENT= - -if test x"$cross_compiling" = x"yes" ; then - HAVE_DEFS_ENT=no -else - AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) -fi +AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) +AC_REQUIRE([XORG_WITH_PS2PDF]) AC_PATH_PROG(LINUXDOC, linuxdoc) -AC_PATH_PROG(PS2PDF, ps2pdf) AC_MSG_CHECKING([whether to build documentation]) -if test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then +if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then BUILDDOC=yes else BUILDDOC=no @@ -215,7 +253,7 @@ AC_MSG_RESULT([$BUILDDOC]) AC_MSG_CHECKING([whether to build pdf documentation]) -if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then +if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then BUILDPDFDOC=yes else BUILDPDFDOC=no @@ -225,7 +263,7 @@ AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) AC_MSG_RESULT([$BUILDPDFDOC]) -MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" +MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" MAKE_PDF="$PS2PDF" MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" @@ -245,24 +283,20 @@ AC_SUBST(MAKE_HTML) # indicates whether the necessary tools and files are found and, if set, # $(MAKE_XXX) blah.sgml will produce blah.xxx. AC_DEFUN([XORG_CHECK_DOCBOOK],[ -if test x$XORG_SGML_PATH = x ; then - XORG_SGML_PATH=$prefix/share/sgml -fi -HAVE_DEFS_ENT= +AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) + BUILDTXTDOC=no BUILDPDFDOC=no BUILDPSDOC=no BUILDHTMLDOC=no -AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) - AC_PATH_PROG(DOCBOOKPS, docbook2ps) AC_PATH_PROG(DOCBOOKPDF, docbook2pdf) AC_PATH_PROG(DOCBOOKHTML, docbook2html) AC_PATH_PROG(DOCBOOKTXT, docbook2txt) AC_MSG_CHECKING([whether to build text documentation]) -if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && +if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && test x$BUILD_TXTDOC != xno; then BUILDTXTDOC=yes fi @@ -270,7 +304,7 @@ AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) AC_MSG_RESULT([$BUILDTXTDOC]) AC_MSG_CHECKING([whether to build PDF documentation]) -if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && +if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && test x$BUILD_PDFDOC != xno; then BUILDPDFDOC=yes fi @@ -278,7 +312,7 @@ AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) AC_MSG_RESULT([$BUILDPDFDOC]) AC_MSG_CHECKING([whether to build PostScript documentation]) -if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && +if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && test x$BUILD_PSDOC != xno; then BUILDPSDOC=yes fi @@ -286,7 +320,7 @@ AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) AC_MSG_RESULT([$BUILDPSDOC]) AC_MSG_CHECKING([whether to build HTML documentation]) -if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && +if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && test x$BUILD_HTMLDOC != xno; then BUILDHTMLDOC=yes fi @@ -841,38 +875,69 @@ AC_SUBST([XTMALLOC_ZERO_CFLAGS]) # ---------------- # Minimum version: 1.1.0 # -# Sets up flags for source checkers such as lint and sparse if --with-lint -# is specified. (Use --with-lint=sparse for sparse.) -# Sets $LINT to name of source checker passed with --with-lint (default: lint) -# Sets $LINT_FLAGS to flags to pass to source checker -# Sets LINT automake conditional if enabled (default: disabled) +# This macro enables the use of a tool that flags some suspicious and +# non-portable constructs (likely to be bugs) in C language source code. +# It will attempt to locate the tool and use appropriate options. +# There are various lint type tools on different platforms. +# +# Interface to module: +# LINT: returns the path to the tool found on the platform +# or the value set to LINT on the configure cmd line +# also an Automake conditional +# LINT_FLAGS: an Automake variable with appropriate flags +# +# --with-lint: 'yes' user instructs the module to use lint +# 'no' user instructs the module not to use lint (default) +# +# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. +# If the user sets the value of LINT_FLAGS, they are used verbatim. # AC_DEFUN([XORG_WITH_LINT],[ -# Allow checking code with lint, sparse, etc. +AC_ARG_VAR([LINT], [Path to a lint-style command]) +AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], [Use a lint-style source code checker (default: disabled)])], [use_lint=$withval], [use_lint=no]) -if test "x$use_lint" = "xyes" ; then - LINT="lint" + +# Obtain platform specific info like program name and options +# The lint program on FreeBSD and NetBSD is different from the one on Solaris +case $host_os in + *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) + lint_name=splint + lint_options="-badflag" + ;; + *freebsd* | *netbsd*) + lint_name=lint + lint_options="-u -b" + ;; + *solaris*) + lint_name=lint + lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" + ;; +esac + +# Test for the presence of the program (either guessed by the code or spelled out by the user) +if test "x$use_lint" = x"yes" ; then + AC_PATH_PROG([LINT], [$lint_name]) + if test "x$LINT" = "x"; then + AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) + fi +elif test "x$use_lint" = x"no" ; then + if test "x$LINT" != "x"; then + AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) + fi else - LINT="$use_lint" -fi -if test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then - case $LINT in - lint|*/lint) - case $host_os in - solaris*) - LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" - ;; - esac - ;; - esac + AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) +fi + +# User supplied flags override default flags +if test "x$LINT_FLAGS" != "x"; then + lint_options=$LINT_FLAGS fi -AC_SUBST(LINT) -AC_SUBST(LINT_FLAGS) -AM_CONDITIONAL(LINT, [test x$LINT != xno]) +AC_SUBST([LINT_FLAGS],[$lint_options]) +AM_CONDITIONAL(LINT, [test "x$LINT" != x]) ]) # XORG_WITH_LINT @@ -882,28 +947,29 @@ AM_CONDITIONAL(LINT, [test x$LINT != xno]) # # Sets up flags for building lint libraries for checking programs that call # functions in the library. -# Disabled by default, enable with --enable-lint-library -# Sets: -# @LINTLIB@ - name of lint library file to make -# MAKE_LINT_LIB - automake conditional # +# Interface to module: +# LINTLIB - Automake variable with the name of lint library file to make +# MAKE_LINT_LIB - Automake conditional +# +# --enable-lint-library: - 'yes' user instructs the module to created a lint library +# - 'no' user instructs the module not to create a lint library (default) AC_DEFUN([XORG_LINT_LIBRARY],[ AC_REQUIRE([XORG_WITH_LINT]) -# Build lint "library" for more indepth checks of programs calling this library AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], [Create lint library (default: disabled)])], [make_lint_lib=$enableval], [make_lint_lib=no]) -if test "x$make_lint_lib" != "xno" ; then - if test "x$LINT" = "xno" ; then - AC_MSG_ERROR([Cannot make lint library without --with-lint]) - fi - if test "x$make_lint_lib" = "xyes" ; then - LINTLIB=llib-l$1.ln - else - LINTLIB=$make_lint_lib - fi + +if test "x$make_lint_lib" = x"yes" ; then + LINTLIB=llib-l$1.ln + if test "x$LINT" = "x"; then + AC_MSG_ERROR([Cannot make lint library without --with-lint]) + fi +elif test "x$make_lint_lib" != x"no" ; then + AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) fi + AC_SUBST(LINTLIB) AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) @@ -916,7 +982,7 @@ AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) # Defines CWARNFLAGS to enable C compiler warnings. # AC_DEFUN([XORG_CWARNFLAGS], [ -AC_REQUIRE([AC_PROG_CC]) +AC_REQUIRE([AC_PROG_CC_C99]) if test "x$GCC" = xyes ; then CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ -Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ @@ -941,7 +1007,7 @@ AC_SUBST(CWARNFLAGS) # # Add configure option to enable strict compilation AC_DEFUN([XORG_STRICT_OPTION], [ -AC_REQUIRE([AC_PROG_CC]) +# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89 AC_REQUIRE([AC_PROG_CC_C99]) AC_REQUIRE([XORG_CWARNFLAGS]) @@ -971,6 +1037,7 @@ AC_SUBST([CWARNFLAGS]) # Defines default options for X.Org modules. # AC_DEFUN([XORG_DEFAULT_OPTIONS], [ +AC_REQUIRE([AC_PROG_INSTALL]) XORG_CWARNFLAGS XORG_STRICT_OPTION XORG_RELEASE_VERSION diff --git a/util/macros/xorgversion.m4 b/util/macros/xorgversion.m4 index ff4f79665..017fb513f 100644 --- a/util/macros/xorgversion.m4 +++ b/util/macros/xorgversion.m4 @@ -25,22 +25,9 @@ dnl # XORG_RELEASE_VERSION # -------------------- -# Adds --with/without-release-string and changes the PACKAGE and -# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If -# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also -# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. +# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. AC_DEFUN([XORG_RELEASE_VERSION],[ - AC_ARG_WITH(release-version, - AS_HELP_STRING([--with-release-version=STRING], - [Use release version string in package name]), - [RELEASE_VERSION="$withval"], - [RELEASE_VERSION=""]) - if test "x$RELEASE_VERSION" != "x"; then - PACKAGE="$PACKAGE-$RELEASE_VERSION" - PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" - AC_MSG_NOTICE([Building with package name set to $PACKAGE]) - fi AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], [`echo $PACKAGE_VERSION | cut -d . -f 1`], [Major version of this package]) |