Changeset 45
- Timestamp:
- Jun 23, 2009, 1:21:18 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/configure.cmd
r30 r45 37 37 G.QT_CONFIG = "" 38 38 G.SUPPORTED = "" 39 40 G.QMAKE_OUTDIR = "" 39 41 G.QMAKE_VARS_FILE = ".qmake.vars" 40 42 … … 168 170 G.CFG_SVG = "yes" 169 171 G.CFG_WEBKIT = "auto" /* (yes|no|auto) */ 170 171 172 /* @todo 172 173 CFG_GFX_AVAILABLE="linuxfb transformed qvfb vnc multiscreen" … … 180 181 CFG_MOUSE_ON="pc linuxtp" #default, see QMakeVar above 181 182 */ 182 183 183 G.CFG_ARCH = "" 184 184 G.CFG_HOST_ARCH = "" … … 195 195 G.CFG_DECORATION_PLUGIN_AVAILABLE = "" 196 196 G.CFG_DECORATION_PLUGIN = "" 197 /* @todo do we really need this? 197 198 G.CFG_XINPUT = "runtime" 198 199 G.CFG_XKB = "auto" … … 200 201 G.CFG_CUPS = "auto" 201 202 G.CFG_ICONV = "auto" 202 G.CFG_DBUS = "auto"203 203 G.CFG_GLIB = "auto" 204 204 G.CFG_GSTREAMER = "auto" 205 G.CFG_DBUS = "auto" 206 G.CFG_NAS = "no" 207 G.CFG_OPENSSL = "auto" 208 */ 205 209 G.CFG_QGTKSTYLE = "auto" 206 210 G.CFG_LARGEFILE = "auto" 207 G.CFG_OPENSSL = "auto"208 211 G.CFG_PTMALLOC = "no" 209 212 G.CFG_STL = "auto" … … 211 214 G.CFG_SEPARATE_DEBUG_INFO = "auto" 212 215 G.CFG_REDUCE_EXPORTS = "auto" 216 G.CFG_REDUCE_RELOCATIONS = "no" 217 /* @todo do we really need this? 213 218 G.CFG_MMX = "auto" 214 219 G.CFG_3DNOW = "auto" 215 220 G.CFG_SSE = "auto" 216 221 G.CFG_SSE2 = "auto" 217 G.CFG_ REDUCE_RELOCATIONS= "no"222 G.CFG_IWMMXT = "no" 218 223 G.CFG_IPV6 = "auto" 219 G.CFG_NAS = "no"220 G.CFG_QWS_DEPTHS = "all"221 G.CFG_USER_BUILD_KEY = ""222 G.CFG_ACCESSIBILITY = "auto"223 G.CFG_QT3SUPPORT = "yes"224 G.CFG_ENDIAN = "auto"225 G.CFG_HOST_ENDIAN = "auto"226 G.CFG_DOUBLEFORMAT = "auto"227 G.CFG_ARMFPA = "auto"228 G.CFG_IWMMXT = "no"229 224 G.CFG_CLOCK_GETTIME = "auto" 230 225 G.CFG_CLOCK_MONOTONIC = "auto" … … 234 229 G.CFG_GETIFADDRS = "auto" 235 230 G.CFG_INOTIFY = "auto" 236 G.CFG_RPATH = "yes" 231 */ 232 G.CFG_USER_BUILD_KEY = "" 233 G.CFG_ACCESSIBILITY = "auto" 234 G.CFG_QT3SUPPORT = "yes" 235 G.CFG_ENDIAN = "auto" 236 G.CFG_HOST_ENDIAN = "auto" 237 /* @todo do we really need this? 238 G.CFG_DOUBLEFORMAT = "auto" 239 G.CFG_ARMFPA = "auto" 237 240 G.CFG_FRAMEWORK = "auto" 238 G.CFG_MAC_ARCHS = "" 239 G.CFG_MAC_DWARF2 = "auto" 240 G.CFG_MAC_XARCH = "auto" 241 G.CFG_MAC_CARBON = "yes" 242 G.CFG_MAC_COCOA = "auto" 243 G.COMMANDLINE_MAC_COCOA = "no" 241 */ 244 242 G.CFG_SXE = "no" 245 243 G.CFG_PREFIX_INSTALL = "yes" … … 248 246 G.I_FLAGS = "" 249 247 G.L_FLAGS = "" 250 G.RPATH_FLAGS = "" 251 l_FLAGS = "" 248 G.l_FLAGS = "" 252 249 G.QCONFIG_FLAGS = "" 253 250 G.XPLATFORM = "" /* This seems to be the QMAKESPEC, like "linux-g++" */ … … 276 273 G.QT_HOST_PREFIX = "" 277 274 275 G.QT_NAMESPACE = "" 276 278 277 /* flags for SQL drivers */ 279 278 G.QT_CFLAGS_PSQL = "" … … 356 355 357 356 /* update QT_CONFIG to show our current predefined configuration */ 358 w = wordpos(G.CFG_QCONFIG, "minimal small medium large full") 357 cfgs = "minimal small medium large full" 358 w = wordpos(G.CFG_QCONFIG, cfgs) 359 359 if (w > 0) then do 360 360 /* these are a sequence of increasing functionality */ 361 361 do i = 1 to w 362 G.QT_CONFIG = Join(G.QT_CONFIG, w "-config")362 G.QT_CONFIG = Join(G.QT_CONFIG, word(cfgs, i)"-config") 363 363 end 364 364 end … … 629 629 Makefile_str = charin(MakefilePlatform, 1, chars(MakefilePlatform)) 630 630 if (Makefile_str == "") then do 631 SayError "'"MakefilePlatform"' not found."631 call SayErr "'"MakefilePlatform"' not found." 632 632 call Done 1 633 633 end … … 700 700 if (make_rc \= 0) then 701 701 call Done 2 702 703 /*-------------------------------------------------------------------------- 704 tests that need qmake 705 --------------------------------------------------------------------------*/ 706 707 /* nothing yet */ 708 709 /*-------------------------------------------------------------------------- 710 ask for all that hasn't been auto-detected or specified in the arguments 711 --------------------------------------------------------------------------*/ 712 713 /* nothing so far */ 714 715 /*-------------------------------------------------------------------------- 716 process supplied options 717 --------------------------------------------------------------------------*/ 718 719 /* enable Qt 3 support functionality */ 720 if (G.CFG_QT3SUPPORT == "yes") then 721 G.QT_CONFIG = Join(G.QT_CONFIG, "qt3support") 722 723 /* enable Phonon */ 724 if (G.CFG_PHONON == "yes") then do 725 G.QT_CONFIG = Join(G.QT_CONFIG, "phonon") 726 if (G.CFG_PHONON_BACKEND == "yes") then 727 G.QT_CONFIG = Join(G.QT_CONFIG, "phonon-backend") 728 end 729 else 730 G.QCONFIG_FLAGS = Join(G.QCONFIG_FLAGS, "QT_NO_PHONON") 731 732 /* disable accessibility */ 733 if (G.CFG_ACCESSIBILITY == "no") then 734 G.QCONFIG_FLAGS = Join(G.QCONFIG_FLAGS, "QT_NO_ACCESSIBILITY") 735 else 736 G.QT_CONFIG = Join(G.QT_CONFIG, "accessibility") 737 738 /* disable opengl */ 739 if (G.CFG_OPENGL == "yes") then 740 G.QT_CONFIG = Join(G.QT_CONFIG, "opengl") 741 else 742 G.QCONFIG_FLAGS = Join(G.QCONFIG_FLAGS, "QT_NO_OPENGL") 743 744 /* safe execution environment */ 745 if (G.CFG_SXE \== "no") then 746 G.QT_CONFIG = Join(G.QT_CONFIG, "sxe") 747 748 /* build up the variables for output */ 749 if (G.CFG_DEBUG == "yes") then do 750 G.QMAKE_OUTDIR = G.QMAKE_OUTDIR"debug" 751 G.QMAKE_CONFIG = Join(G.QMAKE_CONFIG, "debug") 752 end 753 else if (G.CFG_DEBUG == "no") then do 754 G.QMAKE_OUTDIR = G.QMAKE_OUTDIR"release" 755 G.QMAKE_CONFIG = Join(G.QMAKE_CONFIG, "release") 756 end 757 if (G.CFG_SHARED == "yes") then do 758 G.QMAKE_OUTDIR = G.QMAKE_OUTDIR"-shared" 759 G.QMAKE_CONFIG = Join(G.QMAKE_CONFIG, "shared dll") 760 end 761 else if (G.CFG_SHARED == "no") then do 762 G.QMAKE_OUTDIR = G.QMAKE_OUTDIR"-static" 763 G.QMAKE_CONFIG = Join(G.QMAKE_CONFIG, "static") 764 end 765 766 call QMakeVar "set", "PRECOMPILED_DIR", ".pch\"G.QMAKE_OUTDIR 767 call QMakeVar "set", "OBJECTS_DIR", ".obj\"G.QMAKE_OUTDIR 768 call QMakeVar "set", "MOC_DIR", ".moc\"G.QMAKE_OUTDIR 769 call QMakeVar "set", "RCC_DIR", ".rcc\"G.QMAKE_OUTDIR 770 call QMakeVar "set", "UI_DIR", ".uic\"G.QMAKE_OUTDIR 771 772 if (G.CFG_LARGEFILE == "yes") then 773 G.QMAKE_CONFIG = Join(G.QMAKE_CONFIG, "largefile") 774 if (G.CFG_STL == "no") then 775 G.QCONFIG_FLAGS = Join(G.QCONFIG_FLAGS, "QT_NO_STL") 776 else 777 G.QMAKE_CONFIG = Join(G.QMAKE_CONFIG, "stl") 778 779 if (G.CFG_USE_GNUMAKE == "yes") then 780 G.QMAKE_CONFIG = Join(G.QMAKE_CONFIG, "GNUmake") 781 782 if (G.CFG_REDUCE_EXPORTS == "yes") then 783 G.QT_CONFIG = Join(G.QT_CONFIG, "reduce_exports") 784 if (G.CFG_REDUCE_RELOCATIONS == "yes") then 785 G.QT_CONFIG = Join(G.QT_CONFIG, "reduce_relocations") 786 if (G.CFG_PRECOMPILE == "yes") then 787 G.QMAKE_CONFIG = Join(G.QMAKE_CONFIG, "precompile_header") 788 789 if (G.CFG_SEPARATE_DEBUG_INFO == "yes") then do 790 call QMakeVar "add", "QMAKE_CFLAGS", "$$QMAKE_CFLAGS_DEBUG" 791 call QMakeVar "add", "QMAKE_CXXFLAGS", "$$QMAKE_CFLAGS_DEBUG" 792 G.QMAKE_CONFIG = Join(G.QMAKE_CONFIG, "separate_debug_info") 793 end 794 795 /* @todo do we really need this? 796 if (G.CFG_MMX == "yes") then 797 G.QMAKE_CONFIG = Join(G.QMAKE_CONFIG, "mmx") 798 if (G.CFG_3DNOW == "yes") then 799 G.QMAKE_CONFIG = Join(G.QMAKE_CONFIG, "3dnow") 800 if (G.CFG_SSE == "yes") then 801 G.QMAKE_CONFIG = Join(G.QMAKE_CONFIG, "sse") 802 if (G.CFG_SSE2 == "yes") then 803 G.QMAKE_CONFIG = Join(G.QMAKE_CONFIG, "sse2") 804 if (G.CFG_IWMMXT == "yes") then 805 G.QMAKE_CONFIG = Join(G.QMAKE_CONFIG, "iwmmxt") 806 if (G.CFG_IPV6 == "yes") then 807 G.QT_CONFIG = Join(G.QT_CONFIG, "ipv6") 808 if (G.CFG_CLOCK_GETTIME == "yes") then 809 G.QT_CONFIG = Join(G.QT_CONFIG, "clock-gettime") 810 if (G.CFG_CLOCK_MONOTONIC == "yes") then 811 G.QT_CONFIG = Join(G.QT_CONFIG, "clock-monotonic") 812 if (G.CFG_MREMAP == "yes") then 813 G.QT_CONFIG = Join(G.QT_CONFIG, "mremap") 814 if (G.CFG_GETADDRINFO == "yes") then 815 G.QT_CONFIG = Join(G.QT_CONFIG, "getaddrinfo") 816 if (G.CFG_IPV6IFNAME == "yes") then 817 G.QT_CONFIG = Join(G.QT_CONFIG, "ipv6ifname") 818 if (G.CFG_GETIFADDRS == "yes") then 819 G.QT_CONFIG = Join(G.QT_CONFIG, "getifaddrs") 820 if (G.CFG_INOTIFY == "yes") then 821 G.QT_CONFIG = Join(G.QT_CONFIG, "inotify") 822 */ 823 824 if (G.CFG_LIBJPEG == "system") then 825 G.QT_CONFIG = Join(G.QT_CONFIG, "system-jpeg") 826 if (G.CFG_JPEG == "no") then 827 G.QT_CONFIG = Join(G.QT_CONFIG, "no-jpeg") 828 else if (G.CFG_JPEG == "yes") then 829 G.QT_CONFIG = Join(G.QT_CONFIG, "jpeg") 830 831 if (G.CFG_LIBMNG == "system") then 832 G.QT_CONFIG = Join(G.QT_CONFIG, "system-mng") 833 if (G.CFG_MNG == "no") then 834 G.QT_CONFIG = Join(G.QT_CONFIG, "no-mng") 835 else if (G.CFG_MNG == "yes") then 836 G.QT_CONFIG = Join(G.QT_CONFIG, "mng") 837 838 if (G.CFG_LIBPNG == "no") then 839 CFG_PNG="no" 840 if (G.CFG_LIBPNG == "system") then 841 G.QT_CONFIG = Join(G.QT_CONFIG, "system-png") 842 if (G.CFG_PNG == "no") then 843 G.QT_CONFIG = Join(G.QT_CONFIG, "no-png") 844 else if (G.CFG_PNG == "yes") then 845 G.QT_CONFIG = Join(G.QT_CONFIG, "png") 846 847 if (G.CFG_GIF == "no") then 848 G.QT_CONFIG = Join(G.QT_CONFIG, "no-gif") 849 else if (G.CFG_GIF == "yes") then 850 G.QT_CONFIG = Join(G.QT_CONFIG, "gif") 851 852 if (G.CFG_LIBTIFF == "system") then 853 G.QT_CONFIG = Join(G.QT_CONFIG, "system-tiff") 854 if (G.CFG_TIFF == "no") then 855 G.QT_CONFIG = Join(G.QT_CONFIG, "no-tiff") 856 else if (G.CFG_TIFF == "yes") then 857 G.QT_CONFIG = Join(G.QT_CONFIG, "tiff") 858 859 if (G.CFG_LIBFREETYPE == "no") then 860 G.QT_CONFIG = Join(G.QT_CONFIG, "no-freetype") 861 else if (G.CFG_LIBFREETYPE == "system") then 862 G.QT_CONFIG = Join(G.QT_CONFIG, "system-freetype") 863 else 864 G.QT_CONFIG = Join(G.QT_CONFIG, "freetype") 865 866 if (G.CFG_ZLIB == "yes") then 867 G.QT_CONFIG = Join(G.QT_CONFIG, "zlib") 868 else if (G.CFG_ZLIB == "system") then 869 G.QT_CONFIG = Join(G.QT_CONFIG, "system-zlib") 870 871 /* @todo do we really need this? 872 if (G.CFG_NIS == "yes") then 873 G.QT_CONFIG = Join(G.QT_CONFIG, "nis") 874 if (G.CFG_CUPS == "yes") then 875 G.QT_CONFIG = Join(G.QT_CONFIG, "cups") 876 if (G.CFG_ICONV == "yes") then 877 G.QT_CONFIG = Join(G.QT_CONFIG, "iconv") 878 if (G.CFG_ICONV == "gnu") then 879 G.QT_CONFIG = Join(G.QT_CONFIG, "gnu-libiconv") 880 if (G.CFG_GLIB == "yes") then 881 G.QT_CONFIG = Join(G.QT_CONFIG, "glib") 882 if (G.CFG_GSTREAMER == "yes") then 883 G.QT_CONFIG = Join(G.QT_CONFIG, "gstreamer") 884 if (G.CFG_DBUS == "yes") then 885 G.QT_CONFIG = Join(G.QT_CONFIG, "dbus") 886 if (G.CFG_DBUS == "linked") then 887 G.QT_CONFIG = Join(G.QT_CONFIG dbus, "dbus-linked") 888 if (G.CFG_NAS == "system") then 889 G.QT_CONFIG = Join(G.QT_CONFIG, "nas") 890 if (G.CFG_OPENSSL == "yes") then 891 G.QT_CONFIG = Join(G.QT_CONFIG, "openssl") 892 if (G.CFG_OPENSSL == "linked") then 893 G.QT_CONFIG = Join(G.QT_CONFIG, "openssl-linked") 894 */ 895 896 if (G.D_FLAGS \== "") then 897 call QMakeVar "add", "DEFINES", G.D_FLAGS 898 if (G.L_FLAGS \== "") then 899 call QMakeVar "add", "QMAKE_LIBDIR_FLAGS", G.L_FLAGS 900 if (G.l_FLAGS \== "") then 901 call QMakeVar "add", "LIBS", G.l_FLAGS 902 if (G.I_FLAGS \== "") then do 903 call QMakeVar "add", "QMAKE_CFLAGS", G.I_FLAGS 904 call QMakeVar "add", "QMAKE_CXXFLAGS", G.$I_FLAGS 905 end 906 907 if (G.CFG_EXCEPTIONS \== "no") then 908 G.QTCONFIG_CONFIG = Join(G.QTCONFIG_CONFIG, "exceptions") 909 910 if (G.CFG_XMLPATTERNS == "yes" & G.CFG_EXCEPTIONS == "no") then do 911 call SayErr "QtXmlPatterns was requested, but it can't", 912 "be built due to exceptions being disabled." 913 call Done 1 914 end 915 if (G.CFG_XMLPATTERNS == "auto" & G.CFG_EXCEPTIONS \== "no") then 916 G.CFG_XMLPATTERNS = "yes" 917 else if (G.CFG_EXCEPTIONS == "no") then 918 G.CFG_XMLPATTERNS = "no" 919 if (G.CFG_XMLPATTERNS == "yes") then 920 G.QT_CONFIG = Join(G.QT_CONFIG, "xmlpatterns") 921 else 922 G.QCONFIG_FLAGS = Join(G.QCONFIG_FLAGS, "QT_NO_XMLPATTERNS") 923 924 if (G.CFG_SVG == "yes") then 925 G.QT_CONFIG = Join(G.QT_CONFIG, "svg") 926 else 927 G.QCONFIG_FLAGS = Join(G.QCONFIG_FLAGS, "QT_NO_SVG") 928 929 if (G.CFG_WEBKIT == "auto") then 930 G.CFG_WEBKIT = "yes" 931 932 if (G.CFG_WEBKIT == "yes") then 933 G.QT_CONFIG = Join(G.QT_CONFIG, "webkit") 934 else do 935 /* The reason we set CFG_WEBKIT, is such that the printed overview of 936 * what will be enabled, shows correctly. */ 937 G.CFG_WEBKIT = "no" 938 G.QCONFIG_FLAGS = Join(G.QCONFIG_FLAGS, "QT_NO_WEBKIT") 939 end 940 941 if (G.CFG_SCRIPTTOOLS == "auto") then 942 G.CFG_SCRIPTTOOLS = "yes" 943 944 if (G.CFG_SCRIPTTOOLS == "yes") then 945 G.QT_CONFIG = Join(G.QT_CONFIG, "scripttools") 946 else 947 G.CFG_SCRIPTTOOLS="no" 948 G.QCONFIG_FLAGS = Join(G.QCONFIG_FLAGS, "QT_NO_SCRIPTTOOLS") 949 950 if (G.CFG_EXCEPTIONS == "no") then do 951 call QMakeVar "add", "QMAKE_CXXFLAGS", "$$QMAKE_CXXFLAGS_EXCEPTIONS_OFF" 952 G.QMAKE_CONFIG = Join(G.QMAKE_CONFIG, "exceptions_off") 953 end 954 955 /*-------------------------------------------------------------------------- 956 generate QT_BUILD_KEY 957 --------------------------------------------------------------------------*/ 958 959 /* 960 * QT_CONFIG can contain the following: 961 * 962 * Things that affect the Qt API/ABI: 963 * 964 * Config: 965 * minimal-config small-config medium-config large-config full-config 966 * debug release 967 * 968 * Different edition modules: 969 * network canvas table xml opengl sql 970 * 971 * Options: 972 * stl 973 * 974 * Things that do not affect the Qt API/ABI: 975 * system-jpeg no-jpeg jpeg 976 * system-mng no-mng mng 977 * system-png no-png png 978 * system-zlib no-zlib zlib 979 * system-libtiff no-libtiff 980 * no-gif gif 981 * dll staticlib 982 * 983 * internal 984 * nocrosscompiler 985 * GNUmake 986 * largefile 987 * nis 988 * nas 989 * tablet 990 * ipv6 991 * 992 * X11 : x11sm xinerama xcursor xfixes xrandr xrender mitshm fontconfig xkb 993 * Embedded: embedded freetype 994 */ 995 996 ALL_OPTIONS = "stl" 997 BUILD_CONFIG = "" 998 BUILD_CONFIG2 = "" 999 BUILD_OPTIONS = "" 1000 1001 /* determine the build options */ 1002 opts = G.QMAKE_CONFIG G.QT_CONFIG 1003 do i = 1 to words(opts) 1004 opt = word(opts, i) 1005 skip = "yes" 1006 if (EndsWith(opt, "-config")) then do 1007 /* take the last *-config setting. this is the highest config being used, 1008 * and is the one that we will use for tagging plugins */ 1009 BUILD_CONFIG = opt 1010 end 1011 else if (opt == "debug" | opt == "release") then do 1012 /* the debug build is binary incompatible with the release build */ 1013 BUILD_CONFIG2 = Join(BUILD_CONFIG2, opt) 1014 end 1015 else if (opt == "stl") then do 1016 /* these config options affect the Qt API/ABI. they should influence 1017 * the generation of the buildkey, so we don't skip them */ 1018 skip = "no" 1019 end 1020 /* skip all other options since they don't affect the Qt API/ABI. */ 1021 1022 if (skip == "no") then do 1023 /* only leave those options in BUILD_OPTIONS that are missing from 1024 * ALL_OPTIONS and add the "no-" prefix to them */ 1025 if (wordpos(opt, ALL_OPTIONS) == 0) then do 1026 opt = "no-"opt 1027 /* also, maintan sort order and unicity */ 1028 if (BUILD_OPTIONS == "") then 1029 BUILD_OPTIONS = opt 1030 else 1031 do j = 1 to words(BUILD_OPTIONS) 1032 w = word(BUILD_OPTIONS, j) 1033 if (w == opt) then leave 1034 if (w > opt) then do 1035 insert(opt" ", BUILD_OPTIONS, wordindex(BUILD_OPTIONS, j)) 1036 leave 1037 end 1038 if (j == words(BUILD_OPTIONS) then 1039 BUILD_OPTIONS = Join(BUILD_OPTIONS, opt) 1040 end 1041 end 1042 end 1043 end 1044 1045 /* QT_NO* defines affect the Qt API (and binary compatibility). they need 1046 * to be included in the build key */ 1047 DEFS = "" 1048 do i = 1 to words(G.D_FLAGS) 1049 opt = substr(strip(word(G.D_FLAGS, i)), 2) /* remove "-D" */ 1050 if (StartsWith(opt, "QT_NO")) then do 1051 /* maintan sort order and unicity (helps ensure that changes in this 1052 * configure script don't affect the QT_BUILD_KEY generation) */ 1053 if (DEFS == "") then 1054 DEFS = opt 1055 else 1056 do j = 1 to words(DEFS) 1057 w = word(DEFS, j) 1058 if (w == opt) then leave 1059 if (w > opt) then do 1060 insert(opt" ", DEFS, wordindex(DEFS, j)) 1061 leave 1062 end 1063 if (j == words(DEFS) then 1064 DEFS = DEFS" "opt 1065 end 1066 end 1067 /* skip all other compiler defines */ 1068 end 1069 BUILD_OPTIONS = BUILD_OPTIONS DEFS 1070 1071 BUILD_OPTIONS = BUILD_CONFIG2 BUILD_CONFIG BUILD_OPTIONS 1072 1073 parse value G.PLATFORM with ."-"COMPILER 1074 QT_BUILD_KEY = G.CFG_USER_BUILD_KEY G.CFG_ARCH COMPILER BUILD_OPTIONS 1075 if (G.QT_NAMESPACE \== "") then 1076 QT_BUILD_KEY = Join(QT_BUILD_KEY, G.QT_NAMESPACE) 1077 1078 QT_BUILD_KEY = Normalize(QT_BUILD_KEY) 1079 1080 /*-------------------------------------------------------------------------- 1081 part of configuration information goes into qconfig.h 1082 --------------------------------------------------------------------------*/ 1083 1084 qconfig_h = G.OutPath"\src\corelib\global\qconfig.h" 1085 qconfig_h_new = qconfig_h".new" 1086 1087 call DeleteFile qconfig_h_new 1088 1089 if (G.CFG_QCONFIG == "full") then do 1090 call lineout qconfig_h_new, "/* Everything */"G.EOL 1091 end 1092 else do 1093 config_h_config = G.OutPath"\src\corelib\global\qconfig-"G.CFG_QCONFIG".h" 1094 config_h_str = charin(config_h_config, 1, chars(config_h_config)) 1095 call charout qconfig_h_new, config_h_str||G.EOL 1096 end 1097 1098 call charout qconfig_h_new,, 1099 '#ifndef QT_DLL'G.EOL||, 1100 '# define QT_DLL'G.EOL||, 1101 '#endif'G.EOL||, 1102 ''G.EOL||, 1103 '/* License information */'G.EOL||, 1104 '#define QT_PRODUCT_LICENSEE "'G.Licensee'"'G.EOL||, 1105 '#define QT_PRODUCT_LICENSE "'G.Edition'"'G.EOL||, 1106 ''G.EOL||, 1107 '/* Qt Edition */'G.EOL||, 1108 '#ifndef QT_EDITION'G.EOL||, 1109 '# define QT_EDITION' G.QT_EDITION||G.EOL||, 1110 '#endif'G.EOL||, 1111 ''G.EOL||, 1112 '#define QT_BUILD_KEY "'QT_BUILD_KEY'"'G.EOL||, 1113 ''G.EOL||, 1114 '/* Machine byte-order */'G.EOL||, 1115 '#define Q_BIG_ENDIAN 4321'G.EOL||, 1116 '#define Q_LITTLE_ENDIAN 1234'G.EOL 1117 1118 /* little endian on OS/2 by default */ 1119 if (G.CFG_ENDIAN == "auto") then 1120 call charout qconfig_h_new, '#define Q_BYTE_ORDER Q_LITTLE_ENDIAN'G.EOL 1121 else 1122 call charout qconfig_h_new, '#define Q_BYTE_ORDER 'G.CFG_ENDIAN||G.EOL 1123 call charout qconfig_h_new, G.EOL 1124 1125 call charout qconfig_h_new,, 1126 '#define QT_ARCH_'translate(G.CFG_ARCH)||G.EOL, 1127 ''G.EOL||, 1128 '/* Compile time features */'||G.EOL 1129 1130 if (G.CFG_LARGEFILE == "yes") then 1131 call charout qconfig_h_new, '#define QT_LARGEFILE_SUPPORT 64'G.EOL||G.EOL 1132 1133 if (G.CFG_DEV == "yes") then 1134 call charout qconfig_h_new, '"#define QT_BUILD_INTERNAL'G.EOL||G.EOL 1135 1136 /* close the file */ 1137 call charout qconfig_h_new 702 1138 703 1139 /* @todo not everything implemented yet, cry loudly... */ … … 920 1356 921 1357 return result 1358 1359 /** 1360 * Normalizes the given string by removing leading, trailing and extra spaces 1361 * in the middle so that words in the returned string are separated with exactly 1362 * one space. 1363 * 1364 * @param aStr String to normalize. 1365 * @return Resulting string. 1366 */ 1367 Normalize: procedure expose (Globals) 1368 parse arg aStr 1369 result = "" 1370 do i = 1 to words(aStr) 1371 if (result == "") then result = word(aStr, i) 1372 else result = result" "word(aStr, i) 1373 end 1374 return result 1375 1376 /** 1377 * Returns 1 if the given string @a aStr1 starts with the string @a aStr2 and 1378 * 0 otherwise. If @a aStr2 is null or empty, 0 is returned. 1379 * 1380 * @param aStr1 String to search in. 1381 * @param aStr2 String to search for. 1382 * @return 1 or 0. 1383 */ 1384 StartsWith: procedure expose (Globals) 1385 parse arg aStr1, aStr2 1386 len = length(aStr2) 1387 if (len == 0) then return 0 1388 if (length(aStr1) < len) then return 0 1389 return (left(aStr1, len) == aStr2) 1390 1391 /** 1392 * Returns 1 if the given string @a aStr1 ends with the string @a aStr2 and 1393 * 0 otherwise. If @a aStr2 is null or empty, 0 is returned. 1394 * 1395 * @param aStr1 String to search in. 1396 * @param aStr2 String to search for. 1397 * @return 1 or 0. 1398 */ 1399 EndsWith: procedure expose (Globals) 1400 parse arg aStr1, aStr2 1401 len = length(aStr2) 1402 if (len == 0) then return 0 1403 if (length(aStr1) < len) then return 0 1404 return (right(aStr1, len) == aStr2) 922 1405 923 1406 /**
Note:
See TracChangeset
for help on using the changeset viewer.