fix build issues

This commit is contained in:
Domenico Chierico 2012-11-28 00:37:00 +01:00 committed by Giuseppe Scrivano
parent e6d8e165c5
commit 2f2483214c
9 changed files with 82 additions and 33 deletions

View File

@ -1,3 +1,8 @@
2012-11-28 Domenico Chierico <spaghetty@gmail.com>
* bootstrap: update from upstream.
* configure.ac: Change tests for iri/threads/metalink detection.
2012-08-03 Ilim Ugur <ilimugur@gmail.com>
* bootstrap.conf : Add crypto/sha256 to the list of Gnulib modules used

View File

@ -1,6 +1,6 @@
#! /bin/sh
# Print a version string.
scriptversion=2012-07-06.11; # UTC
scriptversion=2012-07-19.14; # UTC
# Bootstrap this package from checked-out sources.
@ -77,15 +77,32 @@ Running without arguments will suffice in most cases.
EOF
}
warn()
# warnf_ FORMAT-STRING ARG1...
warnf_ ()
{
for i
do
echo "$i"
done | sed -e "s/^/$me: /" >&2
warnf_format_=$1
shift
nl='
'
case $* in
*$nl*) me_=$(printf "$me"|tr "$nl|" '??')
printf "$warnf_format_" "$@" | sed "s|^|$me_: |" ;;
*) printf "$me: $warnf_format_" "$@" ;;
esac >&2
}
die() { warn "$@"; exit 1; }
# warn_ WORD1...
warn_ ()
{
# If IFS does not start with ' ', set it and emit the warning in a subshell.
case $IFS in
' '*) warnf_ '%s\n' "$*";;
*) (IFS=' '; warn_ "$@");;
esac
}
# die WORD1...
die() { warn_ "$@"; exit 1; }
# Configuration.
@ -197,6 +214,8 @@ use_git=true
# otherwise find the first of the NAMES that can be run (i.e.,
# supports --version). If found, set ENVVAR to the program name,
# die otherwise.
#
# FIXME: code duplication, see also gnu-web-doc-update.
find_tool ()
{
find_tool_envvar=$1
@ -335,8 +354,7 @@ grep '^[ ]*AC_CONFIG_AUX_DIR(\['"$build_aux"'\])' configure.ac \
grep '^[ ]*AC_CONFIG_AUX_DIR('"$build_aux"')' configure.ac \
>/dev/null && found_aux_dir=yes
test $found_aux_dir = yes \
|| die "expected line not found in configure.ac. Add the following:" \
" AC_CONFIG_AUX_DIR([$build_aux])"
|| die "configure.ac lacks 'AC_CONFIG_AUX_DIR([$build_aux])'; add it"
# If $build_aux doesn't exist, create it now, otherwise some bits
# below will malfunction. If creating it, also mark it as ignored.
@ -442,7 +460,7 @@ check_versions() {
automake-ng|aclocal-ng)
app=${app%-ng}
($app --version | grep '(GNU automake-ng)') >/dev/null 2>&1 || {
warn "Error: '$app' not found or not from Automake-NG"
warn_ "Error: '$app' not found or not from Automake-NG"
ret=1
continue
} ;;
@ -452,20 +470,21 @@ check_versions() {
# so we have to rely on $? rather than get_version.
$app --version >/dev/null 2>&1
if [ 126 -le $? ]; then
warn "Error: '$app' not found"
warn_ "Error: '$app' not found"
ret=1
fi
else
# Require app to produce a new enough version string.
inst_ver=$(get_version $app)
if [ ! "$inst_ver" ]; then
warn "Error: '$app' not found"
warn_ "Error: '$app' not found"
ret=1
else
latest_ver=$(sort_ver $req_ver $inst_ver | cut -d' ' -f2)
if [ ! "$latest_ver" = "$inst_ver" ]; then
warn "Error: '$app' version == $inst_ver is too old" \
" '$app' version >= $req_ver is required"
warnf_ '%s\n' \
"Error: '$app' version == $inst_ver is too old" \
" '$app' version >= $req_ver is required"
ret=1
fi
fi
@ -761,7 +780,7 @@ version_controlled_file() {
grep -F "/${file##*/}/" "$parent/CVS/Entries" 2>/dev/null |
grep '^/[^/]*/[0-9]' > /dev/null
else
warn "no version control for $file?"
warn_ "no version control for $file?"
false
fi
}

View File

@ -621,9 +621,9 @@ AC_CHECK_HEADER(pcre.h,
dnl Needed by src/Makefile.am
AM_CONDITIONAL([IRI_IS_ENABLED], [test "X$iri" != "Xno"])
AM_CONDITIONAL([METALINK_IS_ENABLED], [test "X$metalink" != "Xno"])
AM_CONDITIONAL([THREADS_ARE_ENABLED], [test "X$threads" != "Xno"])
AM_CONDITIONAL([IRI_IS_ENABLED], [test "X$iri" == "Xyes"])
AM_CONDITIONAL([METALINK_IS_ENABLED], [test "X$metalink" == "Xyes"])
AM_CONDITIONAL([THREADS_ARE_ENABLED], [test "X$threads" == "Xyes"])
dnl
dnl Create output

View File

@ -1,3 +1,17 @@
2012-11-28 Domenico Chierico <spaghetty@gmail.com>
* Makefile.am (THREAD_LIB): Add -lpthread.
* convert.h (register_download): Add definition.
(convert_all_links): Likewise.
(register_delete_file): Likewise.
(register_redirection): Likewise.
(register_css): Likewise.
(register_html): Likewise.
* convert.c: Remove static from register_download, convert_all_links,
register_delete_file, register_redirection, register_css,
register_html.
* retr.c: Call register_html and register_css properly.
2012-11-29 Giuseppe Scrivano <gscrivano@gnu.org>
* http.c (pconn_lock): New function.

View File

@ -41,6 +41,7 @@ endif
if THREADS_ARE_ENABLED
THREAD_OBJ = multi.c
MULTI_HEADER = multi.h
THREAD_LIB = -lpthread
endif
# The following line is losing on some versions of make!
@ -51,22 +52,26 @@ EXTRA_DIST = css.l css.c css_.c build_info.c.in
bin_PROGRAMS = wget
wget_SOURCES = cmpt.c connect.c convert.c cookies.c ftp.c \
css_.c css-url.c \
css_.c css-url.c \
ftp-basic.c ftp-ls.c hash.c host.c html-parse.c html-url.c \
http.c init.c log.c main.c netrc.c progress.c ptimer.c \
recur.c res.c retr.c spider.c url.c warc.c \
recur.c res.c retr.c spider.c url.c warc.c \
utils.c exits.c build_info.c $(IRI_OBJ) \
$(THREAD_OBJ) $(METALINK_OBJ) \
css-url.h css-tokens.h connect.h convert.h cookies.h \
ftp.h hash.h host.h html-parse.h html-url.h \
ftp.h hash.h host.h html-parse.h html-url.h \
http.h http-ntlm.h init.h log.h mswindows.h netrc.h \
options.h progress.h ptimer.h recur.h res.h retr.h \
spider.h ssl.h sysdep.h url.h warc.h utils.h wget.h iri.h \
spider.h ssl.h sysdep.h url.h warc.h utils.h wget.h iri.h \
exits.h gettext.h $(THREAD_HEADER) $(METALINK_HEADER)
am__wget_SOURCES_DIST = $(wget_SOURCES)
am__libunittest_a_SOURCES_DIST = $(wget_SOURCES)
nodist_wget_SOURCES = version.c
EXTRA_wget_SOURCES = iri.c metalink.c multi.c
LDADD = $(LIBOBJS) ../lib/libgnu.a
AM_LDFLAGS = $(THREAD_LIB)
AM_CPPFLAGS = -I$(top_builddir)/lib -I$(top_srcdir)/lib

View File

@ -210,7 +210,7 @@ convert_links_in_hashtable (struct hash_table *downloaded_set,
downloaded URLs in urls_downloaded. All the information is
extracted from these two lists. */
static void
void
FNNAME_WTHREADS(convert_all_links) (void)
{
double secs;
@ -788,7 +788,7 @@ dissociate_urls_from_file (const char *file)
to references to local files. It is also being used to check if a
URL has already been downloaded. */
static void
void
FNNAME_WTHREADS(register_download) (const char *url, const char *file)
{
char *old_file, *old_url;
@ -868,7 +868,7 @@ FNNAME_WTHREADS(register_download) (const char *url, const char *file)
is successfully downloaded and already registered using
register_download() above. */
static void
void
FNNAME_WTHREADS(register_redirection) (const char *from, const char *to)
{
char *file;
@ -883,7 +883,7 @@ FNNAME_WTHREADS(register_redirection) (const char *from, const char *to)
/* Register that the file has been deleted. */
static void
void
FNNAME_WTHREADS(register_delete_file) (const char *file)
{
char *old_url, *old_file;
@ -901,7 +901,7 @@ FNNAME_WTHREADS(register_delete_file) (const char *file)
/* Register that FILE is an HTML file that has been downloaded. */
static void
void
FNNAME_WTHREADS(register_html) (const char *url, const char *file)
{
if (!downloaded_html_set)
@ -911,7 +911,7 @@ FNNAME_WTHREADS(register_html) (const char *url, const char *file)
/* Register that FILE is a CSS file that has been downloaded. */
static void
void
FNNAME_WTHREADS(register_css) (const char *url, const char *file)
{
if (!downloaded_css_set)
@ -998,7 +998,7 @@ downloaded_mode_to_ptr (downloaded_file_t mode)
sure to call this function with local filenames, not remote
URLs. */
static downloaded_file_t
downloaded_file_t
FNNAME_WTHREADS(downloaded_file) (downloaded_file_t mode, const char *file)
{
downloaded_file_t *ptr;

View File

@ -98,6 +98,12 @@ typedef enum
} downloaded_file_t;
downloaded_file_t downloaded_file (downloaded_file_t, const char *);
void register_download (const char *a, const char *b);
void convert_all_links (void);
void register_delete_file (const char *a);
void register_redirection (const char *a, const char *b);
void register_css (const char *a, const char *b);
void register_html (const char *a, const char *b);
char *html_quote_string (const char *);

View File

@ -345,7 +345,7 @@ retrieve_tree (struct url *start_url_parsed, struct iri *pi)
struct url *url_parsed = url_parse (url, &url_err, i, true);
status = retrieve_url (url_parsed, url, &file, &redirected, referer,
&dt, false, i, true);
&dt, false, i, true, NULL);
#else
int j;
retry:

View File

@ -960,10 +960,10 @@ retrieve_url (struct url * orig_parsed, const char *origurl, char **file,
register_redirection (origurl, u->url);
if (*dt & TEXTHTML)
register_html (local_file);
register_html ("",local_file);
if (*dt & TEXTCSS)
register_css (local_file);
register_css ("",local_file);
}
if (file)