bootstrap.conf 4.3 KB
Newer Older
E
Eric Blake 已提交
1 2
# Bootstrap configuration.

3
# Copyright (C) 2010-2014 Red Hat, Inc.
E
Eric Blake 已提交
4 5 6 7 8 9 10 11 12

# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
# GNU Lesser General Public License for more details.
E
Eric Blake 已提交
14 15

# You should have received a copy of the GNU Lesser General Public
16
# License along with this library.  If not, see
17
# <http://www.gnu.org/licenses/>.
E
Eric Blake 已提交
18 19

# gnulib modules used by this package.
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

# NB the GSocket conversion is non-trivial due to the
# different FD vs HANDLE usage in gnulib vs glib. Need
# to find a way to duplicate a socket HANDLE before
# turning it into a FD, since closing an FD also closes
# the original HANDLE.

# -> conditional build to avoid Win32
gnulib_modules="$gnulib_modules chown"
# -> Meson
gnulib_modules="$gnulib_modules configmake"
# -> GSocket
gnulib_modules="$gnulib_modules getaddrinfo"
# -> copy gnuliub win32 impl
gnulib_modules="$gnulib_modules getpass"
# -> Meson
gnulib_modules="$gnulib_modules largefile"
# -> custom configure check
gnulib_modules="$gnulib_modules localeconv"
# -> painful copy gnulib
gnulib_modules="$gnulib_modules mgetgroups"
# -> GSocket
gnulib_modules="$gnulib_modules net_if"
# -> GSocket
gnulib_modules="$gnulib_modules netdb"
# -> GSocket
gnulib_modules="$gnulib_modules passfd"
# -> open code / conditional comp
gnulib_modules="$gnulib_modules pipe-posix"
# -> open code / conditional comp
gnulib_modules="$gnulib_modules pipe2"
# -> GMainLoop
gnulib_modules="$gnulib_modules poll"
# -> Meson
gnulib_modules="$gnulib_modules posix-shell"
# -> open code conditional logic
gnulib_modules="$gnulib_modules sigaction"
# -> open code conditional logic
gnulib_modules="$gnulib_modules sigpipe"
# -> open code conditional or use GIO GFileInfo
gnulib_modules="$gnulib_modules stat-time"
# -> remove use or open-code it. possibly add to glib
gnulib_modules="$gnulib_modules strchrnul"
# -> g_strsplit
gnulib_modules="$gnulib_modules strtok_r"
# -> remove sys/stat.h include from any win32 code paths
gnulib_modules="$gnulib_modules sys_stat"
# -> remove sys/wait.h include from any win32 code paths
gnulib_modules="$gnulib_modules sys_wait"
# -> g_get_os_info in GLib 2.64 but can't use that yet
gnulib_modules="$gnulib_modules uname"
# -> remove from Win32 code paths
gnulib_modules="$gnulib_modules waitpid"
# -> open code impl
gnulib_modules="$gnulib_modules wcwidth"
E
Eric Blake 已提交
75

E
Eric Blake 已提交
76 77
SKIP_PO=true

78 79 80 81 82 83
# Enable copy-mode for MSYS/MinGW. MSYS' ln doesn't work well in the way
# bootstrap uses it with relative paths.
if test -n "$MSYSTEM"; then
    copy=true
fi

E
Eric Blake 已提交
84 85 86

# Tell gnulib to:
#   require LGPLv2+
E
Eric Blake 已提交
87
#   apply any local diffs in gnulib/local/ dir
88
#   put *.m4 files in m4/ dir
E
Eric Blake 已提交
89 90
#   put *.[ch] files in new gnulib/lib/ dir
#   import gnulib tests in new gnulib/tests/ dir
E
Eric Blake 已提交
91
gnulib_name=libgnu
92
m4_base=m4
E
Eric Blake 已提交
93 94 95 96 97
source_base=gnulib/lib
tests_base=gnulib/tests
gnulib_tool_option_extras="\
 --lgpl=2\
 --with-tests\
E
Eric Blake 已提交
98
 --makefile-name=gnulib.mk\
99
 --avoid=pt_chown\
100
 --avoid=lock-tests\
E
Eric Blake 已提交
101
"
E
Eric Blake 已提交
102
local_gl_dir=gnulib/local
E
Eric Blake 已提交
103 104

# Build prerequisites
105 106
# Note that some of these programs are only required for 'make dist' to
# succeed from a fresh git checkout; not all of these programs are
107
# required to run 'make dist' on a tarball.
E
Eric Blake 已提交
108 109 110
buildreq="\
autoconf   2.59
automake   1.9.6
E
Eric Blake 已提交
111
git        1.5.5
E
Eric Blake 已提交
112 113
gzip       -
libtool    -
E
Eric Blake 已提交
114
patch      -
E
Eric Blake 已提交
115
perl       5.5
116
pkg-config -
117
rpcgen     -
E
Eric Blake 已提交
118
tar        -
119 120
xmllint	   -
xsltproc   -
E
Eric Blake 已提交
121 122
"

123 124
# Automake requires that AUTHORS exist.
touch AUTHORS || exit 1
E
Eric Blake 已提交
125

126 127
# Override bootstrap's list - we don't use mdate-sh or texinfo.tex.
gnulib_extra_files="
E
Eric Blake 已提交
128 129 130 131
        build-aux/install-sh
        build-aux/depcomp
        build-aux/config.guess
        build-aux/config.sub
132 133 134
        doc/INSTALL
"

E
Eric Blake 已提交
135

E
Eric Blake 已提交
136
bootstrap_post_import_hook()
E
Eric Blake 已提交
137
{
138
  # Change paths in gnulib/tests/gnulib.mk from "../../.." to "../..",
E
Eric Blake 已提交
139
  # and make tests conditional by changing "TESTS" to "GNULIB_TESTS".
140
  m=gnulib/tests/gnulib.mk
141
  sed 's,\.\./\.\./\.\.,../..,g; s/^TESTS /GNULIB_TESTS /' $m > $m-t
E
Eric Blake 已提交
142 143
  mv -f $m-t $m
}
144 145 146 147 148 149

bootstrap_epilogue()
{
    echo "$0: done.  Now you can run 'mkdir build && cd build && ../configure'."
    exit 0
}