From 10e8c9f53d6c801ea131bc154f69de6838d9deff Mon Sep 17 00:00:00 2001
From: Tim Mayberry <mojofunk@gmail.com>
Date: Tue, 15 Apr 2008 16:14:08 +1000
Subject: [PATCH] Use CheckPKGVersion to check for libcurl version supported by mootcher when building with FREESOUND=1

---
 SConstruct |   18 +++++++-----------
 1 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/SConstruct b/SConstruct
index a67d7dc..9287e8f 100644
--- a/SConstruct
+++ b/SConstruct
@@ -516,19 +516,15 @@ libraries['fftw3'] = LibraryInfo()
 libraries['fftw3'].ParseConfig('pkg-config --cflags --libs fftw3')
 
 if env['FREESOUND']:
-        #
-        # Check for curl header as well as the library
-        #
-
 	libraries['curl'] = LibraryInfo()
-
-	conf = Configure(libraries['curl'])
-
-	if conf.CheckHeader ('curl/curl.h') == False:
-		print ('Ardour cannot be compiled without the curl headers, which do not seem to be installed')
-		sys.exit (1)            
-	else:
+	conf = env.Configure(custom_tests = { 'CheckPKGVersion' : CheckPKGVersion })
+	
+	if conf.CheckPKGVersion ('libcurl', '7.14'):
 		libraries['curl'].ParseConfig('pkg-config --cflags --libs libcurl')
+	else:
+		print ('The FREESOUND option requires libcurl and development files to be installed')
+		sys.exit (1)            
+
 	conf.Finish()
 else:
 	print 'FREESOUND support is not enabled.  Build with \'scons FREESOUND=1\' to enable.'
-- 
1.5.4.1

