aboutsummaryrefslogtreecommitdiffstats
path: root/build_tools
diff options
context:
space:
mode:
authorseanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b>2008-10-05 01:59:14 +0000
committerseanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b>2008-10-05 01:59:14 +0000
commit842cb2a3a4375c52259af6486947d76077a8d84e (patch)
tree37487d609cefec560a4dde1e29c1c2870d916c2b /build_tools
parent7cc3a7c2b914043881a1fa2c40dc43d3b6fbe5d5 (diff)
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: http://svn.digium.com/svn/asterisk/trunk@146407 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'build_tools')
-rwxr-xr-xbuild_tools/make_buildopts_h20
1 files changed, 7 insertions, 13 deletions
diff --git a/build_tools/make_buildopts_h b/build_tools/make_buildopts_h
index 8409f805f..93be6da7e 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}\""