aboutsummaryrefslogtreecommitdiff
path: root/m4/macros/with_addon.m4
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2016-08-31 00:08:49 +0000
committerCy Schubert <cy@FreeBSD.org>2016-08-31 00:08:49 +0000
commitca57057f598bfc7119f79f71bf38ec88244ab396 (patch)
tree051f78ef258707b493cc7cb21569b6949915f6c7 /m4/macros/with_addon.m4
parente66b16bf080ead1c51f321eaf56710c771778706 (diff)
downloadsrc-ca57057f598bfc7119f79f71bf38ec88244ab396.tar.gz
src-ca57057f598bfc7119f79f71bf38ec88244ab396.zip
Import am-utils 6.2,vendor/amd/6.2vendor/amd
Suggested by: pfg@ Obtained from: ftp://ftp.am-utils.org/pub/am-utils/
Notes
Notes: svn path=/vendor/amd/dist/; revision=305100 svn path=/vendor/amd/6.2/; revision=305101; tag=vendor/amd/6.2
Diffstat (limited to 'm4/macros/with_addon.m4')
-rw-r--r--m4/macros/with_addon.m426
1 files changed, 26 insertions, 0 deletions
diff --git a/m4/macros/with_addon.m4 b/m4/macros/with_addon.m4
new file mode 100644
index 000000000000..b061621cf173
--- /dev/null
+++ b/m4/macros/with_addon.m4
@@ -0,0 +1,26 @@
+dnl ######################################################################
+dnl Do we want to compile with "ADDON" support? (hesiod, ldap, etc.)
+AC_DEFUN([AMU_WITH_ADDON],
+[AC_MSG_CHECKING([if $1 is wanted])
+ac_upcase=`echo $1|tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+AC_ARG_WITH($1,
+ AC_HELP_STRING([--with-$1],
+ [enable $2 support (default=yes if found)]
+),[
+if test "$withval" = "yes"; then
+ with_$1=yes
+elif test "$withval" = "no"; then
+ with_$1=no
+else
+ AC_MSG_ERROR(please use \"yes\" or \"no\" with --with-$1)
+fi
+],[
+with_$1=yes
+])
+if test "$with_$1" = "yes"
+then
+ AC_MSG_RESULT([yes, will enable if all libraries are found])
+else
+ AC_MSG_RESULT([no])
+fi
+])