Commit 830b61bf authored by Albert Astals Cid's avatar Albert Astals Cid

* 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
parent 0a1c33ed
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:
......
......@@ -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)
......
......@@ -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
......@@ -6,6 +6,8 @@
//
//========================================================================
#ifdef HAVE_GETTIMEOFDAY
#ifndef GOOTIMER_H
#define GOOTIMER_H
......@@ -38,3 +40,5 @@ private:
};
#endif
#endif
......@@ -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();
......
......@@ -1308,7 +1308,6 @@ DisplayFontParam *GlobalParams::getDisplayFont(GfxFont *font) {
displayFonts->add(dfp->name,dfp);
}
fin:
unlockGlobalParams;
if (m)
FcPatternDestroy(m);
if (p)
......
......@@ -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"
......
......@@ -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"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment