[Opalvoip-svn] SF.net SVN: opalvoip:[34634] ptlib/trunk
Brought to you by:
csoutheren,
rjongbloed
From: <rjo...@us...> - 2016-02-18 12:23:14
|
Revision: 34634 http://sourceforge.net/p/opalvoip/code/34634 Author: rjongbloed Date: 2016-02-18 12:23:12 +0000 (Thu, 18 Feb 2016) Log Message: ----------- Added wxWidgets build flags, if enabled with make variable. Modified Paths: -------------- ptlib/trunk/configure ptlib/trunk/make/my_macros.m4 ptlib/trunk/make/pre.mak Modified: ptlib/trunk/configure =================================================================== --- ptlib/trunk/configure 2016-02-18 11:21:56 UTC (rev 34633) +++ ptlib/trunk/configure 2016-02-18 12:23:12 UTC (rev 34634) @@ -6676,6 +6676,40 @@ + + oldCPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -Werror -Wno-potentially-evaluated-expression" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Disable potentially evaluated expression warning (-Wno-potentially-evaluated-expression)" >&5 +$as_echo_n "checking Disable potentially evaluated expression warning (-Wno-potentially-evaluated-expression)... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + usable=yes +else + usable=no + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $usable" >&5 +$as_echo "$usable" >&6; } + CPPFLAGS="$oldCPPFLAGS" + + if test "x$usable" = "xyes"; then : + CXXFLAGS="$CXXFLAGS -Wno-potentially-evaluated-expression" + +fi + + + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' Modified: ptlib/trunk/make/my_macros.m4 =================================================================== --- ptlib/trunk/make/my_macros.m4 2016-02-18 11:21:56 UTC (rev 34633) +++ ptlib/trunk/make/my_macros.m4 2016-02-18 12:23:12 UTC (rev 34634) @@ -717,6 +717,14 @@ [CXXFLAGS="$CXXFLAGS -Wno-deprecated-declarations"] ) +MY_COMPILE_IFELSE( + [Disable potentially evaluated expression warning (-Wno-potentially-evaluated-expression)], + [-Werror -Wno-potentially-evaluated-expression], + [], + [], + [CXXFLAGS="$CXXFLAGS -Wno-potentially-evaluated-expression"] +) + AC_LANG_POP(C++) MY_COMPILE_IFELSE( Modified: ptlib/trunk/make/pre.mak =================================================================== --- ptlib/trunk/make/pre.mak 2016-02-18 11:21:56 UTC (rev 34633) +++ ptlib/trunk/make/pre.mak 2016-02-18 12:23:12 UTC (rev 34634) @@ -103,6 +103,47 @@ ############################################################################### + +ifeq ($(USING_WX_WIDGETS),yes) + + WX_CONFIG := $(firstword $(wildcard $(addsuffix /wx-config,$(subst :, ,$(PATH):/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/bin)))) + ifneq (,$(WX_CONFIG)) + WXRC := $(dir $(WX_CONFIG))/wxrc + else + WX_CONFIG := $(firstword $(wildcard $(addsuffix /wxgtk2u-2.8-config,$(subst :, ,$(PATH))))) + ifneq (,$(WX_CONFIG)) + WXRC := $(dir $(WX_CONFIG))/wxrc-gtk2u-2.8 + else + WX_CONFIG := wx-config-3.0 + ifneq (,$(shell which $(WX_CONFIG) 2>&1)) + WXRC := wxrc-3.0 + else + WX_CONFIG := wx-config + ifneq (,$(shell which $(WX_CONFIG) 2>&1)) + WXRC := wxrc + else + $(error Could not find wx-config) + endif + endif + endif + endif + + ifeq ($(DEBUG_BUILD),yes) + ifneq (,$(shell $(WX_CONFIG) --list | grep debug)) + WX_CONFIG += --debug=$(DEBUG_BUILD) + else + CPPFLAGS += -DOPAL_WX_DEBUG_HACK + endif + endif + + CPPFLAGS += $(shell $(WX_CONFIG) --cppflags) + CXXFLAGS += $(shell $(WX_CONFIG) --cxxflags) + CFLAGS += $(shell $(WX_CONFIG) --cflags) + LDFLAGS += $(shell $(WX_CONFIG) --libs) +endif + + +############################################################################### # # Determine the library name # This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |