Changeset 11
- Timestamp:
- May 20, 2009, 10:17:54 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/configure.cmd
r9 r11 19 19 20 20 21 /* globals 22 ******************************************************************************/ 21 /*------------------------------------------------------------------------------ 22 globals 23 ------------------------------------------------------------------------------*/ 23 24 24 25 G.TAB = '09'x … … 29 30 30 31 32 /* initialize global variables */ 33 G.QMAKE_SWITCHES = "" 34 G.QMAKE_VARS = "" 35 G.QMAKE_CONFIG = "" 36 G.QTCONFIG_CONFIG = "" 37 G.QT_CONFIG = "" 38 G.SUPPORTED = "" 31 39 G.QMAKE_VARS_FILE = ".qmake.vars" 40 41 G.CFG_DEV = "no" 32 42 33 43 /* Qt for OS/2 is always the open source edition */ … … 40 50 G.PLATFORM = "os2-g++" 41 51 52 42 53 /* all globals to be exposed in procedures */ 43 54 Globals = 'G. Opt. Static.' 44 55 45 56 46 /* init rexx lib 47 ******************************************************************************/ 48 57 /*------------------------------------------------------------------------------ 58 startup + main + termination 59 ------------------------------------------------------------------------------*/ 60 61 /* init system REXX library */ 49 62 if (RxFuncQuery('SysLoadFuncs')) then do 50 63 call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs' … … 52 65 end 53 66 54 55 /* startup + main + termination 56 ******************************************************************************/ 57 58 parse value SysTextScreenSize() with G.!ScreenHeight G.!ScreenWidth 59 if (G.!ScreenHeight < 25 | G.!ScreenWidth < 80) then do 67 /* detect script file and directory */ 68 parse source . . G.ScriptFile 69 G.ScriptDir = FixDir(filespec('D', G.ScriptFile) || filespec('P', G.ScriptFile)) 70 71 /* check text screen resolution */ 72 parse value SysTextScreenSize() with G.ScreenHeight G.ScreenWidth 73 if (G.ScreenHeight < 25 | G.ScreenWidth < 80) then do 60 74 address 'cmd' 'mode co80,25' 61 parse value SysTextScreenSize() with G. !ScreenHeight G.!ScreenWidth62 if (G. !ScreenHeight < 25 | G.!ScreenWidth < 80) then do75 parse value SysTextScreenSize() with G.ScreenHeight G.ScreenWidth 76 if (G.ScreenHeight < 25 | G.ScreenWidth < 80) then do 63 77 call SayErr 'WARNING: Cannot set screen size to 80 x 25!' 64 78 call SayErr 'Some messages can be unreadable.' … … 76 90 77 91 78 /* functions 79 ******************************************************************************/ 92 /*------------------------------------------------------------------------------ 93 functions 94 ------------------------------------------------------------------------------*/ 80 95 81 96 /** … … 83 98 */ 84 99 Main: procedure expose (Globals) 100 101 /* the directory of this script is the "source tree */ 102 G.RelPath = G.ScriptDir 85 103 86 104 /* reset the vars file */ … … 95 113 QMakeVar add mouse-drivers "pc linuxtp" 96 114 */ 115 116 /* QTDIR may be set and point to an old or system-wide Qt installation */ 117 call UnsetEnv "QTDIR" 118 119 /* initalize internal variables */ 120 G.CFG_CONFIGURE_EXIT_ON_ERROR = "yes" 121 G.CFG_PROFILE = "no" 122 G.CFG_EXCEPTIONS = "unspecified" 123 G.CFG_SCRIPTTOOLS = "auto" /* (yes|no|auto) */ 124 G.CFG_XMLPATTERNS = "auto" /* (yes|no|auto) */ 125 G.CFG_INCREMENTAL = "auto" 126 G.CFG_QCONFIG = "full" 127 G.CFG_DEBUG = "auto" 128 G.CFG_MYSQL_CONFIG = "" 129 G.CFG_DEBUG_RELEASE = "no" 130 G.CFG_SHARED = "yes" 131 G.CFG_SM = "auto" 132 /* @todo 133 G.CFG_XSHAPE = "auto" 134 G.CFG_XINERAMA = "runtime" 135 G.CFG_XFIXES = "runtime" 136 */ 137 G.CFG_ZLIB = "auto" 138 G.CFG_SQLITE = "qt" 139 G.CFG_GIF = "auto" 140 G.CFG_TIFF = "auto" 141 G.CFG_LIBTIFF = "auto" 142 G.CFG_PNG = "yes" 143 G.CFG_LIBPNG = "auto" 144 G.CFG_JPEG = "auto" 145 G.CFG_LIBJPEG = "auto" 146 G.CFG_MNG = "auto" 147 G.CFG_LIBMNG = "auto" 148 /* @todo 149 G.CFG_XCURSOR = "runtime" 150 G.CFG_XRANDR = "runtime" 151 G.CFG_XRENDER = "auto" 152 G.CFG_MITSHM = "auto" 153 */ 154 G.CFG_OPENGL = "auto" 155 G.CFG_SSE = "auto" 156 G.CFG_FONTCONFIG = "auto" 157 G.CFG_QWS_FREETYPE = "auto" 158 G.CFG_LIBFREETYPE = "auto" 159 G.CFG_SQL_AVAILABLE = "" 160 G.QT_DEFAULT_BUILD_PARTS = "libs tools examples demos docs translations" 161 G.CFG_BUILD_PARTS = "" 162 G.CFG_NOBUILD_PARTS = "" 163 G.CFG_RELEASE_QMAKE = "no" 164 G.CFG_PHONON = "auto" 165 G.CFG_PHONON_BACKEND = "yes" 166 G.CFG_SVG = "yes" 167 G.CFG_WEBKIT = "auto" /* (yes|no|auto) */ 168 169 /* @todo 170 CFG_GFX_AVAILABLE="linuxfb transformed qvfb vnc multiscreen" 171 CFG_GFX_ON="linuxfb multiscreen" 172 CFG_GFX_PLUGIN_AVAILABLE= 173 CFG_GFX_PLUGIN= 174 CFG_GFX_OFF= 175 CFG_KBD_AVAILABLE="tty usb sl5000 yopy vr41xx qvfb" 176 CFG_KBD_ON="tty" #default, see QMakeVar above 177 CFG_MOUSE_AVAILABLE="pc bus linuxtp yopy vr41xx tslib qvfb" 178 CFG_MOUSE_ON="pc linuxtp" #default, see QMakeVar above 179 */ 180 181 G.CFG_ARCH = "" 182 G.CFG_HOST_ARCH = "" 183 G.CFG_KBD_PLUGIN_AVAILABLE = "" 184 G.CFG_KBD_PLUGIN = "" 185 G.CFG_KBD_OFF = "" 186 G.CFG_MOUSE_PLUGIN_AVAILABLE = "" 187 G.CFG_MOUSE_PLUGIN = "" 188 G.CFG_MOUSE_OFF = "" 189 G.CFG_USE_GNUMAKE = "no" 190 G.CFG_IM = "yes" 191 CFG_DECORATION_AVAILABLE = "styled windows default" 192 CFG_DECORATION_ON = "${CFG_DECORATION_AVAILABLE}" /* all on by default */ 193 G.CFG_DECORATION_PLUGIN_AVAILABLE = "" 194 G.CFG_DECORATION_PLUGIN = "" 195 G.CFG_XINPUT = "runtime" 196 G.CFG_XKB = "auto" 197 G.CFG_NIS = "auto" 198 G.CFG_CUPS = "auto" 199 G.CFG_ICONV = "auto" 200 G.CFG_DBUS = "auto" 201 G.CFG_GLIB = "auto" 202 G.CFG_GSTREAMER = "auto" 203 G.CFG_QGTKSTYLE = "auto" 204 G.CFG_LARGEFILE = "auto" 205 G.CFG_OPENSSL = "auto" 206 G.CFG_PTMALLOC = "no" 207 G.CFG_STL = "auto" 208 G.CFG_PRECOMPILE = "auto" 209 G.CFG_SEPARATE_DEBUG_INFO = "auto" 210 G.CFG_REDUCE_EXPORTS = "auto" 211 G.CFG_MMX = "auto" 212 G.CFG_3DNOW = "auto" 213 G.CFG_SSE = "auto" 214 G.CFG_SSE2 = "auto" 215 G.CFG_REDUCE_RELOCATIONS = "no" 216 G.CFG_IPV6 = "auto" 217 G.CFG_NAS = "no" 218 G.CFG_QWS_DEPTHS = "all" 219 G.CFG_USER_BUILD_KEY = "" 220 G.CFG_ACCESSIBILITY = "auto" 221 G.CFG_QT3SUPPORT = "yes" 222 G.CFG_ENDIAN = "auto" 223 G.CFG_HOST_ENDIAN = "auto" 224 G.CFG_DOUBLEFORMAT = "auto" 225 G.CFG_ARMFPA = "auto" 226 G.CFG_IWMMXT = "no" 227 G.CFG_CLOCK_GETTIME = "auto" 228 G.CFG_CLOCK_MONOTONIC = "auto" 229 G.CFG_MREMAP = "auto" 230 G.CFG_GETADDRINFO = "auto" 231 G.CFG_IPV6IFNAME = "auto" 232 G.CFG_GETIFADDRS = "auto" 233 G.CFG_INOTIFY = "auto" 234 G.CFG_RPATH = "yes" 235 G.CFG_FRAMEWORK = "auto" 236 G.CFG_MAC_ARCHS = "" 237 G.CFG_MAC_DWARF2 = "auto" 238 G.CFG_MAC_XARCH = "auto" 239 G.CFG_MAC_CARBON = "yes" 240 G.CFG_MAC_COCOA = "auto" 241 G.COMMANDLINE_MAC_COCOA = "no" 242 G.CFG_SXE = "no" 243 G.CFG_PREFIX_INSTALL = "yes" 244 G.CFG_SDK = "" 245 G.D_FLAGS = "" 246 G.I_FLAGS = "" 247 G.L_FLAGS = "" 248 G.RPATH_FLAGS = "" 249 l_FLAGS = "" 250 G.QCONFIG_FLAGS = "" 251 G.XPLATFORM = "" /* This seems to be the QMAKESPEC, like "linux-g++" */ 252 G.PLATFORM = GetEnv("QMAKESPEC") 253 G.QT_CROSS_COMPILE = "no" 254 G.OPT_CONFIRM_LICENSE = "no" 255 G.OPT_SHADOW = "maybe" 256 G.OPT_FAST = "auto" 257 G.OPT_VERBOSE = "no" 258 G.OPT_HELP = "" 259 G.CFG_SILENT = "no" 260 G.CFG_GRAPHICS_SYSTEM = "default" 261 262 /* initalize variables used for installation */ 263 G.QT_INSTALL_PREFIX = "" 264 G.QT_INSTALL_DOCS = "" 265 G.QT_INSTALL_HEADERS = "" 266 G.QT_INSTALL_LIBS = "" 267 G.QT_INSTALL_BINS = "" 268 G.QT_INSTALL_PLUGINS = "" 269 G.QT_INSTALL_DATA = "" 270 G.QT_INSTALL_TRANSLATIONS = "" 271 G.QT_INSTALL_SETTINGS = "" 272 G.QT_INSTALL_EXAMPLES = "" 273 G.QT_INSTALL_DEMOS = "" 274 G.QT_HOST_PREFIX = "" 275 276 /* flags for SQL drivers */ 277 G.QT_CFLAGS_PSQL = "" 278 G.QT_LFLAGS_PSQL = "" 279 G.QT_CFLAGS_MYSQL = "" 280 G.QT_LFLAGS_MYSQL = "" 281 G.QT_LFLAGS_MYSQL_R = "" 282 G.QT_CFLAGS_SQLITE = "" 283 G.QT_LFLAGS_SQLITE = "" 284 285 /* check SQL drivers, mouse drivers and decorations available in 286 * this package */ 287 288 /* opensource version removes some drivers, so force them to be off */ 289 G.CFG_SQL_tds = "no" 290 G.CFG_SQL_oci = "no" 291 G.CFG_SQL_db2 = "no" 292 293 G.CFG_SQL_AVAILABLE = "" 294 if (DirExists(G.RelPath"\src\plugins\sqldrivers")) then do 295 call SysFileTree G.RelPath"\src\plugins\sqldrivers\*", "found", "DO" 296 do i = 1 to found.0 297 base = filespec('N', found.i) 298 if (left(base, 1) == '.') then iterate 299 G.CFG_SQL_AVAILABLE = Join(G.CFG_SQL_AVAILABLE, base) 300 call value "G.CFG_SQL_"base, "auto" 301 end 302 end 303 304 G.CFG_DECORATION_PLUGIN_AVAILABLE = "" 305 if (DirExists(G.RelPath"\src\plugins\decorations")) then do 306 call SysFileTree G.RelPath"\src\plugins\decorations\*", "found", "DO" 307 do i = 1 to found.0 308 base = filespec('N', found.i) 309 if (left(base, 1) == '.') then iterate 310 G.CFG_DECORATION_PLUGIN_AVAILABLE = Join(G.CFG_DECORATION_PLUGIN_AVAILABLE, base) 311 end 312 end 313 314 G.CFG_KBD_PLUGIN_AVAILABLE = "" 315 if (DirExists(G.RelPath"\src\plugins\kbddrivers")) then do 316 call SysFileTree G.RelPath"\src\plugins\kbddrivers\*", "found", "DO" 317 do i = 1 to found.0 318 base = filespec('N', found.i) 319 if (left(base, 1) == '.') then iterate 320 G.CFG_KBD_PLUGIN_AVAILABLE = Join(G.CFG_KBD_PLUGIN_AVAILABLE, base) 321 end 322 end 323 324 G.CFG_MOUSE_PLUGIN_AVAILABLE = "" 325 if (DirExists(G.RelPath"\src\plugins\mousedrivers")) then do 326 call SysFileTree G.RelPath"\src\plugins\mousedrivers\*", "found", "DO" 327 do i = 1 to found.0 328 base = filespec('N', found.i) 329 if (left(base, 1) == '.') then iterate 330 G.CFG_MOUSE_PLUGIN_AVAILABLE = Join(G.CFG_MOUSE_PLUGIN_AVAILABLE, base) 331 end 332 end 333 334 G.CFG_GFX_PLUGIN_AVAILABLE = "" 335 if (DirExists(G.RelPath"\src\plugins\gfxdrivers")) then do 336 call SysFileTree G.RelPath"\src\plugins\gfxdrivers\*", "found", "DO" 337 do i = 1 to found.0 338 base = filespec('N', found.i) 339 if (left(base, 1) == '.') then iterate 340 G.CFG_GFX_PLUGIN_AVAILABLE = Join(G.CFG_GFX_PLUGIN_AVAILABLE, base) 341 end 342 G.CFG_GFX_OFF = G.CFG_GFX_AVAILABLE /* assume all off */ 343 end 344 345 /* parse command line arguments 346 --------------------------------------------------------------------------*/ 347 348 /* @todo */ 349 350 if (G.CFG_QCONFIG \== "full" & G.CFG_QT3SUPPORT == "yes") then do 351 call SaySay "Warning: '-qconfig "G.CFG_QCONFIG"' will disable the qt3support library." 352 G.CFG_QT3SUPPORT = "no" 353 end 354 355 /* update QT_CONFIG to show our current predefined configuration */ 356 w = wordpos(G.CFG_QCONFIG, "minimal small medium large full") 357 if (w > 0) then do 358 /* these are a sequence of increasing functionality */ 359 do i = 1 to w 360 G.QT_CONFIG = Join(G.QT_CONFIG, w"-config") 361 end 362 end 363 else do 364 /* not known to be sufficient for anything */ 365 fn = G.RelPath"\src\corelib\global\qconfig-"G.CFG_QCONFIG".h" 366 if (\FileExists(fn)) then do 367 call SayErr "Error: configuration file not found:" 368 call SayErr " "fn 369 G.OPT_HELP = "yes" 370 end 371 end 372 373 /* skip this if the user just needs help... */ 374 if (G.OPT_HELP \== "yes") then do 375 376 /* detect build style */ 377 if (G.CFG_DEBUG == "auto") then do 378 if (G.CFG_DEV == "yes") then do 379 G.CFG_DEBUG_RELEASE = "no" 380 G.CFG_DEBUG = "yes" 381 end 382 else do 383 G.CFG_DEBUG_RELEASE = "no" 384 G.CFG_DEBUG = "no" 385 end 386 end 387 if (G.CFG_DEBUG_RELEASE == "yes") then 388 G.QMAKE_CONFIG = Join(G.QMAKE_CONFIG, "build_all") 389 390 if (G.CFG_SILENT == "yes") then 391 G.QMAKE_CONFIG = Join(G.QMAKE_CONFIG, "silent") 392 393 if (G.OPT_FAST == "auto") then 394 if (G.CFG_DEV == "yes") then G.OPT_FAST = "yes" 395 else G.OPT_FAST = "no" 396 397 /* find a make command */ 398 G.MAKE = GetEnv("MAKE") 399 if (G.MAKE == "") then do 400 G.MAKE = SysSearchPath('PATH', 'make.exe') 401 if (G.MAKE == "") then do 402 call SayErr "You don't seem to have 'make.exe' in your PATH." 403 call SayErr "Cannot proceed." 404 call Done 1 405 end 406 end 407 408 end 409 410 /* # auto-detect all that hasn't been specified in the arguments 411 --------------------------------------------------------------------------*/ 412 97 413 signal Nonsense 98 414 return … … 113 429 when aMode == "add" then eq = "+=" 114 430 when aMode == "del" then eq = "-=" 115 otherwise signal Nonsen ce431 otherwise signal Nonsense 116 432 end 117 433 … … 120 436 return 121 437 122 123 /*utility functions124 ******************************************************************************/438 /*------------------------------------------------------------------------------ 439 utility functions 440 ------------------------------------------------------------------------------*/ 125 441 126 442 CompareFileToVar: procedure expose (Globals) … … 171 487 parse arg str, noeol 172 488 noeol = (noeol == 1) 173 if (noeol) then call charout, ' 'str174 else say ' 'str489 if (noeol) then call charout, str 490 else say str 175 491 return 176 492 … … 219 535 call SysCurPos row, col 220 536 return 537 538 /** 539 * Joins the supplied argulents with one space character. Empty arguments are 540 * skipped. 541 * 542 * @param ... String arguments to join. 543 * @return Resulting string. 544 */ 545 Join: procedure expose (Globals) 546 547 result = "" 548 do i = 1 to arg() 549 if (length(arg(i)) > 0) then do 550 if (length(result) > 0) then 551 result = result' 'arg(i) 552 else 553 result = arg(i) 554 end 555 end 556 557 return result 221 558 222 559 /** … … 795 1132 796 1133 /** 1134 * Gets the OS/2 environment variable. 1135 * 1136 * @param aName Variable name. 1137 * @return Variable value. 1138 */ 1139 GetEnv: procedure expose (Globals) 1140 1141 parse arg aName 1142 1143 extLibPath = (translate(aName) == 'BEGINLIBPATH' | translate(aName) == 'ENDLIBPATH') 1144 if (extLibPath) then val = SysQueryExtLibPath(left(aName, 1)) 1145 else val = value(aName,, 'OS2ENVIRONMENT') 1146 1147 return val 1148 1149 /** 1150 * Sets the OS/2 environment variable. 1151 * 1152 * @param aName Variable name. 1153 * @param aValue Variable Value. 1154 */ 1155 SetEnv: procedure expose (Globals) 1156 1157 parse arg aName, aValue 1158 1159 extLibPath = (translate(aName) == 'BEGINLIBPATH' | translate(aName) == 'ENDLIBPATH') 1160 if (extLibPath) then call SysSetExtLibPath aValue, left(aName, 1) 1161 else call value aName, aValue, 'OS2ENVIRONMENT' 1162 1163 return 1164 1165 /** 1166 * Unsets the OS/2 environment variable. 1167 * 1168 * @param aName Variable name. 1169 * @param aValue Variable Value. 1170 */ 1171 UnsetEnv: procedure expose (Globals) 1172 1173 parse arg aName 1174 1175 extLibPath = (translate(aName) == 'BEGINLIBPATH' | translate(aName) == 'ENDLIBPATH') 1176 if (extLibPath) then call SysSetExtLibPath "", left(aName, 1) 1177 else call value aName, "", 'OS2ENVIRONMENT' 1178 1179 return 1180 1181 /** 797 1182 * Adds the given path to the contents of the given variable 798 1183 * containing a list of paths separated by semicolons.
Note:
See TracChangeset
for help on using the changeset viewer.