examples: Add winexe re-implemented on current Samba libs
[bbaumbach/samba-autobuild/.git] / examples / winexe / wscript
1 #!/usr/bin/env python
2
3 def configure(conf):
4     AR32 = ['i386', 'i586', 'i686']
5     AR64 = ['x86_64', 'amd64']
6     TC = ['mingw32', 'mingw32msvc', 'w64-mingw32']
7
8     found = False
9
10     for a in AR32:
11         for t in TC:
12             if conf.find_program(a + '-' + t + '-gcc', var='WINEXE_CC_WIN32'):
13                 found = True
14                 break
15         if found:
16             conf.DEFINE('HAVE_WINEXE_CC_WIN32', 1);
17             break
18
19     for a in AR64:
20         for t in TC:
21             if conf.find_program(a + '-' + t + '-gcc', var='WINEXE_CC_WIN64'):
22                 found = True
23                 break
24         if found:
25             conf.DEFINE('HAVE_WINEXE_CC_WIN64', 1);
26             break
27
28     conf.DEFINE("WINEXE_LDFLAGS",
29                 "-s -Wall -Wl,-Bstatic -Wl,-Bdynamic -luserenv")