texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: * tp/Texinfo/XS/convert/call_html_cxx_function.cp


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/XS/convert/call_html_cxx_function.cpp, tp/Texinfo/XS/configure.ac (texinfo_cv_cxx_hashmap): include string for std::string.
Date: Sat, 05 Oct 2024 15:02:55 -0400

This is an automated email from the git hooks/post-receive script.

pertusus pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new 28eeef96aa * tp/Texinfo/XS/convert/call_html_cxx_function.cpp, 
tp/Texinfo/XS/configure.ac (texinfo_cv_cxx_hashmap): include string for 
std::string.
28eeef96aa is described below

commit 28eeef96aa4faeb9fcff56d08e25202b1404783f
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Oct 5 21:03:03 2024 +0200

    * tp/Texinfo/XS/convert/call_html_cxx_function.cpp,
    tp/Texinfo/XS/configure.ac (texinfo_cv_cxx_hashmap): include string
    for std::string.
    
    * tp/Texinfo/XS/configure.ac (TXI_HAVE_CXX_HASHMAP),
    tp/Texinfo/XS/Makefile.am (TXI_CXX_CPPFLAGS, teximakehtml_CPPFLAGS):
    rename HAVE_CXX_HASHMAP automake conditional as TXI_HAVE_CXX_HASHMAP.
    Only set an automake conditional for CXX hashmap, and pass directly -D
    in Makefile.am if set.
    
    * tp/Texinfo/XS/Makefile.am (C_libtexinfo_convert_sources)
    (teximakehtml_SOURCES): add call_html_cxx_function.cpp to
    teximakehtml_SOURCES only.
---
 ChangeLog                                        | 16 ++++++++++++++++
 tp/Texinfo/XS/Makefile.am                        | 21 ++++++++++++---------
 tp/Texinfo/XS/configure.ac                       |  7 ++-----
 tp/Texinfo/XS/convert/call_html_cxx_function.cpp |  1 +
 tp/Texinfo/XS/convert/converter.c                |  2 +-
 5 files changed, 32 insertions(+), 15 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 7073a20855..cb8a765e2f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2024-10-05  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/XS/convert/call_html_cxx_function.cpp,
+       tp/Texinfo/XS/configure.ac (texinfo_cv_cxx_hashmap): include string
+       for std::string.
+
+       * tp/Texinfo/XS/configure.ac (TXI_HAVE_CXX_HASHMAP),
+       tp/Texinfo/XS/Makefile.am (TXI_CXX_CPPFLAGS, teximakehtml_CPPFLAGS):
+       rename HAVE_CXX_HASHMAP automake conditional as TXI_HAVE_CXX_HASHMAP.
+       Only set an automake conditional for CXX hashmap, and pass directly -D
+       in Makefile.am if set.
+
+       * tp/Texinfo/XS/Makefile.am (C_libtexinfo_convert_sources)
+       (teximakehtml_SOURCES): add call_html_cxx_function.cpp to
+       teximakehtml_SOURCES only.
+
 2024-10-05  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/XS/configure.ac (PACKAGE_XS_VERSION),
diff --git a/tp/Texinfo/XS/Makefile.am b/tp/Texinfo/XS/Makefile.am
index 7027410a69..f9756c22aa 100644
--- a/tp/Texinfo/XS/Makefile.am
+++ b/tp/Texinfo/XS/Makefile.am
@@ -412,8 +412,7 @@ C_libtexinfo_convert_sources = \
                        convert/html_converter_api.c \
                        convert/html_converter_api.h \
                        convert/texinfo.c \
-                       convert/texinfo.h \
-                       convert/call_html_cxx_function.h
+                       convert/texinfo.h
 
 XS_libtexinfo_convert_sources = \
                        convert/build_html_perl_state.h \
@@ -423,12 +422,6 @@ XS_libtexinfo_convert_sources = \
                        convert/get_converter_perl_info.c \
                        convert/get_converter_perl_info.h
 
-if HAVE_CXX_HASHMAP
-C_libtexinfo_convert_sources += convert/call_html_cxx_function.cpp
-else
-EXTRA_DIST += convert/call_html_cxx_function.cpp
-endif
-
 libtexinfo_convert_la_SOURCES = \
    $(C_libtexinfo_convert_sources) \
    $(XS_libtexinfo_convert_sources)
