Fix FTBFS with gpsim >= 0.31

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 1826deeba1)
r14.0.x
Slávek Banko 5 years ago
parent cd27bd279a
commit 59a35651d0
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -12,6 +12,9 @@
/* Gpsim 0.27.0 was found */
#undef GPSIM_0_27_0
/* Gpsim 0.31.0 was found */
#undef GPSIM_0_31_0
/* Define to 1 if you have the <Carbon/Carbon.h> header file. */
#undef HAVE_CARBON_CARBON_H

@ -7,9 +7,9 @@ AC_C_BIGENDIAN
AC_CHECK_KDEMAXPATHLEN
################################
## BEGIN Check for gpsim 0.21 ##
################################
###################################
## BEGIN Check for gpsim version ##
###################################
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
@ -80,12 +80,27 @@ void func() { pic_processor *Processor; sizeof(Processor->Wreg); }
AC_MSG_RESULT( no )
)
CXXFLAGS="$glib_cflags $ktechlab_save_CXXFLAGS"
AC_MSG_CHECKING([if gpsim requires C++11])
AC_TRY_COMPILE(
[
#include <gpsim/gpsim_object.h>
void func() { gpsimObject *gpsimObj; sizeof(gpsimObj); }
],
[],
AC_MSG_RESULT( no ),
have_gpsim_0_31_0=yes
GPSIM_CXXFLAGS="-std=c++11"
AC_MSG_RESULT( yes )
)
CXXFLAGS="$ktechlab_save_CXXFLAGS"
AC_LANG_RESTORE
##############################
## END Check for gpsim 0.21 ##
##############################
#################################
## END Check for gpsim version ##
#################################
@ -152,7 +167,12 @@ if test x$have_gpsim_0_27_0 == xyes; then
AC_DEFINE([GPSIM_0_27_0],[],[Gpsim 0.27.0 was found])
fi
if test x$have_gpsim_0_31_0 == xyes; then
AC_DEFINE([GPSIM_0_31_0],[],[Gpsim 0.31.0 was found])
fi
AC_SUBST(LIB_GPSIM)
AC_SUBST(GPSIM_CXXFLAGS)
##############################
## END DO_NOT_COMPILE CHECK ##

@ -1,3 +1,5 @@
CXXFLAGS += $(GPSIM_CXXFLAGS)
INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/electronics \
-I$(top_srcdir)/src/electronics/components -I$(top_srcdir)/src/electronics/simulation \
-I$(top_srcdir)/src/flowparts -I$(top_srcdir)/src/gui -I$(top_srcdir)/src/languages \

@ -1,3 +1,5 @@
CXXFLAGS += $(GPSIM_CXXFLAGS)
INCLUDES = -I$(top_srcdir)/src \
-I$(top_srcdir)/src/electronics -I$(top_srcdir)/src/electronics/components \
-I$(top_srcdir)/src/electronics/simulation -I$(top_srcdir)/src/gui -I$(top_srcdir)/src/languages \

Loading…
Cancel
Save