From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=AWL,MISSING_HEADERS autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 8CFE1BC0A for ; Thu, 15 Mar 2007 14:38:31 +0100 (CET) Received: from amazone2.ujf-grenoble.fr (amazone2.ujf-grenoble.fr [152.77.2.202]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l2FDcVNi032265 for ; Thu, 15 Mar 2007 14:38:31 +0100 Received: from tana1.ujf-grenoble.fr (tana1.ujf-grenoble.fr [152.77.18.74]) by amazone2.ujf-grenoble.fr (8.13.7/8.13.7/Configured by JE 21 07 2006) with ESMTP id l2FDcVvD003201 for ; Thu, 15 Mar 2007 14:38:31 +0100 (CET) Received: from localhost (unknown [127.0.0.1]) by tana1.ujf-grenoble.fr (Postfix) with ESMTP id E0BCE198424 for ; Thu, 15 Mar 2007 14:38:30 +0100 (CET) X-Virus-Scanned: Scanned on tana1.ujf-grenoble.fr Received: from tana1.ujf-grenoble.fr ([127.0.0.1]) by localhost (tana1.ujf-grenoble.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1TZPUOf+KL6a for ; Thu, 15 Mar 2007 14:38:30 +0100 (CET) Received: from tibre2.ujf-grenoble.fr (tibre2.ujf-grenoble.fr [152.77.24.10]) by tana1.ujf-grenoble.fr (Postfix) with ESMTP id ACC0C19841F for ; Thu, 15 Mar 2007 14:38:30 +0100 (CET) Received: from bruch.ujf-grenoble.fr (bruch.ujf-grenoble.fr [193.54.241.15]) by tibre2.ujf-grenoble.fr (8.13.3/8.13.3) with ESMTP id l2FDcUV1029110 for ; Thu, 15 Mar 2007 14:38:30 +0100 (CET) (envelope-from san.vu-ngoc@ujf-grenoble.fr) Received: from localhost (localhost [127.0.0.1]) by bruch.ujf-grenoble.fr (Postfix) with ESMTP id 6D56A4F99E for ; Thu, 15 Mar 2007 14:38:30 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at fourier.ujf-grenoble.fr Received: from bruch.ujf-grenoble.fr ([127.0.0.1]) by localhost (bruch.ujf-grenoble.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vk4-fvCrx79D for ; Thu, 15 Mar 2007 14:38:29 +0100 (CET) Received: from [193.48.255.250] (ifpoolext7.ujf-grenoble.fr [193.48.255.250]) by bruch.ujf-grenoble.fr (Postfix) with ESMTP id 9E10E4F99C for ; Thu, 15 Mar 2007 14:38:29 +0100 (CET) Message-ID: <45F94C51.8030100@ujf-grenoble.fr> Date: Thu, 15 Mar 2007 14:38:25 +0100 From: Vu Ngoc San User-Agent: IceDove 1.5.0.10 (X11/20070307) MIME-Version: 1.0 Cc: caml-list@inria.fr Subject: dynamically finding libraries References: <45F87661.4020504@softhome.net> In-Reply-To: <45F87661.4020504@softhome.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 45F94C57.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; more-or-less:01 run-time:01 .0.:98 dynamically:01 native:02 library:03 library:03 compiled:04 install:05 uses:06 linux:06 linux:06 standard:07 suspect:08 machine:09 I have a program compiled to native code on a linux machine, which uses some more-or-less "standard" library like libpangocairo-1.0.so.0. Since this library is not universally present on all linux boxes, I suspect it might be not so easy for an average user to install it. Moreover, it's very small. Therefore I decide to ship it with my software. The question is: is there a way to decide, at run-time, whether the user already has this library or not ? If so, I can ignore (and even delete) the version I shipped, and use the user's library. If not, I fall back on "my" version. San