dk / Prima

prima.eu.org
Other
106 stars 27 forks source link

EXTRA_CCFLAGS might come too early on command-line #23

Closed d-lamb closed 9 years ago

d-lamb commented 9 years ago

To get Prima to find my gif, jpeg, and tiff libraries (in my Macports tree), I had to build the Makefile thusly:

perl Makefile.PL INSTALL_BASE=~/local EXTRA_LDFLAGS=-L/opt/local/lib

and that worked just fine. Before that, I had also added EXTRA_CCFLAGS=-I/opt/local/include. It turns out that was not necessary because that directory was already in the include search path. But when I ran "make" with that EXTRA_CCFLAGS, I got a function prototype mismatch with /opt/local/include/menu.h, which seems to be part of ncurses. This is because the EXTRA_CCFLAGS path was searched before Prima's include/generic/Menu.h.

I don't know if the intention of EXTRA_CCFLAGS is to replace what Prima ships with, or to supplement it. If the latter, then that part of the command-line building might want to be moved further down in the sequence in Makefile.PL's sub cc_command_line. If the former, you could mark this as not-a-bug.

FWIW, this wouldn't be an issue if the OSX file system was case-sensitive, but that's a rant for another day.

dk commented 9 years ago

Hi Derek, Please check if this works for you Dmitry

d-lamb commented 9 years ago

Yes, with that change I can pass the duplicate -I/opt/local/include on the command line and compilation works just fine. Thanks!