Changeset 680


Ignore:
Timestamp:
Jan 25, 2012, 9:46:18 AM (14 years ago)
Author:
Herwig Bauernfeind
Message:

Samba Client 2.1: Fix for Ticket #181, remove several bogus files

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  
    33/* version history */
    44/* 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) */
    812
    913/* load the sysfuncs if not already loaded */
     
    1519
    1620/* init the version string (don't forget to change) */
    17 version = "0.3.1"
    18 version_date = "25.10.2011"
     21version = "0.3.5"
     22version_date = "23.11.2011"
    1923
    2024'@echo off'
    2125parse upper arg cmdline
    2226
    23 say "Samba for eCS (OS/2) build script v"  || version || " from " || version_date
     27say "Samba for eCS (OS/2) build script v"   || version || " from " || version_date
    2428
    2529/* No parameter or HELP -> display usage */
     
    2832    say "Valid commands are:"
    2933    say "      HELP  - this page"
    30     say "      063   - link against libc063.dll"
    31     say "      064x  - link against libc064x.dll"
    3234    say "      CONF  - run configure"
    3335    say "      CLEAN - clean up and recompile everything"
     
    3840    say "      ZIP   - create ZIP archive"
    3941    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"
    4046    say
    4147    exit 255
     
    5258/* defaults */
    5359make  = ""
    54 libc  = "064x"
    5560brand = "No"
    5661conf  = ""
     
    7176build_parms = ""
    7277
     78/* delete the following 7 lines to remove libc switching capability */
     79select
     80    when pos("064X", cmdline) > 0 then libc = "064X"
     81    when pos("063", cmdline) > 0 then  libc = "063"
     82    otherwise libc = "064"
     83end
     84address cmd "call "libc".cmd"
     85
    7386if pos("MAKE", cmdline) > 0 then do
    7487    make = "MAKE"
     
    8093    build_parms = build_parms||' 'make
    8194end
    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
    9096if pos("BRAND", cmdline) > 0 then do
    9197    Brand = "YES"
     
    97103end
    98104
     105ok = SysFileTree(".\include\version.h",versionh.,'FO')
     106
     107if 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
     113end
     114
    99115/* start working */
    100 if libc = "063" then do
    101     address cmd "call 063.cmd"
    102 end
    103 else do
    104     address cmd "call 064x.cmd"
    105 end
    106 
    107116if conf = "YES" then do
    108         address cmd 'SETLOCAL'
    109         address cmd 'SET CFLAGS=-g -Zomf -O1 -march=pentium -mtune=pentium4'
    110         address cmd 'SET CXXFLAGS=-g -Zomf -O1 -march=pentium -mtune=pentium4'
    111         address cmd 'SET LDFLAGS=-s -Zsym -Zmap -Zbin-files -Zomf -Zexe -Zargs-wild -Zargs-resp'
    112         address cmd 'SET AR=emxomfar'
    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' */
    114123    /* disabled options:
    115          --enable-developer --enable-socket-wrapper
    116          --disable-cups         
     124         --enable-developer --enable-socket-wrapper
    117125     */
    118126
     
    121129
    122130/* is cups env set */
    123         sEnvVar = EnvGet('CUPS');
     131    sEnvVar = EnvGet('CUPS');
    124132    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
    126144    end
    127145
     
    129147
    130148/* 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         address cmd 'ENDLOCAL'
     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'
    133151end
    134152
     
    136154    address cmd "make clean"
    137155end
    138            
     156
    139157if brand = "YES" then do
    140158    svninfo = ".\svninfo"
     
    148166    say build_parms
    149167    address cmd 'make 2>&1 | tee build.log'
    150 end   
     168end
    151169
    152170if pos("ZIP", cmdline) > 0 then do
     
    179197    ok = stream(VerFile, 'c', 'QUERY EXISTS')
    180198    if ok = "" then do
    181         say "Please create a " || VerFile || " based on VERSION.EC_"
    182         exit 0
     199        say "Please create a " || VerFile || " based on VERSION.EC_"
     200        exit 0
    183201    end
    184202
     
    193211        eCSVer.I = linein(VerFile)
    194212        if left(eCSVer.I,28) = "SAMBA_VERSION_VENDOR_SUFFIX=" then do
    195                     parse var eCSver.I . '='vendor_suffix
    196                     vendor_suffix = strip(vendor_suffix,,'"')
    197                     parse var vendor_suffix vendor suffix
     213            parse var eCSver.I . '='vendor_suffix
     214            vendor_suffix = strip(vendor_suffix,,'"')
     215            parse var vendor_suffix vendor suffix
    198216        end
    199217    end
     
    233251    verstring = suffix'-'Major'.'minor'.'release'.'revision'-'vendor'-'date('S')
    234252    say "Samba "verstring
    235 return
     253return
     254
    236255
    237256/**
     
    243262        return SysQueryExtLibPath(substr(sEnvVar, 1, 1));
    244263return value(sEnvVar,, 'OS2ENVIRONMENT');
     264
     265/**
     266 * try to find the pythonversion
     267 */
     268PythonVersion: 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
     289return rc
  • branches/samba-3.3.x/source/build.options

    r430 r680  
    11MAKE=""
    2 LIBC="064X"
     2LIBC="064"
    33BRAND="YES"
  • branches/samba-3.3.x/source/dynconfig.c

    r644 r680  
    44   Copyright (C) 2003 by Jim McDonough <jmcd@us.ibm.com>
    55   Copyright (C) 2007 by Jeremy Allison <jra@samba.org>
    6 
    76   This program is free software; you can redistribute it and/or modify
    87   it under the terms of the GNU General Public License as published by
    98   the Free Software Foundation; either version 3 of the License, or
    109   (at your option) any later version.
    11 
    1210   This program is distributed in the hope that it will be useful,
    1311   but WITHOUT ANY WARRANTY; without even the implied warranty of
    1412   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1513   GNU General Public License for more details.
    16 
    1714   You should have received a copy of the GNU General Public License
    1815   along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1916*/
    20 
    2117#include "includes.h"
    2218
     
    4036 * table?  There's kind of a chicken-and-egg situation there...
    4137 **/
    42 
    4338#ifndef __OS2__
    4439#define DEFINE_DYN_CONFIG_PARAM(name) \
     
    8479}
    8580#endif
    86 
    8781DEFINE_DYN_CONFIG_PARAM(SBINDIR)
    8882DEFINE_DYN_CONFIG_PARAM(BINDIR)
     
    10094DEFINE_DYN_CONFIG_PARAM(PRIVATE_DIR)
    10195
    102 
    10396#ifdef __OS2__
    104 
    10597/* Directory the binary was called from, same as getbindir() */
    10698const char *get_dyn_SBINDIR(void)
     
    117109                }
    118110        }
    119 
    120111        if (dyn_SBINDIR == NULL) {
    121112                return buffer;
     
    123114        return dyn_SBINDIR;
    124115}
    125 
    126116/* Directory the binary was called from, same as getsbindir() */
    127117const char *get_dyn_BINDIR(void)
     
    138128                }
    139129        }
    140 
    141130        if (dyn_BINDIR == NULL) {
    142131                return buffer;
     
    144133        return dyn_BINDIR;
    145134}
    146 
    147135/* Directory holding the SWAT files */
    148136const char *get_dyn_SWATDIR(void)
     
    159147                }
    160148        }
    161 
    162149        if (dyn_SWATDIR == NULL) {
    163150                return buffer;
     
    165152        return dyn_SWATDIR;
    166153}
    167 
    168154/* Location of smb.conf file. */
    169155const char *get_dyn_CONFIGFILE(void)
     
    191177                setenv("TMPDIR",tmpdir,0);
    192178        }
    193 
    194179        if (dyn_CONFIGFILE == NULL) {
    195180                return buffer;
     
    197182        return dyn_CONFIGFILE;
    198183}
    199 
    200184/** Log file directory. **/
    201185const char *get_dyn_LOGFILEBASE(void)
     
    211195        return dyn_LOGFILEBASE;
    212196}
    213 
    214197/** Statically configured LanMan hosts. **/
    215198const char *get_dyn_LMHOSTSFILE(void)
     
    225208        return dyn_LMHOSTSFILE;
    226209}
    227 
    228210/* Directory holding the codepages */
    229211const char *get_dyn_CODEPAGEDIR(void)
     
    237219                        snprintf(buffer, 260, "%s", CODEPAGEDIR);
    238220                } 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        }
    243228        if (dyn_CODEPAGEDIR == NULL) {
    244229                return buffer;
     
    246231        return dyn_CODEPAGEDIR;
    247232}
    248 
    249233/* Directory holding the libs */
    250234const char *get_dyn_LIBDIR(void)
     
    261245                }
    262246        }
    263 
    264247        if (dyn_LIBDIR == NULL) {
    265248                return buffer;
     
    267250        return dyn_LIBDIR;
    268251}
    269 
    270252/* Directory holding the modules */
    271253const char *get_dyn_MODULESDIR(void)
     
    282264                }
    283265        }
    284 
    285266        if (dyn_MODULESDIR == NULL) {
    286267                return buffer;
     
    288269        return dyn_MODULESDIR;
    289270}
    290 
    291271/* Directory holding lock files */
    292272const char *get_dyn_LOCKDIR(void)
     
    307287        return dyn_LOCKDIR;
    308288}
    309 
    310289/* Directory holding the pid files */
    311290const char *get_dyn_PIDDIR(void)
     
    321300        return dyn_PIDDIR;
    322301}
    323 
    324302/* Location of smbpasswd */
    325303const char *get_dyn_SMB_PASSWD_FILE(void)
     
    335313        return dyn_SMB_PASSWD_FILE;
    336314}
    337 
    338315/* Directory holding the private files */
    339316const char *get_dyn_PRIVATE_DIR(void)
     
    349326        return dyn_PRIVATE_DIR;
    350327}
    351 
    352328/* Directory holding the shared libs (same as libdir) */
    353329const char *get_dyn_SHLIBEXT(void)
     
    364340                }
    365341        }
    366 
    367342        if (dyn_SHLIBEXT == NULL) {
    368343                return buffer;
     
    370345        return dyn_SHLIBEXT;
    371346}
    372 
    373347#endif /* __OS2__ */
    374 
    375348/* In non-FHS mode, these should be configurable using 'lock dir =';
    376349   but in FHS mode, they are their own directory.  Implement as wrapper
    377350   functions so that everything can still be kept in dynconfig.c.
    378351 */
    379 
    380352const char *get_dyn_STATEDIR(void)
    381353{
     
    386358#endif
    387359}
    388 
    389360const char *get_dyn_CACHEDIR(void)
    390361{
Note: See TracChangeset for help on using the changeset viewer.