arrange to link additional libs needed by Xapian when doing a static build

This commit is contained in:
Jean-Francois Dockes 2010-09-26 19:41:49 +02:00
parent b95a3460bf
commit 6e6a90d956
5 changed files with 1947 additions and 3223 deletions

View File

@ -27,10 +27,14 @@ ${versfile} : VERSION
static: mk/sysconf common/rclversion.h
cd lib; ${MAKE}
cd index; rm -f recollindex; \
${MAKE} BSTATIC=-Wl,-Bstatic BDYNAMIC=-Wl,-Bdynamic recollindex
${MAKE} BSTATIC=-Wl,-Bstatic BDYNAMIC=-Wl,-Bdynamic \
LIBXAPIANSTATICEXTRA="@LIBXAPIANSTATICEXTRA@" \
recollindex
@NOQTMAKE@cd $(QTGUI); $(QMAKE) recoll.pro; \
@NOQTMAKE@ rm -f recoll; \
@NOQTMAKE@ ${MAKE} BSTATIC=-Wl,-Bstatic BDYNAMIC=-Wl,-Bdynamic depth=..
@NOQTMAKE@ ${MAKE} BSTATIC=-Wl,-Bstatic \
@NOQTMAKE@ BDYNAMIC=-Wl,-Bdynamic depth=.. \
@NOQTMAKE@ LIBXAPIANSTATICEXTRA="@LIBXAPIANSTATICEXTRA@"
clean:
-cd common; ${MAKE} clean

5142
src/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -266,6 +266,10 @@ xapian-core installed ?])
exit 1
fi
LIBXAPIAN=`$XAPIAN_CONFIG --libs`
# The --static thing fails with older Xapians. Happily enough they don't
# need it either (because there are no needed libraries (no uuid and we
# deal explicitely with libz)
LIBXAPIANSTATICEXTRA=`$XAPIAN_CONFIG --static --libs 2> /dev/null`
# Workaround for problem in xapian-config in some versions: wrongly lists
# libstdc++.la in the lib list
for i in $LIBXAPIAN ; do
@ -281,6 +285,7 @@ XAPIANCXXFLAGS=`$XAPIAN_CONFIG --cxxflags`
#echo XAPIAN_CONFIG: $XAPIAN_CONFIG
#echo LIBXAPIAN: $LIBXAPIAN
#echo LIBXAPIANSTATICEXTRA: $LIBXAPIANSTATICEXTRA
#echo XAPIANCXXFLAGS: $XAPIANCXXFLAGS
#### QT
@ -324,8 +329,11 @@ else
if test X$QMAKE = X ; then
QMAKE=qmake
fi
AC_PATH_PROG([QMAKEPATH], $QMAKE, NOTFOUND)
case $QMAKE in
*/*) QMAKEPATH=$QMAKE;;
*) AC_PATH_PROG([QMAKEPATH], $QMAKE, NOTFOUND);;
esac
if test X$QMAKEPATH = XNOTFOUND ; then
AC_MSG_ERROR([Cannot find the qmake program. Maybe you need to install
qt development files and tools and/or set the QTDIR environment variable?])
@ -424,6 +432,7 @@ AC_SUBST(X_EXTRA_LIBS)
AC_SUBST(INCICONV)
AC_SUBST(LIBICONV)
AC_SUBST(LIBXAPIAN)
AC_SUBST(LIBXAPIANSTATICEXTRA)
AC_SUBST(LIBFAM)
AC_SUBST(QMAKE)
AC_SUBST(QTGUI)

View File

@ -1,7 +1,7 @@
depth = ..
include $(depth)/mk/sysconf
PROGS = recollindex csguess mimetype
PROGS = recollindex
SRCS = recollindex.cpp rclmonrcv.cpp rclmonprc.cpp
all: depend $(PROGS) $(BIGLIB)
@ -9,7 +9,8 @@ all: depend $(PROGS) $(BIGLIB)
RECOLLINDEX_OBJS= recollindex.o rclmonrcv.o rclmonprc.o $(BIGLIB)
recollindex : $(RECOLLINDEX_OBJS)
$(CXX) $(ALL_CXXFLAGS) -o recollindex $(RECOLLINDEX_OBJS) \
$(BSTATIC) $(LIBXAPIAN) $(LIBICONV) $(BDYNAMIC) \
$(BSTATIC) $(LIBXAPIAN) $(LIBXAPIANSTATICEXTRA) \
$(LIBICONV) $(BDYNAMIC) \
$(LIBFAM) \
$(X_LIBS) $(X_PRE_LIBS) $(X_LIBX11) $(X_EXTRA_LIBS) \
$(LIBSYS)

View File

@ -58,7 +58,7 @@ unix {
OBJECTS_DIR = .obj
LIBS += ../lib/librcl.a \
$(BSTATIC) @LIBXAPIAN@ @LIBICONV@ $(BDYNAMIC) \
$(BSTATIC) @LIBXAPIAN@ $(LIBXAPIANSTATICEXTRA) @LIBICONV@ $(BDYNAMIC) \
-lz
INCLUDEPATH += ../common ../index ../internfile ../query ../unac \