GPrologsupports Mac OS X (Darwin) and the installer for Mac OS X Leopard is installed. And here you can read how to call gprolog from C (read also this ). Then, instead of using, gplcyou can use it gcc, provided that you add the correct parameters for the binding, which may be a bit of the “tricks” you can find; so you can create object files with gplcand then glue everything together ...
About YAP:
1) Usually a package with autoconf compiles simply with the following "sequence" of commands
./configure
make
make install , . dir ARCH (ARCH.?) (, ../configure ./configure).
configure script , . , , LIBDIR YAPLIBDIR.
, tarball (.tar.gz ), , , tar -xzf Yap-5.1.3.tar.gz, GNU/Linux, tar Mac OS X...
./configure --help , , , .
( ;))
mkdir ARCH.
cd ARCH.
../configure
... , . Makefile,
LIBDIR=$(EROOTDIR)/lib
YAPLIBDIR=$(EROOTDIR)/lib/Yap
Makefile libYap.a. , make ( , , , GNU/Linux ), libYap.a , "root" ()
make install
install target ( install_unix ) $(INSTALL_DATA) -m 755 libYap.a $(DESTDIR)$(LIBDIR), , .a , , lib ( , . )
2) , , , "", "" make install, , "" " lib.