@ -253,9 +253,9 @@ configure.
AC_DEFUN([KDE_TQTMOC_ERROR_MESSAGE],
AC_DEFUN([KDE_TQTMOC_ERROR_MESSAGE],
[
[
AC_MSG_ERROR([No Trinity Qt meta object compiler (moc-tqt ) found!
AC_MSG_ERROR([No Trinity Qt meta object compiler (t moc) found!
Please check whether you installed the Trinity Qt Interface correctly.
Please check whether you installed the Trinity Qt Interface correctly.
You need to have a running moc-tqt binary.
You need to have a running t moc binary.
configure tried to run $ac_cv_path_moc and the test didn't
configure tried to run $ac_cv_path_moc and the test didn't
succeed. If configure shouldn't have tried this one, set
succeed. If configure shouldn't have tried this one, set
the environment variable TQTMOC to the right one before running
the environment variable TQTMOC to the right one before running
@ -1224,22 +1224,46 @@ EOF
AC_DEFUN([KDE_USE_QT],
AC_DEFUN([KDE_USE_QT],
[
[
if test -z "$1"; then
# if test -z "$1"; then
# Current default Qt version: 3.3
# Current default Qt version: 3.3
kde_qtver=3
kde_qtver=3
kde_qtsubver=3
kde_qtsubver=3
else
kde_qtsubver=`echo "$1" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'`
AC_LANG_SAVE
# following is the check if subversion isnt found in passed argument
AC_LANG_CPLUSPLUS
if test "$kde_qtsubver" = "$1"; then
ac_cxxflags_safe="$CXXFLAGS"
kde_qtsubver=1
CXXFLAGS="$CXXFLAGS -I/usr/include/tqt"
fi
AC_TRY_COMPILE([
kde_qtver=`echo "$1" | sed -e 's#^\([0-9][0-9]*\)\..*#\1#'`
#include <tqt.h>
if test "$kde_qtver" = "1"; then
#ifdef USE_QT4
kde_qtsubver=42
choke me
#endif
], ,
kde_qtver=3,
kde_qtver=4
)
CXXFLAGS="$ac_cxxflags_safe"
AC_LANG_RESTORE
if test "$kde_qtver" = "3"; then
AC_MSG_RESULT(Detected TQt3...)
fi
fi
if test "$kde_qtver" = "4"; then
AC_MSG_RESULT(Detected TQt4...)
fi
fi
#else
# kde_qtsubver=`echo "$1" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'`
# # following is the check if subversion isnt found in passed argument
# if test "$kde_qtsubver" = "$1"; then
# kde_qtsubver=1
# fi
# kde_qtver=`echo "$1" | sed -e 's#^\([0-9][0-9]*\)\..*#\1#'`
# if test "$kde_qtver" = "1"; then
# kde_qtsubver=42
# fi
#fi
if test -z "$2"; then
if test -z "$2"; then
if test "$kde_qtver" = "2"; then
if test "$kde_qtver" = "2"; then
if test $kde_qtsubver -gt 0; then
if test $kde_qtsubver -gt 0; then
@ -1474,7 +1498,7 @@ dnl If we got --enable-embedded then adjust the Qt library name.
dnl Also Qt4 uses a different library name
dnl Also Qt4 uses a different library name
dnl ------------------------------------------------------------
dnl ------------------------------------------------------------
if test "$kde_qtver" = "4"; then
if test "$kde_qtver" = "4"; then
qtlib="QtCore -lQtGui"
qtlib="QtCore -lQtGui -ltqt "
fi
fi
if test "$kde_qtver" = "3"; then
if test "$kde_qtver" = "3"; then
if test "x$kde_use_qt_emb" = "xyes"; then
if test "x$kde_use_qt_emb" = "xyes"; then
@ -2802,7 +2826,7 @@ if eval "test ! \"`echo $kde_cv_tqt`\" = no"; then
AC_MSG_RESULT(no)
AC_MSG_RESULT(no)
dnl AC_MSG_ERROR([You are attempting to compile Trinity without the Trinity Qt Interface installed. Please install libtqtinterface-dev and try again!])
dnl AC_MSG_ERROR([You are attempting to compile Trinity without the Trinity Qt Interface installed. Please install libtqtinterface-dev and try again!])
AC_MSG_WARN([You are attempting to compile Trinity without the Trinity Qt Interface installed. Please install libtqtinterface-dev and try again!])
AC_MSG_WARN([You are attempting to compile Trinity without the Trinity Qt Interface installed. Please install libtqtinterface-dev and try again!])
TQTMOC="\$PATH=\$PATH:\$(srcdir)/ moc-tqt "
TQTMOC="\$PATH=\$PATH:\$(srcdir)/ t moc"
LIBTQT_LDFLAGS="-ltqt"
LIBTQT_LDFLAGS="-ltqt"
AC_SUBST(LIBTQT_LDFLAGS)
AC_SUBST(LIBTQT_LDFLAGS)
qtlib="$qtlib $LIBTQT_LDFLAGS"
qtlib="$qtlib $LIBTQT_LDFLAGS"
@ -2818,16 +2842,16 @@ dnl all_libraries="$all_libraries $LIBTQT_LDFLAGS"
all_includes="$all_includes $LIBTQT_CXXFLAGS"
all_includes="$all_includes $LIBTQT_CXXFLAGS"
QT_INCLUDES="$QT_INCLUDES $LIBTQT_CXXFLAGS"
QT_INCLUDES="$QT_INCLUDES $LIBTQT_CXXFLAGS"
KDE_FIND_PATH(moc-tqt , TQTMOC, [$qt_bindirs], [KDE_TQTMOC_ERROR_MESSAGE])
KDE_FIND_PATH(t moc, TQTMOC, [$qt_bindirs], [KDE_TQTMOC_ERROR_MESSAGE])
AC_SUBST(TQTMOC)
AC_SUBST(TQTMOC)
KDE_FIND_PATH(dcopidl-tqt , TQTDCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl-tqt )])
KDE_FIND_PATH(dcopidl, TQTDCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)])
KDE_FIND_PATH(dcopidl2cpp-tqt , TQTDCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp-tqt )])
KDE_FIND_PATH(dcopidl2cpp, TQTDCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)])
if test "$build_arts" '!=' "no"; then
if test "$build_arts" '!=' "no"; then
KDE_FIND_PATH(mcopidl-tqt , TQTMCOPIDL, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(mcopidl-tqt )])
KDE_FIND_PATH(mcopidl, TQTMCOPIDL, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(mcopidl)])
fi
fi
if test -n "$kde32ornewer"; then
if test -n "$kde32ornewer"; then
KDE_FIND_PATH(dcopidlng-tqt , TQTDCOPIDLNG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidlng-tqt )])
KDE_FIND_PATH(dcopidlng, TQTDCOPIDLNG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidlng)])
fi
fi
AC_SUBST(TQTDCOPIDL)
AC_SUBST(TQTDCOPIDL)