summaryrefslogtreecommitdiff
path: root/m4/iconv_h.m4
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2018-08-07 02:00:37 +0200
committerBruno Haible <bruno@clisp.org>2018-08-07 02:00:37 +0200
commit00ce4c600ff2dab879eb25c066e933d457bea64b (patch)
tree4be678e4a460d768fcf6cdea4452cb63ea77875f /m4/iconv_h.m4
parentc6d92bd5ede1ad472cacf08e433644762cba4a66 (diff)
downloadgnulib-00ce4c600ff2dab879eb25c066e933d457bea64b.tar.gz
Force generation of substitute .h file when C++ support is enabled.
* m4/ansi-c++.m4 (gl_ANSI_CXX): New macro. * modules/ansi-c++-opt (configure.ac): Just require gl_ANSI_CXX. * m4/fnmatch_h.m4 (gl_FNMATCH_H): If C++ support is enabled, set FNMATCH_H to non-empty. * m4/iconv_h.m4 (gl_ICONV_H_DEFAULTS): If C++ support is enabled, set ICONV_H to non-empty. * m4/monetary_h.m4 (gl_MONETARY_H_BODY): If C++ support is enabled, set MONETARY_H to non-empty. * m4/utime_h.m4 (gl_UTIME_H): If C++ support is enabled, set UTIME_H to non-empty.
Diffstat (limited to 'm4/iconv_h.m4')
-rw-r--r--m4/iconv_h.m411
1 files changed, 9 insertions, 2 deletions
diff --git a/m4/iconv_h.m4 b/m4/iconv_h.m4
index 918969e911..253c00837b 100644
--- a/m4/iconv_h.m4
+++ b/m4/iconv_h.m4
@@ -1,4 +1,4 @@
-# iconv_h.m4 serial 10
+# iconv_h.m4 serial 11
dnl Copyright (C) 2007-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -36,6 +36,7 @@ AC_DEFUN([gl_ICONV_MODULE_INDICATOR],
AC_DEFUN([gl_ICONV_H_DEFAULTS],
[
+ m4_ifdef([gl_ANSI_CXX], [AC_REQUIRE([gl_ANSI_CXX])])
GNULIB_ICONV=0; AC_SUBST([GNULIB_ICONV])
dnl Assume proper GNU behavior unless another module says otherwise.
ICONV_CONST=; AC_SUBST([ICONV_CONST])
@@ -43,6 +44,12 @@ AC_DEFUN([gl_ICONV_H_DEFAULTS],
REPLACE_ICONV_OPEN=0; AC_SUBST([REPLACE_ICONV_OPEN])
REPLACE_ICONV_UTF=0; AC_SUBST([REPLACE_ICONV_UTF])
ICONV_H=''; AC_SUBST([ICONV_H])
- m4_ifdef([gl_POSIXCHECK],[ICONV_H='iconv.h'])
+ m4_ifdef([gl_POSIXCHECK],
+ [ICONV_H='iconv.h'],
+ [if m4_ifdef([gl_ANSI_CXX], [test "$CXX" != no], [false]); then
+ dnl Override <fnmatch.h> always, to support the C++ GNULIB_NAMESPACE.
+ ICONV_H='iconv.h'
+ fi
+ ])
AM_CONDITIONAL([GL_GENERATE_ICONV_H], [test -n "$ICONV_H"])
])