• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
28dnl CURL_OVERRIDE_AUTOCONF
29dnl -------------------------------------------------
30dnl Placing a call to this macro in configure.ac after
31dnl the one to AC_INIT will make macros in this file
32dnl visible to the rest of the compilation overriding
33dnl those from Autoconf.
34
35AC_DEFUN([CURL_OVERRIDE_AUTOCONF], [
36AC_BEFORE([$0],[AC_PROG_LIBTOOL])
37# using curl-override.m4
38])
39
40dnl Override Autoconf's AC_LANG_PROGRAM (C)
41dnl -------------------------------------------------
42dnl This is done to prevent compiler warning
43dnl 'function declaration isn't a prototype'
44dnl in function main. This requires at least
45dnl a c89 compiler and does not support K&R.
46
47m4_define([AC_LANG_PROGRAM(C)],
48[$1
49int main (void)
50{
51$2
52 ;
53 return 0;
54}])
55
56dnl Override Autoconf's AC_LANG_CALL (C)
57dnl -------------------------------------------------
58dnl This is a backport of Autoconf's 2.60 with the
59dnl embedded comments that hit the resulting script
60dnl removed. This is done to reduce configure size
61dnl and use fixed macro across Autoconf versions.
62
63m4_define([AC_LANG_CALL(C)],
64[AC_LANG_PROGRAM([$1
65m4_if([$2], [main], ,
66[
67#ifdef __cplusplus
68extern "C"
69#endif
70char $2 ();])], [return $2 ();])])
71
72dnl Override Autoconf's AC_LANG_FUNC_LINK_TRY (C)
73dnl -------------------------------------------------
74dnl This is a backport of Autoconf's 2.60 with the
75dnl embedded comments that hit the resulting script
76dnl removed. This is done to reduce configure size
77dnl and use fixed macro across Autoconf versions.
78
79m4_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
90extern "C"
91#endif
92char $1 ();
93#if defined __stub_$1 || defined __stub___$1
94choke me
95#endif
96], [return $1 ();])])
97