summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-04-18 13:07:49 +0200
committerraveit65 <[email protected]>2020-04-28 12:00:30 +0200
commitf42878c7f6d64d948e0ea0025e94ee136b63fd6f (patch)
treedb7cb6e3c914d698964c2f74732e283fbf079fc4 /configure.ac
parent47f8325d02c2df544ca25f65932af792b88bd0bf (diff)
downloadmate-terminal-f42878c7f6d64d948e0ea0025e94ee136b63fd6f.tar.bz2
mate-terminal-f42878c7f6d64d948e0ea0025e94ee136b63fd6f.tar.xz
build: Isolate smclient
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac24
1 files changed, 23 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index c6a3c42..ce859c8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -57,7 +57,28 @@ PKG_CHECK_MODULES([TERM],
# smclient
# ********
-PKG_CHECK_MODULES(SMCLIENT, sm >= 1.0.0)
+# $enable_xsmp will be set to "yes" or "no"
+AC_ARG_ENABLE(smclient,
+ [AC_HELP_STRING([--enable-smclient],
+ [Explicitly enable or disable smclient])],
+ [enable_smclient=$enableval],
+ [enable_smclient=yes])
+
+have_sm=no
+if test "x$enable_smclient" != "xno"; then
+ PKG_CHECK_MODULES(SMCLIENT, sm >= 1.0.0, have_sm=yes, [
+ if test "x$enable_smclient" = "xyes"; then
+ AC_MSG_ERROR([smclient enabled but SM library not found])
+ fi
+ ])
+fi
+
+AM_CONDITIONAL(ENABLE_SMCLIENT, [test "x$have_sm" = "xyes"])
+
+if test "x$have_sm" = "xyes"; then
+ AC_DEFINE(HAVE_SMCLIENT, 1, [Have the SM development library])
+fi
+
AC_SUBST([SMCLIENT_CFLAGS])
AC_SUBST([SMCLIENT_LIBS])
@@ -150,5 +171,6 @@ echo "
warning flags: ${WARN_CFLAGS}
linker flags: ${LDFLAGS}
+ smclient support: ${have_sm}
s/key support: ${enable_skey}
"