1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-16 06:25:03 -05:00

configure.ac: verify that libmetalink is new enough

Enabling test2017 to test2022.
This commit is contained in:
Yang Tse 2012-07-02 16:42:54 +02:00
parent 89b431f60f
commit 069b280f63
3 changed files with 37 additions and 16 deletions

View File

@ -2318,15 +2318,42 @@ if test X"$OPT_LIBMETALINK" != Xno; then
fi fi
if test -n "$addlib"; then if test -n "$addlib"; then
AC_MSG_NOTICE([detected libmetalink version $version]) clean_CPPFLAGS="$CPPFLAGS"
curl_mtlnk_msg="enabled" clean_LDFLAGS="$LDFLAGS"
clean_LIBS="$LIBS"
CPPFLAGS="$addcflags $clean_CPPFLAGS"
LDFLAGS="$addld $clean_LDFLAGS"
LIBS="$addlib $clean_LIBS"
AC_MSG_CHECKING([if libmetalink is recent enough])
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
# include <metalink/metalink.h>
]],[[
if(0 != metalink_strerror(0)) /* added in 0.1.0 */
return 1;
]])
],[
AC_MSG_RESULT([yes ($version)])
want_metalink="yes"
],[
AC_MSG_RESULT([no ($version)])
AC_MSG_NOTICE([libmetalink library defective or too old])
want_metalink="no"
])
CPPFLAGS="$clean_CPPFLAGS"
LDFLAGS="$clean_LDFLAGS"
LIBS="$clean_LIBS"
if test "$want_metalink" = "yes"; then
dnl finally libmetalink will be used
AC_DEFINE(USE_METALINK, 1, [Define to enable metalink support])
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(USE_METALINK, 1, [Define to enable metalink support]) curl_mtlnk_msg="enabled"
fi
fi fi
fi fi

View File

@ -5,9 +5,3 @@
594 594
1209 1209
1211 1211
2017
2018
2019
2020
2021
2022

View File

@ -95,7 +95,7 @@ test1400 test1401 test1402 test1403 test1404 test1405 test1406 test1407 \
test1408 \ test1408 \
test2000 test2001 test2002 test2003 test2004 test2005 test2006 test2007 \ test2000 test2001 test2002 test2003 test2004 test2005 test2006 test2007 \
test2008 test2009 test2010 test2011 test2012 test2013 test2014 test2015 \ test2008 test2009 test2010 test2011 test2012 test2013 test2014 test2015 \
test2016 test2017 test2016 test2017 test2018 test2019 test2020 test2021 test2022
EXTRA_DIST = $(TESTCASES) DISABLED EXTRA_DIST = $(TESTCASES) DISABLED