0003-configure-allow-overriding-some-tests.patch 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. From 9d57d4353c82110c609f36f91986277343d4ee45 Mon Sep 17 00:00:00 2001
  2. From: "Yann E. MORIN" <yann.morin.1998@free.fr>
  3. Date: Wed, 8 Feb 2023 13:26:56 +0100
  4. Subject: [PATCH] configure: allow overriding some tests
  5. Some tests use AC_RUN_IFELSE, so they do not work for cross-compilation.
  6. Allow the user to provide these results from the environment.
  7. Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
  8. ---
  9. configure | 6 +++---
  10. configure.ac | 6 +++---
  11. 2 files changed, 6 insertions(+), 6 deletions(-)
  12. diff --git a/configure b/configure
  13. index c18dfb2..d165962 100755
  14. --- a/configure
  15. +++ b/configure
  16. @@ -4540,7 +4540,7 @@ fi
  17. { $as_echo "$as_me:${as_lineno-$LINENO}: checking strdup macro" >&5
  18. $as_echo_n "checking strdup macro... " >&6; }
  19. if test "$cross_compiling" = yes; then :
  20. - ac_cv_strdup_macro=no
  21. + ac_cv_strdup_macro="${ac_cv_strdup_macro-no}"
  22. else
  23. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  24. @@ -4578,7 +4578,7 @@ $as_echo "$ac_cv_strdup_macro" >&6; }
  25. { $as_echo "$as_me:${as_lineno-$LINENO}: checking strndup macro" >&5
  26. $as_echo_n "checking strndup macro... " >&6; }
  27. if test "$cross_compiling" = yes; then :
  28. - ac_cv_strndup_macro=no
  29. + ac_cv_strndup_macro="${ac_cv_strndup_macro-no}"
  30. else
  31. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  32. @@ -4753,7 +4753,7 @@ done
  33. { $as_echo "$as_me:${as_lineno-$LINENO}: checking basic-block size" >&5
  34. $as_echo_n "checking basic-block size... " >&6; }
  35. -ac_cv_page_size=0
  36. +ac_cv_page_size="${ac_cv_page_size-0}"
  37. if test $ac_cv_page_size = 0; then
  38. if test "$cross_compiling" = yes; then :
  39. ac_cv_page_size=0
  40. diff --git a/configure.ac b/configure.ac
  41. index 9740fdc..51bdf4d 100644
  42. --- a/configure.ac
  43. +++ b/configure.ac
  44. @@ -292,7 +292,7 @@ int main() { return 1; }
  45. ]])],
  46. [ac_cv_strdup_macro=yes],
  47. [ac_cv_strdup_macro=no],
  48. -[ac_cv_strdup_macro=no]
  49. +[ac_cv_strdup_macro="${ac_cv_strdup_macro-no}"]
  50. )
  51. AC_MSG_RESULT([$ac_cv_strdup_macro])
  52. @@ -316,7 +316,7 @@ int main() { return 1; }
  53. ]])],
  54. [ac_cv_strndup_macro=yes],
  55. [ac_cv_strndup_macro=no],
  56. -[ac_cv_strndup_macro=no]
  57. +[ac_cv_strndup_macro="${ac_cv_strndup_macro-no}"]
  58. )
  59. AC_MSG_RESULT([$ac_cv_strndup_macro])
  60. @@ -390,7 +390,7 @@ AC_MSG_RESULT([$ac_cv_use_mmap])
  61. #
  62. AC_CHECK_FUNCS(getpagesize)
  63. AC_MSG_CHECKING([basic-block size])
  64. -ac_cv_page_size=0
  65. +ac_cv_page_size="${ac_cv_page_size-0}"
  66. if test $ac_cv_page_size = 0; then
  67. AC_RUN_IFELSE([AC_LANG_SOURCE([
  68. #if HAVE_UNISTD_H
  69. --
  70. 2.25.1