[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] getloadavg, getopt: fix commentary re configure.in
From: |
Bruno Haible |
Subject: |
Re: [PATCH] getloadavg, getopt: fix commentary re configure.in |
Date: |
Mon, 09 Jul 2012 16:51:17 +0200 |
User-agent: |
KMail/4.7.4 (Linux/3.1.10-1.9-desktop; KDE/4.7.4; x86_64; ; ) |
Hi Paul,
> + * m4/getopt.m4 (gl_GETOPT_IFELSE, gl_GETOPT_SUBSTITUTE_HEADER)
> + (gl_PREREQ_GETOPT): Remove obsolete commentary re Emacs configure.in.
> + Emacs has renamed it to configure.ac, and it no longer refers
> + to these macros anyway.
So, can we simplify getopt.m4 accordingly? How about this patch?
2012-07-09 Bruno Haible <address@hidden>
getopt: Simplify after Emacs changed.
* m4/getopt.m4 (gl_FUNC_GETOPT_POSIX): Inline gl_GETOPT_IFELSE.
(gl_GETOPT_IFELSE): Remove macro.
--- m4/getopt.m4.orig Mon Jul 9 16:48:09 2012
+++ m4/getopt.m4 Mon Jul 9 16:48:04 2012
@@ -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 @@
[
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_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],
[