diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2011-07-28 09:35:19 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2011-07-28 09:35:19 -0700 |
commit | 5402029425ceee114d7ed071ac981227f0d1fc38 (patch) | |
tree | 20451e9445b32b2a447d7e0d022d490aac3838aa /m4 | |
parent | 70c2e72ae5368e39277de78a414c9d42292886c5 (diff) | |
download | emacs-5402029425ceee114d7ed071ac981227f0d1fc38.tar.gz |
Merge from gnulib.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/dup2.m4 | 23 | ||||
-rw-r--r-- | m4/gl-comp.m4 | 5 | ||||
-rw-r--r-- | m4/include_next.m4 | 14 |
3 files changed, 23 insertions, 19 deletions
diff --git a/m4/dup2.m4 b/m4/dup2.m4 index 8d7f62c8876..5c2cc9674c1 100644 --- a/m4/dup2.m4 +++ b/m4/dup2.m4 @@ -1,4 +1,4 @@ -#serial 13 +#serial 14 dnl Copyright (C) 2002, 2005, 2007, 2009-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -12,7 +12,6 @@ AC_DEFUN([gl_FUNC_DUP2], AC_CHECK_FUNCS_ONCE([dup2]) if test $ac_cv_func_dup2 = no; then HAVE_DUP2=0 - AC_LIBOBJ([dup2]) fi ], [ AC_DEFINE([HAVE_DUP2], [1], [Define to 1 if you have the 'dup2' function.]) @@ -60,17 +59,15 @@ AC_DEFUN([gl_FUNC_DUP2], esac]) ]) if test "$gl_cv_func_dup2_works" = no; then - gl_REPLACE_DUP2 + REPLACE_DUP2=1 fi fi -]) - -AC_DEFUN([gl_REPLACE_DUP2], -[ - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - AC_CHECK_FUNCS_ONCE([dup2]) - if test $ac_cv_func_dup2 = yes; then - REPLACE_DUP2=1 - fi - AC_LIBOBJ([dup2]) + dnl Replace dup2() for supporting the gnulib-defined fchdir() function, + dnl to keep fchdir's bookkeeping up-to-date. + m4_ifdef([gl_FUNC_FCHDIR], [ + gl_TEST_FCHDIR + if test $HAVE_FCHDIR = 0; then + REPLACE_DUP2=1 + fi + ]) ]) diff --git a/m4/gl-comp.m4 b/m4/gl-comp.m4 index bdeccfd31fa..becf95bef71 100644 --- a/m4/gl-comp.m4 +++ b/m4/gl-comp.m4 @@ -47,6 +47,7 @@ AC_DEFUN([gl_EARLY], # Code from module include_next: # Code from module intprops: # Code from module inttypes-incomplete: + # Code from module largefile: # Code from module lstat: # Code from module mktime: # Code from module multiarch: @@ -111,6 +112,9 @@ gl_SHA256 gl_SHA512 AC_REQUIRE([gl_C99_STRTOLD]) gl_FUNC_DUP2 +if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then + AC_LIBOBJ([dup2]) +fi gl_UNISTD_MODULE_INDICATOR([dup2]) gl_FILEMODE gl_GETLOADAVG @@ -527,6 +531,7 @@ AC_DEFUN([gl_FILE_LIST], [ m4/gnulib-common.m4 m4/include_next.m4 m4/inttypes.m4 + m4/largefile.m4 m4/longlong.m4 m4/lstat.m4 m4/md5.m4 diff --git a/m4/include_next.m4 b/m4/include_next.m4 index b3c78491855..ebf081a1101 100644 --- a/m4/include_next.m4 +++ b/m4/include_next.m4 @@ -1,4 +1,4 @@ -# include_next.m4 serial 18 +# include_next.m4 serial 20 dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -175,11 +175,13 @@ AC_DEFUN([gl_NEXT_HEADERS_INTERNAL], [AC_CHECK_HEADERS_ONCE([$1]) ]) +dnl FIXME: gl_next_header and gl_header_exists must be used unquoted +dnl until we can assume autoconf 2.64 or newer. m4_foreach_w([gl_HEADER_NAME], [$1], [AS_VAR_PUSHDEF([gl_next_header], [gl_cv_next_]m4_defn([gl_HEADER_NAME])) if test $gl_cv_have_include_next = yes; then - AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>']) + AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>']) else AC_CACHE_CHECK( [absolute name of <]m4_defn([gl_HEADER_NAME])[>], @@ -208,7 +210,7 @@ AC_DEFUN([gl_NEXT_HEADERS_INTERNAL], dnl eval is necessary to expand gl_absname_cpp. dnl Ultrix and Pyramid sh refuse to redirect output of eval, dnl so use subshell. - AS_VAR_SET([gl_next_header], + AS_VAR_SET(gl_next_header, ['"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | sed -n '\#/]m4_defn([gl_HEADER_NAME])[#{ s#.*"\(.*/]m4_defn([gl_HEADER_NAME])[\)".*#\1# @@ -218,20 +220,20 @@ AC_DEFUN([gl_NEXT_HEADERS_INTERNAL], }'`'"']) m4_if([$2], [check], [else - AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>']) + AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>']) fi ]) ]) fi AC_SUBST( AS_TR_CPP([NEXT_]m4_defn([gl_HEADER_NAME])), - [AS_VAR_GET([gl_next_header])]) + [AS_VAR_GET(gl_next_header)]) if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'gl_HEADER_NAME'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=AS_VAR_GET([gl_next_header]) + gl_next_as_first_directive=AS_VAR_GET(gl_next_header) fi AC_SUBST( AS_TR_CPP([NEXT_AS_FIRST_DIRECTIVE_]m4_defn([gl_HEADER_NAME])), |