[PATCH] llvm-config: Add support for LIBDIR_SUFFIX.

Why?

-eric

Why?

-eric

Because openSUSE and many other linux distributions put all things to /usr/lib (i586) and /usr/lib64 (x86_64) or /usr/lib32.
So it is possible to install x86 and x86_64 versions at the same time ...
(See also http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-July/042068.html and http://llvm.org/bugs/show_bug.cgi?id=10836)

It should be better to just use --libdir and make sure that LLVM_LIBDIR is set to the result of the configure option if it's different.

-eric

Your advice does not work because following [old] code ensures to be able to run llvm-config [with right output] from build dir (= without 'make install'):

tools/llvm-config/llvm-config.in.in:55:
my ($RUN_DIR) = ($0 =~ /^(.*)\/.*$/);

tools/llvm-config/llvm-config.in.in:59:
my $ABS_RUN_DIR = abs_path("$RUN_DIR/..");

tools/llvm-config/llvm-config.in.in:69:
my $LIBDIR = "$ABS_RUN_DIR/lib";

So push it or let it ...

Why?

-eric

Because openSUSE and many other linux distributions put all things to /usr/lib (i586) and /usr/lib64 (x86_64) or /usr/lib32.
So it is possible to install x86 and x86_64 versions at the same time ...
(See also http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-July/042068.html and http://llvm.org/bugs/show_bug.cgi?id=10836)

It should be better to just use --libdir and make sure that LLVM_LIBDIR is set to the result of the configure option if it's different.

-eric

Your advice does not work because following [old] code ensures to be able to run llvm-config [with right output] from build dir (= without 'make install'):

tools/llvm-config/llvm-config.in.in:55:
my ($RUN_DIR) = ($0 =~ /^(.*)\/.*$/);

tools/llvm-config/llvm-config.in.in:59:
my $ABS_RUN_DIR = abs_path("$RUN_DIR/..");

tools/llvm-config/llvm-config.in.in:69:
my $LIBDIR = "$ABS_RUN_DIR/lib";

Chop off the end and use the lib* if we're not in the obj directory?

if ($ABS_RUN_DIR eq $ABS_OBJ_ROOT) {

}

So push it or let it ...

?

-eric