blob: 326c59cef1ff1db91faae151c775c7fb1c86d261 [file] [log] [blame]
9487f7f2011-08-03 07:05:30 -07001#***************************************************************************
2#***************************************************************************
3
4# File version for 'aclocal' use. Keep it a single number.
5# serial 3
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 some Libtool tests
20dnl -------------------------------------------------
21dnl This is done to prevent Libtool 1.5.X from doing
22dnl unnecesary C++, Fortran and Java tests and reduce
23dnl resulting configure script by nearly 300 Kb.
24
25m4_define([AC_LIBTOOL_LANG_CXX_CONFIG],[:])
26m4_define([AC_LIBTOOL_LANG_F77_CONFIG],[:])
27m4_define([AC_LIBTOOL_LANG_GCJ_CONFIG],[:])
28
29dnl Override Autoconf's AC_LANG_PROGRAM (C)
30dnl -------------------------------------------------
31dnl This is done to prevent compiler warning
32dnl 'function declaration isn't a prototype'
33dnl in function main. This requires at least
34dnl a c89 compiler and does not suport K&R.
35
36m4_define([AC_LANG_PROGRAM(C)],
37[$1
38int main (void)
39{
40$2
41 ;
42 return 0;
43}])
44
45dnl Override Autoconf's AC_LANG_CALL (C)
46dnl -------------------------------------------------
47dnl This is a backport of Autoconf's 2.60 with the
48dnl embedded comments that hit the resulting script
49dnl removed. This is done to reduce configure size
50dnl and use fixed macro across Autoconf versions.
51
52m4_define([AC_LANG_CALL(C)],
53[AC_LANG_PROGRAM([$1
54m4_if([$2], [main], ,
55[
56#ifdef __cplusplus
57extern "C"
58#endif
59char $2 ();])], [return $2 ();])])
60
61dnl Override Autoconf's AC_LANG_FUNC_LINK_TRY (C)
62dnl -------------------------------------------------
63dnl This is a backport of Autoconf's 2.60 with the
64dnl embedded comments that hit the resulting script
65dnl removed. This is done to reduce configure size
66dnl and use fixed macro across Autoconf versions.
67
68m4_define([AC_LANG_FUNC_LINK_TRY(C)],
69[AC_LANG_PROGRAM(
70[
71#define $1 innocuous_$1
72#ifdef __STDC__
73# include <limits.h>
74#else
75# include <assert.h>
76#endif
77#undef $1
78#ifdef __cplusplus
79extern "C"
80#endif
81char $1 ();
82#if defined __stub_$1 || defined __stub___$1
83choke me
84#endif
85], [return $1 ();])])
86
87dnl Override Autoconf's PATH_SEPARATOR check
88dnl -------------------------------------------------
89dnl This is done to ensure that the same check is
90dnl used across different Autoconf versions and to
91dnl allow us to use this macro early enough in the
92dnl configure script.
93
94m4_defun([_AS_PATH_SEPARATOR_PREPARE],
95[CURL_CHECK_PATH_SEPARATOR
96m4_define([$0],[])])
97
98m4_defun([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
99[CURL_CHECK_PATH_SEPARATOR
100m4_define([$0],[])])
101