modified automake_threaded