<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Turn macros on<br>
<a class="moz-txt-link-freetext" href="http://www.freepascal.org/docs-html/prog/progse4.html">http://www.freepascal.org/docs-html/prog/progse4.html</a><br>
<br>
Stephano<br>
<br>
On 11/05/13 15:14, Geoffray Levasseur-Brandin wrote:<br>
</div>
<blockquote cite="mid:4541178.tlKc8s1vJr@sabayon-pc" type="cite">
<pre wrap="">Hi everybody,
I'm trying to make an application that need to be FHS compliant. For that I
want be abble to pass some strings as compile time parameters (eg. the famous
$PREFIX). I tryed this :
// installation paths defines
{$if undefined(PREFIX)}
{$DEFINE PREFIX:='/usr/local'}
{$endif}
{$if undefined(BINDIR)}
{$DEFINE BINDIR:=(PREFIX) + '/bin'}
{$endif}
{$if undefined(SYSCONFDIR)}
{$DEFINE SYSCONFDIR:=(PREFIX) + '/etc'}
{$endif}
{$if undefined(LOCALSTATEDIR)}
{$DEFINE LOCALSTATEDIR=(PREFIX) + '/var'}
{$endif}
But I havec those errors :
defines.inc(68,5) Error: Compile time expression: Wanted BOOLEAN but got
STRING at IF or ELSEIF
defines.inc(71,5) Error: Compile time expression: Wanted BOOLEAN but got
STRING at IF or ELSEIF
defines.inc(74,5) Error: Compile time expression: Wanted BOOLEAN but got
STRING at IF or ELSEIF
defines.inc(77,5) Error: Compile time expression: Wanted BOOLEAN but got
STRING at IF or ELSEIF
The fact is that I have no idea on how to create and use that kind of defines
and I didn't find something about.
Thank you for any help !
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
fpc-pascal maillist - <a class="moz-txt-link-abbreviated" href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freepascal.org/mailman/listinfo/fpc-pascal">http://lists.freepascal.org/mailman/listinfo/fpc-pascal</a></pre>
</blockquote>
<br>
</body>
</html>