verify: new macro 'assume'
[gnulib.git] / modules / getopt-posix
1 Description:
2 getopt() function: process command line arguments.
3
4 Files:
5 lib/getopt.in.h
6 lib/getopt.c
7 lib/getopt1.c
8 lib/getopt_int.h
9 m4/getopt.m4
10
11 Depends-on:
12 unistd
13 extensions
14 include_next
15 snippet/arg-nonnull
16 gettext-h       [test $REPLACE_GETOPT = 1]
17
18 configure.ac:
19 gl_FUNC_GETOPT_POSIX
20 if test $REPLACE_GETOPT = 1; then
21   AC_LIBOBJ([getopt])
22   AC_LIBOBJ([getopt1])
23   gl_PREREQ_GETOPT
24   dnl Arrange for unistd.h to include getopt.h.
25   GNULIB_${gl_include_guard_prefix}_UNISTD_H_GETOPT=1
26 fi
27 AC_SUBST([GNULIB_${gl_include_guard_prefix}_UNISTD_H_GETOPT])
28
29 Makefile.am:
30 BUILT_SOURCES += $(GETOPT_H)
31
32 # We need the following in order to create <getopt.h> when the system
33 # doesn't have one that works with the given compiler.
34 getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H)
35         $(AM_V_GEN)rm -f $@-t $@ && \
36         { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
37           sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
38               -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \
39               -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
40               -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
41               -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
42               -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \
43               -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
44               < $(srcdir)/getopt.in.h; \
45         } > $@-t && \
46         mv -f $@-t $@
47 MOSTLYCLEANFILES += getopt.h getopt.h-t
48
49 Include:
50 <unistd.h>
51
52 License:
53 LGPLv2+
54
55 Maintainer:
56 all, glibc