1*6236dae4SAndroid Build Coastguard Worker#*************************************************************************** 2*6236dae4SAndroid Build Coastguard Worker# _ _ ____ _ 3*6236dae4SAndroid Build Coastguard Worker# Project ___| | | | _ \| | 4*6236dae4SAndroid Build Coastguard Worker# / __| | | | |_) | | 5*6236dae4SAndroid Build Coastguard Worker# | (__| |_| | _ <| |___ 6*6236dae4SAndroid Build Coastguard Worker# \___|\___/|_| \_\_____| 7*6236dae4SAndroid Build Coastguard Worker# 8*6236dae4SAndroid Build Coastguard Worker# Copyright (C) Daniel Stenberg, <[email protected]>, et al. 9*6236dae4SAndroid Build Coastguard Worker# 10*6236dae4SAndroid Build Coastguard Worker# This software is licensed as described in the file COPYING, which 11*6236dae4SAndroid Build Coastguard Worker# you should have received as part of this distribution. The terms 12*6236dae4SAndroid Build Coastguard Worker# are also available at https://curl.se/docs/copyright.html. 13*6236dae4SAndroid Build Coastguard Worker# 14*6236dae4SAndroid Build Coastguard Worker# You may opt to use, copy, modify, merge, publish, distribute and/or sell 15*6236dae4SAndroid Build Coastguard Worker# copies of the Software, and permit persons to whom the Software is 16*6236dae4SAndroid Build Coastguard Worker# furnished to do so, under the terms of the COPYING file. 17*6236dae4SAndroid Build Coastguard Worker# 18*6236dae4SAndroid Build Coastguard Worker# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 19*6236dae4SAndroid Build Coastguard Worker# KIND, either express or implied. 20*6236dae4SAndroid Build Coastguard Worker# 21*6236dae4SAndroid Build Coastguard Worker# SPDX-License-Identifier: curl 22*6236dae4SAndroid Build Coastguard Worker# 23*6236dae4SAndroid Build Coastguard Worker########################################################################### 24*6236dae4SAndroid Build Coastguard Worker#*************************************************************************** 25*6236dae4SAndroid Build Coastguard Worker#*************************************************************************** 26*6236dae4SAndroid Build Coastguard Worker 27*6236dae4SAndroid Build Coastguard Worker# File version for 'aclocal' use. Keep it a single number. 28*6236dae4SAndroid Build Coastguard Worker# serial 7 29*6236dae4SAndroid Build Coastguard Worker 30*6236dae4SAndroid Build Coastguard Workerdnl CURL_OVERRIDE_AUTOCONF 31*6236dae4SAndroid Build Coastguard Workerdnl ------------------------------------------------- 32*6236dae4SAndroid Build Coastguard Workerdnl Placing a call to this macro in configure.ac after 33*6236dae4SAndroid Build Coastguard Workerdnl the one to AC_INIT will make macros in this file 34*6236dae4SAndroid Build Coastguard Workerdnl visible to the rest of the compilation overriding 35*6236dae4SAndroid Build Coastguard Workerdnl those from Autoconf. 36*6236dae4SAndroid Build Coastguard Worker 37*6236dae4SAndroid Build Coastguard WorkerAC_DEFUN([CURL_OVERRIDE_AUTOCONF], [ 38*6236dae4SAndroid Build Coastguard WorkerAC_BEFORE([$0],[AC_PROG_LIBTOOL]) 39*6236dae4SAndroid Build Coastguard Worker# using curl-override.m4 40*6236dae4SAndroid Build Coastguard Worker]) 41*6236dae4SAndroid Build Coastguard Worker 42*6236dae4SAndroid Build Coastguard Workerdnl Override Autoconf's AC_LANG_PROGRAM (C) 43*6236dae4SAndroid Build Coastguard Workerdnl ------------------------------------------------- 44*6236dae4SAndroid Build Coastguard Workerdnl This is done to prevent compiler warning 45*6236dae4SAndroid Build Coastguard Workerdnl 'function declaration isn't a prototype' 46*6236dae4SAndroid Build Coastguard Workerdnl in function main. This requires at least 47*6236dae4SAndroid Build Coastguard Workerdnl a C89 compiler and does not support K&R. 48*6236dae4SAndroid Build Coastguard Worker 49*6236dae4SAndroid Build Coastguard Workerm4_define([AC_LANG_PROGRAM(C)], 50*6236dae4SAndroid Build Coastguard Worker[$1 51*6236dae4SAndroid Build Coastguard Workerint main(void) 52*6236dae4SAndroid Build Coastguard Worker{ 53*6236dae4SAndroid Build Coastguard Worker$2 54*6236dae4SAndroid Build Coastguard Worker ; 55*6236dae4SAndroid Build Coastguard Worker return 0; 56*6236dae4SAndroid Build Coastguard Worker}]) 57*6236dae4SAndroid Build Coastguard Worker 58*6236dae4SAndroid Build Coastguard Workerdnl Override Autoconf's AC_LANG_CALL (C) 59*6236dae4SAndroid Build Coastguard Workerdnl ------------------------------------------------- 60*6236dae4SAndroid Build Coastguard Workerdnl This is a backport of Autoconf's 2.60 with the 61*6236dae4SAndroid Build Coastguard Workerdnl embedded comments that hit the resulting script 62*6236dae4SAndroid Build Coastguard Workerdnl removed. This is done to reduce configure size 63*6236dae4SAndroid Build Coastguard Workerdnl and use fixed macro across Autoconf versions. 64*6236dae4SAndroid Build Coastguard Worker 65*6236dae4SAndroid Build Coastguard Workerm4_define([AC_LANG_CALL(C)], 66*6236dae4SAndroid Build Coastguard Worker[AC_LANG_PROGRAM([$1 67*6236dae4SAndroid Build Coastguard Workerm4_if([$2], [main], , 68*6236dae4SAndroid Build Coastguard Worker[ 69*6236dae4SAndroid Build Coastguard Worker#ifdef __cplusplus 70*6236dae4SAndroid Build Coastguard Workerextern "C" 71*6236dae4SAndroid Build Coastguard Worker#endif 72*6236dae4SAndroid Build Coastguard Workerchar $2 ();])], [return $2 ();])]) 73*6236dae4SAndroid Build Coastguard Worker 74*6236dae4SAndroid Build Coastguard Workerdnl Override Autoconf's AC_LANG_FUNC_LINK_TRY (C) 75*6236dae4SAndroid Build Coastguard Workerdnl ------------------------------------------------- 76*6236dae4SAndroid Build Coastguard Workerdnl This is a backport of Autoconf's 2.60 with the 77*6236dae4SAndroid Build Coastguard Workerdnl embedded comments that hit the resulting script 78*6236dae4SAndroid Build Coastguard Workerdnl removed. This is done to reduce configure size 79*6236dae4SAndroid Build Coastguard Workerdnl and use fixed macro across Autoconf versions. 80*6236dae4SAndroid Build Coastguard Worker 81*6236dae4SAndroid Build Coastguard Workerm4_define([AC_LANG_FUNC_LINK_TRY(C)], 82*6236dae4SAndroid Build Coastguard Worker[AC_LANG_PROGRAM( 83*6236dae4SAndroid Build Coastguard Worker[ 84*6236dae4SAndroid Build Coastguard Worker#define $1 innocuous_$1 85*6236dae4SAndroid Build Coastguard Worker#ifdef __STDC__ 86*6236dae4SAndroid Build Coastguard Worker# include <limits.h> 87*6236dae4SAndroid Build Coastguard Worker#else 88*6236dae4SAndroid Build Coastguard Worker# include <assert.h> 89*6236dae4SAndroid Build Coastguard Worker#endif 90*6236dae4SAndroid Build Coastguard Worker#undef $1 91*6236dae4SAndroid Build Coastguard Worker#ifdef __cplusplus 92*6236dae4SAndroid Build Coastguard Workerextern "C" 93*6236dae4SAndroid Build Coastguard Worker#endif 94*6236dae4SAndroid Build Coastguard Workerchar $1 (); 95*6236dae4SAndroid Build Coastguard Worker#if defined __stub_$1 || defined __stub___$1 96*6236dae4SAndroid Build Coastguard Worker#error force compilation error 97*6236dae4SAndroid Build Coastguard Worker#endif 98*6236dae4SAndroid Build Coastguard Worker], [return $1 ();])]) 99