[fpc-devel] [PATCH] fpcmmain.pp: fixed FPCDIR detection on x86_64

Alexey Tourbin at at altlinux.ru
Sat Jan 27 18:57:15 CET 2007


---
 fpcmmain.pp |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/fpcmmain.pp b/fpcmmain.pp
index 9a1dd3a..a2a9a90 100644
--- a/fpcmmain.pp
+++ b/fpcmmain.pp
@@ -1146,6 +1146,13 @@ implementation
 
 
     procedure TFPCMake.AddFPCDefaultVariables;
+      const
+        ppc =
+{$ifdef cpux86_64}
+          'ppcx64';
+{$else}
+          'ppc386';
+{$endif}
       var
         hs,s : string;
       begin
@@ -1182,9 +1189,9 @@ implementation
          begin
 {$ifdef UNIX}
 {$ifndef NO_UNIX_UNIT}
-           if FileExists('/usr/local/bin/ppc386') then
+           if FileExists('/usr/local/bin/'+ppc) then
             begin
-              s:=ExtractFilePath({$ifdef ver1_0}ReadLink{$else}fpReadlink{$endif}('/usr/local/bin/ppc386'));
+              s:=ExtractFilePath({$ifdef ver1_0}ReadLink{$else}fpReadlink{$endif}('/usr/local/bin/'+ppc));
               if s<>'' then
                begin
                  if s[length(s)]='/' then
@@ -1194,9 +1201,9 @@ implementation
             end;
            if hs='' then
             begin
-              if FileExists('/usr/bin/ppc386') then
+              if FileExists('/usr/bin/'+ppc) then
                begin
-                 s:=ExtractFilePath({$ifdef ver1_0}ReadLink{$else}fpReadLink{$endif}('/usr/bin/ppc386'));
+                 s:=ExtractFilePath({$ifdef ver1_0}ReadLink{$else}fpReadLink{$endif}('/usr/bin/'+ppc));
                  if s<>'' then
                   begin
                     if s[length(s)]='/' then
-- 
1.4.4.3.GIT



More information about the fpc-devel mailing list