2
AC_CONFIG_HEADERS([common/autoconfig.h])
4
AC_CONFIG_SRCDIR(index/recollindex.cpp)
7
if test -f mk/$sys ; then
8
(cd mk; test -f sysconf || ln -s $sys sysconf)
11
No system configuration file found in mk/ for '$sys'. Maybe you
12
could try to write one, starting from one of the existing files, they
18
# Use aspell to provide spelling expansions ?
19
# The default is yes. If we do find an aspell installation, we use it. Else
20
# we do compile the aspell module using an internal copy of aspell.h
21
# Only --with-aspell=no will completely disable aspell support
23
AC_HELP_STRING([--without-aspell],
24
[Disable use of aspell spelling package to provide term expansion to other spellings]),
25
withAspell=$withval, withAspell=yes)
29
AC_PATH_PROG(aspellProg, aspell)
31
*) # The argument should be the path to the aspell program
32
aspellProg=$withAspell
35
echo withAspell = $withAspell
37
if test X$withAspell != Xno ; then
38
AC_DEFINE(RCL_USE_ASPELL, 1, [Compile the aspell interface])
39
if test X$aspellProg != X ; then
40
aspellBase=`dirname $aspellProg`
41
aspellBase=`dirname $aspellBase`
42
AC_DEFINE_UNQUOTED(ASPELL_PROG, "$aspellProg",
43
[Path to the aspell program])
44
if test -f $aspellBase/include/aspell.h ; then
45
AC_DEFINE_UNQUOTED(ASPELL_INCLUDE, "$aspellBase/include/aspell.h",
46
[Path to the aspell api include file])
48
AC_MSG_NOTICE([aspell support enabled but aspell package not found. Compiling with internal aspell interface file])
49
AC_DEFINE(ASPELL_INCLUDE, ["aspell-local.h"])
52
# aspell support enabled but no aspell install yet
53
AC_MSG_NOTICE([aspell support enabled but aspell package not found. Compiling with internal aspell interface file])
54
AC_DEFINE(ASPELL_INCLUDE, ["aspell-local.h"])
58
# Real time monitoring with FAM
60
AC_HELP_STRING([--with-fam],
61
[Use File Alteration Monitor for almost real time indexing of modified files. Give the fam/gamin library as argument (ie: /usr/lib/libfam.so) if configure does not find the right one.]),
62
withFam=$withval, withFam=no)
66
for dir in /usr/local/lib /usr/lib;do
67
if test -f $dir/libfam.so ; then famLib=$dir/libfam.so;break;fi
70
*) # The argument should be the path to the fam library
75
if test X$withFam != Xno ; then
76
AC_DEFINE(RCL_MONITOR, 1, [Real time monitoring option])
77
AC_DEFINE(RCL_USE_FAM, 1, [Compile the fam interface])
78
if test X$famLib != X ; then
79
famLibDir=`dirname $famLib`
80
famBase=`dirname $famLibDir`
81
famBLib=`basename $famLib .so | sed -e s/lib//`
82
if test ! -f $famBase/include/fam.h ; then
83
AC_MSG_ERROR([fam.h not found in $famBase/include. Specify --with-fam=no to disable fam support])
85
LIBFAM="-L$famLibDir -l$famBLib"
86
AC_MSG_NOTICE([fam library directive: $LIBFAM])
87
AC_DEFINE_UNQUOTED(FAM_INCLUDE, "$famBase/include/fam.h",
88
[Path to the fam api include file])
90
AC_MSG_ERROR([fam library not found])
94
if test -f /usr/include/sys/inotify.h -a X$withFam = Xno ; then
100
# Real time monitoring with inotify
102
AC_HELP_STRING([--with-inotify],
103
[Use inotify for almost real time indexing of modified files.]),
104
withInotify=$withval, withInotify=$inot_default)
106
if test X$withInotify != Xno ; then
107
AC_MSG_NOTICE([enabled support for inotify monitoring])
108
AC_DEFINE(RCL_MONITOR, 1, [Real time monitoring option])
109
AC_DEFINE(RCL_USE_INOTIFY, 1, [Compile the inotify interface])
111
AC_MSG_NOTICE([inotify monitoring disabled])
114
##### Look for iconv. We first look for libiconv in /usr/local/lib:/usr/lib
115
## then in libc (Linux, solaris)
120
LDFLAGS="$S_LDFLAGS -L$dir"
121
unset ac_cv_lib_iconv_iconv_open
122
AC_CHECK_LIB(iconv, iconv_open, LIBICONV="-L$dir -liconv";INCICONV=-I/usr/local/include)
123
if test A"$LIBICONV" = A ; then
125
LDFLAGS="$S_LDFLAGS -L$dir"
126
unset ac_cv_lib_iconv_iconv_open
127
AC_CHECK_LIB(iconv, iconv_open, LIBICONV="-L$dir -liconv";INCICONV=-I/usr/include)
128
if test A"$LIBICONV" = A; then
130
LDFLAGS="$S_LDFLAGS -L$dir"
131
unset ac_cv_lib_iconv_iconv_open
132
AC_CHECK_LIB(c, iconv_open, LIBICONV=NONE;INCICONV=-I/usr/include)
136
if test A"$LIBICONV" = A ; then
137
AC_MSG_ERROR([Cannot find iconv_open anywhere. Please install iconv])
140
if test A"$LIBICONV" = ANONE ; then
143
#echo LIBICONV $LIBICONV
144
#echo INCICONV $INCICONV
147
AC_PATH_PROG(XAPIAN_CONFIG, xapian-config, no)
148
if test "$XAPIAN_CONFIG" = "no" ; then
149
AC_MSG_ERROR([Cannot find xapian-config command in $PATH. Is
150
xapian-core installed ?])
153
LIBXAPIAN=`$XAPIAN_CONFIG --libs`
154
# Workaround for problem in xapian-config in some versions: wrongly lists
155
# libstdc++.la in the lib list
156
for i in $LIBXAPIAN ; do
158
*stdc++*|-lm|-lgcc_s|-lc);;
159
*) tmpxaplib="$tmpxaplib $i";;
163
XAPIANCXXFLAGS=`$XAPIAN_CONFIG --cxxflags`
165
#echo XAPIAN_CONFIG: $XAPIAN_CONFIG
166
#echo LIBXAPIAN: $LIBXAPIAN
167
#echo XAPIANCXXFLAGS: $XAPIANCXXFLAGS
170
# The way qt and its tools (qmake especially) are installed is very
171
# different between systems (and maybe qt versions)
173
# In general we need QTDIR to be set, because it is used inside the
174
# qmake-generated makefiles. But there are exceptions: ie on debian3.1 (at
175
# least on the sourceforge compile farm), QTDIR is not needed because qmake
176
# generates hard paths (and is installed in /usr/bin). We don't want to
177
# force the user to set QTDIR if it is not needed.
179
# The logic is then to first look for qmake, possibly using QTDIR if it is
182
# If QTDIR is not set, we then generate a bogus qt project and check if
183
# QTDIR is needed in the Makefile, in which case we complain.
185
# QMAKESPEC: on most Linux system, there is a 'default' link inside the
186
# mkspecs directory, so that QMAKESPEC is not needed.
187
# If QMAKESPEC is not set and needed, the qmake test at the previous test
188
# will have failed, and we tell the user to check his environment.
190
# Note about qt4: if --enable-qt4 (enables the qt4gui directory), and the
191
# QTDIR variable are inconsistent, too bad.
194
AC_HELP_STRING([--enable-qt4],
196
rcl_cv_qt4=$enableval, rcl_cv_qt4=no)
197
AC_MSG_NOTICE(rcl_cv_qt4 $rcl_cv_qt4)
198
if test X$rcl_cv_qt4 = Xyes ; then
204
if test X$QTDIR != X ; then
205
PATH=$QTDIR/bin:$PATH
209
AC_PATH_PROG([QMAKE], [qmake], NOTFOUND)
210
if test X$QMAKE = XNOTFOUND ; then
211
AC_MSG_ERROR([Cannot find the qmake program. Maybe you need to install
212
it and/or set the QTDIR environment variable?])
216
# We just want a .pro file: no problem with unsubstituted variables at
218
test -f uifrom3 && sh uifrom3
219
test -f recoll.pro && chmod +w recoll.pro
220
cp recoll.pro.in recoll.pro
222
if test $? != 0 ; then
223
AC_MSG_ERROR([Cannot use qmake to generate a Makefile. Maybe you need to
224
check the QTDIR and QMAKESPEC environment variables?])
226
# is QTDIR set and do we actually need it ?
227
if test X$QTDIR = X ; then
228
QTDIRNEEDED=`grep INCPATH Makefile | grep = | grep QTDIR`
229
if test "X$QTDIRNEEDED" != "X" ; then
230
AC_MSG_ERROR([You need to set the QTDIR variable to point to the QT
231
installation. If there is no default mkspecs, you should also set QMAKESPEC])
236
##################### End QT detection
238
### X11: this is needed for the session monitoring code (in recollindex -m)
240
#echo X_CFLAGS "'$X_CFLAGS'" X_PRE_LIBS "'$X_PRE_LIBS'" X_LIBS "'$X_LIBS'" X_EXTRA_LIBS "'$X_EXTRA_LIBS'"
242
# We have to expand prefix in here, couldn't find a way to do it inside
243
# the qt gui .pro file or Makefile. This just means that you can't change
244
# prefix at build time. It works at install time because we dont' use the
247
test "X$m_prefix" = "XNONE" && m_prefix=/usr/local
248
m_datadir=${m_prefix}/share
249
QTRECOLL_DATADIR=${m_datadir}/recoll
254
AC_SUBST(X_EXTRA_LIBS)
261
AC_SUBST(QTRECOLL_DATADIR)
262
AC_SUBST(XAPIANCXXFLAGS)
264
AC_CONFIG_FILES(mk/localdefs)
265
AC_CONFIG_FILES(recollinstall)
266
AC_CONFIG_FILES(Makefile)
267
AC_CONFIG_FILES(sampleconf/recoll.conf)
268
AC_CONFIG_FILES($QTGUI/recoll.pro)
270
for d in bincimapmime index lib query
272
rm -f $d/alldeps.stamp
273
cp -f /dev/null $d/alldeps
276
(cd lib;test -f Makefile && chmod +w Makefile;sh mkMake)
279
chmod a+x recollinstall