Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add enable-docbook-cdn flag. #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,16 @@ pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = spandsp.pc

faq: faq.xml
if USE_DOCBOOK_CDN
sed -i 's|http://docbook.sourceforge.net|https://cdn.docbook.org|g' wrapper.xsl
else
sed -i 's|https://cdn.docbook.org|http://docbook.sourceforge.net|g' wrapper.xsl
endif
if HAVE_XML_CATALOG_FILES
cd faq ; XML_CATALOG_FILES=$(XML_CATALOG_FILES) xsltproc ../wrapper.xsl ../faq.xml
else
cd faq ; xsltproc ../wrapper.xsl ../faq.xml
endif

rpm: rpm-build

Expand Down
34 changes: 33 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,10 @@ AC_ARG_ENABLE(v34, [ --enable-v34 Enable V.34 support])

# The following is for MSVC, where we may be using a local copy of libtiff, built alongside spandsp
AC_ARG_ENABLE(builtin_tiff,
[AC_HELP_STRING([--enable-builtin-tiff],[build with builtin libtiff])],[enable_builtin_tiff="$enableval"],[enable_builtin_tiff="no"])
[AC_HELP_STRING([--enable-builtin-tiff],[Build with builtin libtiff])],[enable_builtin_tiff="$enableval"],[enable_builtin_tiff="no"])

AC_ARG_ENABLE(docbook-cdn,
[AC_HELP_STRING([--enable-docbook-cdn],[Build docs with 'cdn.docbook.org' URL])],[enable_docbook_cdn="yes"],[enable_docbook_cdn="no"])

AC_FUNC_ERROR_AT_LINE
AC_FUNC_VPRINTF
Expand Down Expand Up @@ -584,6 +587,35 @@ else
fi

AM_CONDITIONAL([COND_DOC], [test "$enable_doc" = yes])
AM_CONDITIONAL([HAVE_XML_CATALOG_FILES], false)
AM_CONDITIONAL([USE_DOCBOOK_CDN], false)

AS_IF([test "$enable_doc" != "no"], [
AC_CHECK_PROG([have_xsltproc], xsltproc, true, false)
XML_CATALOG_FILES=
if $have_xsltproc; then
catalog_prefix=""
AC_CHECK_PROG([have_brew], brew, true, false)
if $have_brew; then
catalog_prefix=$(brew --prefix)
fi
catalog_file=$catalog_prefix/etc/xml/catalog
if test -f $catalog_file; then
AM_CONDITIONAL([HAVE_XML_CATALOG_FILES], true)
XML_CATALOG_FILES=file:$catalog_file
else
AC_MSG_WARN([Missing file $catalog_file.])
fi
AC_SUBST([XML_CATALOG_FILES])
AM_CONDITIONAL([USE_DOCBOOK_CDN], [test "$enable_docbook_cdn" = yes])
else
AS_IF([test "x$enable_doc" != xcheck], [
AC_MSG_FAILURE(
[--enable-doc was given, but test for xsltproc failed])
])
fi
])

AM_CONDITIONAL([COND_TESTS], [test "$enable_tests" = yes])
AM_CONDITIONAL([COND_MMX], [test "$enable_mmx" = yes])
AM_CONDITIONAL([COND_SSE], [test "$enable_sse" = yes])
Expand Down
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Source: spandsp
Section: libs
Priority: optional
Maintainer: FreeSWITCH Solutions <[email protected]>
Build-Depends: debhelper (>= 9), libtiff-dev, libjpeg-dev, dpatch, doxygen, autotools-dev, xsltproc
Build-Depends: debhelper (>= 9), libtiff-dev, libjpeg-dev, dpatch, doxygen, autotools-dev, xsltproc, docbook-xsl
Standards-Version: 3.9.6

Package: libspandsp3
Expand Down
9 changes: 9 additions & 0 deletions doc/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,16 @@ doxydocs:
doxygen doxygen

t38_manual/index.html: t38_manual.xml
if USE_DOCBOOK_CDN
sed -i 's|http://docbook.sourceforge.net|https://cdn.docbook.org|g' wrapper.xsl
else
sed -i 's|https://cdn.docbook.org|http://docbook.sourceforge.net|g' wrapper.xsl
endif
if HAVE_XML_CATALOG_FILES
cd t38_manual ; XML_CATALOG_FILES=$(XML_CATALOG_FILES) xsltproc ../wrapper.xsl ../t38_manual.xml
else
cd t38_manual ; xsltproc ../wrapper.xsl ../t38_manual.xml
endif

clean:
cd t38_manual ; rm *.html ; cd ../api ; rm -rf html