strophe / libstrophe

A simple, lightweight C library for writing XMPP clients
http://strophe.im/libstrophe
Other
401 stars 163 forks source link

Compile tweaks #201

Closed nosnilmot closed 2 years ago

nosnilmot commented 2 years ago

Two minor compile tweaks/fixes:

  1. Support (cross)compiling using MinGW-w64

It's not clear how libstrophe is normally compiled for Windows, but these changes make compilation work with mingw-w64 using regular auto* tools

Also fixes 'make format' when using separate source/build directories, and reduces full tree rebuilds by preserving file timestamps when running dos2unix

  1. Do not compile/link snprintf.o if it is not needed

Avoids link warning on macos:

src/.libs/libstrophe_la-snprintf.o: no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: .libs/libstrophe.a(libstrophe_la-snprintf.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: .libs/libstrophe.a(libstrophe_la-snprintf.o) has no symbols