curl-compilers.m4: remove -Wstrict-aliasing=3 from clang
[platform/upstream/curl.git] / m4 / curl-override.m4
1 #***************************************************************************
2 #***************************************************************************
3
4 # File version for 'aclocal' use. Keep it a single number.
5 # serial 5
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 Autoconf's AC_LANG_PROGRAM (C)
20 dnl -------------------------------------------------
21 dnl This is done to prevent compiler warning
22 dnl 'function declaration isn't a prototype'
23 dnl in function main. This requires at least
24 dnl a c89 compiler and does not suport K&R.
25
26 m4_define([AC_LANG_PROGRAM(C)],
27 [$1
28 int main (void)
29 {
30 $2
31  ;
32  return 0;
33 }])
34
35 dnl Override Autoconf's AC_LANG_CALL (C)
36 dnl -------------------------------------------------
37 dnl This is a backport of Autoconf's 2.60 with the
38 dnl embedded comments that hit the resulting script
39 dnl removed. This is done to reduce configure size
40 dnl and use fixed macro across Autoconf versions.
41
42 m4_define([AC_LANG_CALL(C)],
43 [AC_LANG_PROGRAM([$1
44 m4_if([$2], [main], ,
45 [
46 #ifdef __cplusplus
47 extern "C"
48 #endif
49 char $2 ();])], [return $2 ();])])
50
51 dnl Override Autoconf's AC_LANG_FUNC_LINK_TRY (C)
52 dnl -------------------------------------------------
53 dnl This is a backport of Autoconf's 2.60 with the
54 dnl embedded comments that hit the resulting script
55 dnl removed. This is done to reduce configure size
56 dnl and use fixed macro across Autoconf versions.
57
58 m4_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
69 extern "C"
70 #endif
71 char $1 ();
72 #if defined __stub_$1 || defined __stub___$1
73 choke me
74 #endif
75 ], [return $1 ();])])
76
77 dnl Override Autoconf's PATH_SEPARATOR check
78 dnl -------------------------------------------------
79 dnl This is done to ensure that the same check is
80 dnl used across different Autoconf versions and to
81 dnl allow us to use this macro early enough in the
82 dnl configure script.
83
84 m4_defun([_AS_PATH_SEPARATOR_PREPARE],
85 [CURL_CHECK_PATH_SEPARATOR
86 m4_define([$0],[])])
87
88 m4_defun([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
89 [CURL_CHECK_PATH_SEPARATOR
90 m4_define([$0],[])])
91
92 dnl Override Autoconf's AC_CONFIG_MACRO_DIR (DIR)
93 dnl -------------------------------------------------
94 dnl This is an emulation of Autoconf's 2.61 macro.
95 dnl This is done to use fixed macro across Autoconf
96 dnl versions, and avoid warnings from modern libtool
97 dnl which traces usage of this macro.
98
99 AC_DEFUN([AC_CONFIG_MACRO_DIR],[:])
100