Skip to content

Commit 385e08f

Browse files
committed
* don't build artnet_usb on windows
1 parent e36f981 commit 385e08f

2 files changed

Lines changed: 42 additions & 2 deletions

File tree

configure.in

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ AM_CONFIG_HEADER(config.h)
1010
# Checks for programs.
1111
AC_PROG_CC
1212
AC_PROG_INSTALL
13+
AC_PROG_LN_S
14+
AC_PROG_MAKE_SET
15+
AC_PROG_LIBTOOL
1316

1417
# Checks for libraries.
1518
# FIXME: Replace `main' with a function in `-lncurses':
@@ -36,4 +39,38 @@ AC_FUNC_SELECT_ARGTYPES
3639
AC_TYPE_SIGNAL
3740
AC_CHECK_FUNCS([gettimeofday atexit ftime memset select strdup strerror])
3841

42+
AC_MSG_CHECKING([operating system])
43+
case $host in
44+
*-linux*)
45+
AC_DEFINE(OS_LINUX, [], [Linux backend])
46+
AC_SUBST(OS_LINUX)
47+
AC_MSG_RESULT([Linux])
48+
backend="linux"
49+
;;
50+
*-darwin*)
51+
AC_DEFINE(OS_DARWIN, [], [Darwin backend])
52+
AC_SUBST(OS_DARWIN)
53+
AC_MSG_RESULT([Darwin/MacOS X])
54+
backend="darwin"
55+
;;
56+
*-mingw*)
57+
AC_DEFINE(OS_WINDOWS, [], [Windows backend])
58+
AC_SUBST(OS_WINDOWS)
59+
AC_MSG_RESULT([Windows])
60+
backend="windows"
61+
;;
62+
*-cygwin*)
63+
AC_DEFINE(OS_WINDOWS, [], [Windows backend])
64+
AC_SUBST(OS_WINDOWS)
65+
AC_MSG_RESULT([Windows])
66+
backend="windows"
67+
;;
68+
*)
69+
AC_MSG_ERROR([unsupported operating system])
70+
esac
71+
72+
AM_CONDITIONAL([OS_LINUX], [test "x$backend" = "xlinux"])
73+
AM_CONDITIONAL([OS_DARWIN], [test "x$backend" = "xdarwin"])
74+
AM_CONDITIONAL([OS_WINDOWS], [test "x$backend" = "xwindows"])
75+
3976
AC_OUTPUT(Makefile src/Makefile)

src/Makefile.am

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,14 @@ artnet_dmxmonitor_SOURCES = artnet-dmxmonitor.c
1111
artnet_dmxmonitor_LDADD = $(libartnet_LIBS) -lcurses
1212
endif
1313

14+
if OS_LINUX
15+
ARTNET_USB = artnet_usb
16+
endif
1417

15-
bin_PROGRAMS = artnet_usb artnet_discover artnet_flood_rx artnet_flood_tx \
18+
bin_PROGRAMS = artnet_discover artnet_flood_rx artnet_flood_tx \
1619
artnet_firmware_node artnet_firmware_server artnet_multiport \
1720
artnet_profile_tx artnet_profile_rx artnet_rdm_output \
18-
artnet_setdmx $(NCURSES_PROGS)
21+
artnet_setdmx $(NCURSES_PROGS) $(ARTNET_USB)
1922

2023
artnet_usb_SOURCES = artnet-usb.c
2124
artnet_usb_LDADD = $(libartnet_LIBS) -lpthread

0 commit comments

Comments
 (0)