From: Paul Eggert Date: Tue, 16 Aug 2005 18:45:50 +0000 (+0000) Subject: * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b4d508f389cba95bdc7be27010b00b8e643bdaf;p=pspp * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results of gl_GETOPT_SUBSTITUTE. That way, if both gl_GETOPT_SUBSTITUTE and gl_GETOPT are both invoked via different paths (as happens with GNU tar CVS because it uses both argp and getopt), the former wins. --- diff --git a/m4/ChangeLog b/m4/ChangeLog index a0ca3b26fa..78a74691f4 100644 --- a/m4/ChangeLog +++ b/m4/ChangeLog @@ -1,3 +1,11 @@ +2005-08-16 Paul Eggert + + * getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results + of gl_GETOPT_SUBSTITUTE. That way, if both gl_GETOPT_SUBSTITUTE + and gl_GETOPT are both invoked via different paths (as happens + with GNU tar CVS because it uses both argp and getopt), the former + wins. + 2005-08-16 Bruno Haible * strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function always. diff --git a/m4/getopt.m4 b/m4/getopt.m4 index 051c64905b..6b98782c4b 100644 --- a/m4/getopt.m4 +++ b/m4/getopt.m4 @@ -1,4 +1,4 @@ -# getopt.m4 serial 10 +# getopt.m4 serial 11 dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -27,8 +27,10 @@ AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER], AC_DEFUN([gl_GETOPT_CHECK_HEADERS], [ - GETOPT_H= - AC_CHECK_HEADERS([getopt.h], [], [GETOPT_H=getopt.h]) + if test -z "$GETOPT_H"; then + AC_CHECK_HEADERS([getopt.h], [], [GETOPT_H=getopt.h]) + fi + if test -z "$GETOPT_H"; then AC_CHECK_FUNCS([getopt_long_only], [], [GETOPT_H=getopt.h]) fi