help='tag release in git at the same time',
type='string', action='store', dest='TAG_RELEASE')
-#
-# Determine the standard libpath for the used compiler,
-# so we can later use that to filter out these standard
-# library paths when some tools like cups-config or
-# python-config report standard lib paths with their
-# ldflags (-L...)
-#
-def get_cc_std_libpath(cc):
- # at least gcc and clang support this:
- try:
- cmd = cc + ['-print-search-dirs']
- out = Utils.cmd_output(cmd).split('\n')
- except ValueError:
- # option not supported by compiler - use a standard list of directories
- dirlist = [ '/usr/lib', '/usr/lib64' ]
- except:
- raise Utils.WafError('Unexpected error running "%s"' % (cmd,))
- else:
- dirlist = []
- for line in out:
- line = line.strip()
- if line.startswith("libraries: ="):
- dirliststr = line[len("libraries: ="):]
- dirlist = [ os.path.normpath(x) for x in dirliststr.split(':') ]
- break
-
- return dirlist
@wafsamba.runonce
def configure(conf):
conf.check_tool('compiler_cc')
- conf.env.STANDARD_LIBPATH = get_cc_std_libpath(conf.env.CC)
-
# we need git for 'waf dist'
conf.find_program('git', var='GIT')