Skip to content

Commit

Permalink
#220: autotools not building DLL using msys2 and mingw64 on windows 10
Browse files Browse the repository at this point in the history
  • Loading branch information
kkos committed Oct 13, 2020
1 parent 43ec867 commit 6a996c3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 16 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,20 @@ AC_FUNC_ALLOCA

AC_CONFIG_FILES([Makefile src/Makefile test/Makefile sample/Makefile onig-config])
AC_CONFIG_COMMANDS([default],[chmod +x onig-config],[])

# for Issue #220
FIX_TO_LDFLAGS=

This comment has been minimized.

Copy link
@jonforums

jonforums Oct 14, 2020

The EXPORT_ALL_SYMBOLS var should not be required. In the most recent PCRE2 release, it looks to be unused in both configure.ac and Makefile.am

EXPORT_ALL_SYMBOLS=
case $host_os in
cygwin* | mingw* )
if test X"$enable_shared" = Xyes; then
FIX_TO_LDFLAGS="-no-undefined"
EXPORT_ALL_SYMBOLS="-Wl,--export-all-symbols"
fi
;;
esac

EXTRA_LIBONIG_LDFLAGS="$EXTRA_LIBONIG_LDFLAGS $FIX_TO_LDFLAGS"
AC_SUBST(EXTRA_LIBONIG_LDFLAGS)

AC_OUTPUT
2 changes: 1 addition & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ libonig_la_SOURCES = regint.h regparse.h regenc.h st.h \
gb18030.c koi8_r.c cp1251.c \
onig_init.c

libonig_la_LDFLAGS = -version-info $(LTVERSION)
libonig_la_LDFLAGS = $(EXTRA_LIBONIG_LDFLAGS) -version-info $(LTVERSION)

EXTRA_DIST = koi8.c mktable.c \
unicode_fold_data.c unicode_property_data.c \
Expand Down

0 comments on commit 6a996c3

Please sign in to comment.