Switch to unified view

a/src/configure.ac b/src/configure.ac
...
...
251
# QMAKESPEC: on most Linux system, there is a 'default' link inside the
251
# QMAKESPEC: on most Linux system, there is a 'default' link inside the
252
# mkspecs directory, so that QMAKESPEC is not needed.
252
# mkspecs directory, so that QMAKESPEC is not needed.
253
# If QMAKESPEC is not set and needed, the qmake test at the previous test
253
# If QMAKESPEC is not set and needed, the qmake test at the previous test
254
# will have failed, and we tell the user to check his environment.
254
# will have failed, and we tell the user to check his environment.
255
#
255
#
256
AC_ARG_WITH(gui, 
257
    AC_HELP_STRING([--without-gui],
258
   [Disable the QT user interface and auxiliary x11 uses.]),
259
        withQT=$withval, withQT="yes")
256
260
261
if test "$withQT" != "yes" ; then
262
   AC_DEFINE(WIHOUT_X11)
263
   NOQTMAKE="#"
264
   NOCMDLINE=""
265
else
266
  NOQTMAKE=""
267
  NOCMDLINE="#"
268
257
if test X$QTDIR != X ; then
269
  if test X$QTDIR != X ; then
258
   PATH=$PATH:$QTDIR/bin
270
     PATH=$PATH:$QTDIR/bin
259
   export PATH
271
     export PATH
260
fi
272
  fi
261
273
  
262
if test X$QMAKE = X ; then
274
  if test X$QMAKE = X ; then
263
   QMAKE=qmake
275
     QMAKE=qmake
264
fi
276
  fi
265
277
  
266
AC_PATH_PROG([QMAKEPATH], $QMAKE, NOTFOUND)
278
  AC_PATH_PROG([QMAKEPATH], $QMAKE, NOTFOUND)
267
if test X$QMAKEPATH = XNOTFOUND ; then 
279
  if test X$QMAKEPATH = XNOTFOUND ; then 
268
   AC_MSG_ERROR([Cannot find the qmake program. Maybe you need to install
280
     AC_MSG_ERROR([Cannot find the qmake program. Maybe you need to install
269
qt development files and tools and/or set the QTDIR environment variable?])
281
  qt development files and tools and/or set the QTDIR environment variable?])
270
fi
282
  fi
271
QMAKE=$QMAKEPATH
283
  QMAKE=$QMAKEPATH
272
284
  
273
# MAC OS X: we don't support this (the native search tool is more than
285
  # MAC OS X: we don't support this (the native search tool is more than
274
# good enough), but we make things work just enough so that the program can
286
  # good enough), but we make things work just enough so that the program can
275
# be compiled and roughly installed (not as a .app, but to /usr/local),
287
  # be compiled and roughly installed (not as a .app, but to /usr/local),
276
# basically to enable using a Macbook for development
288
  # basically to enable using a Macbook for development
277
if test X$sys = XDarwin ; then
289
  if test X$sys = XDarwin ; then
278
   # The default is xcode
290
     # The default is xcode
279
   QMAKE="${QMAKE} -spec macx-g++"
291
     QMAKE="${QMAKE} -spec macx-g++"
280
fi
292
  fi
281
293
  
282
# Discriminate qt3/4. Qt3 qmake prints its version on stderr but we don't
294
  # Discriminate qt3/4. Qt3 qmake prints its version on stderr but we don't
283
# depend on this. We try to detect the qt 4 version string instead.
295
  # depend on this. We try to detect the qt 4 version string instead.
284
qmakevers="`${QMAKE} --version 2>&1`"
296
  qmakevers="`${QMAKE} --version 2>&1`"
285
#echo "qmake version: $qmakevers"
297
  #echo "qmake version: $qmakevers"
286
v4=`expr "$qmakevers" : '.*Qt[ ][ ]*version[ ][ ]*4.*'`
298
  v4=`expr "$qmakevers" : '.*Qt[ ][ ]*version[ ][ ]*4.*'`
287
if test X$v4 = X0 ; then 
299
  if test X$v4 = X0 ; then 
288
   AC_MSG_NOTICE([using qt version 3 user interface])
300
     AC_MSG_NOTICE([using qt version 3 user interface])
289
   QTGUI=qtgui
301
     QTGUI=qtgui
290
else
302
  else
291
  AC_MSG_NOTICE([using qt version 4 user interface])
303
    AC_MSG_NOTICE([using qt version 4 user interface])
292
  QTGUI=qt4gui
304
    QTGUI=qt4gui
293
  AC_PATH_PROG([UIC3], [uic3], NOTFOUND)
305
    AC_PATH_PROG([UIC3], [uic3], NOTFOUND)
294
  if test X$UIC3 = XNOTFOUND ; then 
306
    if test X$UIC3 = XNOTFOUND ; then 
295
    AC_MSG_ERROR([Cannot find the uic3 program. Maybe you need to add
307
      AC_MSG_ERROR([Cannot find the uic3 program. Maybe you need to add
296
    the qt3 compatibility libraries and tools to your qt4 installation ?])
308
      the qt3 compatibility libraries and tools to your qt4 installation ?])
297
  fi
309
    fi
298
fi
310
  fi
299
311
  
300
cd $QTGUI
312
  cd $QTGUI
301
# We just want a .pro file: no problem with unsubstituted variables at 
313
  # We just want a .pro file: no problem with unsubstituted variables at 
302
# this point.
314
  # this point.
303
test -f uifrom3 && make -f uifrom3
315
  test -f uifrom3 && make -f uifrom3
304
test -f recoll.pro && chmod +w recoll.pro
316
  test -f recoll.pro && chmod +w recoll.pro
305
cp recoll.pro.in recoll.pro
317
  cp recoll.pro.in recoll.pro
