Make use of common ZP_LYNX_DOC macro.
Instead of reproducing the same code on each configure.ac use the common macro.
This commit is contained in:
parent
6f7e9419e4
commit
c6cc345552
19
configure.ac
19
configure.ac
|
@ -60,24 +60,7 @@ if test "x$GCC" = "xyes" ; then
|
|||
CXXFLAGS="$CXXFLAGS -pipe -Wall -W"
|
||||
fi
|
||||
|
||||
# LYNX documentation generation
|
||||
AC_ARG_ENABLE(lynx,
|
||||
AS_HELP_STRING(--disable-lynx,Turn off lynx usage for documentation generation),
|
||||
[case "${enableval}" in
|
||||
yes) lynx=yes ;;
|
||||
no) lynx=no ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --disable-lynx) ;;
|
||||
esac],[lynx=yes])
|
||||
|
||||
if test x$lynx = xyes ; then
|
||||
AC_CHECK_PROG(have_lynx, lynx, yes, no)
|
||||
|
||||
if test x$have_lynx = xno ; then
|
||||
AC_MSG_ERROR([*** Sorry, you have to install lynx or use --disable-lynx ***])
|
||||
fi
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([USE_LYNX], [test "x$lynx" = xyes])
|
||||
ZP_LYNX_DOC
|
||||
|
||||
IT_PROG_INTLTOOL([0.35.0])
|
||||
GETTEXT_PACKAGE=pavucontrol
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
dnl Macro for enabling LYNX-based documentation generation
|
||||
|
||||
AC_DEFUN([ZP_LYNX_DOC], [
|
||||
AC_ARG_ENABLE(lynx,
|
||||
AS_HELP_STRING([--disable-lynx],
|
||||
[Turn off lynx usage for documentation generation]),,
|
||||
[enable_lynx=yes])
|
||||
|
||||
case "${enable_lynx}" in
|
||||
yes)
|
||||
AC_CHECK_PROG(have_lynx, lynx, yes, no)
|
||||
|
||||
if test x$have_lynx = xno ; then
|
||||
AC_MSG_WARN([*** lynx not found, plain text README will not be built ***])
|
||||
fi
|
||||
;;
|
||||
no)
|
||||
have_lynx=no ;;
|
||||
*)
|
||||
AC_MSG_ERROR(bad value ${enableval} for --disable-lynx) ;;
|
||||
esac
|
||||
|
||||
AM_CONDITIONAL([USE_LYNX], [test "x$have_lynx" = xyes])
|
||||
])
|
Loading…
Reference in New Issue