libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libunwind-devel] libunwind, autotools, and ARM?


From: Sven Neumann
Subject: Re: [Libunwind-devel] libunwind, autotools, and ARM?
Date: Thu, 05 Aug 2010 09:48:03 +0200

On Thu, 2010-08-05 at 08:15 +0200, Steffen Sledz wrote:

> That's not the way autoconf (especially configure) works. To check if
> a symbol is available in a library it temporarily creates simple test
> source code calling this symbol and tries to link with the library.

Well, you could assume that if the header file is installed, then the
library will be available as well. That's certainly not perfect, but
works reasonably well at least in controlled environments.

Here's what we use in the our configure.ac to check for libunwind and to
determine the appropriate linker flags:


AC_MSG_CHECKING([for target architecture])
case x"$target" in
  xNONE | x)
    target_or_host="$host" ;;
  *)
    target_or_host="$target" ;;
esac
AC_MSG_RESULT([$target_or_host])

case "$target_or_host" in
  i*86-*)
    TARGET_PLATFORM="x86"
    ;;

  x86_64-*)
    TARGET_PLATFORM="x86_64"
    ;;

  arm-*)
    TARGET_PLATFORM="arm"
    ;;
esac

AC_CHECK_HEADER(libunwind.h,
        UNWIND_LIBS="-lunwind-$TARGET_PLATFORM -lunwind",
        AC_MSG_ERROR([
*** libunwind header files missing ***]))
AC_SUBST(UNWIND_LIBS)



Regards,
Sven






reply via email to

[Prev in Thread] Current Thread [Next in Thread]