initial checkin of freesound integration
authorBen Loftis <ben@glw.com>
Mon, 24 Mar 2008 00:20:21 +0000 (00:20 +0000)
committerBen Loftis <ben@glw.com>
Mon, 24 Mar 2008 00:20:21 +0000 (00:20 +0000)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3169 d708f5d6-7413-0410-9779-e7cbd77b26cf

SConstruct

index bfec57a5fc2627a4eb4ce617c1b3922600619596..173985251db9733b223a3f96dc4257ac84dcf062 100644 (file)
@@ -40,6 +40,7 @@ opts.AddOptions(
     BoolOption('DMALLOC', 'Compile and link using the dmalloc library', 0),
     BoolOption('EXTRA_WARN', 'Compile with -Wextra, -ansi, and -pedantic.  Might break compilation.  For pedants', 0),
     BoolOption('FFT_ANALYSIS', 'Include FFT analysis window', 1),
+    BoolOption('FREESOUND', 'Include Freesound database lookup', 0),
     BoolOption('FPU_OPTIMIZATION', 'Build runtime checked assembler code', 1),
     BoolOption('LIBLO', 'Compile with support for liblo library', 1),
     BoolOption('NLS', 'Set to turn on i18n support', 1),
@@ -518,6 +519,9 @@ if conf.CheckPKGExists ('fftw3'):
     libraries['fftw3'] = LibraryInfo()
     libraries['fftw3'].ParseConfig('pkg-config --cflags --libs fftw3')
 
+libraries['curl'] = LibraryInfo()
+libraries['curl'].ParseConfig('pkg-config --cflags --libs libcurl')
+
 env = conf.Finish ()
 
 if env['FFT_ANALYSIS']:
@@ -532,6 +536,18 @@ if env['FFT_ANALYSIS']:
             sys.exit (1)            
         conf.Finish()
 
+if env['FREESOUND']:
+        #
+        # Check for curl header as well as the library
+        #
+
+        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)            
+        conf.Finish()
+
 if env['LV2']:
        conf = env.Configure(custom_tests = { 'CheckPKGExists' : CheckPKGExists })