Permalink
Browse files

Export the presence of md5 or md5sum during the configure phase

  • Loading branch information...
1 parent 1710a23 commit cd5dc8faf6165184f0f1565572c6a9d8eea479eb @samoht committed Mar 27, 2013
Showing with 50 additions and 1 deletion.
  1. +1 −0 Makefile.config.in
  2. +47 −1 configure
  3. +2 −0 configure.ac
View
@@ -3,3 +3,4 @@ prefix=@prefix@
mandir=@mandir@
version=@PACKAGE_VERSION@
FETCH=@fetch@
+MD5SUM=@MD5SUM@
View
@@ -644,6 +644,7 @@ CAMLP4PROF
CAMLP4R
CAMLP4RF
AWK
+MD5SUM
FETCH
fetch
LIBOBJS
@@ -4542,6 +4543,50 @@ if test "x${enable_certificate-check}" = "xno"; then
fi
+for ac_prog in md5sum md5
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_MD5SUM+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$MD5SUM"; then
+ ac_cv_prog_MD5SUM="$MD5SUM" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_MD5SUM="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+MD5SUM=$ac_cv_prog_MD5SUM
+if test -n "$MD5SUM"; then
+ { echo "$as_me:$LINENO: result: $MD5SUM" >&5
+echo "${ECHO_T}$MD5SUM" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ test -n "$MD5SUM" && break
+done
+test -n "$MD5SUM" || MD5SUM="no"
+
+
for ac_prog in curl wget
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -5295,13 +5340,14 @@ CAMLP4PROF!$CAMLP4PROF$ac_delim
CAMLP4R!$CAMLP4R$ac_delim
CAMLP4RF!$CAMLP4RF$ac_delim
AWK!$AWK$ac_delim
+MD5SUM!$MD5SUM$ac_delim
FETCH!$FETCH$ac_delim
fetch!$fetch$ac_delim
LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 70; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 71; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
View
@@ -35,6 +35,8 @@ AS_IF([test "x${enable_certificate-check}" = "xno"], [
wget_certificate_check=--no-check-certificate
])
+AC_CHECK_PROGS(MD5SUM,[md5sum md5],no)
+
AC_CHECK_PROGS(FETCH,[curl wget],no)
if test x"$FETCH" = x"curl" ; then

0 comments on commit cd5dc8f

Please sign in to comment.