+2019-02-27 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/89466
+ * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
+ stylesheet directories before check for xsltproc. Try to use
+ xmlcatalog to find local stylesheet directory before trying hardcoded
+ paths. Add path used by suse to hardcoded paths. Adjust xsltproc
+ check to look for the same stylesheet as doc/Makefile.am uses. Don't
+ use xsltproc if xmlcatalog fails to find a local stylesheet.
+ * configure.ac: Check for xmlcatalog.
+ * Makefile.in: Regenerate.
+ * configure: Likewise.
+ * doc/Makefile.in: Likewise.
+ * include/Makefile.in: Likewise.
+ * libsupc++/Makefile.in: Likewise.
+ * po/Makefile.in: Likewise.
+ * python/Makefile.in: Likewise.
+ * src/Makefile.in: Likewise.
+ * src/c++11/Makefile.in: Likewise.
+ * src/c++17/Makefile.in: Likewise.
+ * src/c++98/Makefile.in: Likewise.
+ * src/filesystem/Makefile.in: Likewise.
+ * testsuite/Makefile.in: Likewise.
+
2019-02-26 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/89477
VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@
VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@
WARN_FLAGS = @WARN_FLAGS@
+XMLCATALOG = @XMLCATALOG@
XMLLINT = @XMLLINT@
XSLTPROC = @XSLTPROC@
XSL_STYLE_DIR = @XSL_STYLE_DIR@
dnl
AC_DEFUN([GLIBCXX_CONFIGURE_DOCBOOK], [
-AC_MSG_CHECKING([for docbook stylesheets for documentation creation])
-glibcxx_stylesheets=no
-if test x${XSLTPROC} = xyes && echo '<title/>' | xsltproc --noout --nonet --xinclude http://docbook.sourceforge.net/release/xsl-ns/current/xhtml-1_1/docbook.xsl - 2>/dev/null; then
- glibcxx_stylesheets=yes
-fi
-AC_MSG_RESULT($glibcxx_stylesheets)
+glibcxx_docbook_url=http://docbook.sourceforge.net/release/xsl-ns/current/
AC_MSG_CHECKING([for local stylesheet directory])
glibcxx_local_stylesheets=no
-if test x"$glibcxx_stylesheets" = x"yes"; then
- if test -d /usr/share/sgml/docbook/xsl-ns-stylesheets; then
- glibcxx_local_stylesheets=yes
- XSL_STYLE_DIR=/usr/share/sgml/docbook/xsl-ns-stylesheets
- fi
- if test -d /usr/share/xml/docbook/stylesheet/docbook-xsl-ns; then
- glibcxx_local_stylesheets=yes
- XSL_STYLE_DIR=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns
- fi
- if test -d /usr/share/xml/docbook/stylesheet/nwalsh5/current; then
- glibcxx_local_stylesheets=yes
- XSL_STYLE_DIR=/usr/share/xml/docbook/stylesheet/nwalsh5/current
- fi
+if test x${XMLCATALOG} = xyes && xsl_style_dir=`xmlcatalog "" $glibcxx_docbook_url 2>/dev/null`
+then
+ XSL_STYLE_DIR=`echo $xsl_style_dir | sed -n 's;^file://;;p'`
+ glibcxx_local_stylesheets=yes
+else
+ for dir in \
+ /usr/share/sgml/docbook/xsl-ns-stylesheets \
+ /usr/share/xml/docbook/stylesheet/docbook-xsl-ns \
+ /usr/share/xml/docbook/stylesheet/nwalsh5/current \
+ /usr/share/xml/docbook/stylesheet/nwalsh/current
+ do
+ if test -d $dir; then
+ glibcxx_local_stylesheets=yes
+ XSL_STYLE_DIR=$dir
+ break
+ fi
+ done
fi
AC_MSG_RESULT($glibcxx_local_stylesheets)
if test x"$glibcxx_local_stylesheets" = x"yes"; then
AC_SUBST(XSL_STYLE_DIR)
AC_MSG_NOTICE($XSL_STYLE_DIR)
+
+ AC_MSG_CHECKING([for docbook stylesheets for documentation creation])
+ glibcxx_stylesheets=no
+ if test x${XMLCATALOG} = xno || xmlcatalog "" $glibcxx_docbook_url/xhtml/docbook.xsl >/dev/null 2>&1; then
+ if test x${XSLTPROC} = xyes && echo '<title/>' | xsltproc --noout --nonet --xinclude $glibcxx_docbook_url/xhtml/docbook.xsl - 2>/dev/null; then
+ glibcxx_stylesheets=yes
+ fi
+ fi
+ AC_MSG_RESULT($glibcxx_stylesheets)
+
else
glibcxx_stylesheets=no
fi
XSL_STYLE_DIR
XMLLINT
XSLTPROC
+XMLCATALOG
DOT
DOXYGEN
BUILD_INFO_FALSE
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11847 "configure"
+#line 11848 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11953 "configure"
+#line 11954 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
# Fake what AC_TRY_COMPILE does.
cat > conftest.$ac_ext << EOF
-#line 15639 "configure"
+#line 15640 "configure"
int main()
{
typedef bool atomic_type;
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 15674 "configure"
+#line 15675 "configure"
int main()
{
typedef short atomic_type;
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 15709 "configure"
+#line 15710 "configure"
int main()
{
// NB: _Atomic_word not necessarily int.
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 15745 "configure"
+#line 15746 "configure"
int main()
{
typedef long long atomic_type;
# unnecessary for this test.
cat > conftest.$ac_ext << EOF
-#line 15898 "configure"
+#line 15899 "configure"
int main()
{
_Decimal32 d1;
# unnecessary for this test.
cat > conftest.$ac_ext << EOF
-#line 15940 "configure"
+#line 15941 "configure"
template<typename T1, typename T2>
struct same
{ typedef T2 type; };
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 15974 "configure"
+#line 15975 "configure"
template<typename T1, typename T2>
struct same
{ typedef T2 type; };
# Check for docbook
+# Extract the first word of "xmlcatalog", so it can be a program name with args.
+set dummy xmlcatalog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_XMLCATALOG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$XMLCATALOG"; then
+ ac_cv_prog_XMLCATALOG="$XMLCATALOG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_XMLCATALOG="yes"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_prog_XMLCATALOG" && ac_cv_prog_XMLCATALOG="no"
+fi
+fi
+XMLCATALOG=$ac_cv_prog_XMLCATALOG
+if test -n "$XMLCATALOG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLCATALOG" >&5
+$as_echo "$XMLCATALOG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
# Extract the first word of "xsltproc", so it can be a program name with args.
set dummy xsltproc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for docbook stylesheets for documentation creation" >&5
-$as_echo_n "checking for docbook stylesheets for documentation creation... " >&6; }
-glibcxx_stylesheets=no
-if test x${XSLTPROC} = xyes && echo '<title/>' | xsltproc --noout --nonet --xinclude http://docbook.sourceforge.net/release/xsl-ns/current/xhtml-1_1/docbook.xsl - 2>/dev/null; then
- glibcxx_stylesheets=yes
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_stylesheets" >&5
-$as_echo "$glibcxx_stylesheets" >&6; }
+glibcxx_docbook_url=http://docbook.sourceforge.net/release/xsl-ns/current/
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for local stylesheet directory" >&5
$as_echo_n "checking for local stylesheet directory... " >&6; }
glibcxx_local_stylesheets=no
-if test x"$glibcxx_stylesheets" = x"yes"; then
- if test -d /usr/share/sgml/docbook/xsl-ns-stylesheets; then
- glibcxx_local_stylesheets=yes
- XSL_STYLE_DIR=/usr/share/sgml/docbook/xsl-ns-stylesheets
- fi
- if test -d /usr/share/xml/docbook/stylesheet/docbook-xsl-ns; then
- glibcxx_local_stylesheets=yes
- XSL_STYLE_DIR=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns
- fi
- if test -d /usr/share/xml/docbook/stylesheet/nwalsh5/current; then
- glibcxx_local_stylesheets=yes
- XSL_STYLE_DIR=/usr/share/xml/docbook/stylesheet/nwalsh5/current
- fi
+if test x${XMLCATALOG} = xyes && xsl_style_dir=`xmlcatalog "" $glibcxx_docbook_url 2>/dev/null`
+then
+ XSL_STYLE_DIR=`echo $xsl_style_dir | sed -n 's;^file://;;p'`
+ glibcxx_local_stylesheets=yes
+else
+ for dir in \
+ /usr/share/sgml/docbook/xsl-ns-stylesheets \
+ /usr/share/xml/docbook/stylesheet/docbook-xsl-ns \
+ /usr/share/xml/docbook/stylesheet/nwalsh5/current \
+ /usr/share/xml/docbook/stylesheet/nwalsh/current
+ do
+ if test -d $dir; then
+ glibcxx_local_stylesheets=yes
+ XSL_STYLE_DIR=$dir
+ break
+ fi
+ done
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_local_stylesheets" >&5
$as_echo "$glibcxx_local_stylesheets" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: $XSL_STYLE_DIR" >&5
$as_echo "$as_me: $XSL_STYLE_DIR" >&6;}
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for docbook stylesheets for documentation creation" >&5
+$as_echo_n "checking for docbook stylesheets for documentation creation... " >&6; }
+ glibcxx_stylesheets=no
+ if test x${XMLCATALOG} = xno || xmlcatalog "" $glibcxx_docbook_url/xhtml/docbook.xsl >/dev/null 2>&1; then
+ if test x${XSLTPROC} = xyes && echo '<title/>' | xsltproc --noout --nonet --xinclude $glibcxx_docbook_url/xhtml/docbook.xsl - 2>/dev/null; then
+ glibcxx_stylesheets=yes
+ fi
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_stylesheets" >&5
+$as_echo "$glibcxx_stylesheets" >&6; }
+
else
glibcxx_stylesheets=no
fi
AC_CHECK_PROG([DOT], dot, yes, no)
# Check for docbook
+AC_CHECK_PROG([XMLCATALOG], xmlcatalog, yes, no)
AC_CHECK_PROG([XSLTPROC], xsltproc, yes, no)
AC_CHECK_PROG([XMLLINT], xmllint, yes, no)
GLIBCXX_CONFIGURE_DOCBOOK
VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@
VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@
WARN_FLAGS = @WARN_FLAGS@
+XMLCATALOG = @XMLCATALOG@
# Validate existing XML structure.
XMLLINT = xmllint
VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@
VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@
WARN_FLAGS = @WARN_FLAGS@
+XMLCATALOG = @XMLCATALOG@
XMLLINT = @XMLLINT@
XSLTPROC = @XSLTPROC@
XSL_STYLE_DIR = @XSL_STYLE_DIR@
VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@
VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@
WARN_FLAGS = @WARN_FLAGS@
+XMLCATALOG = @XMLCATALOG@
XMLLINT = @XMLLINT@
XSLTPROC = @XSLTPROC@
XSL_STYLE_DIR = @XSL_STYLE_DIR@
VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@
VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@
WARN_FLAGS = @WARN_FLAGS@
+XMLCATALOG = @XMLCATALOG@
XMLLINT = @XMLLINT@
XSLTPROC = @XSLTPROC@
XSL_STYLE_DIR = @XSL_STYLE_DIR@
VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@
VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@
WARN_FLAGS = @WARN_FLAGS@
+XMLCATALOG = @XMLCATALOG@
XMLLINT = @XMLLINT@
XSLTPROC = @XSLTPROC@
XSL_STYLE_DIR = @XSL_STYLE_DIR@
VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@
VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@
WARN_FLAGS = @WARN_FLAGS@
+XMLCATALOG = @XMLCATALOG@
XMLLINT = @XMLLINT@
XSLTPROC = @XSLTPROC@
XSL_STYLE_DIR = @XSL_STYLE_DIR@
VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@
VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@
WARN_FLAGS = @WARN_FLAGS@
+XMLCATALOG = @XMLCATALOG@
XMLLINT = @XMLLINT@
XSLTPROC = @XSLTPROC@
XSL_STYLE_DIR = @XSL_STYLE_DIR@
VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@
VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@
WARN_FLAGS = @WARN_FLAGS@
+XMLCATALOG = @XMLCATALOG@
XMLLINT = @XMLLINT@
XSLTPROC = @XSLTPROC@
XSL_STYLE_DIR = @XSL_STYLE_DIR@
VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@
VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@
WARN_FLAGS = @WARN_FLAGS@
+XMLCATALOG = @XMLCATALOG@
XMLLINT = @XMLLINT@
XSLTPROC = @XSLTPROC@
XSL_STYLE_DIR = @XSL_STYLE_DIR@
VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@
VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@
WARN_FLAGS = @WARN_FLAGS@
+XMLCATALOG = @XMLCATALOG@
XMLLINT = @XMLLINT@
XSLTPROC = @XSLTPROC@
XSL_STYLE_DIR = @XSL_STYLE_DIR@
VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@
VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@
WARN_FLAGS = @WARN_FLAGS@
+XMLCATALOG = @XMLCATALOG@
XMLLINT = @XMLLINT@
XSLTPROC = @XSLTPROC@
XSL_STYLE_DIR = @XSL_STYLE_DIR@