]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - config-scripts/cups-common.m4
Drop SVN stuff from version.
[thirdparty/cups.git] / config-scripts / cups-common.m4
index 708f613dd2487bf2f3873fd384950d42f96be232..3a912478c9477517ea5d5074ac84b93529eb33be 100644 (file)
@@ -1,9 +1,7 @@
 dnl
-dnl "$Id$"
-dnl
 dnl Common configuration stuff for CUPS.
 dnl
-dnl Copyright 2007-2014 by Apple Inc.
+dnl Copyright 2007-2016 by Apple Inc.
 dnl Copyright 1997-2007 by Easy Software Products, all rights reserved.
 dnl
 dnl These coded instructions, statements, and computer programs are the
@@ -13,18 +11,12 @@ dnl which should have been included with this file.  If this file is
 dnl file is missing or damaged, see the license at "http://www.cups.org/".
 dnl
 
-dnl We need at least autoconf 2.60...
-AC_PREREQ(2.60)
-
 dnl Set the name of the config header file...
 AC_CONFIG_HEADER(config.h)
 
 dnl Version number information...
-CUPS_VERSION="2.0svn"
+CUPS_VERSION="AC_PACKAGE_VERSION"
 CUPS_REVISION=""
-if test -z "$CUPS_REVISION" -a -d .svn; then
-       CUPS_REVISION="-r`svnversion . | awk -F: '{print $NF}' | sed -e '1,$s/[[a-zA-Z]]*//g'`"
-fi
 CUPS_BUILD="cups-$CUPS_VERSION"
 
 AC_ARG_WITH(cups_build, [  --with-cups-build       set "cups-config --build" string ],
@@ -33,8 +25,8 @@ AC_ARG_WITH(cups_build, [  --with-cups-build       set "cups-config --build" str
 AC_SUBST(CUPS_VERSION)
 AC_SUBST(CUPS_REVISION)
 AC_SUBST(CUPS_BUILD)
-AC_DEFINE_UNQUOTED(CUPS_SVERSION, "CUPS v$CUPS_VERSION$CUPS_REVISION")
-AC_DEFINE_UNQUOTED(CUPS_MINIMAL, "CUPS/$CUPS_VERSION$CUPS_REVISION")
+AC_DEFINE_UNQUOTED(CUPS_SVERSION, "AC_PACKAGE_NAME v$CUPS_VERSION$CUPS_REVISION")
+AC_DEFINE_UNQUOTED(CUPS_MINIMAL, "AC_PACKAGE_NAME/$CUPS_VERSION$CUPS_REVISION")
 
 dnl Default compiler flags...
 CFLAGS="${CFLAGS:=}"
@@ -137,6 +129,7 @@ AC_CHECK_HEADER(bstring.h,AC_DEFINE(HAVE_BSTRING_H))
 AC_CHECK_HEADER(sys/ioctl.h,AC_DEFINE(HAVE_SYS_IOCTL_H))
 AC_CHECK_HEADER(sys/param.h,AC_DEFINE(HAVE_SYS_PARAM_H))
 AC_CHECK_HEADER(sys/ucred.h,AC_DEFINE(HAVE_SYS_UCRED_H))
+AC_CHECK_HEADER(asl.h,AC_DEFINE(HAVE_ASL_H))
 
 dnl Checks for iconv.h and iconv_open
 AC_CHECK_HEADER(iconv.h,
@@ -145,6 +138,9 @@ AC_CHECK_HEADER(iconv.h,
        AC_SEARCH_LIBS(iconv_open,iconv,
                AC_DEFINE(HAVE_ICONV_H)
                SAVELIBS="$SAVELIBS $LIBS")
+       AC_SEARCH_LIBS(libiconv_open,iconv,
+               AC_DEFINE(HAVE_ICONV_H)
+               SAVELIBS="$SAVELIBS $LIBS")
        LIBS="$SAVELIBS")
 
 dnl Checks for Mini-XML (www.minixml.org)...
@@ -231,7 +227,7 @@ AC_SUBST(LIBUSB)
 AC_SUBST(USBQUIRKS)
 
 if test "x$PKGCONFIG" != x; then
-       if test x$enable_libusb = xyes -o $uname != Darwin; then
+       if test x$enable_libusb != xno -a $uname != Darwin; then
                AC_MSG_CHECKING(for libusb-1.0)
                if $PKGCONFIG --exists libusb-1.0; then
                        AC_MSG_RESULT(yes)
@@ -241,6 +237,9 @@ if test "x$PKGCONFIG" != x; then
                        USBQUIRKS="\$(DATADIR)/usb"
                else
                        AC_MSG_RESULT(no)
+                       if test x$enable_libusb = xyes; then
+                               AC_MSG_ERROR(libusb required for --enable-libusb.)
+                       fi
                fi
        fi
 elif test x$enable_libusb = xyes; then
@@ -312,7 +311,7 @@ DBUSDIR=""
 DBUS_NOTIFIER=""
 DBUS_NOTIFIERLIBS=""
 
-if test "x$enable_dbus" != xno -a "x$PKGCONFIG" != x; then
+if test "x$enable_dbus" != xno -a "x$PKGCONFIG" != x -a "x$uname" != xDarwin; then
        AC_MSG_CHECKING(for DBUS)
        if $PKGCONFIG --exists dbus-1; then
                AC_MSG_RESULT(yes)
@@ -366,9 +365,6 @@ case $uname in
                AC_CHECK_HEADER(membershipPriv.h,AC_DEFINE(HAVE_MEMBERSHIPPRIV_H))
                AC_CHECK_FUNCS(mbr_uid_to_uuid)
 
-                dnl Check for the vproc_transaction_begin/end stuff...
-               AC_CHECK_FUNCS(vproc_transaction_begin)
-
                dnl Need <dlfcn.h> header...
                AC_CHECK_HEADER(dlfcn.h,AC_DEFINE(HAVE_DLFCN_H))
 
@@ -460,7 +456,3 @@ case "$COMPONENTS" in
 esac
 
 AC_SUBST(BUILDDIRS)
-
-dnl
-dnl End of "$Id$".
-dnl