New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build portability #143
Build portability #143
Conversation
It would be nice if |
It does; try |
Yes, you are right, sorry for the confusion. |
I haven't tested this yet, but looking at the changes raises up a few questions/issues:
|
There’s no ambiguity between SDL1 and SDL2, because they have separate include directories and separate pkg-config files. I don’t know how macOS works. Does it come with pkg-config? If not, it could fall back to sdl2-config. |
I'm talking about scenarios where pkg-config isn't available, I don't want to require it for targets that already work without it. |
If pkg-config isn’t available it falls back to the original case. |
But the include statements have changed, and are now ambiguous between SDL1 and 2. |
Ah, I did overlook that. It’s not that they’re ambiguous, since ${prefix}/include/SDL and ${prefix}/include/SDL2 are not in compiler search paths by default. But by the same token the initial revision won’t build without pkg-config to set search paths; that was unintentional. I’ve pushed a new revision that falls back to sdl2-config, which comes with SDL2, if pkg-config is not available, and only applies the flags to the SDL target. |
Any thoughts on this version? |
I kind of forgot about it... 😳 I'll give it a look this weekend. |
It breaks the macOS SDL build when pkg-config is installed – it breaks all SDL includes and doesn't even find libgl ( |
That suggests that macOS doesn’t have This revision splits out GL build flags from SDL build flags, and sets them from Note that even though I tested this on OpenBSD with I moved the bootrom trimming bits to #176 in case this part still needs fine tuning. |
Hi there @LIJI32, any resolution here? |
@twinaphex I am not sure if you are aware, but this PR should only affect the standalone SameBoy and not libretro. |
Use pkg-config or sdl2-config to determine SDL and GL compilation flags.
I’ve rebased against master. If the previous macOS failure is from a missing Any issues with this revision? |
It looks good. I'll test it and merge it. |
It still fails on macOS because it adds |
Thanks! |
These three commits allow SameBoy to build on OpenBSD.
/usr/local
by default.pkg-config
is used to provide whatever include directories are necessary for a library.pkg-config
files specify an include directory of${prefix}/include/SDL2
; its headers are meant to be included relative to this directory.head(1)
utility, but doesn’t specify the-c
flag, and OpenBSD doesn’t provide one.dd(1)
is a portable alternative.