X-Git-Url: https://erislabs.net/gitweb/?a=blobdiff_plain;f=modules%2Fgetopt-posix;h=b82d6b27cdbaa1cd6fe2515a28f00bda321d8cea;hb=03ea4328ae1ea7e985f7fd9a42ebf77bc64bd47c;hp=6be0cbce891c22f15e5a564228d46f47914a09ca;hpb=7cbbd8a31a3be111f26d87fb8e55f4438f9c885f;p=gnulib.git diff --git a/modules/getopt-posix b/modules/getopt-posix index 6be0cbce8..b82d6b27c 100644 --- a/modules/getopt-posix +++ b/modules/getopt-posix @@ -12,11 +12,19 @@ Depends-on: unistd extensions include_next -arg-nonnull -gettext-h [test $GNULIB_UNISTD_H_GETOPT = 1] +snippet/arg-nonnull +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 + 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: BUILT_SOURCES += $(GETOPT_H) @@ -26,7 +34,8 @@ BUILT_SOURCES += $(GETOPT_H) getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \ + sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \