From ce4a32fe52ef09d8f5ff1dd22c001110902b60a2 Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kdeprint/configure.in.in | 98 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 kdeprint/configure.in.in (limited to 'kdeprint/configure.in.in') diff --git a/kdeprint/configure.in.in b/kdeprint/configure.in.in new file mode 100644 index 000000000..8dd3880d6 --- /dev/null +++ b/kdeprint/configure.in.in @@ -0,0 +1,98 @@ +AC_DEFUN([AC_CHECK_CUPS_VERSION], +[ +kde_save_cflags="$CFLAGS" +kde_save_libs="$LIBS" +LIBS="$all_libraries $USER_LDFLAGS $kde_cups_libs" +CFLAGS="$CFLAGS $all_includes $USER_INCLUDES" +AC_MSG_CHECKING(CUPS version >= $1) +kde_save_link=$ac_link +ac_link='${CC} $CFLAGS -o conftest conftest.c $LIBS 1>&5' +cat > conftest.c < +#include +int main() +{ + if (CUPS_VERSION < +EOF +echo "$1" >> conftest.c +cat >> conftest.c <&AC_FD_CC +dnl cat conftest.c >&AC_FD_CC + ac_have_new_cups="no" +fi +rm -f conftest* +ac_link="$kde_save_link" +CFLAGS="$kde_save_cflags" +LIBS="$kde_save_libs" +AC_MSG_RESULT($ac_have_new_cups) +]) + +dnl CUPS stuffs (to be changed) +ac_use_cups="yes" +ac_have_new_cups="yes" +ac_cups_libs=0 +CUPSSUBDIR= +LIB_CUPS= +AC_ARG_ENABLE(cups,[ --disable-cups disable CUPS support [default=auto]],ac_use_cups=$enableval, ac_use_cups=yes) +if test "$ac_use_cups" = "yes"; then + ac_CPPFLAGS_save="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $all_includes" + ac_LDFLAGS_save="$LDFLAGS" + LDFLAGS="$LDFLAGS $all_libraries" + kde_cups_config= + kde_cups_libs="-lcups $LIBDL $LIBSOCKET" + AC_PATH_PROG(kde_cups_config,cups-config) + if test -n "$kde_cups_config"; then + kde_cups_libs=`$kde_cups_config --libs` + else + AC_MSG_RESULT(cups-config not found, using default libraries: $kde_cups_libs. You should consider upgrading CUPS) + fi + KDE_CHECK_LIB(cups,cupsServer,[ac_cups_libs=1],[ac_cups_libs=0],[$LIBDL $LIBSOCKET]) + if test "$ac_cups_libs" = "0"; then + AC_MSG_WARN(CUPS library not found. CUPS support disabled) + ac_use_cups="no" + fi + if test "$ac_use_cups" = "yes"; then + dnl check existence of CUPS header files + ac_cups_headers=0 + AC_CHECK_HEADER(cups/cups.h,[ac_cups_headers=1]) + if test "$ac_cups_headers" = "0"; then + AC_MSG_WARN(CUPS headers not found. CUPS support disabled) + ac_use_cups="no" + else + dnl check that version is at least 1.1.9 + AC_CHECK_CUPS_VERSION(1.0109) + if test "$ac_have_new_cups" = "no"; then + AC_MSG_WARN(CUPS version too old. You should upgrade to version >= 1.1.9) + ac_use_cups="no" + fi + + dnl check if CUPS is at least 1.1.20 + ac_have_new_cups="no" + AC_CHECK_CUPS_VERSION(1.0120) + if test "$ac_have_new_cups" = "yes"; then + AC_DEFINE(HAVE_CUPS_NO_PWD_CACHE, 1, CUPS doesn't have password caching) + fi + fi + fi + LDFLAGS="$ac_LDFLAGS_save" + CPPFLAGS="$ac_CPPFLAGS_save" +fi +if test "$ac_use_cups" = "yes"; then + CUPSSUBDIR="cups" + LIB_CUPS="$kde_cups_libs" + AC_DEFINE(HAVE_CUPS, 1, [Defines if you have CUPS (Common UNIX Printing System)]) +fi +AM_CONDITIONAL(include_cups_SUBDIR, test -n "$CUPSSUBDIR") +AC_SUBST(LIB_CUPS) -- cgit v1.2.1