moved ctdint to common.h, add lpthead to LDFLAGS