diff --git a/src/configure b/src/configure index 6907d476..7e6dea33 100755 --- a/src/configure +++ b/src/configure @@ -708,6 +708,7 @@ XAPIANCXXFLAGS HAVE_MKDTEMP NOQTMAKE NOCMDLINE +NOPIC LIBOBJS LTLIBOBJS' ac_subst_files='' @@ -719,6 +720,7 @@ with_inotify with_fam enable_xattr enable_camelcase +enable_pic with_gui with_x ' @@ -1373,6 +1375,9 @@ Optional Features: manual" and "my sql manual" are the same, but not the same as "mysql manual" (in phrases only and you could raise the phrase slack to get a match). + --enable-pic Compile library objects as position independant + code. This is necessary for building the php + extension. Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -3878,6 +3883,22 @@ _ACEOF fi +# Build PIC objects for the library. This is necessary when building the +# php extension, would be useful for the others, and costs little. I wonder +# if this should be made the default. +# Not by default as these are little used for now. +# Check whether --enable-pic was given. +if test "${enable_pic+set}" = set; then + enableval=$enable_pic; picEnabled=$enableval +else + picEnabled=no +fi + +if test X$picEnabled = Xyes ; then + NOPIC="" +else + NOPIC="#" +fi for ac_func in mkdtemp @@ -6636,6 +6657,7 @@ QTRECOLL_DATADIR=${m_datadir}/recoll + ac_config_files="$ac_config_files mk/localdefs" ac_config_files="$ac_config_files recollinstall" diff --git a/src/configure.ac b/src/configure.ac index 27eaa437..8c0bd746 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -173,6 +173,20 @@ if test X$camelcaseEnabled = Xyes ; then AC_DEFINE(RCL_SPLIT_CAMELCASE, 1, [Split camelCase words]) fi +# Build PIC objects for the library. This is necessary when building the +# php extension, would be useful for the others, and costs little. I wonder +# if this should be made the default. +# Not by default as these are little used for now. +AC_ARG_ENABLE(pic, + AC_HELP_STRING([--enable-pic], + [Compile library objects as position independant code. This is necessary + for building the php extension.]), + picEnabled=$enableval, picEnabled=no) +if test X$picEnabled = Xyes ; then + NOPIC="" +else + NOPIC="#" +fi AC_CHECK_FUNCS(mkdtemp) @@ -397,6 +411,7 @@ AC_SUBST(XAPIANCXXFLAGS) AC_SUBST(HAVE_MKDTEMP) AC_SUBST(NOQTMAKE) AC_SUBST(NOCMDLINE) +AC_SUBST(NOPIC) AC_CONFIG_FILES(mk/localdefs) AC_CONFIG_FILES(recollinstall) diff --git a/src/doc/user/usermanual.sgml b/src/doc/user/usermanual.sgml index 830624cb..c2b360c0 100644 --- a/src/doc/user/usermanual.sgml +++ b/src/doc/user/usermanual.sgml @@ -2232,21 +2232,35 @@ application/x-chm = execm rclchm Introduction - &RCL; versions after 1.11 define a Python programming + &RCL; versions after 1.11 define a Python programming interface, both for searching and indexing. - The python interface is not built by default and can be - found in the source package, under python/recoll. The - directory contains the usual setup.py - script which you can use to build and install the - module: + The Python interface is not built by default and can be + found in the source package, + under python/recoll. + In order to build the module, you should first build + or re-build the Recoll library using position-independant + objects: + + cd recoll-xxx/ + configure --enable-pic + make + + There is no significant disadvantage in using PIC objects + for the main Recoll executables, so you can use the + --enable-pic option for the main build + too. - - cd recoll-xxx/python/recoll - python setup.py build - python setup.py install - - + The python/recoll/ directory + contains the usual setup.py + script which you can then use to build and install the + module: + + cd recoll-xxx/python/recoll + python setup.py build + python setup.py install + + diff --git a/src/lib/Makefile b/src/lib/Makefile index 2116a93d..d08530a3 100644 --- a/src/lib/Makefile +++ b/src/lib/Makefile @@ -13,141 +13,141 @@ librcl.a : $(DEPS) $(OBJS) unac.o ar ru librcl.a $(OBJS) unac.o $(RANLIB) librcl.a -unac.o : $(depth)/unac/unac.c $(depth)/unac/unac.h +unac.o : $(depth)/unac/unac.c $(depth)/unac/unac.h $ $(CC) $(ALL_CXXFLAGS) -c $(depth)/unac/unac.c -rclaspell.o : ../aspell/rclaspell.cpp +rclaspell.o : ../aspell/rclaspell.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../aspell/rclaspell.cpp -rclconfig.o : ../common/rclconfig.cpp +rclconfig.o : ../common/rclconfig.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../common/rclconfig.cpp -rclinit.o : ../common/rclinit.cpp +rclinit.o : ../common/rclinit.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../common/rclinit.cpp -textsplit.o : ../common/textsplit.cpp +textsplit.o : ../common/textsplit.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../common/textsplit.cpp -unacpp.o : ../common/unacpp.cpp +unacpp.o : ../common/unacpp.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../common/unacpp.cpp -beaglequeue.o : ../index/beaglequeue.cpp +beaglequeue.o : ../index/beaglequeue.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../index/beaglequeue.cpp -csguess.o : ../index/csguess.cpp +csguess.o : ../index/csguess.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../index/csguess.cpp -fsindexer.o : ../index/fsindexer.cpp +fsindexer.o : ../index/fsindexer.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../index/fsindexer.cpp -indexer.o : ../index/indexer.cpp +indexer.o : ../index/indexer.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../index/indexer.cpp -mimetype.o : ../index/mimetype.cpp +mimetype.o : ../index/mimetype.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../index/mimetype.cpp -htmlparse.o : ../internfile/htmlparse.cpp +htmlparse.o : ../internfile/htmlparse.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../internfile/htmlparse.cpp -myhtmlparse.o : ../internfile/myhtmlparse.cpp +myhtmlparse.o : ../internfile/myhtmlparse.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../internfile/myhtmlparse.cpp -mimehandler.o : ../internfile/mimehandler.cpp +mimehandler.o : ../internfile/mimehandler.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../internfile/mimehandler.cpp -internfile.o : ../internfile/internfile.cpp +internfile.o : ../internfile/internfile.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../internfile/internfile.cpp -mh_exec.o : ../internfile/mh_exec.cpp +mh_exec.o : ../internfile/mh_exec.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../internfile/mh_exec.cpp -mh_execm.o : ../internfile/mh_execm.cpp +mh_execm.o : ../internfile/mh_execm.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../internfile/mh_execm.cpp -mh_html.o : ../internfile/mh_html.cpp +mh_html.o : ../internfile/mh_html.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../internfile/mh_html.cpp -mh_mail.o : ../internfile/mh_mail.cpp +mh_mail.o : ../internfile/mh_mail.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../internfile/mh_mail.cpp -mh_mbox.o : ../internfile/mh_mbox.cpp +mh_mbox.o : ../internfile/mh_mbox.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../internfile/mh_mbox.cpp -mh_text.o : ../internfile/mh_text.cpp +mh_text.o : ../internfile/mh_text.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../internfile/mh_text.cpp -docseq.o : ../query/docseq.cpp +docseq.o : ../query/docseq.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../query/docseq.cpp -docseqdb.o : ../query/docseqdb.cpp +docseqdb.o : ../query/docseqdb.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../query/docseqdb.cpp -docseqhist.o : ../query/docseqhist.cpp +docseqhist.o : ../query/docseqhist.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../query/docseqhist.cpp -filtseq.o : ../query/filtseq.cpp +filtseq.o : ../query/filtseq.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../query/filtseq.cpp -dynconf.o : ../query/dynconf.cpp +dynconf.o : ../query/dynconf.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../query/dynconf.cpp -plaintorich.o : ../query/plaintorich.cpp +plaintorich.o : ../query/plaintorich.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../query/plaintorich.cpp -recollq.o : ../query/recollq.cpp +recollq.o : ../query/recollq.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../query/recollq.cpp -reslistpager.o : ../query/reslistpager.cpp +reslistpager.o : ../query/reslistpager.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../query/reslistpager.cpp -sortseq.o : ../query/sortseq.cpp +sortseq.o : ../query/sortseq.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../query/sortseq.cpp -wasastringtoquery.o : ../query/wasastringtoquery.cpp +wasastringtoquery.o : ../query/wasastringtoquery.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../query/wasastringtoquery.cpp -wasatorcl.o : ../query/wasatorcl.cpp +wasatorcl.o : ../query/wasatorcl.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../query/wasatorcl.cpp -rcldb.o : ../rcldb/rcldb.cpp +rcldb.o : ../rcldb/rcldb.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../rcldb/rcldb.cpp -rcldoc.o : ../rcldb/rcldoc.cpp +rcldoc.o : ../rcldb/rcldoc.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../rcldb/rcldoc.cpp -rclquery.o : ../rcldb/rclquery.cpp +rclquery.o : ../rcldb/rclquery.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../rcldb/rclquery.cpp -searchdata.o : ../rcldb/searchdata.cpp +searchdata.o : ../rcldb/searchdata.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../rcldb/searchdata.cpp -stemdb.o : ../rcldb/stemdb.cpp +stemdb.o : ../rcldb/stemdb.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../rcldb/stemdb.cpp -stoplist.o : ../rcldb/stoplist.cpp +stoplist.o : ../rcldb/stoplist.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../rcldb/stoplist.cpp -base64.o : ../utils/base64.cpp +base64.o : ../utils/base64.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../utils/base64.cpp -circache.o : ../utils/circache.cpp +circache.o : ../utils/circache.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../utils/circache.cpp -closefrom.o : ../utils/closefrom.cpp +closefrom.o : ../utils/closefrom.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../utils/closefrom.cpp -conftree.o : ../utils/conftree.cpp +conftree.o : ../utils/conftree.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../utils/conftree.cpp -copyfile.o : ../utils/copyfile.cpp +copyfile.o : ../utils/copyfile.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../utils/copyfile.cpp -debuglog.o : ../utils/debuglog.cpp +debuglog.o : ../utils/debuglog.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../utils/debuglog.cpp -execmd.o : ../utils/execmd.cpp +execmd.o : ../utils/execmd.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../utils/execmd.cpp -fstreewalk.o : ../utils/fstreewalk.cpp +fstreewalk.o : ../utils/fstreewalk.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../utils/fstreewalk.cpp -idfile.o : ../utils/idfile.cpp +idfile.o : ../utils/idfile.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../utils/idfile.cpp -fileudi.o : ../utils/fileudi.cpp +fileudi.o : ../utils/fileudi.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../utils/fileudi.cpp -md5.o : ../utils/md5.cpp +md5.o : ../utils/md5.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../utils/md5.cpp -mimeparse.o : ../utils/mimeparse.cpp +mimeparse.o : ../utils/mimeparse.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../utils/mimeparse.cpp -netcon.o : ../utils/netcon.cpp +netcon.o : ../utils/netcon.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../utils/netcon.cpp -pathut.o : ../utils/pathut.cpp +pathut.o : ../utils/pathut.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../utils/pathut.cpp -pxattr.o : ../utils/pxattr.cpp +pxattr.o : ../utils/pxattr.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../utils/pxattr.cpp -readfile.o : ../utils/readfile.cpp +readfile.o : ../utils/readfile.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../utils/readfile.cpp -smallut.o : ../utils/smallut.cpp +smallut.o : ../utils/smallut.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../utils/smallut.cpp -transcode.o : ../utils/transcode.cpp +transcode.o : ../utils/transcode.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../utils/transcode.cpp -wipedir.o : ../utils/wipedir.cpp +wipedir.o : ../utils/wipedir.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../utils/wipedir.cpp -x11mon.o : ../utils/x11mon.cpp +x11mon.o : ../utils/x11mon.cpp $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../utils/x11mon.cpp -mime-getpart.o : ../bincimapmime/mime-getpart.cc +mime-getpart.o : ../bincimapmime/mime-getpart.cc $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../bincimapmime/mime-getpart.cc -mime-parsefull.o : ../bincimapmime/mime-parsefull.cc +mime-parsefull.o : ../bincimapmime/mime-parsefull.cc $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../bincimapmime/mime-parsefull.cc -mime-parseonlyheader.o : ../bincimapmime/mime-parseonlyheader.cc +mime-parseonlyheader.o : ../bincimapmime/mime-parseonlyheader.cc $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../bincimapmime/mime-parseonlyheader.cc -mime-printbody.o : ../bincimapmime/mime-printbody.cc +mime-printbody.o : ../bincimapmime/mime-printbody.cc $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../bincimapmime/mime-printbody.cc -mime-printdoc.o : ../bincimapmime/mime-printdoc.cc +mime-printdoc.o : ../bincimapmime/mime-printdoc.cc $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../bincimapmime/mime-printdoc.cc -mime-printheader.o : ../bincimapmime/mime-printheader.cc +mime-printheader.o : ../bincimapmime/mime-printheader.cc $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../bincimapmime/mime-printheader.cc -mime.o : ../bincimapmime/mime.cc +mime.o : ../bincimapmime/mime.cc $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../bincimapmime/mime.cc -convert.o : ../bincimapmime/convert.cc +convert.o : ../bincimapmime/convert.cc $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../bincimapmime/convert.cc -iodevice.o : ../bincimapmime/iodevice.cc +iodevice.o : ../bincimapmime/iodevice.cc $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../bincimapmime/iodevice.cc -iofactory.o : ../bincimapmime/iofactory.cc +iofactory.o : ../bincimapmime/iofactory.cc $(depth)/mk/localdefs $(CXX) $(ALL_CXXFLAGS) -c ../bincimapmime/iofactory.cc depend: $(DEPS) clean: @@ -155,175 +155,175 @@ clean: for i in *.dep;do test -f $$i && cp /dev/null $$i;done distclean: clean rm -f *.dep -rclaspell.dep.stamp : ../aspell/rclaspell.cpp +rclaspell.dep.stamp : ../aspell/rclaspell.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../aspell/rclaspell.cpp > rclaspell.dep touch rclaspell.dep.stamp -rclconfig.dep.stamp : ../common/rclconfig.cpp +rclconfig.dep.stamp : ../common/rclconfig.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../common/rclconfig.cpp > rclconfig.dep touch rclconfig.dep.stamp -rclinit.dep.stamp : ../common/rclinit.cpp +rclinit.dep.stamp : ../common/rclinit.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../common/rclinit.cpp > rclinit.dep touch rclinit.dep.stamp -textsplit.dep.stamp : ../common/textsplit.cpp +textsplit.dep.stamp : ../common/textsplit.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../common/textsplit.cpp > textsplit.dep touch textsplit.dep.stamp -unacpp.dep.stamp : ../common/unacpp.cpp +unacpp.dep.stamp : ../common/unacpp.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../common/unacpp.cpp > unacpp.dep touch unacpp.dep.stamp -beaglequeue.dep.stamp : ../index/beaglequeue.cpp +beaglequeue.dep.stamp : ../index/beaglequeue.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../index/beaglequeue.cpp > beaglequeue.dep touch beaglequeue.dep.stamp -csguess.dep.stamp : ../index/csguess.cpp +csguess.dep.stamp : ../index/csguess.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../index/csguess.cpp > csguess.dep touch csguess.dep.stamp -fsindexer.dep.stamp : ../index/fsindexer.cpp +fsindexer.dep.stamp : ../index/fsindexer.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../index/fsindexer.cpp > fsindexer.dep touch fsindexer.dep.stamp -indexer.dep.stamp : ../index/indexer.cpp +indexer.dep.stamp : ../index/indexer.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../index/indexer.cpp > indexer.dep touch indexer.dep.stamp -mimetype.dep.stamp : ../index/mimetype.cpp +mimetype.dep.stamp : ../index/mimetype.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../index/mimetype.cpp > mimetype.dep touch mimetype.dep.stamp -htmlparse.dep.stamp : ../internfile/htmlparse.cpp +htmlparse.dep.stamp : ../internfile/htmlparse.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../internfile/htmlparse.cpp > htmlparse.dep touch htmlparse.dep.stamp -myhtmlparse.dep.stamp : ../internfile/myhtmlparse.cpp +myhtmlparse.dep.stamp : ../internfile/myhtmlparse.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../internfile/myhtmlparse.cpp > myhtmlparse.dep touch myhtmlparse.dep.stamp -mimehandler.dep.stamp : ../internfile/mimehandler.cpp +mimehandler.dep.stamp : ../internfile/mimehandler.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../internfile/mimehandler.cpp > mimehandler.dep touch mimehandler.dep.stamp -internfile.dep.stamp : ../internfile/internfile.cpp +internfile.dep.stamp : ../internfile/internfile.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../internfile/internfile.cpp > internfile.dep touch internfile.dep.stamp -mh_exec.dep.stamp : ../internfile/mh_exec.cpp +mh_exec.dep.stamp : ../internfile/mh_exec.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../internfile/mh_exec.cpp > mh_exec.dep touch mh_exec.dep.stamp -mh_execm.dep.stamp : ../internfile/mh_execm.cpp +mh_execm.dep.stamp : ../internfile/mh_execm.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../internfile/mh_execm.cpp > mh_execm.dep touch mh_execm.dep.stamp -mh_html.dep.stamp : ../internfile/mh_html.cpp +mh_html.dep.stamp : ../internfile/mh_html.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../internfile/mh_html.cpp > mh_html.dep touch mh_html.dep.stamp -mh_mail.dep.stamp : ../internfile/mh_mail.cpp +mh_mail.dep.stamp : ../internfile/mh_mail.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../internfile/mh_mail.cpp > mh_mail.dep touch mh_mail.dep.stamp -mh_mbox.dep.stamp : ../internfile/mh_mbox.cpp +mh_mbox.dep.stamp : ../internfile/mh_mbox.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../internfile/mh_mbox.cpp > mh_mbox.dep touch mh_mbox.dep.stamp -mh_text.dep.stamp : ../internfile/mh_text.cpp +mh_text.dep.stamp : ../internfile/mh_text.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../internfile/mh_text.cpp > mh_text.dep touch mh_text.dep.stamp -docseq.dep.stamp : ../query/docseq.cpp +docseq.dep.stamp : ../query/docseq.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../query/docseq.cpp > docseq.dep touch docseq.dep.stamp -docseqdb.dep.stamp : ../query/docseqdb.cpp +docseqdb.dep.stamp : ../query/docseqdb.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../query/docseqdb.cpp > docseqdb.dep touch docseqdb.dep.stamp -docseqhist.dep.stamp : ../query/docseqhist.cpp +docseqhist.dep.stamp : ../query/docseqhist.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../query/docseqhist.cpp > docseqhist.dep touch docseqhist.dep.stamp -filtseq.dep.stamp : ../query/filtseq.cpp +filtseq.dep.stamp : ../query/filtseq.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../query/filtseq.cpp > filtseq.dep touch filtseq.dep.stamp -dynconf.dep.stamp : ../query/dynconf.cpp +dynconf.dep.stamp : ../query/dynconf.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../query/dynconf.cpp > dynconf.dep touch dynconf.dep.stamp -plaintorich.dep.stamp : ../query/plaintorich.cpp +plaintorich.dep.stamp : ../query/plaintorich.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../query/plaintorich.cpp > plaintorich.dep touch plaintorich.dep.stamp -recollq.dep.stamp : ../query/recollq.cpp +recollq.dep.stamp : ../query/recollq.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../query/recollq.cpp > recollq.dep touch recollq.dep.stamp -reslistpager.dep.stamp : ../query/reslistpager.cpp +reslistpager.dep.stamp : ../query/reslistpager.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../query/reslistpager.cpp > reslistpager.dep touch reslistpager.dep.stamp -sortseq.dep.stamp : ../query/sortseq.cpp +sortseq.dep.stamp : ../query/sortseq.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../query/sortseq.cpp > sortseq.dep touch sortseq.dep.stamp -wasastringtoquery.dep.stamp : ../query/wasastringtoquery.cpp +wasastringtoquery.dep.stamp : ../query/wasastringtoquery.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../query/wasastringtoquery.cpp > wasastringtoquery.dep touch wasastringtoquery.dep.stamp -wasatorcl.dep.stamp : ../query/wasatorcl.cpp +wasatorcl.dep.stamp : ../query/wasatorcl.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../query/wasatorcl.cpp > wasatorcl.dep touch wasatorcl.dep.stamp -rcldb.dep.stamp : ../rcldb/rcldb.cpp +rcldb.dep.stamp : ../rcldb/rcldb.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../rcldb/rcldb.cpp > rcldb.dep touch rcldb.dep.stamp -rcldoc.dep.stamp : ../rcldb/rcldoc.cpp +rcldoc.dep.stamp : ../rcldb/rcldoc.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../rcldb/rcldoc.cpp > rcldoc.dep touch rcldoc.dep.stamp -rclquery.dep.stamp : ../rcldb/rclquery.cpp +rclquery.dep.stamp : ../rcldb/rclquery.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../rcldb/rclquery.cpp > rclquery.dep touch rclquery.dep.stamp -searchdata.dep.stamp : ../rcldb/searchdata.cpp +searchdata.dep.stamp : ../rcldb/searchdata.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../rcldb/searchdata.cpp > searchdata.dep touch searchdata.dep.stamp -stemdb.dep.stamp : ../rcldb/stemdb.cpp +stemdb.dep.stamp : ../rcldb/stemdb.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../rcldb/stemdb.cpp > stemdb.dep touch stemdb.dep.stamp -stoplist.dep.stamp : ../rcldb/stoplist.cpp +stoplist.dep.stamp : ../rcldb/stoplist.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../rcldb/stoplist.cpp > stoplist.dep touch stoplist.dep.stamp -base64.dep.stamp : ../utils/base64.cpp +base64.dep.stamp : ../utils/base64.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../utils/base64.cpp > base64.dep touch base64.dep.stamp -circache.dep.stamp : ../utils/circache.cpp +circache.dep.stamp : ../utils/circache.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../utils/circache.cpp > circache.dep touch circache.dep.stamp -closefrom.dep.stamp : ../utils/closefrom.cpp +closefrom.dep.stamp : ../utils/closefrom.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../utils/closefrom.cpp > closefrom.dep touch closefrom.dep.stamp -conftree.dep.stamp : ../utils/conftree.cpp +conftree.dep.stamp : ../utils/conftree.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../utils/conftree.cpp > conftree.dep touch conftree.dep.stamp -copyfile.dep.stamp : ../utils/copyfile.cpp +copyfile.dep.stamp : ../utils/copyfile.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../utils/copyfile.cpp > copyfile.dep touch copyfile.dep.stamp -debuglog.dep.stamp : ../utils/debuglog.cpp +debuglog.dep.stamp : ../utils/debuglog.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../utils/debuglog.cpp > debuglog.dep touch debuglog.dep.stamp -execmd.dep.stamp : ../utils/execmd.cpp +execmd.dep.stamp : ../utils/execmd.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../utils/execmd.cpp > execmd.dep touch execmd.dep.stamp -fstreewalk.dep.stamp : ../utils/fstreewalk.cpp +fstreewalk.dep.stamp : ../utils/fstreewalk.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../utils/fstreewalk.cpp > fstreewalk.dep touch fstreewalk.dep.stamp -idfile.dep.stamp : ../utils/idfile.cpp +idfile.dep.stamp : ../utils/idfile.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../utils/idfile.cpp > idfile.dep touch idfile.dep.stamp -fileudi.dep.stamp : ../utils/fileudi.cpp +fileudi.dep.stamp : ../utils/fileudi.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../utils/fileudi.cpp > fileudi.dep touch fileudi.dep.stamp -md5.dep.stamp : ../utils/md5.cpp +md5.dep.stamp : ../utils/md5.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../utils/md5.cpp > md5.dep touch md5.dep.stamp -mimeparse.dep.stamp : ../utils/mimeparse.cpp +mimeparse.dep.stamp : ../utils/mimeparse.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../utils/mimeparse.cpp > mimeparse.dep touch mimeparse.dep.stamp -netcon.dep.stamp : ../utils/netcon.cpp +netcon.dep.stamp : ../utils/netcon.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../utils/netcon.cpp > netcon.dep touch netcon.dep.stamp -pathut.dep.stamp : ../utils/pathut.cpp +pathut.dep.stamp : ../utils/pathut.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../utils/pathut.cpp > pathut.dep touch pathut.dep.stamp -pxattr.dep.stamp : ../utils/pxattr.cpp +pxattr.dep.stamp : ../utils/pxattr.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../utils/pxattr.cpp > pxattr.dep touch pxattr.dep.stamp -readfile.dep.stamp : ../utils/readfile.cpp +readfile.dep.stamp : ../utils/readfile.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../utils/readfile.cpp > readfile.dep touch readfile.dep.stamp -smallut.dep.stamp : ../utils/smallut.cpp +smallut.dep.stamp : ../utils/smallut.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../utils/smallut.cpp > smallut.dep touch smallut.dep.stamp -transcode.dep.stamp : ../utils/transcode.cpp +transcode.dep.stamp : ../utils/transcode.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../utils/transcode.cpp > transcode.dep touch transcode.dep.stamp -wipedir.dep.stamp : ../utils/wipedir.cpp +wipedir.dep.stamp : ../utils/wipedir.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../utils/wipedir.cpp > wipedir.dep touch wipedir.dep.stamp -x11mon.dep.stamp : ../utils/x11mon.cpp +x11mon.dep.stamp : ../utils/x11mon.cpp $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../utils/x11mon.cpp > x11mon.dep touch x11mon.dep.stamp include rclaspell.dep @@ -383,34 +383,34 @@ include smallut.dep include transcode.dep include wipedir.dep include x11mon.dep -mime-getpart.dep.stamp : ../bincimapmime/mime-getpart.cc +mime-getpart.dep.stamp : ../bincimapmime/mime-getpart.cc $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../bincimapmime/mime-getpart.cc > mime-getpart.dep touch mime-getpart.dep.stamp -mime-parsefull.dep.stamp : ../bincimapmime/mime-parsefull.cc +mime-parsefull.dep.stamp : ../bincimapmime/mime-parsefull.cc $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../bincimapmime/mime-parsefull.cc > mime-parsefull.dep touch mime-parsefull.dep.stamp -mime-parseonlyheader.dep.stamp : ../bincimapmime/mime-parseonlyheader.cc +mime-parseonlyheader.dep.stamp : ../bincimapmime/mime-parseonlyheader.cc $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../bincimapmime/mime-parseonlyheader.cc > mime-parseonlyheader.dep touch mime-parseonlyheader.dep.stamp -mime-printbody.dep.stamp : ../bincimapmime/mime-printbody.cc +mime-printbody.dep.stamp : ../bincimapmime/mime-printbody.cc $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../bincimapmime/mime-printbody.cc > mime-printbody.dep touch mime-printbody.dep.stamp -mime-printdoc.dep.stamp : ../bincimapmime/mime-printdoc.cc +mime-printdoc.dep.stamp : ../bincimapmime/mime-printdoc.cc $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../bincimapmime/mime-printdoc.cc > mime-printdoc.dep touch mime-printdoc.dep.stamp -mime-printheader.dep.stamp : ../bincimapmime/mime-printheader.cc +mime-printheader.dep.stamp : ../bincimapmime/mime-printheader.cc $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../bincimapmime/mime-printheader.cc > mime-printheader.dep touch mime-printheader.dep.stamp -mime.dep.stamp : ../bincimapmime/mime.cc +mime.dep.stamp : ../bincimapmime/mime.cc $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../bincimapmime/mime.cc > mime.dep touch mime.dep.stamp -convert.dep.stamp : ../bincimapmime/convert.cc +convert.dep.stamp : ../bincimapmime/convert.cc $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../bincimapmime/convert.cc > convert.dep touch convert.dep.stamp -iodevice.dep.stamp : ../bincimapmime/iodevice.cc +iodevice.dep.stamp : ../bincimapmime/iodevice.cc $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../bincimapmime/iodevice.cc > iodevice.dep touch iodevice.dep.stamp -iofactory.dep.stamp : ../bincimapmime/iofactory.cc +iofactory.dep.stamp : ../bincimapmime/iofactory.cc $(depth)/mk/localdefs $(CXX) -M $(ALL_CXXFLAGS) ../bincimapmime/iofactory.cc > iofactory.dep touch iofactory.dep.stamp include mime-getpart.dep diff --git a/src/lib/mkMake b/src/lib/mkMake index 3b3527c7..94ea52ab 100755 --- a/src/lib/mkMake +++ b/src/lib/mkMake @@ -93,6 +93,10 @@ for c in $SRC_CC;do DEPS="$DEPS $s" done +# The objects need to depend on the localdefs file in case it is +# changed by a re-configure (it has the local compile flags) +defs=\$\(depth\)/mk/localdefs + test -f $mk && chmod +w $mk cat > $mk <> $mk + echo "$o : $c $defs" >> $mk echo " \$(CXX) \$(ALL_CXXFLAGS) -c $c" >> $mk done for c in $SRC_CC;do o=`basename $c .cc`.o - echo "$o : $c" >> $mk + echo "$o : $c $defs" >> $mk echo " \$(CXX) \$(ALL_CXXFLAGS) -c $c" >> $mk done @@ -138,7 +142,7 @@ EOF for c in $SRC_CPP;do d=`basename $c .cpp`.dep s=`basename $c .cpp`.dep.stamp - echo "$s : $c" >> $mk + echo "$s : $c $defs" >> $mk echo " \$(CXX) -M \$(ALL_CXXFLAGS) $c > $d" >> $mk echo " touch $s" >> $mk done @@ -149,7 +153,7 @@ done for c in $SRC_CC;do d=`basename $c .cc`.dep s=`basename $c .cc`.dep.stamp - echo "$s : $c" >> $mk + echo "$s : $c $defs" >> $mk echo " \$(CXX) -M \$(ALL_CXXFLAGS) $c > $d" >> $mk echo " touch $s" >> $mk done diff --git a/src/mk/commondefs b/src/mk/commondefs index ed90e548..ec310b69 100644 --- a/src/mk/commondefs +++ b/src/mk/commondefs @@ -12,8 +12,8 @@ COMMONCXXFLAGS = -I. \ -I$(depth)/utils # We happen to be using gcc on all platforms for now. Can be overridden in -# sys file anyway -PIC_CXXFLAGS = -fPIC -DPIC +# the sys file or localdefs +SYSPICFLAGS = -fPIC -DPIC BIGLIB = $(depth)/lib/librcl.a diff --git a/src/mk/localdefs.in b/src/mk/localdefs.in index a99c28ed..0a97576d 100644 --- a/src/mk/localdefs.in +++ b/src/mk/localdefs.in @@ -24,10 +24,14 @@ libdir = @libdir@ RECOLL_DATADIR = ${datadir}/recoll +@NOPIC@PICFLAGS = $(SYSPICFLAGS) + LOCALCXXFLAGS = -g -O2 -Wall -Wno-unused \ $(INCICONV) $(XAPIANCXXFLAGS) $(X_CFLAGS) \ -DRECOLL_DATADIR=\"$(RECOLL_DATADIR)\" \ -DLIBDIR=\"$(libdir)\" \ + $(PICFLAGS) \ @DEFS@ CXXFLAGS = @CXXFLAGS@ + diff --git a/src/php/00README.txt b/src/php/00README.txt index 727da573..51874902 100644 --- a/src/php/00README.txt +++ b/src/php/00README.txt @@ -4,17 +4,19 @@ Recoll PHP extension: This has minimum features for now. -The sample/ subdirectory has a minimal script which demonstrates the +The php/sample/ subdirectory has a minimal script which demonstrates the interface. Building the extension needs the librcl.a library (recoll-xxx/lib/librcl.a) -to have been built with PIC objects. This will be handled by the Recoll -build system in the future, but, for now, if using gcc, just add -fPIC --DPIC to LOCALCXXFLAGS inside mk/localdefs, and run "make clean;make" inside -lib/ . For other compilers, adjust to taste :) +to have been built with PIC objects. -The recoll/ subdirectory has the C++ code and the build script +Use "configure --enable-pic" in the top Recoll directory, then +"make". There is no significant disadvantage in using PIC objects for +everything so you need not bother having different builds for the +extensions and the programs. + +The php/recoll/ subdirectory has the C++ code and the build script (make.sh). You'll need to "make install" after building. -If you want to clean up the recoll/ directory, you can run phpize --clean +If you want to clean up the php/recoll/ directory, you can run phpize --clean in there. diff --git a/src/python/README.txt b/src/python/README.txt new file mode 100644 index 00000000..62281ae4 --- /dev/null +++ b/src/python/README.txt @@ -0,0 +1,2 @@ +How to build and use the python interface is documented in the Recoll +user manual, inside the "Programming interface" chapter. diff --git a/src/python/recoll/setup.py b/src/python/recoll/setup.py index 38643d25..8921bca0 100644 --- a/src/python/recoll/setup.py +++ b/src/python/recoll/setup.py @@ -3,9 +3,9 @@ import os sys = os.uname()[0] if sys == 'Linux': - libs = ['xapian'] + libs = ['rcl', 'xapian'] else: - libs = ['xapian', 'iconv'] + libs = ['rcl', 'xapian', 'iconv'] if 'RECOLL_DATADIR' in os.environ: datadirs = [os.environ['RECOLL_DATADIR']] @@ -36,31 +36,8 @@ module1 = Extension('recoll', os.path.join(top, 'unac') ], libraries = libs, - library_dirs = ['/usr/local/lib'], + library_dirs = [os.path.join(top, 'lib'), '/usr/local/lib'], sources = ['pyrecoll.cpp', - os.path.join(top, 'common/rclconfig.cpp'), - os.path.join(top, 'common/rclinit.cpp'), - os.path.join(top, 'common/textsplit.cpp'), - os.path.join(top, 'common/unacpp.cpp'), - os.path.join(top, 'query/wasastringtoquery.cpp'), - os.path.join(top, 'query/wasatorcl.cpp'), - os.path.join(top, 'utils/fileudi.cpp'), - os.path.join(top, 'rcldb/rcldb.cpp'), - os.path.join(top, 'rcldb/rcldoc.cpp'), - os.path.join(top, 'rcldb/rclquery.cpp'), - os.path.join(top, 'rcldb/searchdata.cpp'), - os.path.join(top, 'rcldb/stemdb.cpp'), - os.path.join(top, 'rcldb/stoplist.cpp'), - os.path.join(top, 'unac/unac.c'), - os.path.join(top, 'utils/base64.cpp'), - os.path.join(top, 'utils/conftree.cpp'), - os.path.join(top, 'utils/debuglog.cpp'), - os.path.join(top, 'utils/md5.cpp'), - os.path.join(top, 'utils/pathut.cpp'), - os.path.join(top, 'utils/readfile.cpp'), - os.path.join(top, 'utils/smallut.cpp'), - os.path.join(top, 'utils/transcode.cpp'), - os.path.join(top, 'utils/wipedir.cpp') ]) setup (name = 'Recoll',