[Buildroot] [PATCH v2] icecast: new package
Ezequiel Garcia
ezequiel.garcia at free-electrons.com
Wed Jul 17 10:25:11 UTC 2013
On Wed, Jul 17, 2013 at 12:19:05PM +0200, Thomas Petazzoni wrote:
> Dear Ezequiel Garcia,
>
> On Wed, 17 Jul 2013 07:06:47 -0300, Ezequiel Garcia wrote:
>
> > +diff -Naur icecast-2.3.3/m4/xiph_curl.m4 icecast-2.3.3-patched/m4/xiph_curl.m4
> > +--- icecast-2.3.3/m4/xiph_curl.m4 2012-06-11 13:45:26.000000000 -0300
> > ++++ icecast-2.3.3-patched/m4/xiph_curl.m4 2013-07-17 06:58:02.000000000 -0300
> > +@@ -48,28 +48,10 @@
> > + dnl
> > + dnl Now check if the installed libcurl is sufficiently new.
> > + dnl
> > +-AC_CHECK_HEADERS([curl/curl.h],, curl_ok="no")
> > + AC_MSG_CHECKING(for libcurl)
> > +-if test "$curl_ok" = "yes"
> > +-then
> > +- AC_RUN_IFELSE(AC_LANG_SOURCE([
> > +-#include <curl/curl.h>
> > +-int main()
> > +-{
> > +- return 0;
> > +-}
> > +-]),,[curl_ok="no"])
> > +-fi
> > +-if test "$curl_ok" = "yes"; then
> > +- AC_MSG_RESULT(yes)
> > +- AC_DEFINE(HAVE_CURL, 1, [Define if you have libcurl.])
> > +- ifelse([$1], , :, [$1])
> > +-else
> > +- AC_MSG_RESULT(no)
> > +- CURL_LIBS=""
> > +- CURL_CFLAGS=""
> > +- ifelse([$2], , :, [$2])
> > +-fi
> > ++AC_MSG_RESULT(yes)
> > ++AC_DEFINE(HAVE_CURL, 1, [Define if you have libcurl.])
> > ++ifelse([$1], , :, [$1])
>
> So here you're completely removing the curl check and assume that it is
> always present?
>
>
> > +ifeq ($(BR2_PACKAGE_LIBCURL),y)
> > +ICECAST_DEPENDENCIES += libcurl
> > +ICECAST_CONF_OPT += --with-curl-config=$(STAGING_DIR)/usr/bin/curl-config
> > +else
> > +ICECAST_CONF_OPT += --without-curl
> > +endif
>
> and here curl is still optional?
>
Doh, silly uh?
> Regarding the xiph_curl.m4 check, you could turn it into an AC_TRY_LINK
> test, like is done for Speex, Theora and so on. Or maybe even keep only
> the AC_CHECK_HEADERS() as an indication of whether curl is available or
> not.
>
Mmm... okay, I'll try AC_TRY_LINK. The AC_CHECK_HEADERS *need* to be removed
because they produce a very silly error:
as_fn_error $? "cannot run test program while cross compiling"
And this "as_fn_error" makes the configure exit with error. This happens
even when curl is installed and available, and is the reason of this
ugly patch.
--
Ezequiel García, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com
More information about the buildroot
mailing list