Index: libs/libsndfile/SConscript
===================================================================
--- libs/libsndfile/SConscript	(revision 1159)
+++ libs/libsndfile/SConscript	(working copy)
@@ -6,7 +6,7 @@
 
 sndfile_files = glob.glob('src/*.c') + glob.glob('src/GSM610/*.c') + glob.glob('src/G72x/*.c')
 
-Import('env install_prefix')
+Import('env install_prefix libraries')
 sndfile = env.Copy()
 
 domain = 'libsndfile'
@@ -24,6 +24,7 @@
     sndfile.Append(LINKFLAGS = "-framework CoreServices")
 
 sndfile = conf.Finish()
+sndfile.Merge ([libraries['flac']])
 
 libsndfile = sndfile.SharedLibrary('sndfile-ardour', sndfile_files)
 
Index: SConstruct
===================================================================
--- SConstruct	(revision 1159)
+++ SConstruct	(working copy)
@@ -37,6 +37,8 @@
     BoolOption('FFT_ANALYSIS', 'Include FFT analysis window', 0),
     BoolOption('FPU_OPTIMIZATION', 'Build runtime checked assembler code', 1),
     BoolOption('LIBLO', 'Compile with support for liblo library', 1),
+    ('LIBPATH', 'Additional library paths'),
+    ('INCLUDES', 'Additional include paths'),
     BoolOption('NLS', 'Set to turn on i18n support', 1),
     PathOption('PREFIX', 'Set the install "prefix"', '/usr/local'),
     BoolOption('SURFACES', 'Build support for control surfaces', 0),
@@ -53,6 +55,10 @@
 class LibraryInfo(Environment):
     def __init__(self,*args,**kw):
         Environment.__init__ (self,*args,**kw)
+	self.AppendUnique(
+	    INCLUDES = ARGUMENTS.get('INCLUDES', '').split(','),
+	    LIBPATH = ARGUMENTS.get('LIBPATH', '').split(',')
+	    )
     
     def Merge (self,others):
         for other in others: