aboutsummaryrefslogtreecommitdiffstats
path: root/acinclude.m4
diff options
context:
space:
mode:
authorTatsuya Kinoshita <tats@vega.ocn.ne.jp>2011-05-04 07:23:02 +0000
committerTatsuya Kinoshita <tats@vega.ocn.ne.jp>2011-05-04 07:23:02 +0000
commit6db339b3d7a391f196e7c4b725a4ed0bd00f31cf (patch)
tree7d6fed976b72694d61fc595a745d394e1cd6e1a5 /acinclude.m4
parentAdding upstream version 0.5.1 (diff)
downloadw3m-6db339b3d7a391f196e7c4b725a4ed0bd00f31cf.tar.gz
w3m-6db339b3d7a391f196e7c4b725a4ed0bd00f31cf.zip
Adding upstream version 0.5.2upstream/0.5.2
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m460
1 files changed, 48 insertions, 12 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index dfa9692..e10b7ed 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -486,7 +486,6 @@ AC_ARG_WITH(ssl,
[with_ssl="yes"])
AC_MSG_RESULT($with_ssl)
if test x"$with_ssl" != xno; then
- AC_DEFINE(USE_SSL)
PKG_CHECK_MODULES(SSL, openssl,,[
AC_MSG_CHECKING(for SSL library/header)
test x"$with_ssl" = xyes && with_ssl="/usr/openssl /usr/ssl /usr /usr/local/openssl /usr/local/ssl /usr/local"
@@ -512,6 +511,7 @@ if test x"$with_ssl" != xno; then
[$SSL_LIBS -lcrypto])
if test x"$w3m_ssl" = xfound; then
+ AC_DEFINE(USE_SSL)
AC_MSG_CHECKING(if SSL certificate verify is enabled)
AC_ARG_ENABLE(sslverify,
[ --disable-sslverify verify SSL certificate],,
@@ -573,6 +573,7 @@ AC_DEFUN([AC_W3M_IMAGE],
INSTALL_W3MIMGDISPLAY='${INSTALL_PROGRAM}'
AC_DEFINE(INSTALL_W3MIMGDISPLAY, $INSTALL_W3MIMGDISPLAY)
AC_SUBST(USE_GDKPIXBUF)
+ AC_SUBST(USE_GTK2)
AC_SUBST(USE_IMLIB)
AC_SUBST(USE_IMLIB2)
AC_SUBST(IMGTARGETS)
@@ -618,16 +619,17 @@ AC_DEFUN([AC_W3M_IMAGE],
AC_ARG_WITH(imagelib,
[ --with-imagelib=IMAGELIBS image library
IMAGELIBS may be space separeted list of:
- gdk-pixbuf imlib imlib2],,
+ gtk2 gdk-pixbuf imlib imlib2],,
[with_imagelib="yes"])
if test x"$with_imagelib" = xyes; then
- with_imagelib="gdk-pixbuf imlib imlib2"
+ with_imagelib="gtk2 gdk-pixbuf imlib imlib2"
fi
AC_MSG_RESULT($with_imagelib)
with_imlib=no
with_imlib2=no
with_gdkpixbuf=no
+ with_gtk2=no
for imagelib in $with_imagelib
do
case "$imagelib" in
@@ -646,15 +648,31 @@ AC_DEFUN([AC_W3M_IMAGE],
if test x"$GDKPIXBUF_CONFIG" = x; then
GDKPIXBUF_CONFIG=gdk-pixbuf-config
fi;;
+ gtk2)
+ with_gtk2="yes"
+ if test x"$PKG_CONFIG" = x; then
+ PKG_CONFIG=pkg-config
+ else
+ PKG_CONFIG=:
+ fi;;
esac
done
IMGTARGETS=""
- if test x"$with_gdkpixbuf" = xyes; then
+ if test x"$with_gtk2" = xyes; then
AC_W3M_CHECK_VER([GdkPixbuf],
+ [`$PKG_CONFIG --modversion gdk-pixbuf-2.0 2>/dev/null`],
+ 2, 0, 0,
+ [have_gdkpixbuf="yes"; have_gtk2="yes"],
+ [have_gdkpixbuf="no"; have_gtk2="no"])
+ fi
+ if test x"$with_gdkpixbuf" = xyes; then
+ if test x"$have_gdkpixbuf" != xyes; then
+ AC_W3M_CHECK_VER([GdkPixbuf],
[`$GDKPIXBUF_CONFIG --version 2>/dev/null`],
0, 16, 0,
[have_gdkpixbuf="yes"],
[have_gdkpixbuf="no"])
+ fi
fi
if test x"$with_imlib" = xyes; then
AC_W3M_CHECK_VER([Imlib],
@@ -671,46 +689,64 @@ AC_DEFUN([AC_W3M_IMAGE],
[have_imlib2="no"])
fi
if test x"$x11" = xyes; then
- if test x"$have_gdkpixbuf" = xyes; then
+ if test x"$have_gtk2" = xyes; then
AC_DEFINE(USE_W3MIMG_X11)
+ IMGOBJS="$IMGOBJS x11/x11_w3mimg.o"
+ IMGTARGETS="x11"
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`"
+ elif test x"$have_gdkpixbuf" = xyes; then
+ AC_DEFINE(USE_W3MIMG_X11)
IMGOBJS="$IMGOBJS x11/x11_w3mimg.o"
+ IMGTARGETS="x11"
+ AC_DEFINE(USE_GDKPIXBUF)
IMGX11CFLAGS="`${GDKPIXBUF_CONFIG} --cflags`"
IMGX11LDFLAGS="`${GDKPIXBUF_CONFIG} --libs` -lgdk_pixbuf_xlib"
- IMGTARGETS="x11"
elif test x"$have_imlib" = xyes; then
AC_DEFINE(USE_W3MIMG_X11)
- AC_DEFINE(USE_IMLIB)
IMGOBJS="$IMGOBJS x11/x11_w3mimg.o"
+ IMGTARGETS="x11"
+ AC_DEFINE(USE_IMLIB)
IMGX11CFLAGS="`${IMLIB_CONFIG} --cflags`"
IMGX11LDFLAGS="`${IMLIB_CONFIG} --libs`"
IMGTARGETS="x11"
elif test x"$have_imlib2" = xyes; then
AC_DEFINE(USE_W3MIMG_X11)
- AC_DEFINE(USE_IMLIB2)
IMGOBJS="$IMGOBJS x11/x11_w3mimg.o"
+ IMGTARGETS="x11"
+ AC_DEFINE(USE_IMLIB2)
IMGX11CFLAGS="`${IMLIB2_CONFIG} --cflags`"
IMGX11LDFLAGS="`${IMLIB2_CONFIG} --libs`"
- IMGTARGETS="x11"
else
AC_MSG_WARN([unable to build w3mimgdisplay with X11 support])
fi
fi
if test x"$fb" = xyes; then
- if test x"$have_gdkpixbuf" = xyes; then
+ if test x"$have_gtk2" = xyes; then
AC_DEFINE(USE_W3MIMG_FB)
+ IMGOBJS="$IMGOBJS fb/fb_w3mimg.o fb/fb.o fb/fb_img.o"
+ IMGTARGETS="${IMGTARGETS} fb"
AC_DEFINE(USE_GDKPIXBUF)
+ AC_DEFINE(USE_GTK2)
+ IMGFBCFLAGS="`${PKG_CONFIG} --cflags gdk-pixbuf-2.0 gtk+-2.0`"
+ IMGFBLDFLAGS="`${PKG_CONFIG} --libs gdk-pixbuf-2.0 gtk+-2.0`"
+ elif test x"$have_gdkpixbuf" = xyes; then
+ AC_DEFINE(USE_W3MIMG_FB)
IMGOBJS="$IMGOBJS fb/fb_w3mimg.o fb/fb.o fb/fb_img.o"
+ IMGTARGETS="${IMGTARGETS} fb"
+ AC_DEFINE(USE_GDKPIXBUF)
IMGFBCFLAGS="`${GDKPIXBUF_CONFIG} --cflags`"
IMGFBLDFLAGS="`${GDKPIXBUF_CONFIG} --libs`"
- IMGTARGETS="${IMGTARGETS} fb"
elif test x"$have_imlib2" = xyes; then
AC_DEFINE(USE_W3MIMG_FB)
+ IMGOBJS="$IMGOBJS fb/fb_w3mimg.o fb/fb.o fb/fb_img.o"
+ IMGTARGETS="${IMGTARGETS} fb"
AC_DEFINE(USE_IMLIB2)
IMGOBJS="$IMGOBJS fb/fb_w3mimg.o fb/fb.o fb/fb_img.o"
IMGFBCFLAGS="`${IMLIB2_CONFIG} --cflags`"
IMGFBLDFLAGS="`${IMLIB2_CONFIG} --libs`"
- IMGTARGETS="${IMGTARGETS} fb"
else
AC_MSG_WARN([unable to build w3mimgdisplay with FB support])
fi