# I have installed gegl in a local directory
ls /home/username/local-gegl/lib/pkgconfig
gegl-0.3.pc gegl-sc-0.3.pc
# I set the environment variable PKG_CONF_PATH correctly
export $PKG_CONFIG_PATH=/home/username/local-gegl/lib/pkgconfig/
# The command pkg-config also works as expected
pkg-config --cflags --libs gegl-0.3
-pthread -I/home/username/local-babl/include/babl-0.1 -I/home/username/local-gegl/include/gegl-0.3 -I/usr/include/json-glib-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -L/home/username/local-babl/lib -L/home/username/local-gegl/lib -lgegl-0.3 -lgegl-npd-0.3 -lm -Wl,--export-dynamic -lgmodule-2.0 -pthread -ljson-glib-1.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lbabl-0.1
# But the problem is the ./configure script could not find gegl
# Error: GIMP configuration failed.
# - Error: missing dependency gegl
# *** Could not find gegl in your PATH.