[svn-commits] seanbright: trunk r146407 - /trunk/build_tools/make_buildopts_h

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sat Oct 4 20:59:14 CDT 2008


Author: seanbright
Date: Sat Oct  4 20:59:14 2008
New Revision: 146407

URL: http://svn.digium.com/view/asterisk?view=rev&rev=146407
Log:
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... :)

Modified:
    trunk/build_tools/make_buildopts_h

Modified: trunk/build_tools/make_buildopts_h
URL: http://svn.digium.com/view/asterisk/trunk/build_tools/make_buildopts_h?view=diff&rev=146407&r1=146406&r2=146407
==============================================================================
--- trunk/build_tools/make_buildopts_h (original)
+++ trunk/build_tools/make_buildopts_h Sat Oct  4 20:59:14 2008
@@ -26,19 +26,13 @@
 	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}\""




More information about the svn-commits mailing list