curl-override.m4 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. #***************************************************************************
  2. # $Id$
  3. #***************************************************************************
  4. # File version for 'aclocal' use. Keep it a single number.
  5. # serial 3
  6. dnl CURL_OVERRIDE_AUTOCONF
  7. dnl -------------------------------------------------
  8. dnl Placing a call to this macro in configure.ac after
  9. dnl the one to AC_INIT will make macros in this file
  10. dnl visible to the rest of the compilation overriding
  11. dnl those from Autoconf.
  12. AC_DEFUN([CURL_OVERRIDE_AUTOCONF], [
  13. AC_BEFORE([$0],[AC_PROG_LIBTOOL])
  14. # using curl-override.m4
  15. ])
  16. dnl Override some Libtool tests
  17. dnl -------------------------------------------------
  18. dnl This is done to prevent Libtool 1.5.X from doing
  19. dnl unnecesary C++, Fortran and Java tests and reduce
  20. dnl resulting configure script by nearly 300 Kb.
  21. m4_define([AC_LIBTOOL_LANG_CXX_CONFIG],[:])
  22. m4_define([AC_LIBTOOL_LANG_F77_CONFIG],[:])
  23. m4_define([AC_LIBTOOL_LANG_GCJ_CONFIG],[:])
  24. dnl Override Autoconf's AC_LANG_PROGRAM (C)
  25. dnl -------------------------------------------------
  26. dnl This is done to prevent compiler warning
  27. dnl 'function declaration isn't a prototype'
  28. dnl in function main. This requires at least
  29. dnl a c89 compiler and does not suport K&R.
  30. m4_define([AC_LANG_PROGRAM(C)],
  31. [$1
  32. int main (void)
  33. {
  34. $2
  35. ;
  36. return 0;
  37. }])
  38. dnl Override Autoconf's AC_LANG_CALL (C)
  39. dnl -------------------------------------------------
  40. dnl This is a backport of Autoconf's 2.60 with the
  41. dnl embedded comments that hit the resulting script
  42. dnl removed. This is done to reduce configure size
  43. dnl and use fixed macro across Autoconf versions.
  44. m4_define([AC_LANG_CALL(C)],
  45. [AC_LANG_PROGRAM([$1
  46. m4_if([$2], [main], ,
  47. [
  48. #ifdef __cplusplus
  49. extern "C"
  50. #endif
  51. char $2 ();])], [return $2 ();])])
  52. dnl Override Autoconf's AC_LANG_FUNC_LINK_TRY (C)
  53. dnl -------------------------------------------------
  54. dnl This is a backport of Autoconf's 2.60 with the
  55. dnl embedded comments that hit the resulting script
  56. dnl removed. This is done to reduce configure size
  57. dnl and use fixed macro across Autoconf versions.
  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. dnl Override Autoconf's PATH_SEPARATOR check
  77. dnl -------------------------------------------------
  78. dnl This is done to ensure that the same check is
  79. dnl used across different Autoconf versions and to
  80. dnl allow us to use this macro early enough in the
  81. dnl configure script.
  82. m4_defun([_AS_PATH_SEPARATOR_PREPARE],
  83. [CURL_CHECK_PATH_SEPARATOR
  84. m4_define([$0],[])])
  85. m4_defun([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
  86. [CURL_CHECK_PATH_SEPARATOR
  87. m4_define([$0],[])])