patch to get --with-png working on FreeBSD
Posted: 2011-10-11T22:22:32-07:00
I was having trouble getting configure to enable PNG on FreeBSD 8.1-rel. Googling for "test: no: unexpected operator" I discovered viewtopic.php?t=16644&p=61122, and I found the same problem exists for PNG. I patched up configure and everything seems to work.
Code: Select all
*** configure Sun Oct 9 11:48:22 2011
--- configure.fixed Tue Oct 11 22:21:26 2011
***************
*** 30070,30077 ****
if test $passed -gt 0; then
for var in 5 4 2 '' ; do
! if test "$have_png" == 'no' ; then
! if test "x${var}" == 'x' ; then
pnglib='png'
else
pnglib="png1${var}"
--- 30070,30077 ----
if test $passed -gt 0; then
for var in 5 4 2 '' ; do
! if test "$have_png" = 'no' ; then
! if test "x${var}" = 'x' ; then
pnglib='png'
else
pnglib="png1${var}"
***************
*** 30080,30086 ****
# Test for compatible LIBPNG library
failed=0
passed=0
! if test "$with_png" == 'yes' -o "$with_png" == "libpng1${var}" ; then
if test "${pnglib}" != 'png' ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBPNG1${var} support " >&5
$as_echo_n "checking for LIBPNG1${var} support ... " >&6; }
--- 30080,30086 ----
# Test for compatible LIBPNG library
failed=0
passed=0
! if test "$with_png" = 'yes' -o "$with_png" = "libpng1${var}" ; then
if test "${pnglib}" != 'png' ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBPNG1${var} support " >&5
$as_echo_n "checking for LIBPNG1${var} support ... " >&6; }