change detection system for liblo to use pkgconfig and test in only one place
[ardour.git] / wscript
diff --git a/wscript b/wscript
index 6f58ceb67a0489a370f73b25a8c5153906849845..d0e507cd86b7b1abf8f810a62fa233097c8daa69 100644 (file)
--- a/wscript
+++ b/wscript
@@ -413,7 +413,9 @@ def options(opt):
     opt.add_option('--boost-include', type='string', action='store', dest='boost_include', default='',
                     help='directory where Boost header files can be found')
     opt.add_option('--also-include', type='string', action='store', dest='also_include', default='',
-                    help='additional include directory where header files can be found')
+                    help='additional include directory where header files can be found (split multiples with commas)')
+    opt.add_option('--also-libdir', type='string', action='store', dest='also_libdir', default='',
+                    help='additional include directory where shared libraries can be found (split multiples with commas)')
     opt.add_option('--wine-include', type='string', action='store', dest='wine_include', default='/usr/include/wine/windows',
                     help='directory where Wine\'s Windows header files can be found')
     opt.add_option('--noconfirm', action='store_true', default=False, dest='noconfirm',
@@ -473,6 +475,10 @@ def configure(conf):
         conf.define ('TOP_MENUBAR',1)
         conf.define ('GTKOSX',1)
 
+        #
+        # need this on OS X to pick up long long variants of several math functions
+        #
+
         conf.env.append_value('CXXFLAGS_APPLEUTILITY', '-I../libs')
         #
         #       Define OSX as a uselib to use when compiling
@@ -527,6 +533,9 @@ def configure(conf):
         conf.env.append_value('CXXFLAGS', '-I' + Options.options.also_include)
         conf.env.append_value('CFLAGS', '-I' + Options.options.also_include)
 
+    if Options.options.also_libdir != '':
+        conf.env.append_value('LDFLAGS', '-L' + Options.options.also_libdir)
+
     autowaf.check_header(conf, 'cxx', 'boost/signals2.hpp', mandatory = True)
 
     if Options.options.boost_sp_debug:
@@ -547,6 +556,7 @@ def configure(conf):
     autowaf.check_pkg(conf, 'glibmm-2.4', uselib_store='GLIBMM', atleast_version='2.14.0')
     autowaf.check_pkg(conf, 'sndfile', uselib_store='SNDFILE', atleast_version='1.0.18')
     autowaf.check_pkg(conf, 'giomm-2.4', uselib_store='GIOMM', atleast_version='2.2')
+    autowaf.check_pkg(conf, 'libcurl', uselib_store='CURL', atleast_version='7.0.0')
 
     for i in children:
         sub_config_and_use(conf, i)
@@ -555,7 +565,6 @@ def configure(conf):
     conf.env['INCLUDES_FLAC'] = []
 
     conf.check_cc(function_name='dlopen', header_name='dlfcn.h', linkflags='-ldl', uselib_store='DL')
-    conf.check_cc(function_name='curl_global_init', header_name='curl/curl.h', linkflags='-lcurl', uselib_store='CURL')
 
     # Tell everyone that this is a waf build