aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/config.inc.in
blob: eaa37de7a85fca62e0aaa62217906008714488df (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
// Configuration include file for @PACKAGE_NAME@ @PACKAGE_VERSION@
// @PACKAGE_BUGREPORT@

// Note on version comparison:
// -------------------------------------------------------------------
// Delphi (in contrast to FPC) DOESN'T support MACROS. So we
// can't define a macro like VERSION_MAJOR(version) to extract
// parts of the version-number or to create version numbers for
// comparison purposes as with a MAKE_VERSION(maj, min, rev) macro.
// So we have to define constants for every part of the version here.
//
// In addition FPC (in contrast to delphi) DOESN'T support floating-
// point numbers in $IF compiler-directives (e.g. {$IF VERSION > 1.23})
// It also DOESN'T support arithmetic operations so we aren't able to
// compare versions this way (brackets aren't supported too):
//   {$IF VERSION > ((VER_MAJ*2)+(VER_MIN*23)+(VER_REL*1))}
//
// Hence we have to use fixed numbers in the directives. At least
// Pascal allows leading 0s so 0005 equals 5 (octals are
// preceded by & and not by 0 in FPC).
// We also fix the count of digits for each part of the version number
// to 3 (aaaiiirrr with aaa=major, iii=minor, rrr=release version)
//
// A check for a library with at least a version of 2.5.11 would look
// like this:
//   {$IF LIB_VERSION >= 002005011}
//
// If you just need to check the major version to this:
//   {$IF LIB_VERSION_MAJOR >= 23}
//
// PLEASE consider this if you use version numbers in $IF compiler-
// directives. Otherwise you might break portability.
// -------------------------------------------------------------------
   
{$@DEFINE_DEBUG@ DEBUG}

const 
  VERSION_MAJOR   = 1000000;
  VERSION_MINOR   = 1000;
  VERSION_RELEASE = 1;

  FPC_VERSION_MAJOR   = @FPC_VERSION_MAJOR@;
  FPC_VERSION_MINOR   = @FPC_VERSION_MINOR@;
  FPC_VERSION_RELEASE = @FPC_VERSION_RELEASE@;
  FPC_VERSION = (FPC_VERSION_MAJOR * VERSION_MAJOR) +
                (FPC_VERSION_MINOR * VERSION_MINOR) +
                (FPC_VERSION_RELEASE * VERSION_RELEASE);

  LAZARUS_VERSION_MAJOR   = @LAZARUS_VERSION_MAJOR@;
  LAZARUS_VERSION_MINOR   = @LAZARUS_VERSION_MINOR@;
  LAZARUS_VERSION_RELEASE = @LAZARUS_VERSION_RELEASE@;
  LAZARUS_VERSION = (LAZARUS_VERSION_MAJOR * VERSION_MAJOR) +
                    (LAZARUS_VERSION_MINOR * VERSION_MINOR) +
                    (LAZARUS_VERSION_RELEASE * VERSION_RELEASE);

  {$@DEFINE_HAVE_FFMPEG@ HaveFFMpeg}
  {$IFDEF HaveFFMpeg}

  av__codec = '@AVCODEC_LIB@';
  LIBAVCODEC_VERSION_MAJOR   = @AVCODEC_VERSION_MAJOR@;
  LIBAVCODEC_VERSION_MINOR   = @AVCODEC_VERSION_MINOR@;
  LIBAVCODEC_VERSION_RELEASE = @AVCODEC_VERSION_RELEASE@;
  LIBAVCODEC_VERSION = (LIBAVCODEC_VERSION_MAJOR * VERSION_MAJOR) +
                       (LIBAVCODEC_VERSION_MINOR * VERSION_MINOR) +
                       (LIBAVCODEC_VERSION_RELEASE * VERSION_RELEASE);

  av__format = '@AVFORMAT_LIB@';
  LIBAVFORMAT_VERSION_MAJOR   = @AVFORMAT_VERSION_MAJOR@;
  LIBAVFORMAT_VERSION_MINOR   = @AVFORMAT_VERSION_MINOR@;
  LIBAVFORMAT_VERSION_RELEASE = @AVFORMAT_VERSION_RELEASE@;
  LIBAVFORMAT_VERSION = (LIBAVFORMAT_VERSION_MAJOR * VERSION_MAJOR) +
                        (LIBAVFORMAT_VERSION_MINOR * VERSION_MINOR) +
                        (LIBAVFORMAT_VERSION_RELEASE * VERSION_RELEASE);

  av__util = '@AVUTIL_LIB@';
  LIBAVUTIL_VERSION_MAJOR   = @AVUTIL_VERSION_MAJOR@;
  LIBAVUTIL_VERSION_MINOR   = @AVUTIL_VERSION_MINOR@;
  LIBAVUTIL_VERSION_RELEASE = @AVUTIL_VERSION_RELEASE@;
  LIBAVUTIL_VERSION = (LIBAVUTIL_VERSION_MAJOR * VERSION_MAJOR) +
                      (LIBAVUTIL_VERSION_MINOR * VERSION_MINOR) +
                      (LIBAVUTIL_VERSION_RELEASE * VERSION_RELEASE);

  {$ENDIF}

  {$@DEFINE_HAVE_SWSCALE@ HaveSWScale}
  {$IFDEF HaveSWScale}
  sw__scale = '@SWSCALE_LIB@';
  LIBSWSCALE_VERSION_MAJOR   = @SWSCALE_VERSION_MAJOR@;
  LIBSWSCALE_VERSION_MINOR   = @SWSCALE_VERSION_MINOR@;
  LIBSWSCALE_VERSION_RELEASE = @SWSCALE_VERSION_RELEASE@;
  LIBSWSCALE_VERSION = (LIBSWSCALE_VERSION_MAJOR * VERSION_MAJOR) +
                       (LIBSWSCALE_VERSION_MINOR * VERSION_MINOR) +
                       (LIBSWSCALE_VERSION_RELEASE * VERSION_RELEASE);
  {$ENDIF}
		      
  {$@DEFINE_HAVE_PROJECTM@ HaveProjectM}
  {$IFDEF HaveProjectM}  
  libprojectM = '@PROJECTM_LIB@';
  PROJECTM_VERSION_MAJOR   = @PROJECTM_VERSION_MAJOR@;
  PROJECTM_VERSION_MINOR   = @PROJECTM_VERSION_MINOR@;
  PROJECTM_VERSION_RELEASE = @PROJECTM_VERSION_RELEASE@;
  PROJECTM_VERSION = (PROJECTM_VERSION_MAJOR * VERSION_MAJOR) +
                     (PROJECTM_VERSION_MINOR * VERSION_MINOR) +
                     (PROJECTM_VERSION_RELEASE * VERSION_RELEASE);
  {$ENDIF}

  {$@DEFINE_HAVE_PORTAUDIO@ HavePortaudio}
  {$IFDEF HavePortaudio}  
  libportaudio = '@PORTAUDIO_LIB@';
  PORTAUDIO_VERSION_MAJOR   = @PORTAUDIO_VERSION_MAJOR@;
  PORTAUDIO_VERSION_MINOR   = @PORTAUDIO_VERSION_MINOR@;
  PORTAUDIO_VERSION_RELEASE = @PORTAUDIO_VERSION_RELEASE@;
  PORTAUDIO_VERSION = (PORTAUDIO_VERSION_MAJOR * VERSION_MAJOR) +
                      (PORTAUDIO_VERSION_MINOR * VERSION_MINOR) +
                      (PORTAUDIO_VERSION_RELEASE * VERSION_RELEASE);
  {$ENDIF}

  {$@DEFINE_HAVE_PORTMIXER@ HavePortmixer}
  {$IFDEF HavePortmixer}  
  libportmixer = '@PORTMIXER_LIB@';
  PORTMIXER_VERSION_MAJOR   = @PORTMIXER_VERSION_MAJOR@;
  PORTMIXER_VERSION_MINOR   = @PORTMIXER_VERSION_MINOR@;
  PORTMIXER_VERSION_RELEASE = @PORTMIXER_VERSION_RELEASE@;
  PORTMIXER_VERSION = (PORTMIXER_VERSION_MAJOR * VERSION_MAJOR) +
                      (PORTMIXER_VERSION_MINOR * VERSION_MINOR) +
                      (PORTMIXER_VERSION_RELEASE * VERSION_RELEASE);
  {$ENDIF}