share the main configure and remove temp files