[poppler] poppler: ChangeLog,1.49,1.50 configure.ac,1.14,1.15

Jeff Muizelaar jrmuizel at freedesktop.org
Thu Apr 7 20:30:35 PDT 2005


Update of /cvs/poppler/poppler
In directory gabe:/tmp/cvs-serv20380

Modified Files:
	ChangeLog configure.ac 
Log Message:
2005-04-07  Jeff Muizelaar  <jrmuizel at nit.ca>

	* configure.ac: redo the qt tests from Albert Astals Cid


Index: ChangeLog
===================================================================
RCS file: /cvs/poppler/poppler/ChangeLog,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- ChangeLog	8 Apr 2005 03:11:00 -0000	1.49
+++ ChangeLog	8 Apr 2005 03:30:33 -0000	1.50
@@ -1,5 +1,9 @@
 2005-04-07  Jeff Muizelaar  <jrmuizel at nit.ca>
 
+	* configure.ac: redo the qt tests from Albert Astals Cid
+
+2005-04-07  Jeff Muizelaar  <jrmuizel at nit.ca>
+
 	* qt/poppler-document.cc:
 	* qt/poppler-page.cc:
 	* qt/poppler-qt.h:

Index: configure.ac
===================================================================
RCS file: /cvs/poppler/poppler/configure.ac,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- configure.ac	7 Apr 2005 16:26:15 -0000	1.14
+++ configure.ac	8 Apr 2005 03:30:33 -0000	1.15
@@ -185,40 +185,60 @@
 			     [Don't compile poppler qt wrapper.]),
 	      enable_poppler_qt=$enableval,
 	      enable_poppler_qt="try")
-# Qt detection
-AC_PATH_PROG(QT_MOC, moc, no)
 
 have_qt=no
-AC_MSG_CHECKING([for qglobal.h])
-if test -n "$QTDIR" -a -f "$QTDIR/include/qglobal.h"; then
-    have_qt=yes
-    POPPLER_QT_CXXFLAGS="-I$QTDIR/include"
-else
-    for dir in "${prefix}/include/qt" "/usr/include/qt-3.1" "/usr/include/qt3" "/usr/include/qt" "/usr/lib/qt/include" "/usr/lib/qt-3.1/include"; do
-        if test -f "$dir/qglobal.h"; then
-            have_qt=yes
-            POPPLER_QT_CXXFLAGS="-I$dir"
-       fi
-    done
-fi
-if test x"$have_qt" = x"yes"; then
-   AC_MSG_RESULT([found])
-else
-   AC_MSG_RESULT([not found])
+dnl ===================================================================
+dnl Check whether the Qt libraries are available.
+dnl Adapted from OpenOffice.org configure.in
+dnl ===================================================================
+
+dnl Search paths for Qt 
+qt_incdirs="$QTINC /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/lib/qt3/include /usr/lib/qt/include /usr/share/qt3/include"
+qt_libdirs="$QTLIB /usr/local/qt/lib /usr/lib/qt /usr/lib /usr/X11R6/lib/X11/qt /usr/X11R6/lib/qt /usr/lib/qt3/lib /usr/lib/qt/lib /usr/share/qt3/lib"
+if test -n "$QTDIR" ; then
+    qt_incdirs="$QTDIR/include $qt_incdirs"
+    qt_libdirs="$QTDIR/lib $qt_libdirs"
 fi
 
-dnl linking to kdecore will give us a bit of help from libtool
-if (! kde-config >& /dev/null); then
-    have_qt=no
-else
-    kdelibs=`kde-config --install lib --expandvars 2>/dev/null`
-    if test -z $kdelibs -o ! -f $kdelibs/libkdecore.la; then
-        have_qt=no
-    else
-        POPPLER_QT_LIBS="$kdelibs/libkdecore.la /usr/lib/libqt-mt.la"
+dnl What to test
+qt_test_include="qstyle.h"
+qt_test_library="libqt-mt.la"
+
+dnl Check for Qt headers
+AC_MSG_CHECKING([for Qt headers])
+qt_incdir="no"
+for it in $qt_incdirs ; do
+    if test -r "$it/$qt_test_include" ; then
+        qt_incdir="$it"
+        break
+    fi
+done
+AC_MSG_RESULT([$qt_incdir])
+
+dnl Check for Qt libraries
+AC_MSG_CHECKING([for Qt libraries])
+qt_libdir="no"
+for qt_check in $qt_libdirs ; do
+    if test -r "$qt_check/$qt_test_library" ; then
+        qt_libdir="$qt_check"
+        break
+    fi
+done
+AC_MSG_RESULT([$qt_libdir])
+
+if test "x$qt_libdir" != "xno" ; then
+    if test "x$qt_incdir" != "xno" ; then
+        have_qt=yes;
     fi
 fi
 
+dnl Set the variables
+POPPLER_QT_CXXFLAGS="-I$qt_incdir"
+POPPLER_QT_LIBS="$qt_libdir/$qt_test_library"
+
+AC_SUBST(POPPLER_QT_CXXFLAGS)
+AC_SUBST(POPPLER_QT_LIBS)
+
 if test x$have_qt = xno ; then
     AC_MSG_WARN([Qt development libraries not found])
 fi
@@ -236,10 +256,6 @@
 fi
 AM_CONDITIONAL(BUILD_POPPLER_QT, test x$enable_poppler_qt = xyes)
 
-dnl Qt flags
-AC_SUBST(POPPLER_QT_CXXFLAGS)
-AC_SUBST(POPPLER_QT_LIBS)
-
 AC_ARG_ENABLE(gtk-test,
               AC_HELP_STRING([--disable-gtk-test],
 	                     [Don't compile GTK+ test program.]),



More information about the poppler mailing list