annotate m4/argp.m4 @ 436:4c272633fce2 3.0 3.0

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