diff options
author | Colin Walters <walters@src.gnome.org> | 2008-09-19 02:24:05 +0000 |
---|---|---|
committer | Colin Walters <walters@src.gnome.org> | 2008-09-19 02:24:05 +0000 |
commit | e3d80cf7c00a5994e254f506c7865ab5ba75b5e9 (patch) | |
tree | 350b997693b0ec3316575cdd4eaf7acf828f0c17 /configure.ac | |
parent | 8daa04b227a9f97993d97c2dbb0f4d4c74b428a8 (diff) | |
download | gobject-introspection-e3d80cf7c00a5994e254f506c7865ab5ba75b5e9.tar.gz |
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.
svn path=/trunk/; revision=612
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 15dbc601..5f636cbb 100644 --- a/configure.ac +++ b/configure.ac @@ -51,6 +51,20 @@ GI_ENABLE_GCOV 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]) |