Browse Source

Update SDL2 to support static linking

Coldzer0 1 year ago
parent
commit
b54099db27
45 changed files with 792 additions and 788 deletions
  1. 5 5
      SDL2-for-Pascal/units/sdl.inc
  2. 5 1
      SDL2-for-Pascal/units/sdl2.pas
  3. 2 2
      SDL2-for-Pascal/units/sdl2_image.pas
  4. 3 3
      SDL2-for-Pascal/units/sdl2_mixer.pas
  5. 2 2
      SDL2-for-Pascal/units/sdl2_ttf.pas
  6. 10 10
      SDL2-for-Pascal/units/sdlatomic.inc
  7. 38 38
      SDL2-for-Pascal/units/sdlaudio.inc
  8. 1 1
      SDL2-for-Pascal/units/sdlblendmode.inc
  9. 6 6
      SDL2-for-Pascal/units/sdlclipboard.inc
  10. 21 21
      SDL2-for-Pascal/units/sdlcpuinfo.inc
  11. 5 5
      SDL2-for-Pascal/units/sdlerror.inc
  12. 17 17
      SDL2-for-Pascal/units/sdlevents.inc
  13. 2 2
      SDL2-for-Pascal/units/sdlfilesystem.inc
  14. 56 56
      SDL2-for-Pascal/units/sdlgamecontroller.inc
  15. 4 4
      SDL2-for-Pascal/units/sdlgesture.inc
  16. 2 2
      SDL2-for-Pascal/units/sdlguid.inc
  17. 30 30
      SDL2-for-Pascal/units/sdlhaptic.inc
  18. 19 19
      SDL2-for-Pascal/units/sdlhidapi.inc
  19. 9 9
      SDL2-for-Pascal/units/sdlhints.inc
  20. 58 58
      SDL2-for-Pascal/units/sdljoystick.inc
  21. 19 19
      SDL2-for-Pascal/units/sdlkeyboard.inc
  22. 3 3
      SDL2-for-Pascal/units/sdlloadso.inc
  23. 1 1
      SDL2-for-Pascal/units/sdllocale.inc
  24. 15 15
      SDL2-for-Pascal/units/sdllog.inc
  25. 2 2
      SDL2-for-Pascal/units/sdlmessagebox.inc
  26. 1 1
      SDL2-for-Pascal/units/sdlmisc.inc
  27. 17 17
      SDL2-for-Pascal/units/sdlmouse.inc
  28. 18 18
      SDL2-for-Pascal/units/sdlmutex.inc
  29. 14 14
      SDL2-for-Pascal/units/sdlpixels.inc
  30. 1 1
      SDL2-for-Pascal/units/sdlplatform.inc
  31. 1 1
      SDL2-for-Pascal/units/sdlpower.inc
  32. 10 10
      SDL2-for-Pascal/units/sdlrect.inc
  33. 81 81
      SDL2-for-Pascal/units/sdlrenderer.inc
  34. 30 30
      SDL2-for-Pascal/units/sdlrwops.inc
  35. 17 17
      SDL2-for-Pascal/units/sdlsensor.inc
  36. 4 4
      SDL2-for-Pascal/units/sdlshape.inc
  37. 68 68
      SDL2-for-Pascal/units/sdlstdinc.inc
  38. 39 39
      SDL2-for-Pascal/units/sdlsurface.inc
  39. 34 34
      SDL2-for-Pascal/units/sdlsystem.inc
  40. 1 1
      SDL2-for-Pascal/units/sdlsyswm.inc
  41. 11 11
      SDL2-for-Pascal/units/sdlthread.inc
  42. 7 7
      SDL2-for-Pascal/units/sdltimer.inc
  43. 6 6
      SDL2-for-Pascal/units/sdltouch.inc
  44. 3 3
      SDL2-for-Pascal/units/sdlversion.inc
  45. 94 94
      SDL2-for-Pascal/units/sdlvideo.inc

+ 5 - 5
SDL2-for-Pascal/units/sdl.inc

@@ -42,19 +42,19 @@ const
  *  signal handlers for some commonly ignored fatal signals (like SIGSEGV).
  *}
 function SDL_Init(flags: TSDL_Init): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_Init' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_Init' {$ENDIF} {$ENDIF};
 
 {**
  *  This function initializes specific SDL subsystems
  *}
 function SDL_InitSubSystem(flags: TSDL_Init): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_InitSubSystem' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_InitSubSystem' {$ENDIF} {$ENDIF};
 
 {**
  *  This function cleans up specific SDL subsystems
  *}
 procedure SDL_QuitSubSystem(flags: TSDL_Init); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_QuitSubSystem' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_QuitSubSystem' {$ENDIF} {$ENDIF};
 
 {**
  *  This function returns a mask of the specified subsystems which have
@@ -63,12 +63,12 @@ procedure SDL_QuitSubSystem(flags: TSDL_Init); cdecl;
  *  If flags is 0, it returns a mask of all initialized subsystems.
  *}
 function SDL_WasInit(flags: TSDL_Init): cuint32; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_WasInit' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_WasInit' {$ENDIF} {$ENDIF};
 
 {**
  *  This function cleans up all initialized subsystems. You should
  *  call it upon all exit conditions.
  *}
 procedure SDL_Quit(); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_Quit' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_Quit' {$ENDIF} {$ENDIF};
 

+ 5 - 1
SDL2-for-Pascal/units/sdl2.pas

@@ -60,6 +60,7 @@ unit sdl2;
 {$DEFINE SDL}
 
 {$I jedi.inc}
+{$I ImGuiPasDef.inc}
 
 interface
 
@@ -91,6 +92,9 @@ interface
       UnixType;
   {$ENDIF}
 
+{$IfNDef DYNAMIC_LINK}
+  {$LinkLib SDL2}
+{$ELSE}
 const
 
   {$IFDEF WINDOWS}
@@ -119,7 +123,7 @@ const
       {$linklib libSDL2}
     {$ENDIF}
   {$ENDIF}
-
+{$EndIf}
 
 {$DEFINE WANT_CWCHAR_T}
 {$I ctypes.inc}                  // C data types

+ 2 - 2
SDL2-for-Pascal/units/sdl2_image.pas

@@ -170,10 +170,10 @@ function IMG_SaveJPG_RW(surface: PSDL_Surface; dst: PSDL_RWops; freedst: cint32;
 
 {* We'll use SDL for reporting errors *}
 function IMG_SetError(fmt: PAnsiChar; args: array of const): cint; cdecl;
-  external SDL_LibName
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF}
   name {$IF DEFINED(DELPHI) AND DEFINED(MACOS)} '_SDL_SetError' {$ELSE} 'SDL_SetError' {$ENDIF};
 function IMG_GetError: PAnsiChar; cdecl;
-  external SDL_LibName
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF}
   name {$IF DEFINED(DELPHI) AND DEFINED(MACOS)} '_SDL_GetError' {$ELSE} 'SDL_GetError' {$ENDIF};
 
 implementation

+ 3 - 3
SDL2-for-Pascal/units/sdl2_mixer.pas

@@ -685,13 +685,13 @@ procedure Mix_CloseAudio cdecl; external MIX_LibName {$IFDEF DELPHI} {$IFDEF MAC
 
 {* We'll use SDL for reporting errors *}
 function Mix_SetError(const fmt: PAnsiChar; args: array of const): cint; cdecl;
-  external SDL_LibName
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF}
   name {$IF DEFINED(DELPHI) AND DEFINED(MACOS)} '_SDL_SetError' {$ELSE} 'SDL_SetError' {$ENDIF};
 function Mix_GetError: PAnsiChar; cdecl;
-  external SDL_LibName
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF}
   name {$IF DEFINED(DELPHI) AND DEFINED(MACOS)} '_SDL_GetError' {$ELSE} 'SDL_GetError' {$ENDIF};
 procedure Mix_ClearError(); cdecl;
-  external SDL_LibName
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF}
   name {$IF DEFINED(DELPHI) AND DEFINED(MACOS)} '_SDL_ClearError' {$ELSE} 'SDL_ClearError' {$ENDIF};
 
 implementation

+ 2 - 2
SDL2-for-Pascal/units/sdl2_ttf.pas

@@ -2260,7 +2260,7 @@ function TTF_GetFontSDF(font: PTTF_Font): TSDL_bool; cdecl;
  * \sa TTF_GetError
   }
 function TTF_SetError(const fmt: PAnsiChar; args: array of const): cint; cdecl;
-  external SDL_LibName
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF}
   name {$IF DEFINED(DELPHI) AND DEFINED(MACOS)} '_SDL_SetError' {$ELSE} 'SDL_SetError' {$ENDIF};
 
 {*
@@ -2269,7 +2269,7 @@ function TTF_SetError(const fmt: PAnsiChar; args: array of const): cint; cdecl;
  * \sa TTF_SetError
   }
 function TTF_GetError: PAnsiChar; cdecl;
-  external SDL_LibName
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF}
   name {$IF DEFINED(DELPHI) AND DEFINED(MACOS)} '_SDL_GetError' {$ELSE} 'SDL_GetError' {$ENDIF};
 
 {*

+ 10 - 10
SDL2-for-Pascal/units/sdlatomic.inc

@@ -18,13 +18,13 @@ type
  * Try to lock a spin lock by setting it to a non-zero value.
  *}
 function SDL_AtomicTryLock(lock: PSDL_SpinLock): TSDL_bool; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AtomicTryLock' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AtomicTryLock' {$ENDIF} {$ENDIF};
 
 {**
  * Lock a spin lock by setting it to a non-zero value.
  *}
 function SDL_AtomicLock(lock: PSDL_SpinLock): TSDL_bool; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AtomicLock' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AtomicLock' {$ENDIF} {$ENDIF};
 
 {**
  * Unlock a spin lock by setting it to 0.
@@ -32,7 +32,7 @@ function SDL_AtomicLock(lock: PSDL_SpinLock): TSDL_bool; cdecl;
  * Always returns immediately.
  *}
 procedure SDL_AtomicUnlock(lock: PSDL_SpinLock); cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AtomicUnlock' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AtomicUnlock' {$ENDIF} {$ENDIF};
 
 {**
  * The compiler barrier prevents the compiler from reordering
@@ -55,7 +55,7 @@ type
  * Set an atomic variable to a new value if it is currently an old value.
  *}
 function SDL_AtomicCAS(atomic: PSDL_Atomic; oldValue, newValue: cint): TSDL_bool; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AtomicCAS' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AtomicCAS' {$ENDIF} {$ENDIF};
 
 {**
  * Set an atomic variable to a new value and return the old one.
@@ -63,13 +63,13 @@ function SDL_AtomicCAS(atomic: PSDL_Atomic; oldValue, newValue: cint): TSDL_bool
  * This function also acts as a full memory barrier.
  *}
 function SDL_AtomicSet(atomic: PSDL_Atomic; value: cint): cint; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AtomicSet' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AtomicSet' {$ENDIF} {$ENDIF};
 
 {**
  * Get the value of an atomic variable.
  *}
 function SDL_AtomicGet(atomic: PSDL_Atomic): cint; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AtomicGet' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AtomicGet' {$ENDIF} {$ENDIF};
 
 {**
  * Add to an atomic variable, and return the old value.
@@ -77,7 +77,7 @@ function SDL_AtomicGet(atomic: PSDL_Atomic): cint; cdecl;
  * This function also acts as a full memory barrier.
  *}
 function SDL_AtomicAdd(atomic: PSDL_Atomic; value: cint): cint; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AtomicAdd' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AtomicAdd' {$ENDIF} {$ENDIF};
 
 {**
  * Increment an atomic variable used as a reference count.
@@ -93,17 +93,17 @@ function SDL_AtomicDecRef(atomic: PSDL_Atomic): Boolean;
  * Set a pointer to a new value if it is currently an old value.
  *}
 function SDL_AtomicCASPtr(ptr: PPointer; oldValue, newValue: Pointer): TSDL_bool; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AtomicCASPtr' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AtomicCASPtr' {$ENDIF} {$ENDIF};
 
 {**
  * Set a pointer to a new value atomically, and return the old value.
  *}
 function SDL_AtomicSetPtr(ptr: PPointer; value: Pointer): Pointer; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AtomicSetPtr' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AtomicSetPtr' {$ENDIF} {$ENDIF};
 
 {**
  * Get the value of a pointer atomically.
  *}
 function SDL_AtomicGetPtr(ptr: PPointer): Pointer; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AtomicGetPtr' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AtomicGetPtr' {$ENDIF} {$ENDIF};
 

+ 38 - 38
SDL2-for-Pascal/units/sdlaudio.inc

@@ -220,7 +220,7 @@ type
    * \sa SDL_GetAudioDriver
    *}
 function SDL_GetNumAudioDrivers: cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetNumAudioDrivers' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetNumAudioDrivers' {$ENDIF} {$ENDIF};
 
 {**
  * Use this function to get the name of a built in audio driver.
@@ -243,7 +243,7 @@ function SDL_GetNumAudioDrivers: cint; cdecl;
  * \sa SDL_GetNumAudioDrivers
  *}
 function SDL_GetAudioDriver(index: cint): PAnsiChar; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetAudioDriver' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetAudioDriver' {$ENDIF} {$ENDIF};
 
   {**
    *   Initialization and cleanup
@@ -269,7 +269,7 @@ function SDL_GetAudioDriver(index: cint): PAnsiChar; cdecl;
  * \sa SDL_AudioQuit
  *}
 function SDL_AudioInit(driver_name: PAnsiChar): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AudioInit' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AudioInit' {$ENDIF} {$ENDIF};
 
 {**
  * Use this function to shut down audio if you initialized it with
@@ -284,7 +284,7 @@ function SDL_AudioInit(driver_name: PAnsiChar): cint; cdecl;
  * \sa SDL_AudioInit
  *}
 procedure SDL_AudioQuit; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AudioQuit' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AudioQuit' {$ENDIF} {$ENDIF};
 
   {**
  * Get the name of the current audio driver.
@@ -303,7 +303,7 @@ procedure SDL_AudioQuit; cdecl;
  * \sa SDL_AudioInit
  *}
 function SDL_GetCurrentAudioDriver: PAnsiChar; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetCurrentAudioDriver' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetCurrentAudioDriver' {$ENDIF} {$ENDIF};
 
 {**
  * This function is a legacy means of opening the audio device.
@@ -353,7 +353,7 @@ function SDL_GetCurrentAudioDriver: PAnsiChar; cdecl;
  * \sa SDL_UnlockAudio
  *}
 function SDL_OpenAudio(desired: PSDL_AudioSpec; obtained: PSDL_AudioSpec): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_OpenAudio' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_OpenAudio' {$ENDIF} {$ENDIF};
 
   {**
    *  SDL Audio Device IDs.
@@ -414,7 +414,7 @@ type
  * \sa SDL_OpenAudioDevice
  *}
 function SDL_GetNumAudioDevices(iscapture: cint): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetNumAudioDevices' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetNumAudioDevices' {$ENDIF} {$ENDIF};
 
 {**
  * Get the human-readable name of a specific audio device.
@@ -442,7 +442,7 @@ function SDL_GetNumAudioDevices(iscapture: cint): cint; cdecl;
  * \sa SDL_GetDefaultAudioInfo
  *}
 function SDL_GetAudioDeviceName(index: cint; iscapture: cint): PAnsiChar; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetAudioDeviceName' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetAudioDeviceName' {$ENDIF} {$ENDIF};
 
 {*
  * Get the preferred audio format of a specific audio device.
@@ -468,7 +468,7 @@ function SDL_GetAudioDeviceName(index: cint; iscapture: cint): PAnsiChar; cdecl;
  * \sa SDL_GetDefaultAudioInfo
   }
 function SDL_GetAudioDeviceSpec(index: cint; iscapture: cint; spec: PSDL_AudioSpec): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetAudioDeviceSpec' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetAudioDeviceSpec' {$ENDIF} {$ENDIF};
 
 {*
  * Get the name and preferred format of the default audio device.
@@ -501,7 +501,7 @@ function SDL_GetAudioDeviceSpec(index: cint; iscapture: cint; spec: PSDL_AudioSp
  * \sa SDL_OpenAudioDevice
   }
 function SDL_GetDefaultAudioInfo(name: PPAnsiChar; spec: PSDL_AudioSpec; iscapture: cint): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetDefaultAudioInfo' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetDefaultAudioInfo' {$ENDIF} {$ENDIF};
 
 {**
  * Open a specific audio device.
@@ -619,7 +619,7 @@ function SDL_OpenAudioDevice(device: PAnsiChar;
                              desired: PSDL_AudioSpec;
                              obtained: PSDL_AudioSpec;
                              allowed_changes: cint): TSDL_AudioDeviceID; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_OpenAudioDevice' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_OpenAudioDevice' {$ENDIF} {$ENDIF};
 
   {**
    *   Audio state
@@ -656,7 +656,7 @@ const
  * \sa SDL_GetAudioDeviceStatus
  *}
 function SDL_GetAudioStatus: TSDL_AudioStatus; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetAudioStatus' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetAudioStatus' {$ENDIF} {$ENDIF};
 
 {**
  * Use this function to get the current audio state of an audio device.
@@ -670,7 +670,7 @@ function SDL_GetAudioStatus: TSDL_AudioStatus; cdecl;
  * \sa SDL_PauseAudioDevice
  *}
 function SDL_GetAudioDeviceStatus(dev: TSDL_AudioDeviceID): TSDL_AudioStatus; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetAudioDeviceStatus' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetAudioDeviceStatus' {$ENDIF} {$ENDIF};
 
 {*Audio State*}
 
@@ -704,7 +704,7 @@ function SDL_GetAudioDeviceStatus(dev: TSDL_AudioDeviceID): TSDL_AudioStatus; cd
  * \sa SDL_PauseAudioDevice
  *}
 procedure SDL_PauseAudio(pause_on: cint); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_PauseAudio' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_PauseAudio' {$ENDIF} {$ENDIF};
 
 {**
  * Use this function to pause and unpause audio playback on a specified
@@ -735,7 +735,7 @@ procedure SDL_PauseAudio(pause_on: cint); cdecl;
  * \sa SDL_LockAudioDevice
  *}
 procedure SDL_PauseAudioDevice(dev: TSDL_AudioDeviceID; pause_on: cint); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_PauseAudioDevice' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_PauseAudioDevice' {$ENDIF} {$ENDIF};
 
 {*Pause audio functions*}
 
@@ -825,7 +825,7 @@ function SDL_LoadWAV_RW(src: PSDL_RWops;
                         spec: PSDL_AudioSpec;
                         audio_buf: ppcuint8;
                         audio_len: pcuint32): PSDL_AudioSpec; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LoadWAV_RW' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LoadWAV_RW' {$ENDIF} {$ENDIF};
 
 {**
  *  Loads a WAV from a file.
@@ -849,7 +849,7 @@ function SDL_LoadWAV(file_: PAnsiChar; spec: PSDL_AudioSpec; audio_buf: ppcuint8
  * \sa SDL_LoadWAV_RW
  *}
 procedure SDL_FreeWAV(audio_buf: pcuint8); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_FreeWAV' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_FreeWAV' {$ENDIF} {$ENDIF};
 
 {**
  * Initialize an SDL_AudioCVT structure for conversion.
@@ -890,7 +890,7 @@ function SDL_BuildAudioCVT(cvt: PSDL_AudioCVT;
                            dst_format: TSDL_AudioFormat;
                            dst_channels: cuint8;
                            dst_rate: cint): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_BuildAudioCVT' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_BuildAudioCVT' {$ENDIF} {$ENDIF};
 
 {**
  * Convert audio data to a desired audio format.
@@ -931,7 +931,7 @@ function SDL_BuildAudioCVT(cvt: PSDL_AudioCVT;
  * \sa SDL_BuildAudioCVT
  *}
 function SDL_ConvertAudio(cvt: PSDL_AudioCVT): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ConvertAudio' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ConvertAudio' {$ENDIF} {$ENDIF};
 
 { SDL_AudioStream is a new audio conversion interface.
    The benefits vs SDL_AudioCVT:
@@ -967,7 +967,7 @@ type
   }
 function SDL_NewAudioStream(src_format: TSDL_AudioFormat; src_channels: cuint8; src_rate: cint; dst_format: TSDL_AudioFormat; dst_channels: cuint8;
            dst_rate: cint): PSDL_AudioStream; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_NewAudioStream' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_NewAudioStream' {$ENDIF} {$ENDIF};
 
 {*
  * Add data to be converted/resampled to the stream.
@@ -987,7 +987,7 @@ function SDL_NewAudioStream(src_format: TSDL_AudioFormat; src_channels: cuint8;
  * \sa SDL_FreeAudioStream
   }
 function SDL_AudioStreamPut(stream: PSDL_AudioStream; buf: pointer; len: cint): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AudioStreamPut' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AudioStreamPut' {$ENDIF} {$ENDIF};
 
 {*
  * Get converted/resampled data from the stream
@@ -1007,7 +1007,7 @@ function SDL_AudioStreamPut(stream: PSDL_AudioStream; buf: pointer; len: cint):
  * \sa SDL_FreeAudioStream
   }
 function SDL_AudioStreamGet(stream: PSDL_AudioStream; buf: pointer; len: cint): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AudioStreamGet' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AudioStreamGet' {$ENDIF} {$ENDIF};
 
 {*
  * Get the number of converted/resampled bytes available.
@@ -1026,7 +1026,7 @@ function SDL_AudioStreamGet(stream: PSDL_AudioStream; buf: pointer; len: cint):
  * \sa SDL_FreeAudioStream
   }
 function SDL_AudioStreamAvailable(stream: PSDL_AudioStream): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AudioStreamAvailable' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AudioStreamAvailable' {$ENDIF} {$ENDIF};
 
 {*
  * Tell the stream that you're done sending data, and anything being buffered
@@ -1046,7 +1046,7 @@ function SDL_AudioStreamAvailable(stream: PSDL_AudioStream): cint; cdecl;
  * \sa SDL_FreeAudioStream
   }
 function SDL_AudioStreamFlush(stream: PSDL_AudioStream): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AudioStreamFlush' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AudioStreamFlush' {$ENDIF} {$ENDIF};
 
 {*
  * Clear any pending data in the stream without converting it
@@ -1061,7 +1061,7 @@ function SDL_AudioStreamFlush(stream: PSDL_AudioStream): cint; cdecl;
  * \sa SDL_FreeAudioStream
   }
 procedure SDL_AudioStreamClear(stream: PSDL_AudioStream); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AudioStreamClear' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AudioStreamClear' {$ENDIF} {$ENDIF};
 
 {*
  * Free an audio stream
@@ -1076,7 +1076,7 @@ procedure SDL_AudioStreamClear(stream: PSDL_AudioStream); cdecl;
  * \sa SDL_AudioStreamClear
   }
 procedure SDL_FreeAudioStream(stream: PSDL_AudioStream); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_FreeAudioStream' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_FreeAudioStream' {$ENDIF} {$ENDIF};
 
 const
   SDL_MIX_MAXVOLUME = 128;
@@ -1104,7 +1104,7 @@ const
  * \sa SDL_MixAudioFormat
  *}
 procedure SDL_MixAudio(dst: pcuint8; src: pcuint8; len: cuint32; volume: cint); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_MixAudio' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_MixAudio' {$ENDIF} {$ENDIF};
 
   {**
  * Mix audio data in a specified format.
@@ -1137,7 +1137,7 @@ procedure SDL_MixAudio(dst: pcuint8; src: pcuint8; len: cuint32; volume: cint);
  * \since This function is available since SDL 2.0.0.
  *}
 procedure SDL_MixAudioFormat(dst: pcuint8; src: pcuint8; format: TSDL_AudioFormat; len: cuint32; volume: cint); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_MixAudioFormat' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_MixAudioFormat' {$ENDIF} {$ENDIF};
 
   {**
  * Queue more audio on non-callback devices.
@@ -1186,7 +1186,7 @@ procedure SDL_MixAudioFormat(dst: pcuint8; src: pcuint8; format: TSDL_AudioForma
  * \sa SDL_GetQueuedAudioSize
  *}
 function SDL_QueueAudio(dev: TSDL_AudioDeviceID; data: Pointer; len: cuint32): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_QueueAudio' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_QueueAudio' {$ENDIF} {$ENDIF};
 
   {**
  * Dequeue more audio on non-callback devices.
@@ -1235,7 +1235,7 @@ function SDL_QueueAudio(dev: TSDL_AudioDeviceID; data: Pointer; len: cuint32): c
  * \sa SDL_GetQueuedAudioSize
  *}
 function SDL_DequeueAudio(dev: TSDL_AudioDeviceID; data: Pointer; len: cuint32): cuint32; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_DequeueAudio' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_DequeueAudio' {$ENDIF} {$ENDIF};
 
 {**
  * Get the number of bytes of still-queued audio.
@@ -1270,7 +1270,7 @@ function SDL_DequeueAudio(dev: TSDL_AudioDeviceID; data: Pointer; len: cuint32):
  * \sa SDL_DequeueAudio
  *}
 function SDL_GetQueuedAudioSize(dev: TSDL_AudioDeviceID): cuint32; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetQueuedAudioSize' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetQueuedAudioSize' {$ENDIF} {$ENDIF};
 
   {**
  * Drop any queued audio data waiting to be sent to the hardware.
@@ -1305,7 +1305,7 @@ function SDL_GetQueuedAudioSize(dev: TSDL_AudioDeviceID): cuint32; cdecl;
  * \sa SDL_DequeueAudio
  *}
 procedure SDL_ClearQueuedAudio(dev: TSDL_AudioDeviceID); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ClearQueuedAudio' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ClearQueuedAudio' {$ENDIF} {$ENDIF};
 
   {**
    *   Audio lock functions
@@ -1335,7 +1335,7 @@ procedure SDL_ClearQueuedAudio(dev: TSDL_AudioDeviceID); cdecl;
  * \sa SDL_UnlockAudioDevice
  *}
 procedure SDL_LockAudio; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LockAudio' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LockAudio' {$ENDIF} {$ENDIF};
 
 {**
  * Use this function to lock out the audio callback function for a specified
@@ -1375,7 +1375,7 @@ procedure SDL_LockAudio; cdecl;
  * \sa SDL_UnlockAudioDevice
  *}
 procedure SDL_LockAudioDevice(dev: TSDL_AudioDeviceID); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LockAudioDevice' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LockAudioDevice' {$ENDIF} {$ENDIF};
 
 {**
  * This function is a legacy means of unlocking the audio device.
@@ -1395,7 +1395,7 @@ procedure SDL_LockAudioDevice(dev: TSDL_AudioDeviceID); cdecl;
  * \sa SDL_UnlockAudioDevice
  *}
 procedure SDL_UnlockAudio; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_Unlock' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_Unlock' {$ENDIF} {$ENDIF};
 
 {**
  * Use this function to unlock the audio callback function for a specified
@@ -1410,7 +1410,7 @@ procedure SDL_UnlockAudio; cdecl;
  * \sa SDL_LockAudioDevice
  *}
 procedure SDL_UnlockAudioDevice(dev: TSDL_AudioDeviceID); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_UnlockAudioDevice' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_UnlockAudioDevice' {$ENDIF} {$ENDIF};
 
 {*Audio lock functions*}
 
@@ -1430,7 +1430,7 @@ procedure SDL_UnlockAudioDevice(dev: TSDL_AudioDeviceID); cdecl;
  * \sa SDL_OpenAudio
  *}
 procedure SDL_CloseAudio; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CloseAudio' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CloseAudio' {$ENDIF} {$ENDIF};
 
 {**
  * Use this function to shut down audio processing and close the audio device.
@@ -1455,5 +1455,5 @@ procedure SDL_CloseAudio; cdecl;
  * \sa SDL_OpenAudioDevice
  *}
 procedure SDL_CloseAudioDevice(dev: TSDL_AudioDeviceID); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CloseAudioDevice' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CloseAudioDevice' {$ENDIF} {$ENDIF};
 

+ 1 - 1
SDL2-for-Pascal/units/sdlblendmode.inc

@@ -79,4 +79,4 @@ const
  *      dstA = dstA * dstAlphaFactor alphaOperation srcA * srcAlphaFactor
  *}
 function SDL_ComposeCustomBlendMode(srcColorFactor, dstColorFactor: TSDL_BlendFactor; colorOperation: TSDL_BlendOperation; srcAlphaFactor, dstAlphaFactor: TSDL_BlendFactor; alphaOperation: TSDL_BlendOperation): TSDL_BlendMode; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ComposeCustomBlendMode' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ComposeCustomBlendMode' {$ENDIF} {$ENDIF};

+ 6 - 6
SDL2-for-Pascal/units/sdlclipboard.inc

@@ -20,7 +20,7 @@
  * \sa SDL_HasClipboardText
   }
 function SDL_SetClipboardText(text: PAnsiChar): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetClipboardText' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetClipboardText' {$ENDIF} {$ENDIF};
 
 {*
  * Get UTF-8 text from the clipboard, which must be freed with SDL_free().
@@ -39,7 +39,7 @@ function SDL_SetClipboardText(text: PAnsiChar): cint; cdecl;
  * \sa SDL_SetClipboardText
   }
 function SDL_GetClipboardText(): PAnsiChar; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetClipboardText' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetClipboardText' {$ENDIF} {$ENDIF};
 
 {*
  * Query whether the clipboard exists and contains a non-empty text string.
@@ -52,7 +52,7 @@ function SDL_GetClipboardText(): PAnsiChar; cdecl;
  * \sa SDL_SetClipboardText
   }
 function SDL_HasClipboardText(): TSDL_bool; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasClipboardText' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasClipboardText' {$ENDIF} {$ENDIF};
 
 {*
  * Put UTF-8 text into the primary selection.
@@ -67,7 +67,7 @@ function SDL_HasClipboardText(): TSDL_bool; cdecl;
  * \sa SDL_HasPrimarySelectionText
   }
 function SDL_SetPrimarySelectionText(text: PAnsiChar): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetPrimarySelectionText' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetPrimarySelectionText' {$ENDIF} {$ENDIF};
 
 {*
  * Get UTF-8 text from the primary selection, which must be freed with
@@ -87,7 +87,7 @@ function SDL_SetPrimarySelectionText(text: PAnsiChar): cint; cdecl;
  * \sa SDL_SetPrimarySelectionText
   }
 function SDL_GetPrimarySelectionText(): PAnsiChar; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetPrimarySelectionText' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetPrimarySelectionText' {$ENDIF} {$ENDIF};
 
 {*
  * Query whether the primary selection exists and contains a non-empty text
@@ -102,4 +102,4 @@ function SDL_GetPrimarySelectionText(): PAnsiChar; cdecl;
  * \sa SDL_SetPrimarySelectionText
   }
 function SDL_HasPrimarySelectionText(): TSDL_bool; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasPrimarySelectionText' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasPrimarySelectionText' {$ENDIF} {$ENDIF};

+ 21 - 21
SDL2-for-Pascal/units/sdlcpuinfo.inc

@@ -12,7 +12,7 @@ const
  * This function returns the number of CPU cores available.
  *}
 function SDL_GetCPUCount(): cint; cdecl;
-	 external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetCPUCount' {$ENDIF} {$ENDIF};
+	 external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetCPUCount' {$ENDIF} {$ENDIF};
 
 {**
  * This function returns the L1 cache line size of the CPU.
@@ -21,7 +21,7 @@ function SDL_GetCPUCount(): cint; cdecl;
  * or SIMD prefetch sizes.
  *}
 function SDL_GetCPUCacheLineSize(): cint; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetCPUCacheLineSize' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetCPUCacheLineSize' {$ENDIF} {$ENDIF};
 
 {**
  * This function returns true if the CPU has the RDTSC instruction.
@@ -29,7 +29,7 @@ function SDL_GetCPUCacheLineSize(): cint; cdecl;
  * This always returns false on CPUs that aren't using Intel instruction sets.
  *}
 function SDL_HasRDTSC(): TSDL_Bool; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasRDTSC' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasRDTSC' {$ENDIF} {$ENDIF};
 
 {**
  * This function returns true if the CPU has AltiVec features.
@@ -38,7 +38,7 @@ function SDL_HasRDTSC(): TSDL_Bool; cdecl;
  * instruction sets.
  *}
 function SDL_HasAltiVec(): TSDL_Bool; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasAltiVec' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasAltiVec' {$ENDIF} {$ENDIF};
 
 {**
  * This function returns true if the CPU has MMX features.
@@ -46,7 +46,7 @@ function SDL_HasAltiVec(): TSDL_Bool; cdecl;
  * This always returns false on CPUs that aren't using Intel instruction sets.
  *}
 function SDL_HasMMX(): TSDL_Bool; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasMMX' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasMMX' {$ENDIF} {$ENDIF};
 
 {**
  * This function returns true if the CPU has 3DNow! features.
@@ -54,7 +54,7 @@ function SDL_HasMMX(): TSDL_Bool; cdecl;
  * This always returns false on CPUs that aren't using AMD instruction sets.
  *}
 function SDL_Has3DNow(): TSDL_Bool; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_Has3DNow' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_Has3DNow' {$ENDIF} {$ENDIF};
 
 {**
  * This function returns true if the CPU has SSE features.
@@ -62,7 +62,7 @@ function SDL_Has3DNow(): TSDL_Bool; cdecl;
  * This always returns false on CPUs that aren't using Intel instruction sets.
  *}
 function SDL_HasSSE(): TSDL_Bool; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasSSE' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasSSE' {$ENDIF} {$ENDIF};
 
 {**
  *  This function returns true if the CPU has SSE2 features.
@@ -70,7 +70,7 @@ function SDL_HasSSE(): TSDL_Bool; cdecl;
  * This always returns false on CPUs that aren't using Intel instruction sets.
  *}
 function SDL_HasSSE2(): TSDL_Bool; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasSSE2' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasSSE2' {$ENDIF} {$ENDIF};
 
 {**
  * This function returns true if the CPU has SSE3 features.
@@ -78,7 +78,7 @@ function SDL_HasSSE2(): TSDL_Bool; cdecl;
  * This always returns false on CPUs that aren't using Intel instruction sets.
  *}
 function SDL_HasSSE3(): TSDL_Bool; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasSSE3' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasSSE3' {$ENDIF} {$ENDIF};
 
 {**
  * This function returns true if the CPU has SSE4.1 features.
@@ -86,7 +86,7 @@ function SDL_HasSSE3(): TSDL_Bool; cdecl;
  * This always returns false on CPUs that aren't using Intel instruction sets.
  *}
 function SDL_HasSSE41(): TSDL_Bool; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasSSE41' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasSSE41' {$ENDIF} {$ENDIF};
 
 {**
  * This function returns true if the CPU has SSE4.2 features.
@@ -94,7 +94,7 @@ function SDL_HasSSE41(): TSDL_Bool; cdecl;
  * This always returns false on CPUs that aren't using Intel instruction sets.
  *}
 function SDL_HasSSE42(): TSDL_Bool; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasSSE42' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasSSE42' {$ENDIF} {$ENDIF};
 
 {**
  * This function returns true if the CPU has AVX features.
@@ -102,7 +102,7 @@ function SDL_HasSSE42(): TSDL_Bool; cdecl;
  * This always returns false on CPUs that aren't using Intel instruction sets.
  *}
 function SDL_HasAVX(): TSDL_Bool; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasAVX' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasAVX' {$ENDIF} {$ENDIF};
 
 {**
  * This function returns true if the CPU has AVX2 features.
@@ -110,7 +110,7 @@ function SDL_HasAVX(): TSDL_Bool; cdecl;
  * This always returns false on CPUs that aren't using Intel instruction sets.
  *}
 function SDL_HasAVX2(): TSDL_Bool; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasAVX2' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasAVX2' {$ENDIF} {$ENDIF};
 
 {**
  * Determine whether the CPU has AVX-512F (foundation) features.
@@ -118,7 +118,7 @@ function SDL_HasAVX2(): TSDL_Bool; cdecl;
  * This always returns false on CPUs that aren't using Intel instruction sets.
  *}
 function SDL_HasAVX512F(): TSDL_Bool; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasAVX512F' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasAVX512F' {$ENDIF} {$ENDIF};
 
 {**
  * Determine whether the CPU has ARM SIMD (ARMv6) features.
@@ -127,7 +127,7 @@ function SDL_HasAVX512F(): TSDL_Bool; cdecl;
  * This always returns false on CPUs that aren't using ARM instruction sets.
  *}
 function SDL_HasARMSIMD(): TSDL_Bool; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasARMSIMD' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasARMSIMD' {$ENDIF} {$ENDIF};
 
 {**
  * Determine whether the CPU has NEON (ARM SIMD) features.
@@ -135,13 +135,13 @@ function SDL_HasARMSIMD(): TSDL_Bool; cdecl;
  * This always returns false on CPUs that aren't using ARM instruction sets.
  *}
 function SDL_HasNEON(): TSDL_Bool; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasNEON' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasNEON' {$ENDIF} {$ENDIF};
 
 {**
  * This function returns the amount of RAM configured in the system, in MB.
  *}
 function SDL_GetSystemRAM(): cint; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetSystemRAM' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetSystemRAM' {$ENDIF} {$ENDIF};
 
 {**
  * Report the alignment this system needs for SIMD allocations.
@@ -156,7 +156,7 @@ function SDL_GetSystemRAM(): cint; cdecl;
  * Plan accordingly.
  *}
 function SDL_SIMDGetAlignment(): csize_t; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SIMDGetAlignment' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SIMDGetAlignment' {$ENDIF} {$ENDIF};
 
 {*
  * Allocate memory in a SIMD-friendly way.
@@ -185,7 +185,7 @@ function SDL_SIMDGetAlignment(): csize_t; cdecl;
  * own zero bytes of that buffer).
  *}
 function SDL_SIMDAlloc(const len: csize_t): Pointer; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SIMDAlloc' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SIMDAlloc' {$ENDIF} {$ENDIF};
 
 {**
  * Reallocate memory obtained from SDL_SIMDAlloc.
@@ -194,7 +194,7 @@ function SDL_SIMDAlloc(const len: csize_t): Pointer; cdecl;
  * SDL_SIMDAlloc(). It can't be used on pointers from SDL_malloc, GetMem, etc.
  *}
 function SDL_SIMDRealloc(mem: Pointer; const len: csize_t): Pointer; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SIMDRealloc' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SIMDRealloc' {$ENDIF} {$ENDIF};
 
 {**
  * Deallocate memory obtained from SDL_SIMDAlloc.
@@ -211,5 +211,5 @@ function SDL_SIMDRealloc(mem: Pointer; const len: csize_t): Pointer; cdecl;
  * function returns, and should be discarded.
  *}
 procedure SDL_SIMDFree(mem: Pointer); cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SIMDFree' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SIMDFree' {$ENDIF} {$ENDIF};
 

+ 5 - 5
SDL2-for-Pascal/units/sdlerror.inc

@@ -14,7 +14,7 @@
  *  \return -1, there is no error handling for this function
  *}
 function SDL_SetError(const fmt: PAnsiChar; args: array of const): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetError' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetError' {$ENDIF} {$ENDIF};
 
 {**
  *  \brief Get the last error message that was set
@@ -28,7 +28,7 @@ function SDL_SetError(const fmt: PAnsiChar; args: array of const): cint; cdecl;
  *  \return a pointer to the last error message that was set
  *}
 function SDL_GetError: PAnsiChar; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetError' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetError' {$ENDIF} {$ENDIF};
 
 {**
  *  \brief Get the last error message that was set for the current thread
@@ -43,12 +43,12 @@ function SDL_GetError: PAnsiChar; cdecl;
  *  \return errstr
  *}
 function SDL_GetErrorMsg(const errstr: PAnsiChar; maxlen: cint): PAnsiChar; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetErrorMsg' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetErrorMsg' {$ENDIF} {$ENDIF};
 
 {**
  *  \brief Clear the error message for the current thread
  *}
-procedure SDL_ClearError cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ClearError' {$ENDIF} {$ENDIF};
+procedure SDL_ClearError cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ClearError' {$ENDIF} {$ENDIF};
 
 {*Internal error functions*}
 {**
@@ -75,4 +75,4 @@ type
 
 {* SDL_Error() unconditionally returns -1. *}
 function SDL_Error(code: TSDL_ErrorCode): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_Error' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_Error' {$ENDIF} {$ENDIF};

+ 17 - 17
SDL2-for-Pascal/units/sdlevents.inc

@@ -677,7 +677,7 @@ type
    *  
    *  This should only be run in the thread that sets the video mode.
    *}
-  procedure SDL_PumpEvents cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_PumpEvents' {$ENDIF} {$ENDIF};
+  procedure SDL_PumpEvents cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_PumpEvents' {$ENDIF} {$ENDIF};
 
 const
   SDL_ADDEVENT = 0;
@@ -708,21 +708,21 @@ type
    *  This function is thread-safe.
    *}
 
-  function SDL_PeepEvents(events: PSDL_Event; numevents: cint32; action: TSDL_EventAction; minType, maxType: TSDL_EventType): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_PeepEvents' {$ENDIF} {$ENDIF};
+  function SDL_PeepEvents(events: PSDL_Event; numevents: cint32; action: TSDL_EventAction; minType, maxType: TSDL_EventType): cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_PeepEvents' {$ENDIF} {$ENDIF};
 
   {**
    *  Checks to see if certain event types are in the event queue.
    *}
 
-  function SDL_HasEvent(type_: TSDL_EventType): TSDL_Bool  cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasEvent' {$ENDIF} {$ENDIF};
-  function SDL_HasEvents(minType, maxType: TSDL_EventType): TSDL_Bool cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasEvents' {$ENDIF} {$ENDIF};
+  function SDL_HasEvent(type_: TSDL_EventType): TSDL_Bool  cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasEvent' {$ENDIF} {$ENDIF};
+  function SDL_HasEvents(minType, maxType: TSDL_EventType): TSDL_Bool cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasEvents' {$ENDIF} {$ENDIF};
 
   {**
    *  This function clears events from the event queue
    *}
 
-  procedure SDL_FlushEvent(type_: TSDL_EventType) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_FlushEvent' {$ENDIF} {$ENDIF};
-  procedure SDL_FlushEvents(minType, maxType: TSDL_EventType) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_FlushEvents' {$ENDIF} {$ENDIF};
+  procedure SDL_FlushEvent(type_: TSDL_EventType) cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_FlushEvent' {$ENDIF} {$ENDIF};
+  procedure SDL_FlushEvents(minType, maxType: TSDL_EventType) cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_FlushEvents' {$ENDIF} {$ENDIF};
 
   {**
    *  Polls for currently pending events.
@@ -733,7 +733,7 @@ type
    *               stored in that area.
    *}
 
-  function SDL_PollEvent(event: PSDL_Event): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_PollEvent' {$ENDIF} {$ENDIF};
+  function SDL_PollEvent(event: PSDL_Event): cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_PollEvent' {$ENDIF} {$ENDIF};
 
   {**
    *  Waits indefinitely for the next available event.
@@ -744,7 +744,7 @@ type
    *  stored in that area.
    *}
 
-  function SDL_WaitEvent(event: PSDL_Event): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_WaitEvent' {$ENDIF} {$ENDIF};
+  function SDL_WaitEvent(event: PSDL_Event): cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_WaitEvent' {$ENDIF} {$ENDIF};
 
   {**
    *  Waits until the specified timeout (in milliseconds) for the next
@@ -756,7 +756,7 @@ type
    *  stored in that area.
    *}
  
-  function SDL_WaitEventTimeout(event: PSDL_Event; timeout: cint32): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_WaitEventTimeout' {$ENDIF} {$ENDIF};
+  function SDL_WaitEventTimeout(event: PSDL_Event; timeout: cint32): cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_WaitEventTimeout' {$ENDIF} {$ENDIF};
 
   {**
    *  Add an event to the event queue.
@@ -765,7 +765,7 @@ type
    *  was full or there was some other error.
    *}
 
-  function SDL_PushEvent(event: PSDL_Event): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_PumpEvents' {$ENDIF} {$ENDIF};
+  function SDL_PushEvent(event: PSDL_Event): cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_PumpEvents' {$ENDIF} {$ENDIF};
 
 type
   PPSDL_EventFilter = ^PSDL_EventFilter;
@@ -797,33 +797,33 @@ type
    *  internal queue and be delivered to the application at the next event poll.
    *}
  
-  procedure SDL_SetEventFilter(filter: TSDL_EventFilter; userdata: Pointer) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetEventFilter' {$ENDIF} {$ENDIF};
+  procedure SDL_SetEventFilter(filter: TSDL_EventFilter; userdata: Pointer) cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetEventFilter' {$ENDIF} {$ENDIF};
 
   {**
    *  Return the current event filter - can be used to "chain" filters.
    *  If there is no event filter set, this function returns SDL_FALSE.
    *}
 
-  function SDL_GetEventFilter(var filter: PSDL_EventFilter; var userdata: PPointer): TSDL_Bool cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetEventFilter' {$ENDIF} {$ENDIF};
+  function SDL_GetEventFilter(var filter: PSDL_EventFilter; var userdata: PPointer): TSDL_Bool cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetEventFilter' {$ENDIF} {$ENDIF};
 
   {**
    *  Add a function which is called when an event is added to the queue.
    *}
  
-  procedure SDL_AddEventWatch(filter: TSDL_EventFilter; userdata: Pointer) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AddEventWatch' {$ENDIF} {$ENDIF};
+  procedure SDL_AddEventWatch(filter: TSDL_EventFilter; userdata: Pointer) cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AddEventWatch' {$ENDIF} {$ENDIF};
 
   {**
    *  Remove an event watch function added with SDL_AddEventWatch()
    *}
  
-  procedure SDL_DelEventWatch(filter: TSDL_EventFilter; userdata: Pointer) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_DelEventWatch' {$ENDIF} {$ENDIF};
+  procedure SDL_DelEventWatch(filter: TSDL_EventFilter; userdata: Pointer) cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_DelEventWatch' {$ENDIF} {$ENDIF};
 
   {**
    *  Run the filter function on the current event queue, removing any
    *  events for which the filter returns 0.
    *}
 
-  procedure SDL_FilterEvents(filter: TSDL_EventFilter; userdata: Pointer) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_FilterEvents' {$ENDIF} {$ENDIF};
+  procedure SDL_FilterEvents(filter: TSDL_EventFilter; userdata: Pointer) cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_FilterEvents' {$ENDIF} {$ENDIF};
 
 const
 
@@ -842,7 +842,7 @@ const
    *     current processing state of the specified event.
    *}
 
-  function SDL_EventState(type_: TSDL_EventType; state: cint32): cuint8 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_EventState' {$ENDIF} {$ENDIF};
+  function SDL_EventState(type_: TSDL_EventType; state: cint32): cuint8 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_EventState' {$ENDIF} {$ENDIF};
 
   function SDL_GetEventState(type_: TSDL_EventType): cuint8;
 
@@ -854,4 +854,4 @@ const
    *  returns (Uint32)-1
    *}
 
-  function SDL_RegisterEvents(numevents: cint32): cuint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RegisterEvents' {$ENDIF} {$ENDIF};
+  function SDL_RegisterEvents(numevents: cint32): cuint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RegisterEvents' {$ENDIF} {$ENDIF};

+ 2 - 2
SDL2-for-Pascal/units/sdlfilesystem.inc

@@ -43,7 +43,7 @@
  * \sa SDL_GetPrefPath
   }
 function SDL_GetBasePath(): PAnsiChar; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetBasePath' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetBasePath' {$ENDIF} {$ENDIF};
 
 {*
  * Get the user-and-app-specific path where files can be written.
@@ -101,5 +101,5 @@ function SDL_GetBasePath(): PAnsiChar; cdecl;
  * \sa SDL_GetBasePath
   }
 function SDL_GetPrefPath(org: PAnsiChar; app: PAnsiChar): PAnsiChar; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetPrefPath' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetPrefPath' {$ENDIF} {$ENDIF};
 

+ 56 - 56
SDL2-for-Pascal/units/sdlgamecontroller.inc

@@ -98,7 +98,7 @@ type
    *
    *  1 if mapping is added, 0 if updated, -1 on error
    *}
-function SDL_GameControllerAddMapping( mappingString: PAnsiChar ): cint cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerAddMapping' {$ENDIF} {$ENDIF};
+function SDL_GameControllerAddMapping( mappingString: PAnsiChar ): cint cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerAddMapping' {$ENDIF} {$ENDIF};
 
   {**
    *  Load a set of mappings from a seekable SDL data stream (memory or file), filtered by the current SDL_GetPlatform()
@@ -109,20 +109,20 @@ function SDL_GameControllerAddMapping( mappingString: PAnsiChar ): cint cdecl; e
    *  Returns number of mappings added, -1 on error
    *}
 function SDL_GameControllerAddMappingsFromRW(rw: PSDL_RWops; freerw: cint32):cint32;
-   cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerAddMappingsFromRW' {$ENDIF} {$ENDIF};
+   cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerAddMappingsFromRW' {$ENDIF} {$ENDIF};
 
 {**
  * Get the number of mappings installed.
   *}
 function SDL_GameControllerNumMappings():cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerNumMappings' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerNumMappings' {$ENDIF} {$ENDIF};
 
   {**
    *  Get a mapping string for a GUID
    *
    *   the mapping string.  Must be freed with SDL_free.  Returns NULL if no mapping is available
    *}
-function SDL_GameControllerMappingForGUID( guid: TSDL_JoystickGUID ): PAnsiChar cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerMappingForGUID' {$ENDIF} {$ENDIF};
+function SDL_GameControllerMappingForGUID( guid: TSDL_JoystickGUID ): PAnsiChar cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerMappingForGUID' {$ENDIF} {$ENDIF};
 
 {**
  * Get the mapping at a particular index.
@@ -131,26 +131,26 @@ function SDL_GameControllerMappingForGUID( guid: TSDL_JoystickGUID ): PAnsiChar
  * Returns NIL if the index is out of range.
  *}
 function SDL_GameControllerMappingForIndex(mapping_index: cint): PAnsiChar; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerMappingForIndex' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerMappingForIndex' {$ENDIF} {$ENDIF};
 
   {**
    *  Get a mapping string for an open GameController
    *
    *   the mapping string.  Must be freed with SDL_free.  Returns NULL if no mapping is available
    *}
-function SDL_GameControllerMapping( gamecontroller: PSDL_GameController ): PAnsiChar cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerMapping' {$ENDIF} {$ENDIF};
+function SDL_GameControllerMapping( gamecontroller: PSDL_GameController ): PAnsiChar cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerMapping' {$ENDIF} {$ENDIF};
 
   {**
    *  Is the joystick on this index supported by the game controller interface?
    *}
-function SDL_IsGameController(joystick_index: cint): TSDL_Bool cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_IsGameController' {$ENDIF} {$ENDIF};
+function SDL_IsGameController(joystick_index: cint): TSDL_Bool cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_IsGameController' {$ENDIF} {$ENDIF};
 
   {**
    *  Get the implementation dependent name of a game controller.
    *  This can be called before any controllers are opened.
    *  If no name can be found, this function returns NULL.
    *}
-function SDL_GameControllerNameForIndex(joystick_index: cint): PAnsiChar cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerNameForIndex' {$ENDIF} {$ENDIF};
+function SDL_GameControllerNameForIndex(joystick_index: cint): PAnsiChar cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerNameForIndex' {$ENDIF} {$ENDIF};
 
 {**
  * Get the implementation dependent path for the game controller.
@@ -170,14 +170,14 @@ function SDL_GameControllerNameForIndex(joystick_index: cint): PAnsiChar cdecl;
  * \sa SDL_GameControllerPath
  *}
 function SDL_GameControllerPathForIndex(joystick_index: cint): PAnsiChar; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerPathForIndex' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerPathForIndex' {$ENDIF} {$ENDIF};
 
 {**
  * Get the type of a game controller.
  * This can be called before any controllers are opened.
  *}
 function SDL_GameControllerTypeForIndex(joystick_index: cint): TSDL_GameControllerType; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerTypeForIndex' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerTypeForIndex' {$ENDIF} {$ENDIF};
 
 {**
  * Get the mapping of a game controller.
@@ -187,7 +187,7 @@ function SDL_GameControllerTypeForIndex(joystick_index: cint): TSDL_GameControll
  * Returns NIL if no mapping is available.
  *}
 function SDL_GameControllerMappingForDeviceIndex(joystick_index: cint): PAnsiChar; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerMappingForDeviceIndex' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerMappingForDeviceIndex' {$ENDIF} {$ENDIF};
 
   {**
    *  Open a game controller for use.
@@ -197,13 +197,13 @@ function SDL_GameControllerMappingForDeviceIndex(joystick_index: cint): PAnsiCha
    *
    *   A controller identifier, or NULL if an error occurred.
    *}
-function SDL_GameControllerOpen(joystick_index: cint): PSDL_GameController cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerOpen' {$ENDIF} {$ENDIF};
+function SDL_GameControllerOpen(joystick_index: cint): PSDL_GameController cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerOpen' {$ENDIF} {$ENDIF};
 
   {**
    * Return the SDL_GameController associated with an instance id.
    *}
 function SDL_GameControllerFromInstanceID(joyid: TSDL_JoystickID): PSDL_GameController; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerFromInstanceID' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerFromInstanceID' {$ENDIF} {$ENDIF};
 
 {**
  * Get the SDL_GameController associated with a player index.
@@ -213,12 +213,12 @@ function SDL_GameControllerFromInstanceID(joyid: TSDL_JoystickID): PSDL_GameCont
  *
  *}
 function SDL_GameControllerFromPlayerIndex(player_index: cint): PSDL_GameController; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerFromPlayerIndex' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerFromPlayerIndex' {$ENDIF} {$ENDIF};
 
   {**
    *  Return the name for this currently opened controller
    *}
-function SDL_GameControllerName(gamecontroller: PSDL_GameController): PAnsiChar cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerName' {$ENDIF} {$ENDIF};
+function SDL_GameControllerName(gamecontroller: PSDL_GameController): PAnsiChar cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerName' {$ENDIF} {$ENDIF};
 
 {**
  * Get the implementation-dependent path for an opened game controller.
@@ -236,7 +236,7 @@ function SDL_GameControllerName(gamecontroller: PSDL_GameController): PAnsiChar
  * \sa SDL_GameControllerPathForIndex
  *}
 function SDL_GameControllerPath(gamecontroller: PSDL_GameController): PAnsiChar; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerPath' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerPath' {$ENDIF} {$ENDIF};
 
 {**
  * Get the type of this currently opened controller
@@ -245,7 +245,7 @@ function SDL_GameControllerPath(gamecontroller: PSDL_GameController): PAnsiChar;
  * it takes a controller identifier instead of the (unstable) device index.
  *}
 function SDL_GameControllerGetType(gamecontroller: PSDL_GameController): TSDL_GameControllerType; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetType' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetType' {$ENDIF} {$ENDIF};
 
 {**
  * Get the player index of an opened game controller.
@@ -254,13 +254,13 @@ function SDL_GameControllerGetType(gamecontroller: PSDL_GameController): TSDL_Ga
  * Returns the player index for controller, or -1 if it's not available.
  *}
 function SDL_GameControllerGetPlayerIndex(gamecontroller: PSDL_GameController): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetPlayerIndex' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetPlayerIndex' {$ENDIF} {$ENDIF};
 
 {**
  * Set the player index of an opened game controller.
  *}
 procedure SDL_GameControllerSetPlayerIndex(gamecontroller: PSDL_GameController; player_index: cint); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerSetPlayerIndex' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerSetPlayerIndex' {$ENDIF} {$ENDIF};
 
 {**
  * Get the USB vendor ID of an opened controller, if available.
@@ -273,21 +273,21 @@ procedure SDL_GameControllerSetPlayerIndex(gamecontroller: PSDL_GameController;
  * \since This function is available since SDL 2.0.6.
  *}
 function SDL_GameControllerGetVendor(gamecontroller: PSDL_GameController): cuint16; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetVendor' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetVendor' {$ENDIF} {$ENDIF};
 
 {**
  * Get the USB product ID of an opened controller, if available.
  * If the product ID isn't available, this function returns 0.
  *}
 function SDL_GameControllerGetProduct(gamecontroller: PSDL_GameController): cuint16; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetProduct' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetProduct' {$ENDIF} {$ENDIF};
 
 {**
  * Get the product version of an opened controller, if available.
  * If the product version isn't available, this function returns 0.
  *}
 function SDL_GameControllerGetProductVersion(gamecontroller: PSDL_GameController): cuint16; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetProductVersion' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetProductVersion' {$ENDIF} {$ENDIF};
 
 {**
  * Get the firmware version of an opened controller, if available.
@@ -300,7 +300,7 @@ function SDL_GameControllerGetProductVersion(gamecontroller: PSDL_GameController
  * \since This function is available since SDL 2.24.0.
  *}
 function SDL_GameControllerGetFirmwareVersion(gamecontroller: PSDL_GameController): cuint16; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetFirmwareVersion' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetFirmwareVersion' {$ENDIF} {$ENDIF};
 
 {**
  * Get the serial number of an opened controller, if available.
@@ -309,18 +309,18 @@ function SDL_GameControllerGetFirmwareVersion(gamecontroller: PSDL_GameControlle
  * or NIL if it is not available. Do _not_ free the string with SDL_free().
  *}
 function SDL_GameControllerGetSerial(gamecontroller: PSDL_GameController): PAnsiChar; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetSerial' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetSerial' {$ENDIF} {$ENDIF};
 
   {**
    *  Returns SDL_TRUE if the controller has been opened and currently connected,
    *  or SDL_FALSE if it has not.
    *}
-function SDL_GameControllerGetAttached(gamecontroller: PSDL_GameController): TSDL_Bool cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetAttached' {$ENDIF} {$ENDIF};
+function SDL_GameControllerGetAttached(gamecontroller: PSDL_GameController): TSDL_Bool cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetAttached' {$ENDIF} {$ENDIF};
 
   {**
    *  Get the underlying joystick object used by a controller
    *}
-function SDL_GameControllerGetJoystick(gamecontroller: PSDL_GameController): PSDL_Joystick cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetJoystick' {$ENDIF} {$ENDIF};
+function SDL_GameControllerGetJoystick(gamecontroller: PSDL_GameController): PSDL_Joystick cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetJoystick' {$ENDIF} {$ENDIF};
 
   {**
    *  Enable/disable controller event polling.
@@ -331,7 +331,7 @@ function SDL_GameControllerGetJoystick(gamecontroller: PSDL_GameController): PSD
    *
    *  The state can be one of ::SDL_QUERY, ::SDL_ENABLE or ::SDL_IGNORE.
    *}
-function SDL_GameControllerEventState(state: cint): cint cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerEventState' {$ENDIF} {$ENDIF};
+function SDL_GameControllerEventState(state: cint): cint cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerEventState' {$ENDIF} {$ENDIF};
 
   {**
    *  Update the current state of the open game controllers.
@@ -339,7 +339,7 @@ function SDL_GameControllerEventState(state: cint): cint cdecl; external SDL_Lib
    *  This is called automatically by the event loop if any game controller
    *  events are enabled.
    *}
-procedure SDL_GameControllerUpdate() cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerUpdate' {$ENDIF} {$ENDIF};
+procedure SDL_GameControllerUpdate() cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerUpdate' {$ENDIF} {$ENDIF};
 
   {**
    *  The list of axes available from a controller
@@ -362,17 +362,17 @@ const
   {**
    *  turn this string into a axis mapping
    *}
-function SDL_GameControllerGetAxisFromString(pchString: PAnsiChar): TSDL_GameControllerAxis cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetAxisFromString' {$ENDIF} {$ENDIF};
+function SDL_GameControllerGetAxisFromString(pchString: PAnsiChar): TSDL_GameControllerAxis cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetAxisFromString' {$ENDIF} {$ENDIF};
 
   {**
    *  turn this axis enum into a string mapping
    *}
-function SDL_GameControllerGetStringForAxis(axis: TSDL_GameControllerAxis): PAnsiChar cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetStringForAxis' {$ENDIF} {$ENDIF};
+function SDL_GameControllerGetStringForAxis(axis: TSDL_GameControllerAxis): PAnsiChar cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetStringForAxis' {$ENDIF} {$ENDIF};
 
   {**
    *  Get the SDL joystick layer binding for this controller button mapping
    *}
-function SDL_GameControllerGetBindForAxis(gamecontroller: PSDL_GameController; axis: TSDL_GameControllerAxis): TSDL_GameControllerButtonBind cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetBindForAxis' {$ENDIF} {$ENDIF};
+function SDL_GameControllerGetBindForAxis(gamecontroller: PSDL_GameController; axis: TSDL_GameControllerAxis): TSDL_GameControllerButtonBind cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetBindForAxis' {$ENDIF} {$ENDIF};
 
 {**
  * Query whether a game controller has a given axis.
@@ -381,7 +381,7 @@ function SDL_GameControllerGetBindForAxis(gamecontroller: PSDL_GameController; a
  * as that is all the information SDL has about the physical device.
  *}
 function SDL_GameControllerHasAxis(gamecontroller: PSDL_GameController; axis: TSDL_GameControllerAxis): TSDL_Bool; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerHasAxis' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerHasAxis' {$ENDIF} {$ENDIF};
 
   {**
    *  Get the current state of an axis control on a game controller.
@@ -390,7 +390,7 @@ function SDL_GameControllerHasAxis(gamecontroller: PSDL_GameController; axis: TS
    *
    *  The axis indices start at index 0.
    *}
-function SDL_GameControllerGetAxis(gamecontroller: PSDL_GameController; axis: TSDL_GameControllerAxis): cint16 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetAxis' {$ENDIF} {$ENDIF};
+function SDL_GameControllerGetAxis(gamecontroller: PSDL_GameController; axis: TSDL_GameControllerAxis): cint16 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetAxis' {$ENDIF} {$ENDIF};
 
   {**
    *  The list of buttons available from a controller
@@ -427,17 +427,17 @@ const
   {**
    *  turn this string into a button mapping
    *}
-function SDL_GameControllerGetButtonFromString(pchString: PAnsiChar): TSDL_GameControllerButton cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetButtonFromString' {$ENDIF} {$ENDIF};
+function SDL_GameControllerGetButtonFromString(pchString: PAnsiChar): TSDL_GameControllerButton cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetButtonFromString' {$ENDIF} {$ENDIF};
 
   {**
    *  turn this button enum into a string mapping
    *}
-function SDL_GameControllerGetStringForButton(button: TSDL_GameControllerButton): PAnsiChar cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetStringForButton' {$ENDIF} {$ENDIF};
+function SDL_GameControllerGetStringForButton(button: TSDL_GameControllerButton): PAnsiChar cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetStringForButton' {$ENDIF} {$ENDIF};
 
 {**
  *  Get the SDL joystick layer binding for this controller button mapping
  *}
-function SDL_GameControllerGetBindForButton(gamecontroller: PSDL_GameController; button: TSDL_GameControllerButton): TSDL_GameControllerButtonBind cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetBindForButton' {$ENDIF} {$ENDIF};
+function SDL_GameControllerGetBindForButton(gamecontroller: PSDL_GameController; button: TSDL_GameControllerButton): TSDL_GameControllerButtonBind cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetBindForButton' {$ENDIF} {$ENDIF};
 
 {**
  * Query whether a game controller has a given button.
@@ -446,26 +446,26 @@ function SDL_GameControllerGetBindForButton(gamecontroller: PSDL_GameController;
  * as that is all the information SDL has about the physical device.
  *}
 function SDL_GameControllerHasButton(gamecontroller: PSDL_GameController; button: TSDL_GameControllerButton): TSDL_Bool; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerHasButton' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerHasButton' {$ENDIF} {$ENDIF};
 
 {**
  *  Get the current state of a button on a game controller.
  *
  *  The button indices start at index 0.
  *}
-function SDL_GameControllerGetButton(gamecontroller: PSDL_GameController; button: TSDL_GameControllerButton): cuint8 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetButton' {$ENDIF} {$ENDIF};
+function SDL_GameControllerGetButton(gamecontroller: PSDL_GameController; button: TSDL_GameControllerButton): cuint8 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetButton' {$ENDIF} {$ENDIF};
 
 {**
  * Get the number of touchpads on a game controller.
  *}
 function SDL_GameControllerGetNumTouchpads(gamecontroller: PSDL_GameController): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetNumTouchpads' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetNumTouchpads' {$ENDIF} {$ENDIF};
 
 {**
  * Get the number of supported simultaneous fingers on a touchpad on a game controller.
  *}
 function SDL_GameControllerGetNumTouchpadFingers(gamecontroller: PSDL_GameController; touchpad: cint): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetNumTouchpadFingers' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetNumTouchpadFingers' {$ENDIF} {$ENDIF};
 
 {**
  * Get the current state of a finger on a touchpad on a game controller.
@@ -476,25 +476,25 @@ function SDL_GameControllerGetTouchpadFinger(
   state: pcuint8;
   x, y, pressure: pcfloat
 ): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetTouchpadFinger' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetTouchpadFinger' {$ENDIF} {$ENDIF};
 
 {**
  * Return whether a game controller has a particular sensor.
  *}
 function SDL_GameControllerHasSensor(gamecontroller: PSDL_GameController; senstype: TSDL_SensorType): TSDL_Bool; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerHasSensor' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerHasSensor' {$ENDIF} {$ENDIF};
 
 {**
  * Set whether data reporting for a game controller sensor is enabled.
  *}
 function SDL_GameControllerSetSensorEnabled(gamecontroller: PSDL_GameController; senstype: TSDL_SensorType; enabled: TSDL_bool): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerSetSensorEnabled' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerSetSensorEnabled' {$ENDIF} {$ENDIF};
 
 {**
  * Query whether sensor data reporting is enabled for a game controller.
  *}
 function SDL_GameControllerIsSensorEnabled(gamecontroller: PSDL_GameController; senstype: TSDL_SensorType): TSDL_Bool; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerIsSensorEnabled' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerIsSensorEnabled' {$ENDIF} {$ENDIF};
 
 {**
  * Get the data rate (number of events per second) of
@@ -503,7 +503,7 @@ function SDL_GameControllerIsSensorEnabled(gamecontroller: PSDL_GameController;
  * Returns the data rate, or 0.0 if the data rate is not available.
  *}
 function SDL_GameControllerGetSensorDataRate(gamecontroller: PSDL_GameController; senstype: TSDL_SensorType): cfloat; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetSensorDataRate' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetSensorDataRate' {$ENDIF} {$ENDIF};
 
 {**
  * Get the current state of a game controller sensor.
@@ -512,13 +512,13 @@ function SDL_GameControllerGetSensorDataRate(gamecontroller: PSDL_GameController
  * See sdlsensor.inc for the details for each type of sensor.
  *}
 function SDL_GameControllerGetSensorData(gamecontroller: PSDL_GameController; senstype: TSDL_SensorType; data: pcfloat; num_values: cint): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetSensorData' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetSensorData' {$ENDIF} {$ENDIF};
 
 {**
  * Query whether a game controller has rumble support.
  *}
 function SDL_GameControllerHasRumble(gamecontroller: PSDL_GameController): TSDL_Bool; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerHasRumble' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerHasRumble' {$ENDIF} {$ENDIF};
 
 {**
  * Start a rumble effect on a game controller.
@@ -533,13 +533,13 @@ function SDL_GameControllerRumble(
   low_frequency_rumble, high_frequency_rumble: cuint16;
   duration_ms: cuint32
 ): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerRumble' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerRumble' {$ENDIF} {$ENDIF};
 
 {**
  * Query whether a game controller has rumble support on triggers.
  *}
 function SDL_GameControllerHasRumbleTriggers(gamecontroller: PSDL_GameController): TSDL_Bool; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerHasRumbleTriggers' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerHasRumbleTriggers' {$ENDIF} {$ENDIF};
 
 {**
  * Start a rumble effect in the game controller's triggers.
@@ -559,13 +559,13 @@ function SDL_GameControllerRumbleTriggers(
   left_rumble, right_rumble: cuint16;
   duration_ms: cuint32
 ): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerRumbleTriggers' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerRumbleTriggers' {$ENDIF} {$ENDIF};
 
 {**
  * Query whether a game controller has an LED.
  *}
 function SDL_GameControllerHasLED(gamecontroller: PSDL_GameController): TSDL_Bool; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerHasLED' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerHasLED' {$ENDIF} {$ENDIF};
 
 {**
  * Update a game controller's LED color.
@@ -573,7 +573,7 @@ function SDL_GameControllerHasLED(gamecontroller: PSDL_GameController): TSDL_Boo
  * Returns 0, or -1 if this controller does not have a modifiable LED.
  *}
 function SDL_GameControllerSetLED(gamecontroller: PSDL_GameController; red, green, blue: cuint8): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerSetLED' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerSetLED' {$ENDIF} {$ENDIF};
 
 {**
  * Send a controller-specific effect packet.
@@ -582,12 +582,12 @@ function SDL_GameControllerSetLED(gamecontroller: PSDL_GameController; red, gree
  * support effect packets.
  *}
 function SDL_GameControllerSendEffect(gamecontroller: PSDL_GameController; data: Pointer; size: cint): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerSendEffect' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerSendEffect' {$ENDIF} {$ENDIF};
 
 {**
  *  Close a controller previously opened with SDL_GameControllerOpen().
  *}
-procedure SDL_GameControllerClose(gamecontroller: PSDL_GameController) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerClose' {$ENDIF} {$ENDIF};
+procedure SDL_GameControllerClose(gamecontroller: PSDL_GameController) cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerClose' {$ENDIF} {$ENDIF};
 
 {**
  * Return the sfSymbolsName for a given axis on a game controller
@@ -597,7 +597,7 @@ procedure SDL_GameControllerClose(gamecontroller: PSDL_GameController) cdecl; ex
  * Do _not_ pass this string to SDL_free().
  *}
 function SDL_GameControllerGetAppleSFSymbolsNameForAxis(gamecontroller: PSDL_GameController; axis: TSDL_GameControllerAxis): PAnsiChar; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetAppleSFSymbolsNameForAxis' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetAppleSFSymbolsNameForAxis' {$ENDIF} {$ENDIF};
 
 {**
  * Return the sfSymbolsName for a given button on a game controller
@@ -607,7 +607,7 @@ function SDL_GameControllerGetAppleSFSymbolsNameForAxis(gamecontroller: PSDL_Gam
  * Do _not_ pass this string to SDL_free().
  *}
 function SDL_GameControllerGetAppleSFSymbolsNameForButton(gamecontroller: PSDL_GameController; button: TSDL_GameControllerButton): PAnsiChar; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetAppleSFSymbolsNameForButton' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GameControllerGetAppleSFSymbolsNameForButton' {$ENDIF} {$ENDIF};
 
 
 function SDL_GameControllerAddMappingsFromFile(Const FilePath:PAnsiChar):cint32;

+ 4 - 4
SDL2-for-Pascal/units/sdlgesture.inc

@@ -21,7 +21,7 @@ type
  * \sa SDL_GetTouchDevice
  *}
 function SDL_RecordGesture(touchId: TSDL_TouchID): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RecordGesture' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RecordGesture' {$ENDIF} {$ENDIF};
 
   {**
  * Save all currently loaded Dollar Gesture templates.
@@ -36,7 +36,7 @@ function SDL_RecordGesture(touchId: TSDL_TouchID): cint; cdecl;
  * \sa SDL_SaveDollarTemplate
  *}
 function SDL_SaveAllDollarTemplates(dst: PSDL_RWops): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SaveAllDollarTemplates' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SaveAllDollarTemplates' {$ENDIF} {$ENDIF};
 
   {**
  * Save a currently loaded Dollar Gesture template.
@@ -52,7 +52,7 @@ function SDL_SaveAllDollarTemplates(dst: PSDL_RWops): cint; cdecl;
  * \sa SDL_SaveAllDollarTemplates
  *}
 function SDL_SaveDollarTemplate(gestureId: TSDL_GestureID; dst: PSDL_RWops): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SaveDollarTemplate' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SaveDollarTemplate' {$ENDIF} {$ENDIF};
 
 
   {**
@@ -69,4 +69,4 @@ function SDL_SaveDollarTemplate(gestureId: TSDL_GestureID; dst: PSDL_RWops): cin
  * \sa SDL_SaveDollarTemplate
  *}
 function SDL_LoadDollarTemplates(touchId: TSDL_TouchID; src: PSDL_RWops): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LoadDollarTemplates' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LoadDollarTemplates' {$ENDIF} {$ENDIF};

+ 2 - 2
SDL2-for-Pascal/units/sdlguid.inc

@@ -40,7 +40,7 @@ type
  * \sa SDL_GUIDFromString
  *}
 procedure SDL_GUIDToString(guid: TSDL_GUID; pszGUID: PAnsiChar; cbGUID: cint); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GUIDToString' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GUIDToString' {$ENDIF} {$ENDIF};
 
 {**
  * Convert a GUID string into a ::SDL_GUID structure.
@@ -57,4 +57,4 @@ procedure SDL_GUIDToString(guid: TSDL_GUID; pszGUID: PAnsiChar; cbGUID: cint); c
  * \sa SDL_GUIDToString
  *}
 function SDL_GUIDFromString(const pchGUID: PAnsiChar): TSDL_GUID; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GUIDFromString' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GUIDFromString' {$ENDIF} {$ENDIF};

+ 30 - 30
SDL2-for-Pascal/units/sdlhaptic.inc

@@ -804,7 +804,7 @@ type
  * \sa SDL_HapticName
  *}
 function SDL_NumHaptics: cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_NumHaptics' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_NumHaptics' {$ENDIF} {$ENDIF};
 
   {**
  * Get the implementation dependent name of a haptic device.
@@ -821,7 +821,7 @@ function SDL_NumHaptics: cint; cdecl;
  * \sa SDL_NumHaptics
  *}
 function SDL_HapticName(device_index: cint): PAnsiChar; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticName' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticName' {$ENDIF} {$ENDIF};
 
   {**
  * Open a haptic device for use.
@@ -849,7 +849,7 @@ function SDL_HapticName(device_index: cint): PAnsiChar; cdecl;
  * \sa SDL_HapticStopAll
  *}
 function SDL_HapticOpen(device_index: cint): PSDL_Haptic; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticOpen' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticOpen' {$ENDIF} {$ENDIF};
 
   {**
  * Check if the haptic device at the designated index has been opened.
@@ -864,7 +864,7 @@ function SDL_HapticOpen(device_index: cint): PSDL_Haptic; cdecl;
  * \sa SDL_HapticOpen
  *}
 function SDL_HapticOpened(device_index: cint): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticOpened' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticOpened' {$ENDIF} {$ENDIF};
 
   {**
  * Get the index of a haptic device.
@@ -879,7 +879,7 @@ function SDL_HapticOpened(device_index: cint): cint; cdecl;
  * \sa SDL_HapticOpened
  *}
 function SDL_HapticIndex(haptic: PSDL_Haptic): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticIndex' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticIndex' {$ENDIF} {$ENDIF};
 
   {**
  * Query whether or not the current mouse has haptic capabilities.
@@ -891,7 +891,7 @@ function SDL_HapticIndex(haptic: PSDL_Haptic): cint; cdecl;
  * \sa SDL_HapticOpenFromMouse
  *}
 function SDL_MouseIsHaptic: cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_MouseInHaptic' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_MouseInHaptic' {$ENDIF} {$ENDIF};
 
   {**
  * Try to open a haptic device from the current mouse.
@@ -905,7 +905,7 @@ function SDL_MouseIsHaptic: cint; cdecl;
  * \sa SDL_MouseIsHaptic
  *}
 function SDL_HapticOpenFromMouse: PSDL_Haptic; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticOpenFromMouse' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticOpenFromMouse' {$ENDIF} {$ENDIF};
 
   {**
  * Query if a joystick has haptic features.
@@ -920,7 +920,7 @@ function SDL_HapticOpenFromMouse: PSDL_Haptic; cdecl;
  * \sa SDL_HapticOpenFromJoystick
  *}
 function SDL_JoystickIsHaptic(joystick: PSDL_Joystick): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickIsHaptic' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickIsHaptic' {$ENDIF} {$ENDIF};
 
   {**
  * Open a haptic device for use from a joystick device.
@@ -944,7 +944,7 @@ function SDL_JoystickIsHaptic(joystick: PSDL_Joystick): cint; cdecl;
  * \sa SDL_JoystickIsHaptic
  *}
 function SDL_HapticOpenFromJoystick(joystick: PSDL_Joystick): PSDL_Haptic; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticOpenFromJoystick' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticOpenFromJoystick' {$ENDIF} {$ENDIF};
 
   {**
  * Close a haptic device previously opened with SDL_HapticOpen().
@@ -956,7 +956,7 @@ function SDL_HapticOpenFromJoystick(joystick: PSDL_Joystick): PSDL_Haptic; cdecl
  * \sa SDL_HapticOpen
  *}
 procedure SDL_HapticClose(haptic: PSDL_Haptic); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticClose' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticClose' {$ENDIF} {$ENDIF};
 
   {**
  * Get the number of effects a haptic device can store.
@@ -975,7 +975,7 @@ procedure SDL_HapticClose(haptic: PSDL_Haptic); cdecl;
  * \sa SDL_HapticQuery
  *}
 function SDL_HapticNumEffects(haptic: PSDL_Haptic): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticNumEffects' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticNumEffects' {$ENDIF} {$ENDIF};
 
   {**
  * Get the number of effects a haptic device can play at the same time.
@@ -993,7 +993,7 @@ function SDL_HapticNumEffects(haptic: PSDL_Haptic): cint; cdecl;
  * \sa SDL_HapticQuery
  *}
 function SDL_HapticNumEffectsPlaying(haptic: PSDL_Haptic): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticNumEffectsPlaying' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticNumEffectsPlaying' {$ENDIF} {$ENDIF};
 
   {**
  * Get the haptic device's supported features in bitwise manner.
@@ -1008,7 +1008,7 @@ function SDL_HapticNumEffectsPlaying(haptic: PSDL_Haptic): cint; cdecl;
  * \sa SDL_HapticNumEffects
  *}
 function SDL_HapticQuery(haptic: PSDL_Haptic): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticQuery' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticQuery' {$ENDIF} {$ENDIF};
 
   {**
  * Get the number of haptic axes the device has.
@@ -1023,7 +1023,7 @@ function SDL_HapticQuery(haptic: PSDL_Haptic): cint; cdecl;
  * \since This function is available since SDL 2.0.0.
  *}
 function SDL_HapticNumAxes(haptic: PSDL_Haptic): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticNumAxes' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticNumAxes' {$ENDIF} {$ENDIF};
 
   {**
  * Check to see if an effect is supported by a haptic device.
@@ -1040,7 +1040,7 @@ function SDL_HapticNumAxes(haptic: PSDL_Haptic): cint; cdecl;
  * \sa SDL_HapticQuery
  *}
 function SDL_HapticEffectSupported(haptic: PSDL_Haptic; effect: PSDL_HapticEffect): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticEffectSupported' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticEffectSupported' {$ENDIF} {$ENDIF};
 
   {**
  * Create a new haptic effect on a specified device.
@@ -1058,7 +1058,7 @@ function SDL_HapticEffectSupported(haptic: PSDL_Haptic; effect: PSDL_HapticEffec
  * \sa SDL_HapticUpdateEffect
  *}
 function SDL_HapticNewEffect(haptic: PSDL_Haptic; effect: PSDL_HapticEffect): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticNewEffect' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticNewEffect' {$ENDIF} {$ENDIF};
 
   {**
  * Update the properties of an effect.
@@ -1082,7 +1082,7 @@ function SDL_HapticNewEffect(haptic: PSDL_Haptic; effect: PSDL_HapticEffect): ci
  * \sa SDL_HapticRunEffect
  *}
 function SDL_HapticUpdateEffect(haptic: PSDL_Haptic; effect: cint; data: PSDL_HapticEffect): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticUpdateEffect' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticUpdateEffect' {$ENDIF} {$ENDIF};
 
   {**
  * Run the haptic effect on its associated haptic device.
@@ -1107,7 +1107,7 @@ function SDL_HapticUpdateEffect(haptic: PSDL_Haptic; effect: cint; data: PSDL_Ha
  * \sa SDL_HapticStopEffect
  *}
 function SDL_HapticRunEffect(haptic: PSDL_Haptic; effect: cint; iterations: cuint32): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticRunEffect' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticRunEffect' {$ENDIF} {$ENDIF};
 
   {**
  * Stop the haptic effect on its associated haptic device.
@@ -1125,7 +1125,7 @@ function SDL_HapticRunEffect(haptic: PSDL_Haptic; effect: cint; iterations: cuin
  * \sa SDL_HapticRunEffect
  *}
 function SDL_HapticStopEffect(haptic: PSDL_Haptic; effect: cint): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticStopEffect' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticStopEffect' {$ENDIF} {$ENDIF};
 
   {**
  * Destroy a haptic effect on the device.
@@ -1141,7 +1141,7 @@ function SDL_HapticStopEffect(haptic: PSDL_Haptic; effect: cint): cint; cdecl;
  * \sa SDL_HapticNewEffect
  *}
 procedure SDL_HapticDestroyEffect(haptic: PSDL_Haptic; effect: cint); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticDestroyEffect' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticDestroyEffect' {$ENDIF} {$ENDIF};
 
   {**
  * Get the status of the current effect on the specified haptic device.
@@ -1159,7 +1159,7 @@ procedure SDL_HapticDestroyEffect(haptic: PSDL_Haptic; effect: cint); cdecl;
  * \sa SDL_HapticStopEffect
  *}
 function SDL_HapticGetEffectStatus(haptic: PSDL_Haptic; effect: cint): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticGetEffectStatus' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticGetEffectStatus' {$ENDIF} {$ENDIF};
 
   {**
  * Set the global gain of the specified haptic device.
@@ -1181,7 +1181,7 @@ function SDL_HapticGetEffectStatus(haptic: PSDL_Haptic; effect: cint): cint; cde
  * \sa SDL_HapticQuery
  *}
 function SDL_HapticSetGain(haptic: PSDL_Haptic; gain: cint): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticSetGain' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticSetGain' {$ENDIF} {$ENDIF};
 
   {**
  * Set the global autocenter of the device.
@@ -1201,7 +1201,7 @@ function SDL_HapticSetGain(haptic: PSDL_Haptic; gain: cint): cint; cdecl;
  * \sa SDL_HapticQuery
  *}
 function SDL_HapticSetAutocenter(haptic: PSDL_Haptic; autocenter: cint): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticSetAutocenter' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticSetAutocenter' {$ENDIF} {$ENDIF};
 
   {**
  * Pause a haptic device.
@@ -1221,7 +1221,7 @@ function SDL_HapticSetAutocenter(haptic: PSDL_Haptic; autocenter: cint): cint; c
  * \sa SDL_HapticUnpause
  *}
 function SDL_HapticPause(haptic: PSDL_Haptic): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticPause' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticPause' {$ENDIF} {$ENDIF};
 
   {**
  * Unpause a haptic device.
@@ -1237,7 +1237,7 @@ function SDL_HapticPause(haptic: PSDL_Haptic): cint; cdecl;
  * \sa SDL_HapticPause
  *}
 function SDL_HapticUnpause(haptic: PSDL_Haptic): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticUnPause' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticUnPause' {$ENDIF} {$ENDIF};
 
   {**
  * Stop all the currently playing effects on a haptic device.
@@ -1249,7 +1249,7 @@ function SDL_HapticUnpause(haptic: PSDL_Haptic): cint; cdecl;
  * \since This function is available since SDL 2.0.0.
  *}
 function SDL_HapticStopAll(haptic: PSDL_Haptic): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticStopAll' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticStopAll' {$ENDIF} {$ENDIF};
 
   {**
  * Check whether rumble is supported on a haptic device.
@@ -1266,7 +1266,7 @@ function SDL_HapticStopAll(haptic: PSDL_Haptic): cint; cdecl;
  * \sa SDL_HapticRumbleStop
  *}
 function SDL_HapticRumbleSupported(haptic: PSDL_Haptic): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticRumbleSupported' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticRumbleSupported' {$ENDIF} {$ENDIF};
 
   {**
  * Initialize a haptic device for simple rumble playback.
@@ -1283,7 +1283,7 @@ function SDL_HapticRumbleSupported(haptic: PSDL_Haptic): cint; cdecl;
  * \sa SDL_HapticRumbleSupported
  *}
 function SDL_HapticRumbleInit(haptic: PSDL_Haptic): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticRumbleInit' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticRumbleInit' {$ENDIF} {$ENDIF};
 
   {**
  * Run a simple rumble effect on a haptic device.
@@ -1301,7 +1301,7 @@ function SDL_HapticRumbleInit(haptic: PSDL_Haptic): cint; cdecl;
  * \sa SDL_HapticRumbleSupported
  *}
 function SDL_HapticRumblePlay(haptic: PSDL_Haptic; strength: cfloat; length: cuint32): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticRumblePlay' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticRumblePlay' {$ENDIF} {$ENDIF};
 
   {**
  * Stop the simple rumble on a haptic device.
@@ -1317,5 +1317,5 @@ function SDL_HapticRumblePlay(haptic: PSDL_Haptic; strength: cfloat; length: cui
  * \sa SDL_HapticRumbleSupported
  *}
 function SDL_HapticRumbleStop(haptic: PSDL_Haptic): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticRumbleStop' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HapticRumbleStop' {$ENDIF} {$ENDIF};
 

+ 19 - 19
SDL2-for-Pascal/units/sdlhidapi.inc

@@ -107,7 +107,7 @@ type
  * \sa SDL_hid_exit
  *)
 function SDL_hid_init(): cint; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_hid_init' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_hid_init' {$ENDIF} {$ENDIF};
 
 (**
  * Finalize the HIDAPI library.
@@ -122,7 +122,7 @@ function SDL_hid_init(): cint; cdecl;
  * \sa SDL_hid_init
  *)
 function SDL_hid_exit(): cint; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_hid_exit' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_hid_exit' {$ENDIF} {$ENDIF};
 
 (**
  * Check to see if devices may have been added or removed.
@@ -144,7 +144,7 @@ function SDL_hid_exit(): cint; cdecl;
  * \sa SDL_hid_enumerate
  *)
 function SDL_hid_device_change_count(): cUint32; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_hid_device_change_count' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_hid_device_change_count' {$ENDIF} {$ENDIF};
 
 (**
  * Enumerate the HID Devices.
@@ -167,7 +167,7 @@ function SDL_hid_device_change_count(): cUint32; cdecl;
  * \sa SDL_hid_device_change_count
  *)
 function SDL_hid_enumerate(vendor_id, product_id: cushort): PSDL_hid_device_info; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_hid_enumerate' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_hid_enumerate' {$ENDIF} {$ENDIF};
 
 (**
  * Free an enumeration Linked List
@@ -180,7 +180,7 @@ function SDL_hid_enumerate(vendor_id, product_id: cushort): PSDL_hid_device_info
  * \since This function is available since SDL 2.0.18.
  *)
 procedure SDL_hid_free_enumeration(devs: PSDL_hid_device_info); cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_hid_free_enumeration' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_hid_free_enumeration' {$ENDIF} {$ENDIF};
 
 (**
  * Open a HID device using a Vendor ID (VID), Product ID (PID) and optionally
@@ -199,7 +199,7 @@ procedure SDL_hid_free_enumeration(devs: PSDL_hid_device_info); cdecl;
  * \since This function is available since SDL 2.0.18.
  *)
 function SDL_hid_open(vendor_id, product_id: cushort; serial_number: pcwchar_t): PSDL_hid_device; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_hid_open' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_hid_open' {$ENDIF} {$ENDIF};
 
 (**
  * Open a HID device by its path name.
@@ -214,7 +214,7 @@ function SDL_hid_open(vendor_id, product_id: cushort; serial_number: pcwchar_t):
  * \since This function is available since SDL 2.0.18.
  *)
 function SDL_hid_open_path(path: PAnsiChar; bExclusive: cuint): PSDL_hid_device; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_hid_open_path' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_hid_open_path' {$ENDIF} {$ENDIF};
 
 (**
  * Write an Output report to a HID device.
@@ -241,7 +241,7 @@ function SDL_hid_open_path(path: PAnsiChar; bExclusive: cuint): PSDL_hid_device;
  * \since This function is available since SDL 2.0.18.
  *)
 function SDL_hid_write(dev: PSDL_hid_device; data: pcUint8; length: csize_t): cint; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_hid_write' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_hid_write' {$ENDIF} {$ENDIF};
 
 (**
  * Read an Input report from a HID device with timeout.
@@ -263,7 +263,7 @@ function SDL_hid_write(dev: PSDL_hid_device; data: pcUint8; length: csize_t): ci
  * \since This function is available since SDL 2.0.18.
  *)
 function SDL_hid_read_timeout(dev: PSDL_hid_device; data: pcUint8; length: csize_t; milliseconds: cint): cint; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_hid_read_timeout' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_hid_read_timeout' {$ENDIF} {$ENDIF};
 
 (**
  * Read an Input report from a HID device.
@@ -284,7 +284,7 @@ function SDL_hid_read_timeout(dev: PSDL_hid_device; data: pcUint8; length: csize
  * \since This function is available since SDL 2.0.18.
  *)
 function SDL_hid_read(dev: PSDL_hid_device; data: pcUint8; length: csize_t): cint; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_hid_read' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_hid_read' {$ENDIF} {$ENDIF};
 
 (**
  * Set the device handle to be non-blocking.
@@ -303,7 +303,7 @@ function SDL_hid_read(dev: PSDL_hid_device; data: pcUint8; length: csize_t): cin
  * \since This function is available since SDL 2.0.18.
  *)
 function SDL_hid_set_nonblocking(dev: PSDL_hid_device; nonblock: cint): cint; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_hid_set_nonblocking' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_hid_set_nonblocking' {$ENDIF} {$ENDIF};
 
 (**
  * Send a Feature report to the device.
@@ -328,7 +328,7 @@ function SDL_hid_set_nonblocking(dev: PSDL_hid_device; nonblock: cint): cint; cd
  * \since This function is available since SDL 2.0.18.
  *)
 function SDL_hid_send_feature_report(dev: PSDL_hid_device; data: pcUint8; length: csize_t): cint; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_hid_send_feature_report' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_hid_send_feature_report' {$ENDIF} {$ENDIF};
 
 (**
  * Get a feature report from a HID device.
@@ -351,7 +351,7 @@ function SDL_hid_send_feature_report(dev: PSDL_hid_device; data: pcUint8; length
  * \since This function is available since SDL 2.0.18.
  *)
 function SDL_hid_get_feature_report(dev: PSDL_hid_device; data: pcUint8; length: csize_t): cint; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_hid_get_feature_report' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_hid_get_feature_report' {$ENDIF} {$ENDIF};
 
 (**
  * Close a HID device.
@@ -361,7 +361,7 @@ function SDL_hid_get_feature_report(dev: PSDL_hid_device; data: pcUint8; length:
  * \since This function is available since SDL 2.0.18.
  *)
 procedure SDL_hid_close(dev: PSDL_hid_device); cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_hid_close' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_hid_close' {$ENDIF} {$ENDIF};
 
 (**
  * Get The Manufacturer String from a HID device.
@@ -374,7 +374,7 @@ procedure SDL_hid_close(dev: PSDL_hid_device); cdecl;
  * \since This function is available since SDL 2.0.18.
  *)
 function SDL_hid_get_manufacturer_string(dev: PSDL_hid_device; str: pcwchar_t; maxlen: csize_t): cint; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_hid_get_manufacturer_string' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_hid_get_manufacturer_string' {$ENDIF} {$ENDIF};
 
 (**
  * Get The Product String from a HID device.
@@ -387,7 +387,7 @@ function SDL_hid_get_manufacturer_string(dev: PSDL_hid_device; str: pcwchar_t; m
  * \since This function is available since SDL 2.0.18.
  *)
 function SDL_hid_get_product_string(dev: PSDL_hid_device; str: pcwchar_t; maxlen: csize_t): cint; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_hid_get_product_string' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_hid_get_product_string' {$ENDIF} {$ENDIF};
 
 (**
  * Get The Serial Number String from a HID device.
@@ -400,7 +400,7 @@ function SDL_hid_get_product_string(dev: PSDL_hid_device; str: pcwchar_t; maxlen
  * \since This function is available since SDL 2.0.18.
  *)
 function SDL_hid_get_serial_number_string(dev: PSDL_hid_device; str: pcwchar_t; maxlen: csize_t): cint; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_hid_get_serial_number_string' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_hid_get_serial_number_string' {$ENDIF} {$ENDIF};
 
 (**
  * Get a string from a HID device, based on its string index.
@@ -414,7 +414,7 @@ function SDL_hid_get_serial_number_string(dev: PSDL_hid_device; str: pcwchar_t;
  * \since This function is available since SDL 2.0.18.
  *)
 function SDL_hid_get_indexed_string(dev: PSDL_hid_device; string_index: cint; str: pcwchar_t; maxlen: csize_t): cint; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_hid_get_indexed_string' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_hid_get_indexed_string' {$ENDIF} {$ENDIF};
 
 (**
  * Start or stop a BLE scan on iOS and tvOS to pair Steam Controllers
@@ -424,4 +424,4 @@ function SDL_hid_get_indexed_string(dev: PSDL_hid_device; string_index: cint; st
  * \since This function is available since SDL 2.0.18.
  *)
 procedure SDL_hid_ble_scan(active: TSDL_bool); cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_hid_ble_scan' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_hid_ble_scan' {$ENDIF} {$ENDIF};

+ 9 - 9
SDL2-for-Pascal/units/sdlhints.inc

@@ -2416,7 +2416,7 @@ const
  *  \return SDL_TRUE if the hint was set, SDL_FALSE otherwise
  */}
 function SDL_SetHintWithPriority(const name: PAnsiChar; const value: PAnsiChar; priority: TSDL_HintPriority): TSDL_Bool; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetHintWithPriority' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetHintWithPriority' {$ENDIF} {$ENDIF};
 
 {/**
  *  \brief Set a hint with normal priority
@@ -2424,7 +2424,7 @@ function SDL_SetHintWithPriority(const name: PAnsiChar; const value: PAnsiChar;
  *  \return SDL_TRUE if the hint was set, SDL_FALSE otherwise
  */}
 function SDL_SetHint(const name: PAnsiChar; const value: PAnsiChar): TSDL_Bool; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetHint' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetHint' {$ENDIF} {$ENDIF};
 
 {**
  * Reset a hint to the default value.
@@ -2439,7 +2439,7 @@ function SDL_SetHint(const name: PAnsiChar; const value: PAnsiChar): TSDL_Bool;
  * \since This function is available since SDL 2.24.0.
  *}
 function SDL_ResetHint(const name: PAnsiChar): TSDL_Bool; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ResetHint' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ResetHint' {$ENDIF} {$ENDIF};
 
 {**
  * Reset all hints to the default values.
@@ -2455,7 +2455,7 @@ function SDL_ResetHint(const name: PAnsiChar): TSDL_Bool; cdecl;
  * \sa SDL_ResetHint
  *}
 procedure SDL_ResetHints(); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ResetHints' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ResetHints' {$ENDIF} {$ENDIF};
 
 {/**
  *  \brief Get a hint
@@ -2463,7 +2463,7 @@ procedure SDL_ResetHints(); cdecl;
  *  \return The string value of a hint variable.
  */}
 function SDL_GetHint(const name: PAnsiChar): PAnsiChar; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetHint' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetHint' {$ENDIF} {$ENDIF};
 
 {/**
  *  \brief Get a hint
@@ -2471,7 +2471,7 @@ function SDL_GetHint(const name: PAnsiChar): PAnsiChar; cdecl;
  *  \return The boolean value of a hint variable.
  */}
 function SDL_GetHintBoolean(const name: PAnsiChar; default_value: TSDL_Bool): TSDL_Bool; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetHintBoolean' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetHintBoolean' {$ENDIF} {$ENDIF};
 
 {/**
  *  \brief Add a function to watch a particular hint
@@ -2486,7 +2486,7 @@ type
   TSDL_HintCallback = procedure(userdata: Pointer; const name: PAnsiChar; const oldValue: PAnsiChar; const newValue: PAnsiChar); cdecl;
 
 procedure SDL_AddHintCallback(const name: PAnsiChar; callback: TSDL_HintCallback; userdata: Pointer); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AddHintCallback' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AddHintCallback' {$ENDIF} {$ENDIF};
 
 {/**
  *  \brief Remove a function watching a particular hint
@@ -2496,7 +2496,7 @@ procedure SDL_AddHintCallback(const name: PAnsiChar; callback: TSDL_HintCallback
  *  \param userdata A pointer being passed to the callback function
  */}
 procedure SDL_DelHintCallback(const name: PAnsiChar; callback: TSDL_HintCallback; userdata: Pointer); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_DelHintCallback' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_DelHintCallback' {$ENDIF} {$ENDIF};
 
 {**
  * Clear all hints.
@@ -2513,4 +2513,4 @@ procedure SDL_DelHintCallback(const name: PAnsiChar; callback: TSDL_HintCallback
  * \sa SDL_ResetHints
  *}
 procedure SDL_ClearHints(); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ClearHints' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ClearHints' {$ENDIF} {$ENDIF};

+ 58 - 58
SDL2-for-Pascal/units/sdljoystick.inc

@@ -106,7 +106,7 @@ const
  * \since This function is available since SDL 2.0.7.
  *}
 procedure SDL_LockJoysticks(); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LockJoysticks' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LockJoysticks' {$ENDIF} {$ENDIF};
 
 {**
  * Unlocking for multi-threaded access to the joystick API
@@ -121,7 +121,7 @@ procedure SDL_LockJoysticks(); cdecl;
  * \since This function is available since SDL 2.0.7.
  *}
 procedure SDL_UnlockJoysticks(); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_UnlockJoysticks' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_UnlockJoysticks' {$ENDIF} {$ENDIF};
 
 {**
  * Count the number of joysticks attached to the system.
@@ -136,7 +136,7 @@ procedure SDL_UnlockJoysticks(); cdecl;
  * \sa SDL_JoystickOpen
  *}
 function SDL_NumJoysticks(): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_NumJoysticks' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_NumJoysticks' {$ENDIF} {$ENDIF};
 
 {**
  * Get the implementation dependent name of a joystick.
@@ -154,7 +154,7 @@ function SDL_NumJoysticks(): cint; cdecl;
  * \sa SDL_JoystickOpen
  *}
 function SDL_JoystickNameForIndex(device_index: cint): PAnsiChar; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickNameForIndex' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickNameForIndex' {$ENDIF} {$ENDIF};
 
 {**
  * Get the implementation dependent path of a joystick.
@@ -172,7 +172,7 @@ function SDL_JoystickNameForIndex(device_index: cint): PAnsiChar; cdecl;
  * \sa SDL_JoystickOpen
  *}
 function SDL_JoystickPathForIndex(device_index: cint): PAnsiChar; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickPathForIndex' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickPathForIndex' {$ENDIF} {$ENDIF};
 
 {**
  * Get the player index of a joystick, or -1 if it's not available This can be
@@ -181,14 +181,14 @@ function SDL_JoystickPathForIndex(device_index: cint): PAnsiChar; cdecl;
  * \since This function is available since SDL 2.0.9.
  *}
 function SDL_JoystickGetDevicePlayerIndex(device_index: cint): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetDevicePlayerIndex' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetDevicePlayerIndex' {$ENDIF} {$ENDIF};
 
 {**
  *  Return the GUID for the joystick at this index
  *  This can be called before any joysticks are opened.
  *}
 function SDL_JoystickGetDeviceGUID(device_index: cint): TSDL_JoystickGUID; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetDeviceGUID' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetDeviceGUID' {$ENDIF} {$ENDIF};
 
 {**
  * Get the USB vendor ID of a joystick, if available.
@@ -204,7 +204,7 @@ function SDL_JoystickGetDeviceGUID(device_index: cint): TSDL_JoystickGUID; cdecl
  * \since This function is available since SDL 2.0.6.
  *}
 function SDL_JoystickGetDeviceVendor(device_index: cint): cuint16; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetDeviceVendor' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetDeviceVendor' {$ENDIF} {$ENDIF};
 
 {**
  * Get the USB product ID of a joystick, if available.
@@ -220,7 +220,7 @@ function SDL_JoystickGetDeviceVendor(device_index: cint): cuint16; cdecl;
  * \since This function is available since SDL 2.0.6.
  *}
 function SDL_JoystickGetDeviceProduct(device_index: cint): cuint16; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetDeviceProduct' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetDeviceProduct' {$ENDIF} {$ENDIF};
 
 {**
  * Get the product version of a joystick, if available.
@@ -236,7 +236,7 @@ function SDL_JoystickGetDeviceProduct(device_index: cint): cuint16; cdecl;
  * \since This function is available since SDL 2.0.6.
  *}
 function SDL_JoystickGetDeviceProductVersion(device_index: cint): cuint16; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetDeviceProductVersion' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetDeviceProductVersion' {$ENDIF} {$ENDIF};
 
 {**
  * Get the type of a joystick, if available.
@@ -251,7 +251,7 @@ function SDL_JoystickGetDeviceProductVersion(device_index: cint): cuint16; cdecl
  * \since This function is available since SDL 2.0.6.
  *}
 function SDL_JoystickGetDeviceType(device_index: cint): TSDL_JoystickType; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetDeviceType' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetDeviceType' {$ENDIF} {$ENDIF};
 
 {**
  * Get the instance ID of a joystick.
@@ -267,7 +267,7 @@ function SDL_JoystickGetDeviceType(device_index: cint): TSDL_JoystickType; cdecl
  * \since This function is available since SDL 2.0.6.
  *}
 function SDL_JoystickGetDeviceInstanceID(device_index: cint): TSDL_JoystickID; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetDeviceInstanceID' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetDeviceInstanceID' {$ENDIF} {$ENDIF};
 
 {**
  * Open a joystick for use.
@@ -290,7 +290,7 @@ function SDL_JoystickGetDeviceInstanceID(device_index: cint): TSDL_JoystickID; c
  * \sa SDL_JoystickInstanceID
  *}
 function SDL_JoystickOpen(device_index: cint): PSDL_Joystick; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickOpen' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickOpen' {$ENDIF} {$ENDIF};
 
 {**
  * Get the SDL_Joystick associated with an instance id.
@@ -302,7 +302,7 @@ function SDL_JoystickOpen(device_index: cint): PSDL_Joystick; cdecl;
  * \since This function is available since SDL 2.0.4.
  *}
 function SDL_JoystickFromInstanceID(instance_id: TSDL_JoystickID): PSDL_Joystick; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickFromInstanceID' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickFromInstanceID' {$ENDIF} {$ENDIF};
 
 {**
  * Get the SDL_Joystick associated with a player index.
@@ -314,7 +314,7 @@ function SDL_JoystickFromInstanceID(instance_id: TSDL_JoystickID): PSDL_Joystick
  * \since This function is available since SDL 2.0.12.
  *}
 function SDL_JoystickFromPlayerIndex(player_index: cint): PSDL_Joystick; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickFromPlayerIndex' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickFromPlayerIndex' {$ENDIF} {$ENDIF};
 
 {**
  * Attach a new virtual joystick.
@@ -324,7 +324,7 @@ function SDL_JoystickFromPlayerIndex(player_index: cint): PSDL_Joystick; cdecl;
  * \since This function is available since SDL 2.0.14.
  *}
 function SDL_JoystickAttachVirtual(type_: TSDL_JoystickType; naxes: cint; nbuttons: cint; nhats: cint): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickAttachVirtual' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickAttachVirtual' {$ENDIF} {$ENDIF};
 
 type
   {**
@@ -382,7 +382,7 @@ const
  * \since This function is available since SDL 2.24.0.
  */}
 function SDL_JoystickAttachVirtualEx(const desc: PSDL_VirtualJoystickDesc): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickAttachVirtualEx' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickAttachVirtualEx' {$ENDIF} {$ENDIF};
 
 {**
  * Detach a virtual joystick.
@@ -394,7 +394,7 @@ function SDL_JoystickAttachVirtualEx(const desc: PSDL_VirtualJoystickDesc): cint
  * \since This function is available since SDL 2.0.14.
  *}
 function SDL_JoystickDetachVirtual(device_index: cint): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickDetachVirtual' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickDetachVirtual' {$ENDIF} {$ENDIF};
 
 {**
  * Query whether or not the joystick at a given device index is virtual.
@@ -405,7 +405,7 @@ function SDL_JoystickDetachVirtual(device_index: cint): cint; cdecl;
  * \since This function is available since SDL 2.0.14.
  *}
 function SDL_JoystickIsVirtual(device_index: cint): TSDL_Bool; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickIsVirtual' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickIsVirtual' {$ENDIF} {$ENDIF};
 
 {**
  * Set values on an opened, virtual-joystick's axis.
@@ -428,7 +428,7 @@ function SDL_JoystickIsVirtual(device_index: cint): TSDL_Bool; cdecl;
  * \since This function is available since SDL 2.0.14.
  *}
 function SDL_JoystickSetVirtualAxis(joystick: PSDL_Joystick; axis: cint; value: cint16): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickSetVirtualAxis' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickSetVirtualAxis' {$ENDIF} {$ENDIF};
 
 {**
  * Set values on an opened, virtual-joystick's button.
@@ -447,7 +447,7 @@ function SDL_JoystickSetVirtualAxis(joystick: PSDL_Joystick; axis: cint; value:
  * \since This function is available since SDL 2.0.14.
  *}
 function SDL_JoystickSetVirtualButton(joystick: PSDL_Joystick; button: cint; value: cuint8): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickSetVirtualButton' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickSetVirtualButton' {$ENDIF} {$ENDIF};
 
 {**
  * Set values on an opened, virtual-joystick's hat.
@@ -466,7 +466,7 @@ function SDL_JoystickSetVirtualButton(joystick: PSDL_Joystick; button: cint; val
  * \since This function is available since SDL 2.0.14.
  *}
 function SDL_JoystickSetVirtualHat(joystick: PSDL_Joystick; hat: cint; value: cuint8): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickSetVirtualHat' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickSetVirtualHat' {$ENDIF} {$ENDIF};
 
 {**
  * Get the implementation dependent name of a joystick.
@@ -481,7 +481,7 @@ function SDL_JoystickSetVirtualHat(joystick: PSDL_Joystick; hat: cint; value: cu
  * \sa SDL_JoystickOpen
  *}
 function SDL_JoystickName(joystick: PSDL_Joystick): PAnsiChar; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickName' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickName' {$ENDIF} {$ENDIF};
 
 {**
  * Get the implementation dependent path of a joystick.
@@ -495,7 +495,7 @@ function SDL_JoystickName(joystick: PSDL_Joystick): PAnsiChar; cdecl;
  * \sa SDL_JoystickPathForIndex
  *}
 function SDL_JoystickPath(joystick: PSDL_Joystick): PAnsiChar; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickPath' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickPath' {$ENDIF} {$ENDIF};
 
 {**
  * Get the player index of an opened joystick.
@@ -509,7 +509,7 @@ function SDL_JoystickPath(joystick: PSDL_Joystick): PAnsiChar; cdecl;
  * \since This function is available since SDL 2.0.9.
  *}
 function SDL_JoystickGetPlayerIndex(joystick: PSDL_Joystick): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetPlayerIndex' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetPlayerIndex' {$ENDIF} {$ENDIF};
 
 {**
  * Set the player index of an opened joystick.
@@ -521,7 +521,7 @@ function SDL_JoystickGetPlayerIndex(joystick: PSDL_Joystick): cint; cdecl;
  * \since This function is available since SDL 2.0.12.
  *}
 procedure SDL_JoystickSetPlayerIndex(joystick: PSDL_Joystick; player_index: cint); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickSetPlayerIndex' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickSetPlayerIndex' {$ENDIF} {$ENDIF};
 
 {**
  * Get the implementation-dependent GUID for the joystick.
@@ -539,7 +539,7 @@ procedure SDL_JoystickSetPlayerIndex(joystick: PSDL_Joystick; player_index: cint
  * \sa SDL_JoystickGetGUIDString
  *}
 function SDL_JoystickGetGUID(joystick: PSDL_Joystick): TSDL_JoystickGUID; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetGUID' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetGUID' {$ENDIF} {$ENDIF};
 
 {**
  * Get the USB vendor ID of an opened joystick, if available.
@@ -552,7 +552,7 @@ function SDL_JoystickGetGUID(joystick: PSDL_Joystick): TSDL_JoystickGUID; cdecl;
  * \since This function is available since SDL 2.0.6.
  *}
 function SDL_JoystickGetVendor(joystick: PSDL_Joystick): cuint16; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetVendor' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetVendor' {$ENDIF} {$ENDIF};
 
 {**
  * Get the USB product ID of an opened joystick, if available.
@@ -565,7 +565,7 @@ function SDL_JoystickGetVendor(joystick: PSDL_Joystick): cuint16; cdecl;
  * \since This function is available since SDL 2.0.6.
  *}
 function SDL_JoystickGetProduct(joystick: PSDL_Joystick): cuint16; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetProduct' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetProduct' {$ENDIF} {$ENDIF};
 
 {**
  * Get the product version of an opened joystick, if available.
@@ -578,7 +578,7 @@ function SDL_JoystickGetProduct(joystick: PSDL_Joystick): cuint16; cdecl;
  * \since This function is available since SDL 2.0.6.
  *}
 function SDL_JoystickGetProductVersion(joystick: PSDL_Joystick): cuint16; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetProductVersion' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetProductVersion' {$ENDIF} {$ENDIF};
 
 {**
  * Get the firmware version of an opened joystick, if available.
@@ -592,7 +592,7 @@ function SDL_JoystickGetProductVersion(joystick: PSDL_Joystick): cuint16; cdecl;
  * \since This function is available since SDL 2.24.0.
  *}
 function SDL_JoystickGetFirmwareVersion(joystick: PSDL_Joystick): cuint16; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetFirmwareVersion' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetFirmwareVersion' {$ENDIF} {$ENDIF};
 
 {**
  * Get the serial number of an opened joystick, if available.
@@ -606,7 +606,7 @@ function SDL_JoystickGetFirmwareVersion(joystick: PSDL_Joystick): cuint16; cdecl
  * \since This function is available since SDL 2.0.14.
  *}
 function SDL_JoystickGetSerial(joystick: PSDL_Joystick): PAnsiChar; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetSerial' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetSerial' {$ENDIF} {$ENDIF};
 
 {**
  * Get the type of an opened joystick.
@@ -617,7 +617,7 @@ function SDL_JoystickGetSerial(joystick: PSDL_Joystick): PAnsiChar; cdecl;
  * \since This function is available since SDL 2.0.6.
  *}
 function SDL_JoystickGetType(joystick: PSDL_Joystick): TSDL_JoystickType; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetType' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetType' {$ENDIF} {$ENDIF};
 
 {**
  * Get an ASCII string representation for a given SDL_JoystickGUID.
@@ -635,7 +635,7 @@ function SDL_JoystickGetType(joystick: PSDL_Joystick): TSDL_JoystickType; cdecl;
  * \sa SDL_JoystickGetGUIDFromString
  *}
 procedure SDL_JoystickGetGUIDString(guid: TSDL_JoystickGUID; pszGUID: PAnsiChar; cbGUID: cint); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetGUIDString' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetGUIDString' {$ENDIF} {$ENDIF};
 
 {**
  * Convert a GUID string into a SDL_JoystickGUID structure.
@@ -652,7 +652,7 @@ procedure SDL_JoystickGetGUIDString(guid: TSDL_JoystickGUID; pszGUID: PAnsiChar;
  * \sa SDL_JoystickGetGUIDString
  *}
 function SDL_JoystickGetGUIDFromString(const pchGUID: PAnsiChar): TSDL_JoystickGUID; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetGUIDFromString' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetGUIDFromString' {$ENDIF} {$ENDIF};
 
 {**
  * Get the device information encoded in a SDL_JoystickGUID structure
@@ -672,7 +672,7 @@ function SDL_JoystickGetGUIDFromString(const pchGUID: PAnsiChar): TSDL_JoystickG
  * \sa SDL_JoystickGetDeviceGUID
  *}
 procedure SDL_GetJoystickGUIDInfo(guid: TSDL_JoystickGUID; vendor: pcuint16; product: pcuint16; version: pcuint16; crc16: pcuint16); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetJoystickGUIDInfo' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetJoystickGUIDInfo' {$ENDIF} {$ENDIF};
 
 {**
  * Get the status of a specified joystick.
@@ -687,7 +687,7 @@ procedure SDL_GetJoystickGUIDInfo(guid: TSDL_JoystickGUID; vendor: pcuint16; pro
  * \sa SDL_JoystickOpen
  *}
 function SDL_JoystickGetAttached(joystick: PSDL_Joystick): TSDL_Bool; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetAttached' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetAttached' {$ENDIF} {$ENDIF};
 
 {**
  * Get the instance ID of an opened joystick.
@@ -701,7 +701,7 @@ function SDL_JoystickGetAttached(joystick: PSDL_Joystick): TSDL_Bool; cdecl;
  * \sa SDL_JoystickOpen
  *}
 function SDL_JoystickInstanceID(joystick: PSDL_Joystick): TSDL_JoystickID; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickInstanceID' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickInstanceID' {$ENDIF} {$ENDIF};
 
 {**
  * Get the number of general axis controls on a joystick.
@@ -721,7 +721,7 @@ function SDL_JoystickInstanceID(joystick: PSDL_Joystick): TSDL_JoystickID; cdecl
  * \sa SDL_JoystickOpen
  *}
 function SDL_JoystickNumAxes(joystick: PSDL_Joystick): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickNumAxes' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickNumAxes' {$ENDIF} {$ENDIF};
 
 {**
  * Get the number of trackballs on a joystick.
@@ -740,7 +740,7 @@ function SDL_JoystickNumAxes(joystick: PSDL_Joystick): cint; cdecl;
  * \sa SDL_JoystickGetBall
  *}
 function SDL_JoystickNumBalls(joystick: PSDL_Joystick): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickNumBalls' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickNumBalls' {$ENDIF} {$ENDIF};
 
 {**
  * Get the number of POV hats on a joystick.
@@ -755,7 +755,7 @@ function SDL_JoystickNumBalls(joystick: PSDL_Joystick): cint; cdecl;
  * \sa SDL_JoystickOpen
  *}
 function SDL_JoystickNumHats(joystick: PSDL_Joystick): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickNumHats' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickNumHats' {$ENDIF} {$ENDIF};
 
 {**
  * Get the number of buttons on a joystick.
@@ -770,7 +770,7 @@ function SDL_JoystickNumHats(joystick: PSDL_Joystick): cint; cdecl;
  * \sa SDL_JoystickOpen
  *}
 function SDL_JoystickNumButtons(joystick: PSDL_Joystick): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickNumButtons' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickNumButtons' {$ENDIF} {$ENDIF};
 
 {**
  * Update the current state of the open joysticks.
@@ -783,7 +783,7 @@ function SDL_JoystickNumButtons(joystick: PSDL_Joystick): cint; cdecl;
  * \sa SDL_JoystickEventState
  *}
 procedure SDL_JoystickUpdate(); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickUpdate' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickUpdate' {$ENDIF} {$ENDIF};
 
 {**
  * Enable/disable joystick event polling.
@@ -809,7 +809,7 @@ procedure SDL_JoystickUpdate(); cdecl;
  * \sa SDL_GameControllerEventState
  *}
 function SDL_JoystickEventState(state: cint): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickEventState' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickEventState' {$ENDIF} {$ENDIF};
 
 const
   SDL_JOYSTICK_AXIS_MAX = 32767;
@@ -838,7 +838,7 @@ const
  * \sa SDL_JoystickNumAxes
  *}
 function SDL_JoystickGetAxis(joystick: PSDL_Joystick; axis: cint): cint16; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetAxis' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetAxis' {$ENDIF} {$ENDIF};
 
 {**
  * Get the initial state of an axis control on a joystick.
@@ -855,7 +855,7 @@ function SDL_JoystickGetAxis(joystick: PSDL_Joystick; axis: cint): cint16; cdecl
  * \since This function is available since SDL 2.0.6.
  *}
 function SDL_JoystickGetAxisInitialState(joystick: PSDL_Joystick; axis: cint; state: pcint16): TSDL_Bool; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetAxisInitialState' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetAxisInitialState' {$ENDIF} {$ENDIF};
 
 {**
  *  Hat positions
@@ -895,7 +895,7 @@ const
  * \sa SDL_JoystickNumHats
  *}
 function SDL_JoystickGetHat(joystick: PSDL_Joystick; hat: cint): cuint8; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetHat' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetHat' {$ENDIF} {$ENDIF};
 
 {**
  * Get the ball axis change since the last poll.
@@ -917,7 +917,7 @@ function SDL_JoystickGetHat(joystick: PSDL_Joystick; hat: cint): cuint8; cdecl;
  * \sa SDL_JoystickNumBalls
  *}
 function SDL_JoystickGetBall(joystick: PSDL_Joystick; ball: cint; dx: pcint; dy: pcint): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetBall' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetBall' {$ENDIF} {$ENDIF};
 
 {**
  * Get the current state of a button on a joystick.
@@ -932,7 +932,7 @@ function SDL_JoystickGetBall(joystick: PSDL_Joystick; ball: cint; dx: pcint; dy:
  * \sa SDL_JoystickNumButtons
  *}
 function SDL_JoystickGetButton(joystick: PSDL_Joystick; button: cint): cuint8; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetButton' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickGetButton' {$ENDIF} {$ENDIF};
 
 {**
  * Start a rumble effect.
@@ -953,7 +953,7 @@ function SDL_JoystickGetButton(joystick: PSDL_Joystick; button: cint): cuint8; c
  * \sa SDL_JoystickHasRumble
  *}
 function SDL_JoystickRumble(joystick: PSDL_Joystick; low_frequency_rumble: cuint16; high_frequency_rumble: cuint16; duration_ms: cuint32): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickRumble' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickRumble' {$ENDIF} {$ENDIF};
 
 {**
  * Start a rumble effect in the joystick's triggers
@@ -979,7 +979,7 @@ function SDL_JoystickRumble(joystick: PSDL_Joystick; low_frequency_rumble: cuint
  * \sa SDL_JoystickHasRumbleTriggers
  *}
 function SDL_JoystickRumbleTriggers(joystick: PSDL_Joystick; left_rumble: cuint16; right_rumble: cuint16; duration_ms: cuint32): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickRumbleTriggers' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickRumbleTriggers' {$ENDIF} {$ENDIF};
 
 {**
  * Query whether a joystick has an LED.
@@ -993,7 +993,7 @@ function SDL_JoystickRumbleTriggers(joystick: PSDL_Joystick; left_rumble: cuint1
  * \since This function is available since SDL 2.0.14.
  *}
 function SDL_JoystickHasLED(joystick: PSDL_Joystick): TSDL_Bool; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickHasLED' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickHasLED' {$ENDIF} {$ENDIF};
 
 {**
  * Query whether a joystick has rumble support.
@@ -1006,7 +1006,7 @@ function SDL_JoystickHasLED(joystick: PSDL_Joystick): TSDL_Bool; cdecl;
  * \sa SDL_JoystickRumble
  *}
 function SDL_JoystickHasRumble(joystick: PSDL_Joystick): TSDL_Bool; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickHasRumble' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickHasRumble' {$ENDIF} {$ENDIF};
 
 {**
  * Query whether a joystick has rumble support on triggers.
@@ -1019,7 +1019,7 @@ function SDL_JoystickHasRumble(joystick: PSDL_Joystick): TSDL_Bool; cdecl;
  * \sa SDL_JoystickRumbleTriggers
  *}
 function SDL_JoystickHasRumbleTriggers(joystick: PSDL_Joystick): TSDL_Bool; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickHasRumbleTriggers' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickHasRumbleTriggers' {$ENDIF} {$ENDIF};
 
 
 {**
@@ -1037,7 +1037,7 @@ function SDL_JoystickHasRumbleTriggers(joystick: PSDL_Joystick): TSDL_Bool; cdec
  * \since This function is available since SDL 2.0.14.
  *}
 function SDL_JoystickSetLED(joystick: PSDL_Joystick; red: cuint8; green: cuint8; blue: cuint8): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickSetLED' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickSetLED' {$ENDIF} {$ENDIF};
 
 {**
  * Send a joystick specific effect packet
@@ -1050,7 +1050,7 @@ function SDL_JoystickSetLED(joystick: PSDL_Joystick; red: cuint8; green: cuint8;
  * \since This function is available since SDL 2.0.16.
  *}
 function SDL_JoystickSendEffect(joystick: PSDL_Joystick; const data: Pointer; size: cint): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickSendEffect' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickSendEffect' {$ENDIF} {$ENDIF};
 
 {**
  * Close a joystick previously opened with SDL_JoystickOpen().
@@ -1062,7 +1062,7 @@ function SDL_JoystickSendEffect(joystick: PSDL_Joystick; const data: Pointer; si
  * \sa SDL_JoystickOpen
  *}
 procedure SDL_JoystickClose(joystick: PSDL_Joystick); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickClose' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickClose' {$ENDIF} {$ENDIF};
 
 {**
  * Get the battery level of a joystick as SDL_JoystickPowerLevel.
@@ -1074,4 +1074,4 @@ procedure SDL_JoystickClose(joystick: PSDL_Joystick); cdecl;
  * \since This function is available since SDL 2.0.4.
  *}
 function SDL_JoystickCurrentPowerLevel(joystick: PSDL_Joystick): TSDL_JoystickPowerLevel; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickCurrentPowerLevel' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickCurrentPowerLevel' {$ENDIF} {$ENDIF};

+ 19 - 19
SDL2-for-Pascal/units/sdlkeyboard.inc

@@ -39,7 +39,7 @@ type
  * \since This function is available since SDL 2.0.0.
   }
 function SDL_GetKeyboardFocus: PSDL_Window; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetKeyboardFocus' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetKeyboardFocus' {$ENDIF} {$ENDIF};
 
 {*
  * Get a snapshot of the current state of the keyboard.
@@ -71,7 +71,7 @@ function SDL_GetKeyboardFocus: PSDL_Window; cdecl;
  * \sa SDL_ResetKeyboard
   }
 function SDL_GetKeyboardState(numkeys: pcint): pcuint8; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetKeyboardState' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetKeyboardState' {$ENDIF} {$ENDIF};
 
 {*
  * Clear the state of the keyboard
@@ -83,7 +83,7 @@ function SDL_GetKeyboardState(numkeys: pcint): pcuint8; cdecl;
  * \sa SDL_GetKeyboardState
   }
 procedure SDL_ResetKeyboard; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ResetKeyboard' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ResetKeyboard' {$ENDIF} {$ENDIF};
 
 {*
  * Get the current key modifier state for the keyboard.
@@ -97,7 +97,7 @@ procedure SDL_ResetKeyboard; cdecl;
  * \sa SDL_SetModState
   }
 function SDL_GetModState: TSDL_Keymod; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetModState' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetModState' {$ENDIF} {$ENDIF};
 
 {*
  * Set the current key modifier state for the keyboard.
@@ -117,7 +117,7 @@ function SDL_GetModState: TSDL_Keymod; cdecl;
  * \sa SDL_GetModState
   }
 procedure SDL_SetModState(modstate: TSDL_Keymod); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetModState' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetModState' {$ENDIF} {$ENDIF};
 
 {*
  * Get the key code corresponding to the given scancode according to the
@@ -134,7 +134,7 @@ procedure SDL_SetModState(modstate: TSDL_Keymod); cdecl;
  * \sa SDL_GetScancodeFromKey
   }
 function SDL_GetKeyFromScancode(scancode: TSDL_Scancode): TSDL_Keycode; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetKeyFromScancode' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetKeyFromScancode' {$ENDIF} {$ENDIF};
 
 {*
  * Get the scancode corresponding to the given key code according to the
@@ -151,7 +151,7 @@ function SDL_GetKeyFromScancode(scancode: TSDL_Scancode): TSDL_Keycode; cdecl;
  * \sa SDL_GetScancodeName
   }
 function SDL_GetScancodeFromKey(key: TSDL_Keycode): TSDL_Scancode; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetScancodeFromKey' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetScancodeFromKey' {$ENDIF} {$ENDIF};
 
 {*
  * Get a human-readable name for a scancode.
@@ -177,7 +177,7 @@ function SDL_GetScancodeFromKey(key: TSDL_Keycode): TSDL_Scancode; cdecl;
  * \sa SDL_GetScancodeFromName
   }
 function SDL_GetScancodeName(scancode: TSDL_Scancode): PAnsiChar; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetScancodeName' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetScancodeName' {$ENDIF} {$ENDIF};
 
 {*
  * Get a scancode from a human-readable name.
@@ -193,7 +193,7 @@ function SDL_GetScancodeName(scancode: TSDL_Scancode): PAnsiChar; cdecl;
  * \sa SDL_GetScancodeName
   }
 function SDL_GetScancodeFromName(name: PAnsiChar): TSDL_Scancode; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetScancodeFromName' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetScancodeFromName' {$ENDIF} {$ENDIF};
 
 {*
  * Get a human-readable name for a key.
@@ -213,7 +213,7 @@ function SDL_GetScancodeFromName(name: PAnsiChar): TSDL_Scancode; cdecl;
  * \sa SDL_GetScancodeFromKey
   }
 function SDL_GetKeyName(key: TSDL_Keycode): PAnsiChar; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetKeyName' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetKeyName' {$ENDIF} {$ENDIF};
 
 {*
  * Get a key code from a human-readable name.
@@ -229,7 +229,7 @@ function SDL_GetKeyName(key: TSDL_Keycode): PAnsiChar; cdecl;
  * \sa SDL_GetScancodeFromName
   }
 function SDL_GetKeyFromName(name: PAnsiChar): TSDL_Keycode; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetKeyFromName' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetKeyFromName' {$ENDIF} {$ENDIF};
 
 {*
  * Start accepting Unicode text input events.
@@ -247,7 +247,7 @@ function SDL_GetKeyFromName(name: PAnsiChar): TSDL_Keycode; cdecl;
  * \sa SDL_StopTextInput
   }
 procedure SDL_StartTextInput; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_StartTextInput' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_StartTextInput' {$ENDIF} {$ENDIF};
 
 {*
  * Check whether or not Unicode text input events are enabled.
@@ -259,7 +259,7 @@ procedure SDL_StartTextInput; cdecl;
  * \sa SDL_StartTextInput
   }
 function SDL_IsTextInputActive: TSDL_bool; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_IsTextInputActive' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_IsTextInputActive' {$ENDIF} {$ENDIF};
 
 {*
  * Stop receiving any text input events.
@@ -269,7 +269,7 @@ function SDL_IsTextInputActive: TSDL_bool; cdecl;
  * \sa SDL_StartTextInput
   }
 procedure SDL_StopTextInput; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_StopTextInput' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_StopTextInput' {$ENDIF} {$ENDIF};
 
 {*
  * Dismiss the composition window/IME without disabling the subsystem.
@@ -280,7 +280,7 @@ procedure SDL_StopTextInput; cdecl;
  * \sa SDL_StopTextInput
   }
 procedure SDL_ClearComposition; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ClearComposition' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ClearComposition' {$ENDIF} {$ENDIF};
 
 {*
  * Returns if an IME Composite or Candidate window is currently shown.
@@ -288,7 +288,7 @@ procedure SDL_ClearComposition; cdecl;
  * \since This function is available since SDL 2.0.22.
   }
 function SDL_IsTextInputShown: TSDL_bool; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_IsTextInputShown' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_IsTextInputShown' {$ENDIF} {$ENDIF};
 
 {*
  * Set the rectangle used to type Unicode text inputs.
@@ -309,7 +309,7 @@ function SDL_IsTextInputShown: TSDL_bool; cdecl;
  * \sa SDL_StartTextInput
   }
 procedure SDL_SetTextInputRect(rect: PSDL_Rect); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetTextInputRect' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetTextInputRect' {$ENDIF} {$ENDIF};
 
 {*
  * Check whether the platform has screen keyboard support.
@@ -323,7 +323,7 @@ procedure SDL_SetTextInputRect(rect: PSDL_Rect); cdecl;
  * \sa SDL_IsScreenKeyboardShown
   }
 function SDL_HasScreenKeyboardSupport: TSDL_bool; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasScreenKeyboardSupport' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasScreenKeyboardSupport' {$ENDIF} {$ENDIF};
 
 {*
  * Check whether the screen keyboard is shown for given window.
@@ -336,5 +336,5 @@ function SDL_HasScreenKeyboardSupport: TSDL_bool; cdecl;
  * \sa SDL_HasScreenKeyboardSupport
   }
 function SDL_IsScreenKeyboardShown(window: PSDL_Window): TSDL_bool; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_IsScreenKeyboardShown' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_IsScreenKeyboardShown' {$ENDIF} {$ENDIF};
 

+ 3 - 3
SDL2-for-Pascal/units/sdlloadso.inc

@@ -32,7 +32,7 @@
  * \sa SDL_UnloadObject
   }
 function SDL_LoadObject(sofile: PAnsiChar): Pointer; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LoadObject' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LoadObject' {$ENDIF} {$ENDIF};
 
 {*
  * Look up the address of the named function in a shared object.
@@ -60,7 +60,7 @@ function SDL_LoadObject(sofile: PAnsiChar): Pointer; cdecl;
  * \sa SDL_UnloadObject
   }
 function SDL_LoadFunction(handle: Pointer; name: PAnsiChar): Pointer; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LoadFunction' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LoadFunction' {$ENDIF} {$ENDIF};
 
 {*
  * Unload a shared object from memory.
@@ -73,4 +73,4 @@ function SDL_LoadFunction(handle: Pointer; name: PAnsiChar): Pointer; cdecl;
  * \sa SDL_LoadObject
   }
 procedure SDL_UnloadObject(handle: Pointer); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_UnloadObject' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_UnloadObject' {$ENDIF} {$ENDIF};

+ 1 - 1
SDL2-for-Pascal/units/sdllocale.inc

@@ -51,4 +51,4 @@ type
  *           field. Will return NIL on error.
  *}
 function SDL_GetPreferredLocales(): PSDL_Locale; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetPreferredLocales' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetPreferredLocales' {$ENDIF} {$ENDIF};

+ 15 - 15
SDL2-for-Pascal/units/sdllog.inc

@@ -69,19 +69,19 @@ const
  *  \brief Set the priority of all log categories
  *}
 procedure SDL_LogSetAllPriority(priority: TSDL_LogPriority); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LogSetAllPriority' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LogSetAllPriority' {$ENDIF} {$ENDIF};
 
 {**
  *  \brief Set the priority of a particular log category
  *}
 procedure SDL_LogSetPriority(category: TSDL_LogCategory; priority: TSDL_LogPriority); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LogSetPriority' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LogSetPriority' {$ENDIF} {$ENDIF};
 
 {**
  *  \brief Get the priority of a particular log category
  *}
 function SDL_LogGetPriority(category: TSDL_LogCategory): TSDL_LogPriority; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LogGetPriority' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LogGetPriority' {$ENDIF} {$ENDIF};
 
 {**
  *  \brief Reset all priorities to default.
@@ -89,61 +89,61 @@ function SDL_LogGetPriority(category: TSDL_LogCategory): TSDL_LogPriority; cdecl
  *  \note This is called in SDL_Quit().
  *}
 procedure SDL_LogResetPriorities(); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LogResetPriorities' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LogResetPriorities' {$ENDIF} {$ENDIF};
 
 {**
  *  \brief Log a message with SDL_LOG_CATEGORY_APPLICATION and SDL_LOG_PRIORITY_INFO
  *}
 procedure SDL_Log(const fmt: PAnsiChar; pars: array of const); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_Log' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_Log' {$ENDIF} {$ENDIF};
 
 {**
  *  \brief Log a message with SDL_LOG_PRIORITY_VERBOSE
  *}
 procedure SDL_LogVerbose(category: TSDL_LogCategory; const fmt: PAnsiChar; pars: array of const); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LogVerbose' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LogVerbose' {$ENDIF} {$ENDIF};
 
 {**
  *  \brief Log a message with SDL_LOG_PRIORITY_DEBUG
  *}
 procedure SDL_LogDebug(category: TSDL_LogCategory; const fmt: PAnsiChar; pars: array of const); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LogDebug' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LogDebug' {$ENDIF} {$ENDIF};
 
 {**
  *  \brief Log a message with SDL_LOG_PRIORITY_INFO
  *}
 procedure SDL_LogInfo(category: TSDL_LogCategory; const fmt: PAnsiChar; pars: array of const); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LogInfo' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LogInfo' {$ENDIF} {$ENDIF};
 
 {**
  *  \brief Log a message with SDL_LOG_PRIORITY_WARN
  *}
 procedure SDL_LogWarn(category: TSDL_LogCategory; const fmt: PAnsiChar; pars: array of const); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LogWarn' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LogWarn' {$ENDIF} {$ENDIF};
 
 {**
  *  \brief Log a message with SDL_LOG_PRIORITY_ERROR
  *}
 procedure SDL_LogError(category: TSDL_LogCategory; const fmt: PAnsiChar; pars: array of const); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LogError' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LogError' {$ENDIF} {$ENDIF};
 
 {**
  *  \brief Log a message with SDL_LOG_PRIORITY_CRITICAL
  *}
 procedure SDL_LogCritical(category: TSDL_LogCategory; const fmt: PAnsiChar; pars: array of const); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LogCritical' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LogCritical' {$ENDIF} {$ENDIF};
 
 {**
  *  \brief Log a message with the specified category and priority.
  *}
 procedure SDL_LogMessage(category: TSDL_LogCategory; priority: TSDL_LogPriority; const fmt: PAnsiChar; pars: array of const); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LogMessage' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LogMessage' {$ENDIF} {$ENDIF};
 
 {**
  *  \brief Log a message with the specified category and priority.
  *}
 procedure SDL_LogMessageV(category: TSDL_LogCategory; priority: TSDL_LogPriority; const fmt: PAnsiChar; ap: array of const); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LogMessageV' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LogMessageV' {$ENDIF} {$ENDIF};
 
 {**
  *  \brief The prototype for the log output function
@@ -161,13 +161,13 @@ type
  *  \brief Get the current log output function.
  *}
 procedure SDL_LogGetOutputFunction(callback: PSDL_LogOutputFunction; userdata: PPointer); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LogGetOutputFunction' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LogGetOutputFunction' {$ENDIF} {$ENDIF};
 
 {**
  *  \brief This function allows you to replace the default log output
  *         function with one of your own.
  *}
 procedure SDL_LogSetOutputFunction(callback: TSDL_LogOutputFunction; userdata: Pointer); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LogSetOutputFunction' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LogSetOutputFunction' {$ENDIF} {$ENDIF};
 
 {$ENDIF}

+ 2 - 2
SDL2-for-Pascal/units/sdlmessagebox.inc

@@ -105,7 +105,7 @@ type
  *   closes the messagebox.
  *}
 function SDL_ShowMessageBox(messageboxdata: PSDL_MessageBoxData; buttonid: pcint): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ShowMessageBox' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ShowMessageBox' {$ENDIF} {$ENDIF};
 
 {**
  *   Create a simple modal message box
@@ -120,5 +120,5 @@ function SDL_ShowMessageBox(messageboxdata: PSDL_MessageBoxData; buttonid: pcint
  *   SDL_ShowMessageBox
  *}
 function SDL_ShowSimpleMessageBox(flags: TSDL_MessageBoxFlags; title: PAnsiChar; _message: PAnsiChar; window: PSDL_Window): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ShowSimpleMessageBox' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ShowSimpleMessageBox' {$ENDIF} {$ENDIF};
 

+ 1 - 1
SDL2-for-Pascal/units/sdlmisc.inc

@@ -26,4 +26,4 @@
  * \return 0 on success, or -1 on error.
  *}
 function SDL_OpenURL(const url: PAnsiChar): cint; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_OpenURL' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_OpenURL' {$ENDIF} {$ENDIF};

+ 17 - 17
SDL2-for-Pascal/units/sdlmouse.inc

@@ -46,7 +46,7 @@ const
  * \since This function is available since SDL 2.0.0.
  *}
 function SDL_GetMouseFocus: PSDL_Window; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetMouseFocus' {$ENDIF}{$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetMouseFocus' {$ENDIF}{$ENDIF};
 
   {**
  * Retrieve the current state of the mouse.
@@ -70,7 +70,7 @@ function SDL_GetMouseFocus: PSDL_Window; cdecl;
  * \sa SDL_PumpEvents
  *}
 function SDL_GetMouseState(x: pcint; y: pcint): cuint32; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetMouseState' {$ENDIF}{$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetMouseState' {$ENDIF}{$ENDIF};
 
 
   {**
@@ -101,7 +101,7 @@ function SDL_GetMouseState(x: pcint; y: pcint): cuint32; cdecl;
  * \sa SDL_CaptureMouse
  *}
 function SDL_GetGlobalMouseState(x, y: pcint32): cuint32; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetGlobalMouseState' {$ENDIF}{$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetGlobalMouseState' {$ENDIF}{$ENDIF};
 
   {**
  * Retrieve the relative state of the mouse.
@@ -121,7 +121,7 @@ function SDL_GetGlobalMouseState(x, y: pcint32): cuint32; cdecl;
  * \sa SDL_GetMouseState
  *}
 function SDL_GetRelativeMouseState(x: pcint; y: pcint): cuint32; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetRelativeMouseState' {$ENDIF}{$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetRelativeMouseState' {$ENDIF}{$ENDIF};
 
   {**
  * Move the mouse cursor to the given position within the window.
@@ -143,7 +143,7 @@ function SDL_GetRelativeMouseState(x: pcint; y: pcint): cuint32; cdecl;
  * \sa SDL_WarpMouseGlobal
  *}
 procedure SDL_WarpMouseInWindow(window: PSDL_Window; x: cint; y: cint); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_WarpMouseInWindow' {$ENDIF}{$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_WarpMouseInWindow' {$ENDIF}{$ENDIF};
 
   {**
  * Move the mouse to the given position in global screen space.
@@ -166,7 +166,7 @@ procedure SDL_WarpMouseInWindow(window: PSDL_Window; x: cint; y: cint); cdecl;
  * \sa SDL_WarpMouseInWindow
  *}
 function SDL_WarpMouseGlobal(x, y: cint): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_WarpMouseGlobal' {$ENDIF}{$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_WarpMouseGlobal' {$ENDIF}{$ENDIF};
 
   {**
  * Set relative mouse mode.
@@ -192,7 +192,7 @@ function SDL_WarpMouseGlobal(x, y: cint): cint; cdecl;
  * \sa SDL_GetRelativeMouseMode
  *}
 function SDL_SetRelativeMouseMode(enabled: TSDL_Bool): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetRelativeMouseMode' {$ENDIF}{$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetRelativeMouseMode' {$ENDIF}{$ENDIF};
 
   {**
  * Capture the mouse and to track input outside an SDL window.
@@ -239,7 +239,7 @@ function SDL_SetRelativeMouseMode(enabled: TSDL_Bool): cint; cdecl;
  * \sa SDL_GetGlobalMouseState
  *}
  function SDL_CaptureMouse(enabled: TSDL_Bool): cint; cdecl;
-   external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CaptureMouse' {$ENDIF}{$ENDIF};
+   external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CaptureMouse' {$ENDIF}{$ENDIF};
 
   {**
  * Query whether relative mouse mode is enabled.
@@ -251,7 +251,7 @@ function SDL_SetRelativeMouseMode(enabled: TSDL_Bool): cint; cdecl;
  * \sa SDL_SetRelativeMouseMode
  *}
 function SDL_GetRelativeMouseMode: TSDL_Bool; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetRelativeMouseMode' {$ENDIF}{$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetRelativeMouseMode' {$ENDIF}{$ENDIF};
 
   {**
  * Create a cursor using the specified bitmap data and mask (in MSB format).
@@ -299,7 +299,7 @@ function SDL_CreateCursor(
   const mask: pcuint8;
   w: cint; h: cint;
   hot_x: cint; hot_y: cint): PSDL_Cursor; cdecl;
-    external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateCursor' {$ENDIF}{$ENDIF};
+    external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateCursor' {$ENDIF}{$ENDIF};
 
   {**
  * Create a color cursor.
@@ -319,7 +319,7 @@ function SDL_CreateColorCursor(
   surface: PSDL_Surface;
   hot_x: cint;
   hot_y: cint): PSDL_Cursor; cdecl;
-    external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateColorCursor' {$ENDIF}{$ENDIF};
+    external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateColorCursor' {$ENDIF}{$ENDIF};
 
   {**
  * Create a system cursor.
@@ -333,7 +333,7 @@ function SDL_CreateColorCursor(
  * \sa SDL_FreeCursor
  *}
 function SDL_CreateSystemCursor(id: TSDL_SystemCursor): PSDL_Cursor; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateSystemCursor' {$ENDIF}{$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateSystemCursor' {$ENDIF}{$ENDIF};
 
   {**
  * Set the active cursor.
@@ -352,7 +352,7 @@ function SDL_CreateSystemCursor(id: TSDL_SystemCursor): PSDL_Cursor; cdecl;
  * \sa SDL_ShowCursor
  *}
 procedure SDL_SetCursor(cursor: PSDL_Cursor); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetCursor' {$ENDIF}{$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetCursor' {$ENDIF}{$ENDIF};
 
   {**
  * Get the active cursor.
@@ -367,7 +367,7 @@ procedure SDL_SetCursor(cursor: PSDL_Cursor); cdecl;
  * \sa SDL_SetCursor
  *}
 function SDL_GetCursor: PSDL_Cursor; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetCursor' {$ENDIF}{$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetCursor' {$ENDIF}{$ENDIF};
   
   {**
  * Get the default cursor.
@@ -379,7 +379,7 @@ function SDL_GetCursor: PSDL_Cursor; cdecl;
  * \sa SDL_CreateSystemCursor
  *}
 function SDL_GetDefaultCursor: PSDL_Cursor; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetDefaultCursor' {$ENDIF}{$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetDefaultCursor' {$ENDIF}{$ENDIF};
 
   {**
  * Free a previously-created cursor.
@@ -396,7 +396,7 @@ function SDL_GetDefaultCursor: PSDL_Cursor; cdecl;
  * \sa SDL_CreateSystemCursor
  *}
 procedure SDL_FreeCursor(cursor: PSDL_Cursor); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_FreeCursor' {$ENDIF}{$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_FreeCursor' {$ENDIF}{$ENDIF};
 
   {**
  * Toggle whether or not the cursor is shown.
@@ -419,7 +419,7 @@ procedure SDL_FreeCursor(cursor: PSDL_Cursor); cdecl;
  * \sa SDL_SetCursor
  *}
 function SDL_ShowCursor(toggle: cint): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ShowCursor' {$ENDIF}{$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ShowCursor' {$ENDIF}{$ENDIF};
 
 {**
  *  Used as a mask when testing buttons in buttonstate.

+ 18 - 18
SDL2-for-Pascal/units/sdlmutex.inc

@@ -34,7 +34,7 @@ type
  * \since This function is available since SDL 2.0.0.
  *}
 function SDL_CreateMutex: PSDL_Mutex; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateMutex' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateMutex' {$ENDIF} {$ENDIF};
 
 {**
  * Lock the mutex.
@@ -53,7 +53,7 @@ function SDL_CreateMutex: PSDL_Mutex; cdecl;
  * \since This function is available since SDL 2.0.0.
  *}
 function SDL_LockMutex(mutex: PSDL_Mutex): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LockMutex' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LockMutex' {$ENDIF} {$ENDIF};
 
 { SDL2-for-Pascal: SDL_mutexP macro ignored; no benefit for the Pascal units }
 //C: #define SDL_mutexP(m)   SDL_UnlockMutex(m)
@@ -74,7 +74,7 @@ function SDL_LockMutex(mutex: PSDL_Mutex): cint; cdecl;
  * \since This function is available since SDL 2.0.0.
  *}
 function SDL_TryLockMutex(mutex: PSDL_Mutex): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_TryLockMutex' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_TryLockMutex' {$ENDIF} {$ENDIF};
 
 {**
  * Unlock the mutex.
@@ -94,7 +94,7 @@ function SDL_TryLockMutex(mutex: PSDL_Mutex): cint; cdecl;
  * \since This function is available since SDL 2.0.0.
  *}
 function SDL_UnlockMutex(mutex: PSDL_Mutex): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_UnlockMutex' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_UnlockMutex' {$ENDIF} {$ENDIF};
 
 { SDL2-for-Pascal: SDL_mutexV macro ignored; no benefit for the Pascal units }
 //C: #define SDL_mutexV(m)   SDL_UnlockMutex(m)
@@ -113,7 +113,7 @@ function SDL_UnlockMutex(mutex: PSDL_Mutex): cint; cdecl;
  * \since This function is available since SDL 2.0.0.
  *}
 procedure SDL_DestroyMutex(mutex: PSDL_Mutex); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_DestroyMutex' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_DestroyMutex' {$ENDIF} {$ENDIF};
 
   { -- Semaphore functions -- }
 type
@@ -137,7 +137,7 @@ type
  * \since This function is available since SDL 2.0.0.
  *}
 function SDL_CreateSemaphore(initial_value: cuint32): PSDL_sem; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateSemaphore' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateSemaphore' {$ENDIF} {$ENDIF};
 
 {**
  * Destroy a semaphore.
@@ -150,7 +150,7 @@ function SDL_CreateSemaphore(initial_value: cuint32): PSDL_sem; cdecl;
  * \since This function is available since SDL 2.0.0.
  *}
 procedure SDL_DestroySemaphore(sem: PSDL_Sem); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_DestroySemaphore' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_DestroySemaphore' {$ENDIF} {$ENDIF};
 
 {**
  * Wait until a semaphore has a positive value and then decrements it.
@@ -170,7 +170,7 @@ procedure SDL_DestroySemaphore(sem: PSDL_Sem); cdecl;
  * \since This function is available since SDL 2.0.0.
  *}
 function SDL_SemWait(sem: PSDL_Sem): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SemWait' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SemWait' {$ENDIF} {$ENDIF};
 
 {**
  * See if a semaphore has a positive value and decrement it if it does.
@@ -188,7 +188,7 @@ function SDL_SemWait(sem: PSDL_Sem): cint; cdecl;
  * \since This function is available since SDL 2.0.0.
  *}
 function SDL_SemTryWait(sem: PSDL_Sem): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SemTryWait' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SemTryWait' {$ENDIF} {$ENDIF};
 
 {**
  * Wait until a semaphore has a positive value and then decrements it.
@@ -207,7 +207,7 @@ function SDL_SemTryWait(sem: PSDL_Sem): cint; cdecl;
  * \since This function is available since SDL 2.0.0.
  *}
 function SDL_SemWaitTimeout(sem: PSDL_Sem; ms: cuint32): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SemWaitTimeout' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SemWaitTimeout' {$ENDIF} {$ENDIF};
 
 {**
  * Atomically increment a semaphore's value and wake waiting threads.
@@ -219,7 +219,7 @@ function SDL_SemWaitTimeout(sem: PSDL_Sem; ms: cuint32): cint; cdecl;
  * \since This function is available since SDL 2.0.0.
  *}
 function SDL_SemPost(sem: PSDL_Sem): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SemPost' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SemPost' {$ENDIF} {$ENDIF};
 
 {**
  * Get the current value of a semaphore.
@@ -230,7 +230,7 @@ function SDL_SemPost(sem: PSDL_Sem): cint; cdecl;
  * \since This function is available since SDL 2.0.0.
  *}
 function SDL_SemValue(sem: PSDL_Sem): cuint32; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SemValue' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SemValue' {$ENDIF} {$ENDIF};
 
   { -- Condition variable functions -- }
 type
@@ -277,7 +277,7 @@ type
  * \since This function is available since SDL 2.0.0.
  *}
 function SDL_CreateCond: PSDL_Cond; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateCond' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateCond' {$ENDIF} {$ENDIF};
 
 {**
  * Destroy a condition variable.
@@ -287,7 +287,7 @@ function SDL_CreateCond: PSDL_Cond; cdecl;
  * \since This function is available since SDL 2.0.0.
  *}
 procedure SDL_DestroyCond(cond: PSDL_Cond); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_DestroyCond' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_DestroyCond' {$ENDIF} {$ENDIF};
 
 {**
  * Restart one of the threads that are waiting on the condition variable.
@@ -299,7 +299,7 @@ procedure SDL_DestroyCond(cond: PSDL_Cond); cdecl;
  * \since This function is available since SDL 2.0.0.
  *}
 function SDL_CondSignal(cond: PSDL_Cond): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CondSignal' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CondSignal' {$ENDIF} {$ENDIF};
 
 {**
  * Restart all threads that are waiting on the condition variable.
@@ -311,7 +311,7 @@ function SDL_CondSignal(cond: PSDL_Cond): cint; cdecl;
  * \since This function is available since SDL 2.0.0.
  *}
 function SDL_CondBroadcast(cond: PSDL_Cond): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CondBroadcast' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CondBroadcast' {$ENDIF} {$ENDIF};
 
 {**
  * Wait until a condition variable is signaled.
@@ -334,7 +334,7 @@ function SDL_CondBroadcast(cond: PSDL_Cond): cint; cdecl;
  * \since This function is available since SDL 2.0.0.
  *}
 function SDL_CondWait(cond: PSDL_Cond; mutex: PSDL_Mutex): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CondWait' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CondWait' {$ENDIF} {$ENDIF};
 
 {**
  * Wait until a condition variable is signaled or a certain time has passed.
@@ -358,4 +358,4 @@ function SDL_CondWait(cond: PSDL_Cond; mutex: PSDL_Mutex): cint; cdecl;
  * \since This function is available since SDL 2.0.0.
  *}
 function SDL_CondWaitTimeout(cond: PSDL_Cond; mutex: PSDL_Mutex; ms: cuint32): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CondWaitTimeout' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CondWaitTimeout' {$ENDIF} {$ENDIF};

+ 14 - 14
SDL2-for-Pascal/units/sdlpixels.inc

@@ -537,7 +537,7 @@ type
  * \since This function is available since SDL 2.0.0.
  *}
 function SDL_GetPixelFormatName(format: cuint32): PAnsiChar; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetPixelFormatName' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetPixelFormatName' {$ENDIF} {$ENDIF};
 
 {**
  * Convert one of the enumerated pixel formats to a bpp value and RGBA masks.
@@ -557,7 +557,7 @@ function SDL_GetPixelFormatName(format: cuint32): PAnsiChar; cdecl;
  *}
 function SDL_PixelFormatEnumToMasks(format: cuint32; bpp: pcint;
   Rmask: pcuint32; Gmask: pcuint32; Bmask: pcuint32; Amask: pcuint32): TSDL_Bool; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_PixelFormatEnumToMasks' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_PixelFormatEnumToMasks' {$ENDIF} {$ENDIF};
 
 {**
  * Convert a bpp value and RGBA masks to an enumerated pixel format.
@@ -577,7 +577,7 @@ function SDL_PixelFormatEnumToMasks(format: cuint32; bpp: pcint;
  * \sa SDL_PixelFormatEnumToMasks
  *}
 function SDL_MasksToPixelFormatEnum(bpp: cint; Rmask: cuint32; Gmask: cuint32; Bmask: cuint32; Amask: cuint32): cuint32; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_MasksToPixelFormatEnum' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_MasksToPixelFormatEnum' {$ENDIF} {$ENDIF};
 
 {**
  * Create an SDL_PixelFormat structure corresponding to a pixel format.
@@ -595,7 +595,7 @@ function SDL_MasksToPixelFormatEnum(bpp: cint; Rmask: cuint32; Gmask: cuint32; B
  * \sa SDL_FreeFormat
  *}
 function SDL_AllocFormat(pixel_format: cuint32): PSDL_PixelFormat; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AllocFormat' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AllocFormat' {$ENDIF} {$ENDIF};
 
 {**
  * Free an SDL_PixelFormat structure allocated by SDL_AllocFormat().
@@ -607,7 +607,7 @@ function SDL_AllocFormat(pixel_format: cuint32): PSDL_PixelFormat; cdecl;
  * \sa SDL_AllocFormat
  *}
 procedure SDL_FreeFormat(format: PSDL_PixelFormat); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_FreeFormat' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_FreeFormat' {$ENDIF} {$ENDIF};
 
 {**
  * Create a palette structure with the specified number of color entries.
@@ -624,7 +624,7 @@ procedure SDL_FreeFormat(format: PSDL_PixelFormat); cdecl;
  * \sa SDL_FreePalette
  *}
 function SDL_AllocPalette(ncolors: cint): PSDL_Palette; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AllocPalette' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AllocPalette' {$ENDIF} {$ENDIF};
 
 {**
  * Set the palette for a pixel format structure.
@@ -640,7 +640,7 @@ function SDL_AllocPalette(ncolors: cint): PSDL_Palette; cdecl;
  * \sa SDL_FreePalette
  *}
 function SDL_SetPixelFormatPalette(format: PSDL_PixelFormat; palette: PSDL_Palette): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetPixelFormatPalette' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetPixelFormatPalette' {$ENDIF} {$ENDIF};
 
 {**
  * Set a range of colors in a palette.
@@ -658,7 +658,7 @@ function SDL_SetPixelFormatPalette(format: PSDL_PixelFormat; palette: PSDL_Palet
  * \sa SDL_CreateRGBSurface
  *}
 function SDL_SetPaletteColors(palette: PSDL_Palette; const colors: PSDL_Color; firstcolor: cint; ncolors: cint): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetPaletteColors' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetPaletteColors' {$ENDIF} {$ENDIF};
 
 {**
  * Free a palette created with SDL_AllocPalette().
@@ -670,7 +670,7 @@ function SDL_SetPaletteColors(palette: PSDL_Palette; const colors: PSDL_Color; f
  * \sa SDL_AllocPalette
  *}
 procedure SDL_FreePalette(palette: PSDL_Palette); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_FreePalette' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_FreePalette' {$ENDIF} {$ENDIF};
 
 {**
  * Map an RGB triple to an opaque pixel value for a given pixel format.
@@ -703,7 +703,7 @@ procedure SDL_FreePalette(palette: PSDL_Palette); cdecl;
  * \sa SDL_MapRGBA
  *}
 function SDL_MapRGB(const format: PSDL_PixelFormat; r: cuint8; g: cuint8; b: cuint8): cuint32; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_MapRGB' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_MapRGB' {$ENDIF} {$ENDIF};
 
 {**
  * Map an RGBA quadruple to a pixel value for a given pixel format.
@@ -738,7 +738,7 @@ function SDL_MapRGB(const format: PSDL_PixelFormat; r: cuint8; g: cuint8; b: cui
  * \sa SDL_MapRGB
  *}
 function SDL_MapRGBA(const format: PSDL_PixelFormat; r: cuint8; g: cuint8; b: cuint8; a: cuint8): cuint32; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_MapRGBA' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_MapRGBA' {$ENDIF} {$ENDIF};
 
 {**
  * Get RGB values from a pixel in the specified format.
@@ -762,7 +762,7 @@ function SDL_MapRGBA(const format: PSDL_PixelFormat; r: cuint8; g: cuint8; b: cu
  * \sa SDL_MapRGBA
  *}
 procedure SDL_GetRGB(pixel: cuint32; const format: PSDL_PixelFormat; r: pcuint8; g: pcuint8; b: pcuint8); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetRGB' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetRGB' {$ENDIF} {$ENDIF};
 
 {**
  * Get RGBA values from a pixel in the specified format.
@@ -790,7 +790,7 @@ procedure SDL_GetRGB(pixel: cuint32; const format: PSDL_PixelFormat; r: pcuint8;
  * \sa SDL_MapRGBA
  *}
 procedure SDL_GetRGBA(pixel: cuint32; const format: PSDL_PixelFormat; r: pcuint8; g: pcuint8; b: pcuint8; a: pcuint8); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetRGBA' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetRGBA' {$ENDIF} {$ENDIF};
 
 {/**
  * Calculate a 256 entry gamma ramp for a gamma value.
@@ -803,4 +803,4 @@ procedure SDL_GetRGBA(pixel: cuint32; const format: PSDL_PixelFormat; r: pcuint8
  * \sa SDL_SetWindowGammaRamp
  *}
 procedure SDL_CalculateGammaRamp(gamma: cfloat; ramp: pcuint16); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CalculateGammaRamp' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CalculateGammaRamp' {$ENDIF} {$ENDIF};

+ 1 - 1
SDL2-for-Pascal/units/sdlplatform.inc

@@ -10,4 +10,4 @@
  *  Gets the name of the platform.
  *}
 function SDL_GetPlatform: PAnsiChar; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetPlatform' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetPlatform' {$ENDIF} {$ENDIF};

+ 1 - 1
SDL2-for-Pascal/units/sdlpower.inc

@@ -32,4 +32,4 @@ type
    *  \return The state of the battery (if any).
    *}
 function SDL_GetPowerInfo(secs: pcint; pct: pcint): TSDL_PowerState; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetPowerInfo' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetPowerInfo' {$ENDIF} {$ENDIF};

+ 10 - 10
SDL2-for-Pascal/units/sdlrect.inc

@@ -81,7 +81,7 @@ function SDL_RectEquals(const a, b: PSDL_Rect): Boolean; inline;
  *  SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
  *}
 function SDL_HasIntersection(const a, b: PSDL_Rect): TSDL_Bool; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasIntersection' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasIntersection' {$ENDIF} {$ENDIF};
 
 {**
  *  Calculate the intersection of two rectangles.
@@ -89,13 +89,13 @@ function SDL_HasIntersection(const a, b: PSDL_Rect): TSDL_Bool; cdecl;
  *  SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
  *}
 function SDL_IntersectRect(const A, B: PSDL_Rect; result: PSDL_Rect): TSDL_Bool; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_IntersectRect' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_IntersectRect' {$ENDIF} {$ENDIF};
 
 {**
  *  Calculate the union of two rectangles.
  *}
 procedure SDL_UnionRect(const A, B: PSDL_Rect; result: PSDL_Rect); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_UnionRect' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_UnionRect' {$ENDIF} {$ENDIF};
 
 {**
  *  Calculate a minimal rectangle enclosing a set of points
@@ -103,7 +103,7 @@ procedure SDL_UnionRect(const A, B: PSDL_Rect; result: PSDL_Rect); cdecl;
  *  SDL_TRUE if any points were within the clipping rect
  *}
 function SDL_EnclosePoints(const points: PSDL_Point; count: cint; const clip: PSDL_Rect; result: PSDL_Rect): TSDL_Bool; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_EnclosePoints' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_EnclosePoints' {$ENDIF} {$ENDIF};
 
 {**
  *  Calculate the intersection of a rectangle and line segment.
@@ -111,7 +111,7 @@ function SDL_EnclosePoints(const points: PSDL_Point; count: cint; const clip: PS
  *  SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
  *}
 function SDL_IntersectRectAndLine(const rect: PSDL_Rect; X1, Y1, X2, Y2: pcint): TSDL_Bool; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_IntersectRectAndLine' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_IntersectRectAndLine' {$ENDIF} {$ENDIF};
 
 {**
  *  Returns true if point resides inside a rectangle.
@@ -151,7 +151,7 @@ function SDL_FRectEquals(const a, b: PSDL_FRect): Boolean; Inline;
  * \sa SDL_IntersectRect
  *}
 function SDL_HasIntersectionF(const a, b: PSDL_FRect): TSDL_Bool; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasIntersectionF' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasIntersectionF' {$ENDIF} {$ENDIF};
 
 {**
  * Calculate the intersection of two rectangles with float precision.
@@ -169,7 +169,7 @@ function SDL_HasIntersectionF(const a, b: PSDL_FRect): TSDL_Bool; cdecl;
  * \sa SDL_HasIntersectionF
  *}
 function SDL_IntersectFRect(const a, b: PSDL_FRect; result: PSDL_FRect): TSDL_Bool; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_IntersectFRect' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_IntersectFRect' {$ENDIF} {$ENDIF};
 
 {**
  * Calculate the union of two rectangles with float precision.
@@ -182,7 +182,7 @@ function SDL_IntersectFRect(const a, b: PSDL_FRect; result: PSDL_FRect): TSDL_Bo
  * \since This function is available since SDL 2.0.22.
  *}
 function SDL_UnionFRect(const a, b: PSDL_FRect; result: PSDL_FRect): TSDL_Bool; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_UnionFRect' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_UnionFRect' {$ENDIF} {$ENDIF};
 
 {**
  * Calculate a minimal rectangle enclosing a set of points with float
@@ -203,7 +203,7 @@ function SDL_UnionFRect(const a, b: PSDL_FRect; result: PSDL_FRect): TSDL_Bool;
  * \since This function is available since SDL 2.0.22.
  *}
 function SDL_EncloseFPoints(const points: PSDL_FPoint; count: cint; const clip: PSDL_FRect; result: PSDL_FRect): TSDL_Bool; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_EncloseFPoints' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_EncloseFPoints' {$ENDIF} {$ENDIF};
 
 {**
  * Calculate the intersection of a rectangle and line segment with float
@@ -225,4 +225,4 @@ function SDL_EncloseFPoints(const points: PSDL_FPoint; count: cint; const clip:
  * \since This function is available since SDL 2.0.22.
  *}
 function SDL_IntersectFRectAndLine(const rect: PSDL_FRect; X1, Y1, X2, Y2: pcfloat): TSDL_Bool; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_IntersectFRectAndLine' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_IntersectFRectAndLine' {$ENDIF} {$ENDIF};

+ 81 - 81
SDL2-for-Pascal/units/sdlrenderer.inc

@@ -116,7 +116,7 @@ type
    *   SDL_GetRenderDriverInfo()
    *   SDL_CreateRenderer()
    *}
-function SDL_GetNumRenderDrivers: cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetNumRenderDrivers' {$ENDIF} {$ENDIF};
+function SDL_GetNumRenderDrivers: cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetNumRenderDrivers' {$ENDIF} {$ENDIF};
 
   {**
    *  Get information about a specific 2D rendering driver for the current
@@ -130,7 +130,7 @@ function SDL_GetNumRenderDrivers: cint32 cdecl; external SDL_LibName {$IFDEF DEL
    *
    *   SDL_CreateRenderer()
    *}
-function SDL_GetRenderDriverInfo(index: cint32; info: PSDL_RendererInfo): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetRenderDriverInfo' {$ENDIF} {$ENDIF};
+function SDL_GetRenderDriverInfo(index: cint32; info: PSDL_RendererInfo): cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetRenderDriverInfo' {$ENDIF} {$ENDIF};
 
   {**
    *  Create a window and default renderer
@@ -143,7 +143,7 @@ function SDL_GetRenderDriverInfo(index: cint32; info: PSDL_RendererInfo): cint32
    *
    *   0 on success, or -1 on error
    *}
-function SDL_CreateWindowAndRenderer(width: cint32; height: cint32; window_flags: cuint32; window: PPSDL_Window; renderer: PPSDL_Renderer): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateWindowAndRenderer' {$ENDIF} {$ENDIF};
+function SDL_CreateWindowAndRenderer(width: cint32; height: cint32; window_flags: cuint32; window: PPSDL_Window; renderer: PPSDL_Renderer): cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateWindowAndRenderer' {$ENDIF} {$ENDIF};
 
   {**
    *  Create a 2D rendering context for a window.
@@ -159,7 +159,7 @@ function SDL_CreateWindowAndRenderer(width: cint32; height: cint32; window_flags
    *   SDL_GetRendererInfo()
    *   SDL_DestroyRenderer()
    *}
-function SDL_CreateRenderer(window: PSDL_Window; index: cint32; flags: cuint32): PSDL_Renderer cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateRenderer' {$ENDIF} {$ENDIF};
+function SDL_CreateRenderer(window: PSDL_Window; index: cint32; flags: cuint32): PSDL_Renderer cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateRenderer' {$ENDIF} {$ENDIF};
 
   {**
    *  Create a 2D software rendering context for a surface.
@@ -171,28 +171,28 @@ function SDL_CreateRenderer(window: PSDL_Window; index: cint32; flags: cuint32):
    *   SDL_CreateRenderer()
    *   SDL_DestroyRenderer()
    *}
-function SDL_CreateSoftwareRenderer(surface: PSDL_Surface): PSDL_Renderer cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateSoftwareRenderer' {$ENDIF} {$ENDIF};
+function SDL_CreateSoftwareRenderer(surface: PSDL_Surface): PSDL_Renderer cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateSoftwareRenderer' {$ENDIF} {$ENDIF};
 
   {**
    *  Get the renderer associated with a window.
    *}
-function SDL_GetRenderer(window: PSDL_Window): PSDL_Renderer cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetRenderer' {$ENDIF} {$ENDIF};
+function SDL_GetRenderer(window: PSDL_Window): PSDL_Renderer cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetRenderer' {$ENDIF} {$ENDIF};
 
 {**
  * Get the window associated with a renderer.
  *}
 function SDL_RenderGetWindow(renderer: PSDL_Renderer): PSDL_Window; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderGetWindow' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderGetWindow' {$ENDIF} {$ENDIF};
 
   {**
    *  Get information about a rendering context.
    *}
-function SDL_GetRendererInfo(renderer: PSDL_Renderer; info: PSDL_RendererInfo): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetRendererInfo' {$ENDIF} {$ENDIF};
+function SDL_GetRendererInfo(renderer: PSDL_Renderer; info: PSDL_RendererInfo): cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetRendererInfo' {$ENDIF} {$ENDIF};
 
   {**
    *  Get the output size of a rendering context.
    *}
-function SDL_GetRendererOutputSize(renderer: PSDL_Renderer; w: pcint; h: pcint): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetRendererOutputSize' {$ENDIF} {$ENDIF};
+function SDL_GetRendererOutputSize(renderer: PSDL_Renderer; w: pcint; h: pcint): cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetRendererOutputSize' {$ENDIF} {$ENDIF};
 
   {**
    *  Create a texture for a rendering context.
@@ -211,7 +211,7 @@ function SDL_GetRendererOutputSize(renderer: PSDL_Renderer; w: pcint; h: pcint):
    *  SDL_UpdateTexture()
    *  SDL_DestroyTexture()
    *}
-function SDL_CreateTexture(renderer: PSDL_Renderer; format: cuint32; access: cint32; w: cint32; h: cint32): PSDL_Texture cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateTexture' {$ENDIF} {$ENDIF};
+function SDL_CreateTexture(renderer: PSDL_Renderer; format: cuint32; access: cint32; w: cint32; h: cint32): PSDL_Texture cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateTexture' {$ENDIF} {$ENDIF};
 
   {**
    *  Create a texture from an existing surface.
@@ -226,7 +226,7 @@ function SDL_CreateTexture(renderer: PSDL_Renderer; format: cuint32; access: cin
    *   SDL_QueryTexture()
    *   SDL_DestroyTexture()
    *}
-function SDL_CreateTextureFromSurface(renderer: PSDL_Renderer; surface: PSDL_Surface): PSDL_Texture cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateTextureFromSurface' {$ENDIF} {$ENDIF};
+function SDL_CreateTextureFromSurface(renderer: PSDL_Renderer; surface: PSDL_Surface): PSDL_Texture cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateTextureFromSurface' {$ENDIF} {$ENDIF};
 
   {**
    *  Query the attributes of a texture
@@ -241,7 +241,7 @@ function SDL_CreateTextureFromSurface(renderer: PSDL_Renderer; surface: PSDL_Sur
    *
    *   0 on success, or -1 if the texture is not valid.
    *}
-function SDL_QueryTexture(texture: PSDL_Texture; format: pcuint32; access: pcint; w: pcint; h: pcint): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_QueryTexture' {$ENDIF} {$ENDIF};
+function SDL_QueryTexture(texture: PSDL_Texture; format: pcuint32; access: pcint; w: pcint; h: pcint): cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_QueryTexture' {$ENDIF} {$ENDIF};
 
   {**
    *  Set an additional color value used in render copy operations.
@@ -256,7 +256,7 @@ function SDL_QueryTexture(texture: PSDL_Texture; format: pcuint32; access: pcint
    *
    *   SDL_GetTextureColorMod()
    *}
-function SDL_SetTextureColorMod(texture: PSDL_Texture; r: cuint8; g: cuint8; b: cuint8): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetTextureColorMod' {$ENDIF} {$ENDIF};
+function SDL_SetTextureColorMod(texture: PSDL_Texture; r: cuint8; g: cuint8; b: cuint8): cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetTextureColorMod' {$ENDIF} {$ENDIF};
 
   {**
    *  Get the additional color value used in render copy operations.
@@ -270,7 +270,7 @@ function SDL_SetTextureColorMod(texture: PSDL_Texture; r: cuint8; g: cuint8; b:
    *
    *   SDL_SetTextureColorMod()
    *}
-function SDL_GetTextureColorMod(texture: PSDL_Texture; r: pcuint8; g: pcuint8; b: pcuint8): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetTextureColorMod' {$ENDIF} {$ENDIF};
+function SDL_GetTextureColorMod(texture: PSDL_Texture; r: pcuint8; g: pcuint8; b: pcuint8): cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetTextureColorMod' {$ENDIF} {$ENDIF};
 
   {**
    *  Set an additional alpha value used in render copy operations.
@@ -283,7 +283,7 @@ function SDL_GetTextureColorMod(texture: PSDL_Texture; r: pcuint8; g: pcuint8; b
    *
    *   SDL_GetTextureAlphaMod()
    *}
-function SDL_SetTextureAlphaMod(texture: PSDL_Texture; alpha: cuint8): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetTextureAlphaMod' {$ENDIF} {$ENDIF};
+function SDL_SetTextureAlphaMod(texture: PSDL_Texture; alpha: cuint8): cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetTextureAlphaMod' {$ENDIF} {$ENDIF};
 
   {**
    *  Get the additional alpha value used in render copy operations.
@@ -295,7 +295,7 @@ function SDL_SetTextureAlphaMod(texture: PSDL_Texture; alpha: cuint8): cint32 cd
    *
    *   SDL_SetTextureAlphaMod()
    *}
-function SDL_GetTextureAlphaMod(texture: PSDL_Texture; alpha: pcuint8): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetTextureAlphaMod' {$ENDIF} {$ENDIF};
+function SDL_GetTextureAlphaMod(texture: PSDL_Texture; alpha: pcuint8): cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetTextureAlphaMod' {$ENDIF} {$ENDIF};
 
   {**
    *   Set the blend mode used for texture copy operations.
@@ -311,7 +311,7 @@ function SDL_GetTextureAlphaMod(texture: PSDL_Texture; alpha: pcuint8): cint32 c
    *
    *   SDL_GetTextureBlendMode()
    *}
-function SDL_SetTextureBlendMode(texture: PSDL_Texture; blendMode: TSDL_BlendMode): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetTextureBlendMode' {$ENDIF} {$ENDIF};
+function SDL_SetTextureBlendMode(texture: PSDL_Texture; blendMode: TSDL_BlendMode): cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetTextureBlendMode' {$ENDIF} {$ENDIF};
 
   {**
    *  Get the blend mode used for texture copy operations.
@@ -323,32 +323,32 @@ function SDL_SetTextureBlendMode(texture: PSDL_Texture; blendMode: TSDL_BlendMod
    *
    *   SDL_SetTextureBlendMode()
    *}
-function SDL_GetTextureBlendMode(texture: PSDL_Texture; blendMode: PSDL_BlendMode): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetTextureBlendMode' {$ENDIF} {$ENDIF};
+function SDL_GetTextureBlendMode(texture: PSDL_Texture; blendMode: PSDL_BlendMode): cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetTextureBlendMode' {$ENDIF} {$ENDIF};
 
 {**
  * Set the scale mode used for texture scale operations.
  * If the scale mode is not supported, the closest supported mode is chosen.
  *}
 function SDL_SetTextureScaleMode(texture: PSDL_Texture; scaleMode: TSDL_ScaleMode): cint; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetTextureScaleMode' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetTextureScaleMode' {$ENDIF} {$ENDIF};
 
 {**
  * Get the scale mode used for texture scale operations.
  *}
 function SDL_GetTextureScaleMode(texture: PSDL_Texture; scaleMode: PSDL_ScaleMode): cint; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetTextureScaleMode' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetTextureScaleMode' {$ENDIF} {$ENDIF};
 
 {**
  * Associate a user-specified pointer with a texture.
  *}
 function SDL_SetTextureUserData(texture: PSDL_Texture; userdata: Pointer): cint; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetTextureUserData' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetTextureUserData' {$ENDIF} {$ENDIF};
 
 {**
  * Get the user-specified pointer associated with a texture.
  *}
 function SDL_GetTextureUserData(texture: PSDL_Texture): Pointer; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetTextureUserData' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetTextureUserData' {$ENDIF} {$ENDIF};
 
   {**
    *  Update the given texture rectangle with new pixel data.
@@ -363,7 +363,7 @@ function SDL_GetTextureUserData(texture: PSDL_Texture): Pointer; cdecl;
    *
    *   This is a fairly slow function.
    *}
-function SDL_UpdateTexture(texture: PSDL_Texture; rect: PSDL_Rect; pixels: Pointer; pitch: cint32): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_UpdateTexture' {$ENDIF} {$ENDIF};
+function SDL_UpdateTexture(texture: PSDL_Texture; rect: PSDL_Rect; pixels: Pointer; pitch: cint32): cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_UpdateTexture' {$ENDIF} {$ENDIF};
 
   {**
    *  Lock a portion of the texture for write-only pixel access.
@@ -381,7 +381,7 @@ function SDL_UpdateTexture(texture: PSDL_Texture; rect: PSDL_Rect; pixels: Point
    *   SDL_UnlockTexture()
    *}
 function SDL_LockTexture(texture: PSDL_Texture; const rect: PSDL_Rect; pixels: PPointer; pitch: pcint): cint; cdecl;
-     external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LockTexture' {$ENDIF} {$ENDIF};
+     external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LockTexture' {$ENDIF} {$ENDIF};
 
 {**
  *  \brief Lock a portion of the texture for write-only pixel access.
@@ -399,14 +399,14 @@ function SDL_LockTexture(texture: PSDL_Texture; const rect: PSDL_Rect; pixels: P
  *  \sa SDL_UnlockTexture()
  *}
 function SDL_LockTextureToSurface(texture: PSDL_Texture; const rect: PSDL_Rect; surface: PPSDL_Surface): cint; cdecl;
-     external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LockTextureToSurface' {$ENDIF} {$ENDIF};
+     external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LockTextureToSurface' {$ENDIF} {$ENDIF};
 
   {**
    *  Unlock a texture, uploading the changes to video memory, if needed.
    *
    *   SDL_LockTexture()
    *}
-procedure SDL_UnlockTexture(texture: PSDL_Texture) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LockTexture' {$ENDIF} {$ENDIF};
+procedure SDL_UnlockTexture(texture: PSDL_Texture) cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LockTexture' {$ENDIF} {$ENDIF};
 
   {**
    *  Determines whether a window supports the use of render targets
@@ -415,7 +415,7 @@ procedure SDL_UnlockTexture(texture: PSDL_Texture) cdecl; external SDL_LibName {
    *
    *  SDL_TRUE if supported, SDL_FALSE if not.
    *}
-function SDL_RenderTargetSupported(renderer: PSDL_Renderer): Boolean cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderTargetSupported' {$ENDIF} {$ENDIF};
+function SDL_RenderTargetSupported(renderer: PSDL_Renderer): Boolean cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderTargetSupported' {$ENDIF} {$ENDIF};
 
   {**
    *  Set a texture as the current rendering target.
@@ -427,7 +427,7 @@ function SDL_RenderTargetSupported(renderer: PSDL_Renderer): Boolean cdecl; exte
    *
    *   SDL_GetRenderTarget()
    *}
-function SDL_SetRenderTarget(renderer: PSDL_Renderer; texture: PSDL_Texture): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetRenderTarget' {$ENDIF} {$ENDIF};
+function SDL_SetRenderTarget(renderer: PSDL_Renderer; texture: PSDL_Texture): cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetRenderTarget' {$ENDIF} {$ENDIF};
 
   {**
    *  Get the current render target or NULL for the default render target.
@@ -436,7 +436,7 @@ function SDL_SetRenderTarget(renderer: PSDL_Renderer; texture: PSDL_Texture): ci
    *
    *   SDL_SetRenderTarget()
    *}
-function SDL_GetRenderTarget(renderer: PSDL_Renderer): PSDL_Texture cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetRenderTarget' {$ENDIF} {$ENDIF};
+function SDL_GetRenderTarget(renderer: PSDL_Renderer): PSDL_Texture cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetRenderTarget' {$ENDIF} {$ENDIF};
 
   {**
    *  Set device independent resolution for rendering
@@ -461,7 +461,7 @@ function SDL_GetRenderTarget(renderer: PSDL_Renderer): PSDL_Texture cdecl; exter
    *   SDL_RenderSetScale()
    *   SDL_RenderSetViewport()
    *}
-function SDL_RenderSetLogicalSize(renderer: PSDL_Renderer; w: cint32; h: cint32): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderSetLogicalSize' {$ENDIF} {$ENDIF};
+function SDL_RenderSetLogicalSize(renderer: PSDL_Renderer; w: cint32; h: cint32): cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderSetLogicalSize' {$ENDIF} {$ENDIF};
 
   {**
    *  Get device independent resolution for rendering
@@ -472,7 +472,7 @@ function SDL_RenderSetLogicalSize(renderer: PSDL_Renderer; w: cint32; h: cint32)
    *
    *   SDL_RenderSetLogicalSize()
    *}
-procedure SDL_RenderGetLogicalSize(renderer: PSDL_Renderer; w: pcint; h: pcint) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderGetLogicalSize' {$ENDIF} {$ENDIF};
+procedure SDL_RenderGetLogicalSize(renderer: PSDL_Renderer; w: pcint; h: pcint) cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderGetLogicalSize' {$ENDIF} {$ENDIF};
 
 {**
  *  \brief Set whether to force integer scales for resolution-independent rendering
@@ -486,7 +486,7 @@ procedure SDL_RenderGetLogicalSize(renderer: PSDL_Renderer; w: pcint; h: pcint)
  *
  *  \sa SDL_RenderSetLogicalSize()
  *}
-function SDL_RenderSetIntegerScale(renderer: PSDL_Renderer; enable : TSDL_bool): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderSetIntegerScale' {$ENDIF} {$ENDIF};
+function SDL_RenderSetIntegerScale(renderer: PSDL_Renderer; enable : TSDL_bool): cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderSetIntegerScale' {$ENDIF} {$ENDIF};
 
 {**
  *  \brief Get whether integer scales are forced for resolution-independent rendering
@@ -495,7 +495,7 @@ function SDL_RenderSetIntegerScale(renderer: PSDL_Renderer; enable : TSDL_bool):
  *
  *  \sa SDL_RenderSetIntegerScale()
  *}
-function SDL_RenderGetIntegerScale(renderer: PSDL_Renderer): TSDL_bool cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderGetIntegerScale' {$ENDIF} {$ENDIF};
+function SDL_RenderGetIntegerScale(renderer: PSDL_Renderer): TSDL_bool cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderGetIntegerScale' {$ENDIF} {$ENDIF};
 
   {**
    *  Set the drawing area for rendering on the current target.
@@ -512,14 +512,14 @@ function SDL_RenderGetIntegerScale(renderer: PSDL_Renderer): TSDL_bool cdecl; ex
    *   SDL_RenderGetViewport()
    *   SDL_RenderSetLogicalSize()
    *}
-function SDL_RenderSetViewport(renderer: PSDL_Renderer; const rect: PSDL_Rect): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderSetViewport' {$ENDIF} {$ENDIF};
+function SDL_RenderSetViewport(renderer: PSDL_Renderer; const rect: PSDL_Rect): cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderSetViewport' {$ENDIF} {$ENDIF};
 
   {**
    *  Get the drawing area for the current target.
    *
    *   SDL_RenderSetViewport()
    *}
-procedure SDL_RenderGetViewport(renderer: PSDL_Renderer; rect: PSDL_Rect) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderGetViewport' {$ENDIF} {$ENDIF};
+procedure SDL_RenderGetViewport(renderer: PSDL_Renderer; rect: PSDL_Rect) cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderGetViewport' {$ENDIF} {$ENDIF};
 
   {**
    *  Set the clip rectangle for the current target.
@@ -532,7 +532,7 @@ procedure SDL_RenderGetViewport(renderer: PSDL_Renderer; rect: PSDL_Rect) cdecl;
    *
    *   SDL_RenderGetClipRect()
    *}
-function SDL_RenderSetClipRect(renderer: PSDL_Renderer; rect: PSDL_Rect): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderSetClipRect' {$ENDIF} {$ENDIF};
+function SDL_RenderSetClipRect(renderer: PSDL_Renderer; rect: PSDL_Rect): cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderSetClipRect' {$ENDIF} {$ENDIF};
 
   {**
    *  Get the clip rectangle for the current target.
@@ -543,7 +543,7 @@ function SDL_RenderSetClipRect(renderer: PSDL_Renderer; rect: PSDL_Rect): cint32
    *
    *   SDL_RenderSetClipRect()
    *}
-procedure SDL_RenderGetClipRect(renderer: PSDL_Renderer; rect: PSDL_Rect) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderGetClipRect' {$ENDIF} {$ENDIF};
+procedure SDL_RenderGetClipRect(renderer: PSDL_Renderer; rect: PSDL_Rect) cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderGetClipRect' {$ENDIF} {$ENDIF};
 
   {**
    *  \brief Get whether clipping is enabled on the given renderer.
@@ -553,7 +553,7 @@ procedure SDL_RenderGetClipRect(renderer: PSDL_Renderer; rect: PSDL_Rect) cdecl;
    *  \sa SDL_RenderGetClipRect()
    *}
 function SDL_RenderIsClipEnabled(renderer: PSDL_Renderer): TSDL_Bool; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderIsClipEnabled' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderIsClipEnabled' {$ENDIF} {$ENDIF};
 
   {**
    *  Set the drawing scale for rendering on the current target.
@@ -573,7 +573,7 @@ function SDL_RenderIsClipEnabled(renderer: PSDL_Renderer): TSDL_Bool; cdecl;
    *   SDL_RenderGetScale()
    *   SDL_RenderSetLogicalSize()
    *}
-function SDL_RenderSetScale(renderer: PSDL_Renderer; scaleX: cfloat; scaleY: cfloat): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderSetScale' {$ENDIF} {$ENDIF};
+function SDL_RenderSetScale(renderer: PSDL_Renderer; scaleX: cfloat; scaleY: cfloat): cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderSetScale' {$ENDIF} {$ENDIF};
 
   {**
    *  Get the drawing scale for the current target.
@@ -584,7 +584,7 @@ function SDL_RenderSetScale(renderer: PSDL_Renderer; scaleX: cfloat; scaleY: cfl
    *
    *   SDL_RenderSetScale()
    *}
-procedure SDL_RenderGetScale(renderer: PSDL_Renderer; scaleX: pcfloat; scaleY: pcfloat) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderGetScale' {$ENDIF} {$ENDIF};
+procedure SDL_RenderGetScale(renderer: PSDL_Renderer; scaleX: pcfloat; scaleY: pcfloat) cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderGetScale' {$ENDIF} {$ENDIF};
 
 {**
  * Get logical coordinates of point in renderer when given real coordinates of
@@ -592,7 +592,7 @@ procedure SDL_RenderGetScale(renderer: PSDL_Renderer; scaleX: pcfloat; scaleY: p
  * render is scaled and logical renderer size set.
  *}
 procedure SDL_RenderWindowToLogical(renderer: PSDL_Renderer; windowX, windowY: cint; logicalX, logicalY: PSingle); cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderWindowToLogical' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderWindowToLogical' {$ENDIF} {$ENDIF};
 
 {**
  * Get real coordinates of point in window when given logical coordinates of
@@ -600,7 +600,7 @@ procedure SDL_RenderWindowToLogical(renderer: PSDL_Renderer; windowX, windowY: c
  * when render is scaled and logical renderer size set.
  *}
 procedure SDL_RenderLogicalToWindow(renderer: PSDL_Renderer; logicalX, logicalY: Single; windowX, windowY: Pcint); cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderLogicalToWindow' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderLogicalToWindow' {$ENDIF} {$ENDIF};
 
   {**
    *  Set the color used for drawing operations (Rect, Line and Clear).
@@ -614,7 +614,7 @@ procedure SDL_RenderLogicalToWindow(renderer: PSDL_Renderer; logicalX, logicalY:
    *
    *   0 on success, or -1 on error
    *}
-function SDL_SetRenderDrawColor(renderer: PSDL_Renderer; r: cuint8; g: cuint8; b: cuint8; a: cuint8): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetRenderDrawColor' {$ENDIF} {$ENDIF};
+function SDL_SetRenderDrawColor(renderer: PSDL_Renderer; r: cuint8; g: cuint8; b: cuint8; a: cuint8): cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetRenderDrawColor' {$ENDIF} {$ENDIF};
 
   {**
    *  Get the color used for drawing operations (Rect, Line and Clear).
@@ -628,7 +628,7 @@ function SDL_SetRenderDrawColor(renderer: PSDL_Renderer; r: cuint8; g: cuint8; b
    *
    *   0 on success, or -1 on error
    *}
-function SDL_GetRenderDrawColor(renderer: PSDL_Renderer; r: pcuint8; g: pcuint8; b: pcuint8; a: pcuint8): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetRenderDrawColor' {$ENDIF} {$ENDIF};
+function SDL_GetRenderDrawColor(renderer: PSDL_Renderer; r: pcuint8; g: pcuint8; b: pcuint8; a: pcuint8): cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetRenderDrawColor' {$ENDIF} {$ENDIF};
 
   {**
    *  Set the blend mode used for drawing operations (Fill and Line).
@@ -643,7 +643,7 @@ function SDL_GetRenderDrawColor(renderer: PSDL_Renderer; r: pcuint8; g: pcuint8;
    *
    *   SDL_GetRenderDrawBlendMode()
    *}
-function SDL_SetRenderDrawBlendMode(renderer: PSDL_Renderer; blendMode: TSDL_BlendMode): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetRenderDrawBlendMode' {$ENDIF} {$ENDIF};
+function SDL_SetRenderDrawBlendMode(renderer: PSDL_Renderer; blendMode: TSDL_BlendMode): cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetRenderDrawBlendMode' {$ENDIF} {$ENDIF};
 
   {**
    *  Get the blend mode used for drawing operations.
@@ -655,7 +655,7 @@ function SDL_SetRenderDrawBlendMode(renderer: PSDL_Renderer; blendMode: TSDL_Ble
    *
    *   SDL_SetRenderDrawBlendMode()
    *}
-function SDL_GetRenderDrawBlendMode(renderer: PSDL_Renderer; blendMode: PSDL_BlendMode): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetRenderDrawBlendMode' {$ENDIF} {$ENDIF};
+function SDL_GetRenderDrawBlendMode(renderer: PSDL_Renderer; blendMode: PSDL_BlendMode): cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetRenderDrawBlendMode' {$ENDIF} {$ENDIF};
 
   {**
    *  Clear the current rendering target with the drawing color
@@ -664,7 +664,7 @@ function SDL_GetRenderDrawBlendMode(renderer: PSDL_Renderer; blendMode: PSDL_Ble
    *
    *   0 on success, or -1 on error
    *}
-function SDL_RenderClear(renderer: PSDL_Renderer): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderClear' {$ENDIF} {$ENDIF};
+function SDL_RenderClear(renderer: PSDL_Renderer): cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderClear' {$ENDIF} {$ENDIF};
 
   {**
    *  Draw a point on the current rendering target.
@@ -675,7 +675,7 @@ function SDL_RenderClear(renderer: PSDL_Renderer): cint32 cdecl; external SDL_Li
    *
    *   0 on success, or -1 on error
    *}
-function SDL_RenderDrawPoint(renderer: PSDL_Renderer; x: cint32; y: cint32): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderDrawPoint' {$ENDIF} {$ENDIF};
+function SDL_RenderDrawPoint(renderer: PSDL_Renderer; x: cint32; y: cint32): cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderDrawPoint' {$ENDIF} {$ENDIF};
 
   {**
    *  Draw a point on the current rendering target.
@@ -687,7 +687,7 @@ function SDL_RenderDrawPoint(renderer: PSDL_Renderer; x: cint32; y: cint32): cin
    *    0 on success, or -1 on error
    *}
 function SDL_RenderDrawPointF(renderer: PSDL_Renderer; x, y: single): cint32 cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderDrawPointF' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderDrawPointF' {$ENDIF} {$ENDIF};
 
   {**
    *  Draw multiple points on the current rendering target.
@@ -698,7 +698,7 @@ function SDL_RenderDrawPointF(renderer: PSDL_Renderer; x, y: single): cint32 cde
    *
    *   0 on success, or -1 on error
    *}
-function SDL_RenderDrawPoints(renderer: PSDL_Renderer; points: PSDL_Point; count: cint32): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderDrawPoints' {$ENDIF} {$ENDIF};
+function SDL_RenderDrawPoints(renderer: PSDL_Renderer; points: PSDL_Point; count: cint32): cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderDrawPoints' {$ENDIF} {$ENDIF};
 
   {**
    *  Draw multiple points on the current rendering target.
@@ -710,7 +710,7 @@ function SDL_RenderDrawPoints(renderer: PSDL_Renderer; points: PSDL_Point; count
    *    0 on success, or -1 on error
    *}
 function SDL_RenderDrawPointsF(renderer: PSDL_Renderer; points: PSDL_FPoint; count: cint32): cint32 cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderDrawPointsF' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderDrawPointsF' {$ENDIF} {$ENDIF};
 
   {**
    *  Draw a line on the current rendering target.
@@ -723,7 +723,7 @@ function SDL_RenderDrawPointsF(renderer: PSDL_Renderer; points: PSDL_FPoint; cou
    *
    *   0 on success, or -1 on error
    *}
-function SDL_RenderDrawLine(renderer: PSDL_Renderer; x1: cint32; y1: cint32; x2: cint32; y2: cint32): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderDrawLine' {$ENDIF} {$ENDIF};
+function SDL_RenderDrawLine(renderer: PSDL_Renderer; x1: cint32; y1: cint32; x2: cint32; y2: cint32): cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderDrawLine' {$ENDIF} {$ENDIF};
 
   {**
    *  Draw a line on the current rendering target.
@@ -737,7 +737,7 @@ function SDL_RenderDrawLine(renderer: PSDL_Renderer; x1: cint32; y1: cint32; x2:
    *  0 on success, or -1 on error
    *}
 function SDL_RenderDrawLineF(renderer: PSDL_Renderer; x1, y1, x2, y2: single): cint32 cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderDrawLineF' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderDrawLineF' {$ENDIF} {$ENDIF};
 
   {**
    *  \brief Draw a series of connected lines on the current rendering target.
@@ -748,7 +748,7 @@ function SDL_RenderDrawLineF(renderer: PSDL_Renderer; x1, y1, x2, y2: single): c
    *
    *  \return 0 on success, or -1 on error
    *}
-function SDL_RenderDrawLines(renderer: PSDL_Renderer; points: PSDL_Point; count: cint32): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderDrawLines' {$ENDIF} {$ENDIF};
+function SDL_RenderDrawLines(renderer: PSDL_Renderer; points: PSDL_Point; count: cint32): cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderDrawLines' {$ENDIF} {$ENDIF};
 
   {**
    *  Draw a series of connected lines on the current rendering target.
@@ -760,7 +760,7 @@ function SDL_RenderDrawLines(renderer: PSDL_Renderer; points: PSDL_Point; count:
    *    0 on success, or -1 on error
    *}
 function SDL_RenderDrawLinesF(renderer: PSDL_Renderer; points: PSDL_FPoint; count: cint32): cint32 cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderDrawLinesF' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderDrawLinesF' {$ENDIF} {$ENDIF};
 
   {**
    *  Draw a rectangle on the current rendering target.
@@ -770,7 +770,7 @@ function SDL_RenderDrawLinesF(renderer: PSDL_Renderer; points: PSDL_FPoint; coun
    *
    *   0 on success, or -1 on error
    *}
-function SDL_RenderDrawRect(renderer: PSDL_Renderer; rect: PSDL_Rect): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderDrawRect' {$ENDIF} {$ENDIF};
+function SDL_RenderDrawRect(renderer: PSDL_Renderer; rect: PSDL_Rect): cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderDrawRect' {$ENDIF} {$ENDIF};
 
   {**
    *  Draw a rectangle on the current rendering target.
@@ -781,7 +781,7 @@ function SDL_RenderDrawRect(renderer: PSDL_Renderer; rect: PSDL_Rect): cint32 cd
    *    0 on success, or -1 on error
    *}
 function SDL_RenderDrawRectF(renderer: PSDL_Renderer; rect: PSDL_FRect): cint32 cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderDrawRectF' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderDrawRectF' {$ENDIF} {$ENDIF};
 
   {**
    *  Draw some number of rectangles on the current rendering target.
@@ -792,7 +792,7 @@ function SDL_RenderDrawRectF(renderer: PSDL_Renderer; rect: PSDL_FRect): cint32
    *
    *   0 on success, or -1 on error
    *}
-function SDL_RenderDrawRects(renderer: PSDL_Renderer; rects: PSDL_Rect; count: cint32): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderDrawRects' {$ENDIF} {$ENDIF};
+function SDL_RenderDrawRects(renderer: PSDL_Renderer; rects: PSDL_Rect; count: cint32): cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderDrawRects' {$ENDIF} {$ENDIF};
 
   {**
    *  Draw some number of rectangles on the current rendering target.
@@ -804,7 +804,7 @@ function SDL_RenderDrawRects(renderer: PSDL_Renderer; rects: PSDL_Rect; count: c
    *    0 on success, or -1 on error
    *}
 function SDL_RenderDrawRectsF(renderer: PSDL_Renderer; rects: PSDL_FRect; count: cint32): cint32 cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderDrawRectsF' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderDrawRectsF' {$ENDIF} {$ENDIF};
 
   {**
    *  Fill a rectangle on the current rendering target with the drawing color.
@@ -815,7 +815,7 @@ function SDL_RenderDrawRectsF(renderer: PSDL_Renderer; rects: PSDL_FRect; count:
    *
    *   0 on success, or -1 on error
    *}
-function SDL_RenderFillRect(renderer: PSDL_Renderer; rect: PSDL_Rect): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderFillRect' {$ENDIF} {$ENDIF};
+function SDL_RenderFillRect(renderer: PSDL_Renderer; rect: PSDL_Rect): cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderFillRect' {$ENDIF} {$ENDIF};
 
   {**
    *  Fill a rectangle on the current rendering target with the drawing color.
@@ -826,7 +826,7 @@ function SDL_RenderFillRect(renderer: PSDL_Renderer; rect: PSDL_Rect): cint32 cd
    *    0 on success, or -1 on error
    *}
 function SDL_RenderFillRectF(renderer: PSDL_Renderer; rect: PSDL_FRect): cint32 cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderFillRectF' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderFillRectF' {$ENDIF} {$ENDIF};
 
   {**
    *  Fill some number of rectangles on the current rendering target with the drawing color.
@@ -837,7 +837,7 @@ function SDL_RenderFillRectF(renderer: PSDL_Renderer; rect: PSDL_FRect): cint32
    *
    *   0 on success, or -1 on error
    *}
-function SDL_RenderFillRects(renderer: PSDL_Renderer; rects: PSDL_Rect; count: cint32): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderFillRects' {$ENDIF} {$ENDIF};
+function SDL_RenderFillRects(renderer: PSDL_Renderer; rects: PSDL_Rect; count: cint32): cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderFillRects' {$ENDIF} {$ENDIF};
 
   {**
    *  Fill some number of rectangles on the current rendering target with the drawing color.
@@ -849,7 +849,7 @@ function SDL_RenderFillRects(renderer: PSDL_Renderer; rects: PSDL_Rect; count: c
    *    0 on success, or -1 on error
    *}
 function SDL_RenderFillRectsF(renderer: PSDL_Renderer; rects: PSDL_FRect; count: cint32): cint32 cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderFillRectsF' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderFillRectsF' {$ENDIF} {$ENDIF};
 
   {**
    *  Copy a portion of the texture to the current rendering target.
@@ -863,7 +863,7 @@ function SDL_RenderFillRectsF(renderer: PSDL_Renderer; rects: PSDL_FRect; count:
    *
    *   0 on success, or -1 on error
    *}
-function SDL_RenderCopy(renderer: PSDL_Renderer; texture: PSDL_Texture; srcrect: PSDL_Rect; dstrect: PSDL_Rect): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderCopy' {$ENDIF} {$ENDIF};
+function SDL_RenderCopy(renderer: PSDL_Renderer; texture: PSDL_Texture; srcrect: PSDL_Rect; dstrect: PSDL_Rect): cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderCopy' {$ENDIF} {$ENDIF};
 
   {**
    *  Copy a portion of the texture to the current rendering target.
@@ -876,7 +876,7 @@ function SDL_RenderCopy(renderer: PSDL_Renderer; texture: PSDL_Texture; srcrect:
    *    0 on success, or -1 on error
    *}
 function SDL_RenderCopyF(renderer: PSDL_Renderer; texture: PSDL_Texture; srcrect: PSDL_Rect; dstrect: PSDL_FRect): cint32 cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderCopyF' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderCopyF' {$ENDIF} {$ENDIF};
 
   {**
    *  Copy a portion of the source texture to the current rendering target, rotating it by angle around the given center
@@ -893,7 +893,7 @@ function SDL_RenderCopyF(renderer: PSDL_Renderer; texture: PSDL_Texture; srcrect
    *
    *   0 on success, or -1 on error
    *}
-function SDL_RenderCopyEx(renderer: PSDL_Renderer; texture: PSDL_Texture; const srcrect: PSDL_Rect; dstrect: PSDL_Rect; angle: Double; center: PSDL_Point; flip: cint): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderCopyEx' {$ENDIF} {$ENDIF};
+function SDL_RenderCopyEx(renderer: PSDL_Renderer; texture: PSDL_Texture; const srcrect: PSDL_Rect; dstrect: PSDL_Rect; angle: Double; center: PSDL_Point; flip: cint): cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderCopyEx' {$ENDIF} {$ENDIF};
 
   {**
    *  Copy a portion of the source texture to the current rendering target, rotating it by angle around the given center
@@ -909,7 +909,7 @@ function SDL_RenderCopyEx(renderer: PSDL_Renderer; texture: PSDL_Texture; const
    *    0 on success, or -1 on error
    *}
 function SDL_RenderCopyExF(renderer: PSDL_Renderer; texture: PSDL_Texture; const srcrect: PSDL_Rect; dstrect: PSDL_FRect; angle: Double; center: PSDL_FPoint; flip: cint): cint32 cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderCopyExF' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderCopyExF' {$ENDIF} {$ENDIF};
 
 {**
  * Render a list of triangles, optionally using a texture and indices into the
@@ -922,7 +922,7 @@ function SDL_RenderGeometry(
 	Const vertices: PSDL_Vertex; num_vertices: cint;
 	Const indices: Pcint; num_indices: cint
 ): cint; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderGeometry' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderGeometry' {$ENDIF} {$ENDIF};
 
 {**
  * Render a list of triangles, optionally using a texture and indices into the
@@ -938,7 +938,7 @@ function SDL_RenderGeometryRaw(
 	num_vertices: cint;
 	Const indices: Pointer; num_indices, size_indices: cint
 ): cint; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderGeometryRaw' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderGeometryRaw' {$ENDIF} {$ENDIF};
 
   {**
    *  Read pixels from the current rendering target.
@@ -955,12 +955,12 @@ function SDL_RenderGeometryRaw(
    *
    *   This is a very slow operation, and should not be used frequently.
    *}
-function SDL_RenderReadPixels(renderer: PSDL_Renderer; rect: PSDL_Rect; format: cuint32; pixels: Pointer; pitch: cint32): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderReadPixels' {$ENDIF} {$ENDIF};
+function SDL_RenderReadPixels(renderer: PSDL_Renderer; rect: PSDL_Rect; format: cuint32; pixels: Pointer; pitch: cint32): cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderReadPixels' {$ENDIF} {$ENDIF};
 
   {**
    *  Update the screen with rendering performed.
    *}
-procedure SDL_RenderPresent(renderer: PSDL_Renderer) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderPresent' {$ENDIF} {$ENDIF};
+procedure SDL_RenderPresent(renderer: PSDL_Renderer) cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderPresent' {$ENDIF} {$ENDIF};
 
   {**
    *  Destroy the specified texture.
@@ -968,7 +968,7 @@ procedure SDL_RenderPresent(renderer: PSDL_Renderer) cdecl; external SDL_LibName
    *   SDL_CreateTexture()
    *   SDL_CreateTextureFromSurface()
    *}
-procedure SDL_DestroyTexture(texture: PSDL_Texture) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_DestroyTexture' {$ENDIF} {$ENDIF};
+procedure SDL_DestroyTexture(texture: PSDL_Texture) cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_DestroyTexture' {$ENDIF} {$ENDIF};
 
   {**
    *  Destroy the rendering context for a window and free associated
@@ -976,7 +976,7 @@ procedure SDL_DestroyTexture(texture: PSDL_Texture) cdecl; external SDL_LibName
    *
    *   SDL_CreateRenderer()
    *}
-procedure SDL_DestroyRenderer(renderer: PSDL_Renderer) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_DestroyRenderer' {$ENDIF} {$ENDIF};
+procedure SDL_DestroyRenderer(renderer: PSDL_Renderer) cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_DestroyRenderer' {$ENDIF} {$ENDIF};
 
 {**
  * Force the rendering context to flush any pending commands to the underlying
@@ -1002,7 +1002,7 @@ procedure SDL_DestroyRenderer(renderer: PSDL_Renderer) cdecl; external SDL_LibNa
  * instead flushing them to the OS immediately.
  *}
 function SDL_RenderFlush(renderer: PSDL_Renderer): cint; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderFlush' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderFlush' {$ENDIF} {$ENDIF};
 
   {**
    *  Bind the texture to the current OpenGL/ES/ES2 context for use with
@@ -1014,7 +1014,7 @@ function SDL_RenderFlush(renderer: PSDL_Renderer): cint; cdecl;
    *
    *   0 on success, or -1 if the operation is not supported
    *}
-function SDL_GL_BindTexture(texture: PSDL_Texture; texw: pcfloat; texh: pcfloat): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GL_BindTexture' {$ENDIF} {$ENDIF};
+function SDL_GL_BindTexture(texture: PSDL_Texture; texw: pcfloat; texh: pcfloat): cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GL_BindTexture' {$ENDIF} {$ENDIF};
 
   {**
    *  Unbind a texture from the current OpenGL/ES/ES2 context.
@@ -1023,7 +1023,7 @@ function SDL_GL_BindTexture(texture: PSDL_Texture; texw: pcfloat; texh: pcfloat)
    *
    *   0 on success, or -1 if the operation is not supported
    *}
-function SDL_GL_UnbindTexture(texture: PSDL_Texture): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GL_UnbindTexture' {$ENDIF} {$ENDIF};
+function SDL_GL_UnbindTexture(texture: PSDL_Texture): cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GL_UnbindTexture' {$ENDIF} {$ENDIF};
 
 {**
  * Get the CAMetalLayer associated with the given Metal renderer.
@@ -1033,7 +1033,7 @@ function SDL_GL_UnbindTexture(texture: PSDL_Texture): cint32 cdecl; external SDL
  *
  *}
 function SDL_RenderGetMetalLayer(renderer: PSDL_Renderer): Pointer; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderGetMetalLayer' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderGetMetalLayer' {$ENDIF} {$ENDIF};
 
 {**
  * Get the Metal command encoder for the current frame
@@ -1047,13 +1047,13 @@ function SDL_RenderGetMetalLayer(renderer: PSDL_Renderer): Pointer; cdecl;
  * render targets, just the window's backbacker. Check your return values!
  *}
 function SDL_RenderGetMetalCommandEncoder(renderer: PSDL_Renderer): Pointer; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderGetMetalCommandEncoder' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderGetMetalCommandEncoder' {$ENDIF} {$ENDIF};
 
 {**
  * Toggle VSync of the given renderer.
  *}
 function SDL_RenderSetVSync(renderer: PSDL_Renderer; vsync: cint): cint; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderSetVSync' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RenderSetVSync' {$ENDIF} {$ENDIF};
 
   {**
    *  Update a rectangle within a planar YV12 or IYUV texture with new pixel data.
@@ -1074,7 +1074,7 @@ function SDL_RenderSetVSync(renderer: PSDL_Renderer; vsync: cint): cint; cdecl;
    *  this function is available if your pixel data is not contiguous.
    *}
 function SDL_UpdateYUVTexture(texture: PSDL_Texture; rect: PSDL_Rect; Yplane: pcuint8; Ypitch: cint32; Uplane: pcuint8; UPitch: cint32; Vplane: pcuint8; VPitch: cint32):cint32;
-   cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_UpdateYUVTexture' {$ENDIF} {$ENDIF};
+   cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_UpdateYUVTexture' {$ENDIF} {$ENDIF};
 
 {**
  * Update a rectangle within a planar NV12 or NV21 texture with new pixels.
@@ -1089,4 +1089,4 @@ function SDL_UpdateNVTexture(
 	Const Yplane: Pcuint8; Ypitch: cint;
 	Const UVplane: Pcuint8; UVpitch: cint
 ): cint; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_UpdateNVTexture' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_UpdateNVTexture' {$ENDIF} {$ENDIF};

+ 30 - 30
SDL2-for-Pascal/units/sdlrwops.inc

@@ -132,26 +132,26 @@ type
  *  Functions to create SDL_RWops structures from various data streams.
  *}
 function SDL_RWFromFile(const _file: PAnsiChar; const mode: PAnsiChar): PSDL_RWops; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RWFromFile' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RWFromFile' {$ENDIF} {$ENDIF};
 
-{function SDL_RWFromFP(fp: file; autoclose: TSDL_Bool): PSDL_RWops; cdecl;
-   external SDL_LibName;} //don't know if this works
+//function SDL_RWFromFP(fp: file; autoclose: TSDL_Bool): PSDL_RWops; cdecl;
+//   external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF}; //don't know if this works
 
 function SDL_RWFromFP(fp: Pointer; autoclose: TSDL_Bool): PSDL_RWops; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RWFromFP' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RWFromFP' {$ENDIF} {$ENDIF};
 
 function SDL_RWFromMem(mem: Pointer; size: cint): PSDL_RWops; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RWFromMem' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RWFromMem' {$ENDIF} {$ENDIF};
 
 function SDL_RWFromConstMem(const mem: Pointer; size: cint): PSDL_RWops; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RWFromConstMem' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RWFromConstMem' {$ENDIF} {$ENDIF};
 
 {*RWFrom functions*}
 function SDL_AllocRW: PSDL_RWops; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AllocRW' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AllocRW' {$ENDIF} {$ENDIF};
 
 procedure SDL_FreeRW(area: PSDL_RWops); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_FreeRW' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_FreeRW' {$ENDIF} {$ENDIF};
 
 const
   RW_SEEK_SET = 0;       {**< Seek from the beginning of data *}
@@ -162,7 +162,7 @@ const
  *  Return the size of the file in this rwops, or -1 if unknown
  *}
 function SDL_RWsize(context: PSDL_RWops): cint64; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RWsize' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RWsize' {$ENDIF} {$ENDIF};
 
 {**
  *  Seek to \c offset relative to \c whence, one of stdio's whence values:
@@ -171,13 +171,13 @@ function SDL_RWsize(context: PSDL_RWops): cint64; cdecl;
  *  \return the final offset in the data stream, or -1 on error.
  *}
 function SDL_RWseek(context: PSDL_RWops; offset: cint64; whence: cint): cint64; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_RWseek' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_RWseek' {$ENDIF} {$ENDIF};
 
 {**
  *  Return the current offset in the data stream, or -1 on error.
  *}
 function SDL_RWtell(context: PSDL_RWops): cint64; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RWtell' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RWtell' {$ENDIF} {$ENDIF};
 
 {**
  *  Read up to \c maxnum objects each of size \c size from the data
@@ -186,7 +186,7 @@ function SDL_RWtell(context: PSDL_RWops): cint64; cdecl;
  *  \return the number of objects read, or 0 at error or end of file.
  *}
 function SDL_RWread(context: PSDL_RWops; ptr: Pointer; size: csize_t; n: csize_t): csize_t; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RWread' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RWread' {$ENDIF} {$ENDIF};
 
 {**
  *  Write exactly \c num objects each of size \c size from the area
@@ -195,7 +195,7 @@ function SDL_RWread(context: PSDL_RWops; ptr: Pointer; size: csize_t; n: csize_t
  *  \return the number of objects written, or 0 at error or end of file.
  *}
 function SDL_RWwrite(context: PSDL_RWops; ptr: Pointer; size: csize_t; n: csize_t): csize_t; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RWwrite' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RWwrite' {$ENDIF} {$ENDIF};
 
 {**
  *  Close and free an allocated SDL_RWops structure.
@@ -203,7 +203,7 @@ function SDL_RWwrite(context: PSDL_RWops; ptr: Pointer; size: csize_t; n: csize_
  *  \return 0 if successful or -1 on write error when flushing data.
  *}
 function SDL_RWclose(context: PSDL_RWops): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RWclose' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RWclose' {$ENDIF} {$ENDIF};
 
 {**
  *  Load all the data from an SDL data stream.
@@ -219,7 +219,7 @@ function SDL_RWclose(context: PSDL_RWops): cint; cdecl;
  *  \return the data, or NULL if there was an error.
  *}
 function SDL_LoadFile_RW(src: PSDL_RWops; datasize: pcsize_t; freesrc: cint): Pointer; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LoadFile_RW' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LoadFile_RW' {$ENDIF} {$ENDIF};
 
 {**
  *  Load an entire file.
@@ -235,7 +235,7 @@ function SDL_LoadFile_RW(src: PSDL_RWops; datasize: pcsize_t; freesrc: cint): Po
  *  \return the data, or NULL if there was an error.
  *}
 function SDL_LoadFile(file_: PAnsiChar; datasize: pcsize_t): Pointer; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LoadFile' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LoadFile' {$ENDIF} {$ENDIF};
 
 {**
  *  Read endian functions
@@ -243,19 +243,19 @@ function SDL_LoadFile(file_: PAnsiChar; datasize: pcsize_t): Pointer; cdecl;
  *  Read an item of the specified endianness and return in native format.
  *}
 function SDL_ReadU8(src: PSDL_RWops): cuint8; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ReadU8' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ReadU8' {$ENDIF} {$ENDIF};
 function SDL_ReadLE16(src: PSDL_RWops): cuint16; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ReadLE16' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ReadLE16' {$ENDIF} {$ENDIF};
 function SDL_ReadBE16(src: PSDL_RWops): cuint16; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ReadBE16' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ReadBE16' {$ENDIF} {$ENDIF};
 function SDL_ReadLE32(src: PSDL_RWops): cuint32; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ReadLE32' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ReadLE32' {$ENDIF} {$ENDIF};
 function SDL_ReadBE32(src: PSDL_RWops): cuint32; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ReadBE32' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ReadBE32' {$ENDIF} {$ENDIF};
 function SDL_ReadLE64(src: PSDL_RWops): cuint64; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ReadLE64' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ReadLE64' {$ENDIF} {$ENDIF};
 function SDL_ReadBE64(src: PSDL_RWops): cuint64; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ReadBE64' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ReadBE64' {$ENDIF} {$ENDIF};
 { Read endian functions }
 
 {**
@@ -264,17 +264,17 @@ function SDL_ReadBE64(src: PSDL_RWops): cuint64; cdecl;
  *  Write an item of native format to the specified endianness.
  *}
 function SDL_WriteU8(dst: PSDL_RWops; value: cuint8): csize_t; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_WriteU8' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_WriteU8' {$ENDIF} {$ENDIF};
 function SDL_WriteLE16(dst: PSDL_RWops; value: cuint16): csize_t; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_WriteLE16' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_WriteLE16' {$ENDIF} {$ENDIF};
 function SDL_WriteBE16(dst: PSDL_RWops; value: cuint16): csize_t; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_WriteBE16' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_WriteBE16' {$ENDIF} {$ENDIF};
 function SDL_WriteLE32(dst: PSDL_RWops; value: cuint32): csize_t; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_WriteLE32' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_WriteLE32' {$ENDIF} {$ENDIF};
 function SDL_WriteBE32(dst: PSDL_RWops; value: cuint32): csize_t; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_WriteBE32' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_WriteBE32' {$ENDIF} {$ENDIF};
 function SDL_WriteLE64(dst: PSDL_RWops; value: cuint64): csize_t; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_WriteLE64' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_WriteLE64' {$ENDIF} {$ENDIF};
 function SDL_WriteBE64(dst: PSDL_RWops; value: cuint64): csize_t; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_WriteBE64' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_WriteBE64' {$ENDIF} {$ENDIF};
 { Write endian functions }

+ 17 - 17
SDL2-for-Pascal/units/sdlsensor.inc

@@ -111,9 +111,9 @@ const
  * \since This function is available since SDL 2.0.14.
  *}
 procedure SDL_LockSensors(); cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LockSensors' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LockSensors' {$ENDIF} {$ENDIF};
 procedure SDL_UnlockSensors(); cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_UnlockSensors' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_UnlockSensors' {$ENDIF} {$ENDIF};
 
 {**
  * Count the number of sensors attached to the system right now.
@@ -123,7 +123,7 @@ procedure SDL_UnlockSensors(); cdecl;
  * \since This function is available since SDL 2.0.9.
  *}
 function SDL_NumSensors(): cint; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_NumSensors' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_NumSensors' {$ENDIF} {$ENDIF};
 
 {**
  * Get the implementation dependent name of a sensor.
@@ -134,7 +134,7 @@ function SDL_NumSensors(): cint; cdecl;
  * \since This function is available since SDL 2.0.9.
  *}
 function SDL_SensorGetDeviceName(device_index: cint): PAnsiChar; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SensorGetDeviceName' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SensorGetDeviceName' {$ENDIF} {$ENDIF};
 
 {**
  * Get the type of a sensor.
@@ -146,7 +146,7 @@ function SDL_SensorGetDeviceName(device_index: cint): PAnsiChar; cdecl;
  * \since This function is available since SDL 2.0.9.
  *}
 function SDL_SensorGetDeviceType(device_index: cint): TSDL_SensorType; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SensorGetDeviceType' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SensorGetDeviceType' {$ENDIF} {$ENDIF};
 
 {**
  * Get the platform dependent type of a sensor.
@@ -158,7 +158,7 @@ function SDL_SensorGetDeviceType(device_index: cint): TSDL_SensorType; cdecl;
  * \since This function is available since SDL 2.0.9.
  *}
 function SDL_SensorGetDeviceNonPortableType(device_index: cint): cint; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SensorGetDeviceNonPortableType' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SensorGetDeviceNonPortableType' {$ENDIF} {$ENDIF};
 
 {**
  * Get the instance ID of a sensor.
@@ -169,7 +169,7 @@ function SDL_SensorGetDeviceNonPortableType(device_index: cint): cint; cdecl;
  * \since This function is available since SDL 2.0.9.
  *}
 function SDL_SensorGetDeviceInstanceID(device_index: cint): TSDL_SensorID; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SensorGetDeviceInstanceID' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SensorGetDeviceInstanceID' {$ENDIF} {$ENDIF};
 
 {**
  * Open a sensor for use.
@@ -180,7 +180,7 @@ function SDL_SensorGetDeviceInstanceID(device_index: cint): TSDL_SensorID; cdecl
  * \since This function is available since SDL 2.0.9.
  *}
 function SDL_SensorOpen(device_index: cint): PSDL_Sensor; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SensorOpen' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SensorOpen' {$ENDIF} {$ENDIF};
 
 {**
  * Return the SDL_Sensor associated with an instance id.
@@ -191,7 +191,7 @@ function SDL_SensorOpen(device_index: cint): PSDL_Sensor; cdecl;
  * \since This function is available since SDL 2.0.9.
  *}
 function SDL_SensorFromInstanceID(instance_id: TSDL_SensorID): PSDL_Sensor; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SensorFromInstanceID' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SensorFromInstanceID' {$ENDIF} {$ENDIF};
 
 {**
  * Get the implementation dependent name of a sensor
@@ -202,7 +202,7 @@ function SDL_SensorFromInstanceID(instance_id: TSDL_SensorID): PSDL_Sensor; cdec
  * \since This function is available since SDL 2.0.9.
  *}
 function SDL_SensorGetName(sensor: PSDL_Sensor): PAnsiChar; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SensorGetName' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SensorGetName' {$ENDIF} {$ENDIF};
 
 {**
  * Get the type of a sensor.
@@ -214,7 +214,7 @@ function SDL_SensorGetName(sensor: PSDL_Sensor): PAnsiChar; cdecl;
  * \since This function is available since SDL 2.0.9.
  *}
 function SDL_SensorGetType(sensor: PSDL_Sensor): TSDL_SensorType; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SensorGetType' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SensorGetType' {$ENDIF} {$ENDIF};
 
 {**
  * Get the platform dependent type of a sensor.
@@ -225,7 +225,7 @@ function SDL_SensorGetType(sensor: PSDL_Sensor): TSDL_SensorType; cdecl;
  * \since This function is available since SDL 2.0.9.
  *}
 function SDL_SensorGetNonPortableType(sensor: PSDL_Sensor): cint; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SensorGetNonPortableType' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SensorGetNonPortableType' {$ENDIF} {$ENDIF};
 
 {**
  * Get the instance ID of a sensor.
@@ -236,7 +236,7 @@ function SDL_SensorGetNonPortableType(sensor: PSDL_Sensor): cint; cdecl;
  * \since This function is available since SDL 2.0.9.
  *}
 function SDL_SensorGetInstanceID(sensor: PSDL_Sensor): TSDL_SensorID; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SensorGetInstanceID' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SensorGetInstanceID' {$ENDIF} {$ENDIF};
 
 {**
  * Get the current state of an opened sensor.
@@ -251,7 +251,7 @@ function SDL_SensorGetInstanceID(sensor: PSDL_Sensor): TSDL_SensorID; cdecl;
  * \since This function is available since SDL 2.0.9.
  *}
 function SDL_SensorGetData(sensor: PSDL_Sensor; data: pcfloat; num_values: cint): cint; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SensorGetData' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SensorGetData' {$ENDIF} {$ENDIF};
 
 {**
  * Get the current state of an opened sensor with the timestamp of the last
@@ -269,7 +269,7 @@ function SDL_SensorGetData(sensor: PSDL_Sensor; data: pcfloat; num_values: cint)
  * \since This function is available since SDL 2.26.0.
  *}
 function SDL_SensorGetDataWithTimestamp(sensor: PSDL_Sensor; timestamp: pcuint64; data: pcfloat; num_values: cint): cint; cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SensorGetDataWithTimestamp' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SensorGetDataWithTimestamp' {$ENDIF} {$ENDIF};
 
 {**
  * Close a sensor previously opened with SDL_SensorOpen().
@@ -279,7 +279,7 @@ function SDL_SensorGetDataWithTimestamp(sensor: PSDL_Sensor; timestamp: pcuint64
  * \since This function is available since SDL 2.0.9.
  *}
 procedure SDL_SensorClose(sensor: PSDL_Sensor); cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SensorClose' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SensorClose' {$ENDIF} {$ENDIF};
 
 {**
  * Update the current state of the open sensors.
@@ -293,4 +293,4 @@ procedure SDL_SensorClose(sensor: PSDL_Sensor); cdecl;
  * \since This function is available since SDL 2.0.9.
  *}
 procedure SDL_SensorUpdate(); cdecl;
-	external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SensorUpdate' {$ENDIF} {$ENDIF};
+	external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SensorUpdate' {$ENDIF} {$ENDIF};

+ 4 - 4
SDL2-for-Pascal/units/sdlshape.inc

@@ -34,7 +34,7 @@ const
  * \sa SDL_DestroyWindow
  *}
 function SDL_CreateShapedWindow(title: PAnsiChar; x: cuint; y: cuint; w: cuint; h: cuint; flags: cuint32): PSDL_Window; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateShapedWindow' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateShapedWindow' {$ENDIF} {$ENDIF};
 
 {**
  * Return whether the given window is a shaped window.
@@ -48,7 +48,7 @@ function SDL_CreateShapedWindow(title: PAnsiChar; x: cuint; y: cuint; w: cuint;
  * \sa SDL_CreateShapedWindow
  *}
 function SDL_IsShapedWindow(window: PSDL_Window): TSDL_Bool; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_IsShapedWindow' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_IsShapedWindow' {$ENDIF} {$ENDIF};
 
 
 type
@@ -106,7 +106,7 @@ type
  * \sa SDL_GetShapedWindowMode
  *}
 function SDL_SetWindowShape(window: PSDL_Window; shape: PSDL_Surface; shape_mode: PSDL_WindowShapeMode): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowShape' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowShape' {$ENDIF} {$ENDIF};
 
 {**
  * Get the shape parameters of a shaped window.
@@ -126,4 +126,4 @@ function SDL_SetWindowShape(window: PSDL_Window; shape: PSDL_Surface; shape_mode
  * \sa SDL_SetWindowShape
  *}
 function SDL_GetShapedWindowMode(window: PSDL_Window; shape_mode: PSDL_WindowShapeMode): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetShapedWindowMode' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetShapedWindowMode' {$ENDIF} {$ENDIF};

+ 68 - 68
SDL2-for-Pascal/units/sdlstdinc.inc

@@ -77,7 +77,7 @@ procedure SDL_GetOriginalMemoryFunctions(
   realloc_func: PSDL_realloc_func;
   free_func: PSDL_free_func
 ); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetOriginalMemoryFunctions' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetOriginalMemoryFunctions' {$ENDIF} {$ENDIF};
 
 (**
  * Get the current set of SDL memory functions
@@ -90,7 +90,7 @@ procedure SDL_GetMemoryFunctions(
   realloc_func: PSDL_realloc_func;
   free_func: PSDL_free_func
 ); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetMemoryFunctions' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetMemoryFunctions' {$ENDIF} {$ENDIF};
 
 (**
  * Replace SDL's memory allocation functions with a custom set
@@ -103,7 +103,7 @@ function SDL_SetMemoryFunctions(
   realloc_func: TSDL_realloc_func;
   free_func: TSDL_free_func
 ): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetMemoryFunctions' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetMemoryFunctions' {$ENDIF} {$ENDIF};
 
 (**
  * Get the number of outstanding (unfreed) allocations
@@ -111,20 +111,20 @@ function SDL_SetMemoryFunctions(
  * \since This function is available since SDL 2.0.7.
  *)
 function SDL_GetNumAllocations(): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetNumAllocations' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetNumAllocations' {$ENDIF} {$ENDIF};
 
 (**
  * Allocate a block of memory. The memory is *not* initialized.
  *)
 function SDL_malloc(size: csize_t): Pointer; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_malloc' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_malloc' {$ENDIF} {$ENDIF};
 
 (**
  * Allocate a block of memory that can fit an array of nmemb elements, each of given size.
  * The memory is initialized by setting every byte to 0.
  *)
 function SDL_calloc(nmemb, size: csize_t): Pointer; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_calloc' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_calloc' {$ENDIF} {$ENDIF};
 
 (**
  * Resize a block of memory allocated previously with SDL_malloc() or SDL_calloc().
@@ -133,7 +133,7 @@ function SDL_calloc(nmemb, size: csize_t): Pointer; cdecl;
  * If the new size is larger than the old size, any new memory will *not* be initialized.
  *)
 function SDL_realloc(mem: Pointer; size: csize_t): Pointer; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_realloc' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_realloc' {$ENDIF} {$ENDIF};
 
 (**
  * Free memory returned by functions like SDL_GetBasePath(), SDL_GetPrefPath(), etc.
@@ -142,7 +142,7 @@ function SDL_realloc(mem: Pointer; size: csize_t): Pointer; cdecl;
  * your program to crash or behave in unexpected ways.
  *)
 procedure SDL_free(mem: Pointer); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_free' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_free' {$ENDIF} {$ENDIF};
 
 
 
@@ -159,7 +159,7 @@ SDL2-for-Pascal: All comments are added by us and not found in the include file.
  * \since This function is available since SDL 2.0.16.
  *)
 function SDL_isalpha(x: cint):cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_isalpha' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_isalpha' {$ENDIF} {$ENDIF};
 
 (**
  * Check if the provided ASCII character is an alphanumeric character.
@@ -169,7 +169,7 @@ function SDL_isalpha(x: cint):cint; cdecl;
  * \since This function is available since SDL 2.0.16.
  *)
 function SDL_isalnum(x: cint):cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_isalnum' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_isalnum' {$ENDIF} {$ENDIF};
 
 (**
  * Check if the provided ASCII character is a blank character (a space or a tab).
@@ -179,7 +179,7 @@ function SDL_isalnum(x: cint):cint; cdecl;
  * \since This function is available since SDL 2.0.16.
  *)
 function SDL_isblank(x: cint):cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_isblank' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_isblank' {$ENDIF} {$ENDIF};
 
 (**
  * Check if the provided ASCII character is a control character.
@@ -189,7 +189,7 @@ function SDL_isblank(x: cint):cint; cdecl;
  * \since This function is available since SDL 2.0.16.
  *)
 function SDL_iscntrl(x: cint):cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_iscntrl' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_iscntrl' {$ENDIF} {$ENDIF};
 
 (**
  * Check if the provided ASCII character is a decimal digit.
@@ -199,7 +199,7 @@ function SDL_iscntrl(x: cint):cint; cdecl;
  * \since This function is available since SDL 2.0.4.
  *)
 function SDL_isdigit(x: cint):cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_isdigit' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_isdigit' {$ENDIF} {$ENDIF};
 
 (**
  * Check if the provided ASCII character is a hexadecimal digit.
@@ -209,7 +209,7 @@ function SDL_isdigit(x: cint):cint; cdecl;
  * \since This function is available since SDL 2.0.16.
  *)
 function SDL_isxdigit(x: cint):cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_isxdigit' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_isxdigit' {$ENDIF} {$ENDIF};
 
 (**
  * Check if the provided ASCII character is any printable character
@@ -220,7 +220,7 @@ function SDL_isxdigit(x: cint):cint; cdecl;
  * \since This function is available since SDL 2.0.16.
  *)
 function SDL_ispunct(x: cint):cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ispunct' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ispunct' {$ENDIF} {$ENDIF};
 
 (**
  * Check if the provided ASCII character is a whitespace character.
@@ -233,7 +233,7 @@ function SDL_ispunct(x: cint):cint; cdecl;
  * \since This function is available since SDL 2.0.4.
  *)
 function SDL_isspace(x: cint):cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_isspace' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_isspace' {$ENDIF} {$ENDIF};
 
 (**
  * Check if the provided ASCII character is an uppercase letter.
@@ -243,7 +243,7 @@ function SDL_isspace(x: cint):cint; cdecl;
  * \since This function is available since SDL 2.0.12.
  *)
 function SDL_isupper(x: cint):cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_isupper' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_isupper' {$ENDIF} {$ENDIF};
 
 (**
  * Check if the provided ASCII character is a lowercase letter.
@@ -253,7 +253,7 @@ function SDL_isupper(x: cint):cint; cdecl;
  * \since This function is available since SDL 2.0.12.
  *)
 function SDL_islower(x: cint):cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_islower' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_islower' {$ENDIF} {$ENDIF};
 
 (**
  * Check if the provided ASCII character is a printable character (including space).
@@ -263,7 +263,7 @@ function SDL_islower(x: cint):cint; cdecl;
  * \since This function is available since SDL 2.0.16.
  *)
 function SDL_isprint(x: cint):cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_isprint' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_isprint' {$ENDIF} {$ENDIF};
 
 (**
  * Check if the provided ASCII character is a printable character (excluding space).
@@ -273,7 +273,7 @@ function SDL_isprint(x: cint):cint; cdecl;
  * \since This function is available since SDL 2.0.16.
  *)
 function SDL_isgraph(x: cint):cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_isgraph' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_isgraph' {$ENDIF} {$ENDIF};
 
 (**
  * If the given ASCII character is a lowercase letter, converts it to uppercase.
@@ -282,7 +282,7 @@ function SDL_isgraph(x: cint):cint; cdecl;
  * \since This function is available since SDL 2.0.4.
  *)
 function SDL_toupper(x: cint):cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_toupper' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_toupper' {$ENDIF} {$ENDIF};
 
 (**
  * If the given ASCII character is an uppercase letter, converts it to lowercase.
@@ -291,7 +291,7 @@ function SDL_toupper(x: cint):cint; cdecl;
  * \since This function is available since SDL 2.0.4.
  *)
 function SDL_tolower(x: cint):cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_tolower' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_tolower' {$ENDIF} {$ENDIF};
 
 
 
@@ -305,7 +305,7 @@ function SDL_tolower(x: cint):cint; cdecl;
  * \since This function is available since SDL 2.0.4.
  *)
 function SDL_acos(x: cdouble): cdouble; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_acos' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_acos' {$ENDIF} {$ENDIF};
 
 (**
  * Calculate the arc cosine of x;
@@ -314,7 +314,7 @@ function SDL_acos(x: cdouble): cdouble; cdecl;
  * \since This function is available since SDL 2.0.8.
  *)
 function SDL_acosf(x: cfloat): cfloat; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_acosf' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_acosf' {$ENDIF} {$ENDIF};
 
 (**
  * Calculate the arc sine of x;
@@ -323,7 +323,7 @@ function SDL_acosf(x: cfloat): cfloat; cdecl;
  * \since This function is available since SDL 2.0.4.
  *)
 function SDL_asin(x: cdouble): cdouble; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_asin' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_asin' {$ENDIF} {$ENDIF};
 
 (**
  * Calculate the arc sine of x;
@@ -332,7 +332,7 @@ function SDL_asin(x: cdouble): cdouble; cdecl;
  * \since This function is available since SDL 2.0.8.
  *)
 function SDL_asinf(x: cfloat): cfloat; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_asinf' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_asinf' {$ENDIF} {$ENDIF};
 
 (**
  * Calculate the arc tangent of x;
@@ -341,7 +341,7 @@ function SDL_asinf(x: cfloat): cfloat; cdecl;
  * \since This function is available since SDL 2.0.4.
  *)
 function SDL_atan(x: cdouble): cdouble; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_atan' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_atan' {$ENDIF} {$ENDIF};
 
 (**
  * Calculate the arc tangent of x;
@@ -350,7 +350,7 @@ function SDL_atan(x: cdouble): cdouble; cdecl;
  * \since This function is available since SDL 2.0.8.
  *)
 function SDL_atanf(x: cfloat): cfloat; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_atanf' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_atanf' {$ENDIF} {$ENDIF};
 
 (**
  * Calculate the arc tangent of y/x, using the signs of the two arguments
@@ -359,7 +359,7 @@ function SDL_atanf(x: cfloat): cfloat; cdecl;
  * \since This function is available since SDL 2.0.4.
  *)
 function SDL_atan2(y, x: cdouble): cdouble; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_atan2' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_atan2' {$ENDIF} {$ENDIF};
 
 (**
  * Calculate the arc tangent of y/x, using the signs of the two arguments
@@ -368,7 +368,7 @@ function SDL_atan2(y, x: cdouble): cdouble; cdecl;
  * \since This function is available since SDL 2.0.8.
  *)
 function SDL_atan2f(y, x: cfloat): cfloat; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_atan2f' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_atan2f' {$ENDIF} {$ENDIF};
 
 (**
  * Calculate the smallest integral value that is not less than x.
@@ -376,7 +376,7 @@ function SDL_atan2f(y, x: cfloat): cfloat; cdecl;
  * \since This function is available since SDL 2.0.4.
  *)
 function SDL_ceil(x: cdouble): cdouble; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ceil' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ceil' {$ENDIF} {$ENDIF};
 
 (**
  * Calculate the smallest integral value that is not less than x.
@@ -384,7 +384,7 @@ function SDL_ceil(x: cdouble): cdouble; cdecl;
  * \since This function is available since SDL 2.0.8.
  *)
 function SDL_ceilf(x: cfloat): cfloat; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ceilf' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ceilf' {$ENDIF} {$ENDIF};
 
 (**
  * Return a number whose absolute value matches that of x,
@@ -393,7 +393,7 @@ function SDL_ceilf(x: cfloat): cfloat; cdecl;
  * \since This function is available since SDL 2.0.4.
  *)
 function SDL_copysign(x, y: cdouble): cdouble; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_copysign' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_copysign' {$ENDIF} {$ENDIF};
 
 (**
  * Return a number whose absolute value matches that of x,
@@ -402,7 +402,7 @@ function SDL_copysign(x, y: cdouble): cdouble; cdecl;
  * \since This function is available since SDL 2.0.8.
  *)
 function SDL_copysignf(x, y: cfloat): cfloat; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_copysignf' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_copysignf' {$ENDIF} {$ENDIF};
 
 (**
  * Calculate the cosine of x, where x is given in radians.
@@ -410,7 +410,7 @@ function SDL_copysignf(x, y: cfloat): cfloat; cdecl;
  * \since This function is available since SDL 2.0.4.
  *)
 function SDL_cos(x: cdouble): cdouble; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_cos' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_cos' {$ENDIF} {$ENDIF};
 
 (**
  * Calculate the cosine of x, where x is given in radians.
@@ -418,7 +418,7 @@ function SDL_cos(x: cdouble): cdouble; cdecl;
  * \since This function is available since SDL 2.0.4.
  *)
 function SDL_cosf(x: cfloat): cfloat; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_cosf' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_cosf' {$ENDIF} {$ENDIF};
 
 (**
  * Calculate the value of e (the base of natural logarithms)
@@ -427,7 +427,7 @@ function SDL_cosf(x: cfloat): cfloat; cdecl;
  * \since This function is available since SDL 2.0.9.
  *)
 function SDL_exp(x: cdouble): cdouble; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_exp' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_exp' {$ENDIF} {$ENDIF};
 
 (**
  * Calculate the value of e (the base of natural logarithms)
@@ -436,7 +436,7 @@ function SDL_exp(x: cdouble): cdouble; cdecl;
  * \since This function is available since SDL 2.0.9.
  *)
 function SDL_expf(x: cfloat): cfloat; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_expf' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_expf' {$ENDIF} {$ENDIF};
 
 (**
  * Calculate the absolute value of x.
@@ -444,7 +444,7 @@ function SDL_expf(x: cfloat): cfloat; cdecl;
  * \since This function is available since SDL 2.0.4.
  *)
 function SDL_fabs(x: cdouble): cdouble; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_fabs' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_fabs' {$ENDIF} {$ENDIF};
 
 (**
  * Calculate the absolute value of x.
@@ -452,7 +452,7 @@ function SDL_fabs(x: cdouble): cdouble; cdecl;
  * \since This function is available since SDL 2.0.8.
  *)
 function SDL_fabsf(x: cfloat): cfloat; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_fabsf' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_fabsf' {$ENDIF} {$ENDIF};
 
 (**
  * Calculate the largest integral value that is not greater than x.
@@ -460,7 +460,7 @@ function SDL_fabsf(x: cfloat): cfloat; cdecl;
  * \since This function is available since SDL 2.0.4.
  *)
 function SDL_floor(x: cdouble): cdouble; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_floor' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_floor' {$ENDIF} {$ENDIF};
 
 (**
  * Calculate the largest integral value that is not greater than x.
@@ -468,7 +468,7 @@ function SDL_floor(x: cdouble): cdouble; cdecl;
  * \since This function is available since SDL 2.0.8.
  *)
 function SDL_floorf(x: cfloat): cfloat; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_floorf' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_floorf' {$ENDIF} {$ENDIF};
 
 (**
  * Calculate the floating-point remainder of dividing x by y.
@@ -476,7 +476,7 @@ function SDL_floorf(x: cfloat): cfloat; cdecl;
  * \since This function is available since SDL 2.0.8.
  *)
 function SDL_fmod(x, y: cdouble): cdouble; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_fmod' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_fmod' {$ENDIF} {$ENDIF};
 
 (**
  * Calculate the floating-point remainder of dividing x by y.
@@ -484,7 +484,7 @@ function SDL_fmod(x, y: cdouble): cdouble; cdecl;
  * \since This function is available since SDL 2.0.8.
  *)
 function SDL_fmodf(x, y: cfloat): cfloat; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_fmodf' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_fmodf' {$ENDIF} {$ENDIF};
 
 (**
  * Calculate the natural logarithm of x.
@@ -496,7 +496,7 @@ function SDL_fmodf(x, y: cfloat): cfloat; cdecl;
  Hence we decided to rename it.
  *)
 function SDL_nlog(x: cdouble): cdouble; cdecl;
-  external SDL_LibName
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF}
   name {$IF DEFINED(DELPHI) AND DEFINED(MACOS)} '_SDL_log' {$ELSE} 'SDL_log' {$ENDIF};
 
 (**
@@ -509,7 +509,7 @@ function SDL_nlog(x: cdouble): cdouble; cdecl;
  for details), we decided to rename it.
  *)
 function SDL_nlogf(x: cfloat): cfloat; cdecl;
-  external SDL_LibName
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF}
   name {$IF DEFINED(DELPHI) AND DEFINED(MACOS)} '_SDL_logf' {$ELSE} 'SDL_logf' {$ENDIF};
 
 (**
@@ -518,7 +518,7 @@ function SDL_nlogf(x: cfloat): cfloat; cdecl;
  * \since This function is available since SDL 2.0.8.
  *)
 function SDL_log10(x: cdouble): cdouble; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_log10' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_log10' {$ENDIF} {$ENDIF};
 
 (**
  * Calculate the base 10 logarithm of x.
@@ -526,7 +526,7 @@ function SDL_log10(x: cdouble): cdouble; cdecl;
  * \since This function is available since SDL 2.0.8.
  *)
 function SDL_log10f(x: cfloat): cfloat; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_log10f' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_log10f' {$ENDIF} {$ENDIF};
 
 (**
  * Round to nearest integer, away from zero.
@@ -534,7 +534,7 @@ function SDL_log10f(x: cfloat): cfloat; cdecl;
  * \since This function is available since SDL 2.0.16.
  *)
 function SDL_lround(x: cdouble): clong; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_lround' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_lround' {$ENDIF} {$ENDIF};
 
 (**
  * Round to nearest integer, away from zero.
@@ -542,7 +542,7 @@ function SDL_lround(x: cdouble): clong; cdecl;
  * \since This function is available since SDL 2.0.16.
  *)
 function SDL_lroundf(x: cfloat): clong; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_lroundf' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_lroundf' {$ENDIF} {$ENDIF};
 
 (**
  * Calculate the value of x raised to the power of y.
@@ -550,7 +550,7 @@ function SDL_lroundf(x: cfloat): clong; cdecl;
  * \since This function is available since SDL 2.0.4.
  *)
 function SDL_pow(x, y: cdouble): cdouble; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_pow' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_pow' {$ENDIF} {$ENDIF};
 
 (**
  * Calculate the value of x raised to the power of y.
@@ -558,7 +558,7 @@ function SDL_pow(x, y: cdouble): cdouble; cdecl;
  * \since This function is available since SDL 2.0.8.
  *)
 function SDL_powf(x, y: cfloat): cfloat; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_powf' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_powf' {$ENDIF} {$ENDIF};
 
 (**
  * Round to nearest integral value, away from zero.
@@ -566,7 +566,7 @@ function SDL_powf(x, y: cfloat): cfloat; cdecl;
  * \since This function is available since SDL 2.0.16.
  *)
 function SDL_round(x: cdouble): cdouble; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_round' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_round' {$ENDIF} {$ENDIF};
 
 (**
  * Round to nearest integral value, away from zero.
@@ -574,7 +574,7 @@ function SDL_round(x: cdouble): cdouble; cdecl;
  * \since This function is available since SDL 2.0.16.
  *)
 function SDL_roundf(x: cfloat): cfloat; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_roundf' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_roundf' {$ENDIF} {$ENDIF};
 
 (**
  * Calculate x multiplied by the floating-point radix to the power of n.
@@ -583,7 +583,7 @@ function SDL_roundf(x: cfloat): cfloat; cdecl;
  * \since This function is available since SDL 2.0.4.
  *)
 function SDL_scalbn(x: cdouble; n: cint): cdouble; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_scalbn' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_scalbn' {$ENDIF} {$ENDIF};
 
 (**
  * Calculate x multiplied by the floating-point radix to the power of n.
@@ -592,7 +592,7 @@ function SDL_scalbn(x: cdouble; n: cint): cdouble; cdecl;
  * \since This function is available since SDL 2.0.8.
  *)
 function SDL_scalbnf(x: cfloat; n: cint): cfloat; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_scalbnf' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_scalbnf' {$ENDIF} {$ENDIF};
 
 (**
  * Calculate the sine of x, where x is given in radians.
@@ -600,7 +600,7 @@ function SDL_scalbnf(x: cfloat; n: cint): cfloat; cdecl;
  * \since This function is available since SDL 2.0.4.
  *)
 function SDL_sin(x: cdouble): cdouble; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_sin' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_sin' {$ENDIF} {$ENDIF};
 
 (**
  * Calculate the sine of x, where x is given in radians.
@@ -608,7 +608,7 @@ function SDL_sin(x: cdouble): cdouble; cdecl;
  * \since This function is available since SDL 2.0.4.
  *)
 function SDL_sinf(x: cfloat): cfloat; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_sinf' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_sinf' {$ENDIF} {$ENDIF};
 
 (**
  * Calculate the non-negative square root of x.
@@ -616,7 +616,7 @@ function SDL_sinf(x: cfloat): cfloat; cdecl;
  * \since This function is available since SDL 2.0.4.
  *)
 function SDL_sqrt(x: cdouble): cdouble; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_sqrt' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_sqrt' {$ENDIF} {$ENDIF};
 
 (**
  * Calculate the non-negative square root of x.
@@ -624,7 +624,7 @@ function SDL_sqrt(x: cdouble): cdouble; cdecl;
  * \since This function is available since SDL 2.0.4.
  *)
 function SDL_sqrtf(x: cfloat): cfloat; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_sqrtf' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_sqrtf' {$ENDIF} {$ENDIF};
 
 (**
  * Calculate the tangent of x, where x is given in radians.
@@ -632,7 +632,7 @@ function SDL_sqrtf(x: cfloat): cfloat; cdecl;
  * \since This function is available since SDL 2.0.4.
  *)
 function SDL_tan(x: cdouble): cdouble; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_tan' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_tan' {$ENDIF} {$ENDIF};
 
 (**
  * Calculate the tangent of x, where x is given in radians.
@@ -640,7 +640,7 @@ function SDL_tan(x: cdouble): cdouble; cdecl;
  * \since This function is available since SDL 2.0.4.
  *)
 function SDL_tanf(x: cfloat): cfloat; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_tanf' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_tanf' {$ENDIF} {$ENDIF};
 
 (**
  * Round to nearest integral value, towards zero.
@@ -648,7 +648,7 @@ function SDL_tanf(x: cfloat): cfloat; cdecl;
  * \since This function is available since SDL 2.0.14.
  *)
 function SDL_trunc(x: cdouble): cdouble; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_trunc' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_trunc' {$ENDIF} {$ENDIF};
 
 (**
  * Round to nearest integral value, towards zero.
@@ -656,7 +656,7 @@ function SDL_trunc(x: cdouble): cdouble; cdecl;
  * \since This function is available since SDL 2.0.14.
  *)
 function SDL_truncf(x: cfloat): cfloat; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_truncf' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_truncf' {$ENDIF} {$ENDIF};
 
 
 
@@ -670,7 +670,7 @@ function SDL_truncf(x: cfloat): cfloat; cdecl;
  * \since This function is available since SDL 2.0.0.
  *)
 function SDL_iconv_string(Const tocode, fromcode, inbuf: PAnsiChar; inbytesleft: csize_t): PAnsiChar; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_iconv_string' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_iconv_string' {$ENDIF} {$ENDIF};
 
 // These are macros in the original C headers, we will reimplement them as simple Pascal functions.
 function SDL_iconv_utf8_locale(Const str: PAnsiChar): PAnsiChar; cdecl;
@@ -689,10 +689,10 @@ type
   PSDL_iconv = ^TSDL_iconv;
 
 function SDL_iconv_open(Const tocode, fromcode: PAnsiChar): PSDL_iconv; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_iconv_open' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_iconv_open' {$ENDIF} {$ENDIF};
 
 function SDL_iconv_close(cd: PSDL_iconv): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_iconv_close' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_iconv_close' {$ENDIF} {$ENDIF};
 
 function SDL_iconv(cd: PSDL_iconv; Const inbuf: PPAnsiChar; inbytesleft: pcsize_t; outbuf: PPAnsiChar; outbytesleft: pcsize_t): csize_t; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_iconv' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_iconv' {$ENDIF} {$ENDIF};

+ 39 - 39
SDL2-for-Pascal/units/sdlsurface.inc

@@ -100,16 +100,16 @@ const
  *}
 
 function SDL_CreateRGBSurface(flags: cuint32; width: cint; height: cint; depth: cint; Rmask: cuint32; Gmask: cuint32; Bmask: cuint32; Amask: cuint32): PSDL_Surface; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateRGBSurface' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateRGBSurface' {$ENDIF} {$ENDIF};
 {* !!! FIXME for 2.1: why does this ask for depth? Format provides that. *}
 function SDL_CreateRGBSurfaceWithFormat(flags: cuint32; width, height, depth: cint; format: cuint32):PSDL_Surface; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateRGBSurfaceWithFormat' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateRGBSurfaceWithFormat' {$ENDIF} {$ENDIF};
 function SDL_CreateRGBSurfaceFrom(pixels: Pointer; width: cint; height: cint; depth: cint; pitch: cint; Rmask: cuint32; Gmask: cuint32; Bmask: cuint32; Amask: cuint32): PSDL_Surface; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateRGBSurfaceFrom' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateRGBSurfaceFrom' {$ENDIF} {$ENDIF};
 function SDL_CreateRGBSurfaceWithFormatFrom(pixels: Pointer; width, height, depth, pitch: cint; format: cuint32):PSDL_Surface; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateRGBSurfaceWithFormatFrom' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateRGBSurfaceWithFormatFrom' {$ENDIF} {$ENDIF};
 procedure SDL_FreeSurface(surface: PSDL_Surface); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_FreeSurface' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_FreeSurface' {$ENDIF} {$ENDIF};
 
   {**
    *  Set the palette used by a surface.
@@ -120,7 +120,7 @@ procedure SDL_FreeSurface(surface: PSDL_Surface); cdecl;
    *}
 
 function SDL_SetSurfacePalette(surface: PSDL_Surface; palette: PSDL_Palette): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetSurfacePalette' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetSurfacePalette' {$ENDIF} {$ENDIF};
 
   {**
    *  Sets up a surface for directly accessing the pixels.
@@ -143,12 +143,12 @@ function SDL_SetSurfacePalette(surface: PSDL_Surface; palette: PSDL_Palette): ci
    *}
 
 function SDL_LockSurface(surface: PSDL_Surface): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LockSurface' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LockSurface' {$ENDIF} {$ENDIF};
 
   {** SDL_LockSurface() *}
 
 procedure SDL_UnlockSurface(surface: PSDL_Surface); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_UnlockSurface' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_UnlockSurface' {$ENDIF} {$ENDIF};
 
   {**
    *  Load a surface from a seekable SDL data stream (memory or file).
@@ -161,7 +161,7 @@ procedure SDL_UnlockSurface(surface: PSDL_Surface); cdecl;
    *}
 
 function SDL_LoadBMP_RW(src: PSDL_RWops; freesrc: cint): PSDL_Surface; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LoadBMP_RW' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LoadBMP_RW' {$ENDIF} {$ENDIF};
 
   {**
    *  Load a surface from a file.
@@ -186,7 +186,7 @@ function SDL_LoadBMP(_file: PAnsiChar): PSDL_Surface;
  *}
 
 function SDL_SaveBMP_RW(surface: PSDL_Surface; dst: PSDL_RWops; freedst: cint): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SaveBMP_RW' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SaveBMP_RW' {$ENDIF} {$ENDIF};
 
   {**
    *  Save a surface to a file.
@@ -206,7 +206,7 @@ function SDL_SaveBMP(const surface: PSDL_Surface; const filename:AnsiString): ci
    *}
 
 function SDL_SetSurfaceRLE(surface: PSDL_Surface; flag: cint): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetSurfaceRLE' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetSurfaceRLE' {$ENDIF} {$ENDIF};
 
 {**
  *  \brief Returns whether the surface is RLE enabled
@@ -214,7 +214,7 @@ function SDL_SetSurfaceRLE(surface: PSDL_Surface; flag: cint): cint; cdecl;
  *  \return SDL_TRUE if the surface is RLE enabled, or SDL_FALSE if the surface is NULL or not RLE enabled
  *}
  function SDL_HasSurfaceRLE(surface: PSDL_Surface): TSDL_Bool; cdecl;
-   external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasSurfaceRLE' {$ENDIF} {$ENDIF};
+   external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasSurfaceRLE' {$ENDIF} {$ENDIF};
 
   {**
    *  Sets the color key (transparent pixel) in a blittable surface.
@@ -229,7 +229,7 @@ function SDL_SetSurfaceRLE(surface: PSDL_Surface; flag: cint): cint; cdecl;
    *}
 
 function SDL_SetColorKey(surface: PSDL_Surface; flag: cint; key: cuint32): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetColorKey' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetColorKey' {$ENDIF} {$ENDIF};
 
 {**
  *  \brief Returns whether the surface has a color key
@@ -237,7 +237,7 @@ function SDL_SetColorKey(surface: PSDL_Surface; flag: cint; key: cuint32): cint;
  *  \return SDL_TRUE if the surface has a color key, or SDL_FALSE if the surface is NULL or has no color key
  *}
 function SDL_HasColorKey(surface: PSDL_Surface): TSDL_Bool; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasColorKey' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HasColorKey' {$ENDIF} {$ENDIF};
 
   {**
    *  Gets the color key (transparent pixel) in a blittable surface.
@@ -251,7 +251,7 @@ function SDL_HasColorKey(surface: PSDL_Surface): TSDL_Bool; cdecl;
    *}
 
 function SDL_GetColorKey(surface: PSDL_Surface; key: pcuint32): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetColorKey' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetColorKey' {$ENDIF} {$ENDIF};
 
   {**
    *  Set an additional color value used in blit operations.
@@ -267,7 +267,7 @@ function SDL_GetColorKey(surface: PSDL_Surface; key: pcuint32): cint; cdecl;
    *}
 
 function SDL_SetSurfaceColorMod(surface: PSDL_Surface; r: cuint8; g: cuint8; b: cuint8): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetSurfaceColorMod' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetSurfaceColorMod' {$ENDIF} {$ENDIF};
 
  {**
    *  Get the additional color value used in blit operations.
@@ -283,7 +283,7 @@ function SDL_SetSurfaceColorMod(surface: PSDL_Surface; r: cuint8; g: cuint8; b:
    *}
 
 function SDL_GetSurfaceColorMod(surface: PSDL_Surface; r: pcuint8; g: pcuint8; b: pcuint8): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetSurfaceColorMod' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetSurfaceColorMod' {$ENDIF} {$ENDIF};
 
   {**
    *  Set an additional alpha value used in blit operations.
@@ -297,7 +297,7 @@ function SDL_GetSurfaceColorMod(surface: PSDL_Surface; r: pcuint8; g: pcuint8; b
    *}
 
 function SDL_SetSurfaceAlphaMod(surface: PSDL_Surface; alpha: cuint8): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetSurfaceAlphaMod' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetSurfaceAlphaMod' {$ENDIF} {$ENDIF};
 
   {**
    *  Get the additional alpha value used in blit operations.
@@ -311,7 +311,7 @@ function SDL_SetSurfaceAlphaMod(surface: PSDL_Surface; alpha: cuint8): cint; cde
    *}
 
 function SDL_GetSurfaceAlphaMod(surface: PSDL_Surface; alpha: pcuint8): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetSurfaceAlphaMod' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetSurfaceAlphaMod' {$ENDIF} {$ENDIF};
 
   {**
    *  Set the blend mode used for blit operations.
@@ -325,7 +325,7 @@ function SDL_GetSurfaceAlphaMod(surface: PSDL_Surface; alpha: pcuint8): cint; cd
    *}
 
 function SDL_SetSurfaceBlendMode(surface: PSDL_Surface; blendMode: TSDL_BlendMode): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetSurfaceBlendMode' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetSurfaceBlendMode' {$ENDIF} {$ENDIF};
 
   {**
    *  Get the blend mode used for blit operations.
@@ -339,7 +339,7 @@ function SDL_SetSurfaceBlendMode(surface: PSDL_Surface; blendMode: TSDL_BlendMod
    *}
 
 function SDL_GetSurfaceBlendMode(surface: PSDL_Surface; blendMode: PSDL_BlendMode): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetSurfaceBlendMode' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetSurfaceBlendMode' {$ENDIF} {$ENDIF};
 
   {**
    *  Sets the clipping rectangle for the destination surface in a blit.
@@ -356,7 +356,7 @@ function SDL_GetSurfaceBlendMode(surface: PSDL_Surface; blendMode: PSDL_BlendMod
    *}
 
 function SDL_SetClipRect(surface: PSDL_Surface; const rect: PSDL_Rect): TSDL_Bool; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetClipRect' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetClipRect' {$ENDIF} {$ENDIF};
 
   {**
    *  Gets the clipping rectangle for the destination surface in a blit.
@@ -366,13 +366,13 @@ function SDL_SetClipRect(surface: PSDL_Surface; const rect: PSDL_Rect): TSDL_Boo
    *}
 
 procedure SDL_GetClipRect(surface: PSDL_Surface; rect: PSDL_Rect); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetClipRect' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetClipRect' {$ENDIF} {$ENDIF};
 
 {*
  * Creates a new surface identical to the existing surface
  *}
 function SDL_DuplicateSurface(surface: PSDL_Surface): PSDL_Surface; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_DuplicateSurface' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_DuplicateSurface' {$ENDIF} {$ENDIF};
 
   {**
    *  Creates a new surface of the specified format, and then copies and maps
@@ -386,9 +386,9 @@ function SDL_DuplicateSurface(surface: PSDL_Surface): PSDL_Surface; cdecl;
    *}
 
 function SDL_ConvertSurface(src: PSDL_Surface; const fmt: PSDL_PixelFormat; flags: cuint32): PSDL_Surface; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ConvertSurface' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ConvertSurface' {$ENDIF} {$ENDIF};
 function SDL_ConvertSurfaceFormat(src: PSDL_Surface; pixel_format: cuint32; flags: cuint32): PSDL_Surface; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ConvertSurfaceFormat' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ConvertSurfaceFormat' {$ENDIF} {$ENDIF};
 
   {**
    *  Copy a block of pixels of one format to another format
@@ -397,7 +397,7 @@ function SDL_ConvertSurfaceFormat(src: PSDL_Surface; pixel_format: cuint32; flag
    *}
 
 function SDL_ConvertPixels(width: cint; height: cint; src_format: cuint32; const src: Pointer; src_pitch: cint; dst_format: cuint32; dst: Pointer; dst_pitch: cint): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ConvertPixels' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ConvertPixels' {$ENDIF} {$ENDIF};
 
   {**
    *  Performs a fast fill of the given rectangle with color.
@@ -411,9 +411,9 @@ function SDL_ConvertPixels(width: cint; height: cint; src_format: cuint32; const
    *}
 
 function SDL_FillRect(dst: PSDL_Surface; const rect: PSDL_Rect; color: cuint32): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_FillRect' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_FillRect' {$ENDIF} {$ENDIF};
 function SDL_FillRects(dst: PSDL_Surface; const rects: PSDL_Rect; count: cint; color: cuint32): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_FillRects' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_FillRects' {$ENDIF} {$ENDIF};
 
   {**
    *  Performs a fast blit from the source surface to the destination surface.
@@ -477,7 +477,7 @@ function SDL_FillRects(dst: PSDL_Surface; const rects: PSDL_Rect; count: cint; c
 (* SDL_surface.h uses #define to change all SDL_BlitSurface() calls into SDL_UpperBlit() calls.                         *
  * Since Pascal macro support is very limited, we workaround by outright pointing SDL_BlitSurface() to SDL_UpperBlit(). *)
 function SDL_BlitSurface(src: PSDL_Surface; const srcrect: PSDL_Rect; dst: PSDL_Surface; dstrect: PSDL_Rect): cint; cdecl;
-  external SDL_LibName name {$IF DEFINED(DELPHI) AND DEFINED(MACOS)} '_SDL_UpperBlit' {$ELSE} 'SDL_UpperBlit' {$IFEND};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} name {$IF DEFINED(DELPHI) AND DEFINED(MACOS)} '_SDL_UpperBlit' {$ELSE} 'SDL_UpperBlit' {$IFEND};
 
 
   {**
@@ -486,7 +486,7 @@ function SDL_BlitSurface(src: PSDL_Surface; const srcrect: PSDL_Rect; dst: PSDL_
    *}
 
 function SDL_UpperBlit(src: PSDL_Surface; const srcrect: PSDL_Rect; dst: PSDL_Surface; dstrect: PSDL_Rect): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_UpperBlit' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_UpperBlit' {$ENDIF} {$ENDIF};
 
   {**
    *  This is a semi-private blit function and it performs low-level surface
@@ -494,7 +494,7 @@ function SDL_UpperBlit(src: PSDL_Surface; const srcrect: PSDL_Rect; dst: PSDL_Su
    *}
 
 function SDL_LowerBlit(src: PSDL_Surface; srcrect: PSDL_Rect; dst: PSDL_Surface; dstrect: PSDL_Rect): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LowerBlit' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LowerBlit' {$ENDIF} {$ENDIF};
 
   {**
    *  Perform a fast, low quality, stretch blit between two surfaces of the
@@ -504,12 +504,12 @@ function SDL_LowerBlit(src: PSDL_Surface; srcrect: PSDL_Rect; dst: PSDL_Surface;
    *}
 
 function SDL_SoftStretch(src: PSDL_Surface; const srcrect: PSDL_Rect; dst: PSDL_Surface; const dstrect: PSDL_Surface): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SoftStretch' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SoftStretch' {$ENDIF} {$ENDIF};
 
 (* SDL_surface.h uses #define to change all SDL_BlitSurfaceScaled() calls into SDL_UpperBlitScaled() calls.                         *
  * Since Pascal macro support is very limited, we workaround by outright pointing SDL_BlitSurfaceScaled() to SDL_UpperBlitScaled(). *)
 function SDL_BlitSurfaceScaled(src: PSDL_Surface; const srcrect: PSDL_Rect; dst: PSDL_Surface; dstrect: PSDL_Rect): cint; cdecl;
-  external SDL_LibName name {$IF DEFINED(DELPHI) AND DEFINED(MACOS)} '_SDL_UpperBlitScaled' {$ELSE} 'SDL_UpperBlitScaled' {$IFEND};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} name {$IF DEFINED(DELPHI) AND DEFINED(MACOS)} '_SDL_UpperBlitScaled' {$ELSE} 'SDL_UpperBlitScaled' {$IFEND};
 
   {**
    *  This is the public scaled blit function, SDL_BlitScaled(), and it performs
@@ -517,7 +517,7 @@ function SDL_BlitSurfaceScaled(src: PSDL_Surface; const srcrect: PSDL_Rect; dst:
    *}
 
 function SDL_UpperBlitScaled(src: PSDL_Surface; const srcrect: PSDL_Rect; dst: PSDL_Surface; dstrect: PSDL_Rect): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_UpperBlitScaled' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_UpperBlitScaled' {$ENDIF} {$ENDIF};
 
   {**
    *  This is a semi-private blit function and it performs low-level surface
@@ -525,22 +525,22 @@ function SDL_UpperBlitScaled(src: PSDL_Surface; const srcrect: PSDL_Rect; dst: P
    *}
 
 function SDL_LowerBlitScaled(src: PSDL_Surface; srcrect: PSDL_Rect; dst: PSDL_Surface; dstrect: PSDL_Rect): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LowerBlitScaled' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_LowerBlitScaled' {$ENDIF} {$ENDIF};
 
 {**
  *  \brief Set the YUV conversion mode
  *}
 procedure SDL_SetYUVConversionMode(mode: TSDL_YUV_CONVERSION_MODE); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetYUVConversionMode' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetYUVConversionMode' {$ENDIF} {$ENDIF};
 
 {**
  *  \brief Get the YUV conversion mode
  *}
 function SDL_GetYUVConversionMode: TSDL_YUV_CONVERSION_MODE; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetYUVConversionMode' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetYUVConversionMode' {$ENDIF} {$ENDIF};
 
 {**
  *  \brief Get the YUV conversion mode, returning the correct mode for the resolution when the current conversion mode is SDL_YUV_CONVERSION_AUTOMATIC
  *}
 function SDL_GetYUVConversionModeForResolution(width: cint; height: cint): TSDL_YUV_CONVERSION_MODE; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetYUVConversionModeForResolution' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetYUVConversionModeForResolution' {$ENDIF} {$ENDIF};

+ 34 - 34
SDL2-for-Pascal/units/sdlsystem.inc

@@ -16,7 +16,7 @@ type
  * \since This function is available since SDL 2.0.4.
  *}
 procedure SDL_SetWindowsMessageHook(callback: TSDL_WindowsMessageHook; userdata: Pointer); cdecl;
-  external SDL_LibName;
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF};
 
 {**
  * Get the D3D9 adapter index that matches the specified display index.
@@ -32,7 +32,7 @@ procedure SDL_SetWindowsMessageHook(callback: TSDL_WindowsMessageHook; userdata:
  * \since This function is available since SDL 2.0.1.
  *}
 function SDL_Direct3D9GetAdapterIndex(displayIndex:cint):cint; cdecl;
-  external SDL_LibName;
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF};
 
 type
   PIDirect3DDevice9 = type Pointer;
@@ -52,7 +52,7 @@ type
  * \since This function is available since SDL 2.0.1.
  *}
 function SDL_RenderGetD3D9Device(renderer:PSDL_Renderer):PIDirect3DDevice9; cdecl;
-  external SDL_LibName;
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF};
 
 {**
  * Get the D3D11 device associated with a renderer.
@@ -67,7 +67,7 @@ function SDL_RenderGetD3D9Device(renderer:PSDL_Renderer):PIDirect3DDevice9; cdec
  * \since This function is available since SDL 2.0.16.
  *}
 function SDL_RenderGetD3D11Device(renderer:PSDL_Renderer):PID3D11Device; cdecl;
-  external SDL_LibName;
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF};
 
 {**
  * Get the D3D12 device associated with a renderer.
@@ -82,7 +82,7 @@ function SDL_RenderGetD3D11Device(renderer:PSDL_Renderer):PID3D11Device; cdecl;
  * \since This function is available since SDL 2.24.0.
  *}
 function SDL_RenderGetD3D12Device(renderer:PSDL_Renderer):PID3D12Device; cdecl;
-  external SDL_LibName;
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF};
 
 {**
  * Get the DXGI Adapter and Output indices for the specified display index.
@@ -103,7 +103,7 @@ function SDL_RenderGetD3D12Device(renderer:PSDL_Renderer):PID3D12Device; cdecl;
  * \since This function is available since SDL 2.0.2.
  *}
 function SDL_DXGIGetOutputInfo(displayIndex: cint; adapterIndex, outputIndex: pcint): TSDL_Bool;
-  external SDL_LibName;
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF};
 {$ENDIF WIN32 OR WIN64}
 
 
@@ -121,7 +121,7 @@ function SDL_DXGIGetOutputInfo(displayIndex: cint; adapterIndex, outputIndex: pc
  * \since This function is available since SDL 2.0.9.
  *}
 function SDL_LinuxSetThreadPriority(threadID: cint64; priority: cint): cint; cdecl;
-  external SDL_LibName;
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF};
 
 {**
  * Sets the priority (not nice level) and scheduling policy for a thread.
@@ -137,7 +137,7 @@ function SDL_LinuxSetThreadPriority(threadID: cint64; priority: cint): cint; cde
  * \since This function is available since SDL 2.0.18.
  *}
 function SDL_LinuxSetThreadPriorityAndPolicy(threadID: cint64; sdlPriority, schedPolicy: cint): cint; cdecl;
-  external SDL_LibName;
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF};
 {$ENDIF LINUX}
 
 
@@ -169,7 +169,7 @@ type
  * \sa SDL_iPhoneSetEventPump
  *}
 function SDL_iPhoneSetAnimationCallback(window: PSDL_Window; interval: cint; callback: TSDL_iPhoneAnimationCallback; callbackParam: Pointer); cdecl;
-  external SDL_LibName;
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF};
 
 {**
  * Use this function to enable or disable the SDL event pump on Apple iOS.
@@ -183,7 +183,7 @@ function SDL_iPhoneSetAnimationCallback(window: PSDL_Window; interval: cint; cal
  * \sa SDL_iPhoneSetAnimationCallback
  *}
 procedure SDL_iPhoneSetEventPump(enabled: TSDL_Bool); cdecl;
-  external SDL_LibName;
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF};
 {$ENDIF __IPHONEOS__}
 
 
@@ -208,7 +208,7 @@ procedure SDL_iPhoneSetEventPump(enabled: TSDL_Bool); cdecl;
  * \sa SDL_AndroidGetActivity
  *}
 function SDL_AndroidGetJNIEnv(): Pointer; cdecl;
-  external SDL_LibName;
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF};
 
 (**
  * Retrieve the Java instance of the Android activity class.
@@ -231,7 +231,7 @@ function SDL_AndroidGetJNIEnv(): Pointer; cdecl;
  * \sa SDL_AndroidGetJNIEnv
  *)
 function SDL_AndroidGetActivity(): Pointer; cdecl;
-  external SDL_LibName;
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF};
 
 {**
  * Query Android API level of the current device.
@@ -267,7 +267,7 @@ function SDL_AndroidGetActivity(): Pointer; cdecl;
  * \since This function is available since SDL 2.0.12.
  *}
 function SDL_GetAndroidSDKVersion(): cint; cdecl;
-  external SDL_LibName;
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF};
 
 {**
  * Query if the application is running on Android TV.
@@ -277,7 +277,7 @@ function SDL_GetAndroidSDKVersion(): cint; cdecl;
  * \since This function is available since SDL 2.0.8.
  *}
 function SDL_IsAndroidTV(): TSDL_Bool; cdecl;
-  external SDL_LibName;
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF};
 
 {**
  * Query if the application is running on a Chromebook.
@@ -287,7 +287,7 @@ function SDL_IsAndroidTV(): TSDL_Bool; cdecl;
  * \since This function is available since SDL 2.0.9.
  *}
 function SDL_IsChromebook(): TSDL_Bool; cdecl;
-  external SDL_LibName;
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF};
 
 {**
  * Query if the application is running on a Samsung DeX docking station.
@@ -297,7 +297,7 @@ function SDL_IsChromebook(): TSDL_Bool; cdecl;
  * \since This function is available since SDL 2.0.9.
  *}
 function SDL_IsDeXMode(): TSDL_Bool; cdecl;
-  external SDL_LibName;
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF};
 
 {**
  * Trigger the Android system back button behavior.
@@ -305,7 +305,7 @@ function SDL_IsDeXMode(): TSDL_Bool; cdecl;
  * \since This function is available since SDL 2.0.9.
  *}
 procedure SDL_AndroidBackButton(); cdecl;
-  external SDL_LibName;
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF};
 
 {**
    See the official Android developer guide for more information:
@@ -332,7 +332,7 @@ const
  * \sa SDL_AndroidGetExternalStorageState
  *}
 function SDL_AndroidGetInternalStoragePath(): PAnsiChar; cdecl;
-  external SDL_LibName;
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF};
 
 {**
  * Get the current state of external storage.
@@ -350,7 +350,7 @@ function SDL_AndroidGetInternalStoragePath(): PAnsiChar; cdecl;
  * \sa SDL_AndroidGetExternalStoragePath
  *}
 function SDL_AndroidGetExternalStorageState(): cint; cdecl;
-  external SDL_LibName;
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF};
 
 {**
  * Get the path used for external storage for this application.
@@ -369,7 +369,7 @@ function SDL_AndroidGetExternalStorageState(): cint; cdecl;
  * \sa SDL_AndroidGetExternalStorageState
  *}
 function SDL_AndroidGetExternalStoragePath(): PAnsiChar; cdecl;
-  external SDL_LibName;
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF};
 
 {**
  * Request permissions at runtime.
@@ -385,7 +385,7 @@ function SDL_AndroidGetExternalStoragePath(): PAnsiChar; cdecl;
  * \since This function is available since SDL 2.0.14.
  *}
 function SDL_AndroidRequestPermission(const permission: PAnsiChar): TSDL_Bool; cdecl;
-  external SDL_LibName;
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF};
 
 {**
  * Shows an Android toast notification.
@@ -411,7 +411,7 @@ function SDL_AndroidRequestPermission(const permission: PAnsiChar): TSDL_Bool; c
  * \since This function is available since SDL 2.0.16.
  *}
 function SDL_AndroidShowToast(const message: PAnsiChar; duration, gravity, xoffset, yoffset: cint): cint; cdecl;
-  external SDL_LibName;
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF};
 
 {**
  * Send a user command to SDLActivity.
@@ -424,7 +424,7 @@ function SDL_AndroidShowToast(const message: PAnsiChar; duration, gravity, xoffs
  * \since This function is available since SDL 2.0.22.
  *}
 function SDL_AndroidSendMessage(command: cUint32; param: cint): cint; cdecl;
-  external SDL_LibName;
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF};
 {$ENDIF ANDROID}
 
 
@@ -478,7 +478,7 @@ Type
    *      supported where.
    *}
 function SDL_WinRTGetFSPathUNICODE(pathType :TSDL_WinRT_Path):PWideChar;
-   cdecl; external SDL_LibName;
+   cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF};
 
 
   {**
@@ -497,7 +497,7 @@ function SDL_WinRTGetFSPathUNICODE(pathType :TSDL_WinRT_Path):PWideChar;
    *      supported where.
    *}
 function SDL_WinRTGetFSPathUTF8(pathType :TSDL_WinRT_Path):PChar;
-   cdecl; external SDL_LibName;
+   cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF};
 
 
 {**
@@ -508,7 +508,7 @@ function SDL_WinRTGetFSPathUTF8(pathType :TSDL_WinRT_Path):PChar;
  * \since This function is available since SDL 2.0.8.
  *}
 function SDL_WinRTGetDeviceFamily(): TSDL_WinRT_DeviceFamily;
-  cdecl; external SDL_LibName;
+  cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF};
 {$ENDIF __WINRT__}
 
 
@@ -522,16 +522,16 @@ function SDL_WinRTGetDeviceFamily(): TSDL_WinRT_DeviceFamily;
  * \since This function is available since SDL 2.0.9.
  *}
 function SDL_IsTablet(): TSDL_Bool; cdecl;
-  external SDL_LibName;
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF};
 
 
 { Functions used by iOS application delegates to notify SDL about state changes }
-procedure SDL_OnApplicationWillTerminate(); cdecl; external SDL_LibName;
-procedure SDL_OnApplicationDidReceiveMemoryWarning(); cdecl; external SDL_LibName;
-procedure SDL_OnApplicationWillResignActive(); cdecl; external SDL_LibName;
-procedure SDL_OnApplicationDidEnterBackground(); cdecl; external SDL_LibName;
-procedure SDL_OnApplicationWillEnterForeground(); cdecl; external SDL_LibName;
-procedure SDL_OnApplicationDidBecomeActive(); cdecl; external SDL_LibName;
+procedure SDL_OnApplicationWillTerminate(); cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF};
+procedure SDL_OnApplicationDidReceiveMemoryWarning(); cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF};
+procedure SDL_OnApplicationWillResignActive(); cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF};
+procedure SDL_OnApplicationDidEnterBackground(); cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF};
+procedure SDL_OnApplicationWillEnterForeground(); cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF};
+procedure SDL_OnApplicationDidBecomeActive(); cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF};
 {$IFDEF __IPHONEOS__}
-procedure SDL_OnApplicationDidChangeStatusBarOrientation(); cdecl; external SDL_LibName;
+procedure SDL_OnApplicationDidChangeStatusBarOrientation(); cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF};
 {$ENDIF}

+ 1 - 1
SDL2-for-Pascal/units/sdlsyswm.inc

@@ -296,4 +296,4 @@ Type
  *  \endcode
  *)
 Function SDL_GetWindowWMInfo(window:PSDL_Window; info : PSDL_SysWMinfo):TSDL_bool; cdecl;
-   external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowWMInfo' {$ENDIF} {$ENDIF};
+   external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowWMInfo' {$ENDIF} {$ENDIF};

+ 11 - 11
SDL2-for-Pascal/units/sdlthread.inc

@@ -87,7 +87,7 @@ type
    *}
 function SDL_CreateThread(fn: TSDL_ThreadFunction; name: PAnsiChar;
   data: Pointer; pfnBeginThread: TpfnSDL_CurrentBeginThread; pfnEndThread: TpfnSDL_CurrentEndThread): PSDL_Thread; cdecl; overload;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateThread' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateThread' {$ENDIF} {$ENDIF};
 
   {**
    *  Create a thread.
@@ -117,7 +117,7 @@ function SDL_CreateThread(fn: TSDL_ThreadFunction; name: PAnsiChar;
    *}
 function SDL_CreateThread(fn: TSDL_ThreadFunction; name: PAnsiChar;
   data: Pointer): PSDL_Thread; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateThread' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateThread' {$ENDIF} {$ENDIF};
 
 {$ENDIF}
 
@@ -128,24 +128,24 @@ function SDL_CreateThread(fn: TSDL_ThreadFunction; name: PAnsiChar;
    *  memory, not to be free()'d by the caller, and remains valid until the
    *  specified thread is cleaned up by SDL_WaitThread().
    *}
-function SDL_GetThreadName(thread: PSDL_Thread): PAnsiChar cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetThreadName' {$ENDIF}{$ENDIF};
+function SDL_GetThreadName(thread: PSDL_Thread): PAnsiChar cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetThreadName' {$ENDIF}{$ENDIF};
 
   {**
    *  Get the thread identifier for the current thread.
    *}
-function SDL_ThreadID: TSDL_ThreadID cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ThreadID' {$ENDIF}{$ENDIF};
+function SDL_ThreadID: TSDL_ThreadID cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ThreadID' {$ENDIF}{$ENDIF};
 
   {**
    *  Get the thread identifier for the specified thread.
    *
    *  Equivalent to SDL_ThreadID() if the specified thread is NULL.
    *}
-function SDL_GetThreadID(thread: PSDL_Thread): TSDL_ThreadID cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetThreadID' {$ENDIF}{$ENDIF};
+function SDL_GetThreadID(thread: PSDL_Thread): TSDL_ThreadID cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetThreadID' {$ENDIF}{$ENDIF};
 
   {**
    *  Set the priority for the current thread
    *}
-function SDL_SetThreadPriority(priority: TSDL_ThreadPriority): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetThreadPriority' {$ENDIF}{$ENDIF};
+function SDL_SetThreadPriority(priority: TSDL_ThreadPriority): cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetThreadPriority' {$ENDIF}{$ENDIF};
 
   {**
    *  Wait for a thread to finish.
@@ -153,7 +153,7 @@ function SDL_SetThreadPriority(priority: TSDL_ThreadPriority): cint32 cdecl; ext
    *  The return code for the thread function is placed in the area
    *  pointed to by status, if status is not NULL.
    *}
-procedure SDL_WaitThread(thread: PSDL_Thread; status: pcint) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_WaitThread' {$ENDIF}{$ENDIF};
+procedure SDL_WaitThread(thread: PSDL_Thread; status: pcint) cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_WaitThread' {$ENDIF}{$ENDIF};
 
   {**
    *  A thread may be "detached" to signify that it should not remain until
@@ -181,7 +181,7 @@ procedure SDL_WaitThread(thread: PSDL_Thread; status: pcint) cdecl; external SDL
    *
    *  It is safe to pass NIL to this function; it is a no-op.
    *}
-procedure SDL_DetachThread(thread:TSDL_Thread); cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_DetachThread' {$ENDIF}{$ENDIF};
+procedure SDL_DetachThread(thread:TSDL_Thread); cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_DetachThread' {$ENDIF}{$ENDIF};
 
   {**
    *  Create an identifier that is globally visible to all threads but refers to data that is thread-specific.
@@ -212,7 +212,7 @@ procedure SDL_DetachThread(thread:TSDL_Thread); cdecl; external SDL_LibName {$IF
    *   SDL_TLSGet()
    *   SDL_TLSSet()
    *}
-function SDL_TLSCreate: TSDL_TLSID cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_TLSCreate' {$ENDIF} {$ENDIF};
+function SDL_TLSCreate: TSDL_TLSID cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_TLSCreate' {$ENDIF} {$ENDIF};
 
   {**
    *  Get the value associated with a thread local storage ID for the current thread.
@@ -224,7 +224,7 @@ function SDL_TLSCreate: TSDL_TLSID cdecl; external SDL_LibName {$IFDEF DELPHI} {
    *   SDL_TLSCreate()
    *   SDL_TLSSet()
    *}
-function SDL_TLSGet(id: TSDL_TLSID): Pointer cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_TLSGet' {$ENDIF} {$ENDIF};
+function SDL_TLSGet(id: TSDL_TLSID): Pointer cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_TLSGet' {$ENDIF} {$ENDIF};
 
   {**
    *  Set the value associated with a thread local storage ID for the current thread.
@@ -238,4 +238,4 @@ function SDL_TLSGet(id: TSDL_TLSID): Pointer cdecl; external SDL_LibName {$IFDEF
    *   SDL_TLSCreate()
    *   SDL_TLSGet()
    *}
-function SDL_TLSSet(id: TSDL_TLSID; value: Pointer; destructor_: Pointer): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_TLSSet' {$ENDIF} {$ENDIF};
+function SDL_TLSSet(id: TSDL_TLSID; value: Pointer; destructor_: Pointer): cint32 cdecl; external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_TLSSet' {$ENDIF} {$ENDIF};

+ 7 - 7
SDL2-for-Pascal/units/sdltimer.inc

@@ -6,7 +6,7 @@
  *  This value wraps if the program runs for more than ~49 days.
  *}
 function SDL_GetTicks: cuint32; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetTicks' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetTicks' {$ENDIF} {$ENDIF};
 
 {**
  * Get the number of milliseconds since SDL library initialization.
@@ -17,7 +17,7 @@ function SDL_GetTicks: cuint32; cdecl;
  * values from this function can be safely compared directly.
  *}
 function SDL_GetTicks64: cuint64; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetTicks64' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetTicks64' {$ENDIF} {$ENDIF};
 
 {**
  * \brief Compare SDL ticks values, and return true if A has passed B
@@ -36,19 +36,19 @@ function SDL_TICKS_PASSED(const A, B: cint32): Boolean;
  *  Get the current value of the high resolution counter
  *}
 function SDL_GetPerformanceCounter: cuint64; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetPerformanceCounter' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetPerformanceCounter' {$ENDIF} {$ENDIF};
 
 {**
  *  Get the count per second of the high resolution counter
  *}
 function SDL_GetPerformanceFrequency: cuint64; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetPerformanceFrequency' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetPerformanceFrequency' {$ENDIF} {$ENDIF};
 
 {**
  *  Wait a specified number of milliseconds before returning.
  *}
 procedure SDL_Delay(ms: cuint32); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_Delay' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_Delay' {$ENDIF} {$ENDIF};
 
 type
   {**
@@ -76,7 +76,7 @@ type
  *  A timer ID, or NULL when an error occurs.
  *}
 function SDL_AddTimer(interval: cuint32; callback: TSDL_TimerCallback; param: Pointer): TSDL_TimerID; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AddTimer' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_AddTimer' {$ENDIF} {$ENDIF};
 
 {**
  *  Remove a timer knowing its ID.
@@ -86,4 +86,4 @@ function SDL_AddTimer(interval: cuint32; callback: TSDL_TimerCallback; param: Po
  *  It is not safe to remove a timer multiple times.
  *}
 function SDL_RemoveTimer(id: TSDL_TimerID): Boolean; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RemoveTimer' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RemoveTimer' {$ENDIF} {$ENDIF};

+ 6 - 6
SDL2-for-Pascal/units/sdltouch.inc

@@ -41,13 +41,13 @@ const
    *  Get the number of registered touch devices.
    *}
 function SDL_GetNumTouchDevices(): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetNumTouchDevices' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetNumTouchDevices' {$ENDIF} {$ENDIF};
 
   {**
    *  Get the touch ID with the given index, or 0 if the index is invalid.
    *}
 function SDL_GetTouchDevice(index: cint): TSDL_TouchID; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetTouchDevice' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetTouchDevice' {$ENDIF} {$ENDIF};
 
 {**
  * Get the touch device name as reported from the driver,
@@ -56,7 +56,7 @@ function SDL_GetTouchDevice(index: cint): TSDL_TouchID; cdecl;
  * \since This function is available since SDL 2.0.22.
  *}
 function SDL_GetTouchName(index: cint): PAnsiChar; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetTouchName' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetTouchName' {$ENDIF} {$ENDIF};
 
 {**
  * Get the type of the given touch device.
@@ -64,17 +64,17 @@ function SDL_GetTouchName(index: cint): PAnsiChar; cdecl;
  * \since This function is available since SDL 2.0.10.
  *}
 function SDL_GetTouchDeviceType(touchID: TSDL_TouchID): TSDL_TouchDeviceType; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetTouchDeviceType' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetTouchDeviceType' {$ENDIF} {$ENDIF};
 
   {**
    *  Get the number of active fingers for a given touch device.
    *}
 function SDL_GetNumTouchFingers(touchID: TSDL_TouchID): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetNumTouchFingers' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetNumTouchFingers' {$ENDIF} {$ENDIF};
 
   {**
    *  Get the finger object of the given touch, with the given index.
    *}
 function SDL_GetTouchFinger(touchID: TSDL_TouchID; index: cint): PSDL_Finger; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetTouchFinger' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetTouchFinger' {$ENDIF} {$ENDIF};
 

+ 3 - 3
SDL2-for-Pascal/units/sdlversion.inc

@@ -103,7 +103,7 @@ function SDL_VERSION_ATLEAST(X,Y,Z: cuint8): Boolean;
  *  SDL_VERSION
  *}
 procedure SDL_GetVersion(ver: PSDL_Version); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetVersion' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetVersion' {$ENDIF} {$ENDIF};
 
 {**
  *  Get the code revision of SDL that is linked against your program.
@@ -113,7 +113,7 @@ procedure SDL_GetVersion(ver: PSDL_Version); cdecl;
  *  against other revisions. It is NOT an incrementing number.
  *}
 function SDL_GetRevision: PAnsiChar; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetRevision' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetRevision' {$ENDIF} {$ENDIF};
 
 {**
  *  Get the revision number of SDL that is linked against your program.
@@ -123,4 +123,4 @@ function SDL_GetRevision: PAnsiChar; cdecl;
  *  hg.libsdl.org.
  *}
 function SDL_GetRevisionNumber: cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetRevisionNumber' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetRevisionNumber' {$ENDIF} {$ENDIF};

+ 94 - 94
SDL2-for-Pascal/units/sdlvideo.inc

@@ -244,7 +244,7 @@ const
    *}
 
 function SDL_GetNumVideoDrivers: cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetNumVideoDrivers' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetNumVideoDrivers' {$ENDIF} {$ENDIF};
 
   {**
    *  Get the name of a built in video driver.
@@ -256,7 +256,7 @@ function SDL_GetNumVideoDrivers: cint; cdecl;
    *}
 
 function SDL_GetVideoDriver(index: cint): PAnsiChar; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetVideoDriver' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetVideoDriver' {$ENDIF} {$ENDIF};
 
   {**
    *  Initialize the video subsystem, optionally specifying a video driver.
@@ -274,7 +274,7 @@ function SDL_GetVideoDriver(index: cint): PAnsiChar; cdecl;
    *}
 
 function SDL_VideoInit(const driver_name: PAnsiChar): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_VideoInit' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_VideoInit' {$ENDIF} {$ENDIF};
 
   {**
    *  Shuts down the video subsystem.
@@ -284,7 +284,7 @@ function SDL_VideoInit(const driver_name: PAnsiChar): cint; cdecl;
    *  SDL_VideoInit()
    *}
 procedure SDL_VideoQuit; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_VideoQuit' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_VideoQuit' {$ENDIF} {$ENDIF};
 
   {**
    *  Returns the name of the currently initialized video driver.
@@ -297,7 +297,7 @@ procedure SDL_VideoQuit; cdecl;
    *}
 
 function SDL_GetCurrentVideoDriver: PAnsiChar; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetCurrentVideoDriver' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetCurrentVideoDriver' {$ENDIF} {$ENDIF};
 
   {**
    *  Returns the number of available video displays.
@@ -306,7 +306,7 @@ function SDL_GetCurrentVideoDriver: PAnsiChar; cdecl;
    *}
 
 function SDL_GetNumVideoDisplays: cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetNumVideoDisplays' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetNumVideoDisplays' {$ENDIF} {$ENDIF};
 
   {**
    *  Get the name of a display in UTF-8 encoding
@@ -317,7 +317,7 @@ function SDL_GetNumVideoDisplays: cint; cdecl;
    *}
 
 function SDL_GetDisplayName(displayIndex: cint): PAnsiChar; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetDisplayName' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetDisplayName' {$ENDIF} {$ENDIF};
 
   {**
    *  Get the desktop area represented by a display, with the primary
@@ -329,7 +329,7 @@ function SDL_GetDisplayName(displayIndex: cint): PAnsiChar; cdecl;
    *}
 
 function SDL_GetDisplayBounds(displayIndex: cint; rect: PSDL_Rect): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetDisplayBounds' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetDisplayBounds' {$ENDIF} {$ENDIF};
 
 {**
  *  \brief Get the usable desktop area represented by a display, with the
@@ -349,7 +349,7 @@ function SDL_GetDisplayBounds(displayIndex: cint; rect: PSDL_Rect): cint; cdecl;
  *  \sa SDL_GetNumVideoDisplays()
  *}
 function SDL_GetDisplayUsableBounds(displayIndex: cint; rect: PSDL_Rect): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetDisplayUsableBounds' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetDisplayUsableBounds' {$ENDIF} {$ENDIF};
 
   {**
    *  \brief Get the dots/pixels-per-inch for a display
@@ -362,7 +362,7 @@ function SDL_GetDisplayUsableBounds(displayIndex: cint; rect: PSDL_Rect): cint;
    *  \sa SDL_GetNumVideoDisplays()
    *}
 function SDL_GetDisplayDPI(displayIndex: cint; ddpi, hdpi, vdpi: pcfloat): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetDisplayDPI' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetDisplayDPI' {$ENDIF} {$ENDIF};
 
 {**
  *  \brief Get the orientation of a display
@@ -372,7 +372,7 @@ function SDL_GetDisplayDPI(displayIndex: cint; ddpi, hdpi, vdpi: pcfloat): cint;
  *  \sa SDL_GetNumVideoDisplays()
  *}
 function SDL_GetDisplayOrientation(displayIndex: cint): TSDL_DisplayOrientation; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetDisplayOrientation' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetDisplayOrientation' {$ENDIF} {$ENDIF};
 
   {**
    *  Returns the number of available display modes.
@@ -381,7 +381,7 @@ function SDL_GetDisplayOrientation(displayIndex: cint): TSDL_DisplayOrientation;
    *}
 
 function SDL_GetNumDisplayModes(displayIndex: cint): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetNumDisplayModes' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetNumDisplayModes' {$ENDIF} {$ENDIF};
 
   {**
    *  Fill in information about a specific display mode.
@@ -396,21 +396,21 @@ function SDL_GetNumDisplayModes(displayIndex: cint): cint; cdecl;
    *}
 
 function SDL_GetDisplayMode(displayIndex: cint; modeIndex: cint; mode: PSDL_DisplayMode): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetDisplayMode' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetDisplayMode' {$ENDIF} {$ENDIF};
 
   {**
    *  Fill in information about the desktop display mode.
    *}
 
 function SDL_GetDesktopDisplayMode(displayIndex: cint; mode: PSDL_DisplayMode): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetDesktopDisplayMode' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetDesktopDisplayMode' {$ENDIF} {$ENDIF};
 
   {**
    *  Fill in information about the current display mode.
    *}
 
 function SDL_GetCurrentDisplayMode(displayIndex: cint; mode: PSDL_DisplayMode): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetCurrentDisplayIndex' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetCurrentDisplayIndex' {$ENDIF} {$ENDIF};
 
   {**
    *  Get the closest match to the requested display mode.
@@ -434,7 +434,7 @@ function SDL_GetCurrentDisplayMode(displayIndex: cint; mode: PSDL_DisplayMode):
    *}
 
 function SDL_GetClosestDisplayMode(displayIndex: cint; const mode: PSDL_DisplayMode; closest: PSDL_DisplayMode): PSDL_DisplayMode; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetClosestDisplayMode' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetClosestDisplayMode' {$ENDIF} {$ENDIF};
 
 {**
  * Get the index of the display containing a point
@@ -449,7 +449,7 @@ function SDL_GetClosestDisplayMode(displayIndex: cint; const mode: PSDL_DisplayM
  * \sa SDL_GetNumVideoDisplays
  *}
 function SDL_GetPointDisplayIndex(const point: PSDL_Point): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetPointDisplayIndex' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetPointDisplayIndex' {$ENDIF} {$ENDIF};
 
 {**
  * Get the index of the display primarily containing a rect
@@ -465,7 +465,7 @@ function SDL_GetPointDisplayIndex(const point: PSDL_Point): cint; cdecl;
  * \sa SDL_GetNumVideoDisplays
  *}
 function SDL_GetRectDisplayIndex(const rect: PSDL_Rect): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetRectDisplayIndex' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetRectDisplayIndex' {$ENDIF} {$ENDIF};
 
   {**
    *  Get the display index associated with a window.
@@ -475,7 +475,7 @@ function SDL_GetRectDisplayIndex(const rect: PSDL_Rect): cint; cdecl;
    *}
 
 function SDL_GetWindowDisplayIndex(window: PSDL_Window): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowDisplayIndex' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowDisplayIndex' {$ENDIF} {$ENDIF};
 
   {**
    *  Set the display mode used when a fullscreen window is visible.
@@ -492,7 +492,7 @@ function SDL_GetWindowDisplayIndex(window: PSDL_Window): cint; cdecl;
    *}
 
 function SDL_SetWindowDisplayMode(window: PSDL_Window; const mode: PSDL_DisplayMode): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowDisplayMode' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowDisplayMode' {$ENDIF} {$ENDIF};
 
   {**
    *  Fill in information about the display mode used when a fullscreen
@@ -503,7 +503,7 @@ function SDL_SetWindowDisplayMode(window: PSDL_Window; const mode: PSDL_DisplayM
    *}
 
 function SDL_GetWindowDisplayMode(window: PSDL_Window; mode: PSDL_DisplayMode): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowDisplayMode' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowDisplayMode' {$ENDIF} {$ENDIF};
 
 {**
  * Get the raw ICC profile data for the screen the window is currently on.
@@ -518,14 +518,14 @@ function SDL_GetWindowDisplayMode(window: PSDL_Window; mode: PSDL_DisplayMode):
  * \since This function is available since SDL 2.0.18.
  *}
 function SDL_GetWindowICCProfile(window: PSDL_Window; size: pcsize_t): Pointer; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowICCProfile' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowICCProfile' {$ENDIF} {$ENDIF};
 
   {**
    *  Get the pixel format associated with the window.
    *}
 
 function SDL_GetWindowPixelFormat(window: PSDL_Window): cuint32; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowPixelFormat' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowPixelFormat' {$ENDIF} {$ENDIF};
 
   {**
    *  \brief Create a window with the specified position, dimensions, and flags.
@@ -571,7 +571,7 @@ function SDL_GetWindowPixelFormat(window: PSDL_Window): cuint32; cdecl;
    *}
 
 function SDL_CreateWindow(const title: PAnsiChar; x: cint; y: cint; w: cint; h: cint; flags: TSDL_WindowFlags): PSDL_Window; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateWindow' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateWindow' {$ENDIF} {$ENDIF};
 
   {**
    *  Create an SDL window from an existing native window.
@@ -584,28 +584,28 @@ function SDL_CreateWindow(const title: PAnsiChar; x: cint; y: cint; w: cint; h:
    *}
 
 function SDL_CreateWindowFrom(const data: Pointer): PSDL_Window; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateWindowFrom' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_CreateWindowFrom' {$ENDIF} {$ENDIF};
 
   {**
    *  Get the numeric ID of a window, for logging purposes.
    *}
 
 function SDL_GetWindowID(window: PSDL_Window): cuint32; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowID' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowID' {$ENDIF} {$ENDIF};
 
   {**
    *  Get a window from a stored ID, or nil if it doesn't exist.
    *}
 
 function SDL_GetWindowFromID(id: cuint32): PSDL_Window; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowFromID' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowFromID' {$ENDIF} {$ENDIF};
 
   {**
    *  Get the window flags.
    *}
 
 function SDL_GetWindowFlags(window: PSDL_Window): TSDL_WindowFlags; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowFlags' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowFlags' {$ENDIF} {$ENDIF};
 
   {**
    *  Set the title of a window, in UTF-8 format.
@@ -614,7 +614,7 @@ function SDL_GetWindowFlags(window: PSDL_Window): TSDL_WindowFlags; cdecl;
    *}
 
 procedure SDL_SetWindowTitle(window: PSDL_Window; const title: PAnsiChar); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowTitle' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowTitle' {$ENDIF} {$ENDIF};
 
   {**
    *  Get the title of a window, in UTF-8 format.
@@ -623,7 +623,7 @@ procedure SDL_SetWindowTitle(window: PSDL_Window; const title: PAnsiChar); cdecl
    *}
 
 function SDL_GetWindowTitle(window: PSDL_Window): PAnsiChar; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowTitle' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowTitle' {$ENDIF} {$ENDIF};
 
   {**
    *  Set the icon for a window.
@@ -632,7 +632,7 @@ function SDL_GetWindowTitle(window: PSDL_Window): PAnsiChar; cdecl;
    *}
 
 procedure SDL_SetWindowIcon(window: PSDL_Window; icon: PSDL_Surface); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowIcon' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowIcon' {$ENDIF} {$ENDIF};
 
   {**
    *  Associate an arbitrary named pointer with a window.
@@ -649,7 +649,7 @@ procedure SDL_SetWindowIcon(window: PSDL_Window; icon: PSDL_Surface); cdecl;
    *}
 
 function SDL_SetWindowData(window: PSDL_Window; const name: PAnsiChar; userdata: Pointer): Pointer; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowData' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowData' {$ENDIF} {$ENDIF};
 
   {**
    *  Retrieve the data pointer associated with a window.
@@ -663,7 +663,7 @@ function SDL_SetWindowData(window: PSDL_Window; const name: PAnsiChar; userdata:
    *}
 
 function SDL_GetWindowData(window: PSDL_Window; const name: PAnsiChar): Pointer; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowData' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowData' {$ENDIF} {$ENDIF};
 
   {**
    *  Set the position of a window.
@@ -680,7 +680,7 @@ function SDL_GetWindowData(window: PSDL_Window; const name: PAnsiChar): Pointer;
    *}
 
 procedure SDL_SetWindowPosition(window: PSDL_Window; x: cint; y: cint); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowPosition' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowPosition' {$ENDIF} {$ENDIF};
 
   {**
    *  Get the position of a window.
@@ -692,7 +692,7 @@ procedure SDL_SetWindowPosition(window: PSDL_Window; x: cint; y: cint); cdecl;
    *}
 
 procedure SDL_GetWindowPosition(window: PSDL_Window; x: pcint; y: pcint); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowPosition' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowPosition' {$ENDIF} {$ENDIF};
 
   {**
    *  Set the size of a window's client area.
@@ -707,7 +707,7 @@ procedure SDL_GetWindowPosition(window: PSDL_Window; x: pcint; y: pcint); cdecl;
    *}
 
 procedure SDL_SetWindowSize(window: PSDL_Window; w: cint; h: cint); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowSize' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowSize' {$ENDIF} {$ENDIF};
 
   {**
    *  Get the size of a window's client area.
@@ -719,7 +719,7 @@ procedure SDL_SetWindowSize(window: PSDL_Window; w: cint; h: cint); cdecl;
    *}
 
 procedure SDL_GetWindowSize(window: PSDL_Window; w: pcint; h: pcint); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowSize' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowSize' {$ENDIF} {$ENDIF};
 
   {**
    *  \brief Get the size of a window's borders (decorations) around the client area.
@@ -737,7 +737,7 @@ procedure SDL_GetWindowSize(window: PSDL_Window; w: pcint; h: pcint); cdecl;
    *        if the window in question was borderless.
    *}
 function SDL_GetWindowBordersSize(window: PSDL_Window; top, left, bottom, right: pcint): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowBordersSize' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowBordersSize' {$ENDIF} {$ENDIF};
 
   {**
    *  Set the minimum size of a window's client area.
@@ -753,7 +753,7 @@ function SDL_GetWindowBordersSize(window: PSDL_Window; top, left, bottom, right:
    *}
 
 procedure SDL_SetWindowMinimumSize(window: PSDL_Window; min_w: cint; min_h: cint); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowMinimumSize' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowMinimumSize' {$ENDIF} {$ENDIF};
     
   {**
    *  Get the minimum size of a window's client area.
@@ -766,7 +766,7 @@ procedure SDL_SetWindowMinimumSize(window: PSDL_Window; min_w: cint; min_h: cint
    *}
 
 procedure SDL_GetWindowMinimumSize(window: PSDL_Window; w: pcint; h: pcint); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowMinimumSize' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowMinimumSize' {$ENDIF} {$ENDIF};
 
   {**
    *  Set the maximum size of a window's client area.
@@ -782,7 +782,7 @@ procedure SDL_GetWindowMinimumSize(window: PSDL_Window; w: pcint; h: pcint); cde
    *}
 
 procedure SDL_SetWindowMaximumSize(window: PSDL_Window; max_w: cint; max_h: cint); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowMaximumSize' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowMaximumSize' {$ENDIF} {$ENDIF};
 
   {**
    *  Get the maximum size of a window's client area.
@@ -795,7 +795,7 @@ procedure SDL_SetWindowMaximumSize(window: PSDL_Window; max_w: cint; max_h: cint
    *}
 
 procedure SDL_GetWindowMaximumSize(window: PSDL_Window; w: pcint; h: pcint); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowMaximumSize' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowMaximumSize' {$ENDIF} {$ENDIF};
 
   {**
    *  Set the border state of a window.
@@ -813,7 +813,7 @@ procedure SDL_GetWindowMaximumSize(window: PSDL_Window; w: pcint; h: pcint); cde
    *}
 
 procedure SDL_SetWindowBordered(window: PSDL_Window; bordered: TSDL_Bool); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowBordered' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowBordered' {$ENDIF} {$ENDIF};
 
   {**
    *  \brief Set the user-resizable state of a window.
@@ -830,7 +830,7 @@ procedure SDL_SetWindowBordered(window: PSDL_Window; bordered: TSDL_Bool); cdecl
    *  \sa SDL_GetWindowFlags()
    *}
 procedure SDL_SetWindowResizable(window: PSDL_Window; resizable: TSDL_Bool); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowResizable' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowResizable' {$ENDIF} {$ENDIF};
 
 {**
  * Set the window to always be above the others.
@@ -847,7 +847,7 @@ procedure SDL_SetWindowResizable(window: PSDL_Window; resizable: TSDL_Bool); cde
  * \sa SDL_GetWindowFlags
  *}
 procedure SDL_SetWindowAlwaysOnTop(window: PSDL_Window; on_top: TSDL_Bool); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowAlwaysOnTop' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowAlwaysOnTop' {$ENDIF} {$ENDIF};
 
   {**
    *  Show a window.
@@ -856,7 +856,7 @@ procedure SDL_SetWindowAlwaysOnTop(window: PSDL_Window; on_top: TSDL_Bool); cdec
    *}
 
 procedure SDL_ShowWindow(window: PSDL_Window); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ShowWindow' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ShowWindow' {$ENDIF} {$ENDIF};
 
   {**
    *  Hide a window.
@@ -865,14 +865,14 @@ procedure SDL_ShowWindow(window: PSDL_Window); cdecl;
    *}
 
 procedure SDL_HideWindow(window: PSDL_Window); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HideWindow' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_HideWindow' {$ENDIF} {$ENDIF};
 
   {**
    *  Raise a window above other windows and set the input focus.
    *}
 
 procedure SDL_RaiseWindow(window: PSDL_Window); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RaiseWindow' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RaiseWindow' {$ENDIF} {$ENDIF};
 
   {**
    *  Make a window as large as possible.
@@ -881,7 +881,7 @@ procedure SDL_RaiseWindow(window: PSDL_Window); cdecl;
    *}
 
 procedure SDL_MaximizeWindow(window: PSDL_Window); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_MaximizeWindow' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_MaximizeWindow' {$ENDIF} {$ENDIF};
 
   {**
    *  Minimize a window to an iconic representation.
@@ -890,7 +890,7 @@ procedure SDL_MaximizeWindow(window: PSDL_Window); cdecl;
    *}
 
 procedure SDL_MinimizeWindow(window: PSDL_Window); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_MinimizeWindow' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_MinimizeWindow' {$ENDIF} {$ENDIF};
 
   {**
    *  Restore the size and position of a minimized or maximized window.
@@ -900,7 +900,7 @@ procedure SDL_MinimizeWindow(window: PSDL_Window); cdecl;
    *}
 
 procedure SDL_RestoreWindow(window: PSDL_Window); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RestoreWindow' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_RestoreWindow' {$ENDIF} {$ENDIF};
 
   {**
    *  Set a window's fullscreen state.
@@ -912,7 +912,7 @@ procedure SDL_RestoreWindow(window: PSDL_Window); cdecl;
    *}
 
 function SDL_SetWindowFullscreen(window: PSDL_Window; flags: TSDL_WindowFlags): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowFullscreen' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowFullscreen' {$ENDIF} {$ENDIF};
 
   {**
    *  Get the SDL surface associated with the window.
@@ -929,7 +929,7 @@ function SDL_SetWindowFullscreen(window: PSDL_Window; flags: TSDL_WindowFlags):
    *}
 
 function SDL_GetWindowSurface(window: PSDL_Window): PSDL_Surface; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowSurface' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowSurface' {$ENDIF} {$ENDIF};
 
   {**
    *  Copy the window surface to the screen.
@@ -941,7 +941,7 @@ function SDL_GetWindowSurface(window: PSDL_Window): PSDL_Surface; cdecl;
    *}
 
 function SDL_UpdateWindowSurface(window: PSDL_Window): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_UpdateWindowSurface' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_UpdateWindowSurface' {$ENDIF} {$ENDIF};
 
   {**
    *  Copy a number of rectangles on the window surface to the screen.
@@ -953,7 +953,7 @@ function SDL_UpdateWindowSurface(window: PSDL_Window): cint; cdecl;
    *}
 
 function SDL_UpdateWindowSurfaceRects(window: PSDL_Window; rects: PSDL_Rect; numrects: cint): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_UpdateWindowSurfaceRects' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_UpdateWindowSurfaceRects' {$ENDIF} {$ENDIF};
 
   {**
    *  Set a window's input grab mode.
@@ -964,7 +964,7 @@ function SDL_UpdateWindowSurfaceRects(window: PSDL_Window; rects: PSDL_Rect; num
    *}
 
 procedure SDL_SetWindowGrab(window: PSDL_Window; grabbed: TSDL_Bool); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowGrab' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowGrab' {$ENDIF} {$ENDIF};
 
   {**
    *  Get a window's input grab mode.
@@ -975,7 +975,7 @@ procedure SDL_SetWindowGrab(window: PSDL_Window; grabbed: TSDL_Bool); cdecl;
    *}
 
 function SDL_GetWindowGrab(window: PSDL_Window): TSDL_Bool; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowGrab' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowGrab' {$ENDIF} {$ENDIF};
 
 {**
  * Set a window's keyboard grab mode.
@@ -1006,7 +1006,7 @@ function SDL_GetWindowGrab(window: PSDL_Window): TSDL_Bool; cdecl;
  * \sa SDL_SetWindowGrab
  *}
 procedure SDL_SetWindowKeyboardGrab(window: PSDL_Window; grabbed: TSDL_Bool); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowKeyboardGrab' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowKeyboardGrab' {$ENDIF} {$ENDIF};
 
   {**
    *  Get a window's keyboard grab mode.
@@ -1017,7 +1017,7 @@ procedure SDL_SetWindowKeyboardGrab(window: PSDL_Window; grabbed: TSDL_Bool); cd
    *}
 
 function SDL_GetWindowKeyboardGrab(window: PSDL_Window): TSDL_Bool; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowKeyboardGrab' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowKeyboardGrab' {$ENDIF} {$ENDIF};
 
   {**
    *  Set a window's mouse grab mode.
@@ -1029,7 +1029,7 @@ function SDL_GetWindowKeyboardGrab(window: PSDL_Window): TSDL_Bool; cdecl;
    *}
 
 procedure SDL_SetWindowMouseGrab(window: PSDL_Window; grabbed: TSDL_Bool); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowMouseGrab' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowMouseGrab' {$ENDIF} {$ENDIF};
 
   {**
    *  Get a window's mouse grab mode.
@@ -1040,7 +1040,7 @@ procedure SDL_SetWindowMouseGrab(window: PSDL_Window; grabbed: TSDL_Bool); cdecl
    *}
 
 function SDL_GetWindowMouseGrab(window: PSDL_Window): TSDL_Bool; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowMouseGrab' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowMouseGrab' {$ENDIF} {$ENDIF};
 
   {**
    *  Confines the cursor to the specified area of a window.
@@ -1052,7 +1052,7 @@ function SDL_GetWindowMouseGrab(window: PSDL_Window): TSDL_Bool; cdecl;
    *}
 
 procedure SDL_SetWindowMouseRect(window: PSDL_Window; rect: PSDL_Rect); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowMouseRect' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowMouseRect' {$ENDIF} {$ENDIF};
 
   {**
    *  Get the mouse confinement rectangle of a window.
@@ -1063,7 +1063,7 @@ procedure SDL_SetWindowMouseRect(window: PSDL_Window; rect: PSDL_Rect); cdecl;
    *}
 
 function SDL_GetWindowMouseRect(window: PSDL_Window): PSDL_Rect; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowMouseRect' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowMouseRect' {$ENDIF} {$ENDIF};
 
   {**
    *  \brief Get the window that currently has an input grab enabled.
@@ -1073,7 +1073,7 @@ function SDL_GetWindowMouseRect(window: PSDL_Window): PSDL_Rect; cdecl;
    *  \sa SDL_SetWindowGrab()
    *}
 function SDL_GetGrabbedWindow(): PSDL_Window; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetGrabbedWindow' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetGrabbedWindow' {$ENDIF} {$ENDIF};
 
   {**
    *  Set the brightness (gamma correction) for a window.
@@ -1085,7 +1085,7 @@ function SDL_GetGrabbedWindow(): PSDL_Window; cdecl;
    *}
 
 function SDL_SetWindowBrightness(window: PSDL_Window; brightness: cfloat): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowBrightness' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowBrightness' {$ENDIF} {$ENDIF};
 
   {**
    *  Get the brightness (gamma correction) for a window.
@@ -1096,7 +1096,7 @@ function SDL_SetWindowBrightness(window: PSDL_Window; brightness: cfloat): cint;
    *}
 
 function SDL_GetWindowBrightness(window: PSDL_Window): cfloat; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowBrightness' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowBrightness' {$ENDIF} {$ENDIF};
 
   {**
    *  \brief Set the opacity for a window
@@ -1110,7 +1110,7 @@ function SDL_GetWindowBrightness(window: PSDL_Window): cfloat; cdecl;
    *  \sa SDL_GetWindowOpacity()
    *}
 function SDL_SetWindowOpacity(window: PSDL_Window; opacity: cfloat): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowOpacity' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowOpacity' {$ENDIF} {$ENDIF};
 
   {**
    *  \brief Get the opacity of a window.
@@ -1126,7 +1126,7 @@ function SDL_SetWindowOpacity(window: PSDL_Window; opacity: cfloat): cint; cdecl
    *  \sa SDL_SetWindowOpacity()
    *}
 function SDL_GetWindowOpacity(window: PSDL_Window; out_opacity: pcfloat): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowOpacity' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowOpacity' {$ENDIF} {$ENDIF};
 
   {** 
    *  \brief Sets the window as a modal for another window
@@ -1137,7 +1137,7 @@ function SDL_GetWindowOpacity(window: PSDL_Window; out_opacity: pcfloat): cint;
    *  \return 0 on success, or -1 otherwise.
    *}
 function SDL_SetWindowModalFor(modal_window, parent_window: PSDL_Window): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowModalFor' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowModalFor' {$ENDIF} {$ENDIF};
 
   {**
    *  \brief Explicitly sets input focus to the window.
@@ -1152,7 +1152,7 @@ function SDL_SetWindowModalFor(modal_window, parent_window: PSDL_Window): cint;
    *  \sa SDL_RaiseWindow()
    *}
 function SDL_SetWindowInputFocus(window: PSDL_Window): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowInputFocus' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowInputFocus' {$ENDIF} {$ENDIF};
 
   {**
    *  Set the gamma ramp for a window.
@@ -1173,7 +1173,7 @@ function SDL_SetWindowInputFocus(window: PSDL_Window): cint; cdecl;
    *}
 
 function SDL_SetWindowGammaRamp(window: PSDL_Window; const red: pcuint16; const green: pcuint16; const blue: pcuint16): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowGammaRamp' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowGammaRamp' {$ENDIF} {$ENDIF};
 
   {**
    *  Get the gamma ramp for a window.
@@ -1191,7 +1191,7 @@ function SDL_SetWindowGammaRamp(window: PSDL_Window; const red: pcuint16; const
    *}
 
 function SDL_GetWindowGammaRamp(window: PSDL_Window; red: pcuint16; green: pcuint16; blue: pcuint16): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowGammaRamp' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetWindowGammaRamp' {$ENDIF} {$ENDIF};
 
 {**
  *  \brief Possible return values from the SDL_HitTest callback.
@@ -1263,7 +1263,7 @@ type
    *  \return 0 on success, -1 on error (including unsupported).
    *}
 function SDL_SetWindowHitTest(window: PSDL_Window; callback: TSDL_HitTest; callback_data: Pointer): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowHitTest' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_SetWindowHitTest' {$ENDIF} {$ENDIF};
 
   {**
    * Request a window to demand attention from the user.
@@ -1276,14 +1276,14 @@ function SDL_SetWindowHitTest(window: PSDL_Window; callback: TSDL_HitTest; callb
    * \since This function is available since SDL 2.0.16.
    *}
 function SDL_FlashWindow(window: PSDL_Window; operation: TSDL_FlashOperation): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_FlashWindow' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_FlashWindow' {$ENDIF} {$ENDIF};
 
   {**
    *  Destroy a window.
    *}
 
 procedure SDL_DestroyWindow(window: PSDL_Window); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_DestroyWindow' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_DestroyWindow' {$ENDIF} {$ENDIF};
 
   {**
    *  Returns whether the screensaver is currently enabled (default on).
@@ -1293,7 +1293,7 @@ procedure SDL_DestroyWindow(window: PSDL_Window); cdecl;
    *}
 
 function SDL_IsScreenSaverEnabled: TSDL_Bool; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_IsScreenSaverEnabled' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_IsScreenSaverEnabled' {$ENDIF} {$ENDIF};
 
   {**
    *  Allow the screen to be blanked by a screensaver
@@ -1303,7 +1303,7 @@ function SDL_IsScreenSaverEnabled: TSDL_Bool; cdecl;
    *}
 
 procedure SDL_EnableScreenSaver; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_EnableScreenSaver' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_EnableScreenSaver' {$ENDIF} {$ENDIF};
 
   {**
    *  Prevent the screen from being blanked by a screensaver
@@ -1313,7 +1313,7 @@ procedure SDL_EnableScreenSaver; cdecl;
    *}
 
 procedure SDL_DisableScreenSaver; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_DisableScreenSaver' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_DisableScreenSaver' {$ENDIF} {$ENDIF};
 
   {**
    *  OpenGL support functions
@@ -1339,14 +1339,14 @@ procedure SDL_DisableScreenSaver; cdecl;
    *}
 
 function SDL_GL_LoadLibrary(const path: PAnsiChar): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GL_LoadLibrary' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GL_LoadLibrary' {$ENDIF} {$ENDIF};
 
   {**
    *  Get the address of an OpenGL function.
    *}
 
 function SDL_GL_GetProcAddress(const proc: PAnsiChar): Pointer; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GL_GetProcAddress' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GL_GetProcAddress' {$ENDIF} {$ENDIF};
 
   {**
    *  Unload the OpenGL library previously loaded by SDL_GL_LoadLibrary().
@@ -1355,7 +1355,7 @@ function SDL_GL_GetProcAddress(const proc: PAnsiChar): Pointer; cdecl;
    *}
 
 procedure SDL_GL_UnloadLibrary; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GL_UnloadLibrary' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GL_UnloadLibrary' {$ENDIF} {$ENDIF};
 
   {**
    *  Return true if an OpenGL extension is supported for the current
@@ -1363,27 +1363,27 @@ procedure SDL_GL_UnloadLibrary; cdecl;
    *}
 
 function SDL_GL_ExtensionSupported(const extension: PAnsiChar): TSDL_Bool; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GL_ExtensionSupported' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GL_ExtensionSupported' {$ENDIF} {$ENDIF};
 
   {**
    *  Reset all previously set OpenGL context attributes to their default values
    *}
 procedure SDL_GL_ResetAttributes(); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GL_ResetAttributes' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GL_ResetAttributes' {$ENDIF} {$ENDIF};
 
   {**
    *  Set an OpenGL window attribute before window creation.
    *}
 
 function SDL_GL_SetAttribute(attr: TSDL_GLattr; value: cint): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GL_SetAttribute' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GL_SetAttribute' {$ENDIF} {$ENDIF};
 
   {**
    *  Get the actual value for an attribute from the current context.
    *}
 
 function SDL_GL_GetAttribute(attr: TSDL_GLattr; value: pcint): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GL_GetAttribute' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GL_GetAttribute' {$ENDIF} {$ENDIF};
 
   {**
    *  Create an OpenGL context for use with an OpenGL window, and make it
@@ -1393,7 +1393,7 @@ function SDL_GL_GetAttribute(attr: TSDL_GLattr; value: pcint): cint; cdecl;
    *}
 
 function SDL_GL_CreateContext(window: PSDL_Window): TSDL_GLContext; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GL_CreateContext' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GL_CreateContext' {$ENDIF} {$ENDIF};
 
   {**
    *  Set up an OpenGL context for rendering into an OpenGL window.
@@ -1402,19 +1402,19 @@ function SDL_GL_CreateContext(window: PSDL_Window): TSDL_GLContext; cdecl;
    *}
 
 function SDL_GL_MakeCurrent(window: PSDL_Window; context: TSDL_GLContext): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GL_MakeCurrent' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GL_MakeCurrent' {$ENDIF} {$ENDIF};
 
   {**
    *  Get the currently active OpenGL window.
    *}
 function SDL_GL_GetCurrentWindow: PSDL_Window; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GL_GetCurrentWindow' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GL_GetCurrentWindow' {$ENDIF} {$ENDIF};
 
   {**
    *  Get the currently active OpenGL context.
    *}
 function SDL_GL_GetCurrentContext: TSDL_GLContext; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GL_GetCurrentContext' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GL_GetCurrentContext' {$ENDIF} {$ENDIF};
 
   {**
    *  Get the size of a window's underlying drawable in pixels (for use
@@ -1434,7 +1434,7 @@ function SDL_GL_GetCurrentContext: TSDL_GLContext; cdecl;
    *}
    
 procedure SDL_GL_GetDrawableSize(window: PSDL_Window; w: pcint; h: pcint); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GL_GetDrawableSize' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GL_GetDrawableSize' {$ENDIF} {$ENDIF};
 
   {**
    *  Set the swap interval for the current OpenGL context.
@@ -1450,7 +1450,7 @@ procedure SDL_GL_GetDrawableSize(window: PSDL_Window; w: pcint; h: pcint); cdecl
    *}
 
 function SDL_GL_SetSwapInterval(interval: cint): cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GL_SetSwapInterval' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GL_SetSwapInterval' {$ENDIF} {$ENDIF};
 
   {**
    *  Get the swap interval for the current OpenGL context.
@@ -1465,7 +1465,7 @@ function SDL_GL_SetSwapInterval(interval: cint): cint; cdecl;
    *}
 
 function SDL_GL_GetSwapInterval: cint; cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GL_GetSwapInterval' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GL_GetSwapInterval' {$ENDIF} {$ENDIF};
 
   {**
    *  Swap the OpenGL buffers for a window, if double-buffering is
@@ -1473,7 +1473,7 @@ function SDL_GL_GetSwapInterval: cint; cdecl;
    *}
 
 procedure SDL_GL_SwapWindow(window: PSDL_Window); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GL_SwapWindow' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GL_SwapWindow' {$ENDIF} {$ENDIF};
 
   {**
    *  Delete an OpenGL context.
@@ -1482,6 +1482,6 @@ procedure SDL_GL_SwapWindow(window: PSDL_Window); cdecl;
    *}
 
 procedure SDL_GL_DeleteContext(context: TSDL_GLContext); cdecl;
-  external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GL_DeleteContext' {$ENDIF} {$ENDIF};
+  external {$IFDEF DYNAMIC_LINK}SDL_LibName{$ENDIF} {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GL_DeleteContext' {$ENDIF} {$ENDIF};
 
   {*OpenGL support functions*}