From f86fca9b708ea98be0d508db90ec25d537fba246 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 11 Jan 2012 15:41:42 +0000 Subject: * Figure out the extension of dynamic libraries; don't hard-code .so. --- configure.ac | 5 +++++ perl/Makefile.am | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 1b6154a2d39e..2a0a30f0300e 100644 --- a/configure.ac +++ b/configure.ac @@ -332,6 +332,11 @@ if test "$(uname)" = "Darwin"; then fi +# Figure out the extension of dynamic libraries. +eval dynlib_suffix=$shrext_cmds +AC_SUBST(dynlib_suffix) + + AM_CONFIG_HEADER([config.h]) AC_CONFIG_FILES([Makefile externals/Makefile diff --git a/perl/Makefile.am b/perl/Makefile.am index 12293fc050a6..4d898c32c668 100644 --- a/perl/Makefile.am +++ b/perl/Makefile.am @@ -3,13 +3,13 @@ PERL_MODULES = lib/Nix/Store.pm lib/Nix/Manifest.pm lib/Nix/GeneratePatches.pm l # Hack required by "make check". all: $(PERL_MODULES:.in=) mkdir -p lib/auto/Nix/Store - ln -sfn $(abs_builddir)/.libs/libNixStore.so lib/auto/Nix/Store/Store.so + ln -sfn $(abs_builddir)/.libs/libNixStore$(dynlib_suffix) lib/auto/Nix/Store/Store$(dynlib_suffix) install-exec-local: $(PERL_MODULES:.in=) $(INSTALL) -d $(DESTDIR)$(perllibdir)/Nix $(INSTALL_DATA) $(PERL_MODULES:.in=) $(DESTDIR)$(perllibdir)/Nix $(INSTALL) -d $(DESTDIR)$(perllibdir)/auto/Nix/Store - ln -sfn $(pkglibdir)/libNixStore.so $(DESTDIR)$(perllibdir)/auto/Nix/Store/Store.so + ln -sfn $(pkglibdir)/libNixStore$(dynlib_suffix) $(DESTDIR)$(perllibdir)/auto/Nix/Store/Store$(dynlib_suffix) # Awful hackery to get libtool to build Perl XS bindings. pkglib_LTLIBRARIES = libNixStore.la -- cgit 1.4.1