• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#***************************************************************************
2#***************************************************************************
3
4# File version for 'aclocal' use. Keep it a single number.
5# serial 7
6
7dnl CURL_OVERRIDE_AUTOCONF
8dnl -------------------------------------------------
9dnl Placing a call to this macro in configure.ac after
10dnl the one to AC_INIT will make macros in this file
11dnl visible to the rest of the compilation overriding
12dnl those from Autoconf.
13
14AC_DEFUN([CURL_OVERRIDE_AUTOCONF], [
15AC_BEFORE([$0],[AC_PROG_LIBTOOL])
16# using curl-override.m4
17])
18
19dnl Override Autoconf's AC_LANG_PROGRAM (C)
20dnl -------------------------------------------------
21dnl This is done to prevent compiler warning
22dnl 'function declaration isn't a prototype'
23dnl in function main. This requires at least
24dnl a c89 compiler and does not support K&R.
25
26m4_define([AC_LANG_PROGRAM(C)],
27[$1
28int main (void)
29{
30$2
31 ;
32 return 0;
33}])
34
35dnl Override Autoconf's AC_LANG_CALL (C)
36dnl -------------------------------------------------
37dnl This is a backport of Autoconf's 2.60 with the
38dnl embedded comments that hit the resulting script
39dnl removed. This is done to reduce configure size
40dnl and use fixed macro across Autoconf versions.
41
42m4_define([AC_LANG_CALL(C)],
43[AC_LANG_PROGRAM([$1
44m4_if([$2], [main], ,
45[
46#ifdef __cplusplus
47extern "C"
48#endif
49char $2 ();])], [return $2 ();])])
50
51dnl Override Autoconf's AC_LANG_FUNC_LINK_TRY (C)
52dnl -------------------------------------------------
53dnl This is a backport of Autoconf's 2.60 with the
54dnl embedded comments that hit the resulting script
55dnl removed. This is done to reduce configure size
56dnl and use fixed macro across Autoconf versions.
57
58m4_define([AC_LANG_FUNC_LINK_TRY(C)],
59[AC_LANG_PROGRAM(
60[
61#define $1 innocuous_$1
62#ifdef __STDC__
63# include <limits.h>
64#else
65# include <assert.h>
66#endif
67#undef $1
68#ifdef __cplusplus
69extern "C"
70#endif
71char $1 ();
72#if defined __stub_$1 || defined __stub___$1
73choke me
74#endif
75], [return $1 ();])])
76