[sword-svn] r2855 - in trunk: . bindings bindings/corba/java bindings/swig bindings/swig/package src/utilfuns/zlib
scribe at crosswire.org
scribe at crosswire.org
Sun Jul 7 09:40:22 MST 2013
Author: scribe
Date: 2013-07-07 09:40:22 -0700 (Sun, 07 Jul 2013)
New Revision: 2855
Added:
trunk/bindings/swig/package/README
Removed:
trunk/bindings/Makefile
trunk/bindings/corba/java/Makefile.in
trunk/bindings/swig/package/README.cvs
Modified:
trunk/bindings/README
trunk/bindings/swig/README
trunk/bindings/swig/package/Makefile.am
trunk/bindings/swig/package/sword.m4
trunk/configure.ac
trunk/src/utilfuns/zlib/untgz.c
Log:
updated to force -fPIC even when building static .a libs so libsword can link when building a .so
updates for building bindings with autotools
Deleted: trunk/bindings/Makefile
===================================================================
--- trunk/bindings/Makefile 2013-07-06 01:43:36 UTC (rev 2854)
+++ trunk/bindings/Makefile 2013-07-07 16:40:22 UTC (rev 2855)
@@ -1,9 +0,0 @@
-
-root := ..
-targets := ${root}/lib/libsword.a
-clean-targets := none
-include ${root}/Makefile.cfg
-
-cpp += flatapi.cpp
-
-include ${root}/Makefile.post
Modified: trunk/bindings/README
===================================================================
--- trunk/bindings/README 2013-07-06 01:43:36 UTC (rev 2854)
+++ trunk/bindings/README 2013-07-07 16:40:22 UTC (rev 2855)
@@ -1,11 +1,17 @@
Building Perl or Python (through swig)
-------------
-To build the SWIG (Perl, Python) bindings the recommended path is to build the library
-with the CMake toolchain. This requires installing the CMake application appropriate to
-your operating system (most Linux distributions will have this as an existing package
-as CMake is integral to building many popular applications).
+Using autotools
+---------------
+See swig/packages/README
+Using CMake
+-----------
+Building the SWIG (Perl, Python) bindings with the CMake toolchain requires installing
+the CMake application appropriate to your operating system (most Linux distributions
+will have this as an existing package as CMake is integral to building many popular
+applications).
+
Additionally you will need the development packages for the language you are targeting
and the swig application itself. All of these should be directly available through your
distribution's package system.
Deleted: trunk/bindings/corba/java/Makefile.in
===================================================================
--- trunk/bindings/corba/java/Makefile.in 2013-07-06 01:43:36 UTC (rev 2854)
+++ trunk/bindings/corba/java/Makefile.in 2013-07-07 16:40:22 UTC (rev 2855)
@@ -1,43 +0,0 @@
-
-TOMCAT_HOME = @TOMCAT_HOME@
-VERSION = @VERSION@
-JAVAC = @JAVAC@
-top_srcdir = @top_srcdir@
-top_builddir = @top_builddir@
-INSTALL = @INSTALL@
-JAR = @JAR@
-
-#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
- mkdir -p $(top_builddir)/corba/java/classes
- $(JAVAC) -classpath ${TOMCAT_HOME}/common/lib/servlet-api.jar -d $(top_builddir)/corba/java/classes -sourcepath src 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_builddir)/corba/java/classes org
-
-install:
- @INSTALL@ $(SWORDORBJAR) $(TOMCAT_HOME)/common/lib
-
-uninstall:
- -rm $(TOMCAT_HOME)/common/lib/$(SWORDORBJAR)
Modified: trunk/bindings/swig/README
===================================================================
--- trunk/bindings/swig/README 2013-07-06 01:43:36 UTC (rev 2854)
+++ trunk/bindings/swig/README 2013-07-07 16:40:22 UTC (rev 2855)
@@ -1,5 +1,4 @@
-WARNING These directions have not been tested in a while and might not work,
-see the updated directions in the README file in the parent directory from this
+Also see the directions in the README file in the parent directory from this
file (<sword-root>/bindings/README) for directions on building with CMake.
Building the SWIG Bindings
@@ -12,8 +11,6 @@
# Special step for BSD-liks (e.g. Mac OS X):
# edit autogen.sh to remove the "-a" option from cp
-libtoolize --force
-
./autogen.sh
./configure
make
@@ -21,17 +18,18 @@
# Rather than make, you probably only care about one of the languages bindings.
# So you might try one of these pairs of commands instead:
#
-# make perlswig
-# make perl_make
-#
-# make pythonswig
-# make python_make
-#
-
-# Install the perl bindings
+make perlswig
+make perl_make
cd perl
sudo make install
-# Install the python bindings - you may need to run this with sudo
+#
+# or
+#
+
+make pythonswig
+make python_make
cd python
-python setup.py install
+sudo python setup.py install
+
+
Modified: trunk/bindings/swig/package/Makefile.am
===================================================================
--- trunk/bindings/swig/package/Makefile.am 2013-07-06 01:43:36 UTC (rev 2854)
+++ trunk/bindings/swig/package/Makefile.am 2013-07-07 16:40:22 UTC (rev 2855)
@@ -90,7 +90,7 @@
@echo " maintainer_email = \"sword-devel at crosswire.org\"," >> python/setup.py
@echo " url = \"http://www.crosswire.org/sword\"," >> python/setup.py
@echo " py_modules = [\"Sword\"]," >> python/setup.py
- @echo " include_dirs=['..', '../..']," >> python/setup.py
+ @echo " include_dirs=['..', '../..', '../../../../include']," >> python/setup.py
@echo " ext_modules = [Extension(\"_Sword\", [\"Sword.cxx\"]," >> python/setup.py
@echo " libraries=[('sword')], " >> python/setup.py
@echo " )], " >> python/setup.py
Copied: trunk/bindings/swig/package/README (from rev 2854, trunk/bindings/swig/package/README.cvs)
===================================================================
--- trunk/bindings/swig/package/README (rev 0)
+++ trunk/bindings/swig/package/README 2013-07-07 16:40:22 UTC (rev 2855)
@@ -0,0 +1,26 @@
+README
+------
+
+To build the sword bindings for Sword you require
+
+SWIG 1.3 (see http://www.swig.org)
+one of perl, python, tcl, php
+Sword 1.5.8 or newer
+
+First run ./autogen.sh to generate this directory
+Then, e.g.,:
+
+./configure
+make perlswig
+make perl_make
+cd perl
+sudo make install
+
+or
+
+make pythonswig
+make python_make
+cd python
+sudo python setup.py install
+
+
Deleted: trunk/bindings/swig/package/README.cvs
===================================================================
--- trunk/bindings/swig/package/README.cvs 2013-07-06 01:43:36 UTC (rev 2854)
+++ trunk/bindings/swig/package/README.cvs 2013-07-07 16:40:22 UTC (rev 2855)
@@ -1,10 +0,0 @@
-README
-------
-
-To build the sword bindings for Sword you require
-
-SWIG 1.3 (see http://www.swig.org)
-one of perl, python, tcl, php
-Sword 1.5.8
-
-First run ./autogen.sh to generate this directory
Modified: trunk/bindings/swig/package/sword.m4
===================================================================
--- trunk/bindings/swig/package/sword.m4 2013-07-06 01:43:36 UTC (rev 2854)
+++ trunk/bindings/swig/package/sword.m4 2013-07-07 16:40:22 UTC (rev 2855)
@@ -28,7 +28,7 @@
dnl try to find Sword library files
AC_MSG_CHECKING([for Sword library files])
AC_REQUIRE([AC_FIND_ZLIB])
-ac_sword_library_dirs="$ac_sword_dir/lib /usr/lib /usr/lib/sword /usr/local/lib /usr/local/lib/sword /usr/local/sword/lib"
+ac_sword_library_dirs="$ac_sword_dir/lib /usr/lib64 /usr/lib /usr/lib/sword /usr/local/lib /usr/local/lib/sword /usr/local/sword/lib"
if test "$ac_static_sword" = "YES"; then
SEARCH_LIBS="libsword.a";
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2013-07-06 01:43:36 UTC (rev 2854)
+++ trunk/configure.ac 2013-07-07 16:40:22 UTC (rev 2855)
@@ -92,9 +92,9 @@
if test x$enable_debug = xyes; then
GCJFLAGS="-g -O0"
if test x$ac_cv_prog_cc_g = xyes; then
- AM_CFLAGS="-g3 -O0 -Wall -Werror -Woverloaded-virtual"
+ AM_CFLAGS="-g3 -O0 -Wall -Werror"
else
- AM_CFLAGS="-O0 -Wall -Werror -Woverloaded-virtual"
+ AM_CFLAGS="-O0 -Wall -Werror"
fi
if test x$ac_cv_prog_cxx_g = xyes; then
AM_CXXFLAGS="-g3 -O0 -Wall -Werror -Woverloaded-virtual"
@@ -106,6 +106,9 @@
AM_CXXFLAGS="-O3"
fi
+AM_CFLAGS="$AM_CFLAGS -fPIC"
+AM_CXXFLAGS="$AM_CXXFLAGS -fPIC"
+
# ---------------------------------------------------------------------
# Check libraries
# ---------------------------------------------------------------------
@@ -206,7 +209,7 @@
AM_CXXFLAGS="$AM_CXXFLAGS -ftemplate-depth-25"
if test x$enable_warnings = xyes; then
- AM_CFLAGS="$AM_CFLAGS -Werror -Woverloaded-virtual"
+ AM_CFLAGS="$AM_CFLAGS -Werror"
AM_CXXFLAGS="$AM_CXXFLAGS -Werror -Woverloaded-virtual"
fi
@@ -306,9 +309,8 @@
AC_SUBST(enable_debug)
AC_SUBST(enable_profile)
-# TODO: WHY ARE WE SUBST CXXFLAGS BUT NOT CFLAGS? And why, when I uncomment out the cflags subst do we get compile errors?
AC_SUBST(AM_CXXFLAGS)
-#AC_SUBST(AM_CFLAGS)
+AC_SUBST(AM_CFLAGS)
AC_SUBST(target_cpu)
AC_SUBST(target_vendor)
Modified: trunk/src/utilfuns/zlib/untgz.c
===================================================================
--- trunk/src/utilfuns/zlib/untgz.c 2013-07-06 01:43:36 UTC (rev 2854)
+++ trunk/src/utilfuns/zlib/untgz.c 2013-07-07 16:40:22 UTC (rev 2855)
@@ -409,7 +409,7 @@
int untargz(int fd, const char *dest) {
- gzFile *f;
+ gzFile f;
f = gzdopen(fd, "rb");
if (f == NULL) {
More information about the sword-cvs
mailing list