From 8e9bd230134bf5fa7004ff37e1a129d3efffbf1e Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 23 Nov 2004 21:03:45 +0000 Subject: Sync from gnulib. --- m4/getopt.m4 | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'm4/getopt.m4') 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 ]) + 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 ]) - if test -n "$GETOPT_H"; then - gl_GETOPT_SUBSTITUTE + if test -n "$GETOPT_H"; then + gl_GETOPT_SUBSTITUTE + fi fi ]) -- cgit v1.2.3-54-g00ecf