Merge branch 'tmp-encryptv2' into 'master'
[gd/gnutls] / bootstrap.conf
1 # Copyright (C) 2016,2018 Tim Rühsen
2 # Copyright (C) 2016-2017 Simon Josefsson
3
4 # This program is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation, either version 3 of the License, or
7 # (at your option) any later version.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13
14 # You should have received a copy of the GNU General Public License
15 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
16
17 # gnulib library name
18 source_base=gl
19 tests_base=gl/tests
20 m4_base=m4
21 gnulib_name=libgnu
22 gnulib_tool_option_extras="--with-tests --avoid=alignof-tests --avoid=lock-tests --avoid=lseek-tests"
23 use_libtool=1
24 checkout_only_file=
25 local_gl_dir=gl/override/
26 required_submodules="tests/suite/tls-fuzzer/python-ecdsa tests/suite/tls-fuzzer/tlsfuzzer tests/suite/tls-fuzzer/tlslite-ng"
27
28 # Reproduce by: gnulib-tool --import --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --with-tests --avoid=alignof-tests --avoid=lock-tests --avoid=lseek-tests --lgpl=2 --no-conditional-dependencies --libtool --macro-prefix=gl --no-vc-files alloca byteswap c-ctype extensions func gendocs getline gettext-h gettimeofday hash-pjw-bare havelib intprops lib-msvc-compat lib-symbol-versions maintainer-makefile manywarnings memmem-simple minmax netdb netinet_in pmccabe2html read-file secure_getenv snprintf stdint strcase strndup strtok_r strverscmp sys_socket sys_stat time_r unistd vasprintf vsnprintf warnings
29
30 gnulib_modules="
31 alloca byteswap c-ctype c-strcase extensions func gendocs getline gettext-h gettimeofday hash-pjw-bare havelib arpa_inet inet_ntop inet_pton intprops lib-msvc-compat lib-symbol-versions maintainer-makefile manywarnings memmem-simple minmax netdb netinet_in pmccabe2html read-file secure_getenv setsockopt snprintf stdint strcase strdup-posix strndup strtok_r strverscmp sys_socket sys_stat sys_types time_r unistd valgrind-tests vasprintf vsnprintf warnings
32 "
33
34 unistring_modules="
35 unictype/category-all unictype/property-default-ignorable-code-point unictype/property-join-control unictype/property-not-a-character uninorm/nfc uninorm/nfkc uninorm/u16-normalize uninorm/u32-normalize uninorm/u8-normalize unistr/u16-to-u8 unistr/u32-to-u8 unistr/u8-check unistr/u8-to-u16 unistr/u8-to-u32
36 "
37
38 src_modules="
39 accept bind close connect getaddrinfo getpass gettext-h arpa_inet inet_ntop inet_pton listen minmax parse-datetime progname read-file recv recvfrom select send sendto servent setsockopt shutdown socket sockets socklen inttypes
40 "
41
42 # Build prerequisites
43 buildreq="\
44 autoconf   2.62
45 automake   1.11.1
46 gettext    0.17
47 git        1.4.4
48 perl       5.5
49 gperf      -
50 autopoint  -
51 autogen    -
52 "
53
54 GTKDOCIZE=$(which gtkdocize 2>/dev/null)
55 if test $? -ne 0; then
56   echo "No gtk-doc support found. You can't build the docs."
57   # rm because gtk-doc.make might be a link to a protected file
58   rm -f gtk-doc.make 2>/dev/null
59   echo "EXTRA_DIST =" >gtk-doc.make
60   echo "CLEANFILES =" >>gtk-doc.make
61   GTKDOCIZE=""
62 else
63   $GTKDOCIZE
64 fi
65
66 # update git submodules
67 git_options=
68 if test -n "$SUBMODULE_NOFETCH"; then
69   git_options="--no-fetch"
70 fi
71
72 for mod in $required_submodules;do
73         git submodule update --init $git_options $mod
74 done
75
76 if test -d ./gnulib;then
77         TMP_GNULIB_SRCDIR="${GNULIB_SRCDIR:-./gnulib/}"
78
79         deps=$(${TMP_GNULIB_SRCDIR}/gnulib-tool --extract-recursive-dependencies ${gnulib_modules})
80         deps="echo -n ${deps} ${gnulib_modules}|sort -u"
81         case ${deps} in
82           *select*|*poll*|*sockets*|*recv*|*send*)
83                 echo "******************************************************************"
84                 die "the library cannot include the gnulib sockets; see CONTRIBUTION.md"
85             ;;
86         esac
87 fi
88
89 bootstrap_post_import_hook ()
90 {
91   # we re-use malloc-posix from the original gnulib
92 #  for i in ${unistring_modules}; do
93 #    sed -i 's/malloc-posix//g' ${GNULIB_SRCDIR}/modules/$i
94 #  done
95
96   ${GNULIB_SRCDIR}/gnulib-tool --import --local-dir=lib/unistring/override --lib=libunistring --source-base=lib/unistring --m4-base=lib/unistring/m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --lgpl=3orGPLv2 --no-conditional-dependencies --libtool --macro-prefix=unistring ${unistring_modules}
97
98   ${GNULIB_SRCDIR}/gnulib-tool --import --local-dir=src/gl/override --lib=libgnu_gpl --source-base=src/gl --m4-base=src/gl/m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --no-conditional-dependencies --libtool --macro-prefix=ggl --no-vc-files ${src_modules}
99
100 #  git -C ${GNULIB_SRCDIR} reset --hard
101
102   # Automake requires that ChangeLog exist.
103   touch ChangeLog || return 1
104 }