[asterisk-commits] branch russell/mudflap r37696 - in
/team/russell/mudflap: ./ build_tools/
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sat Jul 15 16:57:51 MST 2006
Author: russell
Date: Sat Jul 15 18:57:51 2006
New Revision: 37696
URL: http://svn.digium.com/view/asterisk?rev=37696&view=rev
Log:
merge support for building with libmudflap
Modified:
team/russell/mudflap/Makefile
team/russell/mudflap/build_tools/cflags.xml
team/russell/mudflap/configure
team/russell/mudflap/configure.ac
team/russell/mudflap/makeopts.in
Modified: team/russell/mudflap/Makefile
URL: http://svn.digium.com/view/asterisk/team/russell/mudflap/Makefile?rev=37696&r1=37695&r2=37696&view=diff
==============================================================================
--- team/russell/mudflap/Makefile (original)
+++ team/russell/mudflap/Makefile Sat Jul 15 18:57:51 2006
@@ -226,8 +226,18 @@
ASTCFLAGS+=$(OPTIMIZE)
endif
-ifeq ($(AST_DEVMODE),yes)
- ASTCFLAGS+=-Werror -Wunused
+ifneq ($(AST_DEVMODE)$(findstring DEVELOPER_MODE,$(MENUSELECT_CFLAGS)),)
+ #ASTCFLAGS+=-Werror -Wunused
+ ifneq ($(MUDFLAP_LIB),)
+ ASTCFLAGS+=$(MUDFLAP_CFLAGS)
+ LIBS+=$(MUDFLAP_LIB)
+ else
+ ifeq ($(shell gcc -v 2>&1 | grep 'gcc version' | cut -f3 -d' ' | cut -f1 -d.),4)
+ ifeq ($(shell test $(shell gcc -v 2>&1 | grep 'gcc version' | cut -f3 -d' ' | cut -f2 -d.) -ge 1 && echo 1),1)
+ ASTCFLAGS+=-fstack-protector
+ endif
+ endif
+ endif
endif
ASTOBJ=-o asterisk
@@ -501,8 +511,8 @@
fi
@rm -f include/asterisk/build.h.tmp
@$(CC) -c -o buildinfo.o $(CFLAGS) buildinfo.c
- @echo " [LD] $(OBJS) buildinfo.o $(LIBEDIT) db1-ast/libdb1.1 $(AST_LIBS) -> $@"
- @$(CC) $(DEBUG) $(ASTOBJ) $(ASTLINK) $(OBJS) buildinfo.o $(LIBEDIT) db1-ast/libdb1.a $(AST_LIBS)
+ @echo " [LD] $(OBJS) buildinfo.o $(LIBEDIT) db1-ast/libdb1.1 $(AST_LIBS) $(LIBS) -> $@"
+ @$(CC) $(DEBUG) $(ASTOBJ) $(ASTLINK) $(OBJS) buildinfo.o $(LIBEDIT) db1-ast/libdb1.a $(AST_LIBS) $(LIBS)
muted: muted.o
muted: LIBS+=$(AUDIO_LIBS)
Modified: team/russell/mudflap/build_tools/cflags.xml
URL: http://svn.digium.com/view/asterisk/team/russell/mudflap/build_tools/cflags.xml?rev=37696&r1=37695&r2=37696&view=diff
==============================================================================
--- team/russell/mudflap/build_tools/cflags.xml (original)
+++ team/russell/mudflap/build_tools/cflags.xml Sat Jul 15 18:57:51 2006
@@ -6,6 +6,8 @@
<member name="DEBUG_THREADS" displayname="Enable Thread Debugging">
</member>
<member name="DETECT_DEADLOCKS" displayname="Detect Deadlocks">
+ </member>
+ <member name="DEVELOPER_MODE" displayname="Enable Features for Developers">
</member>
<member name="DONT_OPTIMIZE" displayname="Disable Optimizations from the Compiler">
</member>
Modified: team/russell/mudflap/configure
URL: http://svn.digium.com/view/asterisk/team/russell/mudflap/configure?rev=37696&r1=37695&r2=37696&view=diff
==============================================================================
--- team/russell/mudflap/configure (original)
+++ team/russell/mudflap/configure Sat Jul 15 18:57:51 2006
@@ -787,6 +787,8 @@
EGREP
LIBOBJS
POW_LIB
+MUDFLAP_LIB
+MUDFLAP_CFLAGS
KDEINIT
KDEDIR
NETSNMP_CONFIG
@@ -14949,6 +14951,82 @@
cat >>confdefs.h <<_ACEOF
#define SIZEOF_INT $ac_cv_sizeof_int
_ACEOF
+
+
+
+MUDFLAP_LIB=
+MUDFLAP_CFLAGS=
+OLD_CFLAGS=$CFLAGS
+OLD_LIBS=$LIBS
+CFLAGS=-fmudflap
+LIBS=-lmudflap
+echo -n "checking for compiler support for mudflap... "
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+MUDFLAP_LIB=-lmudflap
+MUDFLAP_CFLAGS=-fmudflap
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+CFLAGS=$OLD_CFLAGS
+LIBS=$OLD_LIBS
@@ -28325,6 +28403,8 @@
EGREP!$EGREP$ac_delim
LIBOBJS!$LIBOBJS$ac_delim
POW_LIB!$POW_LIB$ac_delim
+MUDFLAP_LIB!$MUDFLAP_LIB$ac_delim
+MUDFLAP_CFLAGS!$MUDFLAP_CFLAGS$ac_delim
KDEINIT!$KDEINIT$ac_delim
KDEDIR!$KDEDIR$ac_delim
NETSNMP_CONFIG!$NETSNMP_CONFIG$ac_delim
@@ -28332,8 +28412,6 @@
QTMOC!$QTMOC$ac_delim
EDITLINE_LIB!$EDITLINE_LIB$ac_delim
PBX_H323!$PBX_H323$ac_delim
-PBX_IXJUSER!$PBX_IXJUSER$ac_delim
-GTKCONFIG!$GTKCONFIG$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -28375,6 +28453,8 @@
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
cat >conf$$subs.sed <<_ACEOF
+PBX_IXJUSER!$PBX_IXJUSER$ac_delim
+GTKCONFIG!$GTKCONFIG$ac_delim
PBX_GTK!$PBX_GTK$ac_delim
GTK_INCLUDE!$GTK_INCLUDE$ac_delim
GTK_LIB!$GTK_LIB$ac_delim
@@ -28384,7 +28464,7 @@
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 7; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 9; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
Modified: team/russell/mudflap/configure.ac
URL: http://svn.digium.com/view/asterisk/team/russell/mudflap/configure.ac?rev=37696&r1=37695&r2=37696&view=diff
==============================================================================
--- team/russell/mudflap/configure.ac (original)
+++ team/russell/mudflap/configure.ac Sat Jul 15 18:57:51 2006
@@ -291,6 +291,25 @@
AC_CHECK_SIZEOF(int)
+MUDFLAP_LIB=
+MUDFLAP_CFLAGS=
+OLD_CFLAGS=$CFLAGS
+OLD_LIBS=$LIBS
+CFLAGS=-fmudflap
+LIBS=-lmudflap
+echo -n "checking for compiler support for mudflap... "
+AC_LINK_IFELSE(
+AC_LANG_PROGRAM([], []),
+AC_MSG_RESULT(yes)
+MUDFLAP_LIB=-lmudflap
+MUDFLAP_CFLAGS=-fmudflap,
+AC_MSG_RESULT(no)
+)
+CFLAGS=$OLD_CFLAGS
+LIBS=$OLD_LIBS
+AC_SUBST(MUDFLAP_LIB)
+AC_SUBST(MUDFLAP_CFLAGS)
+
# do the package library checks now
AST_EXT_LIB_CHECK([ALSA], [asound], [snd_spcm_init], [alsa/asoundlib.h], [-lm -ldl])
Modified: team/russell/mudflap/makeopts.in
URL: http://svn.digium.com/view/asterisk/team/russell/mudflap/makeopts.in?rev=37696&r1=37695&r2=37696&view=diff
==============================================================================
--- team/russell/mudflap/makeopts.in (original)
+++ team/russell/mudflap/makeopts.in Sat Jul 15 18:57:51 2006
@@ -71,6 +71,9 @@
KDE_INCLUDE=@KDE_INCLUDE@
KDE_LIB=@KDE_LIB@
+MUDFLAP_LIB=@MUDFLAP_LIB@
+MUDFLAP_CFLAGS=@MUDFLAP_CFLAGS@
+
NBS_INCLUDE=@NBS_INCLUDE@
NBS_LIB=@NBS_LIB@
More information about the asterisk-commits
mailing list