configure: add enable_weak and disable_weak