
22 Oct
2005
22 Oct
'05
8:07 a.m.
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@cs.unipr.it