[PATCH util-macros] XORG_LINT_LIBRARY: rework to match XORG_WITH_LINT
Gaetan Nadon
memsize at videotron.ca
Mon May 17 04:25:58 PDT 2010
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.
Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
---
xorg-macros.m4.in | 29 +++++++++++++++--------------
1 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/xorg-macros.m4.in b/xorg-macros.m4.in
index 8b82b29..5e89dd1 100644
--- a/xorg-macros.m4.in
+++ b/xorg-macros.m4.in
@@ -927,28 +927,29 @@ AM_CONDITIONAL(LINT, [test "x$LINT" != x])
#
# 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])
--
1.6.0.4
More information about the xorg-devel
mailing list