Skip to content
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

Add --with-sdl-net option to enable network builds #58

Open
wants to merge 2 commits into
base: em-dosbox-svn-sdl2
Choose a base branch
from

Conversation

jbaicoianu
Copy link

Adds ./configure --with-sdl-net option to enable networking support with Emscripten builds

AS_IF([test "x$with_sdl_net" != "xno"],[
AS_IF([test "x$with_sdl_net" = "xyes"],
[CXXFLAGS="$CXXFLAGS -s USE_SDL_NET=2"],
[LIBS="$LIBS -L$with_sdl_net/build/.libs/ -lSDL2_net"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why -L$with_sdl_net/build/.libs/? The SDL_net library provided by Emscripten should link with only -lSDL2_net when using em++ -s USE_SDL=2 -s USE_SDL_NET=2

@dreamlayers
Copy link
Owner

It should now be possible to build with SDL_net using emconfigure ./configure CFLAGS="-O3 -s USE_SDL=2 -s USE_SDL_NET=2" CXXFLAGS="-O3 -s USE_SDL=2 -s USE_SDL_NET=2". This makes the normal detection work. Note that the C compiler is used for configure tests, and the C++ compiler is used for building, so both flags need to be altered. Also note that the default -O3 would be lost if not put here. A more convenient way would be nice, but I'm not sure about this here.

I've cherry-picked df3b102. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants