;;
FreeBSD)
- paths="$paths src/linux src/bsd/tunemu.c"
+ paths="$paths src/linux src/bsd/darwin src/bsd/openbsd"
;;
Darwin)
--- /dev/null
+dep_tunemu = dependency('tunemu', required: opt_tunemu, static: static)
+dep_pcap = dependency('pcap', required: opt_tunemu, static: static)
+
+if dep_tunemu.found() and dep_pcap.found()
+ deps_tincd += [dep_tunemu, dep_pcap]
+ src_tincd += files('tunemu.c')
+ cdata.set('ENABLE_TUNEMU', 1)
+endif
+
#ifndef TUNEMU_H
#define TUNEMU_H
-#include "../system.h"
+#include "../../system.h"
typedef char tunemu_device[7];
#include "../xalloc.h"
#ifdef ENABLE_TUNEMU
-#include "tunemu.h"
+#include "darwin/tunemu.h"
#endif
#ifdef HAVE_NET_IF_UTUN_H
src_tincd += files('device.c')
-if os_name == 'openbsd'
- subdir('openbsd')
-endif
-
-if os_name == 'darwin'
- dep_tunemu = dependency('tunemu', required: opt_tunemu, static: static)
- dep_pcap = dependency('pcap', required: opt_tunemu, static: static)
-
- if dep_tunemu.found() and dep_pcap.found()
- deps_tincd += [dep_tunemu, dep_pcap]
- src_tincd += files('tunemu.c')
- cdata.set('ENABLE_TUNEMU', 1)
- endif
+if os_name in ['openbsd', 'darwin']
+ subdir(os_name)
endif