From 9c663383ab54e0290781ac1c25d790ce03160e08 Mon Sep 17 00:00:00 2001 From: David Levine Date: Sun, 8 Dec 2013 19:02:28 -0600 Subject: [PATCH] Removed dependence of build_nmh on ldd by adding sasl and tls components to mhparam(1). --- docs/contrib/build_nmh | 17 +++++++---------- uip/mhparam.c | 16 ++++++++++++++++ 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/docs/contrib/build_nmh b/docs/contrib/build_nmh index adc6e1cb..2aa196ec 100755 --- a/docs/contrib/build_nmh +++ b/docs/contrib/build_nmh @@ -41,11 +41,6 @@ # rpm-build, with -r -#### -#### OS-specific setup. -#### -ldd=ldd - #### #### Interpret command arguments. #### @@ -149,12 +144,14 @@ if install-mh -check >/dev/null 2>&1; then fi fi - if $ldd "`$mhbin/mhparam libdir`/post" | grep sasl >/dev/null; then - config_sasl=y - fi + if test -x "$mhbin/mhparam"; then + case `$mhbin/mhparam sasl` in + *sasl*) config_sasl=y ;; + esac - if $ldd "`$mhbin/mhparam libdir`/post" | grep ssl >/dev/null; then - config_tls=y + case `$mhbin/mhparam tls` in + *tls*) config_tls=y ;; + esac fi fi diff --git a/uip/mhparam.c b/uip/mhparam.c index a1ca28f7..9da7ba13 100644 --- a/uip/mhparam.c +++ b/uip/mhparam.c @@ -47,6 +47,20 @@ char *lockmethod = #endif ; +char *sasl = +#ifdef CYRUS_SASL + "cyrus_sasl"; +#else + ""; +#endif + +char *tls = +#ifdef TLS_SUPPORT + "tls"; +#else + ""; +#endif + struct proc { char *p_name; char **p_field; @@ -80,6 +94,8 @@ static struct proc procs [] = { { "libdir", &mhlibdir }, { "sbackup", &sbackup }, { "lockmethod", &lockmethod }, + { "sasl", &sasl }, + { "tls", &tls }, { NULL, NULL }, }; -- 2.56.0