summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-16 17:55:59 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-16 17:55:59 +0000
commita0d96967938113e7413deb773804d3db2f0ed274 (patch)
tree5ebba792f5bb7821f03ae050afb38cb66b57da0a
parent06aafbb31b7319a1c4fa477556108eac45424fa6 (diff)
downloadadmin-a0d96967938113e7413deb773804d3db2f0ed274.tar.gz
admin-a0d96967938113e7413deb773804d3db2f0ed274.zip
Fix up Autotools for TQt3/TQt4
This should repair compilation of non-core Autotools-based packages such as Adept git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kde-common/admin@1232280 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r--acinclude.m4.in62
-rw-r--r--am_edit6
2 files changed, 46 insertions, 22 deletions
diff --git a/acinclude.m4.in b/acinclude.m4.in
index 65615ee..f7fb58e 100644
--- a/acinclude.m4.in
+++ b/acinclude.m4.in
@@ -253,9 +253,9 @@ configure.
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 (tmoc) found!
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 tmoc binary.
configure tried to run $ac_cv_path_moc and the test didn't
succeed. If configure shouldn't have tried this one, set
the environment variable TQTMOC to the right one before running
@@ -1224,21 +1224,45 @@ EOF
AC_DEFUN([KDE_USE_QT],
[
-if test -z "$1"; then
+#if test -z "$1"; then
# Current default Qt version: 3.3
kde_qtver=3
kde_qtsubver=3
-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
+
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ ac_cxxflags_safe="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -I/usr/include/tqt"
+ AC_TRY_COMPILE([
+ #include <tqt.h>
+ #ifdef USE_QT4
+ 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
- kde_qtver=`echo "$1" | sed -e 's#^\([0-9][0-9]*\)\..*#\1#'`
- if test "$kde_qtver" = "1"; then
- kde_qtsubver=42
+ 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 "$kde_qtver" = "2"; 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 ------------------------------------------------------------
if test "$kde_qtver" = "4"; then
- qtlib="QtCore -lQtGui"
+ qtlib="QtCore -lQtGui -ltqt"
fi
if test "$kde_qtver" = "3"; 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)
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!])
- TQTMOC="\$PATH=\$PATH:\$(srcdir)/ moc-tqt"
+ TQTMOC="\$PATH=\$PATH:\$(srcdir)/ tmoc"
LIBTQT_LDFLAGS="-ltqt"
AC_SUBST(LIBTQT_LDFLAGS)
qtlib="$qtlib $LIBTQT_LDFLAGS"
@@ -2818,16 +2842,16 @@ dnl all_libraries="$all_libraries $LIBTQT_LDFLAGS"
all_includes="$all_includes $LIBTQT_CXXFLAGS"
QT_INCLUDES="$QT_INCLUDES $LIBTQT_CXXFLAGS"
- KDE_FIND_PATH(moc-tqt, TQTMOC, [$qt_bindirs], [KDE_TQTMOC_ERROR_MESSAGE])
+ KDE_FIND_PATH(tmoc, TQTMOC, [$qt_bindirs], [KDE_TQTMOC_ERROR_MESSAGE])
AC_SUBST(TQTMOC)
- KDE_FIND_PATH(dcopidl-tqt, TQTDCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl-tqt)])
- KDE_FIND_PATH(dcopidl2cpp-tqt, TQTDCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp-tqt)])
+ KDE_FIND_PATH(dcopidl, TQTDCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)])
+ KDE_FIND_PATH(dcopidl2cpp, TQTDCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)])
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
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
AC_SUBST(TQTDCOPIDL)
diff --git a/am_edit b/am_edit
index 41dee23..668c5ac 100644
--- a/am_edit
+++ b/am_edit
@@ -1381,7 +1381,7 @@ sub tag_UIFILES ()
$dep_lines .= "\t\$(UIC) -o $source.h $sourcedir$source.ui\n";
}
$dep_lines .= "$source.moc: $source.h\n";
- $dep_lines .= "\t\$(TQTMOC) \$(MOC) $source.h $source.moc\n";
+ $dep_lines .= "\t\$(TQTMOC) $source.h -o $source.moc\n";
$rule_adds{"$source.$cxxsuffix"} = $dep_lines;
@@ -2242,13 +2242,13 @@ sub addMocRules ()
$cppFile =~ s,\.[^.]*$,,;
$target_adds{"$cppFile.o"} .= "$mocFile.moc ";
$target_adds{"$cppFile.lo"} .= "$mocFile.moc ";
- appendLines ("$mocFile.moc: $dir/$hFile\n\t\$(TQTMOC) \$(MOC) $dir/$hFile $mocFile.moc\n");
+ appendLines ("$mocFile.moc: $dir/$hFile\n\t\$(TQTMOC) $dir/$hFile -o $mocFile.moc\n");
$cleanMoc .= " $mocFile.moc";
appendLines ("mocs: $mocFile.moc\n");
}
else
{
- appendLines ("$mocFile$mocExt: $dir/$hFile\n\t\$(TQTMOC) \$(MOC) $dir/$hFile $mocFile$mocExt\n");
+ appendLines ("$mocFile$mocExt: $dir/$hFile\n\t\$(TQTMOC) $dir/$hFile -o $mocFile$mocExt\n");
$cleanMoc .= " $mocFile$mocExt";
appendLines ("mocs: $mocFile$mocExt\n");
}