didn't use FVWM2_USE_GTK=YES. The problem is fixed by adding --without-gtk-prefix to CONFIGURE_ARGS if FVWM2_USE_GTK=NO.