1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-30 10:22:34 +01:00

Fixed xinerama detection

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.
This commit is contained in:
Christophe CURIS
2014-02-12 22:54:32 +01:00
committed by Carlos R. Mafra
parent 1644eec5ec
commit 101e24b0be

View File

@@ -145,20 +145,23 @@ sed -e 's,^[[^%]]*% *,,' | sed -e 's, *%.*$,,' `" dnl
break]) break])
done done
LIBS="$wm_save_LIBS" LIBS="$wm_save_LIBS"
AS_IF([test "x$enable_xinerama$wm_cv_xext_xinerama" = "xyesno"], AS_IF([test "x$wm_cv_xext_xinerama" = "xno"],
[AC_MSG_ERROR([explicit Xinerama support requested but no library found])]) [AS_IF([test "x$enable_xinerama" = "xyesno"],
dnl [AC_MSG_ERROR([explicit Xinerama support requested but no library found])])],
dnl A library was found, check if header is available and compile [dnl
wm_save_CFLAGS="$CFLAGS" dnl A library was found, check if header is available and compiles
AS_CASE([`echo "$wm_cv_xext_xinerama" | sed -e 's,^[[^%]]*,,' `], wm_save_CFLAGS="$CFLAGS"
[*solaris*], [wm_header="X11/extensions/xinerama.h" ; wm_fct="XineramaGetInfo(NULL, 0, NULL, NULL, &intval)"], AS_CASE([`echo "$wm_cv_xext_xinerama" | sed -e 's,^[[^%]]*,,' `],
[wm_header="X11/extensions/Xinerama.h" ; wm_fct="XineramaQueryScreens(NULL, &intval)"]) [*solaris*], [wm_header="X11/extensions/xinerama.h" ; wm_fct="XineramaGetInfo(NULL, 0, NULL, NULL, &intval)"],
AS_IF([wm_fn_lib_try_compile "$wm_header" "int intval;" "$wm_fct" ""], [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]) [AC_MSG_ERROR([found $wm_cv_xext_xinerama but cannot compile with the header])])
AS_UNSET([wm_fct]) AS_UNSET([wm_header])
CFLAGS="$wm_save_CFLAGS"]) AS_UNSET([wm_fct])
CFLAGS="$wm_save_CFLAGS" dnl
]) dnl
])
AS_IF([test "x$wm_cv_xext_xinerama" = "xno"], AS_IF([test "x$wm_cv_xext_xinerama" = "xno"],
[unsupported="$unsupported Xinerama" [unsupported="$unsupported Xinerama"
enable_xinerama="no"], enable_xinerama="no"],