getopt: Simplify after Emacs changed.
authorBruno Haible <bruno@clisp.org>
Mon, 9 Jul 2012 19:56:56 +0000 (21:56 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 9 Jul 2012 19:56:56 +0000 (21:56 +0200)
* m4/getopt.m4 (gl_FUNC_GETOPT_POSIX): Inline gl_GETOPT_IFELSE.
(gl_GETOPT_IFELSE): Remove macro.

ChangeLog
m4/getopt.m4

index c642230..892eb16 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-07-09  Bruno Haible  <bruno@clisp.org>
+
+       getopt: Simplify after Emacs changed.
+       * m4/getopt.m4 (gl_FUNC_GETOPT_POSIX): Inline gl_GETOPT_IFELSE.
+       (gl_GETOPT_IFELSE): Remove macro.
+
 2012-07-09  Jim Meyering  <meyering@redhat.com>
 
        maint.mk: add sc_vulnerable_makefile_CVE-2012-3386
index 155edb2..f6902b5 100644 (file)
@@ -1,4 +1,4 @@
-# getopt.m4 serial 43
+# getopt.m4 serial 44
 dnl Copyright (C) 2002-2006, 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -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],
 [