If so, use it. Otherwise, check if -lpthread works. If so, us it. Otherwise, print an error and fail.