diff -pruN gmfsk-0.7pre1-modified/src/cw/cw.h gmfsk-0.7pre1-fix-broken-includes/src/cw/cw.h
--- gmfsk-0.7pre1-modified/src/cw/cw.h	2004-08-28 19:53:14.000000000 +0200
+++ gmfsk-0.7pre1-fix-broken-includes/src/cw/cw.h	2015-12-18 23:52:42.180866714 +0100
@@ -29,7 +29,8 @@
 #ifndef _CW_H
 #define _CW_H
 
-#include "cmplx.h"
+#include <math.h>
+
 #include "trx.h"
 
 #define	SampleRate	8000
diff -pruN gmfsk-0.7pre1-modified/src/cw/cwrx.c gmfsk-0.7pre1-fix-broken-includes/src/cw/cwrx.c
--- gmfsk-0.7pre1-modified/src/cw/cwrx.c	2015-12-19 00:03:58.866229401 +0100
+++ gmfsk-0.7pre1-fix-broken-includes/src/cw/cwrx.c	2015-12-18 23:51:53.888342451 +0100
@@ -34,7 +34,6 @@
 #include "trx.h"
 #include "cw.h"
 #include "morse.h"
-#include "filter.h"
 #include "fftfilt.h"
 
 static int cw_process(struct trx *trx, int cw_event, unsigned char **c);
diff -pruN gmfsk-0.7pre1-modified/src/feld/feld.c gmfsk-0.7pre1-fix-broken-includes/src/feld/feld.c
--- gmfsk-0.7pre1-modified/src/feld/feld.c	2005-01-04 20:22:05.000000000 +0100
+++ gmfsk-0.7pre1-fix-broken-includes/src/feld/feld.c	2015-12-18 23:50:52.394675122 +0100
@@ -27,7 +27,6 @@
 
 #include "trx.h"
 #include "feld.h"
-#include "filter.h"
 #include "fftfilt.h"
 
 static void feld_txinit(struct trx *trx)
diff -pruN gmfsk-0.7pre1-modified/src/feld/feld.h gmfsk-0.7pre1-fix-broken-includes/src/feld/feld.h
--- gmfsk-0.7pre1-modified/src/feld/feld.h	2003-09-04 02:24:26.000000000 +0200
+++ gmfsk-0.7pre1-fix-broken-includes/src/feld/feld.h	2015-12-18 23:51:13.532904483 +0100
@@ -27,7 +27,7 @@
 
 #include <gnome.h>
 
-#include "cmplx.h"
+#include "cmplx_funcs.h"
 #include "trx.h"
 
 #define	SampleRate	8000
diff -pruN gmfsk-0.7pre1-modified/src/feld/feldrx.c gmfsk-0.7pre1-fix-broken-includes/src/feld/feldrx.c
--- gmfsk-0.7pre1-modified/src/feld/feldrx.c	2015-12-19 00:03:58.866229401 +0100
+++ gmfsk-0.7pre1-fix-broken-includes/src/feld/feldrx.c	2015-12-18 23:50:58.646742957 +0100
@@ -24,7 +24,6 @@
 
 #include "trx.h"
 #include "feld.h"
-#include "filter.h"
 #include "fftfilt.h"
 
 #undef  MAX
diff -pruN gmfsk-0.7pre1-modified/src/feld/feldtx.c gmfsk-0.7pre1-fix-broken-includes/src/feld/feldtx.c
--- gmfsk-0.7pre1-modified/src/feld/feldtx.c	2015-12-19 00:03:58.866229401 +0100
+++ gmfsk-0.7pre1-fix-broken-includes/src/feld/feldtx.c	2015-12-18 23:50:47.676623933 +0100
@@ -25,7 +25,6 @@
 #include "trx.h"
 #include "feld.h"
 #include "snd.h"
-#include "filter.h"
 
 static gboolean dxmode = FALSE;
 
diff -pruN gmfsk-0.7pre1-modified/src/main.c gmfsk-0.7pre1-fix-broken-includes/src/main.c
--- gmfsk-0.7pre1-modified/src/main.c	2005-01-12 20:27:34.000000000 +0100
+++ gmfsk-0.7pre1-fix-broken-includes/src/main.c	2015-12-18 23:26:36.136830641 +0100
@@ -45,7 +45,6 @@
 #include "log.h"
 #include "ptt.h"
 #include "picture.h"
