quickjs-tart

quickjs-based runtime for wallet-core logic
Log | Files | Refs | README | LICENSE

curl-override.m4 (3041B)


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