summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMatthew Jordan <mjordan@digium.com>2015-01-15 02:18:45 +0000
committerMatthew Jordan <mjordan@digium.com>2015-01-15 02:18:45 +0000
commitf6630e248124bf34683d20f829d63a9b6dfc8c79 (patch)
treea4a65116332cf8cf25fe03141e3ad722694ce97c /configure.ac
parent77a036bf3f23c67bb57bd93a348c1bf468d6e1c5 (diff)
configure: If cross-compiling, assume we have working semaphores
The Asterisk 13 configure.ac checks for HAS_WORKING_SEMAPHORE but does not have an option for cross-compiling so it fails with an exit. Since we're cross- compiling, we can't exactly go looking for the header. The semaphore.h header is relatively common: * It's part of the POSIX standard * It's part of GNU C Library As such, we assume that it will be present when cross-compiling. As such, this patch defaults "HAS_WORKING_SEMAPHORE" to "1" if cross-compiling is detected. If you're cross-compiling to a platform that doesn't support this, then make sure you re-define this to 0. ASTERISK-24663 #close Reported by: abelbeck patches: asterisk-13-anonymous-semaphores.patch uploaded by abelbeck (License 5903) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430646 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac5
1 files changed, 4 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index efbc84a84..b242913ac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -884,7 +884,10 @@ AC_RUN_IFELSE(
[sem_t sem; return sem_init(&sem, 0, 0);])],
AC_MSG_RESULT(yes)
AC_DEFINE([HAS_WORKING_SEMAPHORE], 1, [Define to 1 if anonymous semaphores work.]),
- AC_MSG_RESULT(no)
+ AC_MSG_RESULT(no),
+ AC_MSG_RESULT(cross-compile)
+ AC_MSG_NOTICE([WARNING: result yes guessed because of cross compilation])
+ AC_DEFINE([HAS_WORKING_SEMAPHORE], 1, [Define to 1 if anonymous semaphores work.])
)
LIBS="$save_LIBS"