Do the Windows oldnames workaround through the C++ GNULIB_NAMESPACE.
[gnulib.git] / modules / getopt-posix
blobcbcfff592e5337e5aa0e87c1efb5d3c693830ead
1 Description:
2 getopt() function: process command line arguments.
4 Files:
5 lib/getopt.c
6 lib/getopt1.c
7 lib/getopt.in.h
8 lib/getopt-cdefs.in.h
9 lib/getopt-core.h
10 lib/getopt-ext.h
11 lib/getopt-pfx-core.h
12 lib/getopt-pfx-ext.h
13 lib/getopt_int.h
14 m4/getopt.m4
16 Depends-on:
17 unistd
18 extensions
19 include_next
20 gettext-h       [test $REPLACE_GETOPT = 1]
21 snippet/arg-nonnull
23 configure.ac:
24 gl_FUNC_GETOPT_POSIX
25 if test $REPLACE_GETOPT = 1; then
26   AC_LIBOBJ([getopt])
27   AC_LIBOBJ([getopt1])
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])
34 Makefile.am:
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; \
50         } > $@-t && \
51         mv -f $@-t $@
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; \
58         } > $@-t && \
59         mv -f $@-t $@
61 MOSTLYCLEANFILES += getopt.h getopt.h-t getopt-cdefs.h getopt-cdefs.h-t
63 Include:
64 <unistd.h>
66 License:
67 LGPLv2+
69 Maintainer:
70 all, glibc