mirror of
https://github.com/weechat/weechat.git
synced 2026-06-28 22:06:38 +02:00
Fix some bugs in asciidoc detection, add detection of source-highlight (needed by asciidoc to build doc)
This commit is contained in:
@@ -45,6 +45,7 @@ EXTRA_DIST = CMakeLists.txt \
|
||||
debian/weechat-plugins.install \
|
||||
debian/weechat.xpm \
|
||||
cmake/cmake_uninstall.cmake.in \
|
||||
cmake/FindAsciidoc.cmake \
|
||||
cmake/FindAspell.cmake \
|
||||
cmake/FindGettext.cmake \
|
||||
cmake/FindGnuTLS.cmake \
|
||||
@@ -56,6 +57,7 @@ EXTRA_DIST = CMakeLists.txt \
|
||||
cmake/FindPkgConfig.cmake \
|
||||
cmake/FindPython.cmake \
|
||||
cmake/FindRuby.cmake \
|
||||
cmake/FindSourcehighlight.cmake \
|
||||
cmake/FindTCL.cmake \
|
||||
cmake/makedist.sh.in \
|
||||
weechat.spec \
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
# Copyright (c) 2003-2009 FlashCode <flashcode@flashtux.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# - Find Source-Highlight
|
||||
# This module finds if source-highlight is installed.
|
||||
|
||||
IF (SOURCEHIGHLIGHT_FOUND)
|
||||
# Already in cache, be silent
|
||||
SET(SOURCEHIGHLIGHT_FIND_QUIETLY TRUE)
|
||||
ENDIF (SOURCEHIGHLIGHT_FOUND)
|
||||
|
||||
FIND_PROGRAM(
|
||||
SOURCEHIGHLIGHT_EXECUTABLE source-highlight
|
||||
PATHS /bin /usr/bin /usr/local/bin /usr/pkg/bin
|
||||
)
|
||||
|
||||
IF(SOURCEHIGHLIGHT_EXECUTABLE)
|
||||
SET(SOURCEHIGHLIGHT_FOUND TRUE)
|
||||
MARK_AS_ADVANCED(
|
||||
SOURCEHIGHLIGHT_EXECUTABLE
|
||||
)
|
||||
ENDIF(SOURCEHIGHLIGHT_EXECUTABLE)
|
||||
+9
-2
@@ -860,14 +860,15 @@ msg_doc=""
|
||||
if test "x$enable_doc" = "xyes" ; then
|
||||
DOC_ASCIIDOC8=""
|
||||
AC_CHECK_PROGS(ASCIIDOC, [asciidoc])
|
||||
if test -n "$ASCIIDOC"; then
|
||||
AC_CHECK_PROGS(SOURCEHIGHLIGHT, [source-highlight])
|
||||
if test -n "$SOURCEHIGHLIGHT" -a -n "$ASCIIDOC"; then
|
||||
AC_MSG_CHECKING([for asciidoc version])
|
||||
asciidoc_version=`$ASCIIDOC --version 2>/dev/null`
|
||||
case "${asciidoc_version}" in
|
||||
asciidoc' '8*)
|
||||
DOC_ASCIIDOC8="yes"
|
||||
AC_MSG_RESULT([${asciidoc_version}])
|
||||
msg_doc="asciidoc $msg_doc"
|
||||
msg_doc="asciidoc(with source-highlight) $msg_doc"
|
||||
AC_DEFINE(DOC)
|
||||
;;
|
||||
*)
|
||||
@@ -876,8 +877,14 @@ if test "x$enable_doc" = "xyes" ; then
|
||||
;;
|
||||
esac
|
||||
else
|
||||
enable_doc="no"
|
||||
fi
|
||||
if test -z "$ASCIIDOC"; then
|
||||
not_found="$not_found asciidoc"
|
||||
fi
|
||||
if test -z "$SOURCEHIGHLIGHT"; then
|
||||
not_found="$not_found source-highlight(needed by asciidoc)"
|
||||
fi
|
||||
AC_SUBST(DOC_ASCIIDOC8)
|
||||
AC_SUBST(ASCIIDOC)
|
||||
else
|
||||
|
||||
+3
-2
@@ -16,11 +16,12 @@
|
||||
|
||||
IF(NOT DISABLE_DOC)
|
||||
|
||||
FIND_PACKAGE(Sourcehighlight)
|
||||
FIND_PACKAGE(Asciidoc)
|
||||
IF(ASCIIDOC_FOUND)
|
||||
IF(ASCIIDOC_FOUND AND SOURCEHIGHLIGHT_FOUND)
|
||||
ADD_SUBDIRECTORY( en )
|
||||
ADD_SUBDIRECTORY( fr )
|
||||
ENDIF(ASCIIDOC_FOUND)
|
||||
ENDIF(ASCIIDOC_FOUND AND SOURCEHIGHLIGHT_FOUND)
|
||||
|
||||
ENDIF(NOT DISABLE_DOC)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user