I am the current maintainer of GRX, which home page is http://grx.gnu.de/
This is an old 2D graphics library written in C with pascal interface for GPC (which is the main reason I use / maintain it). Written initially for DOS/DJGPP, it has been extended to Windows (mingw), linux (console and X11), plus some more esoteric systems.
Now a new user Schindler Karl-Michael karl-michael.schindler@web.de succeeded in compiling / running the X11 version under Mac OS X, with a few modifications.
I try to include a macosx target in the GRX sources, but there are a few problems. The first is that I have no Mac computer, so that I have to rely to others to experiment !
Besides some obvious modifications of header files, I included a set of makefile.osx in the src, test, test/bgi, pascal and pascal/bgi subdirectories, and corrected the configure script accordingly. The makefile.osx are copies of makefile.x11 with only in principle minor modifications. The most obvious is the change of dynamic library compilation (the $(GRX20SHna) target in src/makefile.osx), which I have modified according to your rts/makefile patch to compile GPC.
It works, but it was necessary to include extra -I and -L parameters to find the headers and libraries for X11, and for auxiliary libraries png, jpeg, tiff if they are used (there are options in configure to do so). This is not necessary in linux (and other targets) if these libraries are correctly installed in system directories, /usr and the like. In principle Karl-Michael has first done it, before compiling grx.
Is there something esoteric in Mac OS X, like /sbin/ldconfig to register .so dynamic libraries in linux ?
If you want to experiment, you can download grx 2.4.9 from the home page mentioned above, and a macosx.diff in the "more things" sections found in this page (it contains in addition some sanitization of other makefiles, to enable easier comparison). With it grx compiles/runs without the auxiliary libraries, but I had to include an extra $(X11LIBS) in the $(GRX20SHna) dynamic lib target.
You can find our full discussion in the GRX list archive at http://www.g-n-u.de/pipermail/grx/
The last message contains proposals to add -I and -L parameters to find location of auxiliary headers and libraries. It works that way, but I do not understand the need for these extra parameters.
Regards
Maurice