aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac10
-rw-r--r--packages/Symbian/group/curl.mmp1
-rw-r--r--src/Makefile.inc8
-rw-r--r--src/Makefile.vc66
-rw-r--r--src/tool_getparam.c6
-rw-r--r--src/tool_metalink.c8
-rw-r--r--src/tool_metalink.h2
-rw-r--r--src/tool_operate.c4
-rw-r--r--src/vc6curlsrc.dsp8
9 files changed, 34 insertions, 19 deletions
diff --git a/configure.ac b/configure.ac
index ef3ef77ea..8e7fe6d6d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -163,8 +163,9 @@ curl_verbose_msg="enabled (--disable-verbose)"
curl_ldaps_msg="no (--enable-ldaps)"
curl_rtsp_msg="no (--enable-rtsp)"
curl_rtmp_msg="no (--with-librtmp)"
+ curl_mtlnk_msg="no (--with-libmetalink)"
+
init_ssl_msg=${curl_ssl_msg}
-curl_metalink_msg="no (--with-libmetalink)"
dnl
dnl Save anything in $LIBS for later
@@ -2265,18 +2266,17 @@ if test X"$OPT_LIBMETALINK" != Xno; then
if test -n "$addlib"; then
AC_MSG_NOTICE([detected libmetalink version $version])
- curl_metalink_msg="enabled"
+ curl_mtlnk_msg="enabled"
LIBMETALINK_LIBS=$addlib
LIBMETALINK_LDFLAGS=$addld
LIBMETALINK_CFLAGS=$addcflags
AC_SUBST([LIBMETALINK_LIBS])
AC_SUBST([LIBMETALINK_LDFLAGS])
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
-AM_CONDITIONAL([HAVE_LIBMETALINK], [test -n "$LIBMETALINK_LIBS"])
dnl **********************************************************************
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}
RTSP support: ${curl_rtsp_msg}
RTMP support: ${curl_rtmp_msg}
- metalink support: ${curl_metalink_msg}
+ metalink support: ${curl_mtlnk_msg}
Protocols: ${SUPPORT_PROTOCOLS}
])
diff --git a/packages/Symbian/group/curl.mmp b/packages/Symbian/group/curl.mmp
index 3b6d22a11..ab9a8fa7a 100644
--- a/packages/Symbian/group/curl.mmp
+++ b/packages/Symbian/group/curl.mmp
@@ -30,6 +30,7 @@ SOURCE \
tool_homedir.c \
tool_libinfo.c \
tool_main.c \
+ tool_metalink.c \
tool_mfiles.c \
tool_msgs.c \
tool_operate.c \
diff --git a/src/Makefile.inc b/src/Makefile.inc
index 3265ea9d8..76d6b7b7a 100644
--- a/src/Makefile.inc
+++ b/src/Makefile.inc
@@ -36,6 +36,7 @@ CURL_CFILES = hugehelp.c \
tool_homedir.c \
tool_libinfo.c \
tool_main.c \
+ tool_metalink.c \
tool_mfiles.c \
tool_msgs.c \
tool_operate.c \
@@ -50,8 +51,7 @@ CURL_CFILES = hugehelp.c \
tool_vms.c \
tool_writeenv.c \
tool_writeout.c \
- tool_xattr.c \
- tool_metalink.c
+ tool_xattr.c
CURL_HFILES = hugehelp.h \
tool_binmode.h \
@@ -75,6 +75,7 @@ CURL_HFILES = hugehelp.h \
tool_homedir.h \
tool_libinfo.h \
tool_main.h \
+ tool_metalink.h \
tool_mfiles.h \
tool_msgs.h \
tool_operate.h \
@@ -92,8 +93,7 @@ CURL_HFILES = hugehelp.h \
tool_vms.h \
tool_writeenv.h \
tool_writeout.h \
- tool_xattr.h \
- tool_metalink.h
+ tool_xattr.h
curl_SOURCES = $(CURL_CFILES) $(CURLX_ONES) $(CURL_HFILES)
diff --git a/src/Makefile.vc6 b/src/Makefile.vc6
index 650246fe6..f8b30669b 100644
--- a/src/Makefile.vc6
+++ b/src/Makefile.vc6
@@ -158,6 +158,7 @@ RELEASE_OBJS= \
tool_homedirr.obj \
tool_libinfor.obj \
tool_mainr.obj \
+ tool_metalinkr.obj \
tool_mfilesr.obj \
tool_msgsr.obj \
tool_operater.obj \
@@ -201,6 +202,7 @@ DEBUG_OBJS= \
tool_homedird.obj \
tool_libinfod.obj \
tool_maind.obj \
+ tool_metalinkd.obj \
tool_mfilesd.obj \
tool_msgsd.obj \
tool_operated.obj \
@@ -388,6 +390,8 @@ tool_libinfor.obj: tool_libinfo.c
$(CCR) $(CFLAGS) /Fo"$@" tool_libinfo.c
tool_mainr.obj: 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
$(CCR) $(CFLAGS) /Fo"$@" tool_mfiles.c
tool_msgsr.obj: tool_msgs.c
@@ -472,6 +476,8 @@ tool_libinfod.obj: tool_libinfo.c
$(CCD) $(CFLAGS) /Fo"$@" tool_libinfo.c
tool_maind.obj: 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
$(CCD) $(CFLAGS) /Fo"$@" tool_mfiles.c
tool_msgsd.obj: tool_msgs.c
diff --git a/src/tool_getparam.c b/src/tool_getparam.c
index c8dc7ae14..cc01efb18 100644
--- a/src/tool_getparam.c
+++ b/src/tool_getparam.c
@@ -823,7 +823,7 @@ ParameterError getparameter(char *flag, /* f or -long-flag */
break;
case 'J': /* --metalink */
{
-#ifdef HAVE_LIBMETALINK
+#ifdef USE_METALINK
if(parse_metalink(config, nextarg) == -1) {
warnf(config, "Could not parse Metalink file: %s\n", nextarg);
/* 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)
printf("%s ", feats[i].name);
}
-#ifdef HAVE_LIBMETALINK
+#ifdef USE_METALINK
printf("Metalink ");
-#endif /* HAVE_LIBMETALINK */
+#endif
puts(""); /* newline */
}
}
diff --git a/src/tool_metalink.c b/src/tool_metalink.c
index 58aae831d..375cdd3b2 100644
--- a/src/tool_metalink.c
+++ b/src/tool_metalink.c
@@ -31,7 +31,7 @@
# include <fcntl.h>
#endif
-#ifdef HAVE_LIBMETALINK
+#ifdef USE_METALINK
#include <metalink/metalink_parser.h>
@@ -416,7 +416,7 @@ int metalink_check_hash(struct Configurable *config,
#endif /* METALINK_HASH_CHECK */
-#ifdef HAVE_LIBMETALINK
+#ifdef USE_METALINK
static metalink_checksum *new_metalink_checksum(const char *hash_name,
const char *hash_value)
@@ -538,7 +538,7 @@ int parse_metalink(struct Configurable *config, const char *infile)
return 0;
}
-#endif /* HAVE_LIBMETALINK */
+#endif /* USE_METALINK */
/*
* Returns nonzero if content_type includes mediatype.
@@ -621,4 +621,4 @@ void clean_metalink(struct Configurable *config)
config->metalinkfile_last = 0;
}
-#endif /* HAVE_LIBMETALINK */
+#endif /* USE_METALINK */
diff --git a/src/tool_metalink.h b/src/tool_metalink.h
index 25feddcad..c38240241 100644
--- a/src/tool_metalink.h
+++ b/src/tool_metalink.h
@@ -52,7 +52,7 @@ typedef struct metalinkfile {
/*
* Counts the resource in the metalinkfile.
*/
-#ifdef HAVE_LIBMETALINK
+#ifdef USE_METALINK
int count_next_metalink_resource(metalinkfile *mlfile);
void clean_metalink(struct Configurable *config);
#else
diff --git a/src/tool_operate.c b/src/tool_operate.c
index 7c70fd2da..2da92ca44 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -1559,7 +1559,7 @@ int operate(struct Configurable *config, int argc, argv_item_t argv[])
}
#endif
-#ifdef HAVE_LIBMETALINK
+#ifdef USE_METALINK
if(!metalink && res == CURLE_OK && outs.filename) {
/* Check the content-type header field and if it indicates
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 /* HAVE_LIBMETALINK */
+#endif /* USE_METALINK */
/* No more business with this output struct */
if(outs.alloc_filename)
diff --git a/src/vc6curlsrc.dsp b/src/vc6curlsrc.dsp
index a2d9e7bf9..7c757654d 100644
--- a/src/vc6curlsrc.dsp
+++ b/src/vc6curlsrc.dsp
@@ -239,6 +239,10 @@ SOURCE=.\tool_main.c
# End Source File
# Begin Source File
+SOURCE=.\tool_metalink.c
+# End Source File
+# Begin Source File
+
SOURCE=.\tool_mfiles.c
# End Source File
# Begin Source File
@@ -407,6 +411,10 @@ SOURCE=.\tool_main.h
# End Source File
# Begin Source File
+SOURCE=.\tool_metalink.h
+# End Source File
+# Begin Source File
+
SOURCE=.\tool_mfiles.h
# End Source File
# Begin Source File