+2011-05-08 Bruno Haible <bruno@clisp.org>
+
+ getopt: Move AC_LIBOBJ invocations to module description.
+ * m4/getopt.m4 (gl_REPLACE_GETOPT): Remove macro.
+ (gl_FUNC_GETOPT): Inline it here. Move AC_LIBOBJ and gl_PREREQ_GETOPT
+ invocations from here...
+ * modules/getopt-gnu (configure.ac): ... to here.
+ * modules/getopt-posix (configure.ac): ... and here.
+ (Depends-on): Update condition.
+
2011-05-08 Bruno Haible <bruno@clisp.org>
getopt, argp: Respect rules for use of AC_LIBOBJ.
[])
])
if test $REPLACE_GETOPT = 1; then
- gl_REPLACE_GETOPT
+ dnl Arrange for getopt.h to be created.
+ gl_GETOPT_SUBSTITUTE_HEADER
+ dnl Arrange for unistd.h to include getopt.h.
+ GNULIB_UNISTD_H_GETOPT=1
fi
])
AC_REQUIRE([gl_FUNC_GETOPT_POSIX])
])
-# Request the gnulib implementation of the getopt functions unconditionally.
-AC_DEFUN([gl_REPLACE_GETOPT],
-[
- dnl Arrange for getopt.h to be created.
- gl_GETOPT_SUBSTITUTE_HEADER
- dnl Arrange for unistd.h to include getopt.h.
- GNULIB_UNISTD_H_GETOPT=1
- dnl Arrange to compile the getopt implementation.
- AC_LIBOBJ([getopt])
- AC_LIBOBJ([getopt1])
- gl_PREREQ_GETOPT
-])
-
# emacs' configure.in uses this.
AC_DEFUN([gl_GETOPT_IFELSE],
[
extensions
include_next
arg-nonnull
-gettext-h [test $GNULIB_UNISTD_H_GETOPT = 1]
+gettext-h [test $REPLACE_GETOPT = 1]
configure.ac:
gl_FUNC_GETOPT_POSIX
+if test $REPLACE_GETOPT = 1; then
+ AC_LIBOBJ([getopt])
+ AC_LIBOBJ([getopt1])
+ gl_PREREQ_GETOPT
+fi
Makefile.am:
BUILT_SOURCES += $(GETOPT_H)