[sword-svn] r1881 - in trunk: bindings bindings/corba bindings/corba/java bindings/corba/orbitcpp lib

dglassey at crosswire.org dglassey at crosswire.org
Fri Jan 6 06:41:11 MST 2006


Author: dglassey
Date: 2006-01-06 06:40:48 -0700 (Fri, 06 Jan 2006)
New Revision: 1881

Added:
   trunk/bindings/autogen.sh
   trunk/bindings/configure.ac
   trunk/bindings/corba/Makefile.am
   trunk/bindings/corba/java/Makefile.in
   trunk/bindings/corba/orbitcpp/Makefile.am
   trunk/bindings/usrinst.sh
Modified:
   trunk/bindings/Makefile.am
   trunk/lib/Makefile.am
Log:
initial release of autotool build systen for bindings



Modified: trunk/bindings/Makefile.am
===================================================================
--- trunk/bindings/Makefile.am	2006-01-05 11:33:09 UTC (rev 1880)
+++ trunk/bindings/Makefile.am	2006-01-06 13:40:48 UTC (rev 1881)
@@ -1,5 +1,7 @@
-bindingsdir = $(top_srcdir)/bindings
-libsword_la_SOURCES += $(bindingsdir)/flatapi.cpp
+if CORBA
+corbadir = corba
+else
+corbadir =
+endif
 
-include $(bindingsdir)/bcppmake/Makefile.am
-include $(bindingsdir)/gsoap/Makefile.am
+SUBDIRS = $(corbadir)

Added: trunk/bindings/autogen.sh
===================================================================
--- trunk/bindings/autogen.sh	2006-01-05 11:33:09 UTC (rev 1880)
+++ trunk/bindings/autogen.sh	2006-01-06 13:40:48 UTC (rev 1881)
@@ -0,0 +1,23 @@
+#!/bin/sh
+echo "*** Sword build system generation"
+#echo "*** Recreating libtool"
+#if test -z "$LTIZE"; then
+#LTIZE="$AUTODIR""libtoolize"
+#fi
+#echo "$LTIZE"
+#	$LTIZE --force --copy;
+
+ACLOCAL="$AUTODIR""aclocal"
+echo "*** Recreating aclocal.m4"
+echo "$ACLOCAL"
+	$ACLOCAL -I m4;
+
+echo "*** Recreating configure"
+AUTOCONF="$AUTODIR""autoconf"
+#AUTOHEAD="$AUTODIR""autoheader"
+#	$AUTOHEAD ;
+	$AUTOCONF;
+	
+echo "*** Recreating the Makefile.in files"
+AUTOMAKE="$AUTODIR""automake"
+	$AUTOMAKE -a -c --foreign;


