bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

getopt patch for GNU tar


From: Paul Eggert
Subject: getopt patch for GNU tar
Date: Tue, 16 Aug 2005 11:48:30 -0700
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

Building GNU tar from scratch failed because lib/getopt_int.h's declaration
of _getopt_internal specified a different signature from /usr/include/getopt.h
on my host (Debian GNU/Linux 3.1).  I tracked it down to the fact that GNU
tar uses both argp and getopt, and argp was asking for the substitute
getopt.h but getopt then overrode the result.  I installed this fix:

2005-08-16  Paul Eggert  <address@hidden>

        * 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.

--- getopt.m4.~1.11.~   2005-07-26 14:55:31.000000000 -0700
+++ getopt.m4   2005-08-16 11:42:27.000000000 -0700
@@ -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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]