diff --git a/configure b/configure
index 1c65b536d5113cc70b13689709d2b11c8cdced8f..1704fc30af46b92482384cb25e066b06d246b3fa 100755
--- a/configure
+++ b/configure
@@ -5841,7 +5841,8 @@ enabled fontconfig        && enable libfontconfig
 enabled libfontconfig     && require_pkg_config fontconfig "fontconfig/fontconfig.h" FcInit
 enabled libfreetype       && require_pkg_config freetype2 "ft2build.h FT_FREETYPE_H" FT_Init_FreeType
 enabled libfribidi        && require_pkg_config fribidi fribidi.h fribidi_version_info
-enabled libgme            && require  libgme gme/gme.h gme_new_emu -lgme -lstdc++
+enabled libgme            && { use_pkg_config libgme gme/gme.h gme_new_emu ||
+                               require libgme gme/gme.h gme_new_emu -lgme -lstdc++; }
 enabled libgsm            && { for gsm_hdr in "gsm.h" "gsm/gsm.h"; do
                                    check_lib libgsm "${gsm_hdr}" gsm_create -lgsm && break;
                                done || die "ERROR: libgsm not found"; }