curl-override.m4 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. #***************************************************************************
  2. #***************************************************************************
  3. # File version for 'aclocal' use. Keep it a single number.
  4. # serial 5
  5. dnl CURL_OVERRIDE_AUTOCONF
  6. dnl -------------------------------------------------
  7. dnl Placing a call to this macro in configure.ac after
  8. dnl the one to AC_INIT will make macros in this file
  9. dnl visible to the rest of the compilation overriding
  10. dnl those from Autoconf.
  11. AC_DEFUN([CURL_OVERRIDE_AUTOCONF], [
  12. AC_BEFORE([$0],[AC_PROG_LIBTOOL])
  13. # using curl-override.m4
  14. ])
  15. dnl Override Autoconf's AC_LANG_PROGRAM (C)
  16. dnl -------------------------------------------------
  17. dnl This is done to prevent compiler warning
  18. dnl 'function declaration isn't a prototype'
  19. dnl in function main. This requires at least
  20. dnl a c89 compiler and does not suport K&R.
  21. m4_define([AC_LANG_PROGRAM(C)],
  22. [$1
  23. int main (void)
  24. {
  25. $2
  26. ;
  27. return 0;
  28. }])
  29. dnl Override Autoconf's AC_LANG_CALL (C)
  30. dnl -------------------------------------------------
  31. dnl This is a backport of Autoconf's 2.60 with the
  32. dnl embedded comments that hit the resulting script
  33. dnl removed. This is done to reduce configure size
  34. dnl and use fixed macro across Autoconf versions.
  35. m4_define([AC_LANG_CALL(C)],
  36. [AC_LANG_PROGRAM([$1
  37. m4_if([$2], [main], ,
  38. [
  39. #ifdef __cplusplus
  40. extern "C"
  41. #endif
  42. char $2 ();])], [return $2 ();])])
  43. dnl Override Autoconf's AC_LANG_FUNC_LINK_TRY (C)
  44. dnl -------------------------------------------------
  45. dnl This is a backport of Autoconf's 2.60 with the
  46. dnl embedded comments that hit the resulting script
  47. dnl removed. This is done to reduce configure size
  48. dnl and use fixed macro across Autoconf versions.
  49. m4_define([AC_LANG_FUNC_LINK_TRY(C)],
  50. [AC_LANG_PROGRAM(
  51. [
  52. #define $1 innocuous_$1
  53. #ifdef __STDC__
  54. # include <limits.h>
  55. #else
  56. # include <assert.h>
  57. #endif
  58. #undef $1
  59. #ifdef __cplusplus
  60. extern "C"
  61. #endif
  62. char $1 ();
  63. #if defined __stub_$1 || defined __stub___$1
  64. choke me
  65. #endif
  66. ], [return $1 ();])])
  67. dnl Override Autoconf's PATH_SEPARATOR check
  68. dnl -------------------------------------------------
  69. dnl This is done to ensure that the same check is
  70. dnl used across different Autoconf versions and to
  71. dnl allow us to use this macro early enough in the
  72. dnl configure script.
  73. m4_defun([_AS_PATH_SEPARATOR_PREPARE],
  74. [CURL_CHECK_PATH_SEPARATOR
  75. m4_define([$0],[])])
  76. m4_defun([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
  77. [CURL_CHECK_PATH_SEPARATOR
  78. m4_define([$0],[])])
  79. dnl Override Autoconf's AC_CONFIG_MACRO_DIR (DIR)
  80. dnl -------------------------------------------------
  81. dnl This is an emulation of Autoconf's 2.61 macro.
  82. dnl This is done to use fixed macro across Autoconf
  83. dnl versions, and avoid warnings from modern libtool
  84. dnl which traces usage of this macro.
  85. AC_DEFUN([AC_CONFIG_MACRO_DIR],[:])