2 getopt() function: process command line arguments.
20 gettext-h [test $REPLACE_GETOPT = 1]
25 if test $REPLACE_GETOPT = 1; then
28 dnl Arrange for unistd.h to include getopt.h.
29 GNULIB_${gl_include_guard_prefix}_UNISTD_H_GETOPT=1
31 AC_SUBST([GNULIB_${gl_include_guard_prefix}_UNISTD_H_GETOPT])
32 gl_UNISTD_MODULE_INDICATOR([getopt-posix])
35 BUILT_SOURCES += $(GETOPT_H) $(GETOPT_CDEFS_H)
37 # We need the following in order to create <getopt.h> when the system
38 # doesn't have one that works with the given compiler.
39 getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H)
40 $(AM_V_GEN)rm -f $@-t $@ && \
41 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
42 sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
43 -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \
44 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
45 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
46 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
47 -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \
48 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
49 < $(srcdir)/getopt.in.h; \
53 getopt-cdefs.h: getopt-cdefs.in.h $(top_builddir)/config.status
54 $(AM_V_GEN)rm -f $@-t $@ && \
55 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
56 sed -e 's|@''HAVE_SYS_CDEFS_H''@|$(HAVE_SYS_CDEFS_H)|g' \
57 < $(srcdir)/getopt-cdefs.in.h; \
61 MOSTLYCLEANFILES += getopt.h getopt.h-t getopt-cdefs.h getopt-cdefs.h-t