
# readline (old UI)

Import('*')

for p in ['', 'readline/']:
	out = conf.CheckLibWithHeader('readline', ['stdio.h', 'stdlib.h', '%sreadline.h' % p], 'C', 'rl_initialize();', 0)
	defines['HAVE_%sREADLINE_H' % p.upper().replace('/', '_')] = out
	defines['HAVE_READLINE'] = out
	if out:
		libs.append('readline')
		break

for f in ['rl_set_prompt', 'rl_filename_completion_function', 'rl_get_screen_size', 'rl_set_key', 'rl_bind_key_in_map']:
	defines['HAVE_%s' % f.upper()] = conf.CheckLib('readline', f, None, None, 0)

Return('out')

# vim:ts=4:sts=4:sw=4:syntax=python
