diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2015-10-13 23:34:16 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2015-10-13 23:34:47 -0700 |
commit | e668176e7d89e885902287da18c69297bf04fed3 (patch) | |
tree | bc132a39e0052e1fe6a32359d3246108ef01e12e /m4 | |
parent | 2cc412cdc2635ecb99129271abe94bdd744742c2 (diff) |
Merge from gnulib
This incorporates:
2015-10-13 binary-io, u64, unistd: port to strict C
2015-09-26 c-ctype: do not worry about EBCDIC + char signed
2015-09-25 c-ctype: port better to z/OS EBCDIC
2015-09-25 gnulib-common.m4: fix gl_PROG_AR_RANLIB/AM_PROG_AR clash
* doc/misc/texinfo.tex, lib/binary-io.c, lib/c-ctype.h, lib/u64.c:
* lib/unistd.c, m4/gnulib-common.m4, m4/gnulib-comp.m4:
Copy from gnulib.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/gnulib-common.m4 | 43 | ||||
-rw-r--r-- | m4/gnulib-comp.m4 | 5 |
2 files changed, 32 insertions, 16 deletions
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4 index 40e82f6e27..50ef974205 100644 --- a/m4/gnulib-common.m4 +++ b/m4/gnulib-common.m4 @@ -253,9 +253,10 @@ AC_DEFUN([gl_PROG_AR_RANLIB], [ dnl Minix 3 comes with two toolchains: The Amsterdam Compiler Kit compiler dnl as "cc", and GCC as "gcc". They have different object file formats and - dnl library formats. In particular, the GNU binutils programs ar, ranlib + dnl library formats. In particular, the GNU binutils programs ar and ranlib dnl produce libraries that work only with gcc, not with cc. AC_REQUIRE([AC_PROG_CC]) + AC_BEFORE([$0], [AM_PROG_AR]) AC_CACHE_CHECK([for Minix Amsterdam compiler], [gl_cv_c_amsterdam_compiler], [ AC_EGREP_CPP([Amsterdam], @@ -267,25 +268,37 @@ Amsterdam [gl_cv_c_amsterdam_compiler=yes], [gl_cv_c_amsterdam_compiler=no]) ]) - if test -z "$AR"; then - if test $gl_cv_c_amsterdam_compiler = yes; then + + dnl Don't compete with AM_PROG_AR's decision about AR/ARFLAGS if we are not + dnl building with __ACK__. + if test $gl_cv_c_amsterdam_compiler = yes; then + if test -z "$AR"; then AR='cc -c.a' - if test -z "$ARFLAGS"; then - ARFLAGS='-o' - fi - else - dnl Use the Automake-documented default values for AR and ARFLAGS, - dnl but prefer ${host}-ar over ar (useful for cross-compiling). - AC_CHECK_TOOL([AR], [ar], [ar]) - if test -z "$ARFLAGS"; then - ARFLAGS='cr' - fi fi - else if test -z "$ARFLAGS"; then - ARFLAGS='cr' + ARFLAGS='-o' fi + else + dnl AM_PROG_AR was added in automake v1.11.2. AM_PROG_AR does not AC_SUBST + dnl ARFLAGS variable (it is filed into Makefile.in directly by automake + dnl script on-demand, if not specified by ./configure of course). + dnl Don't AC_REQUIRE the AM_PROG_AR otherwise the code for __ACK__ above + dnl will be ignored. Also, pay attention to call AM_PROG_AR in else block + dnl because AM_PROG_AR is written so it could re-set AR variable even for + dnl __ACK__. It may seem like its easier to avoid calling the macro here, + dnl but we need to AC_SUBST both AR/ARFLAGS (thus those must have some good + dnl default value and automake should usually know them). + m4_ifdef([AM_PROG_AR], [AM_PROG_AR], [:]) + fi + + dnl In case the code above has not helped with setting AR/ARFLAGS, use + dnl Automake-documented default values for AR and ARFLAGS, but prefer + dnl ${host}-ar over ar (useful for cross-compiling). + AC_CHECK_TOOL([AR], [ar], [ar]) + if test -z "$ARFLAGS"; then + ARFLAGS='cr' fi + AC_SUBST([AR]) AC_SUBST([ARFLAGS]) if test -z "$RANLIB"; then diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4 index c48d2e5be5..349c0dce4e 100644 --- a/m4/gnulib-comp.m4 +++ b/m4/gnulib-comp.m4 @@ -37,7 +37,11 @@ AC_DEFUN([gl_EARLY], m4_pattern_allow([^gl_ES$])dnl a valid locale name m4_pattern_allow([^gl_LIBOBJS$])dnl a variable m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable + + # Pre-early section. + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gl_PROG_AR_RANLIB]) + # Code from module absolute-header: # Code from module acl-permissions: # Code from module alloca-opt: @@ -67,7 +71,6 @@ AC_DEFUN([gl_EARLY], # Code from module euidaccess: # Code from module execinfo: # Code from module extensions: - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) # Code from module extern-inline: # Code from module faccessat: # Code from module fcntl: |