Property changes on: trunk/bindings/autogen.sh
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/bindings/configure.ac
===================================================================
--- trunk/bindings/configure.ac	2006-01-05 11:33:09 UTC (rev 1880)
+++ trunk/bindings/configure.ac	2006-01-06 13:40:48 UTC (rev 1881)
@@ -0,0 +1,127 @@
+# ---------------------------------------------------------------------
+# Initialisation
+# ---------------------------------------------------------------------
+
+# Version change: Change line 8 only !
+# Change it immediately after a release
+
+AC_INIT(swordbindings, 1.5.9, sword-bugs at crosswire.org)
+AC_CONFIG_SRCDIR([flatapi.cpp])
+AC_PREREQ(2.52)
+AC_REVISION($Revision$)
+
+AC_CANONICAL_TARGET
+AM_INIT_AUTOMAKE
+
+#AM_CONFIG_HEADER(include/config.h)
+
+
+# ---------------------------------------------------------------------
+# Check Programs
+# ---------------------------------------------------------------------
+AC_LANG(C++)
+AC_PROG_CC
+AC_PROG_CXX
+AC_PROG_INSTALL
+AC_LIBTOOL_WIN32_DLL
+AC_PROG_LIBTOOL
+
+AC_C_BIGENDIAN
+
+# ---------------------------------------------------------------------
+# Java
+# ---------------------------------------------------------------------
+AC_CHECK_CLASSPATH
+AC_PROG_JAVAC
+AC_PROG_JAVA
+AC_PROG_JAR
+
+# ---------------------------------------------------------------------
+# With options
+# ---------------------------------------------------------------------
+AC_ARG_WITH(tomcathome,
+	AC_HELP_STRING([--with-tomcathome],
+    [tomcat home directory (default=[/usr/local/tomcat])]),,
+    with_tomcathome=[/usr/local/tomcat])
+
+
+# ---------------------------------------------------------------------
+# Enable options
+# ---------------------------------------------------------------------
+AC_ARG_ENABLE(corba,
+	AC_HELP_STRING([--enable-corba],[build swordorbserver (default=no)]),,enable_corba=no)
+
+AM_MAINTAINER_MODE
+
+# ---------------------------------------------------------------------
+# Check libraries
+# ---------------------------------------------------------------------
+
+# ---------------------------------------------------------------------
+# Find pkg-config
+# ---------------------------------------------------------------------
+use_pkgconfig=yes
+AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+if test x$PKG_CONFIG = xno ; then
+  AC_MSG_WARN([*** pkg-config not found. See http://www.freedesktop.org/software/pkgconfig/])
+  AC_MSG_ERROR([not using pkg-config])
+  use_pkgconfig=no
+fi
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.14 ; then
+  :
+else
+  AC_MSG_WARN([*** pkg-config too old; version 0.14 or better required.])
+  AC_MSG_ERROR([not using pkg-config])
+  use_pkgconfig=no
+fi
+
+# ---------------------------------------------------------------------
+# Find sword
+# ---------------------------------------------------------------------
+SWORD_CFLAGS=
+SWORD_LIBS=
+if test x$use_pkgconfig = xyes ; then
+  SWORD_LIBS=`$PKG_CONFIG --libs sword`
+  SWORD_CFLAGS=`$PKG_CONFIG --cflags sword`
+fi
+
+# ---------------------------------------------------------------------
+# Tomcat install directories
+# ---------------------------------------------------------------------
+TOMCAT_HOME=$with_tomcathome
+
+# ---------------------------------------------------------------------
+# Find orbit-config
+# ---------------------------------------------------------------------
+ORBIT_LIBS=
+ORBIT_CFLAGS=
+if test x$enable_corba = xyes ; then
+  if test x$use_pkgconfig = xyes ; then
+    ORBIT_LIBS+=`$PKG_CONFIG --libs ORBit-2.0-cpp`
+    ORBIT_CFLAGS+=`$PKG_CONFIG --cflags ORBit-2.0`
+    ORBIT_CXXFLAGS+=`$PKG_CONFIG --cflags ORBit-2.0-cpp`
+  fi
+fi
+
+# ---------------------------------------------------------------------
+# Substitute variables into makefiles
+# ---------------------------------------------------------------------
+AC_SUBST(SWORD_LIBS)
+AC_SUBST(SWORD_CFLAGS)
+AC_SUBST(ORBIT_LIBS)
+AC_SUBST(ORBIT_CFLAGS)
+AC_SUBST(ORBIT_CXXFLAGS)
+AC_SUBST(TOMCAT_HOME)
+
+# ---------------------------------------------------------------------
+# Conditional variables
+# ---------------------------------------------------------------------
+AM_CONDITIONAL(CORBA, test x$enable_corba = xyes)
+
+# ---------------------------------------------------------------------
+# Final output
+# ---------------------------------------------------------------------
+AC_CONFIG_FILES(Makefile corba/Makefile corba/orbitcpp/Makefile corba/java/Makefile)
+AC_OUTPUT
+

Added: trunk/bindings/corba/Makefile.am
===================================================================
--- trunk/bindings/corba/Makefile.am	2006-01-05 11:33:09 UTC (rev 1880)
+++ trunk/bindings/corba/Makefile.am	2006-01-06 13:40:48 UTC (rev 1881)
@@ -0,0 +1,3 @@
+EXTRA_DIST = swordorb.idl
+
+SUBDIRS = orbitcpp java

Added: trunk/bindings/corba/java/Makefile.in
===================================================================
--- trunk/bindings/corba/java/Makefile.in	2006-01-05 11:33:09 UTC (rev 1880)
+++ trunk/bindings/corba/java/Makefile.in	2006-01-06 13:40:48 UTC (rev 1881)
@@ -0,0 +1,41 @@
+
+TOMCAT_HOME = @TOMCAT_HOME@
+VERSION = @VERSION@
+JAVAC = @JAVAC@
+top_srcdir = @top_srcdir@
+top_builddir = @top_builddir@
+INSTALL = @INSTALL@
+
+#SWORDORBJAR=sword-orb-$(VERSION).jar
+SWORDORBJAR=sword-orb.jar
+
+all: $(SWORDORBJAR)
+
+src/org/crosswire/sword/orb/SWMgr.java: $(top_builddir)/corba/java/src/org/crosswire/util/Base64.java
+	idlj -pkgTranslate swordorb org.crosswire.sword.orb -td src $(top_srcdir)/corba/swordorb.idl
+
+classes/org/crosswire/sword/orb/SwordOrb.class: src/org/crosswire/sword/orb/SWMgr.java
+	$(JAVAC) -classpath ${TOMCAT_HOME}/common/lib/servlet-api.jar -d classes src/org/crosswire/sword/orb/*.java src/org/crosswire/util/*.java
+
+$(top_builddir)/corba/java/src/org/crosswire/util/Base64.java:
+	cp -a $(top_srcdir)/corba/java/src .
+	find . -name .svn|xargs rm -r
+
+clean:
+	-rm src/org/crosswire/sword/orb/SW*.java
+	-rm src/org/crosswire/sword/orb/_SW*.java
+	-rm src/org/crosswire/sword/orb/Mod*.java
+	-rm src/org/crosswire/sword/orb/Search*.java
+	-rm src/org/crosswire/sword/orb/String*.java
+	-rm -rf classes/*
+	-rmdir -p src/org/crosswire/sword/orb
+	-rm $(SWORDORBJAR)
+
+$(SWORDORBJAR): classes/org/crosswire/sword/orb/SwordOrb.class
+	$(JAR) cf $(SWORDORBJAR) -C $(top_srcdir)/classes org
+
+install:
+	@INSTALL@ $(SWORDORBJAR) $(TOMCAT_HOME)/common/lib
+
+uninstall:
+	-rm $(TOMCAT_HOME)/common/lib/$(SWORDORBJAR)

Added: trunk/bindings/corba/orbitcpp/Makefile.am
===================================================================
--- trunk/bindings/corba/orbitcpp/Makefile.am	2006-01-05 11:33:09 UTC (rev 1880)
+++ trunk/bindings/corba/orbitcpp/Makefile.am	2006-01-06 13:40:48 UTC (rev 1881)
@@ -0,0 +1,40 @@
+bin_PROGRAMS = swordorbserver
+
+noinst_PROGRAMS = testclient
+
+swordorbserver_SOURCES =  server.cpp
+swordorbserver_SOURCES += swordorb-common.c
+swordorbserver_SOURCES += swordorb-impl.cpp
+swordorbserver_SOURCES += swordorb-cpp-common.cc
+swordorbserver_SOURCES += swordorb-stubs.c
+swordorbserver_SOURCES += swordorb-cpp-stubs.cc
+swordorbserver_SOURCES += swordorb-skels.c
+swordorbserver_SOURCES += swordorb-cpp-skels.cc
+
+swordorbserver_CFLAGS = $(SWORD_CFLAGS) $(ORBIT_CFLAGS)
+swordorbserver_CXXFLAGS = $(SWORD_CFLAGS) $(ORBIT_CXXFLAGS)
+swordorbserver_LDADD = $(SWORD_LIBS) $(ORBIT_LIBS)
+
+testclient_SOURCES =  testclient.cpp
+testclient_SOURCES += swordorb-common.c
+testclient_SOURCES += swordorb-impl.cpp
+testclient_SOURCES += swordorb-cpp-common.cc
+testclient_SOURCES += swordorb-stubs.c
+testclient_SOURCES += swordorb-cpp-stubs.cc
+testclient_SOURCES += swordorb-skels.c
+testclient_SOURCES += swordorb-cpp-skels.cc
+
+testclient_CFLAGS = $(SWORD_CFLAGS) $(ORBIT_CFLAGS)
+testclient_CXXFLAGS = $(SWORD_CFLAGS) $(ORBIT_CXXFLAGS)
+testclient_LDADD = $(SWORD_LIBS) $(ORBIT_LIBS)
+
+BUILT_SOURCES = swordorb-common.c
+
+swordorb-common.c: $(top_srcdir)/corba/swordorb.idl
+	orbit-idl-2 -l c $(top_srcdir)/corba/swordorb.idl
+	orbit-idl-2 -l cpp $(top_srcdir)/corba/swordorb.idl
+
+clean:
+	rm -f *.h *.cc *.o *.c server testclient
+
+

Added: trunk/bindings/usrinst.sh
===================================================================
--- trunk/bindings/usrinst.sh	2006-01-05 11:33:09 UTC (rev 1880)
+++ trunk/bindings/usrinst.sh	2006-01-06 13:40:48 UTC (rev 1881)
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+OPTIONS="--prefix=/usr $OPTIONS"
+OPTIONS="--enable-corba $OPTIONS"
+
+CPPFLAGS="$CFLAGS $CPPFLAGS" ./configure $OPTIONS $*
+


Property changes on: trunk/bindings/usrinst.sh
___________________________________________________________________
Name: svn:executable
   + *

Modified: trunk/lib/Makefile.am
===================================================================
--- trunk/lib/Makefile.am	2006-01-05 11:33:09 UTC (rev 1880)
+++ trunk/lib/Makefile.am	2006-01-06 13:40:48 UTC (rev 1881)
@@ -43,7 +43,9 @@
 include ../src/mgr/Makefile.am
 include ../src/frontend/Makefile.am
 include ../src/modules/Makefile.am
-include ../bindings/Makefile.am
+#include ../bindings/Makefile.am
+bindingsdir = $(top_srcdir)/bindings
+libsword_la_SOURCES += $(bindingsdir)/flatapi.cpp
 include ../include/Makefile.am
 
 



More information about the sword-cvs mailing list