@@ -553,7 +546,17 @@ teximakehtml_SOURCES = \
                        main/replace_perl_api_call.c \
                        convert/replace_perl_call_html_function.c
 
-teximakehtml_CPPFLAGS = -I$(srcdir)/parsetexi -I$(srcdir)/convert 
-I$(srcdir)/main -I$(srcdir)/structuring_transfo $(AM_CPPFLAGS) 
$(GNULIB_CPPFLAGS)
+if TXI_HAVE_CXX_HASHMAP
+teximakehtml_SOURCES += convert/call_html_cxx_function.cpp \
+                        convert/call_html_cxx_function.h
+TXI_CXX_CPPFLAGS = -DHAVE_CXX_HASHMAP=1
+else
+EXTRA_DIST += convert/call_html_cxx_function.cpp \
+              convert/call_html_cxx_function.h
+TXI_CXX_CPPFLAGS = 
+endif
+
+teximakehtml_CPPFLAGS = -save-temps -I$(srcdir)/parsetexi -I$(srcdir)/convert 
-I$(srcdir)/main -I$(srcdir)/structuring_transfo $(TXI_CXX_CPPFLAGS) 
$(AM_CPPFLAGS) $(GNULIB_CPPFLAGS)
 #teximakehtml_LDADD = libtexinfo.la libtexinfo-convert.la 
$(top_builddir)/gnulib/lib/libgnu.la
 teximakehtml_LDADD = $(top_builddir)/gnulib/lib/libgnu.la
 
diff --git a/tp/Texinfo/XS/configure.ac b/tp/Texinfo/XS/configure.ac
index 27e6eb8070..271b139f10 100644
--- a/tp/Texinfo/XS/configure.ac
+++ b/tp/Texinfo/XS/configure.ac
@@ -183,6 +183,7 @@ texinfo_cv_cxx_hashmap=no
 
 AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
 #include <unordered_map>
+#include <string>
 
 void
 init_registered_ids_hashmap (void)
@@ -193,11 +194,7 @@ init_registered_ids_hashmap (void)
 ]])], [texinfo_cv_cxx_hashmap=yes])
 ])
 
-if test $texinfo_cv_cxx_hashmap = yes; then
-  AC_DEFINE([HAVE_CXX_HASHMAP], [1], [Define if C++ hashmap can be used])
-fi
-
-AM_CONDITIONAL([HAVE_CXX_HASHMAP],
+AM_CONDITIONAL([TXI_HAVE_CXX_HASHMAP],
                [test "x$texinfo_cv_cxx_hashmap" = "xyes"])
 
 AC_LANG_POP([C++])
diff --git a/tp/Texinfo/XS/convert/call_html_cxx_function.cpp 
b/tp/Texinfo/XS/convert/call_html_cxx_function.cpp
index 870265abbf..429d0ab600 100644
--- a/tp/Texinfo/XS/convert/call_html_cxx_function.cpp
+++ b/tp/Texinfo/XS/convert/call_html_cxx_function.cpp
@@ -16,6 +16,7 @@
 #include <config.h>
 
 #include <unordered_map>
+#include <string>
 #include <iostream>
 
 extern "C"
diff --git a/tp/Texinfo/XS/convert/converter.c 
b/tp/Texinfo/XS/convert/converter.c
index 3fb9780e35..2412615eec 100644
--- a/tp/Texinfo/XS/convert/converter.c
+++ b/tp/Texinfo/XS/convert/converter.c
@@ -450,7 +450,7 @@ converter_converter (enum converter_format format,
                      const CONVERTER_INITIALIZATION_INFO *input_user_conf)
 {
   CONVERTER_INITIALIZATION_INFO *format_defaults;
-  /* NOTE if HAVE_CXX_HASHMAP is not defined, even with CONVF_cxx_hashmap
+  /* NOTE if HAVE_CXX_HASHMAP is not set, even with CONVF_cxx_hashmap
      string lists will be used */
   size_t converter_descriptor = new_converter (format, CONVF_cxx_hashmap);
    /*



reply via email to

[Prev in Thread] Current Thread [Next in Thread]