[PPL-devel] Re: Locating sicstus.h

Roberto Bagnara bagnara at cs.unipr.it
Sat Oct 22 08:07:12 CEST 2005


Samir Genaim wrote:
> 
>> so the idea would be that once you know where `sicstus' is you also know
>> where `sicstus.h' is.
> 
> 
> Once you've run sicstus you can use the following sicstus code to get 
> the  relevant environment variables:
> 
>   :- use_module(library(system)).
> 
>   environ('SP_RT_DIR',D1)
>   environ('SP_LIBRARY_DIR',D2)
>   environ('SP_APP_DIR',D3)
> 
> it does not directly give you the path to sicstus.h, but it can be  
> (always??) recovered from the value SP_APP_DIR or SP_RT_DIR I guess.

Thanks Samir.  The solution

   sicstus_prolog_base=$(dirname $(sicstus -f --goal "use_module(library(system)), environ('SP_APP_DIR', X), write(X), nl, halt."))

seems indeed the most reliable one.
Best wishes,

    Roberto

-- 
Prof. Roberto Bagnara
Computer Science Group
Department of Mathematics, University of Parma, Italy
http://www.cs.unipr.it/~bagnara/
mailto:bagnara at cs.unipr.it



More information about the PPL-devel mailing list