-#include "fft.h"
 #include "hamlib.h"
 #include "cwirc.h"
 #include "snd.h"
diff -pruN gmfsk-0.7pre1-modified/src/mfsk/mfsk.c gmfsk-0.7pre1-fix-broken-includes/src/mfsk/mfsk.c
--- gmfsk-0.7pre1-modified/src/mfsk/mfsk.c	2005-01-04 20:28:24.000000000 +0100
+++ gmfsk-0.7pre1-fix-broken-includes/src/mfsk/mfsk.c	2015-12-19 00:05:10.980015751 +0100
@@ -27,9 +27,6 @@
 
 #include "mfsk.h"
 #include "trx.h"
-#include "fft.h"
-#include "sfft.h"
-#include "filter.h"
 #include "interleave.h"
 #include "viterbi.h"
 
diff -pruN gmfsk-0.7pre1-modified/src/mfsk/mfsk.h gmfsk-0.7pre1-fix-broken-includes/src/mfsk/mfsk.h
--- gmfsk-0.7pre1-modified/src/mfsk/mfsk.h	2004-04-16 13:32:37.000000000 +0200
+++ gmfsk-0.7pre1-fix-broken-includes/src/mfsk/mfsk.h	2015-12-18 23:33:51.980645357 +0100
@@ -25,7 +25,7 @@
 #ifndef _MFSK_H
 #define _MFSK_H
 
-#include "cmplx.h"
+#include "cmplx_funcs.h"
 #include "trx.h"
 #include "viterbi.h"
 #include "interleave.h"
diff -pruN gmfsk-0.7pre1-modified/src/mfsk/mfskrx.c gmfsk-0.7pre1-fix-broken-includes/src/mfsk/mfskrx.c
--- gmfsk-0.7pre1-modified/src/mfsk/mfskrx.c	2015-12-19 00:03:58.866229401 +0100
+++ gmfsk-0.7pre1-fix-broken-includes/src/mfsk/mfskrx.c	2015-12-18 23:35:26.554663857 +0100
@@ -46,7 +46,6 @@ char *alloca ();
 #include <ctype.h>
 
 #include "mfsk.h"
-#include "filter.h"
 #include "sfft.h"
 #include "varicode.h"
 #include "picture.h"
diff -pruN gmfsk-0.7pre1-modified/src/mfsk/mfsktx.c gmfsk-0.7pre1-fix-broken-includes/src/mfsk/mfsktx.c
--- gmfsk-0.7pre1-modified/src/mfsk/mfsktx.c	2015-12-19 00:03:58.867229412 +0100
+++ gmfsk-0.7pre1-fix-broken-includes/src/mfsk/mfsktx.c	2015-12-18 23:35:30.642707902 +0100
@@ -37,7 +37,6 @@
 #include "interleave.h"
 #include "snd.h"
 #include "picture.h"
-#include "filter.h"
 #include "main.h"
 
 static inline complex mixer(struct trx *trx, complex in)
