File tree 3 files changed +15
-2
lines changed
3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -135,6 +135,17 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
135
135
[ AC_MSG_RESULT ( [ no] ) ] )
136
136
CXXFLAGS="$SAVED_FLAGS"
137
137
138
+ AC_SUBST ( NO_CAST_FUNCTION_TYPE )
139
+
140
+ SAVED_FLAGS="$CXXFLAGS"
141
+ CXXFLAGS="-Wno-cast-function-type"
142
+ AC_MSG_CHECKING ( [ whether CXX supports -Wno-cast-function-type] )
143
+ AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ ] ) ] ,
144
+ [ AC_MSG_RESULT ( [ yes] ) ]
145
+ [ AC_SUBST ( [ NO_CAST_FUNCTION_TYPE] , [ "-Wno-cast-function-type"] ) ] ,
146
+ [ AC_MSG_RESULT ( [ no] ) ] )
147
+ CXXFLAGS="$SAVED_FLAGS"
148
+
138
149
AC_SUBST ( CFLAGS_COMMON )
139
150
140
151
AC_OUTPUT (Makefile
Original file line number Diff line number Diff line change @@ -8,7 +8,8 @@ INCLUDE=-I../../SAI/inc -I../../SAI/meta -I../../SAI/experimental -I../../lib/in
8
8
9
9
_pysairedis_la_SOURCES = pysairedis_wrap.cpp $(SOURCES )
10
10
_pysairedis_la_CPPFLAGS = $(INCLUDE ) -I/usr/include/python$(PYTHON_VERSION ) $(AM_CPPFLAGS ) $(CFLAGS_COMMON ) \
11
- -Wno-cast-qual -Wno-shadow -Wno-redundant-decls -Wno-cast-function-type
11
+ -Wno-cast-qual -Wno-shadow -Wno-redundant-decls -Wno-conversion $(NO_CAST_FUNCTION_TYPE )
12
+
12
13
_pysairedis_la_LDFLAGS = -module \
13
14
-lhiredis -lswsscommon -lpthread \
14
15
-L$(top_srcdir ) /lib/src/.libs -lsairedis \
Original file line number Diff line number Diff line change @@ -8,7 +8,8 @@ INCLUDE=-I../../SAI/inc -I../../SAI/meta -I../../SAI/experimental -I../../lib/in
8
8
9
9
_pysairedis_la_SOURCES = pysairedis_wrap.cpp $(SOURCES )
10
10
_pysairedis_la_CPPFLAGS = $(INCLUDE ) -I/usr/include/python$(PYTHON3_VERSION ) $(AM_CPPFLAGS ) $(CFLAGS_COMMON ) \
11
- -Wno-cast-qual -Wno-shadow -Wno-redundant-decls -Wno-cast-function-type
11
+ -Wno-cast-qual -Wno-shadow -Wno-redundant-decls -Wno-conversion $(NO_CAST_FUNCTION_TYPE )
12
+
12
13
_pysairedis_la_LDFLAGS = -module \
13
14
-lhiredis -lswsscommon -lpthread \
14
15
-L$(top_srcdir ) /lib/src/.libs -lsairedis \
You can’t perform that action at this time.
0 commit comments