- else
- qt4_cv_libname="$qt4_cv_libname -lQtGui -lQt3Support"
- AC_MSG_RESULT([$qt4_cv_libname])
- fi
-])
-
-dnl get Qt version we're using
-AC_DEFUN([QT4_GET_VERSION],
-[
- AC_CACHE_CHECK([Qt 4 version],lyx_cv_qt4version,
- [
- AC_LANG_CPLUSPLUS
- SAVE_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS $QT4_INCLUDES"
-
- cat > conftest.$ac_ext <<EOF
-#line __oline__ "configure"
-#include "confdefs.h"
-#include <qglobal.h>
-"%%%"QT_VERSION_STR"%%%"
-EOF
- lyx_cv_qt4version=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | \
- grep '^"%%%"' 2>/dev/null | \
- sed -e 's/"%%%"//g' -e 's/"//g'`
- rm -f conftest.$ac_ext
- CPPFLAGS=$SAVE_CPPFLAGS
- ])
-
- QT4_VERSION=$lyx_cv_qt4version
- AC_SUBST(QT4_VERSION)
-])
-
-dnl start here
-AC_DEFUN([QT4_DO_IT_ALL],
-[
- dnl this variable is precious
- AC_ARG_VAR(QT4DIR, [the place where the Qt 4 files are, e.g. /usr/lib/qt4])
-
- dnl Please leave this alone. I use this file in
- dnl oprofile.
- FATAL=0
-
- AC_ARG_WITH(qt4-dir, [ --with-qt4-dir where the root of Qt 4 is installed ],
- [ qt4_cv_dir=`eval echo "$withval"/` ])
-
- AC_ARG_WITH(qt4-includes, [ --with-qt4-includes where the Qt 4 includes are. ],
- [ qt4_cv_includes=`eval echo "$withval"` ])
-
- AC_ARG_WITH(qt4-libraries, [ --with-qt4-libraries where the Qt 4 library is installed.],
- [ qt4_cv_libraries=`eval echo "$withval"` ])
-
- dnl pay attention to $QT4DIR unless overridden
- if test -z "$qt4_cv_dir"; then
- qt4_cv_dir=$QT4DIR
- fi
-
- dnl derive inc/lib if needed
- if test -n "$qt4_cv_dir"; then
- if test -z "$qt4_cv_includes"; then
- qt4_cv_includes=$qt4_cv_dir/include