On Thu, Jun 27, 2013 at 10:41 PM, Mike Frysinger <vap...@gentoo.org> wrote: > On Tuesday 25 June 2013 02:41:21 Luca Clementi wrote: >> On Mon, Jun 24, 2013 at 8:42 AM, Mike Frysinger <vap...@gentoo.org> wrote: >> > On Monday 24 June 2013 03:18:58 Luca Clementi wrote: >> >> + AC_CHECK_LIB([unwind], [backtrace],[],[ >> >> + AC_MSG_FAILURE([Unable to find libunwind]) >> >> + ]) >> >> + AC_CHECK_LIB([unwind-$arch], [_U${arch}_create_addr_space],[], >> >> [ + AC_MSG_FAILURE([Unable to find >> >> libunwind-$arch]) + ]) >> > >> > is the $arch stuff really necessary ? isn't linking to -lunwind >> > sufficient ? >> >> Actually what I do need is the libunwind-ptrace, but the problem is >> that -lunwind-ptrace depends on -lunwind-$arch (basically they put all >> the arch dependent code in there) so if you test libunwind-ptrace you >> need to have the -lunwind-$arch in your linker flags if not the test >> fails. > > i think what you want is to use PKG_CHECK_MODULES and look up libunwind- > generic instead. libunwind takes care of linking that to the right arch. > lrwxrwxrwx 1 root root 19 Nov 2 2012 /usr/lib64/libunwind-generic.so -> > libunwind-x86_64.so
Hey Mike, Thanks for pointing it out, using libunwind-generic is a cleaner test. Regarding PKG_CHECKS_MODULE I am not too convinced (although I must say that I am not an expert of autoconf). For example Ubuntu 12.04 the system libunwind7 and libunwind7-dev do not include the .pc files needed by PKG_CHECKS_MODULE. I have been looking around and I found that ltrace uses libunwind for the same purpose and it uses AC_CHECK_LIB to do its checks: http://anonscm.debian.org/gitweb/?p=collab-maint/ltrace.git;a=blob;f=configure.ac;h=16c7a615962d23c7fd733e7d2b67145d75e0a9de;hb=HEAD#l132 I will post shortly a solution based on ltrace autoconf script. Please let me know if you have issue with that. Luca ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ Strace-devel mailing list Strace-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/strace-devel