[PATCH weston 4/4] configure.ac: Split weston-launch stuff
Quentin Glidic
sardemff7+wayland at sardemff7.net
Fri Dec 6 14:31:26 PST 2013
From: Quentin Glidic <sardemff7+git at sardemff7.net>
Signed-off-by: Quentin Glidic <sardemff7+git at sardemff7.net>
---
configure.ac | 16 +---------------
m4/weston-launch.m4 | 24 ++++++++++++++++++++++++
2 files changed, 25 insertions(+), 15 deletions(-)
create mode 100644 m4/weston-launch.m4
diff --git a/configure.ac b/configure.ac
index eaa2af1..53be040 100644
--- a/configure.ac
+++ b/configure.ac
@@ -43,6 +43,7 @@ PKG_PROG_PKG_CONFIG()
m4_include([m4/common.m4])
+m4_include([m4/weston-launch.m4])
COMPOSITOR_MODULES="wayland-server >= 1.3.90 pixman-1"
@@ -59,10 +60,6 @@ if test x$enable_xkbcommon = xyes; then
COMPOSITOR_MODULES="$COMPOSITOR_MODULES xkbcommon >= 0.3.0"
fi
-AC_ARG_ENABLE(setuid-install, [ --enable-setuid-install],,
- enable_setuid_install=yes)
-AM_CONDITIONAL(ENABLE_SETUID_INSTALL, test x$enable_setuid_install = xyes)
-
AC_ARG_ENABLE(xwayland, [ --enable-xwayland],,
enable_xwayland=yes)
@@ -309,17 +306,6 @@ PKG_CHECK_MODULES(SYSTEMD_LOGIN_209, [libsystemd-login >= 209],
AS_IF([test "x$have_systemd_login_209" = "xyes"],
[AC_DEFINE([HAVE_SYSTEMD_LOGIN_209], [1], [Have systemd-login >= 209])])
-AC_ARG_ENABLE(weston-launch, [ --enable-weston-launch],, enable_weston_launch=yes)
-AM_CONDITIONAL(BUILD_WESTON_LAUNCH, test x$enable_weston_launch == xyes)
-if test x$enable_weston_launch == xyes; then
- AC_CHECK_LIB([pam], [pam_open_session], [have_pam=yes], [have_pam=no])
- if test x$have_pam == xno; then
- AC_ERROR([weston-launch requires pam])
- fi
- PAM_LIBS=-lpam
- AC_SUBST(PAM_LIBS)
-fi
-
if test x$enable_egl = xyes; then
PKG_CHECK_MODULES(GLU, [glu], [have_glu=yes], [have_glu=no])
fi
diff --git a/m4/weston-launch.m4 b/m4/weston-launch.m4
new file mode 100644
index 0000000..f742e64
--- /dev/null
+++ b/m4/weston-launch.m4
@@ -0,0 +1,24 @@
+
+AC_ARG_ENABLE(weston-launch,
+ AS_HELP_STRING([--disable-weston-launch],
+ [Disable weston-launch. Its purpose is to open
+ devices that require privileges for weston to use
+ them.]),,
+ enable_weston_launch=yes)
+AM_CONDITIONAL(BUILD_WESTON_LAUNCH, [test x$enable_weston_launch = xyes])
+if test x$enable_weston_launch = xyes; then
+ AC_SEARCH_LIBS([pam_open_session], [pam])
+ case "$ac_cv_search_pam_open_session" in
+ "none required") ;;
+ no) AC_MSG_ERROR([pam support required for weston-launch]) ;;
+ *) PAM_LIBS="$ac_cv_search_pam_open_session" ;;
+ esac
+ AC_SUBST(PAM_LIBS)
+fi
+
+AC_ARG_ENABLE(setuid-install,
+ AS_HELP_STRING([--disable-setuid-install],
+ [Disable setuid for weston-launch. Only useful
+ for local installation.]),,
+ enable_setuid_install=yes)
+AM_CONDITIONAL(ENABLE_SETUID_INSTALL, [test x$enable_setuid_install = xyes])
--
1.8.4.3
More information about the wayland-devel
mailing list