[PATCH v2] configure.in: fail abstract socket test gracefully when cross-compiling
Marc Mutz
marc at kdab.net
Mon Apr 20 00:35:59 PDT 2009
* configure.in: only run AC_CACHE_CHECK if enable_abstract_sockets=auto
* configure.in: warn that, when cross-compiling, we're unable to detect
abstract sockets availability automatically
---
configure.in | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/configure.in b/configure.in
index 0705ae2..d666dd1 100644
--- a/configure.in
+++ b/configure.in
@@ -814,8 +814,9 @@ AC_CHECK_FUNCS(getpeerucred getpeereid)
#### Abstract sockets
-if ! test x$enable_abstract_sockets = xno; then
+if test x$enable_abstract_sockets = xauto; then
AC_LANG_PUSH(C)
+warn_on_xcompile=no
AC_CACHE_CHECK([abstract socket namespace],
ac_cv_have_abstract_sockets,
[AC_RUN_IFELSE([AC_LANG_PROGRAM(
@@ -855,8 +856,15 @@ AC_CACHE_CHECK([abstract socket namespace],
exit (0);
]])],
[ac_cv_have_abstract_sockets=yes],
- [ac_cv_have_abstract_sockets=no]
+ [ac_cv_have_abstract_sockets=no],
+ [
+ ac_cv_have_abstract_sockets=no
+ warn_on_xcompile=yes
+ ]
)])
+if test x$warn_on_xcompile = xyes ; then
+ AC_MSG_WARN([Cannot check for abstract sockets when cross-compiling, please
use --enable-abstract-sockets])
+fi
AC_LANG_POP(C)
fi
--
1.5.6.5
--
Marc Mutz <marc at kdab.com> | Senior Software Engineer
KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
www.kdab.com || Germany +49-30-521325470 || Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-Independent Software Solutions
More information about the dbus
mailing list