come up and stay up
[ardour.git] / SConstruct
index 5a1440c619652406d3d34d356b358274c0051fbc..98d422cd8df736d1451c060dcad48a966b4b34ed 100644 (file)
@@ -28,7 +28,6 @@ opts.AddOptions(
     BoolOption('DEBUG', 'Set to build with debugging information and no optimizations', 0),
     PathOption('DESTDIR', 'Set the intermediate install "prefix"', '/'),
     BoolOption('DEVBUILD', 'Use shared libardour (developers only)', 0),
-    BoolOption('SIGCCVSBUILD', 'Use if building sigc++ with a new configure.ac (developers only)', 0),
     BoolOption('NLS', 'Set to turn on i18n support', 1),
     BoolOption('NOARCH', 'Do not use architecture-specific compilation flags', 0),
     PathOption('PREFIX', 'Set the install "prefix"', '/usr/local'),
@@ -38,7 +37,6 @@ opts.AddOptions(
     BoolOption('BUILD_SSE_OPTIMIZATIONS', 'Use our hand-written x86/SSE optimizations when possible (off by default)', 0)
   )
 
-
 #----------------------------------------------------------------------
 # a handy helper that provides a way to merge compile/link information
 # from multiple different "environments"
@@ -379,6 +377,11 @@ libraries['pango'].ParseConfig ('pkg-config --cflags --libs pango')
 libraries['libgnomecanvas2'] = LibraryInfo()
 libraries['libgnomecanvas2'].ParseConfig ('pkg-config --cflags --libs libgnomecanvas-2.0')
 
+libraries['glade2'] = LibraryInfo()
+libraries['glade2'].ParseConfig ('pkg-config --cflags --libs libglade-2.0')
+
+libraries['flowcanvas'] = LibraryInfo(LIBS='flowcanvas', LIBPATH='#/libs/flowcanvas', CPPPATH='#libs/flowcanvas')
+
 libraries['ardour'] = LibraryInfo (LIBS='ardour', LIBPATH='#libs/ardour', CPPPATH='#libs/ardour')
 libraries['midi++2'] = LibraryInfo (LIBS='midi++', LIBPATH='#libs/midi++2', CPPPATH='#libs/midi++2')
 libraries['pbd3']    = LibraryInfo (LIBS='pbd', LIBPATH='#libs/pbd3', CPPPATH='#libs/pbd3')
@@ -416,7 +419,10 @@ if env['SYSLIBS']:
 
     libraries['gtkmm2'] = LibraryInfo()
     libraries['gtkmm2'].ParseConfig ('pkg-config --cflags --libs gtkmm-2.0')
-
+    
+    libraries['libglademm'] = LibraryInfo()
+    libraries['libglademm'].ParseConfig ('pkg-config --cflags --libs libglademm-2.4')
+    
     libraries['soundtouch'] = LibraryInfo(LIBS='SoundTouch')
 
     coredirs = [
@@ -462,6 +468,9 @@ else:
     libraries['soundtouch'] = LibraryInfo(LIBS='soundtouch',
                                           LIBPATH='#libs/soundtouch',
                                           CPPPATH=['#libs', '#libs/soundtouch'])
+    libraries['libglademm'] = LibraryInfo(LIBS='libglademm',
+                                          LIBPATH='#libs/libglademm',
+                                          CPPPATH='#libs/libglademm')
 
     coredirs = [
         'libs/soundtouch',
@@ -482,9 +491,11 @@ else:
        'libs/gtkmm2/atk',
        'libs/gtkmm2/gdk',
        'libs/gtkmm2/gtk',
+        'libs/libglademm',
        'libs/libgnomecanvasmm',
+       'libs/flowcanvas',
         'libs/gtkmm2ext',
-        'gtk2_ardour',
+        'gtk2_ardour'
         ]
 
 opts.Save('scache.conf', env)
@@ -516,6 +527,20 @@ else:
 
 config_prefix = '$DESTDIR' + final_config_prefix
 
+
+# SCons should really do this for us
+
+conf = Configure (env)
+
+have_cxx = conf.TryAction (Action (env['CXX'] + ' --version'));
+if have_cxx[0] != 1:
+    print "This system has no functional C++ compiler. You cannot build Ardour from source without one."
+    exit (1);
+else:
+    print "Congratulations, you have a functioning C++ compiler."
+    
+env = conf.Finish()
+
 #
 # Compiler flags and other system-dependent stuff
 #
@@ -656,7 +681,7 @@ if env['NLS'] == 1:
     env.Append(CCFLAGS="-DENABLE_NLS")
 
 
-Export('env install_prefix final_prefix config_prefix final_config_prefix libraries i18n version')
+Export('env install_prefix final_prefix config_prefix final_config_prefix libraries i18n version subst_dict')
 
 #
 # the configuration file may be system dependent