gobject-introspection r612 - in trunk: . girepository
- From: walters svn gnome org
- To: svn-commits-list gnome org
- Subject: gobject-introspection r612 - in trunk: . girepository
- Date: Fri, 19 Sep 2008 02:24:05 +0000 (UTC)
Author: walters
Date: Fri Sep 19 02:24:05 2008
New Revision: 612
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=612&view=rev
Log:
Bug 522384: Use SHLIB_SUFFIX intead of G_MODULE_SUFFIX for Darwin
On Darwin, the suffix for installed shared libraries (.dylib) is
different from loadable modules (.so). We use a bit of magic shell
script from Behdad Esfahbod to figure out the right suffix.
Modified:
trunk/configure.ac
trunk/girepository/gtypelib.c
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Fri Sep 19 02:24:05 2008
@@ -51,6 +51,20 @@
AC_CHECK_LIB([dl], [dlopen])
+AC_MSG_CHECKING(for the suffix of shared libraries)
+export SED
+shrext_cmds=`./libtool --config | grep '^shrext_cmds='`
+eval $shrext_cmds
+eval std_shrext=$shrext_cmds
+# chop the initial dot
+SHLIB_SUFFIX=`echo $std_shrext | sed 's/^\.//'`
+AC_MSG_RESULT(.$SHLIB_SUFFIX)
+# any reason it may fail?
+if test "X$SHLIB_SUFFIX" = x; then
+ AC_MSG_ERROR(Cannot determine shared library suffix from libtool)
+fi
+AC_DEFINE_UNQUOTED([SHLIB_SUFFIX], "$SHLIB_SUFFIX", [Define to the platform's shared library suffix])
+
PKG_CHECK_MODULES(GOBJECT, [gobject-2.0])
PKG_CHECK_MODULES(SCANNER, [gobject-2.0 gthread-2.0])
Modified: trunk/girepository/gtypelib.c
==============================================================================
--- trunk/girepository/gtypelib.c (original)
+++ trunk/girepository/gtypelib.c Fri Sep 19 02:24:05 2008
@@ -24,6 +24,7 @@
#include <glib.h>
+#include "config.h"
#include "gtypelib.h"
typedef struct {
@@ -1977,7 +1978,7 @@
g_string_append (shlib_full, ".la");
typelib->module = g_module_open (shlib_full->str, G_MODULE_BIND_LAZY);
if (typelib->module == NULL)
- g_string_overwrite (shlib_full, strlen (shlib_full->str)-2, G_MODULE_SUFFIX);
+ g_string_overwrite (shlib_full, strlen (shlib_full->str)-2, SHLIB_SUFFIX);
typelib->module = g_module_open (shlib_full->str, G_MODULE_BIND_LAZY);
g_string_free (shlib_full, TRUE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]