From 5b907f9b07b0559f7230e827e5d02589d307e727 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Mon, 31 May 2010 11:34:10 +0200 Subject: [PATCH] Add per-LA --enable-XXXX configure options. --- Makefile.am | 12 ++++++++++-- hwplugin.c | 4 ++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index 0dcd9848..060b2cab 100644 --- a/Makefile.am +++ b/Makefile.am @@ -34,8 +34,6 @@ libsigrok_la_SOURCES = \ hardware/common/serial.c \ hardware/openbench-logic-sniffer/ols.c \ hardware/saleae-logic/saleae-logic.c \ - hardware/asix-sigma/asix-sigma.c \ - hardware/asix-sigma/asix-sigma.h \ hardware/zeroplus-logic-cube/analyzer.c \ hardware/zeroplus-logic-cube/analyzer.h \ hardware/zeroplus-logic-cube/gl_usb.c \ @@ -50,6 +48,16 @@ libsigrok_la_SOURCES = \ output/common.c \ output/output.c +if LA_ASIX_SIGMA +libsigrok_la_SOURCES += \ + hardware/asix-sigma/asix-sigma.c \ + hardware/asix-sigma/asix-sigma.h +else +EXTRA_DIST = \ + hardware/asix-sigma/asix-sigma.c \ + hardware/asix-sigma/asix-sigma.h +endif + libsigrok_la_LIBADD = $(LIBOBJS) include_HEADERS = sigrok.h diff --git a/hwplugin.c b/hwplugin.c index 5cd6f6bb..aaf71b50 100644 --- a/hwplugin.c +++ b/hwplugin.c @@ -43,7 +43,9 @@ struct hwcap_option hwcap_options[] = { extern struct device_plugin saleae_logic_plugin_info; extern struct device_plugin ols_plugin_info; extern struct device_plugin zeroplus_logic_cube_plugin_info; +#ifdef HAVE_LA_ASIX_SIGMA extern struct device_plugin asix_sigma_plugin_info; +#endif /* TODO: No linked list needed, this can be a simple array. */ int load_hwplugins(void) @@ -53,7 +55,9 @@ int load_hwplugins(void) plugins = g_slist_append(plugins, (gpointer *)&ols_plugin_info); plugins = g_slist_append(plugins, (gpointer *)&zeroplus_logic_cube_plugin_info); +#ifdef HAVE_LA_ASIX_SIGMA plugins = g_slist_append(plugins, (gpointer *)&asix_sigma_plugin_info); +#endif return SIGROK_OK; }