From: Christophe CURIS <[email protected]>
As reported by David Maciejak, when libXinerama was not found on the
system, the configure script still tried to search for associated
header and stopped all with unclear message.
The proper behaviour that was expected is to accept silently that
libXinerama may not be missing, and only stop compilation when the lib
is present but not its header.
---
m4/wm_xext_check.m4 | 31 +++++++++++++++++--------------
1 file changed, 17 insertions(+), 14 deletions(-)
diff --git a/m4/wm_xext_check.m4 b/m4/wm_xext_check.m4
index 51da16f..9b50a0e 100644
--- a/m4/wm_xext_check.m4
+++ b/m4/wm_xext_check.m4
@@ -145,20 +145,23 @@ sed -e 's,^[[^%]]*% *,,' | sed -e 's, *%.*$,,' `" dnl
break])
done
LIBS="$wm_save_LIBS"
- AS_IF([test "x$enable_xinerama$wm_cv_xext_xinerama" = "xyesno"],
- [AC_MSG_ERROR([explicit Xinerama support requested but no library
found])])
- dnl
- dnl A library was found, check if header is available and compile
- wm_save_CFLAGS="$CFLAGS"
- AS_CASE([`echo "$wm_cv_xext_xinerama" | sed -e 's,^[[^%]]*,,' `],
- [*solaris*], [wm_header="X11/extensions/xinerama.h" ;
wm_fct="XineramaGetInfo(NULL, 0, NULL, NULL, &intval)"],
- [wm_header="X11/extensions/Xinerama.h" ;
wm_fct="XineramaQueryScreens(NULL, &intval)"])
- AS_IF([wm_fn_lib_try_compile "$wm_header" "int intval;" "$wm_fct" ""],
- [],
- [AC_MSG_ERROR([found $wm_cv_xext_xinerama but cannot compile with
the header])])
- AS_UNSET([wm_header])
- AS_UNSET([wm_fct])
- CFLAGS="$wm_save_CFLAGS"])
+ AS_IF([test "x$wm_cv_xext_xinerama" = "xno"],
+ [AS_IF([test "x$enable_xinerama" = "xyesno"],
+ [AC_MSG_ERROR([explicit Xinerama support requested but no
library found])])],
+ [dnl
+ dnl A library was found, check if header is available and
compiles
+ wm_save_CFLAGS="$CFLAGS"
+ AS_CASE([`echo "$wm_cv_xext_xinerama" | sed -e 's,^[[^%]]*,,' `],
+ [*solaris*], [wm_header="X11/extensions/xinerama.h" ;
wm_fct="XineramaGetInfo(NULL, 0, NULL, NULL, &intval)"],
+ [wm_header="X11/extensions/Xinerama.h" ;
wm_fct="XineramaQueryScreens(NULL, &intval)"])
+ AS_IF([wm_fn_lib_try_compile "$wm_header" "int intval;"
"$wm_fct" ""],
+ [],
+ [AC_MSG_ERROR([found $wm_cv_xext_xinerama but cannot compile
with the header])])
+ AS_UNSET([wm_header])
+ AS_UNSET([wm_fct])
+ CFLAGS="$wm_save_CFLAGS" dnl
+ ]) dnl
+ ])
AS_IF([test "x$wm_cv_xext_xinerama" = "xno"],
[unsupported="$unsupported Xinerama"
enable_xinerama="no"],
--
1.8.5.3
--
To unsubscribe, send mail to [email protected].