diff --git a/configure.ac b/configure.ac
index a9c4005..2c6a8f5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -35,8 +35,6 @@ AC_CHECK_HEADERS([sys/socket.h linux/types.h linux/irda.h], [irda_linux=yes], [i
])
AM_CONDITIONAL([IRDA], [test "$irda_win32" = "yes" || test "$irda_linux" = "yes"])
-AM_CONDITIONAL([IRDA_WIN32], [test "$irda_win32" = "yes"])
-AM_CONDITIONAL([IRDA_LINUX], [test "$irda_linux" = "yes"])
# Checks for library functions.
AC_CHECK_FUNCS([localtime_r gmtime_r])
diff --git a/msvc/libdivecomputer.vcproj b/msvc/libdivecomputer.vcproj
index 3c46f11..9aa9f69 100644
--- a/msvc/libdivecomputer.vcproj
+++ b/msvc/libdivecomputer.vcproj
@@ -540,7 +540,7 @@
>
@@ -549,7 +549,7 @@
>
diff --git a/src/Makefile.am b/src/Makefile.am
index ae847b1..a10ba70 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -65,6 +65,7 @@ libdivecomputer_la_SOURCES = \
uwatec.h \
uwatec_aladin.h uwatec_aladin.c \
uwatec_memomouse.h uwatec_memomouse.c uwatec_memomouse_parser.c \
+ uwatec_smart.h uwatec_smart.c uwatec_smart_parser.c \
oceanic.h \
oceanic_common.h oceanic_common.c \
oceanic_atom2.h oceanic_atom2.c oceanic_atom2_parser.c \
@@ -91,22 +92,18 @@ libdivecomputer_la_SOURCES += serial.h serial_posix.c
endif
if IRDA
-if IRDA_WIN32
+if OS_WIN32
libdivecomputer_la_LIBADD = -lws2_32
endif
-libdivecomputer_la_SOURCES += \
- irda.h irda.c \
- uwatec_smart.h uwatec_smart.c uwatec_smart_parser.c
+libdivecomputer_la_SOURCES += irda.h irda.c
+else
+libdivecomputer_la_SOURCES += irda.h irda_dummy.c
endif
libdivecomputer_la_DEPENDENCIES = libdivecomputer.exp
libdivecomputer.exp: libdivecomputer.symbols
-if IRDA
- $(AM_V_GEN) $(CPP) -P -DSERIAL -DIRDA - < $< | sed -e '/^$$/d' > $@
-else
- $(AM_V_GEN) $(CPP) -P -DSERIAL - < $< | sed -e '/^$$/d' > $@
-endif
+ $(AM_V_GEN) sed -e '/^$$/d' $< > $@
CLEANFILES = libdivecomputer.exp
EXTRA_DIST = libdivecomputer.symbols
diff --git a/src/irda_dummy.c b/src/irda_dummy.c
new file mode 100644
index 0000000..7a597e0
--- /dev/null
+++ b/src/irda_dummy.c
@@ -0,0 +1,114 @@
+/*
+ * libdivecomputer
+ *
+ * Copyright (C) 2010 Jef Driesen
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#include
+
+#include "irda.h"
+
+int
+irda_errcode (void)
+{
+ return 0;
+}
+
+
+const char *
+irda_errmsg (void)
+{
+ return NULL;
+}
+
+
+int
+irda_init (void)
+{
+ return -1;
+}
+
+
+int
+irda_cleanup (void)
+{
+ return -1;
+}
+
+
+int
+irda_socket_open (irda **out)
+{
+ return -1;
+}
+
+
+int
+irda_socket_close (irda *device)
+{
+ return -1;
+}
+
+
+int
+irda_socket_set_timeout (irda *device, long timeout)
+{
+ return -1;
+}
+
+
+int
+irda_socket_discover (irda *device, irda_callback_t callback, void *userdata)
+{
+ return -1;
+}
+
+
+int
+irda_socket_connect_name (irda *device, unsigned int address, const char *name)
+{
+ return -1;
+}
+
+
+int
+irda_socket_connect_lsap (irda *device, unsigned int address, unsigned int lsap)
+{
+ return -1;
+}
+
+
+int
+irda_socket_available (irda* device)
+{
+ return -1;
+}
+
+
+int
+irda_socket_read (irda* device, void* data, unsigned int size)
+{
+ return -1;
+}
+
+
+int
+irda_socket_write (irda* device, const void *data, unsigned int size)
+{
+ return -1;
+}
diff --git a/src/libdivecomputer.symbols b/src/libdivecomputer.symbols
index 5582652..6955cb1 100644
--- a/src/libdivecomputer.symbols
+++ b/src/libdivecomputer.symbols
@@ -17,7 +17,7 @@ parser_get_type
parser_set_data
parser_get_datetime
parser_samples_foreach
-parser_destroy
+parser_destroy
reefnet_sensus_parser_create
reefnet_sensus_parser_set_calibration
@@ -26,9 +26,7 @@ reefnet_sensuspro_parser_set_calibration
reefnet_sensusultra_parser_create
reefnet_sensusultra_parser_set_calibration
uwatec_memomouse_parser_create
-#ifdef IRDA
uwatec_smart_parser_create
-#endif
suunto_vyper_parser_create
suunto_solution_parser_create
suunto_eon_parser_create
@@ -52,7 +50,6 @@ device_write
message
message_set_logfile
-#ifdef SERIAL
cressi_edy_device_open
mares_nemo_device_open
mares_nemo_extract_dives
@@ -102,11 +99,7 @@ uwatec_aladin_extract_dives
uwatec_memomouse_device_open
uwatec_memomouse_device_set_timestamp
uwatec_memomouse_extract_dives
-hw_ostc_device_open
-#endif
-
-#ifdef IRDA
uwatec_smart_device_open
uwatec_smart_device_set_timestamp
uwatec_smart_extract_dives
-#endif
+hw_ostc_device_open