]> Savannah Git Hosting - gnulib.git/commitdiff
getopt-gnu: omit some duplicate code
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 6 Apr 2017 22:41:05 +0000 (15:41 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 6 Apr 2017 22:42:05 +0000 (15:42 -0700)
* m4/getopt.m4 (gl_FUNC_GETOPT_GNU): Don’t require
gl_FUNC_GETOPT_POSIX, as the configure.ac code generated by
gnulib-tool already does this.
* modules/getopt-gnu (configure.ac): Omit code duplicated from
getopt-posix, which we depend on.

ChangeLog
m4/getopt.m4
modules/getopt-gnu

index 3f7c6f5a461a8a9e6fdf0b2ea6944c5f889bada1..db893f5e165c3f0486d9eed70449fcea177cb8f2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2017-04-06  Paul Eggert  <eggert@cs.ucla.edu>
 
+       getopt-gnu: omit some duplicate code
+       * m4/getopt.m4 (gl_FUNC_GETOPT_GNU): Don’t require
+       gl_FUNC_GETOPT_POSIX, as the configure.ac code generated by
+       gnulib-tool already does this.
+       * modules/getopt-gnu (configure.ac): Omit code duplicated from
+       getopt-posix, which we depend on.
+
        getopt-posix: use angle-bracket include
        * lib/getopt1.c: Include <config.h>, not "config.h".
 
index 139a814c6b7be454cac2da02c93617613a833a9d..d90076922b29ae7e81911efe64d1bd88c6e5d1aa 100644 (file)
@@ -1,4 +1,4 @@
-# getopt.m4 serial 44
+# getopt.m4 serial 45
 dnl Copyright (C) 2002-2006, 2008-2017 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -33,8 +33,6 @@ AC_DEFUN([gl_FUNC_GETOPT_POSIX],
 AC_DEFUN([gl_FUNC_GETOPT_GNU],
 [
   m4_divert_text([INIT_PREPARE], [gl_getopt_required=GNU])
-
-  AC_REQUIRE([gl_FUNC_GETOPT_POSIX])
 ])
 
 # Determine whether to replace the entire getopt facility.
index 9c348ed25ffcd316775839e11b846d7f163dae02..974ce1400f82f0c074a42e3f97a95def9771253c 100644 (file)
@@ -10,13 +10,6 @@ getopt-posix
 
 configure.ac:
 gl_FUNC_GETOPT_GNU
-if test $REPLACE_GETOPT = 1; then
-  AC_LIBOBJ([getopt])
-  AC_LIBOBJ([getopt1])
-  dnl Arrange for unistd.h to include getopt.h.
-  GNULIB_${gl_include_guard_prefix}_UNISTD_H_GETOPT=1
-fi
-AC_SUBST([GNULIB_${gl_include_guard_prefix}_UNISTD_H_GETOPT])
 
 Makefile.am: