[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#126775: omniorb-doc examples don't compile



Package: omniorb-doc
Version: 3.0.4-2.4
Tags: patch

I have adopted the examples to autoconf/automake.  This
works very well.  Maybe one can push this to the upstream
developers?

What I did: All files dir.mk, dir.mak, GNUmakefile,
*.module, *.pkg, and the obsolete directories lifecycle and
partcl are removed.  They are replaced by a configure.ac, a
dozen Makefile.am files and a bootstrap script to run
aclocal, automake and autoconf.

Two minor problems remain:

1. I put -DUsePthread directly into the Makefile.am files.
   Better would be to check for the pthread libs.

2. As suggested by the omniORB documentation, I have
   created a file /usr/include/omniORB3/sitedef.h, which
   contains only one line:

#define __x86__ /* or: __sparc__, __powerpc__, ... */

   This file is included by /usr/include/omniORB3/\
   CORBA_sysdep.h mainly to set _OMNIORB_HOST_BYTE_ORDER_
   to 0 for big endian machines and to 1 for little endian
   machines.  I don't like this.  It makes cross compiling
   impossible.  Also, autoconf already has a macro
   AC_C_BIGENDIAN, which defines WORDS_BIGENDIAN or not
   depending on the byte sex.

Btw: I believe that the bugs #49037 (omniorb-doc file
placement, 2 years and 58 days old) and #114718 (empty dirs
in omniorb-doc, 82 days old) are gone.

