Changeset 680
- Timestamp:
- Jan 25, 2012, 9:46:18 AM (14 years ago)
- Location:
- branches/samba-3.3.x
- Files:
-
- 1 added
- 28 deleted
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.3.x/source/build.cmd
r644 r680 3 3 /* version history */ 4 4 /* version 0.1.0 from 09.04.2010 Herwig (first edition) */ 5 /* version 0.2.0 from 09.06.2010 Herwig (a lot enhancements) */ 6 /* version 0.3.0 from 20.08.2010 Silvan (added version.ecs check and more) */ 7 /* version 0.3.1 from 25.10.2011 Silvan (added cups support) */ 5 /* version 0.2.2 from 08.09.2009 Herwig (a lot enhancements) */ 6 /* version 0.3.0 from 17.08.2010 Silvan (redone a lot) */ 7 /* version 0.3.1 from 20.08.2010 Silvan (added version.ecs check) */ 8 /* version 0.3.2 from 08.07.2011 Silvan (pythonhome may be not set) */ 9 /* version 0.3.3 from 05.11.2011 Herwig (add support for libc064) */ 10 /* version 0.3.4 from 23.11.2011 Herwig (simplify libc switching) */ 11 /* version 0.3.5 from 23.11.2011 Herwig (brand befor configure, if version.h is missing) */ 8 12 9 13 /* load the sysfuncs if not already loaded */ … … 15 19 16 20 /* init the version string (don't forget to change) */ 17 version = "0.3. 1"18 version_date = "2 5.10.2011"21 version = "0.3.5" 22 version_date = "23.11.2011" 19 23 20 24 '@echo off' 21 25 parse upper arg cmdline 22 26 23 say "Samba for eCS (OS/2) build script v" || version || " from " || version_date27 say "Samba for eCS (OS/2) build script v" || version || " from " || version_date 24 28 25 29 /* No parameter or HELP -> display usage */ … … 28 32 say "Valid commands are:" 29 33 say " HELP - this page" 30 say " 063 - link against libc063.dll"31 say " 064x - link against libc064x.dll"32 34 say " CONF - run configure" 33 35 say " CLEAN - clean up and recompile everything" … … 38 40 say " ZIP - create ZIP archive" 39 41 say " ALL - do just everything" 42 say "Deprecated options:" 43 say " 064 - link against libc064.dll (default)" 44 say " 064x - link against libc064x.dll" 45 say " 063 - link against libc063.dll" 40 46 say 41 47 exit 255 … … 52 58 /* defaults */ 53 59 make = "" 54 libc = "064x"55 60 brand = "No" 56 61 conf = "" … … 71 76 build_parms = "" 72 77 78 /* delete the following 7 lines to remove libc switching capability */ 79 select 80 when pos("064X", cmdline) > 0 then libc = "064X" 81 when pos("063", cmdline) > 0 then libc = "063" 82 otherwise libc = "064" 83 end 84 address cmd "call "libc".cmd" 85 73 86 if pos("MAKE", cmdline) > 0 then do 74 87 make = "MAKE" … … 80 93 build_parms = build_parms||' 'make 81 94 end 82 if pos("064X", cmdline) > 0 then do 83 libc = "064X" 84 build_parms = build_parms||' 'libc 85 end 86 if pos("063", cmdline) > 0 then do 87 libc = "063" 88 build_parms = build_parms||' 'libc 89 end 95 90 96 if pos("BRAND", cmdline) > 0 then do 91 97 Brand = "YES" … … 97 103 end 98 104 105 ok = SysFileTree(".\include\version.h",versionh.,'FO') 106 107 if versionh.0 = 0 & conf = "YES" then do 108 svninfo = ".\svninfo" 109 address cmd 'svn status -q -u | grep "^Status against revision:" | sed -e "s/Status against revision: *//">'svninfo 110 revision = strip(translate(linein(svninfo))) 111 ok = stream(svninfo,'c','close') 112 call brand revision 113 end 114 99 115 /* start working */ 100 if libc = "063" then do101 address cmd "call 063.cmd"102 end103 else do104 address cmd "call 064x.cmd"105 end106 107 116 if conf = "YES" then do 108 109 110 111 112 113 address cmd 'SET LIBS=-lsocket -lsyslog' 117 address cmd 'SETLOCAL' 118 /* address cmd 'SET CFLAGS=-g -Zomf -O1 -march=pentium -mtune=pentium4' 119 address cmd 'SET CXXFLAGS=-g -Zomf -O1 -march=pentium -mtune=pentium4' 120 address cmd 'SET LDFLAGS=-s -Zsym -Zmap -Zbin-files -Zomf -Zexe -Zargs-wild -Zargs-resp' 121 address cmd 'SET AR=emxomfar' 122 address cmd 'SET LIBS=-lsocket -lsyslog' */ 114 123 /* disabled options: 115 --enable-developer --enable-socket-wrapper 116 --disable-cups 124 --enable-developer --enable-socket-wrapper 117 125 */ 118 126 … … 121 129 122 130 /* is cups env set */ 123 131 sEnvVar = EnvGet('CUPS'); 124 132 if sEnvVar <> '' then do 125 call lineout cacheFile, "ac_cv_path_CUPS_CONFIG='" || sEnvVar || "'"; 133 call lineout cacheFile, "ac_cv_path_CUPS_CONFIG='" || sEnvVar || "'"; 134 end 135 136 /* is python env set */ 137 sEnvVar = EnvGet('PYTHONHOME'); 138 if sEnvVar <> '' then do 139 sPythonVersion = PythonVersion(sEnvVar); 140 if sPythonVersion <> '-1' then do 141 call lineout cacheFile, "ac_cv_path_PYTHON_CONFIG='" || sEnvVar || "/config/" || sPythonVersion || "'"; 142 call lineout cacheFile, "ac_cv_path_PYTHON='" || sEnvVar || "'"; 143 end 126 144 end 127 145 … … 129 147 130 148 /* run configure */ 131 address cmd 'ksh ./configure --enable-pie=no --prefix=/samba -- enable-static --disable-shared --with-acl-support --cache-file=build.cache 2>&1 | tee configure.log'132 149 address cmd 'ksh ./configure --enable-pie=no --prefix=/samba --disable-shared --with-acl-support --cache-file=build.cache 2>&1 | tee configure.log' 150 address cmd 'ENDLOCAL' 133 151 end 134 152 … … 136 154 address cmd "make clean" 137 155 end 138 156 139 157 if brand = "YES" then do 140 158 svninfo = ".\svninfo" … … 148 166 say build_parms 149 167 address cmd 'make 2>&1 | tee build.log' 150 end 168 end 151 169 152 170 if pos("ZIP", cmdline) > 0 then do … … 179 197 ok = stream(VerFile, 'c', 'QUERY EXISTS') 180 198 if ok = "" then do 181 182 199 say "Please create a " || VerFile || " based on VERSION.EC_" 200 exit 0 183 201 end 184 202 … … 193 211 eCSVer.I = linein(VerFile) 194 212 if left(eCSVer.I,28) = "SAMBA_VERSION_VENDOR_SUFFIX=" then do 195 196 197 213 parse var eCSver.I . '='vendor_suffix 214 vendor_suffix = strip(vendor_suffix,,'"') 215 parse var vendor_suffix vendor suffix 198 216 end 199 217 end … … 233 251 verstring = suffix'-'Major'.'minor'.'release'.'revision'-'vendor'-'date('S') 234 252 say "Samba "verstring 235 return 253 return 254 236 255 237 256 /** … … 243 262 return SysQueryExtLibPath(substr(sEnvVar, 1, 1)); 244 263 return value(sEnvVar,, 'OS2ENVIRONMENT'); 264 265 /** 266 * try to find the pythonversion 267 */ 268 PythonVersion: procedure 269 parse arg pdir 270 271 ok = SysFileTree(pdir||"\python*.dll",pydll.,"FO") 272 rc = -1 273 if pydll.0 = 1 then do 274 dllpur = filespec("N",pydll.1) 275 parse var dllpur 'python' ver '.dll' 276 if datatype(ver) <> "NUM" then do 277 say "no valid python dll found!" 278 end 279 else do 280 major = left(ver,1) 281 minor = substr(ver,2,) 282 verstring = "python"||major||"."||minor 283 rc = verstring 284 end 285 end 286 else do 287 say "no dll found!" 288 end 289 return rc -
branches/samba-3.3.x/source/build.options
r430 r680 1 1 MAKE="" 2 LIBC="064 X"2 LIBC="064" 3 3 BRAND="YES" -
branches/samba-3.3.x/source/dynconfig.c
r644 r680 4 4 Copyright (C) 2003 by Jim McDonough <jmcd@us.ibm.com> 5 5 Copyright (C) 2007 by Jeremy Allison <jra@samba.org> 6 7 6 This program is free software; you can redistribute it and/or modify 8 7 it under the terms of the GNU General Public License as published by 9 8 the Free Software Foundation; either version 3 of the License, or 10 9 (at your option) any later version. 11 12 10 This program is distributed in the hope that it will be useful, 13 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 13 GNU General Public License for more details. 16 17 14 You should have received a copy of the GNU General Public License 18 15 along with this program. If not, see <http://www.gnu.org/licenses/>. 19 16 */ 20 21 17 #include "includes.h" 22 18 … … 40 36 * table? There's kind of a chicken-and-egg situation there... 41 37 **/ 42 43 38 #ifndef __OS2__ 44 39 #define DEFINE_DYN_CONFIG_PARAM(name) \ … … 84 79 } 85 80 #endif 86 87 81 DEFINE_DYN_CONFIG_PARAM(SBINDIR) 88 82 DEFINE_DYN_CONFIG_PARAM(BINDIR) … … 100 94 DEFINE_DYN_CONFIG_PARAM(PRIVATE_DIR) 101 95 102 103 96 #ifdef __OS2__ 104 105 97 /* Directory the binary was called from, same as getbindir() */ 106 98 const char *get_dyn_SBINDIR(void) … … 117 109 } 118 110 } 119 120 111 if (dyn_SBINDIR == NULL) { 121 112 return buffer; … … 123 114 return dyn_SBINDIR; 124 115 } 125 126 116 /* Directory the binary was called from, same as getsbindir() */ 127 117 const char *get_dyn_BINDIR(void) … … 138 128 } 139 129 } 140 141 130 if (dyn_BINDIR == NULL) { 142 131 return buffer; … … 144 133 return dyn_BINDIR; 145 134 } 146 147 135 /* Directory holding the SWAT files */ 148 136 const char *get_dyn_SWATDIR(void) … … 159 147 } 160 148 } 161 162 149 if (dyn_SWATDIR == NULL) { 163 150 return buffer; … … 165 152 return dyn_SWATDIR; 166 153 } 167 168 154 /* Location of smb.conf file. */ 169 155 const char *get_dyn_CONFIGFILE(void) … … 191 177 setenv("TMPDIR",tmpdir,0); 192 178 } 193 194 179 if (dyn_CONFIGFILE == NULL) { 195 180 return buffer; … … 197 182 return dyn_CONFIGFILE; 198 183 } 199 200 184 /** Log file directory. **/ 201 185 const char *get_dyn_LOGFILEBASE(void) … … 211 195 return dyn_LOGFILEBASE; 212 196 } 213 214 197 /** Statically configured LanMan hosts. **/ 215 198 const char *get_dyn_LMHOSTSFILE(void) … … 225 208 return dyn_LMHOSTSFILE; 226 209 } 227 228 210 /* Directory holding the codepages */ 229 211 const char *get_dyn_CODEPAGEDIR(void) … … 237 219 snprintf(buffer, 260, "%s", CODEPAGEDIR); 238 220 } else { 239 snprintf(buffer, 260, "%s/%s", exedir, "codepages"); 240 } 241 } 242 221 if (!lp_is_in_client()) { 222 snprintf(buffer, 260, "%s/%s", exedir, "codepages"); 223 } else { 224 snprintf(buffer, 260, "%s/%s", getenv("SMB_EXE"), "codepages"); 225 } 226 } 227 } 243 228 if (dyn_CODEPAGEDIR == NULL) { 244 229 return buffer; … … 246 231 return dyn_CODEPAGEDIR; 247 232 } 248 249 233 /* Directory holding the libs */ 250 234 const char *get_dyn_LIBDIR(void) … … 261 245 } 262 246 } 263 264 247 if (dyn_LIBDIR == NULL) { 265 248 return buffer; … … 267 250 return dyn_LIBDIR; 268 251 } 269 270 252 /* Directory holding the modules */ 271 253 const char *get_dyn_MODULESDIR(void) … … 282 264 } 283 265 } 284 285 266 if (dyn_MODULESDIR == NULL) { 286 267 return buffer; … … 288 269 return dyn_MODULESDIR; 289 270 } 290 291 271 /* Directory holding lock files */ 292 272 const char *get_dyn_LOCKDIR(void) … … 307 287 return dyn_LOCKDIR; 308 288 } 309 310 289 /* Directory holding the pid files */ 311 290 const char *get_dyn_PIDDIR(void) … … 321 300 return dyn_PIDDIR; 322 301 } 323 324 302 /* Location of smbpasswd */ 325 303 const char *get_dyn_SMB_PASSWD_FILE(void) … … 335 313 return dyn_SMB_PASSWD_FILE; 336 314 } 337 338 315 /* Directory holding the private files */ 339 316 const char *get_dyn_PRIVATE_DIR(void) … … 349 326 return dyn_PRIVATE_DIR; 350 327 } 351 352 328 /* Directory holding the shared libs (same as libdir) */ 353 329 const char *get_dyn_SHLIBEXT(void) … … 364 340 } 365 341 } 366 367 342 if (dyn_SHLIBEXT == NULL) { 368 343 return buffer; … … 370 345 return dyn_SHLIBEXT; 371 346 } 372 373 347 #endif /* __OS2__ */ 374 375 348 /* In non-FHS mode, these should be configurable using 'lock dir ='; 376 349 but in FHS mode, they are their own directory. Implement as wrapper 377 350 functions so that everything can still be kept in dynconfig.c. 378 351 */ 379 380 352 const char *get_dyn_STATEDIR(void) 381 353 { … … 386 358 #endif 387 359 } 388 389 360 const char *get_dyn_CACHEDIR(void) 390 361 {
Note:
See TracChangeset
for help on using the changeset viewer.