metalink: build fixes and adjustments I
This commit is contained in:
10
configure.ac
10
configure.ac
@@ -163,8 +163,9 @@ curl_verbose_msg="enabled (--disable-verbose)"
|
|||||||
curl_ldaps_msg="no (--enable-ldaps)"
|
curl_ldaps_msg="no (--enable-ldaps)"
|
||||||
curl_rtsp_msg="no (--enable-rtsp)"
|
curl_rtsp_msg="no (--enable-rtsp)"
|
||||||
curl_rtmp_msg="no (--with-librtmp)"
|
curl_rtmp_msg="no (--with-librtmp)"
|
||||||
|
curl_mtlnk_msg="no (--with-libmetalink)"
|
||||||
|
|
||||||
init_ssl_msg=${curl_ssl_msg}
|
init_ssl_msg=${curl_ssl_msg}
|
||||||
curl_metalink_msg="no (--with-libmetalink)"
|
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl Save anything in $LIBS for later
|
dnl Save anything in $LIBS for later
|
||||||
@@ -2265,18 +2266,17 @@ if test X"$OPT_LIBMETALINK" != Xno; then
|
|||||||
if test -n "$addlib"; then
|
if test -n "$addlib"; then
|
||||||
|
|
||||||
AC_MSG_NOTICE([detected libmetalink version $version])
|
AC_MSG_NOTICE([detected libmetalink version $version])
|
||||||
curl_metalink_msg="enabled"
|
curl_mtlnk_msg="enabled"
|
||||||
LIBMETALINK_LIBS=$addlib
|
LIBMETALINK_LIBS=$addlib
|
||||||
LIBMETALINK_LDFLAGS=$addld
|
LIBMETALINK_LDFLAGS=$addld
|
||||||
LIBMETALINK_CFLAGS=$addcflags
|
LIBMETALINK_CFLAGS=$addcflags
|
||||||
AC_SUBST([LIBMETALINK_LIBS])
|
AC_SUBST([LIBMETALINK_LIBS])
|
||||||
AC_SUBST([LIBMETALINK_LDFLAGS])
|
AC_SUBST([LIBMETALINK_LDFLAGS])
|
||||||
AC_SUBST([LIBMETALINK_CFLAGS])
|
AC_SUBST([LIBMETALINK_CFLAGS])
|
||||||
AC_DEFINE(HAVE_LIBMETALINK, 1, [if libmetalink is available])
|
AC_DEFINE(USE_METALINK, 1, [Define to enable metalink support])
|
||||||
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
AM_CONDITIONAL([HAVE_LIBMETALINK], [test -n "$LIBMETALINK_LIBS"])
|
|
||||||
|
|
||||||
dnl **********************************************************************
|
dnl **********************************************************************
|
||||||
dnl Check for the presence of LIBSSH2 libraries and headers
|
dnl Check for the presence of LIBSSH2 libraries and headers
|
||||||
@@ -3381,7 +3381,7 @@ AC_MSG_NOTICE([Configured to build curl/libcurl:
|
|||||||
LDAPS support: ${curl_ldaps_msg}
|
LDAPS support: ${curl_ldaps_msg}
|
||||||
RTSP support: ${curl_rtsp_msg}
|
RTSP support: ${curl_rtsp_msg}
|
||||||
RTMP support: ${curl_rtmp_msg}
|
RTMP support: ${curl_rtmp_msg}
|
||||||
metalink support: ${curl_metalink_msg}
|
metalink support: ${curl_mtlnk_msg}
|
||||||
Protocols: ${SUPPORT_PROTOCOLS}
|
Protocols: ${SUPPORT_PROTOCOLS}
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ SOURCE \
|
|||||||
tool_homedir.c \
|
tool_homedir.c \
|
||||||
tool_libinfo.c \
|
tool_libinfo.c \
|
||||||
tool_main.c \
|
tool_main.c \
|
||||||
|
tool_metalink.c \
|
||||||
tool_mfiles.c \
|
tool_mfiles.c \
|
||||||
tool_msgs.c \
|
tool_msgs.c \
|
||||||
tool_operate.c \
|
tool_operate.c \
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ CURL_CFILES = hugehelp.c \
|
|||||||
tool_homedir.c \
|
tool_homedir.c \
|
||||||
tool_libinfo.c \
|
tool_libinfo.c \
|
||||||
tool_main.c \
|
tool_main.c \
|
||||||
|
tool_metalink.c \
|
||||||
tool_mfiles.c \
|
tool_mfiles.c \
|
||||||
tool_msgs.c \
|
tool_msgs.c \
|
||||||
tool_operate.c \
|
tool_operate.c \
|
||||||
@@ -50,8 +51,7 @@ CURL_CFILES = hugehelp.c \
|
|||||||
tool_vms.c \
|
tool_vms.c \
|
||||||
tool_writeenv.c \
|
tool_writeenv.c \
|
||||||
tool_writeout.c \
|
tool_writeout.c \
|
||||||
tool_xattr.c \
|
tool_xattr.c
|
||||||
tool_metalink.c
|
|
||||||
|
|
||||||
CURL_HFILES = hugehelp.h \
|
CURL_HFILES = hugehelp.h \
|
||||||
tool_binmode.h \
|
tool_binmode.h \
|
||||||
@@ -75,6 +75,7 @@ CURL_HFILES = hugehelp.h \
|
|||||||
tool_homedir.h \
|
tool_homedir.h \
|
||||||
tool_libinfo.h \
|
tool_libinfo.h \
|
||||||
tool_main.h \
|
tool_main.h \
|
||||||
|
tool_metalink.h \
|
||||||
tool_mfiles.h \
|
tool_mfiles.h \
|
||||||
tool_msgs.h \
|
tool_msgs.h \
|
||||||
tool_operate.h \
|
tool_operate.h \
|
||||||
@@ -92,8 +93,7 @@ CURL_HFILES = hugehelp.h \
|
|||||||
tool_vms.h \
|
tool_vms.h \
|
||||||
tool_writeenv.h \
|
tool_writeenv.h \
|
||||||
tool_writeout.h \
|
tool_writeout.h \
|
||||||
tool_xattr.h \
|
tool_xattr.h
|
||||||
tool_metalink.h
|
|
||||||
|
|
||||||
curl_SOURCES = $(CURL_CFILES) $(CURLX_ONES) $(CURL_HFILES)
|
curl_SOURCES = $(CURL_CFILES) $(CURLX_ONES) $(CURL_HFILES)
|
||||||
|
|
||||||
|
|||||||
@@ -158,6 +158,7 @@ RELEASE_OBJS= \
|
|||||||
tool_homedirr.obj \
|
tool_homedirr.obj \
|
||||||
tool_libinfor.obj \
|
tool_libinfor.obj \
|
||||||
tool_mainr.obj \
|
tool_mainr.obj \
|
||||||
|
tool_metalinkr.obj \
|
||||||
tool_mfilesr.obj \
|
tool_mfilesr.obj \
|
||||||
tool_msgsr.obj \
|
tool_msgsr.obj \
|
||||||
tool_operater.obj \
|
tool_operater.obj \
|
||||||
@@ -201,6 +202,7 @@ DEBUG_OBJS= \
|
|||||||
tool_homedird.obj \
|
tool_homedird.obj \
|
||||||
tool_libinfod.obj \
|
tool_libinfod.obj \
|
||||||
tool_maind.obj \
|
tool_maind.obj \
|
||||||
|
tool_metalinkd.obj \
|
||||||
tool_mfilesd.obj \
|
tool_mfilesd.obj \
|
||||||
tool_msgsd.obj \
|
tool_msgsd.obj \
|
||||||
tool_operated.obj \
|
tool_operated.obj \
|
||||||
@@ -388,6 +390,8 @@ tool_libinfor.obj: tool_libinfo.c
|
|||||||
$(CCR) $(CFLAGS) /Fo"$@" tool_libinfo.c
|
$(CCR) $(CFLAGS) /Fo"$@" tool_libinfo.c
|
||||||
tool_mainr.obj: tool_main.c
|
tool_mainr.obj: tool_main.c
|
||||||
$(CCR) $(CFLAGS) /Fo"$@" tool_main.c
|
$(CCR) $(CFLAGS) /Fo"$@" tool_main.c
|
||||||
|
tool_metalinkr.obj: tool_metalink.c
|
||||||
|
$(CCR) $(CFLAGS) /Fo"$@" tool_metalink.c
|
||||||
tool_mfilesr.obj: tool_mfiles.c
|
tool_mfilesr.obj: tool_mfiles.c
|
||||||
$(CCR) $(CFLAGS) /Fo"$@" tool_mfiles.c
|
$(CCR) $(CFLAGS) /Fo"$@" tool_mfiles.c
|
||||||
tool_msgsr.obj: tool_msgs.c
|
tool_msgsr.obj: tool_msgs.c
|
||||||
@@ -472,6 +476,8 @@ tool_libinfod.obj: tool_libinfo.c
|
|||||||
$(CCD) $(CFLAGS) /Fo"$@" tool_libinfo.c
|
$(CCD) $(CFLAGS) /Fo"$@" tool_libinfo.c
|
||||||
tool_maind.obj: tool_main.c
|
tool_maind.obj: tool_main.c
|
||||||
$(CCD) $(CFLAGS) /Fo"$@" tool_main.c
|
$(CCD) $(CFLAGS) /Fo"$@" tool_main.c
|
||||||
|
tool_metalinkd.obj: tool_metalink.c
|
||||||
|
$(CCD) $(CFLAGS) /Fo"$@" tool_metalink.c
|
||||||
tool_mfilesd.obj: tool_mfiles.c
|
tool_mfilesd.obj: tool_mfiles.c
|
||||||
$(CCD) $(CFLAGS) /Fo"$@" tool_mfiles.c
|
$(CCD) $(CFLAGS) /Fo"$@" tool_mfiles.c
|
||||||
tool_msgsd.obj: tool_msgs.c
|
tool_msgsd.obj: tool_msgs.c
|
||||||
|
|||||||
@@ -823,7 +823,7 @@ ParameterError getparameter(char *flag, /* f or -long-flag */
|
|||||||
break;
|
break;
|
||||||
case 'J': /* --metalink */
|
case 'J': /* --metalink */
|
||||||
{
|
{
|
||||||
#ifdef HAVE_LIBMETALINK
|
#ifdef USE_METALINK
|
||||||
if(parse_metalink(config, nextarg) == -1) {
|
if(parse_metalink(config, nextarg) == -1) {
|
||||||
warnf(config, "Could not parse Metalink file: %s\n", nextarg);
|
warnf(config, "Could not parse Metalink file: %s\n", nextarg);
|
||||||
/* TODO Is PARAM_BAD_USE appropriate here? */
|
/* TODO Is PARAM_BAD_USE appropriate here? */
|
||||||
@@ -1563,9 +1563,9 @@ ParameterError getparameter(char *flag, /* f or -long-flag */
|
|||||||
if(curlinfo->features & feats[i].bitmask)
|
if(curlinfo->features & feats[i].bitmask)
|
||||||
printf("%s ", feats[i].name);
|
printf("%s ", feats[i].name);
|
||||||
}
|
}
|
||||||
#ifdef HAVE_LIBMETALINK
|
#ifdef USE_METALINK
|
||||||
printf("Metalink ");
|
printf("Metalink ");
|
||||||
#endif /* HAVE_LIBMETALINK */
|
#endif
|
||||||
puts(""); /* newline */
|
puts(""); /* newline */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
# include <fcntl.h>
|
# include <fcntl.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_LIBMETALINK
|
#ifdef USE_METALINK
|
||||||
|
|
||||||
#include <metalink/metalink_parser.h>
|
#include <metalink/metalink_parser.h>
|
||||||
|
|
||||||
@@ -416,7 +416,7 @@ int metalink_check_hash(struct Configurable *config,
|
|||||||
|
|
||||||
#endif /* METALINK_HASH_CHECK */
|
#endif /* METALINK_HASH_CHECK */
|
||||||
|
|
||||||
#ifdef HAVE_LIBMETALINK
|
#ifdef USE_METALINK
|
||||||
|
|
||||||
static metalink_checksum *new_metalink_checksum(const char *hash_name,
|
static metalink_checksum *new_metalink_checksum(const char *hash_name,
|
||||||
const char *hash_value)
|
const char *hash_value)
|
||||||
@@ -538,7 +538,7 @@ int parse_metalink(struct Configurable *config, const char *infile)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* HAVE_LIBMETALINK */
|
#endif /* USE_METALINK */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Returns nonzero if content_type includes mediatype.
|
* Returns nonzero if content_type includes mediatype.
|
||||||
@@ -621,4 +621,4 @@ void clean_metalink(struct Configurable *config)
|
|||||||
config->metalinkfile_last = 0;
|
config->metalinkfile_last = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* HAVE_LIBMETALINK */
|
#endif /* USE_METALINK */
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ typedef struct metalinkfile {
|
|||||||
/*
|
/*
|
||||||
* Counts the resource in the metalinkfile.
|
* Counts the resource in the metalinkfile.
|
||||||
*/
|
*/
|
||||||
#ifdef HAVE_LIBMETALINK
|
#ifdef USE_METALINK
|
||||||
int count_next_metalink_resource(metalinkfile *mlfile);
|
int count_next_metalink_resource(metalinkfile *mlfile);
|
||||||
void clean_metalink(struct Configurable *config);
|
void clean_metalink(struct Configurable *config);
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -1559,7 +1559,7 @@ int operate(struct Configurable *config, int argc, argv_item_t argv[])
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_LIBMETALINK
|
#ifdef USE_METALINK
|
||||||
if(!metalink && res == CURLE_OK && outs.filename) {
|
if(!metalink && res == CURLE_OK && outs.filename) {
|
||||||
/* Check the content-type header field and if it indicates
|
/* Check the content-type header field and if it indicates
|
||||||
Metalink file, parse it and add getout for them. */
|
Metalink file, parse it and add getout for them. */
|
||||||
@@ -1585,7 +1585,7 @@ int operate(struct Configurable *config, int argc, argv_item_t argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
# endif /* METALINK_HASH_CHECK */
|
# endif /* METALINK_HASH_CHECK */
|
||||||
#endif /* HAVE_LIBMETALINK */
|
#endif /* USE_METALINK */
|
||||||
|
|
||||||
/* No more business with this output struct */
|
/* No more business with this output struct */
|
||||||
if(outs.alloc_filename)
|
if(outs.alloc_filename)
|
||||||
|
|||||||
@@ -239,6 +239,10 @@ SOURCE=.\tool_main.c
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\tool_metalink.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\tool_mfiles.c
|
SOURCE=.\tool_mfiles.c
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
@@ -407,6 +411,10 @@ SOURCE=.\tool_main.h
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\tool_metalink.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\tool_mfiles.h
|
SOURCE=.\tool_mfiles.h
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|||||||
Reference in New Issue
Block a user