summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorTill Kamppeter <till.kamppeter@gmail.com>2016-02-13 22:22:24 -0200
committerTill Kamppeter <till.kamppeter@gmail.com>2016-02-13 22:22:24 -0200
commitaa40a1e8fe0c4ed29d21c5f79e682ac7bef1c33f (patch)
tree66996e1a8b1ad790b09c0890ac7986873b7d435a /configure.ac
parent879e6db06338166657609930768f76d8d7e7afbb (diff)
Imported Upstream version 2.0
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac57
1 files changed, 22 insertions, 35 deletions
diff --git a/configure.ac b/configure.ac
index 4101df0..d18854d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,8 +1,8 @@
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(cups-bjnp, 1.2, louis.lagendijk@gmail.com)
+AC_INIT([cups-bjnp], [2.0], [louis.lagendijk@gmail.com])
AC_CONFIG_SRCDIR([bjnp.c])
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE([gnu])
AC_LIBSOURCES([cups-bjnp.spec])
## Check for programs
@@ -66,45 +66,32 @@ else
ipv6="no"
fi
-## find cups lib
-
-AC_CHECK_LIB(cups, cupsDoRequest,, AC_MSG_ERROR(CUPS library not found),)
+## find cups-configuration
+AC_MSG_CHECKING(cups development support)
+if test -n "`cups-config --build 2> /dev/null`"; then
+ cups_config_found=yes
+ AC_MSG_RESULT($cups_config_found)
+else
+ AC_MSG_ERROR([cups development files not found])
+fi
## determine cups backend directory
+AC_MSG_CHECKING([cups backend directory])
AC_ARG_WITH(cupsbackenddir,
- AC_HELP_STRING([--with-cupsbackenddir=DIR],
- [ cups-backends directory (auto)]),
-[
- cupsbackenddir="${withval}"
- AC_SUBST([cupsbackenddir])dnl
-], [
- dirs="/usr/lib/cups/backend /usr/local/lib/cups/backend /opt/lib/cups/backend\
- /usr/local/libexec/cups/backend /usr/libexec/cups/backend"
- cupsbackenddir=""
- for dir in $dirs; do
- if test -d "$dir" -a -z "$cupsbackenddir"; then
- cupsbackenddir=$dir
- fi
- done
- if test -n "$cupsbackenddir"; then
- echo found Cups backend directory $cupsbackenddir
- AC_SUBST([cupsbackenddir])dnl
- else
- AC_MSG_ERROR([Cups backend directory not specified and auto-detection failed!])
- fi
-])
-
-## Check if we have rpmbuild, so we can build rpm's
-AC_PATH_PROG([RPMBUILD],rpmbuild)
-AC_ARG_VAR(RPMBUILD, rpmbuild command)
-if test -n "$RPMBUILD"; then
- rpmtarget=$srcdir/conf/rpmbuild
+ AC_HELP_STRING([--with-cupsbackenddir=DIR],
+ [cups-backends directory (auto)]),
+ [cupsbackenddir="${withval}"],
+ [cupsbackenddir=`cups-config --serverbin`/backend])
+if test -d "$cupsbackenddir"; then
+ AC_SUBST([cupsbackenddir])
+ AC_MSG_RESULT([$cupsbackenddir])
else
- rpmtarget=$srcdir/conf/norpm
+ AC_MSG_ERROR([cups backend directory not found!])
fi
-AC_SUBST_FILE(rpmtarget)
-AC_SUBST(RPMBUILD)
+AC_SUBST([CUPS_CFLAGS], ["`cups-config --cflags`"])
+AC_SUBST([CUPS_LIBS], ["`cups-config --libs`"])
+AC_SUBST([CUPS_LDFLAGS], ["`cups-config --ldflags`"])
## header file that contains output from configure