reusing code for sysconfig.