From 00b66ad7a1c63ab01787606c38218d0923f1fe41 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 10 Feb 2012 12:47:01 -0600 Subject: [PATCH] Update Autotools tqt checks --- acinclude.m4.in | 51 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/acinclude.m4.in b/acinclude.m4.in index 611f750..e7ed72f 100644 --- a/acinclude.m4.in +++ b/acinclude.m4.in @@ -2267,6 +2267,7 @@ AC_CACHE_VAL(kde_cv_have_kdeqtaddon, LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS" if test "$kde_qtver" = "3"; then +if $PKG_CONFIG --exists qt-mt ; then AC_TRY_LINK([ #include ], @@ -2276,6 +2277,17 @@ if test "$kde_qtver" = "3"; then kde_cv_have_kdeqtaddon=yes, kde_cv_have_kdeqtaddon=no ) +else + AC_TRY_LINK([ + #include + ], + [ + TQDomDocument doc; + ], + kde_cv_have_kdeqtaddon=yes, + kde_cv_have_kdeqtaddon=no + ) +fi fi if test "$kde_qtver" = "4"; then @@ -2948,6 +2960,7 @@ AC_TRY_LINK( eval "kde_cv_qt_jpeg=yes") fi if test "$kde_qtver" = "3"; then +if $PKG_CONFIG --exists qt-mt ; then AC_TRY_LINK( [#include ], [ @@ -2956,6 +2969,16 @@ AC_TRY_LINK( QApplication app(argc, argv);], eval "kde_cv_qt_jpeg=no", eval "kde_cv_qt_jpeg=yes") +else +AC_TRY_LINK( +[#include ], + [ + int argc; + char** argv; + TQApplication app(argc, argv);], + eval "kde_cv_qt_jpeg=no", + eval "kde_cv_qt_jpeg=yes") +fi fi LIBS="$ac_save_LIBS" CXXFLAGS="$ac_save_CXXFLAGS" @@ -3802,6 +3825,7 @@ AC_DEFUN([KDE_ENABLE_HIDDEN_VISIBILITY], CXXFLAGS="$CXXFLAGS $all_includes" if test "$kde_qtver" = "3"; then +if $PKG_CONFIG --exists qt-mt ; then AC_TRY_COMPILE( [ #include @@ -3811,6 +3835,17 @@ if test "$kde_qtver" = "3"; then #endif ], [/* elvis is alive */], kde_cv_val_qt_gcc_visibility_patched=no, kde_cv_val_qt_gcc_visibility_patched=yes) +else + AC_TRY_COMPILE( + [ +#include +#if Q_EXPORT - 0 != 0 +/* if this compiles, then Q_EXPORT is undefined */ +/* if Q_EXPORT is nonempty, this will break compilation */ +#endif + ], [/* elvis is alive */], + kde_cv_val_qt_gcc_visibility_patched=no, kde_cv_val_qt_gcc_visibility_patched=yes) +fi fi if test "$kde_qtver" = "4"; then @@ -5068,6 +5103,7 @@ ac_save_CXXFLAGS="$CXXFLAGS" if test "$kde_qtver" = "3"; then LIBS="$all_libraries -lqimgio -lpng -lz $LIBJPEG $LIBQT" CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes" +if $PKG_CONFIG --exists qt-mt ; then AC_TRY_RUN(dnl [ #include @@ -5081,6 +5117,21 @@ int main() { ac_cv_lib_qimgio=yes, ac_cv_lib_qimgio=no, ac_cv_lib_qimgio=no) +else +AC_TRY_RUN(dnl +[ +#include +#include +int main() { + TQString t = "hallo"; + t.fill('t'); + qInitImageIO(); +} +], + ac_cv_lib_qimgio=yes, + ac_cv_lib_qimgio=no, + ac_cv_lib_qimgio=no) +fi fi if test "$kde_qtver" = "4"; then