2002-12-25 00:53:02 +00:00
|
|
|
dnl ##### Check for FreeType 2.0.5+.
|
|
|
|
dnl ##### (Note: FT_Get_Name_Index was added in FT 2.0.5, and is
|
|
|
|
dnl ##### the reason that Xpdf requires 2.0.5+.)
|
2002-09-02 07:32:37 +00:00
|
|
|
|
2002-12-25 00:53:02 +00:00
|
|
|
KDE_FIND_PATH(freetype-config, FREETYPE_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin], [
|
|
|
|
AC_MSG_WARN([Could not find libfreetype anywhere, check http://www.freetype.org/])
|
2002-09-02 07:32:37 +00:00
|
|
|
])
|
|
|
|
|
2002-12-25 00:53:02 +00:00
|
|
|
if test -n "$FREETYPE_CONFIG"; then
|
|
|
|
vers=`$FREETYPE_CONFIG --version 2>/dev/null | sed -e 's/libfreetype //' | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
|
|
|
|
if test -n "$vers" && test "$vers" -ge 9000000; then
|
|
|
|
LIBFREETYPE_LIBS="`$FREETYPE_CONFIG --libs`"
|
|
|
|
LIBFREETYPE_RPATH=
|
|
|
|
for args in $LIBFREETYPE_LIBS; do
|
|
|
|
case $args in
|
|
|
|
-L*) LIBFREETYPE_RPATH="$LIBFREETYPE_RPATH $args" ;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
LIBFREETYPE_RPATH=`echo $LIBFREETYPE_RPATH | sed -e "s/-L/-R/g"`
|
|
|
|
LIBFREETYPE_CFLAGS="`$FREETYPE_CONFIG --cflags`"
|
2004-08-28 09:06:46 +00:00
|
|
|
AC_DEFINE_UNQUOTED(HAVE_FREETYPE, 1, [Defines if your system has the freetype library])
|
2002-09-02 07:32:37 +00:00
|
|
|
else
|
2002-12-25 00:53:02 +00:00
|
|
|
AC_MSG_WARN([You need at least libfreetype 2.0.5])
|
2002-09-02 07:32:37 +00:00
|
|
|
fi
|
|
|
|
fi
|
2002-09-02 10:13:46 +00:00
|
|
|
|
2002-12-25 00:53:02 +00:00
|
|
|
AC_SUBST(LIBFREETYPE_LIBS)
|
|
|
|
AC_SUBST(LIBFREETYPE_CFLAGS)
|
|
|
|
AC_SUBST(LIBFREETYPE_RPATH)
|
2002-09-02 07:32:37 +00:00
|
|
|
|
2002-09-02 10:13:46 +00:00
|
|
|
|
2002-09-02 07:32:37 +00:00
|
|
|
dnl ##### Check for libpaper (Debian).
|
2002-12-25 00:53:02 +00:00
|
|
|
LIBPAPER_LIBS=
|
|
|
|
KDE_CHECK_HEADER(paper.h, [
|
|
|
|
LIBPAPER_LIBS='-lpaper'
|
|
|
|
AC_DEFINE_UNQUOTED(HAVE_PAPER_H, 1, [Define to 1 if you have the <paper.h> header file.])
|
2004-11-27 20:36:55 +00:00
|
|
|
],
|
|
|
|
AC_DEFINE_UNQUOTED(HAVE_PAPER_H, 0, [Define to 1 if you have the <paper.h> header file.])
|
|
|
|
)
|
2002-12-25 00:53:02 +00:00
|
|
|
AC_SUBST(LIBPAPER_LIBS)
|
2002-09-02 07:32:37 +00:00
|
|
|
|
2002-09-01 13:51:30 +00:00
|
|
|
AC_CHECK_FUNCS(fseek64 mkstemp mkstemps popen)
|
2004-03-12 16:36:28 +00:00
|
|
|
|
2004-03-17 09:28:16 +00:00
|
|
|
AC_FIND_FILE(xpdfrc, [/etc /usr/local/etc /etc/xpdf], xpdfrc)
|
2004-03-12 16:36:28 +00:00
|
|
|
if test "$xpdfrc" != NO; then
|
|
|
|
AC_DEFINE_UNQUOTED(SYSTEM_XPDFRC, "$xpdfrc/xpdfrc", [Define the location your xpdfrc])
|
|
|
|
fi
|
2004-08-25 17:20:29 +00:00
|
|
|
|
2004-08-29 09:59:37 +00:00
|
|
|
dnl #### Check for FSEEK variants
|
|
|
|
AC_SYS_LARGEFILE
|
|
|
|
AC_FUNC_FSEEKO
|
|
|
|
AC_CHECK_FUNCS(fseek64, xpdf_cv_func_fseek64=yes, xpdf_cv_func_fseek64=no)
|
|
|
|
AC_CHECK_FUNCS(ftell64, xpdf_cv_func_ftell64=yes, xpdf_cv_func_ftell64=no)
|
|
|
|
if test "$xpdf_cv_func_fseek64" = yes -a "$xpdf_cv_func_ftell64" = yes; then
|
|
|
|
AC_DEFINE(HAVE_FSEEK64, 1)
|
|
|
|
else
|
|
|
|
AC_DEFINE(HAVE_FSEEK64, 0)
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl #### Check for libt1
|
2004-08-25 18:27:31 +00:00
|
|
|
AC_LANG_SAVE
|
2004-08-25 17:20:29 +00:00
|
|
|
AC_LANG_CPLUSPLUS
|
|
|
|
|
|
|
|
kpdf_have_t1lib=
|
2004-08-25 18:27:31 +00:00
|
|
|
KDE_CHECK_LIB(t1, T1_InitLib, [LIBT1="-lt1"; kpdf_have_t1lib=yes],
|
2004-08-25 17:20:29 +00:00
|
|
|
[
|
|
|
|
kpdf_have_t1lib=no
|
|
|
|
])
|
|
|
|
AC_SUBST(LIBT1)
|
|
|
|
if test $kpdf_have_t1lib = yes; then
|
|
|
|
AC_DEFINE_UNQUOTED(HAVE_T1LIB_H, 1, [Defines if your system has the t1 library])
|
|
|
|
else
|
|
|
|
AC_DEFINE_UNQUOTED(HAVE_T1LIB_H, 0, [Defines if your system has the t1 library])
|
|
|
|
fi
|
2004-08-25 18:27:31 +00:00
|
|
|
AC_LANG_RESTORE
|
2004-08-25 17:20:29 +00:00
|
|
|
|
|
|
|
dnl #### Enable the user to enable multithearind on xpdf
|
2004-08-23 20:53:56 +00:00
|
|
|
AC_ARG_ENABLE(multithreaded-kpdf,
|
|
|
|
AC_HELP_STRING([--enable-multithreaded-kpdf],[include support for multithreading in kpdf]),
|
|
|
|
[
|
|
|
|
case $enableval in
|
|
|
|
yes)
|
|
|
|
AC_DEFINE(MULTITHREADED, 1, [Defines if use multithreading in kpdf])
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
AC_DEFINE(MULTITHREADED, 0, [Defines if use multithreading in kpdf])
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
]
|
|
|
|
, AC_DEFINE(MULTITHREADED, 0, [Defines if use multithreading in kpdf])
|
|
|
|
)
|