annotate m4/argp.m4 @ 423:079d43b6967b 3.0-beta2 3.0-beta2

Added missing file
author lost@l-w.ca
date Sun, 19 Sep 2010 01:44:47 -0600
parents 3c2e1f24cc7d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
421
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
1 # argp.m4 serial 10
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
2 dnl Copyright (C) 2003-2007, 2009-2010 Free Software Foundation, Inc.
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
3 dnl This file is free software; the Free Software Foundation
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
4 dnl gives unlimited permission to copy and/or distribute it,
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
5 dnl with or without modifications, as long as this notice is preserved.
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
6
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
7 AC_DEFUN([gl_ARGP],
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
8 [
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
9 AC_REQUIRE([AC_C_INLINE])
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
10 AC_REQUIRE([AC_C_RESTRICT])
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
11 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
12 dnl argp-parse.c depends on GNU getopt internals, therefore use GNU getopt
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
13 dnl always.
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
14 gl_REPLACE_GETOPT
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
15 dnl Note: gl_REPLACE_GETOPT does AC_LIBOBJ([getopt]), AC_LIBOBJ([getopt1]).
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
16
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
17 AC_CHECK_DECL([program_invocation_name],
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
18 [AC_DEFINE([HAVE_DECL_PROGRAM_INVOCATION_NAME], [1],
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
19 [Define if program_invocation_name is declared])],
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
20 [AC_DEFINE([GNULIB_PROGRAM_INVOCATION_NAME], [1],
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
21 [Define to 1 to add extern declaration of program_invocation_name to argp.h])],
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
22 [#include <errno.h>])
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
23 AC_CHECK_DECL([program_invocation_short_name],
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
24 [AC_DEFINE([HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME], [1],
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
25 [Define if program_invocation_short_name is declared])],
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
26 [AC_DEFINE([GNULIB_PROGRAM_INVOCATION_SHORT_NAME], [1],
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
27 [Define to 1 to add extern declaration of program_invocation_short_name to argp.h])],
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
28 [#include <errno.h>])
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
29
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
30 # Check if program_invocation_name and program_invocation_short_name
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
31 # are defined elsewhere. It is improbable that only one of them will
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
32 # be defined and other not, I prefer to stay on the safe side and to
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
33 # test each one separately.
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
34 AC_MSG_CHECKING([whether program_invocation_name is defined])
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
35 AC_TRY_LINK([#include <argp.h>],
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
36 [ program_invocation_name = "test"; ],
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
37 [ AC_DEFINE([HAVE_PROGRAM_INVOCATION_NAME], [1],
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
38 [Define if program_invocation_name is defined])
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
39 AC_MSG_RESULT([yes])],
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
40 [ AC_MSG_RESULT([no])] )
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
41
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
42 AC_MSG_CHECKING([whether program_invocation_short_name is defined])
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
43 AC_TRY_LINK([#include <argp.h>],
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
44 [ program_invocation_short_name = "test"; ],
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
45 [ AC_DEFINE([HAVE_PROGRAM_INVOCATION_SHORT_NAME], [1],
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
46 [Define if program_invocation_short_name is defined])
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
47 AC_MSG_RESULT([yes])],
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
48 [ AC_MSG_RESULT([no])] )
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
49
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
50 AC_CHECK_DECLS_ONCE([clearerr_unlocked])
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
51 AC_CHECK_DECLS_ONCE([feof_unlocked])
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
52 AC_CHECK_DECLS_ONCE([ferror_unlocked])
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
53 AC_CHECK_DECLS_ONCE([fflush_unlocked])
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
54 AC_CHECK_DECLS_ONCE([fgets_unlocked])
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
55 AC_CHECK_DECLS_ONCE([fputc_unlocked])
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
56 AC_CHECK_DECLS_ONCE([fputs_unlocked])
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
57 AC_CHECK_DECLS_ONCE([fread_unlocked])
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
58 AC_CHECK_DECLS_ONCE([fwrite_unlocked])
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
59 AC_CHECK_DECLS_ONCE([getc_unlocked])
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
60 AC_CHECK_DECLS_ONCE([getchar_unlocked])
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
61 AC_CHECK_DECLS_ONCE([putc_unlocked])
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
62 AC_CHECK_DECLS_ONCE([putchar_unlocked])
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
63 AC_CHECK_FUNCS_ONCE([flockfile funlockfile])
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
64 AC_CHECK_HEADERS_ONCE([features.h linewrap.h])
3c2e1f24cc7d Added generated files for release
lost@l-w.ca
parents:
diff changeset
65 ])