forked from nodejs/node-v0.x-archive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure-gyp
executable file
·86 lines (73 loc) · 2.06 KB
/
configure-gyp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#!/usr/bin/env python
import optparse
import os
import json
root_dir = os.path.dirname(__file__)
# parse our options
parser = optparse.OptionParser()
parser.add_option("--debug", action="store_true", dest="debug",
default=False, help="Also build debug build")
parser.add_option("--prefix", action="store", dest="prefix",
help="Select the install prefix (defaults to /usr/local)")
# TODO options to support for backwards compatibility
#
# --without-snapshot
# Build without snapshotting V8 libraries. You might want to set this for
# cross-compiling. [Default: False]
#
# --without-ssl
# Build without SSL
#
# --shared-v8
# Link to a shared V8 DLL instead of static linking
#
# --shared-v8-includes=SHARED_V8_INCLUDES
# Directory containing V8 header files
#
# --shared-v8-libpath=SHARED_V8_LIBPATH
# A directory to search for the shared V8 DLL
#
# --shared-v8-libname=SHARED_V8_LIBNAME
# Alternative lib name to link to (default: 'v8')
#
# --openssl-includes=OPENSSL_INCLUDES
# A directory to search for the OpenSSL includes
#
# --openssl-libpath=OPENSSL_LIBPATH
# A directory to search for the OpenSSL libraries
#
# --no-ssl2
# Disable OpenSSL v2
#
# --gdb
# add gdb support
#
# --shared-cares
# Link to a shared C-Ares DLL instead of static linking
#
# --shared-cares-includes=SHARED_CARES_INCLUDES
# Directory containing C-Ares header files
#
# --shared-cares-libpath=SHARED_CARES_LIBPATH
# A directory to search for the shared C-Ares DLL
#
# --with-dtrace
# Build with DTrace (experimental)
#
# --dest-cpu=DEST_CPU
# CPU architecture to build for. Valid values are: arm, ia32, x64
(options, args) = parser.parse_args()
print "configure options:", options
output = {
'variables': {
'node_debug': 'true' if options.debug else 'false',
'node_prefix': options.prefix if options.prefix else ''
}
}
fn = os.path.join(root_dir, 'options.gypi')
print "creating ", fn
f = open(fn, 'w+')
f.write("# Do not edit. Generated by the configure script.\n")
json.dump(output, f, indent=2, skipkeys=True)
f.write("\n")
f.close()