Commit 6eddb6e1 authored by Marc Mutz's avatar Marc Mutz Committed by Thiago Macieira

configure.in: fail abstract socket test gracefully when cross-compiling

 * 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
Signed-off-by: Thiago Macieira's avatarThiago Macieira <thiago@kde.org>
parent f719d454
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment