[poppler] poppler/m4: libjpeg.m4,NONE,1.1 qt.m4,NONE,1.1
Kristian Høgsberg
krh at freedesktop.org
Fri Jan 6 02:06:00 PST 2006
- Previous message: [poppler] poppler/glib/reference/tmpl: poppler-enums.sgml, 1.1,
1.2 poppler-unused.sgml, 1.1, 1.2
- Next message: [poppler]
poppler/poppler: Makefile.am, 1.17, 1.18 PageTransition.h,
1.1, NONE Private.h, 1.1, NONE TextOutputDev.cc, 1.16, 1.17
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvs/poppler/poppler/m4
In directory gabe:/tmp/cvs-serv554/m4
Added Files:
libjpeg.m4 qt.m4
Log Message:
2006-01-06 Kristian Høgsberg <krh at redhat.com>
* qt/poppler-page.cc:
* qt/poppler-private.h:
* qt/poppler-qt.h:
* qt4/src/Makefile.am:
* qt/Makefile.am:
* poppler/Makefile.am: Move PageTransition to qt bindings, move
contents from Private.h to qt/poppler-private.h.
* poppler/TextOutputDev.cc (visitWord): Remove #warning.
* utils/Makefile.am (pdfimages_SOURCES): Add ImageOutputDev.h, use
dist_man1_MANS so we actually dist the man pages.
* goo/Makefile.am (poppler_goo_include_HEADERS): Add GooVector.h.
* glib/reference/Makefile.am: DOC_SOURCE_DIR must be relative to
$(srcdir), fix this to make distchek run.
* m4/qt.m4:
* m4/libjpeg.m4:
* acinclude.m4:
* configure.ac: Split out Qt and libjpeg checks from configure.ac
and acinclude.m4 to m4/qt.m4 and m4/libjpeg.m4.
--- NEW FILE: libjpeg.m4 ---
dnl Based on Xpdf configure.in and evince configure.ac
dnl Based on kde acinclude.m4.in, LGPL Licensed
AC_DEFUN([AC_FIND_FILE],
[
$3=NO
for i in $2;
do
for j in $1;
do
echo "configure: __oline__: $i/$j" >&AC_FD_CC
if test -r "$i/$j"; then
echo "taking that" >&AC_FD_CC
$3=$i
break 2
fi
done
done
])
AC_DEFUN([KDE_FIND_JPEG_HELPER],
[
AC_MSG_CHECKING([for libjpeg$2])
AC_CACHE_VAL(ac_cv_lib_jpeg_$1,
[
ac_save_LIBS="$LIBS"
LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm"
ac_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
AC_TRY_LINK(
[
#ifdef __cplusplus
extern "C" {
#endif
void jpeg_CreateDecompress();
#ifdef __cplusplus
}
#endif
],
[jpeg_CreateDecompress();],
eval "ac_cv_lib_jpeg_$1=-ljpeg$2",
eval "ac_cv_lib_jpeg_$1=no")
LIBS="$ac_save_LIBS"
CFLAGS="$ac_save_CFLAGS"
])
if eval "test ! \"`echo $ac_cv_lib_jpeg_$1`\" = no"; then
enable_libjpeg=yes
LIBJPEG_LIBS="$ac_cv_lib_jpeg_$1"
AC_MSG_RESULT($ac_cv_lib_jpeg_$1)
else
AC_MSG_RESULT(no)
$3
fi
])
AC_DEFUN([POPPLER_FIND_JPEG],
[
dnl first look for libraries
KDE_FIND_JPEG_HELPER(6b, 6b,
KDE_FIND_JPEG_HELPER(normal, [],
[
LIBJPEG_LIBS=
]
)
)
dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h
dnl requires system dependent includes loaded before it)
jpeg_incdirs="$includedir /usr/include /usr/local/include "
AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir)
test "x$jpeg_incdir" = xNO && jpeg_incdir=
dnl if headers _and_ libraries are missing, this is no error, and we
dnl continue with a warning (the user will get no jpeg support)
dnl if only one is missing, it means a configuration error, but we still
dnl only warn
if test -n "$jpeg_incdir" && test -n "$LIBJPEG_LIBS" ; then
AC_DEFINE_UNQUOTED(ENABLE_LIBJPEG, 1, [Define if you have libjpeg])
else
if test -n "$jpeg_incdir" || test -n "$LIBJPEG_LIBS" ; then
AC_MSG_WARN([
There is an installation error in jpeg support. You seem to have only one
of either the headers _or_ the libraries installed. You may need to either
provide correct --with-extra-... options, or the development package of
libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
Disabling JPEG support.
])
else
AC_MSG_WARN([libjpeg not found. disable JPEG support.])
fi
jpeg_incdir=
enable_libjpeg=no
LIBJPEG_LIBS=
fi
AC_SUBST(LIBJPEG_LIBS)
AH_VERBATIM(_AC_CHECK_JPEG,
[/*
* jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
* headers and I'm too lazy to write a configure test as long as only
* unixware is related
*/
#ifdef _UNIXWARE
#define HAVE_BOOLEAN
#endif
])
])
--- NEW FILE: qt.m4 ---
# POPPLER_FIND_QT(VARIABLE-PREFIX, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
#
# Check whether the Qt libraries are available. Adapted from
# OpenOffice.org configure.in
#
# --------------------------------------------------------------
AC_DEFUN([POPPLER_FIND_QT],
[
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 What to test
qt_test_include="qstyle.h"
qt_test_la_library="libqt-mt.la"
qt_test_library="libqt-mt.so"
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_la_library" ; then
qt_libdir="$qt_check"
break
fi
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
if test "x$have_qt" == "xyes"; then
$1[]_CXXFLAGS="-I$qt_incdir"
$1[]_LIBS="$qt_libdir/$qt_test_library"
ifelse([$2], , :, [$2])
else
ifelse([$3], , [AC_MSG_FAILURE(dnl
[Qt development libraries not found])],
[$3])
fi
])
# POPPLER_FIND_QT4(VARIABLE-PREFIX, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
#
# Check whether the Qt4 libraries are available.
#
# --------------------------------------------------------------
AC_DEFUN([POPPLER_FIND_QT4],
[
have_qt4=no
dnl Search paths for Qt4 - not much real experience with this yet.
qt4_incdirs="/usr/local/qt/include /usr/include/qt4 /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/lib/qt/include"
qt4_libdirs="/usr/local/qt/lib /usr/lib/qt /usr/lib /usr/X11R6/lib/X11/qt /usr/X11R6/lib/qt /usr/lib/qt/lib"
if test -n "$QTDIR" ; then
qt4_incdirs="$QTDIR/include $qt4_incdirs"
qt4_libdirs="$QTDIR/lib $qt4_libdirs"
fi
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])
qt4_incdir="no"
for it in $qt4_incdirs ; do
if test -r "$it/$qt4_test_include" ; then
qt4_incdir="$it"
break
fi
done
AC_MSG_RESULT([$qt4_incdir])
dnl Check for Qt4 libraries
AC_MSG_CHECKING([for Qt4 libraries])
qt4_libdir="no"
for qt4_check in $qt4_libdirs ; do
if test -r "$qt4_check/$qt4_test_la_library" ; then
qt4_libdir="$qt4_check"
break
fi
if test -r "$qt4_check/$qt4_test_library" ; then
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])
if test "x$qt4_libdir" != "xno" ; then
if test "x$qt4_incdir" != "xno" ; then
have_qt4=yes;
fi
fi
if test "x$have_qt4" == "xyes"; then
$1[]_CXXFLAGS="-I$qt4_incdir"
if test x$windows_qt = xyes; then
$1[]_LIBS="-L$qt4_libdir -lQtCore4 -lQtGui4"
else
$1[]_LIBS="-L$qt4_libdir -lQtCore -lQtGui"
fi
ifelse([$2], , :, [$2])
else
ifelse([$3], , [AC_MSG_FAILURE(dnl
[Qt4 development libraries not found])],
[$3])
fi
])
# POPPLER_FIND_QT4TEST(VARIABLE-PREFIX,
# [ACTION-IF-FOUND],
# [ACTION-IF-NOT-FOUND])
#
# Check whether the Qt4 libraries are available.
#
# --------------------------------------------------------------
AC_DEFUN([POPPLER_FIND_QT4TEST],
[
have_qt4testlib=no
qt4_incdirs="/usr/local/qt/include /usr/include/qt4 /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/lib/qt/include"
qt4_libdirs="/usr/local/qt/lib /usr/lib/qt /usr/lib /usr/X11R6/lib/X11/qt /usr/X11R6/lib/qt /usr/lib/qt/lib"
dnl What to test
qt4test_test_include="QtTest/QtTest"
qt4test_test_la_library="libQtTest.la"
qt4test_test_library="libQtTest.so"
dnl Check for QtTestLib headers
AC_MSG_CHECKING([for QtTestLib headers])
qt4test_incdir="no"
for it in $qt4_incdirs ; do
if test -r "$it/$qt4test_test_include" ; then
qt4test_incdir="$it"
break
fi
done
AC_MSG_RESULT([$qt4test_incdir])
dnl Check for Qt4 libraries
AC_MSG_CHECKING([for QtTestLib libraries])
qt4test_libdir="no"
for qt4test_check in $qt4_libdirs ; do
if test -r "$qt4test_check/$qt4test_test_la_library" ; then
qt4test_libdir="$qt4test_check"
break
fi
if test -r "$qt4test_check/$qt4test_test_library" ; then
qt4test_libdir="$qt4test_check"
break
fi
done
AC_MSG_RESULT([$qt4test_libdir])
if test "x$qt4test_libdir" != "xno" ; then
if test "x$qt4test_incdir" != "xno" ; then
have_qt4testlib=yes;
fi
fi
if test "x$have_qt4testlib" == "xyes"; then
$1[]_CXXFLAGS="-I$qt4test_incdir"
$1[]_LIBS="-L$qt4test_libdir -lQtTest"
ifelse([$2], , :, [$2])
else
ifelse([$3], , [AC_MSG_FAILURE(dnl
[Qt4 test libraries not found])],
[$3])
fi
])
- Previous message: [poppler] poppler/glib/reference/tmpl: poppler-enums.sgml, 1.1,
1.2 poppler-unused.sgml, 1.1, 1.2
- Next message: [poppler]
poppler/poppler: Makefile.am, 1.17, 1.18 PageTransition.h,
1.1, NONE Private.h, 1.1, NONE TextOutputDev.cc, 1.16, 1.17
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the poppler
mailing list