summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--acinclude.m419
-rw-r--r--common/Makefile.am10
-rw-r--r--common/sdp-dummy.c0
-rw-r--r--configure.in1
4 files changed, 25 insertions, 5 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index ef7f6678..8b21f3b9 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -73,7 +73,7 @@ AC_DEFUN([AC_PATH_BLUEZ], [
AC_DEFUN([AC_PATH_DBUS], [
PKG_CHECK_MODULES(DBUS, dbus-1 > 0.35, dummy=yes, AC_MSG_ERROR(dbus > 0.35 is required))
- DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_API_SUBJECT_TO_CHANGE"
+ PKG_CHECK_EXISTS(dbus-1 < 0.94, DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_API_SUBJECT_TO_CHANGE")
AC_SUBST(DBUS_CFLAGS)
AC_SUBST(DBUS_LIBS)
])
@@ -121,14 +121,22 @@ AC_DEFUN([AC_PATH_USB], [
PKG_CHECK_MODULES(USB, libusb, usb_found=yes, AC_MSG_RESULT(no))
AC_SUBST(USB_CFLAGS)
AC_SUBST(USB_LIBS)
- AC_CHECK_LIB(usb, usb_get_busses, dummy=yes, AC_DEFINE(NEED_USB_GET_BUSSES, 1, [Define to 1 if you need the usb_get_busses() function.]))
- AC_CHECK_LIB(usb, usb_interrupt_read, dummy=yes, AC_DEFINE(NEED_USB_INTERRUPT_READ, 1, [Define to 1 if you need the usb_interrupt_read() function.]))
+ AC_CHECK_LIB(usb, usb_get_busses, dummy=yes,
+ AC_DEFINE(NEED_USB_GET_BUSSES, 1, [Define to 1 if you need the usb_get_busses() function.]))
+ AC_CHECK_LIB(usb, usb_interrupt_read, dummy=yes,
+ AC_DEFINE(NEED_USB_INTERRUPT_READ, 1, [Define to 1 if you need the usb_interrupt_read() function.]))
+])
+
+AC_DEFUN([AC_PATH_EXPAT], [
+ AC_CHECK_LIB(expat, XML_ParserCreate_MM, expat_found=yes, expat_found=no)
+ AC_CHECK_HEADERS(expat.h, dummy=yes, expat_found=no)
])
AC_DEFUN([AC_ARG_BLUEZ], [
fortify_enable=yes
debug_enable=no
pie_enable=no
+ expat_enable=${expat_found}
glib_enable=${glib_found}
obex_enable=${openobex_found}
sync_enable=${opensync_found}
@@ -172,6 +180,10 @@ AC_DEFUN([AC_ARG_BLUEZ], [
dfutool_enable=${enableval}
])
+ AC_ARG_ENABLE(expat, AC_HELP_STRING([--enable-expat], [enable Expat support]), [
+ expat_enable=${enableval}
+ ])
+
AC_ARG_ENABLE(glib, AC_HELP_STRING([--enable-glib], [enable GLib support]), [
glib_enable=${enableval}
])
@@ -241,6 +253,7 @@ AC_DEFUN([AC_ARG_BLUEZ], [
LDFLAGS="$LDFLAGS -pie"
fi
+ AM_CONDITIONAL(EXPAT, test "${expat_enable}" = "yes" && test "${expat_found}" = "yes")
AM_CONDITIONAL(GLIB, test "${glib_enable}" = "yes" && test "${glib_found}" = "yes")
AM_CONDITIONAL(OBEX, test "${obex_enable}" = "yes" && test "${openobex_found}" = "yes")
AM_CONDITIONAL(SYNC, test "${sync_enable}" = "yes" && test "${opensync_found}" = "yes")
diff --git a/common/Makefile.am b/common/Makefile.am
index 1203652a..182d574e 100644
--- a/common/Makefile.am
+++ b/common/Makefile.am
@@ -1,10 +1,16 @@
+if EXPAT
+sdp_sources = sdp-expat.c
+else
+sdp_sources = sdp-dummy.c
+endif
+
noinst_LIBRARIES = libhelper.a
libhelper_a_SOURCES = oui.h oui.c list.h list.c \
textfile.h textfile.c helper.h helper.c \
glib-ectomy.h glib-ectomy.c logging.h logging.c \
- dbus.h dbus.c sdp-xml.h sdp-xml.c sdp-expat.c
+ dbus.h dbus.c sdp-xml.h sdp-xml.c $(sdp_sources)
noinst_PROGRAMS = test_textfile
@@ -12,6 +18,6 @@ test_textfile_LDADD = libhelper.a
AM_CFLAGS = @DBUS_CFLAGS@
-EXTRA_DIST = ppoll.h
+EXTRA_DIST = ppoll.h sdp-dummy.c sdp-expat.c
MAINTAINERCLEANFILES = Makefile.in
diff --git a/common/sdp-dummy.c b/common/sdp-dummy.c
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/common/sdp-dummy.c
diff --git a/configure.in b/configure.in
index 85d148d3..4f820419 100644
--- a/configure.in
+++ b/configure.in
@@ -33,6 +33,7 @@ AC_PATH_GSTREAMER
AC_PATH_FUSE
AC_PATH_ALSA
AC_PATH_USB
+AC_PATH_EXPAT
AC_ARG_BLUEZ