Description: Change buildsystem setup for Debian
 We cannot use --march, because we need to support many of them -- not even
 'native', as it will over-optimize for the build machine.
 We set an RPATH to let binaries find the private shared lib. This is
 safe, because the shared library is built by and shipped in the same package
 as the binaries.
Forwarded: not-needed
Author: Michael Hanke <michael.hanke@gmail.com>
--- a/sysconf/linux.py
+++ b/sysconf/linux.py
@@ -6,7 +6,7 @@
 lib_suffix = '.so'
 
 cpp = [ 'g++', '-c', '$flags$', '$gtk$', '$path$', '$src$', '-o', '$obj$' ]
-cpp_flags = [ '-Wall', '-march=native', '-fPIC', '-fno-strict-aliasing', '-DGL_GLEXT_PROTOTYPES', '-DUSE_TR1' ]
+cpp_flags = [ '-Wall', '-fPIC', '-fno-strict-aliasing', '-DGL_GLEXT_PROTOTYPES', '-DUSE_TR1' ]
 
 ld = [ 'g++', '$flags$', '$path$', '$obj$', '$mrtrix$', '$gsl$', '$gtk$', '-o', '$bin$' ]
 ld_flags = []
@@ -16,7 +16,7 @@
 ld_lib_flags = []
 
 cpp_flags_debug = cpp_flags + [ '-g' ]
-ld_flags_debug = ld_flags + [ '-g' ]
+ld_flags_debug = ld_flags + [ '-g', '-Wl,--rpath=/usr/lib/mrtrix/lib' ]
 ld_lib_flags_debug = ld_lib_flags + [ '-g' ]
 
 cpp_flags_profile = [ '-pg' ] + cpp_flags_debug
