I see that
Yes that is the advantage of waf it is in Python so you can get the data from anywhere so you can read using Python libraries.
However waf has done the work for you form the ApiDocs there is the add_os_flags on a Configure object which reads an OS environment variables into the env dictionary in a Configure object
def configure(conf): conf.add_os_flags('CFLAGS')
I would note that it might be better to have the data in the build and not in external variables and use command line options to the process. The reason for this is to allow the project to be easily moved to another environment and it will work without having to set extra things that might be forgotten. IN other words keep the configuration together in one place and not spread over several places.