Nmap Development mailing list archives
GTK+ test broken in configure.ac
From: David Fifield <david () bamsoftware com>
Date: Thu, 18 Oct 2007 12:41:45 -0600
The test for GTK+ in the main configure.ac fails with a syntax error if GTK+ 2.0 is not present: checking If you have GTK+ installed... ./configure[7104]: test: 2: unexpected operator/operand This is caused by this snippet in configure.ac: GTK_NEEDED_MAJOR=2 GTK_NEEDED_MINOR=4 GTK_NEEDED_MICRO=0 GTK_MINVERSION=$GTK_NEEDED_MAJOR.$GTK_NEEDED_MINOR.$GTK_NEEDED_MICRO ver=`pkg-config --modversion gtk+-2.0` dnl Extract the information. major=`echo $ver|sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` minor=`echo $ver|sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` micro=`echo $ver|sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` AC_MSG_RESULT($ver) if test $major -lt $GTK_NEEDED_MAJOR -o $major -eq $GTK_NEEDED_MAJOR \ -a $minor -lt $GTK_NEEDED_MINOR -o $minor -eq $GTK_NEEDED_MINOR \ -a $micro -lt $GTK_NEEDED_MICRO; then If GTK+ is not installed, `pkg-config --modversion gtk+-2.0` returns nothing; hence $major, $minor, and $micro are blank. This bug is harmless; by coincidence the test failing because of improper syntax has the same effect as it failing because GTK+ is too old. Nevertheless, the attached patch causes configure.ac to use AM_PATH_GTK_2_0 just like nmapfe/configure.ac does. It also moves the definition of the RECVFROM_ARG6_TYPE macro to acinclude.m4 where it belongs. David Fifield
Attachment:
gtk-config.diff
Description:
_______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://SecLists.Org
Current thread:
- GTK+ test broken in configure.ac David Fifield (Oct 18)
- Re: GTK+ test broken in configure.ac David Fifield (Oct 22)