Skip to content

Commit

Permalink
autoconf build system : make osc test program optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Marije Baalman committed Oct 1, 2013
1 parent 8a98d5b commit f70e010
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
5 changes: 4 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,17 @@ endif

# SUBDIRS += hidapi_parser
SUBDIRS += hidparsertest
SUBDIRS += hidapi2osc
SUBDIRS += hidtest


if BUILD_TESTGUI
SUBDIRS += testgui
endif

if BUILD_TESTOSC
SUBDIRS += hidapi2osc
endif

EXTRA_DIST = udev doxygen

dist_doc_DATA = \
Expand Down
3 changes: 2 additions & 1 deletion README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ In addition, a CMake build system has been made.

Some test examples are available:
* hidparsertest will list all devices and optionally open one, displaying the element information, and the incoming data
* hidapi2osc will send out the data via OSC (OpenSoundControl), and provides an OSC interface for listing, opening and closing devices (see the supercollider script for testing the interface)
* hidapi2osc will send out the data via OSC (OpenSoundControl), and provides an OSC interface for listing, opening and closing devices (see the supercollider script for testing the interface), to enable building this, use the CMake build system, or pass the --enable-testosc flag to the configure script:
$ ./configure --enable-testosc

[1] https://github.com/sensestage/hidapi
[2] https://github.com/tonyrog/hidapi
Expand Down
17 changes: 14 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,23 @@ fi

AC_SUBST(LTLDFLAGS)

PKG_CHECK_MODULES( LIBLO, liblo)

# Test OSC
AC_ARG_ENABLE([testosc],
[AS_HELP_STRING([--enable-testosc],
[enable building of test OSC (default n)])],
[testosc_enabled=$enableval],
[testosc_enabled='no'])
AM_CONDITIONAL([BUILD_TESTOSC], [test "x$testosc_enabled" != "xno"])

# make osc example program optional
if test "x$testosc_enabled" != "xno"; then
PKG_CHECK_MODULES( LIBLO, liblo)
AC_CONFIG_FILES([hidapi2osc/Makefile])
fi

AC_CONFIG_FILES([Makefile \
hidtest/Makefile \
hidparsertest/Makefile \
hidapi2osc/Makefile \
libusb/Makefile \
linux/Makefile \
mac/Makefile \
Expand Down

0 comments on commit f70e010

Please sign in to comment.