From e98abdd87dfa3e2bb2b12e11f55fd76073840ce7 Mon Sep 17 00:00:00 2001 From: Johannes Obermayr Date: Sat, 8 Oct 2011 16:08:09 +0200 Subject: [PATCH] llvm-config: Prefer shared libraries. --- tools/llvm-config/llvm-config.in.in | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/tools/llvm-config/llvm-config.in.in b/tools/llvm-config/llvm-config.in.in index 840a10e..e2a2f39 100644 --- a/tools/llvm-config/llvm-config.in.in +++ b/tools/llvm-config/llvm-config.in.in @@ -209,11 +209,16 @@ sub fix_library_names (@) { my @result; foreach my $lib (@libs) { # Transform the bare library name appropriately. - my ($basename) = ($lib =~ /^lib([^.]*)\.a/); - if (defined $basename) { - push @result, "-l$basename"; - } else { + my ($shared_lib) = ($lib =~ /^lib([^.]*)\.so/); + if (defined $shared_lib) { push @result, "$LIBDIR/$lib"; + } else { + my ($basename) = ($lib =~ /^lib([^.]*)\.a/); + if (defined $basename) { + push @result, "-l$basename"; + } else { + push @result, "$LIBDIR/$lib"; + } } } return @result; -- 1.7.3.4