aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorseanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-19 00:38:23 +0000
committerseanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-19 00:38:23 +0000
commita71d87991e8816f88cde60bd988ada6fbb0c1c9f (patch)
tree62df6fa1cabbbd380a33f29d0fe4a5825242e37c
parent516df7b8c18fd2be00a8cb47e80b9f74c301ab70 (diff)
Merged revisions 157600 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r157600 | seanbright | 2008-11-18 19:27:45 -0500 (Tue, 18 Nov 2008) | 10 lines Fix a few build problems on Solaris (and check for an md5 utility in configure instead of the icky loop I was doing before). (closes issue #13842) Reported by: snuffy Patches: bug13842_20081106.diff uploaded by snuffy (license 35) 13842.diff uploaded by seanbright (license 71) Tested by: snuffy ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@157602 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--Makefile1
-rwxr-xr-xbuild_tools/make_buildopts_h12
-rwxr-xr-xbuild_tools/make_version4
-rwxr-xr-xconfigure69
-rw-r--r--configure.ac6
-rw-r--r--makeopts.in1
6 files changed, 68 insertions, 25 deletions
diff --git a/Makefile b/Makefile
index c7308685c..14406f72b 100644
--- a/Makefile
+++ b/Makefile
@@ -92,6 +92,7 @@ export DOWNLOAD
export AWK
export GREP
export ID
+export MD5
# even though we could use '-include makeopts' here, use a wildcard
# lookup anyway, so that make won't try to build makeopts if it doesn't
diff --git a/build_tools/make_buildopts_h b/build_tools/make_buildopts_h
index 8409f805f..5159688af 100755
--- a/build_tools/make_buildopts_h
+++ b/build_tools/make_buildopts_h
@@ -27,17 +27,7 @@ then
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
+BUILDSUM=`echo ${TMP} | ${MD5} | cut -c1-32`
echo "#define AST_BUILDOPT_SUM \"${BUILDSUM}\""
diff --git a/build_tools/make_version b/build_tools/make_version
index 73e9864fa..67231ff0c 100755
--- a/build_tools/make_version
+++ b/build_tools/make_version
@@ -30,7 +30,7 @@ elif [ -d .svn ]; then
fi
if [ ${BRANCH} != 0 ] ; then
- if [ -z ${RESULT} ] ; then
+ if [ -z "${RESULT}" ] ; then
RESULT="${PART}"
else
RESULT="${RESULT}-${PART}"
@@ -39,7 +39,7 @@ elif [ -d .svn ]; then
fi
if [ ${TEAM} != 0 ] ; then
- if [ -z ${RESULT} ] ; then
+ if [ -z "${RESULT}" ] ; then
RESULT="${PART}"
else
RESULT="${RESULT}-${PART}"
diff --git a/configure b/configure
index 0b7f07df4..fd4792a85 100755
--- a/configure
+++ b/configure
@@ -715,6 +715,7 @@ KPATHSEA
FETCH
DOWNLOAD
SOXMIX
+MD5
acx_pthread_config
PTHREAD_CC
PTHREAD_LIBS
@@ -7443,6 +7444,53 @@ _ACEOF
fi
+for ac_prog in md5 md5sum gmd5sum digest
+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_MD5+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$MD5"; then
+ ac_cv_prog_MD5="$MD5" # 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_MD5="$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
+MD5=$ac_cv_prog_MD5
+if test -n "$MD5"; then
+ { echo "$as_me:$LINENO: result: $MD5" >&5
+echo "${ECHO_T}$MD5" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ test -n "$MD5" && break
+done
+
+
+if test "${MD5}" = "digest" ; then
+ MD5="${MD5} -a md5"
+fi
+
@@ -12905,13 +12953,11 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <sys/types.h> /* for off_t */
- #include <stdio.h>
+#include <stdio.h>
int
main ()
{
-int (*fp) (FILE *, off_t, int) = fseeko;
- return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
+return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
;
return 0;
}
@@ -12951,13 +12997,11 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#define _LARGEFILE_SOURCE 1
-#include <sys/types.h> /* for off_t */
- #include <stdio.h>
+#include <stdio.h>
int
main ()
{
-int (*fp) (FILE *, off_t, int) = fseeko;
- return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
+return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
;
return 0;
}
@@ -50632,7 +50676,7 @@ KPATHSEA!$KPATHSEA$ac_delim
FETCH!$FETCH$ac_delim
DOWNLOAD!$DOWNLOAD$ac_delim
SOXMIX!$SOXMIX$ac_delim
-acx_pthread_config!$acx_pthread_config$ac_delim
+MD5!$MD5$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -50674,6 +50718,7 @@ _ACEOF
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
cat >conf$$subs.sed <<_ACEOF
+acx_pthread_config!$acx_pthread_config$ac_delim
PTHREAD_CC!$PTHREAD_CC$ac_delim
PTHREAD_LIBS!$PTHREAD_LIBS$ac_delim
PTHREAD_CFLAGS!$PTHREAD_CFLAGS$ac_delim
@@ -50770,7 +50815,6 @@ NBS_LIB!$NBS_LIB$ac_delim
NBS_INCLUDE!$NBS_INCLUDE$ac_delim
NBS_DIR!$NBS_DIR$ac_delim
PBX_NBS!$PBX_NBS$ac_delim
-NCURSES_LIB!$NCURSES_LIB$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -50812,6 +50856,7 @@ _ACEOF
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
cat >conf$$subs.sed <<_ACEOF
+NCURSES_LIB!$NCURSES_LIB$ac_delim
NCURSES_INCLUDE!$NCURSES_INCLUDE$ac_delim
NCURSES_DIR!$NCURSES_DIR$ac_delim
PBX_NCURSES!$PBX_NCURSES$ac_delim
@@ -50908,7 +50953,6 @@ SQLITE3_INCLUDE!$SQLITE3_INCLUDE$ac_delim
SQLITE3_DIR!$SQLITE3_DIR$ac_delim
PBX_SQLITE3!$PBX_SQLITE3$ac_delim
SUPPSERV_LIB!$SUPPSERV_LIB$ac_delim
-SUPPSERV_INCLUDE!$SUPPSERV_INCLUDE$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -50950,6 +50994,7 @@ _ACEOF
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
cat >conf$$subs.sed <<_ACEOF
+SUPPSERV_INCLUDE!$SUPPSERV_INCLUDE$ac_delim
SUPPSERV_DIR!$SUPPSERV_DIR$ac_delim
PBX_SUPPSERV!$PBX_SUPPSERV$ac_delim
OPENSSL_LIB!$OPENSSL_LIB$ac_delim
@@ -51035,7 +51080,7 @@ CURL_CONFIG!$CURL_CONFIG$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 83; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 84; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
diff --git a/configure.ac b/configure.ac
index fc4f0b7a5..f2526987e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -177,6 +177,12 @@ if test "${SOXMIX}" != ":" ; then
AC_DEFINE([HAVE_SOXMIX], 1, [Define to 1 if your system has soxmix application.])
fi
+AC_CHECK_PROGS([MD5], [md5 md5sum gmd5sum digest])
+
+if test "${MD5}" = "digest" ; then
+ MD5="${MD5} -a md5"
+fi
+
ACX_PTHREAD
AC_LANG(C)
diff --git a/makeopts.in b/makeopts.in
index 57d7fedac..025ade757 100644
--- a/makeopts.in
+++ b/makeopts.in
@@ -24,6 +24,7 @@ FETCH=@FETCH@
DOWNLOAD=@DOWNLOAD@
RUBBER=@RUBBER@
KPATHSEA=@KPATHSEA@
+MD5=@MD5@
BUILD_PLATFORM=@BUILD_PLATFORM@
BUILD_CPU=@BUILD_CPU@