Subject: Explicitly add -lX11 to IMGX11LDFLAGS only when gtk2 From: Tatsuya Kinoshita Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=605761 Bug: https://sourceforge.net/p/w3m/patches/57/ diff --git a/acinclude.m4 b/acinclude.m4 index e4ccc3d..3b180dd 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -706,7 +706,7 @@ AC_DEFUN([AC_W3M_IMAGE], AC_DEFINE(USE_GDKPIXBUF) AC_DEFINE(USE_GTK2) IMGX11CFLAGS="`${PKG_CONFIG} --cflags gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0 gtk+-2.0`" - IMGX11LDFLAGS="`${PKG_CONFIG} --libs gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0 gtk+-2.0`" + IMGX11LDFLAGS="-lX11 `${PKG_CONFIG} --libs gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0 gtk+-2.0`" elif test x"$have_gdkpixbuf" = xyes; then AC_DEFINE(USE_W3MIMG_X11) IMGOBJS="$IMGOBJS x11/x11_w3mimg.o" diff --git a/configure b/configure index 4c1bc06..30edf21 100755 --- a/configure +++ b/configure @@ -6927,7 +6927,7 @@ $as_echo "$as_me: WARNING: Imlib2 is not installed. Install Imlib2 (version >= $as_echo "#define USE_GTK2 1" >>confdefs.h IMGX11CFLAGS="`${PKG_CONFIG} --cflags gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0 gtk+-2.0`" - IMGX11LDFLAGS="`${PKG_CONFIG} --libs gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0 gtk+-2.0`" + IMGX11LDFLAGS="-lX11 `${PKG_CONFIG} --libs gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0 gtk+-2.0`" elif test x"$have_gdkpixbuf" = xyes; then $as_echo "#define USE_W3MIMG_X11 1" >>confdefs.h