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])
34 BUILT_SOURCES += $(GETOPT_H) $(GETOPT_CDEFS_H)
36 # We need the following in order to create <getopt.h> when the system
37 # doesn't have one that works with the given compiler.
38 getopt.h: getopt.in.h $(top_builddir)/config.status
39 $(AM_V_GEN)rm -f $@-t $@ && \
40 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
41 sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
42 -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \
43 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
44 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
45 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
46 -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \
47 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
48 < $(srcdir)/getopt.in.h; \
52 getopt-cdefs.h: getopt-cdefs.in.h $(top_builddir)/config.status
53 $(AM_V_GEN)rm -f $@-t $@ && \
54 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
55 sed -e 's|@''HAVE_SYS_CDEFS_H''@|$(HAVE_SYS_CDEFS_H)|g' \
56 < $(srcdir)/getopt-cdefs.in.h; \
60 MOSTLYCLEANFILES += getopt.h getopt.h-t getopt-cdefs.h getopt-cdefs.h-t