curl-library
wrong use of AC_ARG_WITH in configure.ac
Date: Mon, 14 Mar 2011 07:19:12 +0100
hey,
there are a lots of improvements that can be done in the configure.ac file,
but first, i would like to mention a wrong use of AC_ARG_WITH for libssh2
path check:
OPT_LIBSSH2=off
AC_ARG_WITH(libssh2,dnl
AC_HELP_STRING([--with-libssh2=PATH],[Where to look for libssh2, PATH points
to the LIBSSH2 installation (default: /usr/local/lib); when possible, set
the PKG_CONFIG_PATH environment variable instead of using this option])
AC_HELP_STRING([--without-libssh2], [disable LIBSSH2]),
OPT_LIBSSH2=$withval)
There is no need to add AC_HELP_STRING([--without-libssh2], [disable
LIBSSH2]) if a default value is given. If you want to enable/disable libssh2
check, use AC_ARG_ENABLE.
In addition, contrary to what is said, default value is not
"/usr/local/lib". It's "off"
I would suggest something like that:
AC_ARG_ENABLE([libssh2],
[AC_HELP_STRING([--enable-libssh2], [enable use of libssh2
@<:@default==enabled@:>@])],
[
if test "x${enableval}" = "xyes"; then
want_libssh2="yes"
else
want_libssh2="no"
fi
],
[want_libssh2="yes"])
AC_ARG_WITH(libssh2,dnl
[AC_HELP_STRING([--with-libssh2=PATH],[Where to look for libssh2, PATH
points to the LIBSSH2 installation (default: /usr/local/lib); when possible,
set the PKG_CONFIG_PATH environment variable instead of using this option]),
OPT_LIBSSH2=$withval,
OPT_LIBSSH2=/usr/local/lib)
and instead of
if test X"$OPT_LIBSSH2" != Xno; then
use
if test X"$want_libssh2" = Xyes; then
regards
Vincent Torri
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-03-14