From c010f62d6645606edb5efc96c400a337ab360455 Mon Sep 17 00:00:00 2001 From: Martin Koegler Date: Tue, 22 Apr 2008 07:59:42 +0200 Subject: [PATCH] Support build without libstdc++ Signed-off-by: Martin Koegler --- common/Makefile.am | 2 +- common/types.h | 5 +++++ configure.in | 12 ++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/common/Makefile.am b/common/Makefile.am index 3ed6a30..3e1abd4 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -1,4 +1,4 @@ -noinst_HEADERS=array.h my_strings.h types.h stack.h +noinst_HEADERS=array.h my_strings.h types.h stack.h libstdc.h noinst_LIBRARIES=libcommon.a libcommon_a_SOURCES=loadctl.h image.cpp image.h loadimage.h loadimage.cpp diff --git a/common/types.h b/common/types.h index 280e7df..185eb55 100644 --- a/common/types.h +++ b/common/types.h @@ -21,6 +21,7 @@ #define TYPES_H #include +#include "config.h" #include "my_strings.h" #include "array.h" @@ -36,4 +37,8 @@ typedef uint16_t eibaddr_t; /** EIB key */ typedef uint32_t eibkey_type; +#ifdef USE_NOLIBSTDC +#include "libstdc.h" +#endif + #endif diff --git a/configure.in b/configure.in index 127eec7..3d58e23 100644 --- a/configure.in +++ b/configure.in @@ -241,6 +241,18 @@ if test x$enablejava = xtrue ; then fi +AC_ARG_WITH(libstdc, +[ --without-libstdc don't use function from libstdc++], +[case "${withval}" in + yes) use_libstdc=true ;; + no) use_libstdc=false ;; + *) AC_MSG_ERROR(bad value ${withval} for --with-libstdc) ;; + esac],[use_libstdc=true]) +if test x$use_libstdc = xfalse ; then + AC_DEFINE(USE_NOLIBSTDC, 1 , [don't use libstdc++]) + CXX=$CC +fi + AM_CONDITIONAL(BUILD_JAVA, test x$enablejava = xtrue ) AC_CHECK_MEMBER([struct sockaddr_in.sin_len],[AC_DEFINE(HAVE_SOCKADDR_IN_LEN,1,[Do we have sockaddr_in.sin_len?])],[], -- 2.11.4.GIT