]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Add Mini-XML check for xmltotest program so that we don't need to special case
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Fri, 20 Jan 2012 21:49:02 +0000 (21:49 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Fri, 20 Jan 2012 21:49:02 +0000 (21:49 +0000)
make depend for it, either.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@10192 7a7537e8-13f0-0310-91df-b6672ffda945

Makedefs.in
config-scripts/cups-common.m4
config.h.in
test/Makefile
test/xmltotest.c

index 69707fd08da6627cc76f0218766923d7758fbd8c..db542315815f3d42b34cff92527a6a1bcae102a3 100644 (file)
@@ -82,9 +82,10 @@ LIBCUPSIMAGE =       @LIBCUPSIMAGE@
 LIBCUPSMIME    =       @LIBCUPSMIME@
 LIBCUPSPPDC    =       @LIBCUPSPPDC@
 LIBCUPSSTATIC  =       @LIBCUPSSTATIC@
+LIBGSSAPI      =       @LIBGSSAPI@
 LIBMALLOC      =       @LIBMALLOC@
+LIBMXML                =       @LIBMXML@
 LIBPAPER       =       @LIBPAPER@
-LIBGSSAPI      =       @LIBGSSAPI@
 LIBUSB         =       @LIBUSB@
 LIBWRAP                =       @LIBWRAP@
 LIBZ           =       @LIBZ@
index 3ad90e521ba76b360bfd93d8bc1082825440b3b3..06fd0a9bc098ee2f0d1a70bce4a740dfbd69e410 100644 (file)
@@ -147,6 +147,16 @@ AC_CHECK_HEADER(iconv.h,
                SAVELIBS="$SAVELIBS $LIBS")
        LIBS="$SAVELIBS")
 
+dnl Checks for Mini-XML (www.minixml.org)...
+LIBMXML=""
+AC_CHECK_HEADER(mxml.h,
+       SAVELIBS="$LIBS"
+       AC_SEARCH_LIBS(mmxlNewElement,mxml,
+               AC_DEFINE(HAVE_MXML_H)
+               LIBMXML="-lmxml")
+       LIBS="$SAVELIBS")
+AC_SUBST(LIBMXML)
+
 dnl Checks for statfs and its many headers...
 AC_CHECK_HEADER(sys/mount.h,AC_DEFINE(HAVE_SYS_MOUNT_H))
 AC_CHECK_HEADER(sys/statfs.h,AC_DEFINE(HAVE_SYS_STATFS_H))
index bcf86a4268aa87cd43c6aa713cc1e6a8d04aa996..1bcf7fe0b7587d23d6abe293a7028656abe4ff85 100644 (file)
@@ -3,7 +3,7 @@
  *
  *   Configuration file for CUPS.
  *
- *   Copyright 2007-2011 by Apple Inc.
+ *   Copyright 2007-2012 by Apple Inc.
  *   Copyright 1997-2007 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
 #undef HAVE_XPC
 
 
+/*
+ * Do we have Mini-XML?
+ */
+
+#undef HAVE_MXML_H
+
+
 #endif /* !_CUPS_CONFIG_H_ */
 
 /*
index ff9b2adf5315c91be14366f6319001efcedb869c..42b53be94b012a4e47f8c4177cec183bcf7e7e80 100644 (file)
@@ -189,7 +189,7 @@ xmltotest: xmltotest.o ../cups/$(LIBUPSSTATIC)
        echo Linking $@...
        $(CC) $(LDFLAGS) -o $@ xmltotest.o  ../cups/$(LIBCUPSSTATIC) \
                $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) \
-               -lmxml
+               $(LIBMXML)
 
 
 #
index 14ecf5748f0a8d192e422e9b21ee5c9858c599de..8f601cc269eef884bb24b18c20683f3f06a82452 100644 (file)
@@ -3,7 +3,7 @@
  *
  *   IANA XML registration to test file generator for CUPS.
  *
- *   Copyright 2011 by Apple Inc.
+ *   Copyright 2011-2012 by Apple Inc.
  *
  *   These coded instructions, statements, and computer programs are the
  *   property of Apple Inc. and are protected by Federal copyright
  *   write_expect() - Write an EXPECT test for an attribute.
  */
 
-#include <mxml.h>
+
+#include <config.h>
 #include <cups/cups.h>
 #include <unistd.h>
 #include <fcntl.h>
 
-
+#ifdef HAVE_MXML_H
+#  include <mxml.h>
 /*
  * Local types...
  */
@@ -513,6 +515,15 @@ write_expect(_cups_reg_t *reg,             /* I - Registration information */
 }
 
 
+#else /* !HAVE_MXML */
+int
+main(void)
+{
+  return (1);
+}
+#endif /* HAVE_MXML */
+
+
 /*
  * End of "$Id$".
  */