replace unsafe calls with autotools ecalss ones