diff --git a/configure.ac b/configure.ac index 85d78f8..0ad20f3 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,7 @@ AC_PROG_CC AC_PROG_CXX AC_PROG_INSTALL AC_PROG_MAKE_SET -LT_INIT +LT_INIT([win32-dll]) AM_PROG_AS AM_PROG_CC_C_O @@ -160,6 +160,7 @@ AM_CONDITIONAL(OS_LINUX, expr x$target_os : xlinux >/dev/null) AM_CONDITIONAL(OS_HPUX, expr x$target_os : xhpux >/dev/null) AM_CONDITIONAL(OS_FREEBSD, expr x$target_os : xfreebsd >/dev/null) AM_CONDITIONAL(OS_QNX, expr x$target_os : xnto-qnx >/dev/null) +AM_CONDITIONAL(OS_WIN32, expr x$target_os : xmingw32 >/dev/null) AC_MSG_CHECKING([for ELF helper width]) case "${target_arch}" in diff --git a/src/Makefile.am b/src/Makefile.am index 5d87475..82ab658 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -152,6 +152,8 @@ libunwind_la_SOURCES_os_freebsd = os-freebsd.c libunwind_la_SOURCES_os_qnx = os-qnx.c +libunwind_la_SOURCES_os_win32 = + libunwind_dwarf_common_la_SOURCES = dwarf/global.c libunwind_dwarf_local_la_SOURCES = \ @@ -486,6 +488,11 @@ if OS_QNX libunwind_la_SOURCES_os_local = $(libunwind_la_SOURCES_os_qnx_local) endif +if OS_WIN32 + libunwind_la_SOURCES_os = $(libunwind_la_SOURCES_os_win32) + libunwind_la_SOURCES_os_local = $(libunwind_la_SOURCES_os_win32_local) +endif + if ARCH_AARCH64 lib_LTLIBRARIES += libunwind-aarch64.la libunwind_la_SOURCES = $(libunwind_la_SOURCES_aarch64) @@ -652,6 +659,9 @@ endif # libunwind_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -XCClinker -nostdlib \ $(LDFLAGS_STATIC_LIBCXA) -version-info $(SOVERSION) +if OS_WIN32 +libunwind_la_LDFLAGS += -no-undefined +endif libunwind_la_LIBADD += -lc $(LIBCRTS) libunwind_la_LIBADD += $(LIBLZMA) @@ -670,6 +680,7 @@ EXTRA_DIST = $(libunwind_la_SOURCES_aarch64) \ $(libunwind_la_SOURCES_os_linux) \ $(libunwind_la_SOURCES_os_hpux) \ $(libunwind_la_SOURCES_os_qnx) \ + $(libunwind_la_SOURCES_os_win32) \ $(libunwind_la_SOURCES_common) \ $(libunwind_la_SOURCES_local) \ $(libunwind_la_SOURCES_generic) \