summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog12
-rw-r--r--configure.ac14
-rw-r--r--goo/GooTimer.cc3
-rw-r--r--goo/GooTimer.h4
-rw-r--r--poppler/Gfx.cc6
-rw-r--r--poppler/GlobalParams.cc1
-rw-r--r--splash/SplashFTFontEngine.cc4
-rw-r--r--splash/SplashFontFile.cc4
8 files changed, 40 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 5d985214..b3dc88c0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
2005-12-08 Albert Astals Cid <aacid@kde.org>
+ * configure.ac: Detect if gettimeofday is available, fixes for correct
+ linking to Qt4 on windows
+ * goo/GooTimer.[cc|h]: Only build if gettimeofday is available
+ * poppler/Gfx.cc: Only use the timer for profiling if gettimeofday is
+ available
+ * poppler/GlobalParams.cc: Remove extra unlockGlobalParams that was
+ making windows hang
+ * splash/SplashFTFontEngine.cc: i need unistd.h on windows also
+ * splash/SplashFontFile.cc: i need unistd.h on windows also
+
+2005-12-08 Albert Astals Cid <aacid@kde.org>
+
* glib/Makefile.am:
* poppler/Makefile.am:
* qt/Makefile.am:
diff --git a/configure.ac b/configure.ac
index 240bfde8..52345b75 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,6 +16,7 @@ AC_PROG_CC_STDC
#fi
AC_PROG_CXX
AC_PROG_INSTALL
+AC_CHECK_FUNC(gettimeofday, AC_DEFINE(HAVE_GETTIMEOFDAY, 1, [Defines if gettimeofday is available on your system]))
dnl Enable these unconditionally.
AC_DEFINE([A4_PAPER], [1], [Default to A4 paper.])
@@ -320,6 +321,7 @@ dnl What to test
qt4_test_include="QtCore/QCoreApplication"
qt4_test_la_library="libQtCore.la"
qt4_test_library="libQtCore.so"
+qt4_windows_test_library="QtCore4.dll"
dnl Check for Qt4 headers
AC_MSG_CHECKING([for Qt4 headers])
@@ -345,6 +347,12 @@ for qt4_check in $qt4_libdirs ; do
qt4_libdir="$qt4_check"
break
fi
+
+ if test -r "$qt4_check/$qt4_windows_test_library" ; then
+ qt4_libdir="$qt4_check"
+ windows_qt="yes"
+ break
+ fi
done
AC_MSG_RESULT([$qt4_libdir])
@@ -356,7 +364,11 @@ fi
dnl Set the variables
POPPLER_QT4_CXXFLAGS="-I$qt4_incdir"
-POPPLER_QT4_LIBS="-L$qt4_libdir -lQtCore -lQtGui"
+if test x$windows_qt = xyes; then
+ POPPLER_QT4_LIBS="-L$qt4_libdir -lQtCore4 -lQtGui4"
+else
+ POPPLER_QT4_LIBS="-L$qt4_libdir -lQtCore -lQtGui"
+fi
AC_SUBST(POPPLER_QT4_CXXFLAGS)
AC_SUBST(POPPLER_QT4_LIBS)
diff --git a/goo/GooTimer.cc b/goo/GooTimer.cc
index 774ebbef..e9ae2e61 100644
--- a/goo/GooTimer.cc
+++ b/goo/GooTimer.cc
@@ -9,6 +9,8 @@
#include <config.h>
+#ifdef HAVE_GETTIMEOFDAY
+
#ifdef USE_GCC_PRAGMAS
#pragma implementation
#endif
@@ -61,3 +63,4 @@ GooTimer::getElapsed ()
return total;
}
+#endif
diff --git a/goo/GooTimer.h b/goo/GooTimer.h
index 09d9ae9a..86bc42ff 100644
--- a/goo/GooTimer.h
+++ b/goo/GooTimer.h
@@ -6,6 +6,8 @@
//
//========================================================================
+#ifdef HAVE_GETTIMEOFDAY
+
#ifndef GOOTIMER_H
#define GOOTIMER_H
@@ -38,3 +40,5 @@ private:
};
#endif
+
+#endif
diff --git a/poppler/Gfx.cc b/poppler/Gfx.cc
index f906b3c2..05ee50e8 100644
--- a/poppler/Gfx.cc
+++ b/poppler/Gfx.cc
@@ -549,7 +549,9 @@ void Gfx::go(GBool topLevel) {
Object args[maxArgs];
int numArgs, i;
int lastAbortCheck;
+#ifdef HAVE_GETTIMEOFDAY
GooTimer *timer;
+#endif
// scan a sequence of objects
updateLevel = lastAbortCheck = 0;
@@ -568,12 +570,15 @@ void Gfx::go(GBool topLevel) {
printf("\n");
fflush(stdout);
}
+#ifdef HAVE_GETTIMEOFDAY
if (profileCommands)
timer = new GooTimer ();
+#endif
// Run the operation
execOp(&obj, args, numArgs);
+#ifdef HAVE_GETTIMEOFDAY
// Update the profile information
if (profileCommands) {
GooHash *hash;
@@ -594,6 +599,7 @@ void Gfx::go(GBool topLevel) {
}
delete (timer);
}
+#endif
obj.free();
for (i = 0; i < numArgs; ++i)
args[i].free();
diff --git a/poppler/GlobalParams.cc b/poppler/GlobalParams.cc
index a9e33603..2b24ddc3 100644
--- a/poppler/GlobalParams.cc
+++ b/poppler/GlobalParams.cc
@@ -1308,7 +1308,6 @@ DisplayFontParam *GlobalParams::getDisplayFont(GfxFont *font) {
displayFonts->add(dfp->name,dfp);
}
fin:
- unlockGlobalParams;
if (m)
FcPatternDestroy(m);
if (p)
diff --git a/splash/SplashFTFontEngine.cc b/splash/SplashFTFontEngine.cc
index 4b4d619c..b3c9c96e 100644
--- a/splash/SplashFTFontEngine.cc
+++ b/splash/SplashFTFontEngine.cc
@@ -13,9 +13,7 @@
#endif
#include <stdio.h>
-#ifndef WIN32
-# include <unistd.h>
-#endif
+#include <unistd.h>
#include "goo/gmem.h"
#include "goo/GooString.h"
#include "goo/gfile.h"
diff --git a/splash/SplashFontFile.cc b/splash/SplashFontFile.cc
index b16662bb..e1ed5275 100644
--- a/splash/SplashFontFile.cc
+++ b/splash/SplashFontFile.cc
@@ -11,9 +11,7 @@
#endif
#include <stdio.h>
-#ifndef WIN32
-# include <unistd.h>
-#endif
+#include <unistd.h>
#include "goo/GooString.h"
#include "SplashFontFile.h"
#include "SplashFontFileID.h"