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: Tue, 22 Sep 2009 16:53:02 +0100

On Sat, Sep 19, 2009 at 5:28 PM, dreamcat four <address@hidden> wrote:
> Hi,
> Is there some safe and architecture - independant way to tell libtool
> to link one of the libraries statically, with all others remaining
> dynamic? This is to produce a php-fpm binary file.

Well,
Here is one solution, which looks in $sys_lib_search_path_spec to get
the default library search paths.

                        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]