]> diplodocus.org Git - nmh/commitdiff
Removed dependence of build_nmh on ldd by adding sasl and tls
authorDavid Levine <levinedl@acm.org>
Mon, 9 Dec 2013 01:02:28 +0000 (19:02 -0600)
committerDavid Levine <levinedl@acm.org>
Mon, 9 Dec 2013 01:02:28 +0000 (19:02 -0600)
components to mhparam(1).

docs/contrib/build_nmh
uip/mhparam.c

index adc6e1c..2aa196e 100755 (executable)
 #   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
 
index a1ca28f..9da7ba1 100644 (file)
@@ -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 },
 };