[pkg-opensc-commit] [libp11] 15/51: Patches for MSYS2, CYGWIN, MINGW/MSYS
Eric Dorland
eric at moszumanska.debian.org
Wed Dec 7 17:51:30 UTC 2016
This is an automated email from the git hooks/post-receive script.
eric pushed a commit to branch master
in repository libp11.
commit a628b3a01a5ddfef15a69d4375d9f9bdaa55e0b5
Author: nased0 <pw178860 at gmail.com>
Date: Mon Oct 24 02:03:57 2016 +0200
Patches for MSYS2, CYGWIN, MINGW/MSYS
---
INSTALL.md | 44 +++++++++++++++++++++++++++++++++++++++++++-
configure.ac | 12 ++++++++++++
src/Makefile.am | 4 ++--
3 files changed, 57 insertions(+), 3 deletions(-)
diff --git a/INSTALL.md b/INSTALL.md
index 621c1d8..316a218 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -53,5 +53,47 @@ then start a MSYS2 MSYS console from the Start menu and use:
### Cygwin
-TODO
+As above, assuming that you have mentioned packages already installed.
+
+### MINGW / MSYS
+
+To build libp11, download and install mingw-get-setup.exe from https://sourceforge.net/projects/mingw/
+
+I'm assuming that you have selected all necessary MINGW and MSYS packages during install
+
+(useful hint - after clicking at checkbox press key I).
+
+You also need to install pkg-config or pkg-config-lite and update autoconf and openssl.
+
+http://www.gaia-gis.it/spatialite-3.0.0-BETA/mingw_how_to.html#pkg-config
+
+https://sourceforge.net/p/mingw/mailman/message/31908633/
+
+https://sourceforge.net/projects/pkgconfiglite/files/
+
+http://ftp.gnu.org/gnu/autoconf/autoconf-latest.tar.gz
+
+https://www.openssl.org/source/
+
+You need to configure OpenSSL to replace very old mingw's version like this:
+
+ ./configure --prefix=/mingw threads shared mingw
+
+ make depend && make && make install
+
+Then download and unpack libp11, in its directory use:
+
+ libtoolize --force
+
+ aclocal -I m4 --install
+
+ autoheader
+
+ automake --force-missing --add-missing
+
+ autoconf
+
+ ./configure --prefix=/usr/local
+
+ make && make install
diff --git a/configure.ac b/configure.ac
index fac68e3..aa42819 100644
--- a/configure.ac
+++ b/configure.ac
@@ -221,6 +221,18 @@ if test "${enable_strict}" = "yes"; then
CFLAGS="${CFLAGS} -Wall -Wextra"
fi
+AC_MSG_CHECKING([if libtool needs -no-undefined flag to build shared libraries])
+case "`uname`" in
+ CYGWIN*|MSYS*|MINGW*|AIX*)
+ ## Add in the -no-undefined flag to LDFLAGS for libtool.
+ AC_MSG_RESULT([yes])
+ LDFLAGS="$LDFLAGS -no-undefined"
+ ;;
+ *)
+ ## Don't add in anything.
+ AC_MSG_RESULT([no])
+ ;;
+esac
AC_CONFIG_FILES([
Makefile
src/Makefile
diff --git a/src/Makefile.am b/src/Makefile.am
index ac504ec..edbb1df 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -21,7 +21,7 @@ dist_noinst_DATA = libp11.rc
endif
libp11_la_CFLAGS = $(AM_CFLAGS) $(OPENSSL_CFLAGS)
libp11_la_LIBADD = $(OPENSSL_LIBS)
-libp11_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined \
+libp11_la_LDFLAGS = $(AM_LDFLAGS) \
-version-info @LIBP11_LT_CURRENT@:@LIBP11_LT_REVISION@:@LIBP11_LT_AGE@ \
-export-symbols "$(srcdir)/libp11.exports"
@@ -33,7 +33,7 @@ dist_noinst_DATA += pkcs11.rc
endif
pkcs11_la_CFLAGS = $(AM_CFLAGS) $(OPENSSL_EXTRA_CFLAGS) $(OPENSSL_CFLAGS)
pkcs11_la_LIBADD = $(libp11_la_OBJECTS) $(OPENSSL_LIBS)
-pkcs11_la_LDFLAGS = $(AM_LDFLAGS) -module -no-undefined -shared -shrext $(SHARED_EXT) \
+pkcs11_la_LDFLAGS = $(AM_LDFLAGS) -module -shared -shrext $(SHARED_EXT) \
-avoid-version -export-symbols "$(srcdir)/pkcs11.exports"
# OpenSSL older than 1.1.0 expected libpkcs11.so instead of pkcs11.so
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/libp11.git
More information about the pkg-opensc-commit
mailing list