Closed ryandesign closed 6 years ago
Committed a quick fix (added a Makefile variable, as you suggest). Please test with BOOST_PO=-lboost_program_options-mt make
; works on my machine. But I agree with you that the way to go for better compatibility is migrate to autotools; this will be my next goal for closing this issue.
Thanks.
BOOST_PO=-lboost_program_options-mt CPPFLAGS=-isystem/opt/local/include LDFLAGS=-L/opt/local/lib make
does not work because the line you added
BOOST_PO+=-lboost_program_options
appends -lboost_program_options
to BOOST_PO
when what you probably want is to just set it if it's not set, which you could do with:
BOOST_PO?=-lboost_program_options
Alternately, the following works with your current code:
CPPFLAGS=-isystem/opt/local/include LDFLAGS=-L/opt/local/lib make BOOST_PO=-lboost_program_options-mt
However it's confusing when some options must be given as environment variables and other options must be given as arguments.
My bad - I mixed up ?=
and +=
. I'm fixing that immediately.
Sorry for the delay. I'm satisfied with this solution for now. If you want to switch to autotools later, that could be a separate ticket.
bastet 0.43 assumes the single-threaded library boost_program_options is available, but it is possible to compile boost with only multi-threaded support, in which case only the library boost_program_options-mt will be available; this is the case in MacPorts for example, resulting in e.g. this build failure on Mac OS X 10.5:
Usually detecting whether to use the single-threaded or multi-threaded boost libraries is something you would do in your configure script; since bastet does not have a configure script, I'm not sure what you should do. I suppose you could at least offer a Makefile variable for controlling the boost library suffix, but ideally you would detect it automatically and use the best-available library.