From: Bruno Haible Date: Wed, 12 Aug 2009 23:09:50 +0000 (+0200) Subject: Ensure that optarg etc. get declared by . X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e63c644f4a786b7a096c440c66ae8694258a168;p=pspp Ensure that optarg etc. get declared by . --- diff --git a/ChangeLog b/ChangeLog index 2e4643b3e6..530999b137 100644 --- 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 index 3f8597aef8..7fefef7446 100644 --- 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 @@ AC_DEFUN([gl_GETOPT_IFELSE], # 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 index 39751bf331..bad6de2c7a 100644 --- a/modules/getopt +++ b/modules/getopt @@ -11,6 +11,7 @@ m4/getopt.m4 Depends-on: gettext-h unistd +extensions configure.ac: gl_GETOPT