diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2004-11-23 21:03:45 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2004-11-23 21:03:45 +0000 |
commit | 8e9bd230134bf5fa7004ff37e1a129d3efffbf1e (patch) | |
tree | 56e6d057d318d7354cad412e8c84b01875661bb3 /m4 | |
parent | 398491f38184dc9065d81e91833661ce781d4f8b (diff) | |
download | coreutils-8e9bd230134bf5fa7004ff37e1a129d3efffbf1e.tar.xz |
Sync from gnulib.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/ChangeLog | 6 | ||||
-rw-r--r-- | m4/getopt.m4 | 18 |
2 files changed, 16 insertions, 8 deletions
diff --git a/m4/ChangeLog b/m4/ChangeLog index b860834b3..5f30ecd1a 100644 --- a/m4/ChangeLog +++ b/m4/ChangeLog @@ -2,6 +2,12 @@ * utimens.m4 (gl_UTIMENS): Check for futimes function. +2004-11-23 Sergey Poznyakoff <gray@Mirddin.farlep.net> + + * getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in + order not to spoil the result of an eventual previous invocation + of gl_GETOPT_SUBSTITUTE. + 2004-11-17 Paul Eggert <eggert@cs.ucla.edu> * calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc implementations diff --git a/m4/getopt.m4 b/m4/getopt.m4 index be36ddd2e..dcd333ba3 100644 --- a/m4/getopt.m4 +++ b/m4/getopt.m4 @@ -25,16 +25,18 @@ AC_DEFUN([gl_GETOPT], [ gl_PREREQ_GETOPT - GETOPT_H= - AC_CHECK_HEADERS([getopt.h], [], [GETOPT_H=getopt.h]) - AC_CHECK_FUNCS([getopt_long_only], [], [GETOPT_H=getopt.h]) + if test -z "$GETOPT_H"; then + GETOPT_H= + AC_CHECK_HEADERS([getopt.h], [], [GETOPT_H=getopt.h]) + AC_CHECK_FUNCS([getopt_long_only], [], [GETOPT_H=getopt.h]) - dnl BSD getopt_long uses an incompatible method to reset option processing, - dnl and (as of 2004-10-15) mishandles optional option-arguments. - AC_CHECK_DECL([optreset], [GETOPT_H=getopt.h], [], [#include <getopt.h>]) + dnl BSD getopt_long uses an incompatible method to reset option processing, + dnl and (as of 2004-10-15) mishandles optional option-arguments. + AC_CHECK_DECL([optreset], [GETOPT_H=getopt.h], [], [#include <getopt.h>]) - if test -n "$GETOPT_H"; then - gl_GETOPT_SUBSTITUTE + if test -n "$GETOPT_H"; then + gl_GETOPT_SUBSTITUTE + fi fi ]) |