compile/libxsltFromSource
About
libxslt:
compile/nginxFromSource: --with-http_xslt_module=dynamic
Possible dependencies
- always
libxml2:
apt install libxml2-dev
xml2-config must be in PATH
- always
libicu:
apt install libicu-dev
Prepare
Configure
Show configuration help
1 ./autogen.sh --help
Wrapper script
build.sh
1 #!/bin/bash -vx
2
3 PREFIX="$HOME/.local"
4
5 ### C PREPROCESSOR FLAGS
6 CPPFLAGS_ARRAY=(
7 "-DHAVE_CONFIG_H" # Define macro with value 1
8 "-Wdate-time" # Warn when bit-wise-identical reproducible compilations may be disturbed
9 "-D_FORTIFY_SOURCE=2" #Add support for detecting buffer overflows in various functions
10 )
11
12 ### C COMPILER FLAGS
13 CFLAGS_ARRAY=(
14 "-pedantic" # Adhere strictly to defined C Standard
15 "-Wall"
16 "-Wextra"
17 "-Wshadow"
18 "-Wpointer-arith"
19 "-Wcast-align"
20 "-Wwrite-strings"
21 "-Waggregate-return"
22 "-Wstrict-prototypes"
23 "-Wmissing-prototypes"
24 "-Wmissing-format-attribute"
25 "-Wnested-externs"
26 "-Winline"
27 "-Wredundant-decls"
28 "-Wno-long-long"
29 "-Wno-format-extra-args"
30 "-D_REENTRANT" # Define macro with value 1
31 "-g" # Produce debugging information
32 "-O2" # Optimize level 1+2
33 "-Werror=implicit-function-declaration" # Make all warnings into errors
34 "-fstack-protector-strong" # Emit extra code to check for buffer overflows
35 "-fstack-clash-protection" # Generate code to prevent stack clash style attacks.
36 "-Wformat=2" # Check calls have types appropriate to the format string specified
37 "-Werror=format-security" # Make all warnings into errors
38 "-fcf-protection" # Enable code instrumentation of control-flow transfers
39 "-fno-semantic-interposition" # Disallow interposing of symbols by the dynamic linker
40 )
41
42 ### C++ COMPILER FLAGS
43 CXXFLAGS_ARRAY=(
44 )
45
46 ### LINKER FLAGS
47 LDFLAGS_ARRAY=(
48 "-Wl,-z,relro" # Pass option as an option to the linker
49 )
50
51 ### EXPORTS TO SUB-SHELLS
52 export CPPFLAGS="${CPPFLAGS_ARRAY[*]}"
53 export CFLAGS="${CFLAGS_ARRAY[*]}"
54 export CXXFLAGS="${CXXFLAGS_ARRAY[*]}"
55 export LDFLAGS="${LDFLAGS_ARRAY[*]}"
56
57 CONFIGURE_OPTS=(
58 #"--build=x86_64-linux-gnu"
59 "--prefix=$PREFIX"
60 "--includedir=\${prefix}/include"
61 "--mandir=\${prefix}/share/man"
62 "--infodir=\${prefix}/share/info"
63 "--sysconfdir=\${prefix}/etc"
64 "--localstatedir=\${prefix}/var"
65 "--disable-option-checking"
66 "--disable-silent-rules"
67 #"--libdir=\${prefix}/lib/x86_64-linux-gnu"
68 "--libdir=\${prefix}/lib"
69 "--runstatedir=/run"
70 "--disable-maintainer-mode"
71 "--disable-dependency-tracking"
72 "--with-history"
73 "--without-python"
74 "--disable-static"
75 )
76
77 echo -e '\nStarting autogen.sh'
78 ./autogen.sh "${CONFIGURE_OPTS[@]}"
79
80 echo -e '\nStarting configure'
81 ./configure "${CONFIGURE_OPTS[@]}"
82
83 echo -e '\nStarting build'
84 make -j "$(nproc)"
85
86 echo -e '\nStarting tests'
87 make -j "$(nproc)" check
88
89 echo -e '\nStarting install'
90 make -j "$(nproc)" install
91
92 #echo -e '\nStarting uninstall'
93 #make -j "$(nproc)" uninstall
94