Re: cpp branch
- From: Sam Couter <sam topic com au>
- To: orbit-list gnome org,orbitcpp-list <orbitcpp-list lists sourceforge net>
- Subject: Re: cpp branch
- Date: Sat, 5 Jan 2002 17:41:14 +1100
[ Sorry for the reply to my own message ]
Sam Couter <sam@topic.com.au> wrote:
> 1) Conditional compilation of the C++ compiler and ORB. This is pretty
> simple, and just needs tidying up.
Patch is attached.
--
Sam "Eddie" Couter | mailto:sam@topic.com.au | I need a short and
Internet Engineer | jabber:eddiesam@jabber.org | clever comment for
tSA Consulting | http://www.topic.com.au/ | my .signature file
OpenPGP fingerprint: A46B 9BB5 3148 7BEA 1F05 5BD5 8530 03AE DE89 C75C
? conditional_cpp.diff
? srcfile_idl_type.diff
? test/test-mem
Index: acconfig.h
===================================================================
RCS file: /cvs/gnome/ORBit2/acconfig.h,v
retrieving revision 1.5
diff -u -r1.5 acconfig.h
--- acconfig.h 2001/08/30 11:10:56 1.5
+++ acconfig.h 2002/01/05 06:28:03
@@ -11,4 +11,6 @@
/* Define to 'int' if it isn't defined in the header files. */
#undef socklen_t
-#undef ORBIT_PURIFY
+#undef ORBIT_PURIFY
+
+#undef ORBIT_ENABLE_CPP
Index: configure.in
===================================================================
RCS file: /cvs/gnome/ORBit2/configure.in,v
retrieving revision 1.65.2.1
diff -u -r1.65.2.1 configure.in
--- configure.in 2001/12/11 09:39:05 1.65.2.1
+++ configure.in 2002/01/05 06:28:03
@@ -47,10 +47,29 @@
dnl Checks for programs.
AC_PROG_CC
-
-dnl FIXME: we need to have a conditional C++ build here
-AC_PROG_CXX
AC_PROG_INSTALL
+
+dnl conditional C++ build; default to yes
+AC_ARG_ENABLE(cpp,
+ [AC_HELP_STRING([--enable-cpp],
+ [Build the ORB and IDL compiler with C++ support [default=yes].)]],
+ [case "$enableval" in
+ n|no)
+ enable_cpp="no";;
+ *)
+ enable_cpp="yes";;
+ esac],
+ [enable_cpp="yes"])
+AC_MSG_CHECKING(whether to build C++ support)
+if test "$enable_cpp" = "yes"; then
+ AC_MSG_RESULT(yes)
+ AC_PROG_CXX
+ AC_PROG_INSTALL
+ AC_DEFINE(ORBIT_ENABLE_CPP)
+else
+ AC_MSG_RESULT(no)
+fi
+AM_CONDITIONAL(ENABLE_CPP, test "$enable_cpp" = "yes")
dnl --enable-comile-warnings
AC_ARG_ENABLE(compile-warnings, [ --enable-compile-warnings=[no/yes] Turn on compiler warnings.], [enable_compile_warnings="$enableval"],[enable_compile_warnings="yes"])
Index: src/idl-compiler/Makefile.am
===================================================================
RCS file: /cvs/gnome/ORBit2/src/idl-compiler/Makefile.am,v
retrieving revision 1.18.2.1
diff -u -r1.18.2.1 Makefile.am
--- src/idl-compiler/Makefile.am 2001/12/11 09:39:09 1.18.2.1
+++ src/idl-compiler/Makefile.am 2002/01/05 06:28:03
@@ -15,8 +15,11 @@
$(WARN_CFLAGS) \
$(ORBIT_IDL_CFLAGS)
-# FIXME: this should be conditional
+if ENABLE_CPP
CPP_BACKEND_LIBS = cpp/libidl-cpp.la
+else
+CPP_BACKEND_LIBS =
+endif
orbit_idl_2_LDADD = \
-lpopt -lm \
Index: src/idl-compiler/orbit-idl-backends.c
===================================================================
RCS file: /cvs/gnome/ORBit2/src/idl-compiler/orbit-idl-backends.c,v
retrieving revision 1.9.6.1
diff -u -r1.9.6.1 orbit-idl-backends.c
--- src/idl-compiler/orbit-idl-backends.c 2001/12/11 09:39:09 1.9.6.1
+++ src/idl-compiler/orbit-idl-backends.c 2002/01/05 06:28:03
@@ -31,13 +31,17 @@
#endif
#include <string.h>
-/* FIXME: should be condtional */
+/* This should really be in a header file... */
+#ifdef ORBIT_ENABLE_CPP
void orbit_idl_output_cpp (OIDL_Output_Tree *tree, OIDL_Run_Info *rinfo);
+#endif
static OIDL_Backend_Info orbit_idl_builtin_backends[] = {
{ "c", &orbit_idl_output_c },
+#ifdef ORBIT_ENABLE_CPP
{ "c++", &orbit_idl_output_cpp },
{ "cpp", &orbit_idl_output_cpp },
+#endif
{ NULL, NULL }
};
Index: src/idl-compiler/cpp/Makefile.am
===================================================================
RCS file: /cvs/gnome/ORBit2/src/idl-compiler/cpp/Attic/Makefile.am,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 Makefile.am
--- src/idl-compiler/cpp/Makefile.am 2001/12/11 09:39:30 1.1.2.1
+++ src/idl-compiler/cpp/Makefile.am 2002/01/05 06:28:03
@@ -30,6 +30,8 @@
$(WARN_CFLAGS) \
$(ORBIT_IDL_CFLAGS)
+if ENABLE_CPP
+
noinst_LTLIBRARIES = libidl-cpp.la
headers = \
@@ -61,3 +63,5 @@
$(headers) $(modules)
libidl_cpp_la_LIBADD = -lstdc++
+
+endif
PGP signature
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]