diff -pruN gmfsk-0.7pre1-modified/src/misc/cmplx_funcs.h gmfsk-0.7pre1-fix-broken-includes/src/misc/cmplx_funcs.h
--- gmfsk-0.7pre1-modified/src/misc/cmplx_funcs.h	1970-01-01 01:00:00.000000000 +0100
+++ gmfsk-0.7pre1-fix-broken-includes/src/misc/cmplx_funcs.h	2015-12-18 23:22:11.125859521 +0100
@@ -0,0 +1,100 @@
+/*
+ *    cmplx.h  --  Complex arithmetic
+ *
+ *    Copyright (C) 2001, 2002, 2003
+ *      Tomi Manninen (oh2bns@sral.fi)
+ *
+ *    This file is part of gMFSK.
+ *
+ *    gMFSK is free software; you can redistribute it and/or modify
+ *    it under the terms of the GNU General Public License as published by
+ *    the Free Software Foundation; either version 2 of the License, or
+ *    (at your option) any later version.
+ *
+ *    gMFSK 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 General Public License for more details.
+ *
+ *    You should have received a copy of the GNU General Public License
+ *    along with gMFSK; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#ifndef _COMPLEX_FUNCS_H
+#define _COMPLEX_FUNCS_H
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <glib.h>
+#include <math.h>
+
+#ifdef HAVE_DFFTW_H
+  #include <dfftw.h>
+#endif
+#ifdef HAVE_FFTW_H
+  #include <fftw.h>
+#endif
+
+typedef fftw_complex complex;
+
+/*
+ * Complex multiplication.
+ */
+extern __inline__ complex cmul(complex x, complex y);
+
+/*
+ * Complex addition.
+ */
+extern __inline__ complex cadd(complex x, complex y);
+
+/*
+ * Complex subtraction.
+ */
+extern __inline__ complex csub(complex x, complex y);
+
+/*
+ * Complex multiply-accumulate.
+ */
+extern __inline__ complex cmac(complex *a, complex *b, gint ptr, gint len);
+
+/*
+ * Complex ... yeah, what??? Returns a complex number that has the
+ * properties: |z| = |x| * |y|  and  arg(z) = arg(y) - arg(x)
+ */
+extern __inline__ complex ccor(complex x, complex y);
+
+/*
+ * Real part of the complex ???
+ */
+extern __inline__ double ccorI(complex x, complex y);
+
+/*
+ * Imaginary part of the complex ???
+ */
+extern __inline__ double ccorQ(complex x, complex y);
+
+/*
+ * Modulo (absolute value) of a complex number.
+ */
+extern __inline__ double cmod(complex x);
+
+/*
+ * Square of the absolute value (power).
+ */
+extern __inline__ double cpwr(complex x);
+
+/*
+ * Argument of a complex number.
+ */
+extern __inline__ double carg(complex x);
+
+/*
+ * Complex square root.
+ */
+extern __inline__ complex csqrt(complex x);
+
+#endif
diff -pruN gmfsk-0.7pre1-modified/src/misc/fftfilt.h gmfsk-0.7pre1-fix-broken-includes/src/misc/fftfilt.h
--- gmfsk-0.7pre1-modified/src/misc/fftfilt.h	2005-01-04 21:48:20.000000000 +0100
+++ gmfsk-0.7pre1-fix-broken-includes/src/misc/fftfilt.h	2015-12-18 23:31:12.132925821 +0100
@@ -27,7 +27,7 @@
 
 #include <glib.h>
 
-#include "cmplx.h"
+#include "cmplx_funcs.h"
 #include "fft.h"
 
 /* ---------------------------------------------------------------------- */
diff -pruN gmfsk-0.7pre1-modified/src/misc/fft.h gmfsk-0.7pre1-fix-broken-includes/src/misc/fft.h
--- gmfsk-0.7pre1-modified/src/misc/fft.h	2005-01-04 21:48:40.000000000 +0100
+++ gmfsk-0.7pre1-fix-broken-includes/src/misc/fft.h	2015-12-18 23:32:13.875589718 +0100
@@ -37,8 +37,6 @@
 #define	FFT_FWD	FFTW_FORWARD
 #define	FFT_REV	FFTW_BACKWARD
 
-#include "cmplx.h"
-
 struct fft {
 	gint len;
 	fftw_plan plan;
diff -pruN gmfsk-0.7pre1-modified/src/misc/misc.c gmfsk-0.7pre1-fix-broken-includes/src/misc/misc.c
--- gmfsk-0.7pre1-modified/src/misc/misc.c	2015-12-19 00:03:58.867229412 +0100
+++ gmfsk-0.7pre1-fix-broken-includes/src/misc/misc.c	2015-12-18 23:46:25.334780254 +0100
@@ -22,7 +22,10 @@
  *
  */
 
-#ifndef __OPTIMIZE__
+#include <glib.h>
+#include <math.h>
+
+//#ifndef __OPTIMIZE__
 
 /* ---------------------------------------------------------------------- */
 
@@ -100,6 +103,7 @@ guint8 rbits8(guint8 w)
 
 /* ---------------------------------------------------------------------- */
 
+#ifdef NEEDS_LOG2
 /*
  * Integer base-2 logarithm
  */
@@ -116,6 +120,7 @@ guint log2(guint x)
 
 	return y;
 }
