summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README10
-rw-r--r--SConstruct12
-rw-r--r--util/file_allocator.h3
3 files changed, 25 insertions, 0 deletions
diff --git a/README b/README
index 700f44fedf2..a47c0708c46 100644
--- a/README
+++ b/README
@@ -77,3 +77,13 @@ COMPILING
db\db run
+--- ubuntu ---
+ scons libboost-dev libpcre++-dev libmozjs-dev
+
+--- FreeBSD ---
+
+Install the following ports:
+ - devel/boost
+ - devel/libexecinfo
+ - devel/pcre
+ - lang/spidermonkey
diff --git a/SConstruct b/SConstruct
index 9dc2a06bdd3..dc1ab08c96d 100644
--- a/SConstruct
+++ b/SConstruct
@@ -317,6 +317,13 @@ elif "sunos5" == os.sys.platform:
env.Append( CPPDEFINES=[ "__linux__" , "__sunos__" ] )
env.Append( LIBS=["socket"] )
+elif "freebsd7" == os.sys.platform:
+ nix = True
+ freebsd = True
+ env.Append( CPPPATH=[ "/usr/local/include" ] )
+ env.Append( LIBPATH=[ "/usr/local/lib" ] )
+ env.Append( CPPDEFINES=[ "__freebsd__" ] )
+
elif "win32" == os.sys.platform:
windows = True
boostDir = "C:/Program Files/Boost/boost_1_35_0"
@@ -580,6 +587,11 @@ def doConfigure( myenv , needJava=True , needPcre=True , shell=False ):
if linux:
myCheckLib( "rt" , True )
+ # requires ports devel/libexecinfo to be installed
+ if freebsd:
+ myCheckLib( "execinfo", True )
+ env.Append( LIBS=[ "execinfo" ] )
+
# this will add it iff it exists and works
myCheckLib( "boost_system-mt" )
diff --git a/util/file_allocator.h b/util/file_allocator.h
index f3735a45dff..fdc25a3072e 100644
--- a/util/file_allocator.h
+++ b/util/file_allocator.h
@@ -17,6 +17,9 @@
#include "../stdafx.h"
#include <fcntl.h>
#include <errno.h>
+#if defined(__freebsd__)
+#include <sys/stat.h>
+#endif
#ifndef O_NOATIME
#define O_NOATIME 0