From f0e57e15ef57d84c2ecd3974b89607d3fb6a3fa4 Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Thu, 14 Feb 2019 22:15:15 -0200 Subject: [PATCH] Fixing bugs found during test in windows with MSYS2 --- Makefile.in | 2 +- configure.ac | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile.in b/Makefile.in index 828f0b9..388cc5d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -269,7 +269,7 @@ $(BINRLS)/$(LIBNAME)@DLLEXT@.@PACKAGE_MAJOR_VERSION@.@PACKAGE_MINOR_VERSION@: \ @$(MKDIR) `dirname $@` @echo $< ... @$(LD) \ - -shared -Wl,-soname,$(@F) \ + @DLL_LDFLAGS@ \ -o $@ \ $(LDFLAGS) \ $(foreach SRC, $(basename $(SOURCES)), $(OBJRLS)/$(SRC).o) \ diff --git a/configure.ac b/configure.ac index 3265439..7c7b27a 100644 --- a/configure.ac +++ b/configure.ac @@ -80,11 +80,12 @@ dnl --------------------------------------------------------------------------- DLLPREFIX="lib" case "$host" in - *-mingw32) + *-mingw32|*-pc-msys) app_cv_osname="windows" CFLAGS="$CFLAGS -pthread -D_WIN32_WINNT=0x0600" LIBS="$LIBS -lws2_32 -lwtsapi32 -lcomdlg32" - LDFLAGS="$LDFLAGS -pthread -static-libgcc -static-libstdc++" + LDFLAGS="$LDFLAGS -pthread" + DLL_LDFLAGS="-shared -Wl,--output-def,\$(@D)/\$(LIBNAME).def" DLLEXT=".dll" app_win32_revision=$(date +%y.%m.%d.%H) @@ -120,6 +121,7 @@ AC_SUBST(LIBS) AC_SUBST(LOGDIR) AC_SUBST(DLLEXT) AC_SUBST(DLLPREFIX) +AC_SUBST(DLL_LDFLAGS) dnl --------------------------------------------------------------------------- dnl Check for other programs -- libgit2 0.21.2