Applying those two changes to the 'configure' of 1.3.47 allowed complete building. Thanks for the diagnosis and repair! I agree that the routine for direct detection (not simply asking pkg-config) of specific external libraries shouldn't have to know special flags needed for support libs of those libs being detected.
Here's the VERBOSE=TRUE. There is one patch applied, tweaking the X11 detection because XQuartz has evolved beyond what older autoconf knew about.
Missing -lz when using alternative to pkg-config for libz
Incorrect package-version reported by .pc
That's solely based on the lack of sync between the two platforms and also between the linker and the dependencies list. But that fix causes FTBFS due to unresolved symbols when linking libutil.dylib: "_GifErrorString", referenced from: _PrintGifError in qprintf.o because qprintf.o is now only in libgif not libutil. If libutil is (as name suggests) utility functions and (as the Makefile behaves on all platforms) not actually install libutil publicly, should it be static-only on all platforms?
Incorrect object files in shared libutil on darwin
Type-mismatch in libmpeg2/idct_mmx.c
I had already added that flag for test/unit/CMakeLists.txt (required for recent cppunit versions (see https://sourceforge.net/p/podofo/mailman/podofo-users/thread/1501515201.2032.64.camel%40litePDF.cz) via the more generic ADD_DEFINITIONS() function, so a more specific tool like the CXX_STANDARD variables seems better already.