KDEmultimedia and pthread first checks whether PTHREAD_LIBS == -pthread, if so it sets a magic value and breaks otherwise checks for various flavours of -lpthread, -lpthreads etc. if the magic value was found found, forget anything else repeat the full process to complete the mess