AM_PATH_GPGME_PTHREAD does not seem to be ready for the transion to gpgrt.
Afaict it tries to invoke gpgrt-config ... gpgme --thread=pthread
which gpgrt rejects, since --thread is not a valid option.
Texinfo docs says
AM_PATH_GPGME_PTHREAD checks for the version of GPGME that can be used with the native pthread implementation, and defines GPGME_PTHREAD_CFLAGS and GPGME_PTHREAD_LIBS. Since version 1.8.0 this is no longer required to GPGME_PTHREAD as GPGME itself is thread safe.
I guess the latter sentence should read "Since version 1.8.0 it is no longer necessary to use AM_PATH_GPGME_PTHREAD as GPGME itself is thread safe, and regular AM_PATH_GPGME can be used instead."
Assuming my guess is correct, and given that 1.8.0 was released more than 6 years ago it should be safe to either make AM_PATH_GPGME_PTHREAD a synonym for AM_PATH_GPGME (perhaps with deprecation warning?) or drop it altogether.