+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h> /* for htonl on FreeBSD */
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h> /* for htonl on Linux/Solaris */
+#endif
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h> /* for htonl on Solaris */
+#endif
+#ifdef HAVE_STDINT_H
+#include <stdint.h> /* Standard ints on Linux */
+#endif
+#ifdef HAVE_ASSERT_H
+#include <assert.h>
+#endif
+
+
+#ifdef HAVE_FFTW
+#include <rfftw.h>
+#include <fftw.h>
+#define HAVE_FFT 1
+#endif
+
+#ifdef HAVE_MPI
+#include "mpi++.h"
+#include "mpiworld.h"
+#endif
+
+#include "ctsupport.h"
+#include "interpolator.h"
+#include "fnetorderstream.h"
+
+#ifdef HAVE_SGP
+ #include "ezplot.h"
+ #include "sgp.h"
+#endif