autoconf
[Top][All Lists]
Advanced

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

Re: How can I test if the GNU or Sun linker is used?


From: Bob Friesenhahn
Subject: Re: How can I test if the GNU or Sun linker is used?
Date: Thu, 6 Aug 2009 21:11:01 -0500 (CDT)

On Fri, 7 Aug 2009, Dr. David Kirkby wrote:

This gcc on Solaris (SPARC) for example is build with both the Sun linker and assembler.

Parsing the output of gcc -v is not an option, as its not necessary for these to be specified - one could leave them, and let the gcc configure script chose one.

Ignore the other guy ...

This is the type of code I am using to determine if GNU ld is used under Solaris:

AC_CACHE_CHECK([for linker lazyload option],[gm_cv_ld_lazyload],
[
gm_cv_ld_lazyload='none'
case "${host}" in
  *-*-solaris2.8 | *-*-solaris2.9 | *-*-solaris2.1? )
    if test "$lt_cv_prog_gnu_ld" != 'yes' ; then
       gm_cv_ld_lazyload='-Wl,-zlazyload'
    fi
    ;;
esac
])

The test of $lt_cv_prog_gnu_ld needs to occur after libtool has been configured. If you are not using libtool, then you will need to see how libtool does it.

Bob
--
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/




reply via email to

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