Cheers,
-- 
W. Borgert <debacle@debian.org>
diff -ruN examples.orig/Makefile.am examples/Makefile.am
--- examples.orig/Makefile.am	Thu Jan  1 00:00:00 1970
+++ examples/Makefile.am	Fri Dec 28 20:09:05 2001
@@ -0,0 +1 @@
+SUBDIRS=anyExample boa call_back dii dsi echo poa thread
diff -ruN examples.orig/anyExample/Makefile.am examples/anyExample/Makefile.am
--- examples.orig/anyExample/Makefile.am	Thu Jan  1 00:00:00 1970
+++ examples/anyExample/Makefile.am	Fri Dec 28 20:45:32 2001
@@ -0,0 +1,11 @@
+IDLFILE = anyExample
+noinst_PROGRAMS = anyExample_clt anyExample_impl
+BUILT_SOURCES = anyExampleSK.cc anyExampleDynSK.cc anyExample.hh
+anyExample_clt_SOURCES = anyExample_clt.cc $(BUILT_SOURCES)
+anyExample_impl_SOURCES = anyExample_impl.cc $(BUILT_SOURCES)
+LDADD = -lomniORB3 -lomniDynamic3 -ltcpwrapGK
+CXXFLAGS = -O2 -Wall -Wno-unused -D__OMNIORB3__ -D_REENTRANT -DUsePthread
+CLEANFILES=$(IDLFILE)SK.cc $(IDLFILE)DynSK.cc $(IDLFILE).hh
+
+$(IDLFILE)SK.cc $(IDLFILE)DynSK.cc $(IDLFILE).hh: $(IDLFILE).idl
+	$(OMNIIDL) -bcxx -Wba $<
diff -ruN examples.orig/boa/Makefile.am examples/boa/Makefile.am
--- examples.orig/boa/Makefile.am	Thu Jan  1 00:00:00 1970
+++ examples/boa/Makefile.am	Fri Dec 28 20:46:07 2001
@@ -0,0 +1,11 @@
+IDLFILE = becho
+noinst_PROGRAMS = eg2_clt eg2_impl
+BUILT_SOURCES = bechoSK.cc becho.hh
+eg2_clt_SOURCES = eg2_clt.cc $(BUILT_SOURCES)
+eg2_impl_SOURCES = eg2_impl.cc $(BUILT_SOURCES)
+LDADD = -lomniORB3 -ltcpwrapGK
+CXXFLAGS = -O2 -Wall -Wno-unused -D__OMNIORB3__ -D_REENTRANT -DUsePthread
+CLEANFILES=$(IDLFILE)SK.cc $(IDLFILE)DynSK.cc $(IDLFILE).hh
+
+$(IDLFILE)SK.cc $(IDLFILE).hh: $(IDLFILE).idl
+	$(OMNIIDL) -bcxx -WbBOA $<
diff -ruN examples.orig/bootstrap examples/bootstrap
--- examples.orig/bootstrap	Thu Jan  1 00:00:00 1970
+++ examples/bootstrap	Fri Dec 28 17:22:47 2001
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+aclocal && automake --add-missing --foreign
+autoconf
diff -ruN examples.orig/call_back/Makefile.am examples/call_back/Makefile.am
--- examples.orig/call_back/Makefile.am	Thu Jan  1 00:00:00 1970
+++ examples/call_back/Makefile.am	Fri Dec 28 21:11:12 2001
@@ -0,0 +1,12 @@
+IDLFILE = echo_callback
+noinst_PROGRAMS = cb_client cb_server cb_shutdown
+BUILT_SOURCES = echo_callbackSK.cc echo_callback.hh
+cb_client_SOURCES = cb_client.cc $(BUILT_SOURCES)
+cb_server_SOURCES = cb_server.cc $(BUILT_SOURCES)
+cb_shutdown_SOURCES = cb_shutdown.cc $(BUILT_SOURCES)
+LDADD = -lomniORB3 -ltcpwrapGK -lomnithread -lpthread
+CXXFLAGS = -O2 -Wall -Wno-unused -D__OMNIORB3__ -D_REENTRANT -DUsePthread
+CLEANFILES=$(IDLFILE)SK.cc $(IDLFILE)DynSK.cc $(IDLFILE).hh
+
+$(IDLFILE)SK.cc $(IDLFILE).hh: $(IDLFILE).idl
+	$(OMNIIDL) -bcxx $<
diff -ruN examples.orig/configure.ac examples/configure.ac
--- examples.orig/configure.ac	Thu Jan  1 00:00:00 1970
+++ examples/configure.ac	Fri Dec 28 20:22:23 2001
@@ -0,0 +1,28 @@
+AC_INIT(anyExample/anyExample_clt.cc)
+AM_INIT_AUTOMAKE(omniorb-examples, 3.0.4)
+
+AC_PROG_CXX
+AC_PROG_CXXCPP
+AC_PROG_LN_S
+AC_PROG_INSTALL
+
+AC_LANG(C++)
+AC_HEADER_STDC
+AC_CHECK_HEADERS(iostream.h omniORB3/CORBA.h omniORB3/callDescriptor.h omniORB3/tcDescriptor.h)
+
+AC_C_BIGENDIAN
+
+AC_CHECK_PROGS(OMNIIDL, omniidl, false)
+
+AC_OUTPUT(Makefile
+	anyExample/Makefile
+ 	boa/Makefile
+ 	call_back/Makefile
+ 	dii/Makefile
+ 	dsi/Makefile
+ 	echo/Makefile
+ 	poa/Makefile
+	poa/implicit_activation/Makefile
+	poa/persistent_objref/Makefile
+	poa/servant_manager/Makefile
+ 	thread/Makefile)
diff -ruN examples.orig/dii/Makefile.am examples/dii/Makefile.am
--- examples.orig/dii/Makefile.am	Thu Jan  1 00:00:00 1970
+++ examples/dii/Makefile.am	Fri Dec 28 21:02:08 2001
@@ -0,0 +1,4 @@
+noinst_PROGRAMS = echo_diiclt
+echo_diiclt_SOURCES = echo_diiclt.cc
+LDADD = -lomniORB3 -lomniDynamic3 -ltcpwrapGK
+CXXFLAGS = -O2 -Wall -Wno-unused -D__OMNIORB3__ -D_REENTRANT -DUsePthread
diff -ruN examples.orig/dsi/Makefile.am examples/dsi/Makefile.am
--- examples.orig/dsi/Makefile.am	Thu Jan  1 00:00:00 1970
+++ examples/dsi/Makefile.am	Fri Dec 28 21:02:17 2001
@@ -0,0 +1,4 @@
+noinst_PROGRAMS = echo_dsiimpl
+echo_dsiimpl_SOURCES = echo_dsiimpl.cc
+LDADD = -lomniORB3 -lomniDynamic3 -ltcpwrapGK
+CXXFLAGS = -O2 -Wall -Wno-unused -D__OMNIORB3__ -D_REENTRANT -DUsePthread
diff -ruN examples.orig/echo/Makefile.am examples/echo/Makefile.am
--- examples.orig/echo/Makefile.am	Thu Jan  1 00:00:00 1970
+++ examples/echo/Makefile.am	Fri Dec 28 21:02:43 2001
@@ -0,0 +1,15 @@
+IDLFILE = echo
+noinst_PROGRAMS = eg1 eg2_clt eg2_impl eg3_clt eg3_impl eg3_tieimpl
+BUILT_SOURCES = echoSK.cc echo.hh
+eg1_SOURCES = eg1.cc $(BUILT_SOURCES)
+eg2_clt_SOURCES = eg2_clt.cc $(BUILT_SOURCES)
+eg2_impl_SOURCES = eg2_impl.cc $(BUILT_SOURCES)
+eg3_clt_SOURCES = eg3_clt.cc $(BUILT_SOURCES)
+eg3_impl_SOURCES = eg3_impl.cc $(BUILT_SOURCES)
+eg3_tieimpl_SOURCES = eg3_tieimpl.cc $(BUILT_SOURCES)
+LDADD = -lomniORB3 -ltcpwrapGK
+CXXFLAGS = -O2 -Wall -Wno-unused -D__OMNIORB3__ -D_REENTRANT -DUsePthread
+CLEANFILES=$(IDLFILE)SK.cc $(IDLFILE)DynSK.cc $(IDLFILE).hh
+
+$(IDLFILE)SK.cc $(IDLFILE).hh: $(IDLFILE).idl
+	$(OMNIIDL) -bcxx -Wbtp $<
diff -ruN examples.orig/poa/Makefile.am examples/poa/Makefile.am
--- examples.orig/poa/Makefile.am	Thu Jan  1 00:00:00 1970
+++ examples/poa/Makefile.am	Fri Dec 28 20:21:29 2001
@@ -0,0 +1 @@
+SUBDIRS=implicit_activation persistent_objref servant_manager
diff -ruN examples.orig/poa/implicit_activation/Makefile.am examples/poa/implicit_activation/Makefile.am
--- examples.orig/poa/implicit_activation/Makefile.am	Thu Jan  1 00:00:00 1970
+++ examples/poa/implicit_activation/Makefile.am	Fri Dec 28 21:01:44 2001
@@ -0,0 +1,6 @@
+IDLFILE = echo
+noinst_PROGRAMS = eg1
+eg1_SOURCES = eg1.cc
+LDADD = ../../echo/echoSK.o -lomniORB3 -ltcpwrapGK
+INCLUDES = -I../../echo
+CXXFLAGS = -O2 -Wall -Wno-unused -D__OMNIORB3__ -D_REENTRANT -DUsePthread
diff -ruN examples.orig/poa/persistent_objref/Makefile.am examples/poa/persistent_objref/Makefile.am
--- examples.orig/poa/persistent_objref/Makefile.am	Thu Jan  1 00:00:00 1970
+++ examples/poa/persistent_objref/Makefile.am	Fri Dec 28 21:00:54 2001
@@ -0,0 +1,5 @@
+noinst_PROGRAMS = eg2_impl
+eg2_impl_SOURCES = eg2_impl.cc
+LDADD = ../../echo/echoSK.o -lomniORB3 -ltcpwrapGK
+INCLUDES = -I../../echo
+CXXFLAGS = -O2 -Wall -Wno-unused -D__OMNIORB3__ -D_REENTRANT -DUsePthread
diff -ruN examples.orig/poa/servant_manager/Makefile.am examples/poa/servant_manager/Makefile.am
--- examples.orig/poa/servant_manager/Makefile.am	Thu Jan  1 00:00:00 1970
+++ examples/poa/servant_manager/Makefile.am	Fri Dec 28 21:01:08 2001
@@ -0,0 +1,6 @@
+noinst_PROGRAMS = servant_activator servant_locator
+servant_activator_SOURCES = servant_activator.cc
+servant_locator_SOURCES = servant_locator.cc
+LDADD = ../../echo/echoSK.o -lomniORB3 -ltcpwrapGK
+INCLUDES = -I../../echo
+CXXFLAGS = -O2 -Wall -Wno-unused -D__OMNIORB3__ -D_REENTRANT -DUsePthread
diff -ruN examples.orig/thread/Makefile.am examples/thread/Makefile.am
--- examples.orig/thread/Makefile.am	Thu Jan  1 00:00:00 1970
+++ examples/thread/Makefile.am	Fri Dec 28 20:48:12 2001
@@ -0,0 +1,7 @@
+noinst_PROGRAMS = diner prio prodcons thrspecdata
+diner_SOURCES = diner.cc
+prio_SOURCES = prio.cc
+prodcons_SOURCES = prodcons.cc
+thrspecdata_SOURCES = thrspecdata.cc
+LDADD = -lomnithread -lpthread
+CXXFLAGS = -O2 -Wall -Wno-unused -D__OMNIORB3__ -D_REENTRANT -DUsePthread

Reply to: