diffseq: port to GCC 14.2.1 in ‘patch’
[gnulib.git] / modules / getopt-posix
blob0b50620c4b2e18c6ffbf55b4977f2dae6603b306
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
15 m4/sys_cdefs_h.m4
17 Depends-on:
18 unistd
19 extensions
20 include_next
21 gen-header
22 gettext-h       [test $REPLACE_GETOPT = 1]
23 snippet/arg-nonnull
25 configure.ac:
26 gl_FUNC_GETOPT_POSIX
27 gl_CONDITIONAL_HEADER([getopt.h])
28 gl_CONDITIONAL_HEADER([getopt-cdefs.h])
29 AC_PROG_MKDIR_P
30 gl_CONDITIONAL([GL_COND_OBJ_GETOPT], [test $REPLACE_GETOPT = 1])
31 AM_COND_IF([GL_COND_OBJ_GETOPT], [
32   dnl Define the substituted variable GNULIB_UNISTD_H_GETOPT to 1.
33   gl_UNISTD_H_REQUIRE_DEFAULTS
34   gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNISTD_H_GETOPT], [1])
36 gl_UNISTD_MODULE_INDICATOR([getopt-posix])
38 Makefile.am:
39 BUILT_SOURCES += $(GETOPT_H) $(GETOPT_CDEFS_H)
41 # We need the following in order to create <getopt.h> when the system
42 # doesn't have one that works with the given compiler.
43 if GL_GENERATE_GETOPT_H
44 getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H)
45 @NMD@   $(AM_V_GEN)$(MKDIR_P) '%reldir%'
46         $(gl_V_at)$(SED_HEADER_STDOUT) \
47               -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
48               -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \
49               -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
50               -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
51               -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
52               -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \
53               -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
54               $(srcdir)/getopt.in.h > $@-t
55         $(AM_V_at)mv $@-t $@
56 else
57 getopt.h: $(top_builddir)/config.status
58         rm -f $@
59 endif
61 if GL_GENERATE_GETOPT_CDEFS_H
62 getopt-cdefs.h: getopt-cdefs.in.h $(top_builddir)/config.status
63         $(AM_V_GEN)$(SED_HEADER_STDOUT) \
64           -e 's|@''HAVE_SYS_CDEFS_H''@|$(HAVE_SYS_CDEFS_H)|g' \
65           $(srcdir)/getopt-cdefs.in.h > $@-t
66         $(AM_V_at)mv $@-t $@
67 else
68 getopt-cdefs.h: $(top_builddir)/config.status
69         rm -f $@
70 endif
72 MOSTLYCLEANFILES += getopt.h getopt.h-t getopt-cdefs.h getopt-cdefs.h-t
74 if GL_COND_OBJ_GETOPT
75 lib_SOURCES += getopt.c getopt1.c
76 endif
78 Include:
79 <unistd.h>
81 License:
82 LGPLv2+
84 Maintainer:
85 all, glibc