diff options
author | Yang Tse <yangsita@gmail.com> | 2012-07-02 16:42:54 +0200 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2012-07-02 16:42:54 +0200 |
commit | 069b280f63a2ba5b0f7e751f7319719e6f52f7c7 (patch) | |
tree | b267940df921247c6edcdf334e9e8d9b9f99ee26 | |
parent | 89b431f60fd4d0a91ac120fbb78641f887671606 (diff) | |
download | curl-069b280f63a2ba5b0f7e751f7319719e6f52f7c7.tar.gz |
configure.ac: verify that libmetalink is new enough
Enabling test2017 to test2022.
-rw-r--r-- | configure.ac | 45 | ||||
-rw-r--r-- | tests/data/DISABLED | 6 | ||||
-rw-r--r-- | tests/data/Makefile.am | 2 |
3 files changed, 37 insertions, 16 deletions
diff --git a/configure.ac b/configure.ac index da9f75e19..f8771ef83 100644 --- a/configure.ac +++ b/configure.ac @@ -2318,15 +2318,42 @@ if test X"$OPT_LIBMETALINK" != Xno; then fi if test -n "$addlib"; then - AC_MSG_NOTICE([detected libmetalink version $version]) - 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(USE_METALINK, 1, [Define to enable metalink support]) + clean_CPPFLAGS="$CPPFLAGS" + 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_LDFLAGS=$addld + LIBMETALINK_CFLAGS=$addcflags + AC_SUBST([LIBMETALINK_LIBS]) + AC_SUBST([LIBMETALINK_LDFLAGS]) + AC_SUBST([LIBMETALINK_CFLAGS]) + curl_mtlnk_msg="enabled" + fi fi fi diff --git a/tests/data/DISABLED b/tests/data/DISABLED index 77625d507..5a0f2bf95 100644 --- a/tests/data/DISABLED +++ b/tests/data/DISABLED @@ -5,9 +5,3 @@ 594 1209 1211 -2017 -2018 -2019 -2020 -2021 -2022 diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am index 5136b419e..1170a15db 100644 --- a/tests/data/Makefile.am +++ b/tests/data/Makefile.am @@ -95,7 +95,7 @@ test1400 test1401 test1402 test1403 test1404 test1405 test1406 test1407 \ test1408 \ test2000 test2001 test2002 test2003 test2004 test2005 test2006 test2007 \ test2008 test2009 test2010 test2011 test2012 test2013 test2014 test2015 \ -test2016 test2017 +test2016 test2017 test2018 test2019 test2020 test2021 test2022 EXTRA_DIST = $(TESTCASES) DISABLED |