Skip to content

Commit

Permalink
add configure option for sdlnet (IPHLPAPI.DLL dependency removed for …
Browse files Browse the repository at this point in the history
…win95), in case that the build env has its own sdlnet installed and detected.
  • Loading branch information
crazii committed Nov 29, 2023
1 parent 81e59fc commit 35ea4ec
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build-mingw-lowend9x
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,5 @@ export LDFLAGS #LIBS
echo "Compiling DOSBox-X"
chmod +x configure
# FIXME: I would like MinGW builds to enable the debugger, eventually
./configure --disable-libfluidsynth --disable-libslirp --enable-d3d9=no --enable-d3d-shaders=no --prefix=/usr --enable-xbrz=no --disable-printer --disable-largefile --enable-opencow "${@}" || exit 1
./configure --disable-libfluidsynth --disable-libslirp --disable-d3d9 --disable-d3d-shaders --prefix=/usr --disable-xbrz --disable-printer --disable-largefile --enable-opencow --disable-sdlnet "${@}" || exit 1
make -j3 || exit 1
11 changes: 9 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@ dnl This is how the build script can use libopencow for win9x unicode
# AH_TEMPLATE(C_OPENCOW,[Define to 1 to enable opencow])
AC_ARG_ENABLE(opencow,AC_HELP_STRING([--enable-opencow],[Enable OpenCOW]),enable_opencow=yes)

dnl Disable SDLnet for win9x builds
AC_ARG_ENABLE(sdlnet,AC_HELP_STRING([--disable-sdlnet],[Disable SDLNet]),disable_sdl_net=yes)

dnl Let me know if you're targeting Emscripten
AH_TEMPLATE(C_EMSCRIPTEN,[Define to 1 to target Emscripten])
AC_ARG_ENABLE(emscripten,AC_HELP_STRING([--enable-emscripten],[Enable Emscripten target]),enable_emscripten=$enableval,enable_emscripten=no)
Expand Down Expand Up @@ -1039,7 +1042,9 @@ case "$host" in
esac
dnl enable SDL2 net if SDL2
if test -n "$SDL2_LIBS"; then
if test x$have_sdl2_net_lib = xyes -a x$have_sdl_net_h = xyes ; then
if test x$disable_sdl_net = xyes ; then
AC_MSG_WARN([SDL_net is disabled in parameters])
elif test x$have_sdl2_net_lib = xyes -a x$have_sdl_net_h = xyes ; then
LIBS="$LIBS -lSDL2_net"
AC_DEFINE(C_SDL_NET,1)
AC_DEFINE(C_MODEM,1)
Expand All @@ -1055,7 +1060,9 @@ if test -n "$SDL2_LIBS"; then
AC_MSG_WARN([Can't find SDL_net, internal modem and ipx disabled])
fi
else
if test x$have_sdl_net_lib = xyes -a x$have_sdl_net_h = xyes ; then
if test x$disable_sdl_net = xyes ; then
AC_MSG_WARN([SDL_net is disabled in parameters])
elif test x$have_sdl_net_lib = xyes -a x$have_sdl_net_h = xyes ; then
LIBS="$LIBS -lSDL_net"
AC_DEFINE(C_SDL_NET,1)
AC_DEFINE(C_MODEM,1)
Expand Down
2 changes: 1 addition & 1 deletion vs/opencow/src/kernel32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@ OCOW_DEF(BOOL, GetFileAttributesExW,(
lpData->nFileSizeHigh = st.st_size >> 32;
#endif
if(!(st.st_mode&_S_IWRITE)) lpData->dwFileAttributes |= FILE_ATTRIBUTE_READONLY;
if(!(st.st_mode&_S_IFDIR)) lpData->dwFileAttributes |= FILE_ATTRIBUTE_DIRECTORY;
if((st.st_mode&_S_IFDIR)) lpData->dwFileAttributes |= FILE_ATTRIBUTE_DIRECTORY;
if(lpData->dwFileAttributes == 0 && (st.st_mode&_S_IFREG))
lpData->dwFileAttributes |= FILE_ATTRIBUTE_NORMAL;
return TRUE;
Expand Down

0 comments on commit 35ea4ec

Please sign in to comment.