From 54b2a367f6986a74fd6b4e50a0ae2c5cdb3a40cb Mon Sep 17 00:00:00 2001 From: dequis Date: Sat, 13 May 2017 17:38:35 -0300 Subject: cygwin: Export a "libbitlbee.dll.a" to allow plugins to link to it --- Makefile | 7 +++++++ configure | 14 +++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 346083c1..d01643a8 100644 --- a/Makefile +++ b/Makefile @@ -93,9 +93,16 @@ endif install-bin: mkdir -p $(DESTDIR)$(SBINDIR) $(INSTALL) -m 0755 $(OUTFILE) $(DESTDIR)$(SBINDIR)/$(OUTFILE) +ifdef IMPLIB + # import library for cygwin + $(INSTALL) -m 0644 $(IMPLIB) $(DESTDIR)$(LIBDIR)/$(IMPLIB) +endif uninstall-bin: rm -f $(DESTDIR)$(SBINDIR)/$(OUTFILE) +ifdef IMPLIB + rm -f $(DESTDIR)$(LIBDIR)/$(IMPLIB) +endif install-dev: mkdir -p $(DESTDIR)$(INCLUDEDIR) diff --git a/configure b/configure index a5225890..087f274c 100755 --- a/configure +++ b/configure @@ -14,6 +14,7 @@ etcdir='$prefix/etc/bitlbee/' mandir='$prefix/share/man/' datadir='$prefix/share/bitlbee/' config='/var/lib/bitlbee/' +libdir='$prefix/lib/' plugindir='$prefix/lib/bitlbee/' includedir='$prefix/include/bitlbee/' systemdsystemunitdir='' @@ -172,6 +173,7 @@ etcdir=$(eval echo "$etcdir/" | sed 's/\/\{1,\}/\//g') mandir=$(eval echo "$mandir/" | sed 's/\/\{1,\}/\//g') datadir=$(eval echo "$datadir/" | sed 's/\/\{1,\}/\//g') config=$(eval echo "$config/" | sed 's/\/\{1,\}/\//g') +libdir=$(eval echo "$libdir/" | sed 's/\/\{1,\}/\//g') plugindir=$(eval echo "$plugindir/" | sed 's/\/\{1,\}/\//g') includedir=$(eval echo "$includedir"/ | sed 's/\/\{1,\}/\//g') libevent=$(eval echo "$libevent"/ | sed 's/\/\{1,\}/\//g') @@ -195,6 +197,7 @@ MANDIR=$mandir DATADIR=$datadir PLUGINDIR=$plugindir CONFIG=$config +LIBDIR=$libdir INCLUDEDIR=$includedir PCDIR=$pcdir @@ -799,16 +802,23 @@ if ! make helloworld > /dev/null 2>&1; then fi fi +pkgconfiglibs='' +case "$arch" in +CYGWIN* ) + pkgconfiglibs='-L${libdir} -lbitlbee' +esac + cat <bitlbee.pc prefix=$prefix includedir=$includedir plugindir=$plugindir +libdir=$libdir Name: bitlbee Description: IRC to IM gateway Requires: glib-2.0 Version: $BITLBEE_VERSION -Libs: +Libs: $pkgconfiglibs Cflags: -I\${includedir} EOF @@ -918,6 +928,8 @@ AIX ) echo 'EFLAGS+=-Wl,-brtl' >> Makefile.settings ;; CYGWIN* ) + echo 'EFLAGS+=-Wl,--export-all,--out-implib,libbitlbee.dll.a' >> Makefile.settings + echo 'IMPLIB=libbitlbee.dll.a' >> Makefile.settings ;; Windows ) echo 'Native windows compilation is not supported anymore, use cygwin instead.' -- cgit v1.2.3