Skip to content

Commit

Permalink
Link in ws2_32 on Windows, as we need it for ntohl() and friends.
Browse files Browse the repository at this point in the history
  • Loading branch information
stump committed Jul 23, 2013
1 parent 84d335f commit 20ff575
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,10 @@ PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.2)
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)

case "$host" in
*-cygwin|*-mingw*) WS2_32_IF_NEEDED=-lws2_32 ;;
esac
AC_SUBST([WS2_32_IF_NEEDED])

AC_CONFIG_FILES([Makefile smf.pc src/Makefile man/Makefile])
AC_OUTPUT
2 changes: 1 addition & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ include_HEADERS = smf.h
lib_LTLIBRARIES = libsmf.la
libsmf_la_SOURCES = smf.h smf_private.h smf.c smf_decode.c smf_load.c smf_save.c smf_tempo.c
libsmf_la_CFLAGS = $(GLIB_CFLAGS) -DG_LOG_DOMAIN=\"libsmf\"
libsmf_la_LIBADD = $(GLIB_LIBS)
libsmf_la_LIBADD = $(GLIB_LIBS) $(WS2_32_IF_NEEDED)
libsmf_la_LDFLAGS = -no-undefined

bin_PROGRAMS = smfsh
Expand Down

0 comments on commit 20ff575

Please sign in to comment.