mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-04-25 13:10:43 +02:00
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 <thiago@kde.org>
This commit is contained in:
parent
f719d45432
commit
6eddb6e122
1 changed files with 10 additions and 2 deletions
12
configure.in
12
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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue