autotoolize and include gettid wrapper

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

Signed-off-by: You-Sheng Yang <vicamo@gmail.com>