add --without-gui configure option
This commit is contained in:
parent
e636480622
commit
3070b62ddd
@ -14,7 +14,8 @@ QTGUI = @QTGUI@
|
|||||||
all: mk/sysconf common/rclversion.h
|
all: mk/sysconf common/rclversion.h
|
||||||
cd lib; ${MAKE}
|
cd lib; ${MAKE}
|
||||||
cd index; ${MAKE} recollindex
|
cd index; ${MAKE} recollindex
|
||||||
cd $(QTGUI); ${QMAKE} recoll.pro; ${MAKE} depth=..
|
@NOQTMAKE@cd $(QTGUI); ${QMAKE} recoll.pro; ${MAKE} depth=..
|
||||||
|
@NOCMDLINE@ cd query; ${MAKE} recollq
|
||||||
|
|
||||||
mk/sysconf:
|
mk/sysconf:
|
||||||
@echo "You need to run configure first" ; exit 1
|
@echo "You need to run configure first" ; exit 1
|
||||||
@ -27,9 +28,9 @@ static: mk/sysconf common/rclversion.h
|
|||||||
cd lib; ${MAKE}
|
cd lib; ${MAKE}
|
||||||
cd index; rm -f recollindex; \
|
cd index; rm -f recollindex; \
|
||||||
${MAKE} BSTATIC=-Wl,-Bstatic BDYNAMIC=-Wl,-Bdynamic recollindex
|
${MAKE} BSTATIC=-Wl,-Bstatic BDYNAMIC=-Wl,-Bdynamic recollindex
|
||||||
cd $(QTGUI); $(QMAKE) recoll.pro; \
|
@NOQTMAKE@cd $(QTGUI); $(QMAKE) recoll.pro; \
|
||||||
rm -f recoll; \
|
@NOQTMAKE@ rm -f recoll; \
|
||||||
${MAKE} BSTATIC=-Wl,-Bstatic BDYNAMIC=-Wl,-Bdynamic depth=..
|
@NOQTMAKE@ ${MAKE} BSTATIC=-Wl,-Bstatic BDYNAMIC=-Wl,-Bdynamic depth=..
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
-cd common; ${MAKE} clean
|
-cd common; ${MAKE} clean
|
||||||
@ -39,8 +40,9 @@ clean:
|
|||||||
-cd query; ${MAKE} clean
|
-cd query; ${MAKE} clean
|
||||||
-cd utils; ${MAKE} clean
|
-cd utils; ${MAKE} clean
|
||||||
#cd doc/user; ${MAKE} clean
|
#cd doc/user; ${MAKE} clean
|
||||||
@-cd qtgui; ${MAKE} clean
|
@NOQTMAKE@@-cd qtgui; ${MAKE} clean
|
||||||
@-cd qt4gui; ${MAKE} clean
|
@NOQTMAKE@@-cd qt4gui; ${MAKE} clean
|
||||||
|
@NOCMDLINE@ cd query; ${MAKE} clean
|
||||||
rm -f qtgui/Makefile qtgui/confgui/Makefile qtgui/recoll
|
rm -f qtgui/Makefile qtgui/confgui/Makefile qtgui/recoll
|
||||||
rm -f qt4gui/Makefile qt4gui/preview/Makefile qt4gui/recoll
|
rm -f qt4gui/Makefile qt4gui/preview/Makefile qt4gui/recoll
|
||||||
rm -f common/rclversion.h
|
rm -f common/rclversion.h
|
||||||
@ -58,7 +60,7 @@ distclean: clean
|
|||||||
wasabi/Makefile wasabi/client/Makefile wasabi/server/Makefile
|
wasabi/Makefile wasabi/client/Makefile wasabi/server/Makefile
|
||||||
rm -f index/alldeps lib/alldeps query/alldeps
|
rm -f index/alldeps lib/alldeps query/alldeps
|
||||||
rm -rf autom4te.cache
|
rm -rf autom4te.cache
|
||||||
(cd qt4gui; make -f uifrom3 distclean)
|
@NOQTMAKE@(cd qt4gui; make -f uifrom3 distclean)
|
||||||
|
|
||||||
maintainer-clean: distclean
|
maintainer-clean: distclean
|
||||||
rm -f doc/user/*.html* doc/user/*.txt doc/user/HTML.manifest
|
rm -f doc/user/*.html* doc/user/*.txt doc/user/HTML.manifest
|
||||||
|
|||||||
@ -43,3 +43,6 @@
|
|||||||
|
|
||||||
/* Use file extended attributes */
|
/* Use file extended attributes */
|
||||||
#undef RCL_USE_XATTR
|
#undef RCL_USE_XATTR
|
||||||
|
|
||||||
|
/* No X11 */
|
||||||
|
#undef WITHOUT_X11
|
||||||
|
|||||||
156
src/configure.ac
156
src/configure.ac
@ -253,77 +253,100 @@ XAPIANCXXFLAGS=`$XAPIAN_CONFIG --cxxflags`
|
|||||||
# If QMAKESPEC is not set and needed, the qmake test at the previous test
|
# If QMAKESPEC is not set and needed, the qmake test at the previous test
|
||||||
# will have failed, and we tell the user to check his environment.
|
# will have failed, and we tell the user to check his environment.
|
||||||
#
|
#
|
||||||
|
AC_ARG_WITH(gui,
|
||||||
|
AC_HELP_STRING([--without-gui],
|
||||||
|
[Disable the QT user interface and auxiliary x11 uses.]),
|
||||||
|
withQT=$withval, withQT="yes")
|
||||||
|
|
||||||
if test X$QTDIR != X ; then
|
if test "$withQT" != "yes" ; then
|
||||||
PATH=$PATH:$QTDIR/bin
|
AC_DEFINE(WIHOUT_X11)
|
||||||
export PATH
|
NOQTMAKE="#"
|
||||||
fi
|
NOCMDLINE=""
|
||||||
|
|
||||||
if test X$QMAKE = X ; then
|
|
||||||
QMAKE=qmake
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_PATH_PROG([QMAKEPATH], $QMAKE, NOTFOUND)
|
|
||||||
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?])
|
|
||||||
fi
|
|
||||||
QMAKE=$QMAKEPATH
|
|
||||||
|
|
||||||
# MAC OS X: we don't support this (the native search tool is more than
|
|
||||||
# good enough), but we make things work just enough so that the program can
|
|
||||||
# be compiled and roughly installed (not as a .app, but to /usr/local),
|
|
||||||
# basically to enable using a Macbook for development
|
|
||||||
if test X$sys = XDarwin ; then
|
|
||||||
# The default is xcode
|
|
||||||
QMAKE="${QMAKE} -spec macx-g++"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Discriminate qt3/4. Qt3 qmake prints its version on stderr but we don't
|
|
||||||
# depend on this. We try to detect the qt 4 version string instead.
|
|
||||||
qmakevers="`${QMAKE} --version 2>&1`"
|
|
||||||
#echo "qmake version: $qmakevers"
|
|
||||||
v4=`expr "$qmakevers" : '.*Qt[ ][ ]*version[ ][ ]*4.*'`
|
|
||||||
if test X$v4 = X0 ; then
|
|
||||||
AC_MSG_NOTICE([using qt version 3 user interface])
|
|
||||||
QTGUI=qtgui
|
|
||||||
else
|
else
|
||||||
AC_MSG_NOTICE([using qt version 4 user interface])
|
NOQTMAKE=""
|
||||||
QTGUI=qt4gui
|
NOCMDLINE="#"
|
||||||
AC_PATH_PROG([UIC3], [uic3], NOTFOUND)
|
|
||||||
if test X$UIC3 = XNOTFOUND ; then
|
if test X$QTDIR != X ; then
|
||||||
AC_MSG_ERROR([Cannot find the uic3 program. Maybe you need to add
|
PATH=$PATH:$QTDIR/bin
|
||||||
the qt3 compatibility libraries and tools to your qt4 installation ?])
|
export PATH
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test X$QMAKE = X ; then
|
||||||
|
QMAKE=qmake
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_PATH_PROG([QMAKEPATH], $QMAKE, NOTFOUND)
|
||||||
|
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?])
|
||||||
|
fi
|
||||||
|
QMAKE=$QMAKEPATH
|
||||||
|
|
||||||
|
# MAC OS X: we don't support this (the native search tool is more than
|
||||||
|
# good enough), but we make things work just enough so that the program can
|
||||||
|
# be compiled and roughly installed (not as a .app, but to /usr/local),
|
||||||
|
# basically to enable using a Macbook for development
|
||||||
|
if test X$sys = XDarwin ; then
|
||||||
|
# The default is xcode
|
||||||
|
QMAKE="${QMAKE} -spec macx-g++"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Discriminate qt3/4. Qt3 qmake prints its version on stderr but we don't
|
||||||
|
# depend on this. We try to detect the qt 4 version string instead.
|
||||||
|
qmakevers="`${QMAKE} --version 2>&1`"
|
||||||
|
#echo "qmake version: $qmakevers"
|
||||||
|
v4=`expr "$qmakevers" : '.*Qt[ ][ ]*version[ ][ ]*4.*'`
|
||||||
|
if test X$v4 = X0 ; then
|
||||||
|
AC_MSG_NOTICE([using qt version 3 user interface])
|
||||||
|
QTGUI=qtgui
|
||||||
|
else
|
||||||
|
AC_MSG_NOTICE([using qt version 4 user interface])
|
||||||
|
QTGUI=qt4gui
|
||||||
|
AC_PATH_PROG([UIC3], [uic3], NOTFOUND)
|
||||||
|
if test X$UIC3 = XNOTFOUND ; then
|
||||||
|
AC_MSG_ERROR([Cannot find the uic3 program. Maybe you need to add
|
||||||
|
the qt3 compatibility libraries and tools to your qt4 installation ?])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd $QTGUI
|
||||||
|
# We just want a .pro file: no problem with unsubstituted variables at
|
||||||
|
# this point.
|
||||||
|
test -f uifrom3 && make -f uifrom3
|
||||||
|
test -f recoll.pro && chmod +w recoll.pro
|
||||||
|
cp recoll.pro.in recoll.pro
|
||||||
|
#echo QMAKE ${QMAKE}
|
||||||
|
${QMAKE} recoll.pro
|
||||||
|
if test $? != 0 ; then
|
||||||
|
AC_MSG_ERROR([Cannot use qmake to generate a Makefile. Maybe you need to
|
||||||
|
check the QTDIR and QMAKESPEC environment variables?])
|
||||||
|
fi
|
||||||
|
# is QTDIR set and do we actually need it ?
|
||||||
|
if test X$QTDIR = X ; then
|
||||||
|
QTDIRNEEDED=`grep INCPATH Makefile | grep = | grep QTDIR`
|
||||||
|
if test "X$QTDIRNEEDED" != "X" ; then
|
||||||
|
AC_MSG_ERROR([You need to set the QTDIR variable to point to the QT
|
||||||
|
installation. If there is no default mkspecs, you should also set QMAKESPEC])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
AC_CONFIG_FILES($QTGUI/recoll.pro)
|
||||||
|
##################### End QT detection
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd $QTGUI
|
|
||||||
# We just want a .pro file: no problem with unsubstituted variables at
|
|
||||||
# this point.
|
|
||||||
test -f uifrom3 && make -f uifrom3
|
|
||||||
test -f recoll.pro && chmod +w recoll.pro
|
|
||||||
cp recoll.pro.in recoll.pro
|
|
||||||
#echo QMAKE ${QMAKE}
|
|
||||||
${QMAKE} recoll.pro
|
|
||||||
if test $? != 0 ; then
|
|
||||||
AC_MSG_ERROR([Cannot use qmake to generate a Makefile. Maybe you need to
|
|
||||||
check the QTDIR and QMAKESPEC environment variables?])
|
|
||||||
fi
|
|
||||||
# is QTDIR set and do we actually need it ?
|
|
||||||
if test X$QTDIR = X ; then
|
|
||||||
QTDIRNEEDED=`grep INCPATH Makefile | grep = | grep QTDIR`
|
|
||||||
if test "X$QTDIRNEEDED" != "X" ; then
|
|
||||||
AC_MSG_ERROR([You need to set the QTDIR variable to point to the QT
|
|
||||||
installation. If there is no default mkspecs, you should also set QMAKESPEC])
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
##################### End QT detection
|
|
||||||
|
|
||||||
### X11: this is needed for the session monitoring code (in recollindex -m)
|
### X11: this is needed for the session monitoring code (in recollindex -m)
|
||||||
AC_PATH_XTRA
|
# We disable it if without-gui has been specified, but it could be separated
|
||||||
#echo X_CFLAGS "'$X_CFLAGS'" X_PRE_LIBS "'$X_PRE_LIBS'" X_LIBS "'$X_LIBS'" X_EXTRA_LIBS "'$X_EXTRA_LIBS'"
|
if test "$withQT" = "yes" ; then
|
||||||
|
AC_PATH_XTRA
|
||||||
|
X_LIBX11=-lX11
|
||||||
|
else
|
||||||
|
X_LIBX11=""
|
||||||
|
fi
|
||||||
|
#echo X_CFLAGS "'$X_CFLAGS'" X_PRE_LIBS "'$X_PRE_LIBS'" X_LIBS \
|
||||||
|
# "'$X_LIBS'" X_LIBX11 "'$X_LIBX11'" X_EXTRA_LIBS "'$X_EXTRA_LIBS'"
|
||||||
|
|
||||||
|
|
||||||
# We have to expand prefix in here, couldn't find a way to do it inside
|
# We have to expand prefix in here, couldn't find a way to do it inside
|
||||||
# the qt gui .pro file or Makefile. This just means that you can't change
|
# the qt gui .pro file or Makefile. This just means that you can't change
|
||||||
@ -337,6 +360,7 @@ QTRECOLL_DATADIR=${m_datadir}/recoll
|
|||||||
AC_SUBST(X_CFLAGS)
|
AC_SUBST(X_CFLAGS)
|
||||||
AC_SUBST(X_PRE_LIBS)
|
AC_SUBST(X_PRE_LIBS)
|
||||||
AC_SUBST(X_LIBS)
|
AC_SUBST(X_LIBS)
|
||||||
|
AC_SUBST(X_LIBX11)
|
||||||
AC_SUBST(X_EXTRA_LIBS)
|
AC_SUBST(X_EXTRA_LIBS)
|
||||||
AC_SUBST(INCICONV)
|
AC_SUBST(INCICONV)
|
||||||
AC_SUBST(LIBICONV)
|
AC_SUBST(LIBICONV)
|
||||||
@ -347,11 +371,13 @@ AC_SUBST(QTGUI)
|
|||||||
AC_SUBST(QTRECOLL_DATADIR)
|
AC_SUBST(QTRECOLL_DATADIR)
|
||||||
AC_SUBST(XAPIANCXXFLAGS)
|
AC_SUBST(XAPIANCXXFLAGS)
|
||||||
AC_SUBST(HAVE_MKDTEMP)
|
AC_SUBST(HAVE_MKDTEMP)
|
||||||
|
AC_SUBST(NOQTMAKE)
|
||||||
|
AC_SUBST(NOCMDLINE)
|
||||||
|
|
||||||
AC_CONFIG_FILES(mk/localdefs)
|
AC_CONFIG_FILES(mk/localdefs)
|
||||||
AC_CONFIG_FILES(recollinstall)
|
AC_CONFIG_FILES(recollinstall)
|
||||||
AC_CONFIG_FILES(Makefile)
|
AC_CONFIG_FILES(Makefile)
|
||||||
AC_CONFIG_FILES(sampleconf/recoll.conf)
|
AC_CONFIG_FILES(sampleconf/recoll.conf)
|
||||||
AC_CONFIG_FILES($QTGUI/recoll.pro)
|
|
||||||
|
|
||||||
for d in bincimapmime index lib query
|
for d in bincimapmime index lib query
|
||||||
do
|
do
|
||||||
|
|||||||
@ -11,7 +11,7 @@ recollindex : $(RECOLLINDEX_OBJS)
|
|||||||
$(CXX) $(ALL_CXXFLAGS) -o recollindex $(RECOLLINDEX_OBJS) \
|
$(CXX) $(ALL_CXXFLAGS) -o recollindex $(RECOLLINDEX_OBJS) \
|
||||||
$(BSTATIC) $(LIBXAPIAN) $(LIBICONV) $(BDYNAMIC) \
|
$(BSTATIC) $(LIBXAPIAN) $(LIBICONV) $(BDYNAMIC) \
|
||||||
$(LIBFAM) \
|
$(LIBFAM) \
|
||||||
$(X_LIBS) $(X_PRE_LIBS) -lX11 $(X_EXTRA_LIBS) \
|
$(X_LIBS) $(X_PRE_LIBS) $(X_LIBX11) $(X_EXTRA_LIBS) \
|
||||||
$(LIBSYS)
|
$(LIBSYS)
|
||||||
recollindex.o : recollindex.cpp
|
recollindex.o : recollindex.cpp
|
||||||
$(CXX) $(ALL_CXXFLAGS) -c -o recollindex.o $<
|
$(CXX) $(ALL_CXXFLAGS) -c -o recollindex.o $<
|
||||||
|
|||||||
@ -14,6 +14,7 @@ X_CFLAGS=@X_CFLAGS@
|
|||||||
X_PRE_LIBS=@X_PRE_LIBS@
|
X_PRE_LIBS=@X_PRE_LIBS@
|
||||||
X_LIBS=@X_LIBS@
|
X_LIBS=@X_LIBS@
|
||||||
X_EXTRA_LIBS=@X_EXTRA_LIBS@
|
X_EXTRA_LIBS=@X_EXTRA_LIBS@
|
||||||
|
X_LIBX11=@X_LIBX11@
|
||||||
|
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
exec_prefix = @exec_prefix@
|
exec_prefix = @exec_prefix@
|
||||||
|
|||||||
@ -3,7 +3,8 @@
|
|||||||
static char rcsid[] = "@(#$Id: x11mon.cpp,v 1.1 2006-12-23 12:23:15 dockes Exp $ (C) 2006 J.F.Dockes";
|
static char rcsid[] = "@(#$Id: x11mon.cpp,v 1.1 2006-12-23 12:23:15 dockes Exp $ (C) 2006 J.F.Dockes";
|
||||||
#endif
|
#endif
|
||||||
// Poll state of X11 connectibility (to detect end of user session).
|
// Poll state of X11 connectibility (to detect end of user session).
|
||||||
|
#include "autoconfig.h"
|
||||||
|
#ifndef WITHOUT_X11
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
@ -58,7 +59,12 @@ bool x11IsAlive()
|
|||||||
XSynchronize(m_display, sync);
|
XSynchronize(m_display, sync);
|
||||||
return m_ok;
|
return m_ok;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
bool x11IsAlive()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
#endif /* WITHOUT_X11 */
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user