summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPino Toscano <toscano.pino@tiscali.it>2023-05-08 18:39:36 +0200
committerDmitry V. Levin <ldv@strace.io>2023-05-11 05:16:06 +0000
commit5fa961fd3b5b8cf5ba1a0cf49b10ebf79e273e96 (patch)
tree453316edd9f722610ef84be25c7d4bc44269e1ae
parentb030a05e149c9c1a0855475ff690d849f720637f (diff)
downloadlinux-pam-git-5fa961fd3b5b8cf5ba1a0cf49b10ebf79e273e96.tar.gz
configure.ac: add --enable-examples option
Allow the user to not build the examples through --disable-examples (enabled by default); this can be useful: - when cross-compiling, as the examples are not useful - in distribution builds, not building stuff that is not used in any way
-rw-r--r--Makefile.am5
-rw-r--r--configure.ac5
2 files changed, 9 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index deb25268..2e8fede7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,11 +4,14 @@
AUTOMAKE_OPTIONS = 1.9 gnu dist-xz no-dist-gzip check-news
-SUBDIRS = libpam tests libpamc libpam_misc modules po conf examples xtests
+SUBDIRS = libpam tests libpamc libpam_misc modules po conf xtests
if HAVE_DOC
SUBDIRS += doc
endif
+if HAVE_EXAMPLES
+SUBDIRS += examples
+endif
CLEANFILES = *~
diff --git a/configure.ac b/configure.ac
index b9b0f839..6666b1b2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -224,6 +224,11 @@ AC_ARG_ENABLE([doc],
WITH_DOC=$enableval, WITH_DOC=yes)
AM_CONDITIONAL([HAVE_DOC], [test "x$WITH_DOC" = "xyes"])
+AC_ARG_ENABLE([examples],
+ AS_HELP_STRING([--disable-examples],[Do not build the examples]),
+ WITH_EXAMPLES=$enableval, WITH_EXAMPLES=yes)
+AM_CONDITIONAL([HAVE_EXAMPLES], [test "x$WITH_EXAMPLES" = "xyes"])
+
AC_ARG_ENABLE([prelude],
AS_HELP_STRING([--disable-prelude],[do not use prelude]),
WITH_PRELUDE=$enableval, WITH_PRELUDE=yes)