From: Bruno Haible Date: Sat, 4 Jan 2020 14:54:02 +0000 (+0100) Subject: mbrtowc, mbrtoc32: Tighten dependendies. X-Git-Tag: v1.0~4377 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=952b15d9daae382f03ab10725d01e8a4b2a55dfc;p=gnulib.git mbrtowc, mbrtoc32: Tighten dependendies. * modules/mbrtowc (Depends-on): Disable hard-locale, mbsinit if REPLACE_MBSTATE_T is 1. (configure.ac): Don't compile lc-charset-dispatch.c and mbtowc-lock.c if REPLACE_MBSTATE_T is 0. * modules/mbrtoc32 (Depends-on): Remove hard-locale, mbsinit. Disable mbrtowc dependency if REPLACE_MBSTATE_T is 1. (configure.ac): Don't compile lc-charset-dispatch.c and mbtowc-lock.c if REPLACE_MBSTATE_T is 0. --- diff --git a/ChangeLog b/ChangeLog index f35de0f6a2..91bcb3eedc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2020-01-04 Bruno Haible + + mbrtowc, mbrtoc32: Tighten dependendies. + * modules/mbrtowc (Depends-on): Disable hard-locale, mbsinit if + REPLACE_MBSTATE_T is 1. + (configure.ac): Don't compile lc-charset-dispatch.c and mbtowc-lock.c if + REPLACE_MBSTATE_T is 0. + * modules/mbrtoc32 (Depends-on): Remove hard-locale, mbsinit. Disable + mbrtowc dependency if REPLACE_MBSTATE_T is 1. + (configure.ac): Don't compile lc-charset-dispatch.c and mbtowc-lock.c if + REPLACE_MBSTATE_T is 0. + 2020-01-04 Bruno Haible uchar: Decide about _GL_LARGE_CHAR32_T at configure time. diff --git a/modules/mbrtoc32 b/modules/mbrtoc32 index 011b7a91c3..2575394ce2 100644 --- a/modules/mbrtoc32 +++ b/modules/mbrtoc32 @@ -18,9 +18,7 @@ m4/visibility.m4 Depends-on: uchar -hard-locale [test $HAVE_MBRTOC32 = 0 || test $REPLACE_MBRTOC32 = 1] -mbrtowc [test $HAVE_MBRTOC32 = 0 || test $REPLACE_MBRTOC32 = 1] -mbsinit [test $HAVE_MBRTOC32 = 0 || test $REPLACE_MBRTOC32 = 1] +mbrtowc [{ test $HAVE_MBRTOC32 = 0 || test $REPLACE_MBRTOC32 = 1; } && test $REPLACE_MBSTATE_T = 0] localcharset [test $HAVE_MBRTOC32 = 0 || test $REPLACE_MBRTOC32 = 1] streq [test $HAVE_MBRTOC32 = 0 || test $REPLACE_MBRTOC32 = 1] verify [test $HAVE_MBRTOC32 = 0 || test $REPLACE_MBRTOC32 = 1] @@ -29,10 +27,12 @@ configure.ac: gl_FUNC_MBRTOC32 if test $HAVE_MBRTOC32 = 0 || test $REPLACE_MBRTOC32 = 1; then AC_LIBOBJ([mbrtoc32]) - AC_LIBOBJ([lc-charset-dispatch]) - AC_LIBOBJ([mbtowc-lock]) + if test $REPLACE_MBSTATE_T = 1; then + AC_LIBOBJ([lc-charset-dispatch]) + AC_LIBOBJ([mbtowc-lock]) + gl_PREREQ_MBTOWC_LOCK + fi gl_PREREQ_MBRTOC32 - gl_PREREQ_MBTOWC_LOCK fi gl_UCHAR_MODULE_INDICATOR([mbrtoc32]) diff --git a/modules/mbrtowc b/modules/mbrtowc index ee2e649767..294050f94b 100644 --- a/modules/mbrtowc +++ b/modules/mbrtowc @@ -23,8 +23,8 @@ Depends-on: wchar extensions stdint [test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1] -hard-locale [test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1] -mbsinit [test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1] +hard-locale [{ test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; } && test $REPLACE_MBSTATE_T = 0] +mbsinit [{ test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; } && test $REPLACE_MBSTATE_T = 0] localcharset [test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1] streq [test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1] verify [test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1] @@ -33,10 +33,12 @@ configure.ac: gl_FUNC_MBRTOWC if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then AC_LIBOBJ([mbrtowc]) - AC_LIBOBJ([lc-charset-dispatch]) - AC_LIBOBJ([mbtowc-lock]) + if test $REPLACE_MBSTATE_T = 1; then + AC_LIBOBJ([lc-charset-dispatch]) + AC_LIBOBJ([mbtowc-lock]) + gl_PREREQ_MBTOWC_LOCK + fi gl_PREREQ_MBRTOWC - gl_PREREQ_MBTOWC_LOCK fi gl_WCHAR_MODULE_INDICATOR([mbrtowc])