autotoolize and include gettid wrapper

Signed-off-by: You-Sheng Yang (楊有勝) <vicamo@gmail.com>