summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am5
-rwxr-xr-xbootstrap-configure1
-rw-r--r--configure.ac10
3 files changed, 15 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index eb160019..8ad01cde 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -350,7 +350,8 @@ else
build_plugindir = $(plugindir)
endif
-AM_CFLAGS = @DBUS_CFLAGS@ @GLIB_CFLAGS@ @CAPNG_CFLAGS@ $(builtin_cflags) \
+AM_CFLAGS = @DBUS_CFLAGS@ @GLIB_CFLAGS@ @CAPNG_CFLAGS@ @USB_CFLAGS@ \
+ $(builtin_cflags) \
-DOFONO_PLUGIN_BUILTIN \
-DPLUGINDIR=\""$(build_plugindir)"\"
@@ -498,6 +499,7 @@ unit_test_caif_SOURCES = unit/test-caif.c $(gatchat_sources) \
unit_test_caif_LDADD = @GLIB_LIBS@
unit_objects += $(unit_test_caif_OBJECTS)
+if TOOLS
noinst_PROGRAMS += tools/huawei-audio tools/auto-enable
tools_huawei_audio_SOURCES = $(gdbus_sources) tools/huawei-audio.c
@@ -505,6 +507,7 @@ tools_huawei_audio_LDADD = @GLIB_LIBS@ @DBUS_LIBS@
tools_auto_enable_SOURCES = $(gdbus_sources) tools/auto-enable.c
tools_auto_enable_LDADD = @GLIB_LIBS@ @DBUS_LIBS@
+endif
noinst_PROGRAMS += gatchat/gsmdial gatchat/test-server gatchat/test-qcdm
diff --git a/bootstrap-configure b/bootstrap-configure
index 5642f6b6..db70c665 100755
--- a/bootstrap-configure
+++ b/bootstrap-configure
@@ -13,4 +13,5 @@ fi
--sysconfdir=/etc \
--localstatedir=/var \
--enable-capng \
+ --enable-tools \
--disable-datafiles $*
diff --git a/configure.ac b/configure.ac
index c33780f8..7a2ca790 100644
--- a/configure.ac
+++ b/configure.ac
@@ -153,6 +153,16 @@ AC_SUBST(UDEV_CFLAGS)
AC_SUBST(UDEV_LIBS)
AM_CONDITIONAL(UDEV, test "${enable_udev}" = "yes")
+AC_ARG_ENABLE(tools, AC_HELP_STRING([--enable-tools],
+ [enable testing tools]), [enable_tools=${enableval}])
+if (test "${enable_tools}" = "yes"); then
+ PKG_CHECK_MODULES(USB, libusb-1.0, dummy=yes,
+ AC_MSG_ERROR(USB library is required))
+ AC_SUBST(USB_CFLAGS)
+ AC_SUBST(USB_LIBS)
+fi
+AM_CONDITIONAL(TOOLS, test "${enable_tools}" = "yes")
+
AC_ARG_ENABLE(atmodem, AC_HELP_STRING([--disable-atmodem],
[disable ETSI AT modem support]),
[enable_atmodem=${enableval}])