For swipl? The normal installation process on Unix installs $prefix/share/pkgconfig/swipl.pc. For package installation though you do not need that. pack_install/1 passes a number of environment variables to the build process that allows for simple abstract Makefiles:
PACKSODIRcontains the directory where you should put the shared objectSOEXThas the extension for shared objects for this platformLDSOFLAGSprovides the C flags to create a compatible shared objectSWISOLIBlinks to libswipl.so/dll/… if this is needed (notably ELF platforms do not
need this).
Here is a simple example:
SOBJ= $(PACKSODIR)/geoip4pl.$(SOEXT)
all: $(SOBJ)
OBJ= c/geoip4pl.o
$(SOBJ): $(OBJ)
mkdir -p $(PACKSODIR)
$(LD) $(LDSOFLAGS) -o $@ $(OBJ) $(SWISOLIB) -lGeoIP
check::
install::
clean:
rm -f $(OBJ)
distclean: clean
rm -f $(SOBJ)
For debugging purposes pack_install creates a shell script in the build location that sets the same variables, so you can run the compiler from any environment.