X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;f=windows%2FMYconfigure;h=b34c95f10f22a657585bab611c38ec326983a828;hb=fa6f0c233abb34b8b6d1c37191914d735e6fc3bf;hp=4d0f2ae148eb2731dd473ac814470dab27d7f0f2;hpb=4e5c8b19ca9df048e2ce6abc4b61a28e1ecc0696;p=privoxy.git diff --git a/windows/MYconfigure b/windows/MYconfigure index 4d0f2ae1..b34c95f1 100755 --- a/windows/MYconfigure +++ b/windows/MYconfigure @@ -20,6 +20,7 @@ fi # --enable-mingw32 Use mingw32 for a Windows GUI # --enable-static-linking Use static linking instead of dynamic linking (and not have # to put all the .DLLs in the path or the same dir as Privoxy) +# --disable-pcre2 Don't try to use the pcre2 library even if it's available # --disable-pthread Use native threads instead of POSIX pthreads library # --disable-dynamic-pcre Use the built-in, static pcre, even if libpcre is available # --with-docbook=yes Enable docbook documentation creation @@ -52,7 +53,7 @@ LDFLAGS="${LDFLAGS} -fstack-protector-strong" # -D_FORTIFY_SOURCE: detect some buffer overflow errors # ***>> requires compiler optimization level 1 or above <<*** # see : https://gcc.gnu.org/legacy-ml/gcc-patches/2004-09/msg02055.html -# The diffence between -D_FORTIFY_SOURCE=1 and -D_FORTIFY_SOURCE=2 is e.g. for +# The difference between -D_FORTIFY_SOURCE=1 and -D_FORTIFY_SOURCE=2 is e.g. for # struct S { struct T { char buf[5]; int x; } t; char buf[20]; } var; # With -D_FORTIFY_SOURCE=1, # strcpy (&var.t.buf[1], "abcdefg"); @@ -80,7 +81,6 @@ LDFLAGS="${LDFLAGS} -Wl,--nxcompat" # $ peflags -v privoxy.exe # privoxy.exe: coff(0x0106[+executable_image,+line_nums_stripped,+32bit_machine]) pe(0x0140[+dynamicbase,+nxcompat]) - LDFLAGS="${LDFLAGS} -Wl,--dynamicbase,--export-all-symbols" # https://en.wikipedia.org/wiki/Address_space_layout_randomization # https://stackoverflow.com/questions/24283918/how-can-i-enable-aslr-dep-and-safeseh-on-an-exe-in-codeblocks-using-mingw @@ -92,8 +92,6 @@ CFLAGS="${CFLAGS} -Wall" # see: http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html # -Wall doesn't actually turn on all warnings, so add -Wextra # but then plenty too many complaints by -# -Wimplicit-fallthrough=3 -# too many warnings in pcre/study.c & pcre.c # -Wmissing-field-initializers # -Wsign-compare # -Wtype-limits @@ -129,16 +127,40 @@ CFLAGS="${CFLAGS} -Wshadow" # why does the mingw library _not_ include .a files for libpcre? # *sigh* build my own pcre so I can do static linking -# Get the 8.x PCRE library from https://ftp.pcre.org/pub/pcre/ -inc="/source/pcre-8.45/" -lib="/source/pcre-8.45/.libs" +# Get the 8.x PCRE library from +# https://sourceforge.net/projects/pcre/files/pcre/ +# Get the 10.x PCRE2 library from +# https://github.com/PCRE2Project/pcre2/releases +# +# +usepcre2=yes +# +# +if [ "$usepcre2" = "yes" ]; then + PCREOPT="" + inc="/source/pcre2-10.42/src/" + # need pcre2.h + lib="/source/pcre2-10.42/.libs" + # need libpcre2-8.a & libpcre2-posix.a +else + PCREOPT="--disable-pcre2" + inc="/source/pcre-8.45/" + lib="/source/pcre-8.45/.libs" +fi CPPFLAGS="${CPPFLAGS} -I${inc}" LDFLAGS="${LDFLAGS} -L${lib}" # mbedtls -# Get the 2.16.x mbedtls library from https://github.com/ARMmbed/mbedtls/tags -inc="/source/mbedtls-2.16.11/include" -lib="/source/mbedtls-2.16.11/library" +## https://github.com/Mbed-TLS/mbedtls/releases/tag/v2.16.12 +## This is the last release of the 2.16 long-time support branch. +## Users who want a long-time branch should move to mbedtls-2.28, +## which is backward-compatible and will be supported for at least +## 3 years. +# Get the 2.28.x mbedtls library from https://github.com/Mbed-TLS/mbedtls/tags +# Release Notes: https://github.com/Mbed-TLS/mbedtls/releases/tag/v2.28.4 +inc="/source/mbedtls-2.28.4/include" +lib="/source/mbedtls-2.28.4/library" + MITMOPT="--with-mbedtls" CPPFLAGS="${CPPFLAGS} -I${inc}" LDFLAGS="${LDFLAGS} -L${lib}" @@ -163,6 +185,7 @@ echo "LDFLAGS=${LDFLAGS}" ./configure --host=i686-w64-mingw32 --enable-mingw32 --enable-zlib \ --enable-extended-statistics \ + ${PCREOPT} \ --enable-pcre-host-patterns \ --enable-static-linking \ --enable-strptime-sanity-checks \