306
#echo QMAKE ${QMAKE}
318
  #echo QMAKE ${QMAKE}
307
${QMAKE} recoll.pro
319
  ${QMAKE} recoll.pro
308
if test $? != 0 ; then
320
  if test $? != 0 ; then
309
   AC_MSG_ERROR([Cannot use qmake to generate a Makefile. Maybe you need to
321
     AC_MSG_ERROR([Cannot use qmake to generate a Makefile. Maybe you need to
310
check the QTDIR and QMAKESPEC environment variables?])
322
  check the QTDIR and QMAKESPEC environment variables?])
311
fi
323
  fi
312
# is QTDIR set and do we actually need it ?
324
  # is QTDIR set and do we actually need it ?
313
if test X$QTDIR = X ; then
325
  if test X$QTDIR = X ; then
314
   QTDIRNEEDED=`grep INCPATH Makefile | grep = | grep QTDIR`
326
     QTDIRNEEDED=`grep INCPATH Makefile | grep = | grep QTDIR`
315
   if test "X$QTDIRNEEDED" != "X" ; then
327
     if test "X$QTDIRNEEDED" != "X" ; then
316
       AC_MSG_ERROR([You need to set the QTDIR variable to point to the QT
328
         AC_MSG_ERROR([You need to set the QTDIR variable to point to the QT
317
installation. If there is no default mkspecs, you should also set QMAKESPEC])
329
  installation. If there is no default mkspecs, you should also set QMAKESPEC])
330
     fi
318
   fi
331
  fi
319
fi
320
cd ..
332
  cd ..
321
333
334
  AC_CONFIG_FILES($QTGUI/recoll.pro)
322
##################### End QT detection
335
  ##################### End QT detection
336
fi
337
323
338
324
### X11: this is needed for the session monitoring code (in recollindex -m)
339
### X11: this is needed for the session monitoring code (in recollindex -m)
340
# We disable it if without-gui has been specified, but it could be separated
341
if test "$withQT" = "yes" ; then
325
AC_PATH_XTRA
342
  AC_PATH_XTRA
326
#echo X_CFLAGS "'$X_CFLAGS'" X_PRE_LIBS "'$X_PRE_LIBS'" X_LIBS "'$X_LIBS'" X_EXTRA_LIBS "'$X_EXTRA_LIBS'"
343
  X_LIBX11=-lX11
344
else
345
  X_LIBX11=""
346
fi
347
#echo X_CFLAGS "'$X_CFLAGS'" X_PRE_LIBS "'$X_PRE_LIBS'" X_LIBS \
348
#      "'$X_LIBS'" X_LIBX11 "'$X_LIBX11'" X_EXTRA_LIBS "'$X_EXTRA_LIBS'"
349
327
350
328
# We have to expand prefix in here, couldn't find a way to do it inside 
351
# We have to expand prefix in here, couldn't find a way to do it inside 
329
# the qt gui .pro file or Makefile. This just means that you can't change
352
# the qt gui .pro file or Makefile. This just means that you can't change
330
# prefix at build time. It works at install time because we dont' use the
353
# prefix at build time. It works at install time because we dont' use the
331
# qtgui Makefile
354
# qtgui Makefile
...
...
335
QTRECOLL_DATADIR=${m_datadir}/recoll
358
QTRECOLL_DATADIR=${m_datadir}/recoll
336
359
337
AC_SUBST(X_CFLAGS)
360
AC_SUBST(X_CFLAGS)
338
AC_SUBST(X_PRE_LIBS)
361
AC_SUBST(X_PRE_LIBS)
339
AC_SUBST(X_LIBS)
362
AC_SUBST(X_LIBS)
363
AC_SUBST(X_LIBX11)
340
AC_SUBST(X_EXTRA_LIBS)
364
AC_SUBST(X_EXTRA_LIBS)
341
AC_SUBST(INCICONV)
365
AC_SUBST(INCICONV)
342
AC_SUBST(LIBICONV)
366
AC_SUBST(LIBICONV)
343
AC_SUBST(LIBXAPIAN)
367
AC_SUBST(LIBXAPIAN)
344
AC_SUBST(LIBFAM)
368
AC_SUBST(LIBFAM)
345
AC_SUBST(QMAKE)
369
AC_SUBST(QMAKE)
346
AC_SUBST(QTGUI)
370
AC_SUBST(QTGUI)
347
AC_SUBST(QTRECOLL_DATADIR)
371
AC_SUBST(QTRECOLL_DATADIR)
348
AC_SUBST(XAPIANCXXFLAGS)
372
AC_SUBST(XAPIANCXXFLAGS)
349
AC_SUBST(HAVE_MKDTEMP)
373
AC_SUBST(HAVE_MKDTEMP)
374
AC_SUBST(NOQTMAKE)
375
AC_SUBST(NOCMDLINE)
376
350
AC_CONFIG_FILES(mk/localdefs)
377
AC_CONFIG_FILES(mk/localdefs)
351
AC_CONFIG_FILES(recollinstall)
378
AC_CONFIG_FILES(recollinstall)
352
AC_CONFIG_FILES(Makefile)
379
AC_CONFIG_FILES(Makefile)
353
AC_CONFIG_FILES(sampleconf/recoll.conf)
380
AC_CONFIG_FILES(sampleconf/recoll.conf)
354
AC_CONFIG_FILES($QTGUI/recoll.pro)
355
381
356
for d in bincimapmime index lib query
382
for d in bincimapmime index lib query
357
do 
383
do 
358
    rm -f $d/alldeps.stamp
384
    rm -f $d/alldeps.stamp
359
    cp -f /dev/null $d/alldeps
385
    cp -f /dev/null $d/alldeps