getopt-posix 1.82 KB
Newer Older
1 2 3 4 5 6
Description:
getopt() function: process command line arguments.

Files:
lib/getopt.c
lib/getopt1.c
7
lib/getopt.in.h
8 9 10 11 12
lib/getopt-cdefs.in.h
lib/getopt-core.h
lib/getopt-ext.h
lib/getopt-pfx-core.h
lib/getopt-pfx-ext.h
13 14 15 16 17 18
lib/getopt_int.h
m4/getopt.m4

Depends-on:
unistd
extensions
19
include_next
20
gettext-h       [test $REPLACE_GETOPT = 1]
21
snippet/arg-nonnull
22 23 24

configure.ac:
gl_FUNC_GETOPT_POSIX
25 26 27
if test $REPLACE_GETOPT = 1; then
  AC_LIBOBJ([getopt])
  AC_LIBOBJ([getopt1])
28 29
  dnl Arrange for unistd.h to include getopt.h.
  GNULIB_${gl_include_guard_prefix}_UNISTD_H_GETOPT=1
30
fi
31
AC_SUBST([GNULIB_${gl_include_guard_prefix}_UNISTD_H_GETOPT])
32 33

Makefile.am:
34
BUILT_SOURCES += $(GETOPT_H) $(GETOPT_CDEFS_H)
35 36 37

# We need the following in order to create <getopt.h> when the system
# 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 42
	  sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
	      -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \
43 44
	      -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
	      -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; \
49
	} > $@-t && \
50
	mv -f $@-t $@
51

52
getopt-cdefs.h: getopt-cdefs.in.h $(top_builddir)/config.status
53 54 55
	$(AM_V_GEN)rm -f $@-t $@ && \
	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e 's|@''HAVE_SYS_CDEFS_H''@|$(HAVE_SYS_CDEFS_H)|g' \
56
	      < $(srcdir)/getopt-cdefs.in.h; \
57 58 59
	} > $@-t && \
	mv -f $@-t $@

60
MOSTLYCLEANFILES += getopt.h getopt.h-t getopt-cdefs.h getopt-cdefs.h-t
61 62 63 64 65

Include:
<unistd.h>

License:
66
LGPLv2+
67 68 69

Maintainer:
all, glibc