diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2013-03-26 13:10:48 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2013-03-26 13:10:48 +0200 |
commit | f148cec91a4c98c5f4ad7fe248f9f9fba70174b9 (patch) | |
tree | 43c8c65ae2914c7845ecd629e4142ec3e271d803 /m4 | |
parent | a2dee162af41c80827ff60d87c08ea981b55b31b (diff) |
Check if $prefix/lib is a prefix of GCC plugin dir
libdir might be $prefix/lib64.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/gcc-plugin.m4 | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/m4/gcc-plugin.m4 b/m4/gcc-plugin.m4 index 27ce15d..2f160b0 100644 --- a/m4/gcc-plugin.m4 +++ b/m4/gcc-plugin.m4 @@ -78,15 +78,21 @@ else e_exec_prefix=$exec_prefix fi + # On some systems GCC is installed into $prefix/lib even though + # libdir is $prefix/lib64 and libexecdir is $prefix/libexec. To + # cover this special case, we will also test $prefix/lib. + # e_libdir=`echo "$libdir" | sed "s?^\\\${exec_prefix}?$e_exec_prefix?"` e_libexecdir=`echo "$libexecdir" | sed "s?^\\\${exec_prefix}?$e_exec_prefix?"` + e_libdir32=$e_exec_prefix/lib # See if either one of them is a prefix of the plugin dir. # ld_suffix=`echo "$dir" | sed "s?^$e_libdir/*??"` led_suffix=`echo "$dir" | sed "s?^$e_libexecdir/*??"` + l32d_suffix=`echo "$dir" | sed "s?^$e_libdir32/*??"` - if test x$ld_suffix != x$dir -o x$led_suffix != x$dir; then + if test x$ld_suffix != x$dir -o x$led_suffix != x$dir -o x$l32d_suffix != x$dir; then gcc_plugin_dir=$dir else gcc_plugin_dir=no |