From: Sean Bright Date: Sun, 5 Oct 2008 01:59:14 +0000 (+0000) Subject: This is far from optimal, but I just found a FreeBSD system without X-Git-Tag: 1.6.2.0-beta1~1205 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6ecbf7cc7c8f360b7bd7c6b67f6d1d0d77f0c8dd;p=thirdparty%2Fasterisk.git This is far from optimal, but I just found a FreeBSD system without md5 installed on it. So look around for all of the different binaries that we could possibly use. I'd wager this gets completely replaced by someone else in less than 24 hours... :) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@146407 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/build_tools/make_buildopts_h b/build_tools/make_buildopts_h index 8409f805f7..93be6da7e8 100755 --- a/build_tools/make_buildopts_h +++ b/build_tools/make_buildopts_h @@ -26,19 +26,13 @@ then echo "#define AST_DEVMODE 1" TMP="${TMP} AST_DEVMODE" fi - -case ${OSARCH} in # actually we should check build_os -*BSD|mingw|darwin*) - BUILDSUM=`echo ${TMP} | md5 | cut -c1-32` - ;; -SunOS) - BUILDSUM=`echo ${TMP} | digest -a md5 | cut -c1-32` - ;; -*) - BUILDSUM=`echo ${TMP} | md5sum | cut -c1-32` - ;; -esac +for x in md5 digest md5sum gmd5sum; do + BUILDSUM=`echo ${TMP} | $x 2> /dev/null` + if [ $? = 0 ]; then + BUILDSUM=`echo ${BUILDSUM} | cut -c1-32` + break; + fi +done echo "#define AST_BUILDOPT_SUM \"${BUILDSUM}\"" - echo "#define AST_BUILDOPTS \"${BUILDOPTS}\""