Skip to content

Commit b571f84

Browse files
marvuwehermann
authored andcommitted
build: Replace AX_CXX_COMPILE_STDCXX_11 with latest AX_CXX_COMPILE_STDCXX
The former appended the necessary switch to enable C++11 to the CXXFLAGS whereas AX_CXX_COMPILE_STDCXX appends it to CXX which has the benefit that all C++ sources are compiled using the same C++ standard. Therefore it is no longer necessary to manually hardcode '-std=c++11' anywhere like we did in the Ruby bindings linker command and assures that the compilation of them is done with C++11 support as well. This fixes bug #795
1 parent c4a1015 commit b571f84

4 files changed

+564
-144
lines changed

Makefile.am

+1-1
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ $(ROBJ): $(RWRAP) \
705705
$(AM_V_CXX)$(CXX) $(RBSIGROK_CFLAGS) -I. -Iinclude -Ibindings/cxx/include $(local_includes) -fPIC -o $@ -c $<
706706

707707
$(REXT): $(ROBJ) @ORDER@ bindings/cxx/libsigrokcxx.la
708-
$(AM_V_CXXLD)$(CXX) -shared -std=c++11 -o $@ $< -lsigrokcxx -Lbindings/cxx/.libs $(RBSIGROK_LIBS)
708+
$(AM_V_CXXLD)$(CXX) -shared -o $@ $< -lsigrokcxx -Lbindings/cxx/.libs $(RBSIGROK_LIBS)
709709

710710
ruby-build: $(REXT)
711711

configure.ac

+1-1
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ AC_ARG_ENABLE([java],
303303
sr_cxx_missing=
304304

305305
# Check if the C++ compiler supports the C++11 standard.
306-
AX_CXX_COMPILE_STDCXX_11([noext], [optional])
306+
AX_CXX_COMPILE_STDCXX([11], [noext], [optional])
307307
AS_IF([test "x$HAVE_CXX11" != x1],
308308
[SR_APPEND([sr_cxx_missing], [', '], ['C++11'])])
309309

0 commit comments

Comments
 (0)