56
56
"src/clients/lib/xmmsclient-ecore",
57
57
"src/clients/lib/xmmsclient++",
58
58
"src/clients/lib/xmmsclient++-glib",
59
"src/clients/lib/xmmsclient-cf",
59
60
"src/clients/lib/python",
60
61
"src/clients/lib/perl",
61
"src/clients/lib/ruby"]
62
"src/clients/lib/ruby",
63
65
all_optionals = sets.Set([os.path.basename(o) for o in optional_subdirs])
64
66
all_plugins = sets.Set([p for p in os.listdir("src/plugins")
207
209
Params.pprint('BLUE', ", ".join(disabled_plugins))
209
211
def configure(conf):
212
if os.environ.has_key('PKG_CONFIG_PREFIX'):
213
prefix = os.environ['PKG_CONFIG_PREFIX']
214
if not os.path.isabs(prefix):
215
prefix = os.path.abspath(prefix)
216
conf.env['PKG_CONFIG_DEFINES'] = {'prefix':prefix}
210
218
conf.env["BUILD_XMMS2D"] = False
211
219
if not Params.g_options.without_xmms2d == True:
212
220
conf.env["BUILD_XMMS2D"] = True
226
234
conf.check_tool('pkgconfig', tooldir=os.path.abspath('waftools'))
227
235
conf.check_tool('man', tooldir=os.path.abspath('waftools'))
237
if conf.check_tool('winres'):
238
conf.env['WINRCFLAGS'] = '-I' + os.path.abspath('pixmaps')
239
conf.env['xmms_icon'] = True
241
conf.env['xmms_icon'] = False
243
if Params.g_options.target_platform:
244
Params.g_platform = Params.g_options.target_platform
229
246
conf.env["VERSION"] = VERSION
230
247
conf.env["CCFLAGS"] = Utils.to_list(conf.env["CCFLAGS"]) + ['-g', '-O0']
231
248
conf.env["CXXFLAGS"] = Utils.to_list(conf.env["CXXFLAGS"]) + ['-g', '-O0']
235
252
conf.env['CCDEFINES'] += ["XMMS_VERSION=\"\\\"%s\\\"\"" % VERSION]
236
253
conf.env['CXXDEFINES'] += ["XMMS_VERSION=\"\\\"%s\\\"\"" % VERSION]
255
if Params.g_options.libdir:
256
conf.env["LIBDIR"] = Params.g_options.libdir
257
conf.env["shlib_INST_DIR"] = ""
258
conf.env["shlib_INST_VAR"] = "LIBDIR"
238
260
if Params.g_options.config_prefix:
239
conf.env["LIBPATH"] += [os.path.join(Params.g_options.config_prefix, "lib")]
240
include = [os.path.join(Params.g_options.config_prefix, "include")]
241
conf.env['CPPPATH'] += include
243
conf.env["LINKFLAGS_xlibs"] += ['-install_name %s%s%s' % (os.path.join(conf.env["PREFIX"], 'lib', conf.env["shlib_PREFIX"]), '%s', conf.env["shlib_SUFFIX"])]
261
for dir in Params.g_options.config_prefix:
262
if not os.path.isabs(dir):
263
dir = os.path.abspath(dir)
264
conf.env.prepend_value("LIBPATH", os.path.join(dir, "lib"))
265
conf.env.prepend_value("CPPPATH", os.path.join(dir, "include"))
245
267
# Our static libraries may link to dynamic libraries
246
conf.env["staticlib_CCFLAGS"] += ['-fPIC', '-DPIC']
268
if Params.g_platform != 'win32':
269
conf.env["staticlib_CCFLAGS"] += ['-fPIC', '-DPIC']
271
# As we have to change target platform after the tools
272
# have been loaded there are a few variables that needs
273
# to be initiated if building for win32.
275
# Make sure we don't have -fPIC and/or -DPIC in our CCFLAGS
276
conf.env["shlib_CCFLAGS"] = []
277
conf.env['plugin_CCFLAGS'] = []
279
# Setup various prefixes
280
conf.env["shlib_SUFFIX"] = '.dll'
281
conf.env['plugin_SUFFIX'] = '.dll'
282
conf.env['program_SUFFIX'] = '.exe'
284
# Add some specific OSX things
285
if Params.g_platform == 'darwin':
286
conf.env["LINKFLAGS"] += ['-multiply_defined suppress']
287
conf.env["explicit_install_name"] = True
289
conf.env["explicit_install_name"] = False
248
291
# Check for support for the generic platform
249
292
has_platform_support = os.name in ('nt', 'posix')
255
298
conf.check_tool('checks')
257
300
# Check sunOS socket support
258
if sys.platform == 'sunos5':
301
if Params.g_platform == 'sunos5':
259
302
if not conf.check_library2("socket", uselib='socket'):
260
303
Params.fatal("xmms2 requires libsocket on Solaris.")
261
304
conf.env.append_unique('CCFLAGS', '-D_POSIX_PTHREAD_SEMANTICS')
262
305
conf.env.append_unique('CCFLAGS', '-D_REENTRANT')
306
conf.env['socket_impl'] = 'socket'
264
307
# Check win32 (winsock2) socket support
265
if sys.platform == 'win32':
308
elif Params.g_platform == 'win32':
266
309
if not conf.check_library2("wsock32", uselib='socket'):
267
310
Params.fatal("xmms2 requires wsock32 on windows.")
268
311
conf.env.append_unique('LIB_socket', 'ws2_32')
312
conf.env['socket_impl'] = 'wsock32'
313
# Default POSIX sockets
315
conf.env['socket_impl'] = 'posix'
270
317
# Glib is required by everyone, so check for it here and let them
271
318
# assume its presence.
302
351
type="string", dest="enable_optionals")
303
352
opt.add_option('--without-optionals', action="callback", callback=_list_cb,
304
353
type="string", dest="disable_optionals")
305
opt.add_option('--conf-prefix', type='string', dest='config_prefix')
354
opt.add_option('--conf-prefix', action="callback", callback=_list_cb,
355
type='string', dest='config_prefix')
306
356
opt.add_option('--without-xmms2d', type='int', dest='without_xmms2d')
307
357
opt.add_option('--with-mandir', type='string', dest='manualdir')
358
opt.add_option('--with-libdir', type='string', dest='libdir')
359
opt.add_option('--with-target-platform', type='string',
360
dest='target_platform')
309
362
for o in optional_subdirs + subdirs:
310
363
opt.sub_options(o)