# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ([2.69]) AC_INIT([sane-frontends], [1.0.14], [sane-devel@alioth-lists.debian.net]) AM_INIT_AUTOMAKE AM_SILENT_RULES([yes]) AC_CONFIG_SRCDIR([src/xscanimage.c]) AC_CONFIG_HEADERS([include/sane/config.h]) # Checks for programs. AC_PROG_CC AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_RANLIB AM_PROG_AR # Language AM_GNU_GETTEXT_VERSION([0.19]) AM_GNU_GETTEXT([external]) # Options AC_ARG_WITH(gtk, [ --with/without-gtk use GTK, which the GUIs require], USE_GTK=$enableval, USE_GTK=yes) AC_ARG_WITH(gimp, [ --with/without-gimp use GIMP, for GIMP plugin support], USE_GIMP=$enableval, USE_GIMP=yes) # Checks for header files. AC_FUNC_ALLOCA AC_CHECK_HEADERS([fcntl.h sys/param.h sys/socket.h sys/time.h syslog.h unistd.h]) # Checks for typedefs, structures, and compiler characteristics. AC_C_INLINE AC_TYPE_OFF_T AC_TYPE_SIZE_T AC_TYPE_SSIZE_T # Checks for library functions. AC_FUNC_FORK AC_FUNC_MALLOC AC_FUNC_REALLOC AC_FUNC_STRTOD AC_CHECK_FUNCS([atexit dup2 floor getcwd gettimeofday memmove memset mkdir pow putenv strchr strdup strerror strncasecmp strrchr strtol]) AC_CHECK_LIB(m, sqrt) AC_CHECK_LIB(m, round) # Dependent packages. PKG_CHECK_MODULES([SANE], [sane-backends >= 1.0.0], HAVE_SANE=yes) GUI_PROGS= if test "${USE_GTK}" = "yes"; then PKG_CHECK_MODULES([GTK], [gtk+-3.0], HAVE_GTK=yes, HAVE_GTK=no) if test "x${HAVE_GTK}" = "xyes"; then GUI_PROGS="xscanimage xcam" if test "${USE_GIMP}" = "yes"; then PKG_CHECK_MODULES([GIMP], [gimp-2.0], HAVE_GIMP=yes, HAVE_GIMP=no) fi fi fi AC_SUBST([GUI_PROGS]) # Conditionals AM_CONDITIONAL([BUILD_GTK_LIB], [test "x${HAVE_GTK}" = "xyes"]) AC_CONFIG_FILES([Makefile po/Makefile.in doc/Makefile include/Makefile libgtk/Makefile sanei/Makefile src/Makefile]) AC_OUTPUT echo echo "****************************************************************" echo "* *" echo "* SANE-FRONTENDS configure status: *" echo "* -------------------------------- *" if test "x${HAVE_GTK}" = "xyes"; then echo "* - GUIs activated (building: xcam xscanimage scanadf) *" if test "x${GIMP_LIBS}" = "xyes"; then echo "* - GIMP plugin activated for xscanimage *" else echo "* - GIMP plugin deactivated for xscanimage *" fi else echo "* - GUIs dectivated (building: scanadf) *" fi echo "* *" echo "****************************************************************" echo "* *" echo "****************************************************************" echo "* *" echo "* To compile SANE-FRONTENDS: *" echo "* -------------------------- *" echo "* make *" echo "* make install *" echo "* *" echo "* ------------------------------------------------------------ *" echo "* ... PLEASE READ SANE DOCUMENTATION BEFORE STARTING SANE ... *" echo "* ------------------------------------------------------------ *" echo "* *" echo "* If you experience any problems with sane-frontends please *" echo "* write to the sane list at sane-devel@alioth-lists.debian.net *" echo "* *" echo "****************************************************************"