Ticket #159: avahi_use_bsdxml.patch
| File avahi_use_bsdxml.patch, 4.7 kB (added by zml, 1 year ago) |
|---|
-
avahi-daemon/static-services.c
old new 31 31 #include <fcntl.h> 32 32 #include <unistd.h> 33 33 34 #ifdef USE_EXPAT_H 34 35 #include <expat.h> 36 #endif /* USE_EXPAT_H */ 37 38 #ifdef USE_BSDXML_H 39 #include <bsdxml.h> 40 #endif /* USE_BSDXML_H */ 35 41 36 42 #include <avahi-common/llist.h> 37 43 #include <avahi-common/malloc.h> -
avahi-daemon/Makefile.am
old new 23 23 AM_CFLAGS+='-DDEBUG_TRAP=__asm__("int $$3")' 24 24 25 25 if HAVE_LIBDAEMON 26 if HAVE_ EXPAT26 if HAVE_XML 27 27 28 28 pkgsysconfdir=$(sysconfdir)/avahi 29 29 servicedir=$(pkgsysconfdir)/services … … 56 56 ../avahi-client/check-nss.c \ 57 57 inotify-nosys.h 58 58 59 avahi_daemon_CFLAGS = $(AM_CFLAGS) $(LIBDAEMON_CFLAGS) 60 avahi_daemon_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la ../avahi-core/libavahi-core.la $(LIBDAEMON_LIBS) -lexpat59 avahi_daemon_CFLAGS = $(AM_CFLAGS) $(LIBDAEMON_CFLAGS) $(XML_CFLAGS) 60 avahi_daemon_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la ../avahi-core/libavahi-core.la $(LIBDAEMON_LIBS) $(XML_LIBS) 61 61 62 62 ini_file_parser_test_SOURCES = \ 63 63 ini-file-parser.c ini-file-parser.h \ -
configure.ac
old new 590 590 # 591 591 # Expat 592 592 # 593 AC_ARG_ENABLE(expat, 594 AS_HELP_STRING([--disable-expat],[Disable use of Expat]), 595 [case "${enableval}" in 596 yes) HAVE_EXPAT=yes ;; 597 no) HAVE_EXPAT=no ;; 598 *) AC_MSG_ERROR(bad value ${enableval} for --enable-expat) ;; 599 esac], 600 [HAVE_EXPAT=yes]) 593 AC_ARG_WITH(xml, AS_HELP_STRING([--with-xml=[expat/bsdxml/none]],[XML library to use])) 594 use_expat=false 595 use_bsdxml=false 601 596 602 if test "x$HAVE_EXPAT" = "xyes" ; then 603 AC_CHECK_LIB(expat, XML_ParserCreate, [ AC_CHECK_HEADERS(expat.h, have_expat=true, have_expat=false) ], have_expat=false) 597 # See what we have 598 AC_CHECK_LIB(expat, XML_ParserCreate, [ AC_CHECK_HEADERS(expat.h, have_expat=true, have_expat=false) ], have_expat=false) 599 AC_CHECK_LIB(bsdxml, XML_ParserCreate, [ AC_CHECK_HEADERS(bsdxml.h, have_bsdxml=true, have_bsdxml=false) ], have_bsdxml=false) 604 600 605 if ! $have_expat ; then 606 AC_MSG_ERROR([*** libexpat not found ***]) 607 fi 601 if test "x$with_xml" = "xnone"; then 602 elif test "x$with_xml" = "xexpat"; then 603 use_expat=true 604 if ! $have_expat ; then 605 AC_MSG_ERROR([*** libexpat requested, but not found ***]) 606 fi 607 elif test "x$with_xml" = "xbsdxml"; then 608 use_bsdxml=true 609 if ! $have_bsdxml ; then 610 AC_MSG_ERROR([*** libbsdxml requested, but not found ***]) 611 fi 612 elif test "x$with_xml" != "x"; then 613 AC_MSG_ERROR([*** unknown with-xml option ***]) 614 else 615 if $have_expat ; then 616 use_expat=true 617 elif $have_bsdxml ; then 618 use_bsdxml=true 619 else 620 AC_MSG_ERROR([*** neither libexpat not libbsdxml could be found ***]) 621 fi 608 622 fi 609 AM_CONDITIONAL(HAVE_EXPAT, test "x$HAVE_EXPAT" = "xyes")610 623 624 if $use_expat; then 625 with_xml=expat 626 XML_CLAGS=-DUSE_EXPAT_H 627 XML_LIBS=-lexpat 628 fi 629 if $use_bsdxml; then 630 with_xml=bsdxml 631 XML_CFLAGS=-DUSE_BSDXML_H 632 XML_LIBS=-lbsdxml 633 fi 634 AC_SUBST(XML_LIBS) 635 AC_SUBST(XML_CFLAGS) 636 637 if $use_expat || $use_bsdxml; then 638 HAVE_XML=yes 639 fi 640 641 AM_CONDITIONAL(HAVE_XML, test "x$HAVE_XML" = "xyes") 642 611 643 # 612 644 # GDBM 613 645 # … … 1028 1060 Enable GLIB: ${HAVE_GLIB} 1029 1061 Enable GTK: ${HAVE_GTK} 1030 1062 Enable D-Bus: ${HAVE_DBUS} 1031 Enable Expat: ${HAVE_EXPAT}1063 With XML: ${with_xml} 1032 1064 Enable GDBM: ${HAVE_GDBM} 1033 1065 Enable DBM: ${HAVE_DBM} 1034 1066 Enable libdaemon: ${HAVE_LIBDAEMON} … … 1050 1082 Enable stack-smashing protection: ${enable_ssp} 1051 1083 " 1052 1084 1053 BUILD_DAEMON="no (You need libdaemon and expat !)"1085 BUILD_DAEMON="no (You need libdaemon and expat/bsdxml!)" 1054 1086 1055 if test "x$HAVE_ EXPAT" = "xyes" -a "x$HAVE_LIBDAEMON" = "xyes" ; then1087 if test "x$HAVE_XML" = "xyes" -a "x$HAVE_LIBDAEMON" = "xyes" ; then 1056 1088 BUILD_DAEMON=yes 1057 1089 fi 1058 1090 -
avahi-dnsconfd/Makefile.am
old new 17 17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 18 18 # USA. 19 19 20 if HAVE_ EXPAT20 if HAVE_XML 21 21 if HAVE_LIBDAEMON 22 22 23 23 pkgsysconfdir=$(sysconfdir)/avahi
