Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 1 | Using AC_RUN_IFELSE prevent people from configuring package for |
| 2 | cross-compiling. Don't run code while configuring package. |
| 3 | |
| 4 | Upstream-Status: Pending |
| 5 | Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> |
| 6 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 7 | Index: git/scripts/common.m4 |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 8 | =================================================================== |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 9 | --- git.orig/scripts/common.m4 |
| 10 | +++ git/scripts/common.m4 |
| 11 | @@ -153,7 +153,7 @@ dnl Need to fix this so that it uses t |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 12 | AC_DEFUN([TORRENT_CHECK_EXECINFO], [ |
| 13 | AC_MSG_CHECKING(for execinfo.h) |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 14 | |
| 15 | - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ |
| 16 | + AC_LINK_IFELSE([AC_LANG_SOURCE([ |
| 17 | #include <execinfo.h> |
| 18 | int main() { backtrace((void**)0, 0); backtrace_symbols((char**)0, 0); return 0;} |
| 19 | ])], |
| 20 | @@ -168,7 +168,7 @@ AC_DEFUN([TORRENT_CHECK_EXECINFO], [ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 21 | AC_DEFUN([TORRENT_CHECK_ALIGNED], [ |
| 22 | AC_MSG_CHECKING(the byte alignment) |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 23 | |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 24 | - AC_RUN_IFELSE([AC_LANG_SOURCE([ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 25 | + AC_LINK_IFELSE([AC_LANG_SOURCE([ |
| 26 | #include <inttypes.h> |
| 27 | int main() { |
| 28 | char buf@<:@8@:>@ = { 0, 0, 0, 0, 1, 0, 0, 0 }; |