aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--m4/libqt.m441
-rw-r--r--qt/employee.hxx12
2 files changed, 43 insertions, 10 deletions
diff --git a/m4/libqt.m4 b/m4/libqt.m4
index 2ab8272..bb7ffa5 100644
--- a/m4/libqt.m4
+++ b/m4/libqt.m4
@@ -20,7 +20,7 @@ AC_MSG_CHECKING([for QtCore])
CXX_LIBTOOL_LINK_IFELSE(
AC_LANG_SOURCE([[
#include <string>
-#include <QString>
+#include <QtCore/QString>
int
main ()
@@ -44,7 +44,7 @@ if test x"$libqt_found" = xno; then
CXX_LIBTOOL_LINK_IFELSE(
AC_LANG_SOURCE([[
#include <string>
-#include <QString>
+#include <QtCore/QString>
int
main ()
@@ -63,6 +63,39 @@ libqt_found=yes
fi
fi
+# Try framework in case we are on Mac OS X.
+#
+if test x"$libqt_found" = xno; then
+
+ save_CPPFLAGS="$CPPFLAGS"
+ save_LIBS="$LIBS"
+
+ CPPFLAGS="$CPPFLAGS -framework QtCore"
+ LIBS="-framework QtCore $LIBS"
+
+ CXX_LIBTOOL_LINK_IFELSE(
+AC_LANG_SOURCE([[
+#include <string>
+#include <QtCore/QString>
+
+int
+main ()
+{
+ QString qs ("test");
+ std::string ss (qs.toStdString ());
+ return ss.size () != 0;
+}
+]]),
+[
+libqt_found=yes
+])
+
+ if test x"$libqt_found" = xno; then
+ CPPFLAGS="$save_CPPFLAGS"
+ LIBS="$save_LIBS"
+ fi
+fi
+
# If QtCore is not found, try its versioned variant, QtCore4.
#
if test x"$libqt_found" = xno; then
@@ -73,7 +106,7 @@ if test x"$libqt_found" = xno; then
CXX_LIBTOOL_LINK_IFELSE(
AC_LANG_SOURCE([[
#include <string>
-#include <QString>
+#include <QtCore/QString>
int
main ()
@@ -111,7 +144,7 @@ if test x"$libqt_found" = xno; then
CXX_LIBTOOL_LINK_IFELSE(
AC_LANG_SOURCE([[
#include <string>
-#include <QString>
+#include <QtCore/QString>
int
main ()
diff --git a/qt/employee.hxx b/qt/employee.hxx
index 3117596..58f43cc 100644
--- a/qt/employee.hxx
+++ b/qt/employee.hxx
@@ -5,12 +5,12 @@
#ifndef EMPLOYEE_HXX
#define EMPLOYEE_HXX
-#include <QString>
-#include <QByteArray>
-#include <QDateTime>
-#include <QSharedPointer>
-#include <QList>
-#include <QSet>
+#include <QtCore/QString>
+#include <QtCore/QByteArray>
+#include <QtCore/QDateTime>
+#include <QtCore/QSharedPointer>
+#include <QtCore/QList>
+#include <QtCore/QSet>
#include <odb/core.hxx>