Use libtool to determine shared library suffix. (#357245)
authorBehdad Esfahbod <behdad@gnome.org>
Tue, 26 Dec 2006 20:18:58 +0000 (20:18 +0000)
committerBehdad Esfahbod <behdad@src.gnome.org>
Tue, 26 Dec 2006 20:18:58 +0000 (20:18 +0000)
2006-12-26  Behdad Esfahbod  <behdad@gnome.org>

        * configure.in: Use libtool to determine shared library suffix.
        (#357245)

ChangeLog
configure.in

index 4695b61..438c94f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-12-26  Behdad Esfahbod  <behdad@gnome.org>
+
+       * configure.in: Use libtool to determine shared library suffix.
+       (#357245)
+
 2006-12-24  Matthias Clasen  <mclasen@redhat.com>
 
        * tests/run-collate-tests.sh:
index 9833a45..74bd36a 100644 (file)
@@ -1312,28 +1312,16 @@ else
 fi
 
 AC_MSG_CHECKING(for the suffix of shared libraries)
-case "$host_os" in
-  hpux9* | hpux10* | hpux11*)  # taken from ltconfig
-    case "$host_cpu" in
-      hppa*)
-       glib_gmodule_suffix='sl'
-       ;;
-      ia64*)
-       glib_gmodule_suffix='so'
-       ;;
-    esac
-    ;;
-  cygwin* | mingw*)
-    glib_gmodule_suffix='dll'
-    ;;
-  aix*)
-    glib_gmodule_suffix='a'
-    ;;
-  *)
-    glib_gmodule_suffix='so'    
-    ;;
-esac
+shrext_cmds=`./libtool --config | grep '^shrext_cmds='`
+eval $shrext_cmds
+module=yes eval std_shrext=$shrext_cmds
+# chop the initial dot
+glib_gmodule_suffix=`echo $std_shrext | sed 's/^\.//'`
 AC_MSG_RESULT(.$glib_gmodule_suffix)
+# any reason it may fail?
+if test "x$glib_gmodule_suffix" = x; then
+       AC_MSG_ERROR(Cannot determine shared library suffix from libtool)
+fi
  
 AC_SUBST(G_MODULE_SUPPORTED)
 AC_SUBST(G_MODULE_IMPL)