X-Git-Url: https://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fgetopt.m4;h=50f4509193eb4b6e57968988f6a253444c222b40;hb=53a617f5e118ec5642daa3da45fcef0bf5593b12;hp=155edb235ff0ee366b46ed3af12131a295b09af1;hpb=c1d613a0ac4b25f5dec56e8d27e39be5e88ec2d9;p=gnulib.git diff --git a/m4/getopt.m4 b/m4/getopt.m4 index 155edb235..50f450919 100644 --- a/m4/getopt.m4 +++ b/m4/getopt.m4 @@ -1,5 +1,5 @@ -# getopt.m4 serial 43 -dnl Copyright (C) 2002-2006, 2008-2012 Free Software Foundation, Inc. +# getopt.m4 serial 44 +dnl Copyright (C) 2002-2006, 2008-2013 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -9,18 +9,17 @@ AC_DEFUN([gl_FUNC_GETOPT_POSIX], [ m4_divert_text([DEFAULTS], [gl_getopt_required=POSIX]) AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + AC_REQUIRE([gl_GETOPT_CHECK_HEADERS]) dnl Other modules can request the gnulib implementation of the getopt dnl functions unconditionally, by defining gl_REPLACE_GETOPT_ALWAYS. dnl argp.m4 does this. m4_ifdef([gl_REPLACE_GETOPT_ALWAYS], [ - gl_GETOPT_IFELSE([], []) REPLACE_GETOPT=1 ], [ REPLACE_GETOPT=0 - gl_GETOPT_IFELSE([ + if test -n "$gl_replace_getopt"; then REPLACE_GETOPT=1 - ], - []) + fi ]) if test $REPLACE_GETOPT = 1; then dnl Arrange for getopt.h to be created. @@ -38,12 +37,6 @@ AC_DEFUN([gl_FUNC_GETOPT_GNU], AC_REQUIRE([gl_FUNC_GETOPT_POSIX]) ]) -AC_DEFUN([gl_GETOPT_IFELSE], -[ - AC_REQUIRE([gl_GETOPT_CHECK_HEADERS]) - AS_IF([test -n "$gl_replace_getopt"], [$1], [$2]) -]) - # Determine whether to replace the entire getopt facility. AC_DEFUN([gl_GETOPT_CHECK_HEADERS], [