Improve configure checks. Closes #10
* Actually use the result of boost headers check * Enable boost tool options * If required libraries are not installed, don't build gladish but still build the non-gui parts.
This commit is contained in:
parent
0d1ac13dd3
commit
8c06cbb5ff
4
INSTALL
4
INSTALL
|
@ -6,12 +6,14 @@ Requirements (tools, headers and libraries):
|
||||||
* You need dbus (1.2.16 should work)
|
* You need dbus (1.2.16 should work)
|
||||||
* You need libuuid from e2fsprogs (1.40.2 should work)
|
* You need libuuid from e2fsprogs (1.40.2 should work)
|
||||||
* You need the expat XML parser (2.0.1 should work)
|
* You need the expat XML parser (2.0.1 should work)
|
||||||
|
* Python (for ladish_control and LADI Tools)
|
||||||
|
|
||||||
|
Optional requirements, without them GUI frontend will not be built:
|
||||||
* You need glib (2.20.3 should work)
|
* You need glib (2.20.3 should work)
|
||||||
* You need dbus-glib (0.74 should work)
|
* You need dbus-glib (0.74 should work)
|
||||||
* You need gtk+ (2.12.1 should work)
|
* You need gtk+ (2.12.1 should work)
|
||||||
* You need libglade (2.6.2 should work)
|
* You need libglade (2.6.2 should work)
|
||||||
* You need flowcanvas (svn revision 2186 or later should work, included in tarball)
|
* You need flowcanvas (svn revision 2186 or later should work, included in tarball)
|
||||||
* Python (for ladish_control and LADI Tools)
|
|
||||||
|
|
||||||
===================================================
|
===================================================
|
||||||
|
|
||||||
|
|
129
wscript
129
wscript
|
@ -37,6 +37,7 @@ def yesno(bool):
|
||||||
def set_options(opt):
|
def set_options(opt):
|
||||||
opt.tool_options('compiler_cc')
|
opt.tool_options('compiler_cc')
|
||||||
opt.tool_options('compiler_cxx')
|
opt.tool_options('compiler_cxx')
|
||||||
|
opt.tool_options('boost')
|
||||||
opt.add_option('--enable-pkg-config-dbus-service-dir', action='store_true', default=False, help='force D-Bus service install dir to be one returned by pkg-config')
|
opt.add_option('--enable-pkg-config-dbus-service-dir', action='store_true', default=False, help='force D-Bus service install dir to be one returned by pkg-config')
|
||||||
opt.add_option('--enable-liblash', action='store_true', default=False, help='Build LASH compatibility library')
|
opt.add_option('--enable-liblash', action='store_true', default=False, help='Build LASH compatibility library')
|
||||||
|
|
||||||
|
@ -47,6 +48,7 @@ def add_cflag(conf, flag):
|
||||||
def configure(conf):
|
def configure(conf):
|
||||||
conf.check_tool('compiler_cc')
|
conf.check_tool('compiler_cc')
|
||||||
conf.check_tool('compiler_cxx')
|
conf.check_tool('compiler_cxx')
|
||||||
|
conf.check_tool('boost')
|
||||||
|
|
||||||
conf.check_cfg(
|
conf.check_cfg(
|
||||||
package = 'dbus-1',
|
package = 'dbus-1',
|
||||||
|
@ -80,41 +82,50 @@ def configure(conf):
|
||||||
if conf.is_defined('HAVE_EXPAT'):
|
if conf.is_defined('HAVE_EXPAT'):
|
||||||
conf.env['LIB_EXPAT'] = ['expat']
|
conf.env['LIB_EXPAT'] = ['expat']
|
||||||
|
|
||||||
conf.check_cfg(
|
build_gui = True
|
||||||
|
|
||||||
|
if build_gui and not conf.check_cfg(
|
||||||
package = 'glib-2.0',
|
package = 'glib-2.0',
|
||||||
mandatory = True,
|
mandatory = False,
|
||||||
errmsg = "not installed, see http://www.gtk.org/",
|
errmsg = "not installed, see http://www.gtk.org/",
|
||||||
args = '--cflags --libs')
|
args = '--cflags --libs'):
|
||||||
|
build_gui = False
|
||||||
|
|
||||||
conf.check_cfg(
|
if build_gui and not conf.check_cfg(
|
||||||
package = 'dbus-glib-1',
|
package = 'dbus-glib-1',
|
||||||
mandatory = True,
|
mandatory = False,
|
||||||
errmsg = "not installed, see http://dbus.freedesktop.org/",
|
errmsg = "not installed, see http://dbus.freedesktop.org/",
|
||||||
args = '--cflags --libs')
|
args = '--cflags --libs'):
|
||||||
|
build_gui = False
|
||||||
|
|
||||||
conf.check_cfg(
|
if build_gui and not conf.check_cfg(
|
||||||
package = 'gtk+-2.0',
|
package = 'gtk+-2.0',
|
||||||
mandatory = True,
|
mandatory = False,
|
||||||
errmsg = "not installed, see http://www.gtk.org/",
|
errmsg = "not installed, see http://www.gtk.org/",
|
||||||
args = '--cflags --libs')
|
args = '--cflags --libs'):
|
||||||
|
build_gui = False
|
||||||
|
|
||||||
conf.check_cfg(
|
if build_gui and not conf.check_cfg(
|
||||||
package = 'libglade-2.0',
|
package = 'libglade-2.0',
|
||||||
mandatory = True,
|
mandatory = False,
|
||||||
errmsg = "not installed, see http://ftp.gnome.org/pub/GNOME/sources/libglade/",
|
errmsg = "not installed, see http://ftp.gnome.org/pub/GNOME/sources/libglade/",
|
||||||
args = '--cflags --libs')
|
args = '--cflags --libs'):
|
||||||
|
build_gui = False
|
||||||
|
|
||||||
conf.check_cfg(
|
if build_gui and not conf.check_cfg(
|
||||||
package = 'flowcanvas',
|
package = 'flowcanvas',
|
||||||
mandatory = True,
|
mandatory = False,
|
||||||
atleast_version = '0.4.0',
|
atleast_version = '0.5.3',
|
||||||
errmsg = "not installed, see http://drobilla.net/software/flowcanvas/",
|
errmsg = "not installed, see http://drobilla.net/software/flowcanvas/",
|
||||||
args = '--cflags --libs')
|
args = '--cflags --libs'):
|
||||||
|
build_gui = False
|
||||||
|
|
||||||
# We need the boost headers package (e.g. libboost-dev)
|
if build_gui:
|
||||||
# shared_ptr.hpp and weak_ptr.hpp
|
# We need the boost headers package (e.g. libboost-dev)
|
||||||
conf.check_tool('boost')
|
# shared_ptr.hpp and weak_ptr.hpp
|
||||||
conf.check_boost()
|
build_gui = conf.check_boost(errmsg="not found, see http://boost.org/")
|
||||||
|
|
||||||
|
conf.env['BUILD_GLADISH'] = build_gui
|
||||||
|
|
||||||
add_cflag(conf, '-g')
|
add_cflag(conf, '-g')
|
||||||
add_cflag(conf, '-Wall')
|
add_cflag(conf, '-Wall')
|
||||||
|
@ -146,6 +157,7 @@ def configure(conf):
|
||||||
display_msg(conf)
|
display_msg(conf)
|
||||||
display_msg(conf, "Install prefix", conf.env['PREFIX'], 'CYAN')
|
display_msg(conf, "Install prefix", conf.env['PREFIX'], 'CYAN')
|
||||||
|
|
||||||
|
display_msg(conf, 'Build gladish', yesno(conf.env['BUILD_GLADISH']))
|
||||||
display_msg(conf, 'Build liblash', yesno(Options.options.enable_liblash))
|
display_msg(conf, 'Build liblash', yesno(Options.options.enable_liblash))
|
||||||
|
|
||||||
if conf.env['DBUS_SERVICES_DIR'] != conf.env['DBUS_SERVICES_DIR_REAL']:
|
if conf.env['DBUS_SERVICES_DIR'] != conf.env['DBUS_SERVICES_DIR_REAL']:
|
||||||
|
@ -262,48 +274,49 @@ def build(bld):
|
||||||
|
|
||||||
#####################################################
|
#####################################################
|
||||||
# gladish
|
# gladish
|
||||||
gladish = bld.new_task_gen('cxx', 'program')
|
if bld.env['BUILD_GLADISH']:
|
||||||
gladish.features.append('cc')
|
gladish = bld.new_task_gen('cxx', 'program')
|
||||||
gladish.target = 'gladish'
|
gladish.features.append('cc')
|
||||||
gladish.defines = ['DEBUG_OUTPUT_TERMINAL']
|
gladish.target = 'gladish'
|
||||||
gladish.includes = "build/default" # XXX config.h version.h and other generated files
|
gladish.defines = ['DEBUG_OUTPUT_TERMINAL']
|
||||||
gladish.uselib = 'DBUS-1 DBUS-GLIB-1 LIBGLADE-2.0 FLOWCANVAS'
|
gladish.includes = "build/default" # XXX config.h version.h and other generated files
|
||||||
|
gladish.uselib = 'DBUS-1 DBUS-GLIB-1 LIBGLADE-2.0 FLOWCANVAS'
|
||||||
|
|
||||||
gladish.source = [
|
gladish.source = [
|
||||||
'jack_proxy.c',
|
'jack_proxy.c',
|
||||||
'graph_proxy.c',
|
'graph_proxy.c',
|
||||||
'studio_proxy.c',
|
'studio_proxy.c',
|
||||||
'catdup.c',
|
'catdup.c',
|
||||||
]
|
]
|
||||||
|
|
||||||
for source in [
|
for source in [
|
||||||
'main.c',
|
'main.c',
|
||||||
#'lash_client.cpp',
|
#'lash_client.cpp',
|
||||||
#'lash_proxy.cpp',
|
#'lash_proxy.cpp',
|
||||||
#'load_projects_dialog.cpp',
|
#'load_projects_dialog.cpp',
|
||||||
#'project.cpp',
|
#'project.cpp',
|
||||||
'world_tree.c',
|
'world_tree.c',
|
||||||
'graph_view.c',
|
'graph_view.c',
|
||||||
#'project_properties.cpp',
|
#'project_properties.cpp',
|
||||||
#'session.cpp',
|
#'session.cpp',
|
||||||
#'a2j_proxy.cpp',
|
#'a2j_proxy.cpp',
|
||||||
'dbus_helpers.c',
|
'dbus_helpers.c',
|
||||||
'canvas.cpp',
|
'canvas.cpp',
|
||||||
'graph_canvas.c',
|
'graph_canvas.c',
|
||||||
'glade.c',
|
'glade.c',
|
||||||
'control_proxy.c',
|
'control_proxy.c',
|
||||||
'ask_dialog.c',
|
'ask_dialog.c',
|
||||||
]:
|
]:
|
||||||
gladish.source.append(os.path.join("gui", source))
|
gladish.source.append(os.path.join("gui", source))
|
||||||
|
|
||||||
for source in [
|
for source in [
|
||||||
'method.c',
|
'method.c',
|
||||||
'helpers.c',
|
'helpers.c',
|
||||||
]:
|
]:
|
||||||
gladish.source.append(os.path.join("dbus", source))
|
gladish.source.append(os.path.join("dbus", source))
|
||||||
|
|
||||||
# Glade UI definitions (XML)
|
# Glade UI definitions (XML)
|
||||||
bld.install_files(bld.env['DATA_DIR'], 'gui/gui.glade')
|
bld.install_files(bld.env['DATA_DIR'], 'gui/gui.glade')
|
||||||
|
|
||||||
bld.install_files('${PREFIX}/bin', 'ladish_control', chmod=0755)
|
bld.install_files('${PREFIX}/bin', 'ladish_control', chmod=0755)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue