diff options
author | Harald Welte <laforge@gnumonks.org> | 2012-11-09 09:12:42 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2012-11-09 09:12:42 +0100 |
commit | 9288d59cfdc452fa3a92728149537372ee5c6c56 (patch) | |
tree | c40d87d50e919086584cad6e1bad6e1b8ab8baa5 | |
parent | a52c99e9e699f5ad264908bf9b19e349c4bcfd9e (diff) |
auto-foo: Build test apps with libxml2 only if it is available
And disable the smsc build as it depends on libosmocore
-rw-r--r-- | binary/Makefile.am | 6 | ||||
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | test_apps/Makefile.am | 12 |
3 files changed, 13 insertions, 9 deletions
diff --git a/binary/Makefile.am b/binary/Makefile.am index 6f99417..6a68939 100644 --- a/binary/Makefile.am +++ b/binary/Makefile.am @@ -1,5 +1,9 @@ # Makefile.am # -noinst_PROGRAMS = submit_multi_resp_test submit_multi_test alert_notification_test bind_receiver_resp_test bind_receiver_test bind_transceiver_resp_test bind_transceiver_test bind_transmitter_resp_test bind_transmitter_test cancel_sm_resp_test cancel_sm_test data_sm_resp_test data_sm_test deliver_sm_resp_test deliver_sm_test enquire_link_resp_test enquire_link_test generic_nack_test outbind_test query_sm_resp_test query_sm_test replace_sm_resp_test replace_sm_test submit_sm_resp_test submit_sm_test unbind_resp_test unbind_test esme analizer sendwp smsc +if HAVE_LIBXML2 +noinst_PROGRAMS = submit_multi_resp_test submit_multi_test alert_notification_test bind_receiver_resp_test bind_receiver_test bind_transceiver_resp_test bind_transceiver_test bind_transmitter_resp_test bind_transmitter_test cancel_sm_resp_test cancel_sm_test data_sm_resp_test data_sm_test deliver_sm_resp_test deliver_sm_test enquire_link_resp_test enquire_link_test generic_nack_test outbind_test query_sm_resp_test query_sm_test replace_sm_resp_test replace_sm_test submit_sm_resp_test submit_sm_test unbind_resp_test unbind_test esme analizer sendwp +else +noinst_PROGRAMS = submit_multi_resp_test submit_multi_test alert_notification_test bind_receiver_resp_test bind_receiver_test bind_transceiver_resp_test bind_transceiver_test bind_transmitter_resp_test bind_transmitter_test cancel_sm_resp_test cancel_sm_test data_sm_resp_test data_sm_test deliver_sm_resp_test deliver_sm_test enquire_link_resp_test enquire_link_test generic_nack_test outbind_test query_sm_resp_test query_sm_test replace_sm_resp_test replace_sm_test submit_sm_resp_test submit_sm_test unbind_resp_test unbind_test analizer +endif include $(top_srcdir)/test_pdu/Makefile.am include $(top_srcdir)/test_apps/Makefile.am diff --git a/configure.ac b/configure.ac index ee5e68f..1f7f129 100644 --- a/configure.ac +++ b/configure.ac @@ -19,6 +19,10 @@ AC_PROG_INSTALL AC_HEADER_STDC AC_CHECK_HEADERS([malloc.h netinet/in.h stdint.h string.h]) +found_libxml2=yes +PKG_CHECK_MODULES(LIBXML2, libxml-2.0, , found_libxml2=no) +AM_CONDITIONAL(HAVE_LIBXML2, test "$found_libxml2" = yes) + # Checks for typedefs, structures, and compiler characteristics. # Checks for library functions. diff --git a/test_apps/Makefile.am b/test_apps/Makefile.am index 9177fe7..9089fc9 100644 --- a/test_apps/Makefile.am +++ b/test_apps/Makefile.am @@ -7,8 +7,8 @@ sendwp_SOURCES = \ $(TESTAPPS_SOURCE_DIR)/sendwp.h\ $(TESTAPPS_SOURCE_DIR)/sendwp.c -sendwp_CPPFLAGS = `xml2-config --cflags` -sendwp_LDFLAGS = `xml2-config --libs` +sendwp_CPPFLAGS = $(LIBXML2_CFLAGS) +sendwp_LDFLAGS = $(LIBXML2_LIBS) noinst_DATA = \ $(TESTAPPS_SOURCE_DIR)/sendwp.xml \ @@ -20,15 +20,11 @@ esme_SOURCES = \ $(TESTAPPS_SOURCE_DIR)/esme.h\ $(TESTAPPS_SOURCE_DIR)/esme.c -esme_CPPFLAGS = `xml2-config --cflags` -esme_LDFLAGS = `xml2-config --libs` +esme_CPPFLAGS = $(LIBXML2_CFLAGS) +esme_LDFLAGS = $(LIBXML2_LIBS) analizer_SOURCES = \ $(TESTAPPS_SOURCE_DIR)/analizer.c analizer_CPPFLAGS = analizer_LDFLAGS = - -smsc_CPPFLAGS = `pkg-config --cflags libosmocore` -smsc_LDFLAGS = `pkg-config --libs libosmocore` -smsc_SOURCES = $(TESTAPPS_SOURCE_DIR)/smpp_smsc.c $(TESTAPPS_SOURCE_DIR)/smsc_main.c |