summaryrefslogtreecommitdiffstats
path: root/configure.in.in
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2019-09-08 15:58:38 +0200
committerSlávek Banko <slavek.banko@axis.cz>2019-09-08 15:58:38 +0200
commit1826deeba173952f9b078266c6b6be03d4f94789 (patch)
tree7fec975903f0777cf094d49796a47231eabdb3d0 /configure.in.in
parent94a3d972a5aa509e68f658346caddf8e212a0f2b (diff)
downloadktechlab-1826deeba173952f9b078266c6b6be03d4f94789.tar.gz
ktechlab-1826deeba173952f9b078266c6b6be03d4f94789.zip
Fix FTBFS with gpsim >= 0.31
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'configure.in.in')
-rw-r--r--configure.in.in32
1 files changed, 26 insertions, 6 deletions
diff --git a/configure.in.in b/configure.in.in
index e1fdd88..664976a 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -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 ##