[pygobject] Generate .dll libraries on windows
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] Generate .dll libraries on windows
- Date: Wed, 6 Aug 2014 07:11:10 +0000 (UTC)
commit 18341f27a5a9770d8caf3192a75737ab2bc06b1e
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Wed Aug 6 08:27:43 2014 +0200
Generate .dll libraries on windows
https://bugzilla.gnome.org/show_bug.cgi?id=734288
configure.ac | 8 ++++++++
tests/Makefile.am | 8 ++++----
2 files changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index e6b8938..afe5140 100644
--- a/configure.ac
+++ b/configure.ac
@@ -55,14 +55,22 @@ AC_MSG_CHECKING([for some Win32 platform])
case "$host" in
*-*-mingw*|*-*-cygwin*)
platform_win32=yes
+ OS_EXT=dll
+ ;;
+ *-*-darwin*)
+ OS_EXT=dylib
;;
*)
platform_win32=no
+ OS_EXT=so
;;
esac
AC_MSG_RESULT([$platform_win32])
AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
+AC_SUBST(OS_EXT)
+AC_DEFINE_UNQUOTED(OS_EXT, "$OS_EXT", [Define shared library extension])
+
AC_MSG_CHECKING([for native Win32])
case "$host" in
*-*-mingw*)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 2167edb..d382807 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -68,11 +68,11 @@ testhelper.la: $(testhelper_la_OBJECTS) $(testhelper_la_DEPENDENCIES)
$(AM_V_GEN) $(LINK) -rpath $(pkgpyexecdir) $(testhelper_la_LDFLAGS) $(testhelper_la_OBJECTS)
$(testhelper_la_LIBADD) $(LIBS)
-.la.so:
+.la.$(OS_EXT):
test -L $@ || $(LN_S) .libs/$@ $@
-all: $(check_LTLIBRARIES:.la=.so)
+all: $(check_LTLIBRARIES:.la=.$(OS_EXT))
EXTRA_DIST = \
compathelper.py \
@@ -121,7 +121,7 @@ EXTRA_DIST = \
$(NULL)
clean-local:
- rm -f $(check_LTLIBRARIES:.la=.so) file.txt~
+ rm -f $(check_LTLIBRARIES:.la=.$(OS_EXT)) file.txt~
DBUS_LAUNCH=$(shell which dbus-launch)
RUN_TESTS_ENV_VARS= \
@@ -136,7 +136,7 @@ RUN_TESTS_ENV_VARS= \
# pygtkcompat tests need to be run in a separate process as they
# clobber global name space
-check-local: $(check_LTLIBRARIES:.la=.so) $(test_typelibs) gschemas.compiled
+check-local: $(check_LTLIBRARIES:.la=.$(OS_EXT)) $(test_typelibs) gschemas.compiled
export `$(DBUS_LAUNCH)` && \
$(RUN_TESTS_ENV_VARS) $(EXEC_NAME) $(PYTHON) -Wd $(srcdir)/runtests.py; rc=$$?; \
[ "$$rc" -ne 0 ] || [ -n "$$TEST_NAMES" ] || { TEST_NAMES=compat_test_pygtk $(RUN_TESTS_ENV_VARS)
$(EXEC_NAME) $(PYTHON) -Wd -Werror::PendingDeprecationWarning -Werror::DeprecationWarning
-Werror::RuntimeWarning $(srcdir)/runtests.py; rc=$$?; }; \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]