Browse Source

* automatic dynamic / static linking detection

git-svn-id: trunk@11532 -
ivost 17 years ago
parent
commit
1a461c43fc
1 changed files with 10 additions and 2 deletions
  1. 10 2
      packages/libxml/src/libxml2.pas

+ 10 - 2
packages/libxml/src/libxml2.pas

@@ -8,13 +8,21 @@ interface
 uses
   ctypes;
 
-{.$DEFINE DYNLINK}
+{$IFDEF WINDOWS}
+  {$DEFINE DYNLINK}
+{$ENDIF}
 
 {$IFDEF DYNLINK}
 const
+{$IF Defined(WINDOWS)}
+  libxml2lib = 'libxml2.dll';
+{$ELSEIF Defined(UNIX)}
   libxml2lib = 'libxml2.so';
 {$ELSE}
-  {$LINKLIB libxml2.so}
+  {$MESSAGE ERROR 'DYNLINK not supported'}
+{$IFEND}
+{$ELSE}
+  {$LINKLIB libxml2}
 {$ENDIF}
 
 {$i xmlexports.inc}