File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ AM_CONFIG_HEADER(config.h)
1010# Checks for programs.
1111AC_PROG_CC
1212AC_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
3639AC_TYPE_SIGNAL
3740AC_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+
3976AC_OUTPUT (Makefile src/Makefile)
Original file line number Diff line number Diff line change @@ -11,11 +11,14 @@ artnet_dmxmonitor_SOURCES = artnet-dmxmonitor.c
1111artnet_dmxmonitor_LDADD = $(libartnet_LIBS ) -lcurses
1212endif
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
2023artnet_usb_SOURCES = artnet-usb.c
2124artnet_usb_LDADD = $(libartnet_LIBS ) -lpthread
You can’t perform that action at this time.
0 commit comments