Suggested minor changes to build orbitcpp on Windows
- From: "Tor Lillqvist" <tml iki fi>
- To: orbitcpp-list gnome org
- Subject: Suggested minor changes to build orbitcpp on Windows
- Date: Tue, 22 Jan 2008 14:58:51 +0200
With the attached minor changes I managed to build orbitcpp on
Windows, and as far as I could see, it worked fine. OK to commit to
trunk?
--tml
Index: ChangeLog
===================================================================
--- ChangeLog (revision 283)
+++ ChangeLog (working copy)
@@ -1,3 +1,30 @@
+2008-01-22 Tor Lillqvist <tml novell com>
+
+ Fixes to build on Windows.
+
+ * configure.in: Use the --enable-runtime-pseudo-reloc linker
+ switch on Windows. Needed by the test programs.
+
+ * orbitcpp/idl-compiler/Makefile.am
+ (libORBit_idl_backend_cpp_la_LDFLAGS): Use -no-undefined so that
+ libtool bothers building a DLL on Windows. Should not hurt on Unix
+ either. Use -module -avoid-version instead of specifying any
+ libtool versioning information. Using -version-info means that on
+ Windows the DLL basename gets libtool versioning cruft inserted,
+ producing a name like libORBit-idl-backend-cpp-10.dll. Thus it
+ would be found using just the "-l cpp" flag to orbit-idl-2.
+ (libORBit_idl_backend_cpp_la_LIBADD): Link with ORBITCPP_IDL_LIBS.
+
+ * orbitcpp/idl-compiler/types/Makefile.am (INCLUDES): Drop extra
+ trailing slash which confuses mingw.
+
+ * orbitcpp/orb-cpp/Makefile.am
+ * orbitcpp/services/name/Makefile.am: Use -no-undefined so that we
+ do get a DLL on Windows.
+
+ * test/Makefile.am (check_PROGRAMS): client_server.cc uses POSIX
+ APIs, so don't bother with test_runner on Windows.
+
2007-11-17 Eugene Sizikov <eugene_beast mail ru>
* orbitcpp/orb-cpp/orbitcpp_policy.cc
* orbitcpp/orb-cpp/orbitcpp_policy.h
Index: configure.in
===================================================================
--- configure.in (revision 283)
+++ configure.in (working copy)
@@ -41,6 +41,25 @@
])
ACLOCAL="$ACLOCAL $ac_cv_orbit_aclocal_flags"
+AC_CANONICAL_HOST
+AC_MSG_CHECKING([for Win32])
+case "$host" in
+ *-*-mingw*)
+ os_win32=yes
+ MINGW_LDFLAGS="-Wl,--enable-runtime-pseudo-reloc"
+ ;;
+ *)
+ os_win32=no
+ MINGW_LDFLAGS=
+ ;;
+esac
+AC_MSG_RESULT([$os_win32])
+
+AM_CONDITIONAL(OS_WIN32, [test "$os_win32" = "yes"])
+
+AC_SUBST(MINGW_LDFLAGS)
+LDFLAGS="$MINGW_LDFLAGS $LDFLAGS"
+
dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
Index: orbitcpp/idl-compiler/Makefile.am
===================================================================
--- orbitcpp/idl-compiler/Makefile.am (revision 283)
+++ orbitcpp/idl-compiler/Makefile.am (working copy)
@@ -58,5 +58,5 @@
main.cc
libORBit_idl_backend_cpp_la_SOURCES = $(headers) $(modules)
-libORBit_idl_backend_cpp_la_LDFLAGS = -version-info $(LT_VERSION)
-libORBit_idl_backend_cpp_la_LIBADD = types/libidl-cpp-types.la
+libORBit_idl_backend_cpp_la_LDFLAGS = -module -avoid-version -no-undefined
+libORBit_idl_backend_cpp_la_LIBADD = types/libidl-cpp-types.la $(ORBITCPP_IDL_LIBS)
Index: orbitcpp/idl-compiler/types/Makefile.am
===================================================================
--- orbitcpp/idl-compiler/types/Makefile.am (revision 283)
+++ orbitcpp/idl-compiler/types/Makefile.am (working copy)
@@ -1,6 +1,6 @@
INCLUDES = -I$(top_builddir) \
-I$(top_srcdir) \
- -I$(top_srcdir)/orbitcpp/idl-compiler/ \
+ -I$(top_srcdir)/orbitcpp/idl-compiler \
-DVERSION=\"$(ORBIT_VERSION)\" \
$(WARN_CFLAGS) \
$(ORBITCPP_IDL_CFLAGS)
Index: orbitcpp/orb-cpp/Makefile.am
===================================================================
--- orbitcpp/orb-cpp/Makefile.am (revision 283)
+++ orbitcpp/orb-cpp/Makefile.am (working copy)
@@ -49,5 +49,5 @@
poa-cpp-skels.cc
$(libORBit_2_cppinclude_HEADERS)
-libORBit_2_cpp_la_LDFLAGS = -version-info $(LT_VERSION)
+libORBit_2_cpp_la_LDFLAGS = -version-info $(LT_VERSION) -no-undefined
libORBit_2_cpp_la_LIBADD = $(ORBITCPP_LIBS) #-lstdc++
Index: orbitcpp/services/name/Makefile.am
===================================================================
--- orbitcpp/services/name/Makefile.am (revision 283)
+++ orbitcpp/services/name/Makefile.am (working copy)
@@ -18,10 +18,9 @@
CosNaming.h \
CosNaming-cpp-common.h \
CosNaming-cpp-stubs.h
-
-libORBitCosNaming_2_cpp_la_LDFLAGS = -version-info $(LT_VERSION)
-libORBitCosNaming_2_cpp_la_LIBADD = $(ORBITCPP_LIBS)
+libORBitCosNaming_2_cpp_la_LDFLAGS = -version-info $(LT_VERSION) -no-undefined
+libORBitCosNaming_2_cpp_la_LIBADD = $(top_builddir)/orbitcpp/orb-cpp/libORBit-2-cpp.la $(ORBITCPP_LIBS)
Index: test/Makefile.am
===================================================================
--- test/Makefile.am (revision 283)
+++ test/Makefile.am (working copy)
@@ -2,6 +2,9 @@
noinst_INCLUDES = tut.h tut_reporter.h tut_restartable.h client_server.h
+if OS_WIN32
+else
check_PROGRAMS = test_runner
+endif
test_runner_SOURCES = main.cc client_server.cc test_factory.cc test_policy.cc
[Date Prev][Date Next] [Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]