autoconf
[Top][All Lists]
Advanced

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

RE: libstdc++ on solaris / rpath / gnulib's havelib macros


From: David Byron
Subject: RE: libstdc++ on solaris / rpath / gnulib's havelib macros
Date: Fri, 16 Feb 2007 18:37:58 -0800

On Friday, February 16, 2007 @ 3:35p, David Byron wrote:

> For kicks, I tried
> 
> AC_LIB_LINKFLAGS([stdc++])
> 
> but I got this error (with extra stuff cut out)

Sorry to bother everyone...I figured it out:

-DB

AC_DEFUN([DB_CHECK_STDCXX],[
    if test "x$GCC" = "xyes"; then
      # Figure out the path where g++ finds libstdc++.so
      stdcxx_name=`$CXX -print-file-name=libstdc++.so`
      stdcxx_path=`dirname $stdcxx_name`

      # Although we can say -lstdc++ without specifying -L,
      # we need to specify -L here to get
      # AC_LIB_LINKFLAGS_FROM_LIBS to do the right thing,
      # where the right thing is to determine the
      # appropriate runtime linker path (e.g. -R or -rpath)
      # setting.
      AC_LIB_LINKFLAGS_FROM_LIBS([STDCXX_LDADD],[-L$stdcxx_path])
      AC_MSG_NOTICE([STDCXX_LDADD is $STDCXX_LDADD])

      # Include $STDCXX_LDADD wherever you're linking C++
      # programs...
    fi
])






reply via email to

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