]> granicus.if.org Git - mutt/commitdiff
Use autoconf instead of "which" to discover MD5 tool
authorBrendan Cully <brendan@kublai.com>
Mon, 28 May 2007 23:44:20 +0000 (16:44 -0700)
committerBrendan Cully <brendan@kublai.com>
Mon, 28 May 2007 23:44:20 +0000 (16:44 -0700)
ChangeLog
Makefile.am
configure.ac
hcachever.sh.in [moved from hcachever.sh with 92% similarity]

index aeea96cdff8ca16f4f8542c23f15403ddf46330a..9e4e5d9c53dc5edfd894b1aeb97d333592dbb027 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
 
 2007-04-05 13:06 -0700  Jukka Salmi  <j+mutt@2007.salmi.ch>  (3638701db407)
 
-       * ChangeLog, configure.ac: Check for BDB4 libs in $lib as well as
+       * configure.ac: Check for BDB4 libs in $lib as well as
        $lib/$ver (fixes pkgsrc BDB4 detection)
 
 2007-04-05 12:55 -0700  Brendan Cully  <brendan@kublai.com>  (4f435337507e)
index e97073645e5f2221ab127d0d32ba2f99cf7f3ed2..1f3662978d81d7e5d1e455f29336c8aef0bcce55 100644 (file)
@@ -78,7 +78,7 @@ EXTRA_DIST = COPYRIGHT GPL OPS OPS.PGP OPS.CRYPT OPS.SMIME TODO UPDATING \
        makedoc.c makedoc-defs.h stamp-doc-rc README.SSL smime.h \
        muttbug pgppacket.h depcomp ascii.h BEWARE PATCHES patchlist.sh \
        ChangeLog ChangeLog.old mkchangelog.sh cvslog2changelog.pl mutt_idna.h \
-       snprintf.c regex.c crypt-gpgme.h hcachever.sh
+       snprintf.c regex.c crypt-gpgme.h hcachever.sh.in
 
 EXTRA_SCRIPTS = smime_keys
 
@@ -128,7 +128,7 @@ reldate.h: $(srcdir)/ChangeLog
 
 hcversion.h: $(srcdir)/mutt.h $(srcdir)/rfc822.h
        ( echo '#include "config.h"'; echo '#include "mutt.h"'; ) \
-       | $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) - | $(srcdir)/hcachever.sh hcversion.h
+       | $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) - | sh ./hcachever.sh hcversion.h
 
 patchlist.c: $(srcdir)/PATCHES $(srcdir)/patchlist.sh
        $(srcdir)/patchlist.sh < $(srcdir)/PATCHES > patchlist.c
index dd2bc7488968efcbeaec634cf0e8539edf573df9..af87f2de5b3ab6672cd87912e95631389560cfb5 100644 (file)
@@ -813,6 +813,9 @@ AC_ARG_ENABLE(hcache, AC_HELP_STRING([--enable-hcache], [Enable header caching])
 
     need_md5="yes"
 
+    dnl hcachever.sh tool for calculating struct digest
+    AC_CHECK_PROGS([MD5], [md5 md5sum openssl], [none])
+
     use_qdbm=no
     AC_ARG_WITH(qdbm, AC_HELP_STRING([--without-qdbm], [Don't use qdbm even if it is available]))
     if test "$with_qdbm" != "no"
@@ -1186,8 +1189,6 @@ then
 fi
 AC_SUBST(DSLROOT)
 
-AC_OUTPUT(Makefile intl/Makefile m4/Makefile
-        po/Makefile.in doc/Makefile contrib/Makefile
-        muttbug.sh
-        imap/Makefile
-        doc/instdoc.sh)
+AC_OUTPUT(Makefile contrib/Makefile doc/Makefile imap/Makefile
+        intl/Makefile m4/Makefile po/Makefile.in
+        hcachever.sh muttbug.sh doc/instdoc.sh)
similarity index 92%
rename from hcachever.sh
rename to hcachever.sh.in
index e350e1978dbbbd818f08a526b1fb8bf9dae37115..41ade134033719579bba95d46b5b07e6cbd2e688 100755 (executable)
@@ -2,16 +2,12 @@
 
 BASEVERSION=1
 
-if test -x "`which md5`"
-then
-  MD5=md5
-elif test -x "`which md5sum`"
-then
-  MD5=md5sum
-elif test -x "`which openssl`"
+MD5=@MD5@
+if test "$MD5" = "openssl"
 then
   MD5="openssl md5 -hex"
-else
+elif test "$MD5" = "none"
+then
   echo "ERROR: no MD5 tool found"
   exit 1
 fi