No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

curl-override.m4 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. #***************************************************************************
  2. # SPDX-License-Identifier: curl
  3. # License-Filename: COPYING
  4. #***************************************************************************
  5. # File version for 'aclocal' use. Keep it a single number.
  6. # serial 7
  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. AC_DEFUN([CURL_OVERRIDE_AUTOCONF], [
  14. AC_BEFORE([$0],[AC_PROG_LIBTOOL])
  15. # using curl-override.m4
  16. ])
  17. dnl Override Autoconf's AC_LANG_PROGRAM (C)
  18. dnl -------------------------------------------------
  19. dnl This is done to prevent compiler warning
  20. dnl 'function declaration isn't a prototype'
  21. dnl in function main. This requires at least
  22. dnl a c89 compiler and does not support K&R.
  23. m4_define([AC_LANG_PROGRAM(C)],
  24. [$1
  25. int main (void)
  26. {
  27. $2
  28. ;
  29. return 0;
  30. }])
  31. dnl Override Autoconf's AC_LANG_CALL (C)
  32. dnl -------------------------------------------------
  33. dnl This is a backport of Autoconf's 2.60 with the
  34. dnl embedded comments that hit the resulting script
  35. dnl removed. This is done to reduce configure size
  36. dnl and use fixed macro across Autoconf versions.
  37. m4_define([AC_LANG_CALL(C)],
  38. [AC_LANG_PROGRAM([$1
  39. m4_if([$2], [main], ,
  40. [
  41. #ifdef __cplusplus
  42. extern "C"
  43. #endif
  44. char $2 ();])], [return $2 ();])])
  45. dnl Override Autoconf's AC_LANG_FUNC_LINK_TRY (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. m4_define([AC_LANG_FUNC_LINK_TRY(C)],
  52. [AC_LANG_PROGRAM(
  53. [
  54. #define $1 innocuous_$1
  55. #ifdef __STDC__
  56. # include <limits.h>
  57. #else
  58. # include <assert.h>
  59. #endif
  60. #undef $1
  61. #ifdef __cplusplus
  62. extern "C"
  63. #endif
  64. char $1 ();
  65. #if defined __stub_$1 || defined __stub___$1
  66. choke me
  67. #endif
  68. ], [return $1 ();])])