Handling of --without-* in gtkpod's configure script

Daniele Forsi <[email protected]> Wed, 11 Jul 2012 17:42:00 +0200
Newsgroups gmane.comp.ipod.gtkpod
Message-ID <CAN_we7NFG5+Lm=_uD-XE0BTv1m4gbmhcXe_c5t7aqbPWR4n-KA@mail.gmail.com>
Hello,

the check for --without-* is wrong for curl and for OGG and when
running ./configure without arguments I get this error:
configure: error: Ogg/Vorbis support explicitly requested but
ogg/vorbis libs could not be found

I have installed only the prerequisites for curl, not for OGG nor FLAC
(but the check for FLAC is different):

AC_ARG_WITH(curl, AS_HELP_STRING([--without-curl],[Disable coverart
download support]))
if test "x$with_curl" != "xno" -a "x$have_curl" = "xno"; then
	AC_MSG_ERROR([curl support explicitly requested but curl could not be found])
[...]
AC_ARG_WITH(ogg, AS_HELP_STRING([--without-ogg],[Disable Ogg/Vorbis support]))
if test "x$with_ogg" != "xno" -a "x$have_vorbis" = "xno"; then
    AC_MSG_ERROR([Ogg/Vorbis support explicitly requested but
ogg/vorbis libs could not be found])
[...]
AC_ARG_WITH(flac, AS_HELP_STRING([--without-flac],[Disable FLAC support]))
if test "xwith_flac" = "xyes" -a "x$have_flac" = "xno"; then
	AC_MSG_ERROR([FLAC support explicitly requested but flac libs could
not be found])
[...]

It's not stated in the docs
http://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/External-Software.html
but it seems that the variable isn't set when the argument is not
given on ./configure's command line (the docs say that it's "yes" or
"no" when it is given) and all the examples in that page set a default
value in the [action-if-not-given] and l ibgpod does the same

since there are several ways to fix that, it's better if phantomjinx
can look at it
-- 
Daniele Forsi

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/