|
a/src/configure.ac |
|
b/src/configure.ac |
|
... |
|
... |
58 |
|
58 |
|
59 |
#echo XAPIAN_CONFIG $XAPIAN_CONFIG
|
59 |
#echo XAPIAN_CONFIG $XAPIAN_CONFIG
|
60 |
#echo LIBXAPIAN $LIBXAPIAN
|
60 |
#echo LIBXAPIAN $LIBXAPIAN
|
61 |
#echo XAPIANCXXFLAGS $XAPIANCXXFLAGS
|
61 |
#echo XAPIANCXXFLAGS $XAPIANCXXFLAGS
|
62 |
|
62 |
|
|
|
63 |
#### QT
|
|
|
64 |
# The way qt and its tools (qmake especially) are installed is very
|
|
|
65 |
# different between systems (and maybe qt versions)
|
|
|
66 |
#
|
|
|
67 |
# In general we need QTDIR to be set, because it is used inside the
|
|
|
68 |
# qmake-generated makefiles. But there are exceptions: ie on debian3.1 (at
|
|
|
69 |
# least on the sourceforge compile farm), QTDIR is not needed because qmake
|
|
|
70 |
# generates hard paths (and is installed in /usr/bin). We don't want to
|
|
|
71 |
# force the user to set QTDIR if it is not needed.
|
|
|
72 |
#
|
|
|
73 |
# The logic is then to first look for qmake, possibly using QTDIR if it is
|
|
|
74 |
# set.
|
|
|
75 |
#
|
|
|
76 |
# If QTDIR is not set, we then generate a bogus qt project and check if
|
|
|
77 |
# QTDIR is needed in the Makefile, in which case we complain.
|
|
|
78 |
#
|
|
|
79 |
# QMAKESPEC: on most Linux system, there is a 'default' link inside the
|
|
|
80 |
# mkspecs directory, so that QMAKESPEC is not needed.
|
|
|
81 |
# If QMAKESPEC is not set and needed, the qmake test at the previous test
|
|
|
82 |
# will have failed, and we tell the user to check his environment.
|
|
|
83 |
|
|
|
84 |
if test X$QTDIR != X ; then
|
|
|
85 |
PATH=$QTDIR/bin:$PATH
|
|
|
86 |
export PATH
|
|
|
87 |
fi
|
|
|
88 |
echo $PATH
|
|
|
89 |
AC_PATH_PROG([QMAKE], [qmake], NOTFOUND)
|
|
|
90 |
if test X$QMAKE = XNOTFOUND ; then
|
|
|
91 |
AC_MSG_ERROR([Cannot find the qmake program. Maybe you need to install
|
|
|
92 |
it and/or set the QTDIR environment variable?])
|
|
|
93 |
fi
|
|
|
94 |
|
|
|
95 |
test -d tmp || mkdir tmp || exit 1
|
|
|
96 |
cd tmp
|
|
|
97 |
cat > bogus.pro <<EOF
|
|
|
98 |
TEMPLATE = app
|
|
|
99 |
LANGUAGE = C++
|
|
|
100 |
CONFIG += qt warn_on thread release debug
|
|
|
101 |
SOURCES += bogus.cpp
|
|
|
102 |
EOF
|
|
|
103 |
echo " " > bogus.cpp
|
|
|
104 |
${QMAKE} bogus.pro
|
|
|
105 |
if test $? != 0 ; then
|
|
|
106 |
AC_MSG_ERROR([Cannot use qmake to generate a Makefile. Maybe you need to
|
|
|
107 |
check the QTDIR and QMAKESPEC environment variables?])
|
|
|
108 |
fi
|
|
|
109 |
# is QTDIR set and do we actually need it ?
|
|
|
110 |
if test X$QTDIR = X ; then
|
|
|
111 |
QTDIRNEEDED=`grep INCPATH Makefile | grep = | grep QTDIR`
|
|
|
112 |
if test "X$QTDIRNEEDED" != "X" ; then
|
|
|
113 |
AC_MSG_ERROR([You need to set the QTDIR variable to point to the QT
|
|
|
114 |
installation. If there is no default mkspecs, you should also set QMAKESPEC])
|
|
|
115 |
fi
|
|
|
116 |
fi
|
|
|
117 |
rm -f bogus.pro bogus.cpp Makefile
|
|
|
118 |
cd ..
|
|
|
119 |
|
63 |
AC_SUBST(LIBXAPIAN)
|
120 |
AC_SUBST(LIBXAPIAN)
|
64 |
AC_SUBST(XAPIANCXXFLAGS)
|
121 |
AC_SUBST(XAPIANCXXFLAGS)
|
65 |
AC_SUBST(LIBICONV)
|
122 |
AC_SUBST(LIBICONV)
|
66 |
AC_SUBST(INCICONV)
|
123 |
AC_SUBST(INCICONV)
|
67 |
|
124 |
|