getopt: Move AC_LIBOBJ invocations to module description.
[gnulib.git] / m4 / getopt.m4
index 4ad52fd..4d8450f 100644 (file)
@@ -23,7 +23,10 @@ AC_DEFUN([gl_FUNC_GETOPT_POSIX],
     [])
   ])
   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
 ])
 
@@ -37,19 +40,6 @@ AC_DEFUN([gl_FUNC_GETOPT_GNU],
   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],
 [