From: Uwe Hermann Date: Tue, 11 Jan 2011 21:17:33 +0000 (+0100) Subject: configure: Add --enable-demo option. X-Git-Tag: libsigrok-0.1.0~448 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=a61b0e6a35fdf06c98a2304e186a3a17c9fbf8d8;p=libsigrok.git configure: Add --enable-demo option. --- diff --git a/hardware/Makefile.am b/hardware/Makefile.am index 3b805e1e..eb7088f3 100644 --- a/hardware/Makefile.am +++ b/hardware/Makefile.am @@ -31,8 +31,11 @@ noinst_LTLIBRARIES = libsigrokhardware.la libsigrokhardware_la_SOURCES = libsigrokhardware_la_LIBADD = \ - common/libsigrokhwcommon.la \ - demo/libsigrokhwdemo.la + common/libsigrokhwcommon.la + +if LA_DEMO +libsigrokhardware_la_LIBADD += demo/libsigrokhwdemo.la +endif if LA_ASIX_SIGMA libsigrokhardware_la_LIBADD += asix-sigma/libsigrokhwasixsigma.la diff --git a/hardware/demo/Makefile.am b/hardware/demo/Makefile.am index 28287baf..025c1648 100644 --- a/hardware/demo/Makefile.am +++ b/hardware/demo/Makefile.am @@ -17,6 +17,8 @@ ## along with this program. If not, see . ## +if LA_DEMO + # Local lib, this is NOT meant to be installed! noinst_LTLIBRARIES = libsigrokhwdemo.la @@ -26,3 +28,5 @@ libsigrokhwdemo_la_SOURCES = \ libsigrokhwdemo_la_CFLAGS = \ -I$(top_srcdir)/libsigrok +endif + diff --git a/hwplugin.c b/hwplugin.c index c5a0b2e9..c248476b 100644 --- a/hwplugin.c +++ b/hwplugin.c @@ -42,7 +42,9 @@ struct hwcap_option hwcap_options[] = { {0, 0, NULL, NULL}, }; +#ifdef HAVE_LA_DEMO extern struct device_plugin demo_plugin_info; +#endif #ifdef HAVE_LA_SALEAE_LOGIC extern struct device_plugin saleae_logic_plugin_info; #endif @@ -63,7 +65,9 @@ extern struct device_plugin link_mso19_plugin_info; /* TODO: No linked list needed, this can be a simple array. */ int load_hwplugins(void) { +#ifdef HAVE_LA_DEMO plugins = g_slist_append(plugins, (gpointer *)&demo_plugin_info); +#endif #ifdef HAVE_LA_SALEAE_LOGIC plugins = g_slist_append(plugins, (gpointer *)&saleae_logic_plugin_info);