libtool
[Top][All Lists]
Advanced

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

Re: Linking some libraries as static and others as shared


From: dreamcat four
Subject: Re: Linking some libraries as static and others as shared
Date: Wed, 23 Sep 2009 00:11:40 +0100

On Tue, Sep 22, 2009 at 9:07 PM, Ralf Wildenhues <address@hidden> wrote:
> This is a TODO feature:
> <http://thread.gmane.org/gmane.comp.gnu.libtool.patches/6729/focus=6730>
>
> Cheers,
> Ralf
>

Cool.

Until then I just wanted to say there's was one omission in this
work-around. You must make sure to run AC_LIBTOOL_SYS_DYNAMIC_LINKER
beforehand which sets the default load paths variable.

It actually should be something like this:

        # Get the default library search paths ($sys_lib_search_path_spec)
        AC_LIBTOOL_SYS_DYNAMIC_LINKER

        if test "$ext_shared" = "yes"; then
                if test -n "$ac_libevent_path"; then
                        LIBEVENT_LIBS="-L$ac_libevent_path/lib -levent"
                else
                        LIBEVENT_LIBS="-levent"
                fi
        else
                libevent_a="libevent.a"
                if test -n "$ac_libevent_path"; then
                        if test -f "$ac_libevent_path/lib/$libevent_a" ; then
                                
LIBEVENT_LIBS="$ac_libevent_path/lib/$libevent_a"
                        fi
                else
                        for search_path in $sys_lib_search_path_spec ; do
                                if test -f "$search_path$libevent_a" ; then
                                        LIBEVENT_LIBS="$search_path$libevent_a"
                                        break;
                                fi
                        done
                fi
                if test -z "$LIBEVENT_LIBS"; then
                        AC_MSG_ERROR([libevent.a could not be found. Use 
--with-libevent=shared])
                fi
        fi


dreamcat4
address@hidden




reply via email to

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