+#endif
 
 /* ---------------------------------------------------------------------- */
 
@@ -183,4 +188,4 @@ gfloat decayavg(gfloat average, gfloat i
 
 /* ---------------------------------------------------------------------- */
 
-#endif				/* __OPTIMIZE__ */
+//#endif				/* __OPTIMIZE__ */
diff -pruN gmfsk-0.7pre1-modified/src/misc/sfft.h gmfsk-0.7pre1-fix-broken-includes/src/misc/sfft.h
--- gmfsk-0.7pre1-modified/src/misc/sfft.h	2005-01-04 22:08:17.000000000 +0100
+++ gmfsk-0.7pre1-fix-broken-includes/src/misc/sfft.h	2015-12-18 23:31:21.587027455 +0100
@@ -27,7 +27,7 @@
 
 #include <glib.h>
 
-#include "cmplx.h"
+#include "cmplx_funcs.h"
 
 struct sfft {
 	gint fftlen;
diff -pruN gmfsk-0.7pre1-modified/src/psk31/psk31.c gmfsk-0.7pre1-fix-broken-includes/src/psk31/psk31.c
--- gmfsk-0.7pre1-modified/src/psk31/psk31.c	2005-01-04 20:14:16.000000000 +0100
+++ gmfsk-0.7pre1-fix-broken-includes/src/psk31/psk31.c	2015-12-18 23:49:24.133717800 +0100
@@ -26,7 +26,6 @@
 #include <stdio.h>
 
 #include "psk31.h"
-#include "filter.h"
 #include "coeff.h"
 
 #define	K	5
diff -pruN gmfsk-0.7pre1-modified/src/psk31/psk31.h gmfsk-0.7pre1-fix-broken-includes/src/psk31/psk31.h
--- gmfsk-0.7pre1-modified/src/psk31/psk31.h	2004-02-08 20:09:28.000000000 +0100
+++ gmfsk-0.7pre1-fix-broken-includes/src/psk31/psk31.h	2015-12-18 23:48:19.776020109 +0100
@@ -25,7 +25,7 @@
 #ifndef _PSK31_H
 #define _PSK31_H
 
-#include "cmplx.h"
+#include "cmplx_funcs.h"
 #include "trx.h"
 #include "viterbi.h"
 
diff -pruN gmfsk-0.7pre1-modified/src/psk31/psk31rx.c gmfsk-0.7pre1-fix-broken-includes/src/psk31/psk31rx.c
--- gmfsk-0.7pre1-modified/src/psk31/psk31rx.c	2004-02-08 20:08:32.000000000 +0100
+++ gmfsk-0.7pre1-fix-broken-includes/src/psk31/psk31rx.c	2015-12-18 23:49:29.355774424 +0100
@@ -25,7 +25,6 @@
 #include <stdio.h>
 
 #include "psk31.h"
-#include "filter.h"
 #include "varicode.h"
 #include "coeff.h"
 
diff -pruN gmfsk-0.7pre1-modified/src/psk31/psk31tx.c gmfsk-0.7pre1-fix-broken-includes/src/psk31/psk31tx.c
--- gmfsk-0.7pre1-modified/src/psk31/psk31tx.c	2004-04-16 16:21:23.000000000 +0200
+++ gmfsk-0.7pre1-fix-broken-includes/src/psk31/psk31tx.c	2015-12-18 23:48:00.685813216 +0100
@@ -27,6 +27,7 @@
 #include "psk31.h"
 #include "varicode.h"
 #include "snd.h"
+#include "cmplx_funcs.h"
 
 static void send_symbol(struct trx *trx, int sym)
 {
diff -pruN gmfsk-0.7pre1-modified/src/rtty/rtty.c gmfsk-0.7pre1-fix-broken-includes/src/rtty/rtty.c
--- gmfsk-0.7pre1-modified/src/rtty/rtty.c	2005-01-04 20:14:58.000000000 +0100
+++ gmfsk-0.7pre1-fix-broken-includes/src/rtty/rtty.c	2015-12-18 23:41:02.247285547 +0100
@@ -28,7 +28,6 @@
 #include "trx.h"
 #include "rtty.h"
 #include "baudot.h"
-#include "filter.h"
 #include "fftfilt.h"
 
 static void rtty_txinit(struct trx *trx)
diff -pruN gmfsk-0.7pre1-modified/src/rtty/rtty.h gmfsk-0.7pre1-fix-broken-includes/src/rtty/rtty.h
--- gmfsk-0.7pre1-modified/src/rtty/rtty.h	2003-09-04 02:24:26.000000000 +0200
+++ gmfsk-0.7pre1-fix-broken-includes/src/rtty/rtty.h	2015-12-18 23:39:30.430293980 +0100
@@ -25,7 +25,6 @@
 #ifndef _RTTY_H
 #define _RTTY_H
 
-#include "cmplx.h"
 #include "trx.h"
 
 #define	SampleRate	8000
diff -pruN gmfsk-0.7pre1-modified/src/rtty/rttyrx.c gmfsk-0.7pre1-fix-broken-includes/src/rtty/rttyrx.c
--- gmfsk-0.7pre1-modified/src/rtty/rttyrx.c	2015-12-19 00:03:58.868229423 +0100
+++ gmfsk-0.7pre1-fix-broken-includes/src/rtty/rttyrx.c	2015-12-18 23:47:21.359387098 +0100
@@ -26,10 +26,10 @@
 
 #include "trx.h"
 #include "rtty.h"
-#include "filter.h"
 #include "fftfilt.h"
 #include "baudot.h"
 #include "rttypar.h"
+#include "cmplx_funcs.h"
 
 static double bbfilt(struct rtty *s, double in)
 {
diff -pruN gmfsk-0.7pre1-modified/src/rtty/rttytx.c gmfsk-0.7pre1-fix-broken-includes/src/rtty/rttytx.c
--- gmfsk-0.7pre1-modified/src/rtty/rttytx.c	2004-04-16 16:24:23.000000000 +0200
+++ gmfsk-0.7pre1-fix-broken-includes/src/rtty/rttytx.c	2015-12-18 23:39:02.114988338 +0100
@@ -22,6 +22,8 @@
  *
  */
 
+#include <math.h>
+
 #include "trx.h"
 #include "rtty.h"
 #include "snd.h"
diff -pruN gmfsk-0.7pre1-modified/src/throb/throb.c gmfsk-0.7pre1-fix-broken-includes/src/throb/throb.c
--- gmfsk-0.7pre1-modified/src/throb/throb.c	2015-12-19 00:03:58.869229434 +0100
+++ gmfsk-0.7pre1-fix-broken-includes/src/throb/throb.c	2015-12-18 23:53:30.618392715 +0100
@@ -27,7 +27,6 @@
 
 #include "trx.h"
 #include "throb.h"
-#include "filter.h"
 #include "fft.h"
 #include "tab.h"
 #include "fftfilt.h"
diff -pruN gmfsk-0.7pre1-modified/src/throb/throb.h gmfsk-0.7pre1-fix-broken-includes/src/throb/throb.h
--- gmfsk-0.7pre1-modified/src/throb/throb.h	2004-06-29 20:24:51.000000000 +0200
+++ gmfsk-0.7pre1-fix-broken-includes/src/throb/throb.h	2015-12-18 23:43:03.814599492 +0100
@@ -25,7 +25,7 @@
 #ifndef _THROB_H
 #define _THROB_H
 
-#include "cmplx.h"
+#include "cmplx_funcs.h"
 #include "trx.h"
 
 #define	SampleRate	8000
diff -pruN gmfsk-0.7pre1-modified/src/throb/throbrx.c gmfsk-0.7pre1-fix-broken-includes/src/throb/throbrx.c
--- gmfsk-0.7pre1-modified/src/throb/throbrx.c	2015-12-19 00:03:58.869229434 +0100
+++ gmfsk-0.7pre1-fix-broken-includes/src/throb/throbrx.c	2015-12-18 23:43:27.505855698 +0100
@@ -28,9 +28,9 @@
 #include "trx.h"
 #include "throb.h"
 #include "tab.h"
-#include "filter.h"
 #include "fft.h"
 #include "fftfilt.h"
+#include "cmplx_funcs.h"
 
 static inline complex mixer(struct trx *trx, complex in)
 {
