[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
autoconf: library version comparsion fails
From: |
Gavriel Fleischer |
Subject: |
autoconf: library version comparsion fails |
Date: |
Mon, 25 Feb 2008 02:42:41 +0200 |
Package: autoconf
Version: 2.61-4
Severity: important
*** Please type your report below this line ***
When autoconf generates a configure script, the following line is translated
wrong:
GP_CHECK_LIBRARY([LIBGPHOTO2], [libgphoto2], [>= 2.3.1.3.trunk])
When I have libgphoto 2.4.0 installed, and 2.3.1.3.trunk or greater is
required, the code fails to check, because of the
following:
_tmp=false
if test "2" "-lt" "2"; then _tmp=true; # false
elif test "4" "-lt" "3"; then _tmp=true; # false
elif test "0" "-lt" "1"; then _tmp=true; # TRUE!
elif test "x" = "x" && test "x.3.trunk" != "x"; then _tmp=true;
elif test "" "-lt" ".3.trunk"; then _tmp=true;
fi
Although 2.4 > 2.3, 0 < 1, and the comparsion fails.
The translation of
GP_CHECK_LIBRARY([LIBGPHOTO2], [libgphoto2], [>= 2.3.1.3.trunk])
is this:
......................... >8 ....................................
if test -n "${LIBGPHOTO2_CONFIG_PROG}" &&
test "${LIBGPHOTO2_CONFIG_PROG}" != "none";
then
{ echo "$as_me:$LINENO: checking for
libgphoto2 version according to gphoto2-config" >&5
echo $ECHO_N "checking for libgphoto2 version according to gphoto2-config...
$ECHO_C" >&6; }
_LIBGPHOTO2_COMPN="-lt"
_LIBGPHOTO2_REQ_1="2"
_LIBGPHOTO2_REQ_2="3"
_LIBGPHOTO2_REQ_3="1"
_LIBGPHOTO2_REQ_4=".3.trunk"
# split installed version number via shell
# and sed
_LIBGPHOTO2_VERSION="$("${LIBGPHOTO2_CONFIG_PROG}"
--version | sed 's/^.* //')"
_LIBGPHOTO2_VER_1="$(echo
"${_LIBGPHOTO2_VERSION}" | sed 's/\([0-9]*\).*/\1/g')"
_LIBGPHOTO2_VER_2="$(echo
"${_LIBGPHOTO2_VERSION}" | sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/g')"
_LIBGPHOTO2_VER_3="$(echo
"${_LIBGPHOTO2_VERSION}" | sed
's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\3/g')"
_LIBGPHOTO2_VER_4="$(echo
"${_LIBGPHOTO2_VERSION}" | sed
's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)\(.*\)/\4/g')"
{ echo "$as_me:$LINENO: result:
${_LIBGPHOTO2_VERSION}" >&5
echo "${ECHO_T}${_LIBGPHOTO2_VERSION}" >&6; }
_tmp=false
if test "${_LIBGPHOTO2_VER_1}"
"${_LIBGPHOTO2_COMPN}"
"${_LIBGPHOTO2_REQ_1}"; then _tmp=true;
elif test "${_LIBGPHOTO2_VER_2}"
"${_LIBGPHOTO2_COMPN}"
"${_LIBGPHOTO2_REQ_2}"; then _tmp=true;
elif test "${_LIBGPHOTO2_VER_3}"
"${_LIBGPHOTO2_COMPN}"
"${_LIBGPHOTO2_REQ_3}"; then _tmp=true;
elif test "x${_LIBGPHOTO2_VER_4}" = "x" &&
test "x${_LIBGPHOTO2_REQ_4}" != "x"; then
_tmp=true;
elif test "${_LIBGPHOTO2_VER_4}"
"${_LIBGPHOTO2_COMPN}"
"${_LIBGPHOTO2_REQ_4}"; then _tmp=true;
fi
......................... 8< ..................................
-- System Information:
Debian Release: lenny/sid
APT prefers gutsy-updates
APT policy: (500, 'gutsy-updates'), (500, 'gutsy-security'), (500,
'gutsy')
Architecture: i386 (i686)
Kernel: Linux 2.6.24-3-usb
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages autoconf depends on:
ii debianutils 2.22.1 Miscellaneous utilities
specific t
ii m4 1.4.10-0ubuntu2 a macro processing language
ii perl 5.8.8-7ubuntu3.1 Larry Wall's Practical
Extraction
Versions of packages autoconf recommends:
ii automake1.7 [automaken] 1.7.9-9 A tool for generating GNU
Standard
-- no debconf information
- autoconf: library version comparsion fails,
Gavriel Fleischer <=