Annotation of embedaddon/curl/m4/curl-override.m4, revision 1.1.1.1
1.1 misho 1: #***************************************************************************
2: # _ _ ____ _
3: # Project ___| | | | _ \| |
4: # / __| | | | |_) | |
5: # | (__| |_| | _ <| |___
6: # \___|\___/|_| \_\_____|
7: #
8: # Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
9: #
10: # This software is licensed as described in the file COPYING, which
11: # you should have received as part of this distribution. The terms
12: # are also available at https://curl.haxx.se/docs/copyright.html.
13: #
14: # You may opt to use, copy, modify, merge, publish, distribute and/or sell
15: # copies of the Software, and permit persons to whom the Software is
16: # furnished to do so, under the terms of the COPYING file.
17: #
18: # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19: # KIND, either express or implied.
20: #
21: ###########################################################################
22: #***************************************************************************
23: #***************************************************************************
24:
25: # File version for 'aclocal' use. Keep it a single number.
26: # serial 7
27:
28: dnl CURL_OVERRIDE_AUTOCONF
29: dnl -------------------------------------------------
30: dnl Placing a call to this macro in configure.ac after
31: dnl the one to AC_INIT will make macros in this file
32: dnl visible to the rest of the compilation overriding
33: dnl those from Autoconf.
34:
35: AC_DEFUN([CURL_OVERRIDE_AUTOCONF], [
36: AC_BEFORE([$0],[AC_PROG_LIBTOOL])
37: # using curl-override.m4
38: ])
39:
40: dnl Override Autoconf's AC_LANG_PROGRAM (C)
41: dnl -------------------------------------------------
42: dnl This is done to prevent compiler warning
43: dnl 'function declaration isn't a prototype'
44: dnl in function main. This requires at least
45: dnl a c89 compiler and does not support K&R.
46:
47: m4_define([AC_LANG_PROGRAM(C)],
48: [$1
49: int main (void)
50: {
51: $2
52: ;
53: return 0;
54: }])
55:
56: dnl Override Autoconf's AC_LANG_CALL (C)
57: dnl -------------------------------------------------
58: dnl This is a backport of Autoconf's 2.60 with the
59: dnl embedded comments that hit the resulting script
60: dnl removed. This is done to reduce configure size
61: dnl and use fixed macro across Autoconf versions.
62:
63: m4_define([AC_LANG_CALL(C)],
64: [AC_LANG_PROGRAM([$1
65: m4_if([$2], [main], ,
66: [
67: #ifdef __cplusplus
68: extern "C"
69: #endif
70: char $2 ();])], [return $2 ();])])
71:
72: dnl Override Autoconf's AC_LANG_FUNC_LINK_TRY (C)
73: dnl -------------------------------------------------
74: dnl This is a backport of Autoconf's 2.60 with the
75: dnl embedded comments that hit the resulting script
76: dnl removed. This is done to reduce configure size
77: dnl and use fixed macro across Autoconf versions.
78:
79: m4_define([AC_LANG_FUNC_LINK_TRY(C)],
80: [AC_LANG_PROGRAM(
81: [
82: #define $1 innocuous_$1
83: #ifdef __STDC__
84: # include <limits.h>
85: #else
86: # include <assert.h>
87: #endif
88: #undef $1
89: #ifdef __cplusplus
90: extern "C"
91: #endif
92: char $1 ();
93: #if defined __stub_$1 || defined __stub___$1
94: choke me
95: #endif
96: ], [return $1 ();])])
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>