#define HasBSD44Sockets YES
#define HasZlib YES
+#if OSMajorVersion >= 5
+#define CppCmd /usr/bin/cpp -traditional
+#define PreProcessCmd /usr/bin/cpp -traditional
+#else
#define CppCmd /usr/libexec/cpp -traditional
#define PreProcessCmd /usr/libexec/cpp -traditional
+#endif
#undef InstallCmd
#define InstallCmd /usr/bin/install
#define HasMakefileSafeInclude YES
#define IncludeMakefile(file) @@# dependencies are in .depend
#define DependFileName .depend
+#if OSMajorVersion < 3
#if OSMinorVersion < 2
#ifndef ExtraLibraries
#define ExtraLibraries -lgnumalloc
#if OSTeenyVersion == 2
#define HasSetUserContext YES
#endif
+#endif
#ifndef ExtraLoadFlags
/*
* This doesn't work the way it does on every other system. On FreeBSD it's
#define imake_ccflags "-DNOSTDHDRS"
#endif
+#ifdef __FreeBSD__
+#include <sys/param.h>
+#if defined(__FreeBSD_version)
+#if __FreeBSD_version < 500000
+#define imake_ccflags "-DCPP_IN_LIBEXEC"
+#endif
+#else
+#define imake_ccflags "-DCPP_IN_LIBEXEC"
+#endif
+#endif
+
/* this is for OS/2 under EMX. This won't work with DOS */
#if defined(__EMX__)
#define imake_ccflags "-DBSD43"
#if defined(sun) && (defined(SVR4) || defined(__svr4__) || defined(__SVR4) || defined(__sol__))
#define DEFAULT_CPP "/usr/ccs/lib/cpp"
#endif
-#ifdef __bsdi__
+#if defined(__bsdi__) || (defined(__FreeBSD__) && !defined(CPP_IN_LIBEXEC))
#define DEFAULT_CPP "/usr/bin/cpp"
#endif
#ifdef __uxp__
#ifdef _CRAY
#define DEFAULT_CPP "/lib/pcpp"
#endif
-#if defined(__386BSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__)
+#if defined(__386BSD__) || defined(__NetBSD__) || defined(__OpenBSD__) \
+ || (defined(__FreeBSD__) && defined(CPP_IN_LIBEXEC))
#define DEFAULT_CPP "/usr/libexec/cpp"
#endif
#if defined(__sgi) && defined(__ANSI_CPP__)