# HG changeset patch # User Bruno Haible # Date 1250118590 -7200 # Node ID 8e0abc42d59f619ae96d7ca1f9ae5a38cb75a6a5 # Parent 0cb0c5c1d5c53946d26f8e0876da59afbb9b0f9a Ensure that optarg etc. get declared by . diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-08-12 Bruno Haible + + Ensure that optarg etc. get declared by . + * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Require + AC_USE_SYSTEM_EXTENSIONS. + * modules/getopt (Depends-on): Add 'extensions'. + 2009-08-12 Bruno Haible Avoid test link errors. diff --git a/m4/getopt.m4 b/m4/getopt.m4 --- a/m4/getopt.m4 +++ b/m4/getopt.m4 @@ -1,4 +1,4 @@ -# getopt.m4 serial 19 +# getopt.m4 serial 20 dnl Copyright (C) 2002-2006, 2008-2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -41,6 +41,9 @@ # Determine whether to replace the entire getopt facility. AC_DEFUN([gl_GETOPT_CHECK_HEADERS], [ + dnl Persuade Solaris to declare optarg, optind, opterr, optopt. + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + gl_replace_getopt= if test -z "$gl_replace_getopt"; then AC_CHECK_HEADERS([getopt.h], [], [gl_replace_getopt=yes]) diff --git a/modules/getopt b/modules/getopt --- a/modules/getopt +++ b/modules/getopt @@ -11,6 +11,7 @@ Depends-on: gettext-h unistd +extensions configure.ac: gl_GETOPT