in configure, relative paths caused problems

I was using $0 to for hashing the configure file
but $0 gives a relative path which is useless after
the scripted has changed directory.