-d tests the folder which is existing but with .in file, so I prefered the -f to test if the gst file was available which is not the case, so it fallbacks on the pkg-config Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/766>