lib_LTLIBRARIES = libserialport.la
-libserialport_la_SOURCES = serialport.c linux_termios.c linux_termios.h
+libserialport_la_SOURCES = serialport.c linux_termios.h
+if LINUX
+libserialport_la_SOURCES += linux_termios.c
+endif
libserialport_la_LIBADD = $(LIBOBJS)
case $target_os in
*linux*)
+ AM_CONDITIONAL([LINUX], true)
# On Linux libudev is currently required for enumeration.
AC_ARG_WITH([libudev],
[AS_HELP_STRING([--with-libudev],
SP_PKGLIBS="$SP_PKGLIBS libudev"; AC_DEFINE(HAVE_LIBUDEV)])], [])
;;
*darwin*)
+ AM_CONDITIONAL([LINUX], false)
LDFLAGS="$LDFLAGS -Wl,-framework -Wl,IOKit -Wl,-framework -Wl,CoreFoundation"
AC_CHECK_HEADER(IOKit/IOKitLib.h, [], [AC_MSG_ERROR([IOKit/IOKitLib.h not found])])
;;
+*)
+ AM_CONDITIONAL([LINUX], false)
esac
AC_SUBST(SP_PKGLIBS)