mhs-xapian 1.0.18a
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -0
- data/AUTHORS +1 -0
- data/COPYING +340 -0
- data/ChangeLog +5876 -0
- data/HACKING +101 -0
- data/INSTALL +293 -0
- data/Makefile +722 -0
- data/Makefile.am +26 -0
- data/Makefile.in +722 -0
- data/NEWS +2110 -0
- data/README +59 -0
- data/Rakefile +51 -0
- data/TODO +47 -0
- data/aclocal.m4 +7675 -0
- data/config.guess +1501 -0
- data/config.h +56 -0
- data/config.h.in +55 -0
- data/config.status +1298 -0
- data/config.sub +1705 -0
- data/configure +18536 -0
- data/configure.ac +944 -0
- data/csharp/.deps/xapian_wrap.Plo +1 -0
- data/csharp/AssemblyInfo.cs +40 -0
- data/csharp/AssemblyInfo.cs.in +40 -0
- data/csharp/Auto.cs +46 -0
- data/csharp/BM25Weight.cs +107 -0
- data/csharp/BoolWeight.cs +103 -0
- data/csharp/Database.cs +275 -0
- data/csharp/DateValueRangeProcessor.cs +61 -0
- data/csharp/Document.cs +177 -0
- data/csharp/ESet.cs +94 -0
- data/csharp/ESetIterator.cs +117 -0
- data/csharp/Enquire.cs +274 -0
- data/csharp/ExpandDecider.cs +76 -0
- data/csharp/Flint.cs +58 -0
- data/csharp/InMemory.cs +46 -0
- data/csharp/MSet.cs +193 -0
- data/csharp/MSetIterator.cs +141 -0
- data/csharp/Makefile +868 -0
- data/csharp/Makefile.am +106 -0
- data/csharp/Makefile.in +868 -0
- data/csharp/MatchDecider.cs +76 -0
- data/csharp/MultiValueSorter.cs +63 -0
- data/csharp/NumberValueRangeProcessor.cs +61 -0
- data/csharp/PositionIterator.cs +101 -0
- data/csharp/PostingIterator.cs +125 -0
- data/csharp/Quartz.cs +58 -0
- data/csharp/Query.cs +150 -0
- data/csharp/QueryParser.cs +174 -0
- data/csharp/RSet.cs +102 -0
- data/csharp/Remote.cs +100 -0
- data/csharp/SWIGTYPE_p_std__string.cs +30 -0
- data/csharp/SWIGTYPE_p_std__vectorTXapian__Query_t.cs +30 -0
- data/csharp/SWIGTYPE_p_std__vectorTstd__string_t.cs +30 -0
- data/csharp/SimpleStopper.cs +64 -0
- data/csharp/SmokeTest.cs +178 -0
- data/csharp/Sorter.cs +76 -0
- data/csharp/Stem.cs +66 -0
- data/csharp/Stopper.cs +91 -0
- data/csharp/StringValueRangeProcessor.cs +53 -0
- data/csharp/TermGenerator.cs +152 -0
- data/csharp/TermIterator.cs +125 -0
- data/csharp/TradWeight.cs +107 -0
- data/csharp/ValueIterator.cs +102 -0
- data/csharp/ValueRangeProcessor.cs +76 -0
- data/csharp/Version.cs +60 -0
- data/csharp/Weight.cs +93 -0
- data/csharp/WritableDatabase.cs +153 -0
- data/csharp/Xapian.cs +65 -0
- data/csharp/XapianPINVOKE.cs +1527 -0
- data/csharp/docs/Makefile +450 -0
- data/csharp/docs/Makefile.am +16 -0
- data/csharp/docs/Makefile.in +450 -0
- data/csharp/docs/examples/SimpleExpand.cs +109 -0
- data/csharp/docs/examples/SimpleIndex.cs +71 -0
- data/csharp/docs/examples/SimpleSearch.cs +78 -0
- data/csharp/docs/index.html +211 -0
- data/csharp/util.i +233 -0
- data/csharp/xapian_wrap.cc +10338 -0
- data/csharp/xapian_wrap.h +93 -0
- data/depcomp +632 -0
- data/extconf.rb +20 -0
- data/generic/except.i +80 -0
- data/generic/generic.mk +48 -0
- data/install-sh +520 -0
- data/java-swig/.deps/xapian_wrap.Plo +1 -0
- data/java-swig/Auto.java +35 -0
- data/java-swig/BM25Weight.java +81 -0
- data/java-swig/BoolWeight.java +77 -0
- data/java-swig/Database.java +195 -0
- data/java-swig/DateValueRangeProcessor.java +51 -0
- data/java-swig/Document.java +135 -0
- data/java-swig/ESet.java +71 -0
- data/java-swig/ESetIterator.java +71 -0
- data/java-swig/Enquire.java +246 -0
- data/java-swig/ExpandDecider.java +59 -0
- data/java-swig/Flint.java +43 -0
- data/java-swig/InMemory.java +35 -0
- data/java-swig/MSet.java +143 -0
- data/java-swig/MSetIterator.java +87 -0
- data/java-swig/Makefile +781 -0
- data/java-swig/Makefile.am +132 -0
- data/java-swig/Makefile.in +781 -0
- data/java-swig/MatchDecider.java +59 -0
- data/java-swig/MultiValueSorter.java +51 -0
- data/java-swig/NumberValueRangeProcessor.java +51 -0
- data/java-swig/PositionIterator.java +63 -0
- data/java-swig/PostingIterator.java +83 -0
- data/java-swig/Quartz.java +43 -0
- data/java-swig/Query.java +189 -0
- data/java-swig/QueryParser.java +214 -0
- data/java-swig/RSet.java +79 -0
- data/java-swig/Remote.java +71 -0
- data/java-swig/SWIGTYPE_p_std__string.java +25 -0
- data/java-swig/SimpleStopper.java +51 -0
- data/java-swig/SmokeTest.java +161 -0
- data/java-swig/Sorter.java +59 -0
- data/java-swig/Stem.java +51 -0
- data/java-swig/Stopper.java +63 -0
- data/java-swig/StringValueRangeProcessor.java +43 -0
- data/java-swig/TermGenerator.java +158 -0
- data/java-swig/TermIterator.java +83 -0
- data/java-swig/TradWeight.java +81 -0
- data/java-swig/ValueIterator.java +67 -0
- data/java-swig/ValueRangeProcessor.java +59 -0
- data/java-swig/Version.java +47 -0
- data/java-swig/Weight.java +68 -0
- data/java-swig/WritableDatabase.java +123 -0
- data/java-swig/Xapian.java +39 -0
- data/java-swig/XapianConstants.java +15 -0
- data/java-swig/XapianJNI.java +508 -0
- data/java-swig/run-java-test +6 -0
- data/java-swig/xapian_wrap.cc +12594 -0
- data/java-swig/xapian_wrap.h +91 -0
- data/java/Makefile +660 -0
- data/java/Makefile.am +35 -0
- data/java/Makefile.in +660 -0
- data/java/README +76 -0
- data/java/SmokeTest.java +148 -0
- data/java/native/.deps/Database.Plo +1 -0
- data/java/native/.deps/Document.Plo +1 -0
- data/java/native/.deps/ESet.Plo +1 -0
- data/java/native/.deps/ESetIterator.Plo +1 -0
- data/java/native/.deps/Enquire.Plo +1 -0
- data/java/native/.deps/MSet.Plo +1 -0
- data/java/native/.deps/MSetIterator.Plo +1 -0
- data/java/native/.deps/PositionIterator.Plo +1 -0
- data/java/native/.deps/Query.Plo +1 -0
- data/java/native/.deps/RSet.Plo +1 -0
- data/java/native/.deps/Stem.Plo +1 -0
- data/java/native/.deps/TermIterator.Plo +1 -0
- data/java/native/.deps/WritableDatabase.Plo +1 -0
- data/java/native/.deps/org_xapian_XapianJNI.Plo +1 -0
- data/java/native/.deps/utils.Plo +1 -0
- data/java/native/Database.cc +222 -0
- data/java/native/Document.cc +173 -0
- data/java/native/ESet.cc +79 -0
- data/java/native/ESetIterator.cc +82 -0
- data/java/native/Enquire.cc +271 -0
- data/java/native/MSet.cc +169 -0
- data/java/native/MSetIterator.cc +107 -0
- data/java/native/Makefile +594 -0
- data/java/native/Makefile.am +51 -0
- data/java/native/Makefile.in +594 -0
- data/java/native/PositionIterator.cc +64 -0
- data/java/native/Query.cc +180 -0
- data/java/native/RSet.cc +98 -0
- data/java/native/Stem.cc +75 -0
- data/java/native/TermIterator.cc +107 -0
- data/java/native/WritableDatabase.cc +118 -0
- data/java/native/XapianObjectHolder.h +115 -0
- data/java/native/org_xapian_XapianJNI.cc +78 -0
- data/java/native/org_xapian_XapianJNI.h +1369 -0
- data/java/native/utils.cc +51 -0
- data/java/native/xapian_jni.h +116 -0
- data/java/org/xapian/Database.java +148 -0
- data/java/org/xapian/Document.java +135 -0
- data/java/org/xapian/ESet.java +66 -0
- data/java/org/xapian/ESetIterator.java +97 -0
- data/java/org/xapian/Enquire.java +136 -0
- data/java/org/xapian/ExpandDecider.java +30 -0
- data/java/org/xapian/MSet.java +104 -0
- data/java/org/xapian/MSetIterator.java +132 -0
- data/java/org/xapian/Makefile +580 -0
- data/java/org/xapian/Makefile.am +38 -0
- data/java/org/xapian/Makefile.in +580 -0
- data/java/org/xapian/MatchDecider.java +30 -0
- data/java/org/xapian/PositionIterator.java +89 -0
- data/java/org/xapian/Query.java +190 -0
- data/java/org/xapian/RSet.java +89 -0
- data/java/org/xapian/Stem.java +80 -0
- data/java/org/xapian/TermIterator.java +142 -0
- data/java/org/xapian/WritableDatabase.java +92 -0
- data/java/org/xapian/Xapian.java +114 -0
- data/java/org/xapian/XapianJNI.java +444 -0
- data/java/org/xapian/errors/AssertionError.java +40 -0
- data/java/org/xapian/errors/DatabaseCorruptError.java +40 -0
- data/java/org/xapian/errors/DatabaseError.java +40 -0
- data/java/org/xapian/errors/DatabaseLockError.java +40 -0
- data/java/org/xapian/errors/DatabaseModifiedError.java +40 -0
- data/java/org/xapian/errors/DatabaseOpeningError.java +40 -0
- data/java/org/xapian/errors/DocNotFoundError.java +40 -0
- data/java/org/xapian/errors/FeatureUnavailableError.java +40 -0
- data/java/org/xapian/errors/InternalError.java +40 -0
- data/java/org/xapian/errors/InvalidArgumentError.java +40 -0
- data/java/org/xapian/errors/InvalidOperationError.java +40 -0
- data/java/org/xapian/errors/LogicError.java +40 -0
- data/java/org/xapian/errors/Makefile +416 -0
- data/java/org/xapian/errors/Makefile.am +32 -0
- data/java/org/xapian/errors/Makefile.in +416 -0
- data/java/org/xapian/errors/NetworkError.java +40 -0
- data/java/org/xapian/errors/NetworkTimeoutError.java +40 -0
- data/java/org/xapian/errors/RangeError.java +40 -0
- data/java/org/xapian/errors/RuntimeError.java +40 -0
- data/java/org/xapian/errors/UnimplementedError.java +40 -0
- data/java/org/xapian/errors/XapianError.java +40 -0
- data/java/org/xapian/errors/XapianRuntimeError.java +49 -0
- data/java/org/xapian/examples/Makefile +391 -0
- data/java/org/xapian/examples/Makefile.am +8 -0
- data/java/org/xapian/examples/Makefile.in +391 -0
- data/java/org/xapian/examples/SimpleIndex.java +68 -0
- data/java/org/xapian/examples/SimpleSearch.java +71 -0
- data/java/run-java-test +6 -0
- data/libtool +7618 -0
- data/ltmain.sh +6956 -0
- data/mhs-xapian.gemspec +368 -0
- data/missing +378 -0
- data/php/.deps/xapian_wrap.Plo +1 -0
- data/php/Makefile +871 -0
- data/php/Makefile.am +82 -0
- data/php/Makefile.in +871 -0
- data/php/docs/Makefile +453 -0
- data/php/docs/Makefile.am +19 -0
- data/php/docs/Makefile.in +453 -0
- data/php/docs/examples/simpleexpand.php4 +108 -0
- data/php/docs/examples/simpleexpand.php5 +104 -0
- data/php/docs/examples/simpleindex.php4 +76 -0
- data/php/docs/examples/simpleindex.php5 +73 -0
- data/php/docs/examples/simplesearch.php4 +75 -0
- data/php/docs/examples/simplesearch.php5 +72 -0
- data/php/docs/index.html +313 -0
- data/php/except.i +98 -0
- data/php/php4/php_xapian.h +323 -0
- data/php/php4/xapian.php +32 -0
- data/php/php4/xapian_wrap.cc +27656 -0
- data/php/php5/php_xapian.h +319 -0
- data/php/php5/xapian.php +1566 -0
- data/php/php5/xapian_wrap.cc +24330 -0
- data/php/smoketest.php +246 -0
- data/php/smoketest4.php +84 -0
- data/php/smoketest5.php +79 -0
- data/php/util.i +187 -0
- data/python/.deps/xapian_wrap.Plo +1 -0
- data/python/Makefile +891 -0
- data/python/Makefile.am +105 -0
- data/python/Makefile.in +891 -0
- data/python/doccomments.i +5134 -0
- data/python/docs/Makefile +448 -0
- data/python/docs/Makefile.am +14 -0
- data/python/docs/Makefile.in +448 -0
- data/python/docs/examples/simpleexpand.py +98 -0
- data/python/docs/examples/simpleindex.py +65 -0
- data/python/docs/examples/simplematchdecider.py +78 -0
- data/python/docs/examples/simplesearch.py +65 -0
- data/python/docs/index.html +420 -0
- data/python/except.i +290 -0
- data/python/extra.i +1048 -0
- data/python/extracomments.i +28 -0
- data/python/generate-python-exceptions +189 -0
- data/python/generate-python-exceptions.in +189 -0
- data/python/modern/xapian.py +5662 -0
- data/python/modern/xapian_wrap.cc +35170 -0
- data/python/modern/xapian_wrap.h +244 -0
- data/python/pythontest.py +1110 -0
- data/python/smoketest.py +328 -0
- data/python/testsuite.py +382 -0
- data/python/util.i +517 -0
- data/ruby/.deps/xapian_wrap.Plo +494 -0
- data/ruby/.libs/_xapian.bundle +0 -0
- data/ruby/.libs/_xapian.bundle.dSYM/Contents/Info.plist +25 -0
- data/ruby/.libs/_xapian.bundle.dSYM/Contents/Resources/DWARF/_xapian.bundle +0 -0
- data/ruby/.libs/_xapian.la +35 -0
- data/ruby/.libs/_xapian.lai +35 -0
- data/ruby/Makefile +854 -0
- data/ruby/Makefile.am +62 -0
- data/ruby/Makefile.in +854 -0
- data/ruby/_xapian.la +35 -0
- data/ruby/docs/Makefile +487 -0
- data/ruby/docs/Makefile.am +50 -0
- data/ruby/docs/Makefile.in +487 -0
- data/ruby/docs/examples/simpleexpand.rb +98 -0
- data/ruby/docs/examples/simpleindex.rb +60 -0
- data/ruby/docs/examples/simplematchdecider.rb +74 -0
- data/ruby/docs/examples/simplesearch.rb +63 -0
- data/ruby/docs/index.html +197 -0
- data/ruby/smoketest.rb +211 -0
- data/ruby/util.i +232 -0
- data/ruby/xapian.rb +280 -0
- data/ruby/xapian_wrap.cc +25837 -0
- data/ruby/xapian_wrap.h +65 -0
- data/ruby/xapian_wrap.lo +12 -0
- data/skiptest +2 -0
- data/stamp-h1 +1 -0
- data/tcl8/.deps/xapian_wrap.Plo +1 -0
- data/tcl8/Makefile +835 -0
- data/tcl8/Makefile.am +49 -0
- data/tcl8/Makefile.in +835 -0
- data/tcl8/docs/Makefile +448 -0
- data/tcl8/docs/Makefile.am +14 -0
- data/tcl8/docs/Makefile.in +448 -0
- data/tcl8/docs/examples/simpleexpand.tcl +104 -0
- data/tcl8/docs/examples/simpleindex.tcl +68 -0
- data/tcl8/docs/examples/simplesearch.tcl +66 -0
- data/tcl8/docs/index.html +208 -0
- data/tcl8/except.i +48 -0
- data/tcl8/pkgIndex.tcl +1 -0
- data/tcl8/pkgIndex.tcl.in +1 -0
- data/tcl8/run-tcl-test +15 -0
- data/tcl8/runtest.tcl +29 -0
- data/tcl8/smoketest.tcl +155 -0
- data/tcl8/util.i +76 -0
- data/tcl8/xapian_wrap.cc +20900 -0
- data/xapian-bindings.spec +206 -0
- data/xapian-bindings.spec.in +206 -0
- data/xapian-version.h +1 -0
- data/xapian-version.h.in +1 -0
- data/xapian.i +939 -0
- metadata +395 -0
data/configure.ac
ADDED
@@ -0,0 +1,944 @@
|
|
1
|
+
dnl Process this file with autoconf to produce a configure script.
|
2
|
+
|
3
|
+
AC_INIT([xapian-bindings], [1.0.18], [http://xapian.org/bugs])
|
4
|
+
dnl See HACKING document for details of the reasons for required versions.
|
5
|
+
AC_PREREQ([2.59])
|
6
|
+
AM_INIT_AUTOMAKE([1.9 -Wportability tar-ustar])
|
7
|
+
|
8
|
+
AC_CONFIG_SRCDIR(xapian.i)
|
9
|
+
|
10
|
+
AC_CONFIG_HEADERS(config.h)
|
11
|
+
|
12
|
+
dnl Mac OS X needs MACOSX_DEPLOYMENT_TARGET set to 10.3 (or higher) to
|
13
|
+
dnl successfully link the SWIG generated modules. The link always fails
|
14
|
+
dnl on earlier versions of Mac OS X (10.1.4 and 10.2.8 tested), so always
|
15
|
+
dnl setting MACOSX_DEPLOYMENT_TARGET to at least 10.3 seems to be the
|
16
|
+
dnl appropriate thing to do. Most Mac OS X developers will have upgraded
|
17
|
+
dnl from 10.1 and 10.2 by now anyhow.
|
18
|
+
dnl
|
19
|
+
dnl NB we must do this *BEFORE* AC_PROG_LIBTOOL since that is what checks
|
20
|
+
dnl MACOSX_DEPLOYMENT_TARGET.
|
21
|
+
AC_CANONICAL_HOST
|
22
|
+
OVERRIDE_MACOSX_DEPLOYMENT_TARGET=
|
23
|
+
NEED_JNILIB_EXT=no
|
24
|
+
case $host_os in
|
25
|
+
darwin*)
|
26
|
+
case $MACOSX_DEPLOYMENT_TARGET in
|
27
|
+
"")
|
28
|
+
OVERRIDE_MACOSX_DEPLOYMENT_TARGET=10.3 ;;
|
29
|
+
10.[[012]])
|
30
|
+
AC_MSG_WARN([Overriding MACOSX_DEPLOYMENT_TARGET from $MACOSX_DEPLOYMENT_TARGET to 10.3])
|
31
|
+
OVERRIDE_MACOSX_DEPLOYMENT_TARGET=10.3 ;;
|
32
|
+
esac
|
33
|
+
NEED_JNILIB_EXT=yes
|
34
|
+
;;
|
35
|
+
esac
|
36
|
+
AM_CONDITIONAL(OVERRIDE_MACOSX_DEPLOYMENT_TARGET, test -n "$OVERRIDE_MACOSX_DEPLOYMENT_TARGET")
|
37
|
+
AC_SUBST(OVERRIDE_MACOSX_DEPLOYMENT_TARGET)
|
38
|
+
if test -n "$OVERRIDE_MACOSX_DEPLOYMENT_TARGET" ; then
|
39
|
+
MACOSX_DEPLOYMENT_TARGET=$OVERRIDE_MACOSX_DEPLOYMENT_TARGET
|
40
|
+
fi
|
41
|
+
AM_CONDITIONAL(NEED_JNILIB_EXT, test yes = "$NEED_JNILIB_EXT")
|
42
|
+
|
43
|
+
dnl We don't use Fortran, but libtool 1.5 insists on probing for f77 which just
|
44
|
+
dnl makes configure take longer to run. We force it not to using the method
|
45
|
+
dnl suggested here (which also reduces configure size):
|
46
|
+
dnl http://article.gmane.org/gmane.comp.gnu.libtool.general/9281
|
47
|
+
dnl This is apparently fixed in libtool 2.2, so once we require that, we can
|
48
|
+
dnl drop this workaround.
|
49
|
+
define([AC_LIBTOOL_LANG_F77_CONFIG], [:])
|
50
|
+
dnl Eliminating the unused code for gcj and rc probes further reduces the size
|
51
|
+
dnl of the generated configure script (by 29% in total):
|
52
|
+
define([AC_LIBTOOL_LANG_GCJ_CONFIG], [:])
|
53
|
+
define([AC_LIBTOOL_LANG_RC_CONFIG], [:])
|
54
|
+
|
55
|
+
dnl Use libtool to manage our libraries, but don't build static libraries as
|
56
|
+
dnl the bindings only have a use for dynamic ones.
|
57
|
+
AC_DISABLE_STATIC
|
58
|
+
AC_PROG_LIBTOOL
|
59
|
+
|
60
|
+
dnl -no-undefined causes problems on Mac OS X with at least some
|
61
|
+
dnl MACOSX_DEPLOYMENT_TARGET settings, so only pass -no-undefined on
|
62
|
+
dnl platforms where it is required in order to link a shared library at
|
63
|
+
dnl all (Windows is the main one).
|
64
|
+
NO_UNDEFINED=
|
65
|
+
if test unsupported = "$allow_undefined_flag" ; then
|
66
|
+
NO_UNDEFINED=-no-undefined
|
67
|
+
fi
|
68
|
+
AC_SUBST(NO_UNDEFINED)
|
69
|
+
|
70
|
+
dnl Checks for programs.
|
71
|
+
AC_PROG_CXX
|
72
|
+
|
73
|
+
dnl Run tests using the C++ compiler.
|
74
|
+
AC_LANG_CPLUSPLUS
|
75
|
+
|
76
|
+
dnl Check for libxapian
|
77
|
+
XO_LIB_XAPIAN
|
78
|
+
|
79
|
+
dnl We want XAPIAN_CXXFLAGS to be used for configure tests, so set AM_CXXFLAGS
|
80
|
+
dnl here and unset them later.
|
81
|
+
AM_CXXFLAGS=$XAPIAN_CXXFLAGS
|
82
|
+
|
83
|
+
dnl COMPAT_VERSION is the version of xapian-core that "matches" our version.
|
84
|
+
dnl We allow for bindings being version 0.8.5.1 while xapian-core is 0.8.5.
|
85
|
+
dnl COMPAT_VERSION also ignores any _svn6789 suffix which snapshots will have.
|
86
|
+
COMPAT_VERSION=[`echo "$PACKAGE_VERSION"|sed 's/^\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/'`]
|
87
|
+
AC_SUBST(COMPAT_VERSION)
|
88
|
+
|
89
|
+
dnl VERSION_NO_SNAPSHOT simply has any _svn6789 suffix removed.
|
90
|
+
VERSION_NO_SNAPSHOT=[`echo "$PACKAGE_VERSION"|sed 's/_svn[0-9]*$//'`]
|
91
|
+
AC_SUBST(VERSION_NO_SNAPSHOT)
|
92
|
+
|
93
|
+
dnl We only need to set docdir for compatibility with autoconf < 2.60 - this
|
94
|
+
dnl code can be removed once we move to requiring autoconf 2.60 or newer.
|
95
|
+
test -n "$docdir" || docdir='${datadir}/doc/${PACKAGE_TARNAME}'
|
96
|
+
AC_SUBST(docdir)
|
97
|
+
|
98
|
+
AC_ARG_ENABLE(quiet,
|
99
|
+
[AS_HELP_STRING([--enable-quiet], [enable quiet building [default=no]])],
|
100
|
+
[case ${enableval} in
|
101
|
+
yes|no) ;;
|
102
|
+
*) AC_MSG_ERROR([bad value ${enableval} for --enable-quiet]) ;;
|
103
|
+
esac])
|
104
|
+
|
105
|
+
dnl Only probe for SWIG and enable SWIG rules in makefiles if
|
106
|
+
dnl configure --enable-maintainer-mode is used.
|
107
|
+
AM_MAINTAINER_MODE
|
108
|
+
|
109
|
+
AC_ARG_ENABLE(documentation,
|
110
|
+
[AS_HELP_STRING([--enable-documentation], [enable make rules to rebuild documentation [default=maintainer-mode]])],
|
111
|
+
[case ${enableval} in
|
112
|
+
yes|no) ;;
|
113
|
+
*) AC_MSG_ERROR([bad value ${enableval} for --enable-documentation]) ;;
|
114
|
+
esac])
|
115
|
+
test -z "$enable_documentation" && enable_documentation=$USE_MAINTAINER_MODE
|
116
|
+
AM_CONDITIONAL(DOCUMENTATION_RULES, test x"$enable_documentation" = xyes)
|
117
|
+
AM_CONDITIONAL(MAINTAINER_NO_DOCS, test x"$USE_MAINTAINER_MODE$enable_documentation" = xyesno)
|
118
|
+
|
119
|
+
if test x$USE_MAINTAINER_MODE = xyes; then
|
120
|
+
dnl Check for swig - this does most of the work for the bindings.
|
121
|
+
dnl AC_PATH_PROGS only honours an already set SWIG if it's a full
|
122
|
+
dnl path. Listing it in the "to be searched" list like this allows
|
123
|
+
dnl ./configure SWIG=myswig to work.
|
124
|
+
swigoverridden=${SWIG+yes}
|
125
|
+
AC_PATH_PROGS(SWIG, ["${SWIG-swig}"], [])
|
126
|
+
AC_ARG_VAR(SWIG, [SWIG interface generator (only needed by Xapian developers)])
|
127
|
+
if test -z "$SWIG" ; then
|
128
|
+
AC_MSG_ERROR([Can't find SWIG utility])
|
129
|
+
fi
|
130
|
+
dnl Check for swig >= 1.3.33 (SVN rev 10143):
|
131
|
+
dnl
|
132
|
+
dnl 1.3.30 produces class wrappers for PHP5
|
133
|
+
dnl 1.3.32 fixes PHP5 wrappers for overloaded forms with default arguments,
|
134
|
+
dnl memory leaks for PHP4 and PHP5, some problems with ZTS-enabled PHP builds
|
135
|
+
dnl (noted on Windows; Linux builds of PHP generally don't enable ZTS), and
|
136
|
+
dnl several other issues.
|
137
|
+
v=`$SWIG -version 2>&1|sed 's/^SWIG Version \([[0-9\.]]*\).*/\1/p;d'`
|
138
|
+
case $v in
|
139
|
+
[1.3.[3-9][0-9]|1.3.[1-9][0-9][0-9][0-9]*|1.[4-9].*|2.*]) ;;
|
140
|
+
*)
|
141
|
+
msg="SWIG >= 1.3.33 (SVN rev 10143 or later) required (you have ${v:-an unknown version})"
|
142
|
+
if test -n "$swigoverridden" ; then
|
143
|
+
dnl If SWIG was explicitly set, make this a warning only.
|
144
|
+
AC_MSG_WARN([$msg])
|
145
|
+
else
|
146
|
+
AC_MSG_ERROR([$msg])
|
147
|
+
fi ;;
|
148
|
+
esac
|
149
|
+
SWIG_FLAGS="`$XAPIAN_CONFIG --swigflags` -Werror"
|
150
|
+
AC_SUBST(SWIG_FLAGS)
|
151
|
+
|
152
|
+
dnl Need perl in maintainer mode to generate the except.i file for python.
|
153
|
+
AC_PATH_PROGS(PERL, ["${PERL-perl}"], [])
|
154
|
+
test -z "$PERL" && AC_MSG_ERROR([perl is required in maintainer mode])
|
155
|
+
fi
|
156
|
+
|
157
|
+
AC_ARG_WITH(python,
|
158
|
+
AC_HELP_STRING([--with-python], [enable Python bindings]),
|
159
|
+
[],
|
160
|
+
[with_python=])
|
161
|
+
|
162
|
+
AC_ARG_WITH(php,
|
163
|
+
AC_HELP_STRING([--with-php], [enable PHP bindings]),
|
164
|
+
[],
|
165
|
+
[with_php=])
|
166
|
+
|
167
|
+
AC_ARG_WITH(ruby,
|
168
|
+
AC_HELP_STRING([--with-ruby], [enable Ruby bindings]),
|
169
|
+
[],
|
170
|
+
[with_ruby=])
|
171
|
+
|
172
|
+
AC_ARG_WITH(tcl,
|
173
|
+
AC_HELP_STRING([--with-tcl], [enable Tcl bindings]),
|
174
|
+
[],
|
175
|
+
[with_tcl=])
|
176
|
+
|
177
|
+
dnl Guile support doesn't currently work, so avoid user disappointment by
|
178
|
+
dnl not advertising it in "./configure --help"
|
179
|
+
dnl AC_ARG_WITH(guile,
|
180
|
+
dnl AC_HELP_STRING([--with-guile], [enable Guile bindings]),
|
181
|
+
dnl [],
|
182
|
+
dnl [with_guile=])
|
183
|
+
with_guile=no
|
184
|
+
|
185
|
+
AC_ARG_WITH(csharp,
|
186
|
+
AC_HELP_STRING([--with-csharp], [enable CSharp bindings]),
|
187
|
+
[],
|
188
|
+
[with_csharp=])
|
189
|
+
|
190
|
+
AC_ARG_WITH(java,
|
191
|
+
AC_HELP_STRING([--with-java], [enable Java bindings]),
|
192
|
+
[],
|
193
|
+
[with_java=])
|
194
|
+
|
195
|
+
case $with_python$with_php$with_ruby$with_tcl$with_guile$with_csharp$with_java in
|
196
|
+
*yes*)
|
197
|
+
dnl Default unspecified values to no.
|
198
|
+
test -z "$with_python" && with_python=no
|
199
|
+
test -z "$with_php" && with_php=no
|
200
|
+
test -z "$with_tcl" && with_tcl=no
|
201
|
+
test -z "$with_guile" && with_guile=no
|
202
|
+
test -z "$with_csharp" && with_csharp=no
|
203
|
+
test -z "$with_java" && with_java=no
|
204
|
+
test -z "$with_ruby" && with_ruby=no
|
205
|
+
;;
|
206
|
+
esac
|
207
|
+
|
208
|
+
BINDINGS=
|
209
|
+
|
210
|
+
if test no != "$with_python" ; then
|
211
|
+
dnl See comment for AC_PATH_PROGS(SWIG, ...).
|
212
|
+
AC_PATH_PROGS(PYTHON, ["${PYTHON-python}"], [])
|
213
|
+
AC_ARG_VAR(PYTHON, [Python interpreter])
|
214
|
+
if test -n "$PYTHON" ; then
|
215
|
+
dnl Require Python 2.2 or newer. We need 2.2 to use SWIG's -modern option,
|
216
|
+
dnl for Pythonic iterator support, and it's now > 4.5 years since the last
|
217
|
+
dnl 2.1.x release and 2.5 is out.
|
218
|
+
AC_MSG_CHECKING([$PYTHON version])
|
219
|
+
version=`$PYTHON -c 'import sys;print(sys.version[[:3]])' 2>/dev/null`
|
220
|
+
case $version in
|
221
|
+
[2.[2-9]*|2.1[0-9]*|[3-9].*])
|
222
|
+
;;
|
223
|
+
*)
|
224
|
+
AC_MSG_RESULT([$version (too old)])
|
225
|
+
if test yes = "$with_python" ; then
|
226
|
+
AC_MSG_ERROR([Only python 2.2 or newer is supported ($python is $version)])
|
227
|
+
fi
|
228
|
+
PYTHON=
|
229
|
+
;;
|
230
|
+
esac
|
231
|
+
AC_MSG_RESULT([$version])
|
232
|
+
if test -n "$PYTHON" ; then
|
233
|
+
if $PYTHON -c 'import distutils.sysconfig' 2>/dev/null ; then
|
234
|
+
PYTHON_INC=`$PYTHON -c 'import os,distutils.sysconfig;print(distutils.sysconfig.get_python_inc().replace(os.sep,"/"))'`
|
235
|
+
AC_SUBST(PYTHON_INC)
|
236
|
+
else
|
237
|
+
if test yes = "$with_python" ; then
|
238
|
+
AC_MSG_ERROR([Couldn't import Python module distutils.sysconfig - you probably need to install a python-dev or python-devel package])
|
239
|
+
else
|
240
|
+
AC_MSG_WARN([Couldn't import Python module distutils.sysconfig - you probably don't have a python-dev or python-devel package installed])
|
241
|
+
PYTHON=
|
242
|
+
fi
|
243
|
+
fi
|
244
|
+
fi
|
245
|
+
if test -n "$PYTHON" ; then
|
246
|
+
dnl Check that Python.h is there, which is a good way to check that
|
247
|
+
dnl the appropriate python-dev package has been installed.
|
248
|
+
AC_MSG_CHECKING([for $PYTHON_INC/Python.h])
|
249
|
+
if test -f "$PYTHON_INC/Python.h" ; then
|
250
|
+
AC_MSG_RESULT(yes)
|
251
|
+
AC_MSG_CHECKING([for directory to install python bindings in])
|
252
|
+
if test -z "$PYTHON_LIB" ; then
|
253
|
+
PYTHON_LIB=`$PYTHON -c 'import os,distutils.sysconfig;print(distutils.sysconfig.get_python_lib(1).replace(os.sep,"/"))'`
|
254
|
+
fi
|
255
|
+
AC_MSG_RESULT([$PYTHON_LIB])
|
256
|
+
AC_ARG_VAR(PYTHON_LIB, [Directory to install python bindings in])
|
257
|
+
|
258
|
+
AC_MSG_CHECKING([for python libraries to link against])
|
259
|
+
case $host_os in
|
260
|
+
mingw* | pw32*)
|
261
|
+
PYTHON_LIBS=`$PYTHON -c 'import os,sys;print("-L"+os.path.join(sys.prefix,"libs").replace(os.sep,"/")+" -lpython"+sys.version[[:3]].replace(".",""))'` ;;
|
262
|
+
cygwin*)
|
263
|
+
PYTHON_LIBS=`$PYTHON -c 'import os,sys;print("-L"+os.path.join(sys.path[[3]],"config")+" -lpython"+sys.version[[:3]]')` ;;
|
264
|
+
*)
|
265
|
+
PYTHON_LIBS= ;;
|
266
|
+
esac
|
267
|
+
AC_SUBST(PYTHON_LIBS)
|
268
|
+
AC_MSG_RESULT([$PYTHON_LIBS])
|
269
|
+
|
270
|
+
AC_MSG_CHECKING([for python module extension])
|
271
|
+
dnl Usually ".so", but for example, Mac OS X uses ".dylib".
|
272
|
+
PYTHON_SO=`$PYTHON -c 'import distutils.sysconfig;print(distutils.sysconfig.get_config_vars("SO")[[0]])'`
|
273
|
+
AC_SUBST(PYTHON_SO)
|
274
|
+
AC_MSG_RESULT([$PYTHON_SO])
|
275
|
+
|
276
|
+
BINDINGS="$BINDINGS python"
|
277
|
+
else
|
278
|
+
AC_MSG_RESULT([no (install python-dev or python-devel package or similar)])
|
279
|
+
if test yes = "$with_python" ; then
|
280
|
+
AC_MSG_ERROR([Python.h not found])
|
281
|
+
fi
|
282
|
+
fi
|
283
|
+
fi
|
284
|
+
fi
|
285
|
+
fi
|
286
|
+
|
287
|
+
if test no != "$with_php" ; then
|
288
|
+
dnl See comment for AC_PATH_PROGS(SWIG, ...).
|
289
|
+
AC_PATH_PROGS(PHP_CONFIG, ["${PHP_CONFIG-php-config}"], [])
|
290
|
+
AC_ARG_VAR(PHP_CONFIG, [php-config utility])
|
291
|
+
AC_ARG_VAR(PHP, [php interpreter (optional - only needed to run PHP testsuite with)])
|
292
|
+
if test -n "$PHP_CONFIG" ; then
|
293
|
+
AC_MSG_CHECKING([$PHP_CONFIG version])
|
294
|
+
version=`$PHP_CONFIG --version 2>/dev/null`
|
295
|
+
case $version in
|
296
|
+
4.*)
|
297
|
+
AC_MSG_RESULT([$version])
|
298
|
+
PHP_MAJOR_VERSION=4
|
299
|
+
;;
|
300
|
+
5.*)
|
301
|
+
AC_MSG_RESULT([$version])
|
302
|
+
PHP_MAJOR_VERSION=5
|
303
|
+
;;
|
304
|
+
*)
|
305
|
+
AC_MSG_RESULT([$version (not supported)])
|
306
|
+
if test yes = "$with_php" ; then
|
307
|
+
AC_MSG_ERROR([Only PHP4 and PHP5 are supported ($PHP_CONFIG reports version $version)])
|
308
|
+
fi
|
309
|
+
with_php=no
|
310
|
+
;;
|
311
|
+
esac
|
312
|
+
AC_SUBST(PHP_MAJOR_VERSION)
|
313
|
+
|
314
|
+
if test no != "$with_php" ; then
|
315
|
+
AC_MSG_CHECKING([for PHP extension directory])
|
316
|
+
if test -z "$PHP_EXTENSION_DIR" ; then
|
317
|
+
PHP_EXTENSION_DIR=`$PHP_CONFIG --extension-dir`
|
318
|
+
fi
|
319
|
+
AC_MSG_RESULT([$PHP_EXTENSION_DIR])
|
320
|
+
AC_ARG_VAR(PHP_EXTENSION_DIR, [Directory to install PHP extensions in])
|
321
|
+
fi
|
322
|
+
|
323
|
+
if test no != "$with_php" ; then
|
324
|
+
PHP_INC=`$PHP_CONFIG --includes`
|
325
|
+
AC_SUBST(PHP_INC)
|
326
|
+
save_CPPFLAGS=$CPPFLAGS
|
327
|
+
CPPFLAGS="$CPPFLAGS $PHP_INC"
|
328
|
+
dnl One of SGI's SuSE boxes has php-config but no headers.
|
329
|
+
AC_CHECK_HEADER(zend.h, [], [
|
330
|
+
if test yes = "$with_php" ; then
|
331
|
+
AC_MSG_ERROR(['$PHP_CONFIG --includes' reports '$PHP_INC' but zend.h can't be included from there])
|
332
|
+
fi
|
333
|
+
with_php=no], [ ])
|
334
|
+
CPPFLAGS=$save_CPPFLAGS
|
335
|
+
fi
|
336
|
+
|
337
|
+
if test no != "$with_php" ; then
|
338
|
+
PHP_found=no
|
339
|
+
case $PHP in
|
340
|
+
"")
|
341
|
+
dnl PHP5's php-config has --php-binary which gives the path to the
|
342
|
+
dnl PHP interpreter. Otherwise, try "$prefix/bin/php$N" then
|
343
|
+
dnl "$prefix/bin/php".
|
344
|
+
php_prefix=`$PHP_CONFIG --prefix 2>/dev/null`
|
345
|
+
php_bin=$php_prefix/bin/php
|
346
|
+
php_binary=
|
347
|
+
if $PHP_CONFIG --php_binary > /dev/null 2>&1 ; then
|
348
|
+
php_binary=`$PHP_CONFIG --php-binary 2>/dev/null`
|
349
|
+
fi
|
350
|
+
for php in $php_binary $php_bin$PHP_MAJOR_VERSION $php_bin ; do
|
351
|
+
AC_MSG_CHECKING([for $php])
|
352
|
+
for ac_exec_ext in '' $ac_executable_extensions; do
|
353
|
+
if $as_executable_p "$php$ac_exec_ext"; then
|
354
|
+
PHP=$php$ac_exec_ext
|
355
|
+
AC_MSG_RESULT([$PHP])
|
356
|
+
PHP_found=yes
|
357
|
+
break 2
|
358
|
+
fi
|
359
|
+
done
|
360
|
+
AC_MSG_RESULT([no])
|
361
|
+
done
|
362
|
+
;;
|
363
|
+
[[\\/]* | ?:[\\/]*]) ;;
|
364
|
+
*)
|
365
|
+
dnl Handle PHP passed in without a path - e.g. PHP=php5
|
366
|
+
AC_PATH_PROGS(PHP, ["$PHP"], [])
|
367
|
+
test -n "$PHP" && PHP_found=yes
|
368
|
+
;;
|
369
|
+
esac
|
370
|
+
if test yes != "$PHP_found" ; then
|
371
|
+
dnl Try phpN then php. If the PHP interpreter can't be found, skip the
|
372
|
+
dnl PHP bindings tests.
|
373
|
+
AC_PATH_PROGS(PHP, [php$PHP_MAJOR_VERSION php], [\$(top_srcdir)/skiptest])
|
374
|
+
fi
|
375
|
+
if test -z "$PHP" ; then
|
376
|
+
AC_MSG_WARN([No PHP interpreter found - PHP bindings tests will be skipped])
|
377
|
+
fi
|
378
|
+
|
379
|
+
case $host_os in
|
380
|
+
mingw* | pw32*)
|
381
|
+
dnl This is a bit of an informed guess, pending more information from
|
382
|
+
dnl someone who actually has mingw and wants to build the PHP bindings
|
383
|
+
dnl there. FIXME.
|
384
|
+
PHP_LIBS="-L`$PHP_CONFIG --prefix` -lphp${PHP_MAJOR_VERSION}ts" ;;
|
385
|
+
cygwin*)
|
386
|
+
PHP_LIBS="-lphp${PHP_MAJOR_VERSION}lib" ;;
|
387
|
+
*)
|
388
|
+
PHP_LIBS= ;;
|
389
|
+
esac
|
390
|
+
AC_SUBST(PHP_LIBS)
|
391
|
+
BINDINGS="$BINDINGS php"
|
392
|
+
fi
|
393
|
+
fi
|
394
|
+
fi
|
395
|
+
|
396
|
+
if test no != "$with_tcl" ; then
|
397
|
+
AC_PATH_PROGS(TCLSH, ["${TCLSH-tclsh}"], [])
|
398
|
+
AC_ARG_VAR(TCLSH, [Tcl interpreter])
|
399
|
+
if test -n "$TCLSH" ; then
|
400
|
+
dnl We need Tcl 8.1 or later for TCL_STUBS.
|
401
|
+
dnl Note: The bindings can easily be made to work with Tcl 8.0 (just
|
402
|
+
dnl don't pass -DUSE_TCL_STUBS when compiling) should you need that.
|
403
|
+
AC_MSG_CHECKING([$TCLSH version])
|
404
|
+
if echo 'if {$tcl_version < 8.1 } { exit 1 }'|$TCLSH 2> /dev/null ; then
|
405
|
+
tcl_version=`echo 'puts "$tcl_version"'|$TCLSH`
|
406
|
+
AC_MSG_RESULT([$tcl_version])
|
407
|
+
|
408
|
+
AC_ARG_VAR(TCL_LIB, [Directory to install Tcl files into])
|
409
|
+
if test -z "$TCL_LIB" ; then
|
410
|
+
[TCL_LIB=`echo 'foreach d $tcl_pkgPath {if {![regexp {/share(/|$)} $d]} {break}};puts $d'|$TCLSH`]
|
411
|
+
fi
|
412
|
+
AC_SUBST(TCL_LIB)
|
413
|
+
|
414
|
+
dnl There's no obvious way to get "/usr/include/tcl8.N" directly, so
|
415
|
+
dnl first we find the prefix Tcl is installed under (e.g. "/usr") from
|
416
|
+
dnl the path on TCLSH (or default to /usr if the path doesn't contain
|
417
|
+
dnl "/bin/"), and then we add "/include/tcl" and $tcl_version.
|
418
|
+
tcl_prefix=`echo "$TCLSH"|sed 's!/bin/.*!!p;d'`
|
419
|
+
test -n "$tcl_prefix" || tcl_prefix=/usr
|
420
|
+
TCL_INC=${tcl_prefix}/include/tcl${tcl_version}
|
421
|
+
|
422
|
+
dnl Check that the headers are there (the tcl8.N-dev package
|
423
|
+
dnl may not be installed).
|
424
|
+
TCL_CPPFLAGS=
|
425
|
+
AC_MSG_CHECKING([for tcl.h for version $tcl_version])
|
426
|
+
if test -f "$TCL_INC/tcl.h" ; then
|
427
|
+
AC_MSG_RESULT([$TCL_INC/tcl.h])
|
428
|
+
BINDINGS="$BINDINGS tcl8"
|
429
|
+
TCL_CPPFLAGS="-I$TCL_INC"
|
430
|
+
elif test -f "/usr/include/tcl.h" ; then
|
431
|
+
tcl_hdr_version=`awk '($1 == "#define" && $2 == "TCL_VERSION") {print $3}' /usr/include/tcl.h`
|
432
|
+
if test x"$tcl_hdr_version" = x'"'"$tcl_version"'"' ; then
|
433
|
+
AC_MSG_RESULT([/usr/include/tcl.h])
|
434
|
+
BINDINGS="$BINDINGS tcl8"
|
435
|
+
else
|
436
|
+
AC_MSG_RESULT([not found])
|
437
|
+
if test yes = "$with_tcl" ; then
|
438
|
+
AC_MSG_ERROR([Can't find tcl.h for version $tcl_version])
|
439
|
+
fi
|
440
|
+
fi
|
441
|
+
else
|
442
|
+
AC_MSG_RESULT([not found])
|
443
|
+
if test yes = "$with_tcl" ; then
|
444
|
+
AC_MSG_ERROR([Can't find tcl.h])
|
445
|
+
fi
|
446
|
+
fi
|
447
|
+
|
448
|
+
dnl Cygwin needs to link with -ltcl8.5 or similar.
|
449
|
+
TCL_LIBS=
|
450
|
+
case $host_os in
|
451
|
+
cygwin*)
|
452
|
+
AC_CHECK_LIB([tcl$tcl_version], [Tcl_Init],
|
453
|
+
[TCL_LIBS="-ltcl$tcl_version"],
|
454
|
+
[AC_MSG_ERROR([libtcl$tcl_version not found])])
|
455
|
+
;;
|
456
|
+
*)
|
457
|
+
TCL_CPPFLAGS="$TCL_CPPFLAGS -DUSE_TCL_STUBS" ;;
|
458
|
+
esac
|
459
|
+
AC_SUBST(TCL_CPPFLAGS)
|
460
|
+
AC_SUBST(TCL_LIBS)
|
461
|
+
else
|
462
|
+
AC_MSG_RESULT([< 8.1 (too old)])
|
463
|
+
if test yes = "$with_tcl" ; then
|
464
|
+
AC_MSG_ERROR([$TCLSH too old (Tcl 8.1 or newer required)])
|
465
|
+
fi
|
466
|
+
fi
|
467
|
+
else
|
468
|
+
if test yes = "$with_tcl" ; then
|
469
|
+
AC_MSG_ERROR([tclsh not found])
|
470
|
+
fi
|
471
|
+
fi
|
472
|
+
fi
|
473
|
+
|
474
|
+
dnl if test yes = "$with_guile" ; then
|
475
|
+
dnl AC_PATH_PROGS(GUILE, ["${GUILE-guile}"], [])
|
476
|
+
dnl AC_ARG_VAR(GUILE, [guile interpreter])
|
477
|
+
dnl if test -n "$GUILE" ; then
|
478
|
+
dnl dnl test guile version?
|
479
|
+
dnl dnl any paths?
|
480
|
+
dnl BINDINGS="$BINDINGS guile"
|
481
|
+
dnl else
|
482
|
+
dnl if test yes = "$with_guile" ; then
|
483
|
+
dnl AC_MSG_ERROR([guile not found])
|
484
|
+
dnl fi
|
485
|
+
dnl fi
|
486
|
+
dnl fi
|
487
|
+
|
488
|
+
if test no != "$with_csharp" ; then
|
489
|
+
csc_note=
|
490
|
+
AC_ARG_VAR(CSC, [CSharp compiler command])
|
491
|
+
if test -n "$CSC" ; then
|
492
|
+
AC_PATH_PROGS(CSC, ["$CSC"], [])
|
493
|
+
fi
|
494
|
+
if test -z "$CSC" ; then
|
495
|
+
dnl gmcs is the newer name for the Mono CSharp compiler.
|
496
|
+
dnl cscc is the Portable.NET CSharp compiler.
|
497
|
+
AC_PATH_PROGS(CSC, [gmcs cscc], [])
|
498
|
+
if test -z "$CSC" ; then
|
499
|
+
dnl csc is the Microsoft CSharp compiler.
|
500
|
+
AC_PATH_PROGS(CSC, [csc], [])
|
501
|
+
if test -n "$CSC" ; then
|
502
|
+
dnl Chicken (the Scheme-to-C compiler) includes a tool called csc so we
|
503
|
+
dnl check if the output from "csc -version" includes the word chicken
|
504
|
+
dnl which is sufficient to distinguish Chicken's csc from Microsoft's
|
505
|
+
dnl csc.exe.
|
506
|
+
AC_MSG_CHECKING([whether $CSC is for CSharp])
|
507
|
+
csc_tmp=`$CSC -version 2>/dev/null|grep chicken`
|
508
|
+
if test -z "$csc_tmp" ; then
|
509
|
+
AC_MSG_RESULT(yes)
|
510
|
+
else
|
511
|
+
AC_MSG_RESULT(no)
|
512
|
+
CSC=
|
513
|
+
csc_note="$csc_note (found Chicken csc program)"
|
514
|
+
fi
|
515
|
+
fi
|
516
|
+
fi
|
517
|
+
if test -z "$CSC" ; then
|
518
|
+
dnl mcs is the Mono CSharp compiler.
|
519
|
+
AC_PATH_PROGS(CSC, [mcs], [])
|
520
|
+
if test -n "$CSC" ; then
|
521
|
+
dnl There are other tools called mcs (such as /usr/bin/mcs on Tru64),
|
522
|
+
dnl so we check that the mcs we found understands --version which is
|
523
|
+
dnl sufficient to distinguish mono's mcs from the Tru64 one.
|
524
|
+
AC_MSG_CHECKING([whether $CSC is from GNU Mono])
|
525
|
+
if (exec >&5 2>&5;$CSC --version </dev/null;exit $?) ; then
|
526
|
+
AC_MSG_RESULT(yes)
|
527
|
+
else
|
528
|
+
AC_MSG_RESULT(no)
|
529
|
+
CSC=
|
530
|
+
csc_note="$csc_note (found different mcs program)"
|
531
|
+
fi
|
532
|
+
fi
|
533
|
+
fi
|
534
|
+
fi
|
535
|
+
|
536
|
+
if test -n "$CSC" ; then
|
537
|
+
AC_PATH_PROGS(GACUTIL, ["${GACUTIL-gacutil}"], [])
|
538
|
+
if test -z "$GACUTIL" ; then
|
539
|
+
AC_PATH_PROGS(GACUTIL, [ilgac], [])
|
540
|
+
fi
|
541
|
+
AC_PATH_PROGS(SN, ["${SN-sn}"], [])
|
542
|
+
AC_ARG_VAR(GACUTIL, [gacutil utility to use for CSharp bindings])
|
543
|
+
AC_ARG_VAR(SN, [sn utility to use for CSharp bindings])
|
544
|
+
if test -z "$SN" ; then
|
545
|
+
case $GACUTIL in
|
546
|
+
dnl Portable.net doesn't support strong naming yet and ilgac doesn't
|
547
|
+
dnl require assemblies to be strong named before adding them to the GAC.
|
548
|
+
*ilgac*) SN=/bin/true ;;
|
549
|
+
esac
|
550
|
+
fi
|
551
|
+
if test -n "$GACUTIL" -a -n "$SN" ; then
|
552
|
+
AC_MSG_CHECKING([whether the CSharp compiler works])
|
553
|
+
[echo 'class conftest { public static void Main() { System.Console.WriteLine("OK"); } }' > conftest.cs]
|
554
|
+
if (exec >&5 2>&5;$CSC /out:conftest.exe conftest.cs;exit $?) ; then
|
555
|
+
AC_MSG_RESULT(yes)
|
556
|
+
AC_MSG_CHECKING([whether CSharp programs can just be run])
|
557
|
+
if test OK = "`./conftest.exe 2> /dev/null`" ; then
|
558
|
+
AC_MSG_RESULT(yes)
|
559
|
+
RUN_CSHARP=
|
560
|
+
else
|
561
|
+
AC_MSG_RESULT(no)
|
562
|
+
AC_PATH_PROGS(MONO, ["${MONO-mono}"], [])
|
563
|
+
if test -z "$MONO" ; then
|
564
|
+
AC_PATH_PROGS(MONO, [ilrun], [])
|
565
|
+
fi
|
566
|
+
AC_ARG_VAR(MONO, [CSharp bytecode interpreter (optional - only needed to run CSharp testsuite with)])
|
567
|
+
if test -n "$MONO" ; then
|
568
|
+
AC_MSG_CHECKING([whether $MONO can run CSharp programs])
|
569
|
+
if OK = "`$MONO ./conftest.exe 2> /dev/null`" ; then
|
570
|
+
AC_MSG_RESULT(yes)
|
571
|
+
RUN_CSHARP=mono
|
572
|
+
else
|
573
|
+
AC_MSG_RESULT([no - CSharp tests will be skipped])
|
574
|
+
RUN_CSHARP='\$(top_srcdir)/skiptest'
|
575
|
+
fi
|
576
|
+
else
|
577
|
+
AC_MSG_RESULT([not found - CSharp tests will be skipped])
|
578
|
+
RUN_CSHARP='\$(top_srcdir)/skiptest'
|
579
|
+
fi
|
580
|
+
fi
|
581
|
+
AC_SUBST(RUN_CSHARP)
|
582
|
+
BINDINGS="$BINDINGS csharp"
|
583
|
+
else
|
584
|
+
AC_MSG_RESULT(no)
|
585
|
+
if test yes = "$with_csharp" ; then
|
586
|
+
AC_MSG_ERROR([CSharp compiler $CSC doesn't work])
|
587
|
+
fi
|
588
|
+
fi
|
589
|
+
else
|
590
|
+
if test yes = "$with_csharp" ; then
|
591
|
+
if test -z "$GACUTIL" ; then
|
592
|
+
AC_MSG_ERROR([Mono gacutil not found])
|
593
|
+
elif test -z "$SN" ; then
|
594
|
+
AC_MSG_ERROR([Mono sn not found])
|
595
|
+
fi
|
596
|
+
fi
|
597
|
+
fi
|
598
|
+
else
|
599
|
+
if test yes = "$with_csharp" ; then
|
600
|
+
AC_MSG_ERROR([CSharp compiler not found$csc_note])
|
601
|
+
fi
|
602
|
+
fi
|
603
|
+
fi
|
604
|
+
|
605
|
+
JAVA_CPPFLAGS=
|
606
|
+
if test no != "$with_java" ; then
|
607
|
+
AC_PATH_PROGS(JAVA, ["${JAVA-java}"], [],
|
608
|
+
[${JAVA_HOME+$JAVA_HOME/bin:}${JDK_HOME+$JDK_HOME/bin:}$PATH])
|
609
|
+
AC_PATH_PROGS(JAVAC, ["${JAVAC-javac}"], [],
|
610
|
+
[${JAVA_HOME+$JAVA_HOME/bin:}${JDK_HOME+$JDK_HOME/bin:}$PATH])
|
611
|
+
AC_PATH_PROGS(JAR, ["${JAR-jar}"], [],
|
612
|
+
[${JAVA_HOME+$JAVA_HOME/bin:}${JDK_HOME+$JDK_HOME/bin:}$PATH])
|
613
|
+
AC_ARG_VAR(JAVA, [Java interpreter command])
|
614
|
+
AC_ARG_VAR(JAVAC, [Java compiler command])
|
615
|
+
AC_ARG_VAR(JAR, [java jar utility])
|
616
|
+
AC_ARG_VAR(JAVA_HOME, [Pathname of the directory where the JDK is installed])
|
617
|
+
AC_ARG_VAR(JDK_HOME, [Pathname of the directory where the JDK is installed])
|
618
|
+
AC_ARG_VAR(JNI_INCLUDE_DIR, [Pathname of the directory where jni.h is installed])
|
619
|
+
if test -n "$JAVA" -a -n "$JAVAC" -a -n "$JAR" ; then
|
620
|
+
dnl Eric says:
|
621
|
+
dnl The JNI library *requires* "Java 2", which is 1.2 or better.
|
622
|
+
dnl
|
623
|
+
dnl So checking for jni.h presumably implicitly checks we have "Java 2".
|
624
|
+
dnl Note: jni.h #defines JNI_VERSION_1_[124] (but not 3 it seems).
|
625
|
+
dnl So we could check for that if we want to check for a particular
|
626
|
+
dnl JDK version...
|
627
|
+
java_ok=no
|
628
|
+
AC_CHECK_HEADER([jni.h], [java_ok=yes], [
|
629
|
+
dnl We need to look for jni.h in /usr/lib/jvm/java-gcj/include on some
|
630
|
+
dnl Debian and Ubuntu boxes at least. And on Mac OS X, we jni.h lives
|
631
|
+
dnl in /System/Library/Frameworks/JavaVM.framework/Headers.
|
632
|
+
SAVE_CPPFLAGS=$CPPFLAGS
|
633
|
+
for jnidir in $JNI_INCLUDE_DIR ${JAVA_HOME+"$JAVA_HOME/include"} ${JDK_HOME+"$JDK_HOME/include"} /usr/lib/jvm/java-gcj/include /System/Library/Frameworks/JavaVM.framework/Headers ; do
|
634
|
+
CPPFLAGS="$SAVE_CPPFLAGS -I$jnidir"
|
635
|
+
AC_MSG_CHECKING([for jni.h in $jnidir])
|
636
|
+
if test -f "$jnidir/jni.h" ; then
|
637
|
+
AC_COMPILE_IFELSE([#include <jni.h>], [java_ok=yes])
|
638
|
+
if test yes = $java_ok ; then
|
639
|
+
AC_MSG_RESULT([yes])
|
640
|
+
JAVA_CPPFLAGS=-I$jnidir
|
641
|
+
break
|
642
|
+
fi
|
643
|
+
|
644
|
+
dnl Sun's JDK requires the user to pass an extra -I for a
|
645
|
+
dnl subdirectory named after the host_os. Sadly we seem to
|
646
|
+
dnl need to hardcode a list of the platform names.
|
647
|
+
jni_host_os=
|
648
|
+
case $host_os in
|
649
|
+
linux*)
|
650
|
+
jni_host_os=linux ;;
|
651
|
+
solaris*)
|
652
|
+
jni_host_os=solaris ;;
|
653
|
+
mingw* | pw32*)
|
654
|
+
jni_host_os=win32 ;;
|
655
|
+
esac
|
656
|
+
if test -n "$jni_host_os" ; then
|
657
|
+
CPPFLAGS="$CPPFLAGS -I$jnidir/$jni_host_os"
|
658
|
+
AC_COMPILE_IFELSE([#include <jni.h>], [java_ok=yes])
|
659
|
+
if test yes = $java_ok ; then
|
660
|
+
AC_MSG_RESULT([yes, requires additional -I$jnidir/$jni_host_os])
|
661
|
+
JAVA_CPPFLAGS="-I$jnidir -I$jnidir/$jni_host_os"
|
662
|
+
break
|
663
|
+
fi
|
664
|
+
fi
|
665
|
+
AC_MSG_RESULT([found, but not usable])
|
666
|
+
|
667
|
+
CPPFLAGS="$SAVE_CPPFLAGS -I$jnidir"
|
668
|
+
else
|
669
|
+
AC_MSG_RESULT([no])
|
670
|
+
fi
|
671
|
+
done
|
672
|
+
CPPFLAGS=$SAVE_CPPFLAGS
|
673
|
+
test noyes = $java_ok$with_java && AC_MSG_ERROR([jni.h not found])
|
674
|
+
], [ ])
|
675
|
+
AC_SUBST(JAVA_CPPFLAGS)
|
676
|
+
if test yes = $java_ok ; then
|
677
|
+
AC_MSG_CHECKING([for Java path separator])
|
678
|
+
[echo 'public class conftest { public static void main(String[] args) { System.out.println(System.getProperty("path.separator")); } }' > conftest.java]
|
679
|
+
if (exec >&5 2>&5;$JAVAC conftest.java;exit $?) ; then
|
680
|
+
JAVA_PATHSEP=`$JAVA conftest 2>&5`
|
681
|
+
AC_SUBST(JAVA_PATHSEP)
|
682
|
+
if test -n "$JAVA_PATHSEP" ; then
|
683
|
+
AC_MSG_RESULT($JAVA_PATHSEP)
|
684
|
+
BINDINGS="$BINDINGS java"
|
685
|
+
else
|
686
|
+
AC_MSG_RESULT([failed to run test program])
|
687
|
+
java_ok=no
|
688
|
+
fi
|
689
|
+
else
|
690
|
+
AC_MSG_RESULT([failed to compile test program])
|
691
|
+
java_ok=no
|
692
|
+
fi
|
693
|
+
if test no = "$java_ok" ; then
|
694
|
+
test yes = "$with_java" && AC_MSG_ERROR([Couldn't compile and run a simple Java test program])
|
695
|
+
fi
|
696
|
+
fi
|
697
|
+
else
|
698
|
+
if test yes = "$with_java" ; then
|
699
|
+
if test -z "$JAVA" ; then
|
700
|
+
AC_MSG_ERROR([java not found])
|
701
|
+
elif test -z "$JAVAC" ; then
|
702
|
+
AC_MSG_ERROR([javac not found])
|
703
|
+
elif test -z "$JAR" ; then
|
704
|
+
AC_MSG_ERROR([jar not found])
|
705
|
+
fi
|
706
|
+
fi
|
707
|
+
fi
|
708
|
+
fi
|
709
|
+
|
710
|
+
if test no != "$with_ruby" ; then
|
711
|
+
dnl See comment for AC_PATH_PROGS(SWIG, ...).
|
712
|
+
if test -n "$RUBY" ; then
|
713
|
+
AC_PATH_PROGS(RUBY, ["$RUBY"], [])
|
714
|
+
else
|
715
|
+
AC_PATH_PROGS(RUBY, [ruby1.8 ruby], [])
|
716
|
+
fi
|
717
|
+
AC_ARG_VAR(RUBY, [Ruby interpreter])
|
718
|
+
if test -n "$RUBY" ; then
|
719
|
+
dnl Require Ruby 1.8 or newer. Paul says:
|
720
|
+
dnl I'm using 1.8.4. I imagine anything in the 1.8.x series will be fine,
|
721
|
+
dnl not sure about 1.6 but hardly anyone uses <1.8.
|
722
|
+
dnl
|
723
|
+
dnl Brief testing with Ruby 1.6.8 show the bindings probably work there,
|
724
|
+
dnl but smoketest.rb doesn't because the test/unit module isn't available.
|
725
|
+
AC_MSG_CHECKING([$RUBY version])
|
726
|
+
version=`$RUBY --version 2>/dev/null`
|
727
|
+
case $version in
|
728
|
+
[ruby\ 1.[89]*]) ;; # Ruby 1.8, 1.9
|
729
|
+
[ruby\ 1.[1-9][0-9]*]) ;; # Ruby 1.10+
|
730
|
+
[ruby\ [2-9]*]) ;; # Ruby 2-Ruby 9
|
731
|
+
[ruby\ 1[0-9]*]) ;; # Ruby 10+
|
732
|
+
*)
|
733
|
+
AC_MSG_RESULT([$version (too old)])
|
734
|
+
if test yes = "$with_ruby" ; then
|
735
|
+
AC_MSG_ERROR([Only Ruby 1.8 or newer is supported ($ruby is $version)])
|
736
|
+
fi
|
737
|
+
RUBY=
|
738
|
+
;;
|
739
|
+
esac
|
740
|
+
if test -n "$RUBY" ; then
|
741
|
+
AC_MSG_RESULT([$version])
|
742
|
+
AC_ARG_VAR(RUBY_INC, [Directory where ruby.h can be found])
|
743
|
+
if test -z "$RUBY_INC" ; then
|
744
|
+
dnl Ruby 1.9 added rubyhdrdir; for older Ruby we use archdir.
|
745
|
+
[RUBY_INC=`$RUBY -rrbconfig -e 'puts Config::CONFIG["rubyhdrdir"] || Config::CONFIG["archdir"]'`]
|
746
|
+
fi
|
747
|
+
AC_SUBST(RUBY_INC)
|
748
|
+
dnl Check that ruby.h is there, which is a good way to check that
|
749
|
+
dnl the appropriate ruby-dev package has been installed.
|
750
|
+
AC_MSG_CHECKING([for $RUBY_INC/ruby.h])
|
751
|
+
if test -f "$RUBY_INC/ruby.h" ; then
|
752
|
+
AC_MSG_RESULT(yes)
|
753
|
+
|
754
|
+
AC_MSG_CHECKING([ruby/io.h])
|
755
|
+
rm -f ruby/rubyio.h
|
756
|
+
if test -f "$RUBY_INC/ruby/io.h" ; then
|
757
|
+
AC_MSG_RESULT(yes)
|
758
|
+
dnl Newer Ruby has ruby/io.h - older has rubyio.h. Ruby doesn't
|
759
|
+
dnl seem to provide any way to generate code which works with
|
760
|
+
dnl both (and even the version number isn't a discriminator as
|
761
|
+
dnl Debian etch has 1.9 without ruby/io.h). The SWIG version
|
762
|
+
dnl we're currently using assumes rubyio.h exists and luckily
|
763
|
+
dnl it includes it with "", so we can just drop a rubyio.h
|
764
|
+
dnl wrapper alongside ruby/xapian_wrap.cc.
|
765
|
+
echo '#include <ruby/io.h>' > ruby/rubyio.h
|
766
|
+
else
|
767
|
+
AC_MSG_RESULT(no)
|
768
|
+
fi
|
769
|
+
|
770
|
+
AC_ARG_VAR(RUBY_INC_ARCH, [Directory where ruby/config.h can be found (needed from Ruby 1.9)])
|
771
|
+
if test -z "$RUBY_INC_ARCH" ; then
|
772
|
+
dnl Ruby 1.9 requires this.
|
773
|
+
[RUBY_INC_ARCH=`$RUBY -rrbconfig -e 'd = Config::CONFIG["rubyhdrdir"];if d != nil; print d + "/" + Config::CONFIG["arch"]; end'`]
|
774
|
+
dnl For earlier versions, just make it the same as RUBY_INC.
|
775
|
+
test x"$RUBY_INC_ARCH" != x || RUBY_INC_ARCH=$RUBY_INC
|
776
|
+
fi
|
777
|
+
AC_SUBST(RUBY_INC_ARCH)
|
778
|
+
|
779
|
+
AC_ARG_VAR(RUBY_LIB, [Directory to install ruby files into])
|
780
|
+
if test -z "$RUBY_LIB" ; then
|
781
|
+
[RUBY_LIB=`$RUBY -rrbconfig -e 'puts Config::CONFIG["sitelibdir"]'`]
|
782
|
+
fi
|
783
|
+
AC_SUBST(RUBY_LIB)
|
784
|
+
|
785
|
+
AC_ARG_VAR(RUBY_LIB_ARCH, [Directory to install ruby binary modules into])
|
786
|
+
if test -z "$RUBY_LIB_ARCH" ; then
|
787
|
+
[RUBY_LIB_ARCH=`$RUBY -rrbconfig -e 'puts Config::CONFIG["sitearchdir"]'`]
|
788
|
+
fi
|
789
|
+
AC_SUBST(RUBY_LIB_ARCH)
|
790
|
+
|
791
|
+
RUBY_LIBS=
|
792
|
+
case $host_os in
|
793
|
+
cygwin*) RUBY_LIBS=-lruby ;;
|
794
|
+
esac
|
795
|
+
AC_SUBST(RUBY_LIBS)
|
796
|
+
|
797
|
+
if test yes = "$enable_documentation" ; then
|
798
|
+
if test -n "$RDOC" ; then
|
799
|
+
AC_PATH_PROGS(RDOC, ["$RDOC"], [])
|
800
|
+
else
|
801
|
+
dnl Try replace the *last* 'ruby' with 'rdoc'.
|
802
|
+
rdoc_best_guess=`echo "$RUBY"|sed 's,\(.*\)ruby,\1rdoc,'`
|
803
|
+
AC_PATH_PROGS(RDOC, ["$rdoc_best_guess"], [])
|
804
|
+
if test -z "$RDOC"; then
|
805
|
+
AC_PATH_PROGS(RDOC, [rdoc1.8 rdoc], [])
|
806
|
+
test -n "$RDOC" || RDOC="$MISSING rdoc"
|
807
|
+
fi
|
808
|
+
fi
|
809
|
+
fi
|
810
|
+
|
811
|
+
BINDINGS="$BINDINGS ruby"
|
812
|
+
else
|
813
|
+
AC_MSG_RESULT([no (install ruby-dev or ruby-devel package or similar)])
|
814
|
+
if test yes = "$with_ruby" ; then
|
815
|
+
AC_MSG_ERROR([ruby.h not found])
|
816
|
+
fi
|
817
|
+
fi
|
818
|
+
RUBY_DLEXT=`$RUBY -rrbconfig -e 'puts Config::CONFIG[["DLEXT"]]'`
|
819
|
+
AC_SUBST(RUBY_DLEXT)
|
820
|
+
fi
|
821
|
+
fi
|
822
|
+
fi
|
823
|
+
|
824
|
+
AC_SUBST(BINDINGS)
|
825
|
+
|
826
|
+
dnl Set flags to control warnings (enable more, or disable annoying ones)
|
827
|
+
dnl and other compiler specific flags.
|
828
|
+
AM_CXXFLAGS=
|
829
|
+
SWIG_CXXFLAGS=
|
830
|
+
JAVA_CXXFLAGS=
|
831
|
+
if test yes = "$GXX" ; then
|
832
|
+
dnl Python itself is compiled with -fno-strict-aliasing, and it appears
|
833
|
+
dnl it's safest to follow this lead when compiling the SWIG generated
|
834
|
+
dnl interface code. E.g.:
|
835
|
+
dnl http://article.gmane.org/gmane.comp.gcc.devel/74692
|
836
|
+
dnl The code SWIG generates for other languages seems to have similar
|
837
|
+
dnl issues too, so just turn this on for all of them.
|
838
|
+
dnl
|
839
|
+
dnl There's no need to check -fno-strict-aliasing is supported as it works
|
840
|
+
dnl with GCC 2.95 and we don't support anything older.
|
841
|
+
SWIG_CXXFLAGS="-fno-strict-aliasing"
|
842
|
+
|
843
|
+
dnl We need to explicitly link against -lstdc++ on OpenBSD (discovered
|
844
|
+
dnl on OpenBSD 3.7 with GCC 3.3.5 but this appears to be due to a
|
845
|
+
dnl deliberate decision on the part of OpenBSD developers). Luckily
|
846
|
+
dnl we can just always specify -lstdc++ explicitly if GCC is the
|
847
|
+
dnl compiler and libtool will eliminate the duplicate on other
|
848
|
+
dnl platforms.
|
849
|
+
XAPIAN_LIBS="$XAPIAN_LIBS -lstdc++"
|
850
|
+
|
851
|
+
dnl Intel's C++ compiler is identified as "GXX" by autoconf's test - check
|
852
|
+
dnl which we actually have.
|
853
|
+
AC_EGREP_CPP(yes,
|
854
|
+
[#ifdef __INTEL_COMPILER
|
855
|
+
yes
|
856
|
+
#endif
|
857
|
+
],
|
858
|
+
[
|
859
|
+
dnl Intel's compiler:
|
860
|
+
dnl
|
861
|
+
dnl -w1 stops the avalanche of uninteresting "remark" messages.
|
862
|
+
dnl -wd... disables warnings which don't have good code workarounds.
|
863
|
+
dnl
|
864
|
+
dnl Swig generated code gives lots of unused and uninitialized warnings.
|
865
|
+
dnl They're non-harmful, so suppress them.
|
866
|
+
SWIG_CXXFLAGS="$SWIG_CXXFLAGS -Wall -w1 -wd177,1572"
|
867
|
+
dnl The Java JNI wrappers have a few unused variables.
|
868
|
+
JAVA_CXXFLAGS="-Wall -w1 -wd177,1572"
|
869
|
+
],
|
870
|
+
[
|
871
|
+
dnl GCC:
|
872
|
+
dnl
|
873
|
+
dnl Swig generated code gives lots of unused and uninitialized warnings.
|
874
|
+
dnl They're non-harmful, so suppress them.
|
875
|
+
SWIG_CXXFLAGS="$SWIG_CXXFLAGS -Wall -Wno-unused -Wno-uninitialized"
|
876
|
+
AC_MSG_CHECKING([whether to use -fvisibility=hidden])
|
877
|
+
dnl To be robust, we check both that -fvisibility=hidden is recognised
|
878
|
+
dnl and that SWIG will have added the visibility attributes.
|
879
|
+
dnl The GCC wiki says it's supported from GCC 4.0 onwards. GCC 3.4
|
880
|
+
dnl also supports -fvisibility, but doesn't allow visibility to be
|
881
|
+
dnl specified for classes, which probably breaks throwing exception
|
882
|
+
dnl classes from the library. We want that to work, so only switch
|
883
|
+
dnl this on for GCC 4.0 onwards.
|
884
|
+
SAVE_CXXFLAGS=$CXXFLAGS
|
885
|
+
CXXFLAGS="-fvisibility=hidden"
|
886
|
+
AC_TRY_COMPILE([], [
|
887
|
+
#if __GNUC__ >= 4
|
888
|
+
/* GCC supports -fvisibility and allows specifying visibility for classes. */
|
889
|
+
#else
|
890
|
+
choke me
|
891
|
+
#endif
|
892
|
+
],
|
893
|
+
AC_MSG_RESULT(yes)
|
894
|
+
SWIG_CXXFLAGS="$SWIG_CXXFLAGS -fvisibility=hidden"
|
895
|
+
,
|
896
|
+
AC_MSG_RESULT(no))
|
897
|
+
CXXFLAGS=$SAVE_CXXFLAGS
|
898
|
+
dnl The Java JNI wrappers have a few unused variables.
|
899
|
+
JAVA_CXXFLAGS="-Wall -W -Wno-unused"
|
900
|
+
])
|
901
|
+
fi
|
902
|
+
AC_SUBST(SWIG_CXXFLAGS)
|
903
|
+
AC_SUBST(JAVA_CXXFLAGS)
|
904
|
+
|
905
|
+
dnl Required for auto regeneration to work in a combined maintainer-mode tree.
|
906
|
+
: ${AUTOM4TE=autom4te}
|
907
|
+
AC_SUBST([AUTOM4TE])
|
908
|
+
|
909
|
+
AC_CONFIG_FILES([Makefile
|
910
|
+
xapian-version.h
|
911
|
+
python/Makefile python/docs/Makefile
|
912
|
+
php/Makefile php/docs/Makefile
|
913
|
+
java/Makefile java/native/Makefile java/org/xapian/Makefile
|
914
|
+
java/org/xapian/errors/Makefile java/org/xapian/examples/Makefile
|
915
|
+
java-swig/Makefile
|
916
|
+
tcl8/Makefile tcl8/docs/Makefile
|
917
|
+
tcl8/pkgIndex.tcl
|
918
|
+
csharp/Makefile csharp/docs/Makefile
|
919
|
+
csharp/AssemblyInfo.cs
|
920
|
+
ruby/Makefile ruby/docs/Makefile
|
921
|
+
xapian-bindings.spec])
|
922
|
+
dnl guile/Makefile
|
923
|
+
AC_CONFIG_FILES([python/generate-python-exceptions],
|
924
|
+
[chmod +x python/generate-python-exceptions])
|
925
|
+
AC_OUTPUT
|
926
|
+
|
927
|
+
echo ""
|
928
|
+
if test -z "$BINDINGS" ; then
|
929
|
+
echo "*** Not found the required tools for building bindings for any"
|
930
|
+
echo "*** supported language!"
|
931
|
+
echo "***"
|
932
|
+
echo "*** You may need to install -dev or -devel packages for the languages"
|
933
|
+
echo "*** you want to build bindings for."
|
934
|
+
echo "***"
|
935
|
+
echo "*** For details of how to point configure at tools not on PATH, see:"
|
936
|
+
echo "*** ./configure --help"
|
937
|
+
else
|
938
|
+
echo "*** Building bindings for languages:" $BINDINGS
|
939
|
+
fi
|
940
|
+
echo ""
|
941
|
+
if test "$COMPAT_VERSION" != "$XAPIAN_VERSION" ; then
|
942
|
+
dnl 0.8.2 was the first version which set XAPIAN_VERSION
|
943
|
+
AC_MSG_WARN([Xapian library is version ${XAPIAN_VERSION-<0.8.2} but the bindings are version $PACKAGE_VERSION - we strongly recommend using matching versions.])
|
944
|
+
fi
|