]> Savannah Git Hosting - gnulib.git/commitdiff
regex: work around conditional-dependencies glitch
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 5 Jul 2018 03:18:48 +0000 (20:18 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 5 Jul 2018 03:20:14 +0000 (20:20 -0700)
* modules/regex (Depends-on): Add langinfo.
Without this change, I had problems building an experimental
version of GNU Emacs.  The symptom of the bug was a message
‘./configure: line 12726: test: =: unary operator expected’.
This was due to a line in gl_FUNC_NL_LANGINFO that invokes
‘test $HAVE_LANGINFO_CODESET = 1’ even though HAVE_LANGINFO_CODESET
was unset.  Although gl_FUNC_NL_LANGINFO has
‘AC_REQUIRE([gl_LANGINFO_H])’ and gl_LANGINFO_H always sets
HAVE_LANGINFO_CODESET to 0 or 1, gnulib-tool with
--conditional-dependencies sometimes arranges for the
gl_FUNC_NL_LANGINFO code to be executed before the gl_LANGINFO_H
code.  Since the regex code includes <langinfo.h> it should be
depending on the langinfo module anyway, and this happens to work
around the bug, so install that as a workaround for now.  To
reproduce the original problem, run the following shell script on
the version of Gnulib just before this patch was installed.
rm -fr foo
mkdir foo
cat >foo/configure.ac <<'EOF'
AC_INIT(GNU Emacs, 27.0.50, bug-gnu-emacs@gnu.org, , https://www.gnu.org/software/emacs/)
gl_EARLY
gl_INIT
AC_OUTPUT
EOF
./gnulib-tool --import --conditional-dependencies --gnu-make --dir foo regex
./gnulib-tool --copy build-aux/install-sh foo/install-sh
./gnulib-tool --copy build-aux/config.sub foo/config.sub
./gnulib-tool --copy build-aux/config.guess foo/config.guess
cd foo
aclocal -I m4
autoconf
./configure --with-included-regex

ChangeLog
modules/regex

index a220b9c412b4051eb3ad64e14a3ae53cc1edf1c9..6b83038e2d6db1cfa17a65c0bd865f6b4841aa44 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,39 @@
+2018-07-04  Paul Eggert  <eggert@cs.ucla.edu>
+
+       regex: work around conditional-dependencies glitch
+       * modules/regex (Depends-on): Add langinfo.
+       Without this change, I had problems building an experimental
+       version of GNU Emacs.  The symptom of the bug was a message
+       ‘./configure: line 12726: test: =: unary operator expected’.
+       This was due to a line in gl_FUNC_NL_LANGINFO that invokes
+       ‘test $HAVE_LANGINFO_CODESET = 1’ even though HAVE_LANGINFO_CODESET
+       was unset.  Although gl_FUNC_NL_LANGINFO has
+       ‘AC_REQUIRE([gl_LANGINFO_H])’ and gl_LANGINFO_H always sets
+       HAVE_LANGINFO_CODESET to 0 or 1, gnulib-tool with
+       --conditional-dependencies sometimes arranges for the
+       gl_FUNC_NL_LANGINFO code to be executed before the gl_LANGINFO_H
+       code.  Since the regex code includes <langinfo.h> it should be
+       depending on the langinfo module anyway, and this happens to work
+       around the bug, so install that as a workaround for now.  To
+       reproduce the original problem, run the following shell script on
+       the version of Gnulib just before this patch was installed.
+               rm -fr foo
+               mkdir foo
+               cat >foo/configure.ac <<'EOF'
+               AC_INIT(GNU Emacs, 27.0.50, bug-gnu-emacs@gnu.org, , https://www.gnu.org/software/emacs/)
+               gl_EARLY
+               gl_INIT
+               AC_OUTPUT
+               EOF
+               ./gnulib-tool --import --conditional-dependencies --gnu-make --dir foo regex
+               ./gnulib-tool --copy build-aux/install-sh foo/install-sh
+               ./gnulib-tool --copy build-aux/config.sub foo/config.sub
+               ./gnulib-tool --copy build-aux/config.guess foo/config.guess
+               cd foo
+               aclocal -I m4
+               autoconf
+               ./configure --with-included-regex
+
 2018-07-01  Paul Eggert  <eggert@cs.ucla.edu>
 
        wchar: fix bug when checking for ‘inline’
index 8863a8e11c38f5820f192c873f87b5fd5257f4ab..b3cdf042b66dcf5fe2083d5d556af7adeaa9b0a2 100644 (file)
@@ -20,6 +20,7 @@ alloca-opt      [test $ac_use_included_regex = yes]
 btowc           [test $ac_use_included_regex = yes]
 builtin-expect  [test $ac_use_included_regex = yes]
 intprops        [test $ac_use_included_regex = yes]
+langinfo        [test $ac_use_included_regex = yes]
 lock      [test "$ac_cv_gnu_library_2_1:$ac_use_included_regex" = no:yes]
 memcmp          [test $ac_use_included_regex = yes]
 memmove         [test $ac_use_included_regex = yes]