dnl configure.ac dnl dnl xfprint - Print system support for the Xfce4 desktop environment dnl dnl Copyright (c) 2003 Benedikt Meurer dnl 2004 Jean-François Wauthy dnl AC_INIT([configure.ac]) AM_INIT_AUTOMAKE([xfprint], [4.2.4]) AM_CONFIG_HEADER([config.h]) dnl Support maintainer mode AM_MAINTAINER_MODE dnl check for UNIX variants AC_AIX AC_ISC_POSIX AC_MINIX dnl check for basic programs AC_PROG_CC AC_PROG_INSTALL AC_PROG_LIBTOOL dnl check for standard header files AC_HEADER_STDC AC_CHECK_HEADERS([sys/wait.h]) AC_CHECK_FUNCS([strlcpy]) AC_FUNC_MMAP dnl Support for --with-printcap PRINTCAP_PATH="$sysconfdir/printcap" AC_ARG_WITH(printcap, AC_HELP_STRING([--with-printcap=PATH], [Specify a the location of the printcap file.]), [ if test "$withval" = "yes" ; then AC_MSG_ERROR([--with-printcap requires an argument.]) else PRINTCAP_PATH=$withval fi ]) AC_SUBST([PRINTCAP_PATH]) dnl Check for i18n support BM_I18N([xfprint], [af ar az be bg bn_IN ca cs de el en_GB es es_MX et eu fa fi fr gu he hi hu it ja ko ku lt mr ms nl ro ru sk sl sq sv ta tr pa pl pt_BR pt_PT sk uk vi zh_CN zh_TW]) dnl Check for gmodule >= 2.2.0 BM_DEPEND([GMODULE], [gmodule-2.0], [2.2.0]) dnl check for glib >= 2.2.0 BM_DEPEND([GLIB], [glib-2.0], [2.2.0]) dnl Check for gtk >= 2.2.0 BM_DEPEND([GTK], [gtk+-2.0], [2.2.0]) dnl Check for libxfcegui4 >= 4.1.99 installed BM_DEPEND([LIBXFCEGUI4], [libxfcegui4-1.0], [4.2.0]) dnl Check for libxfce4util >= 4.1.99 installed BM_DEPEND([LIBXFCE4UTIL], [libxfce4util-1.0], [4.2.0]) dnl Check for libxfce4mcs BM_DEPEND(LIBXFCE4MCS_CLIENT, libxfce4mcs-client-1.0, 4.2.0) BM_DEPEND(LIBXFCE4MCS_MANAGER, libxfce4mcs-manager-1.0, 4.2.0) XFCE_MCS_PLUGIN([XFCE_MCS_MANAGER], [4.2.0]) dnl Check whether to build with debugging support BM_DEBUG_SUPPORT dnl Check for a2ps AC_CHECK_PROG(a2ps_found, [a2ps], yes, no) if test x"$a2ps_found" = x"no"; then AC_MSG_ERROR([You need a2ps to be able to print through xfprint]) fi dnl Check for CUPS AC_ARG_ENABLE([cups], AC_HELP_STRING([--disable-cups], [Disable CUPS support in xfprint]) AC_HELP_STRING([--enable-cups], [Enable CUPS support in xfprint]), [], [enable_cups=yes]) cups_found="no" CUPS_LIBS="" if test x"$enable_cups" = x"yes"; then AC_PATH_PROG(cups_config,cups-config) if test -n "$cups_config"; then CUPS_LIBS=`$cups_config --libs` cups_found="yes" else AC_MSG_RESULT([cups-config not found, CUPS support disabled. Either you don't have CUPS-dev installed or you should consider upgrading CUPS]) fi fi AM_CONDITIONAL([BUILD_CUPS_SUPPORT], [test "x$cups_found" = "xyes"]) AC_SUBST([CUPS_LIBS]) if test x"$cups_found" = x"yes"; then AC_DEFINE(HAVE_CUPS, 1, Define if CUPS support is available) fi dnl Check for BSD-LPR AC_ARG_ENABLE([bsdlpr], AC_HELP_STRING([--disable-bsdlpr], [Disable BSD-LPR support in xfprint]) AC_HELP_STRING([--enable-bsdlpr], [Enable BSD-LPR support in xfprint]), [], [enable_bsdlpr=yes]) if test x"$enable_bsdlpr" = x"yes"; then AC_CHECK_PROG([bsdlpr_found], [lpr], [yes], [no]) else bsdlpr_found="no" fi AM_CONDITIONAL([BUILD_BSDLPR_SUPPORT], [test "x$bsdlpr_found" = "xyes"]) if test x"$bdslpr_found" = x"yes"; then AC_DEFINE(HAVE_BSDLPR, 1, Define if BSD-LPR support is available) fi if test x"$enable_bsdlpr" = x"no" && test x"$cups_found" = x"no"; then AC_MSG_ERROR(You need to have at least CUPS or BSDLPR in order to use Xfprint) fi AC_ARG_ENABLE([letter], AC_HELP_STRING([--disable-letter], [Papersize DIN A4 Deskjet (default)]) AC_HELP_STRING([--enable-letter], [Papersize US letter]), [], [enable_letter=no]) AC_MSG_CHECKING([whether to use US letter as default paper size]) if test x"$enable_letter" = x"yes"; then AC_DEFINE(DEFAULT_LETTER, 1, Define to use US letter as default paper size) AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi AC_OUTPUT([ xfprint.spec Makefile common/Makefile doc/Makefile doc/C/Makefile doc/C/images/Makefile doc/fr/Makefile doc/fr/images/Makefile doc/he/Makefile doc/he/images/Makefile po/Makefile.in xfprint/Makefile xfprint-manager/Makefile icons/Makefile icons/scalable/Makefile icons/48x48/Makefile mcs-plugin/Makefile printing-systems/Makefile printing-systems/cups/Makefile printing-systems/bsd-lpr/Makefile ]) echo echo "Build Configuration:" echo " Build CUPS support: $cups_found" echo " Build BSD-LPR support : $bsdlpr_found" echo