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 <[EMAIL PROTECTED]> * 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 _______________________________________________ bug-gnulib mailing list bug-gnulib@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnulib