326c59cef1ff1db91faae151c775c7fb1c86d261
[external/curl.git] / m4 / curl-override.m4
1 #***************************************************************************
2 #***************************************************************************
3
4 # File version for 'aclocal' use. Keep it a single number.
5 # serial 3
6
7 dnl CURL_OVERRIDE_AUTOCONF
8 dnl -------------------------------------------------
9 dnl Placing a call to this macro in configure.ac after
10 dnl the one to AC_INIT will make macros in this file
11 dnl visible to the rest of the compilation overriding
12 dnl those from Autoconf.
13
14 AC_DEFUN([CURL_OVERRIDE_AUTOCONF], [
15 AC_BEFORE([$0],[AC_PROG_LIBTOOL])
16 # using curl-override.m4
17 ])
18
19 dnl Override some Libtool tests
20 dnl -------------------------------------------------
21 dnl This is done to prevent Libtool 1.5.X from doing
22 dnl unnecesary C++, Fortran and Java tests and reduce
23 dnl resulting configure script by nearly 300 Kb.
24
25 m4_define([AC_LIBTOOL_LANG_CXX_CONFIG],[:])
26 m4_define([AC_LIBTOOL_LANG_F77_CONFIG],[:])
27 m4_define([AC_LIBTOOL_LANG_GCJ_CONFIG],[:])
28
29 dnl Override Autoconf's AC_LANG_PROGRAM (C)
30 dnl -------------------------------------------------
31 dnl This is done to prevent compiler warning
32 dnl 'function declaration isn't a prototype'
33 dnl in function main. This requires at least
34 dnl a c89 compiler and does not suport K&R.
35
36 m4_define([AC_LANG_PROGRAM(C)],
37 [$1
38 int main (void)
39 {
40 $2
41  ;
42  return 0;
43 }])
44
45 dnl Override Autoconf's AC_LANG_CALL (C)
46 dnl -------------------------------------------------
47 dnl This is a backport of Autoconf's 2.60 with the
48 dnl embedded comments that hit the resulting script
49 dnl removed. This is done to reduce configure size
50 dnl and use fixed macro across Autoconf versions.
51
52 m4_define([AC_LANG_CALL(C)],
53 [AC_LANG_PROGRAM([$1
54 m4_if([$2], [main], ,
55 [
56 #ifdef __cplusplus
57 extern "C"
58 #endif
59 char $2 ();])], [return $2 ();])])
60
61 dnl Override Autoconf's AC_LANG_FUNC_LINK_TRY (C)
62 dnl -------------------------------------------------
63 dnl This is a backport of Autoconf's 2.60 with the
64 dnl embedded comments that hit the resulting script
65 dnl removed. This is done to reduce configure size
66 dnl and use fixed macro across Autoconf versions.
67
68 m4_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
79 extern "C"
80 #endif
81 char $1 ();
82 #if defined __stub_$1 || defined __stub___$1
83 choke me
84 #endif
85 ], [return $1 ();])])
86
87 dnl Override Autoconf's PATH_SEPARATOR check
88 dnl -------------------------------------------------
89 dnl This is done to ensure that the same check is
90 dnl used across different Autoconf versions and to
91 dnl allow us to use this macro early enough in the
92 dnl configure script.
93
94 m4_defun([_AS_PATH_SEPARATOR_PREPARE],
95 [CURL_CHECK_PATH_SEPARATOR
96 m4_define([$0],[])])
97
98 m4_defun([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
99 [CURL_CHECK_PATH_SEPARATOR
100 m4_define([$0],[])])
101