aboutsummaryrefslogtreecommitdiffstats
path: root/aclocal.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 /aclocal.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 '')
-rw-r--r--aclocal.m495
1 files changed, 66 insertions, 29 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index 4e5529c..dca6dda 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -295,18 +295,6 @@ AC_DEFUN([AC_W3M_KEYMAP],
AC_DEFINE_UNQUOTED(KEYBIND, $enable_keymap)])
#
# ----------------------------------------------------------------
-# AC_W3M_DIGEST_AUTH
-# ----------------------------------------------------------------
-AC_DEFUN([AC_W3M_DIGEST_AUTH],
-[AC_SUBST(USE_DIGEST_AUTH)
- AC_MSG_CHECKING(if digest auth is enabled)
- AC_ARG_ENABLE(digest_auth,
- [ --disable-digest-auth disable digest auth],,
- [enable_digest_auth="yes"])
- test x"$enable_digest_auth" = xyes && AC_DEFINE(USE_DIGEST_AUTH)
- AC_MSG_RESULT($enable_digest_auth)])
-#
-# ----------------------------------------------------------------
# AC_W3M_MIGEMO
# ----------------------------------------------------------------
AC_DEFUN([AC_W3M_MIGEMO],
@@ -438,6 +426,7 @@ AC_ARG_WITH(termlib,
# ----------------------------------------------------------------
AC_DEFUN([AC_W3M_GC],
[AC_MSG_CHECKING(GC library exists)
+AC_SUBST(LIBGC)
AC_ARG_WITH(gc,
[ --with-gc[=PREFIX] libgc PREFIX],
[test x"$with_gc" = xno && AC_MSG_ERROR([You can not build w3m without gc])],
@@ -468,7 +457,7 @@ AC_ARG_WITH(gc,
fi
fi
unset ac_cv_lib_gc_GC_init
- AC_CHECK_LIB(gc, GC_init, [LIBS="$LIBS -lgc"])
+ AC_CHECK_LIB(gc, GC_init, [LIBGC="-lgc"])
if test x"$ac_cv_lib_gc_GC_init" = xno; then
AC_MSG_CHECKING(GC library location)
AC_MSG_RESULT($with_gc)
@@ -478,7 +467,7 @@ AC_ARG_WITH(gc,
LDFLAGS="$LDFLAGS -L$dir/lib"
AC_MSG_CHECKING($dir)
unset ac_cv_lib_gc_GC_init
- AC_CHECK_LIB(gc, GC_init, [gclibdir="$dir/lib"; LIBS="$LIBS -L$dir/lib -lgc"; break])
+ AC_CHECK_LIB(gc, GC_init, [gclibdir="$dir/lib"; LIBGC="-L$dir/lib -lgc"; break])
LDFLAGS="$ldflags"
done
if test x"$gclibdir" = xno; then
@@ -487,9 +476,9 @@ AC_ARG_WITH(gc,
fi])
#
# ----------------------------------------------------------------
-# AC_W3M_SSL
+# AC_W3M_SSL_DIGEST_AUTH
# ----------------------------------------------------------------
-AC_DEFUN([AC_W3M_SSL],
+AC_DEFUN([AC_W3M_SSL_DIGEST_AUTH],
[AC_SUBST(USE_SSL)
AC_SUBST(USE_SSL_VERIFY)
AC_MSG_CHECKING(if SSL is suported)
@@ -498,7 +487,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"
@@ -524,6 +512,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],,
@@ -531,7 +520,19 @@ if test x"$with_ssl" != xno; then
test x"$enable_sslverify" = xyes && AC_DEFINE(USE_SSL_VERIFY)
AC_MSG_RESULT($enable_sslverify)
fi
-fi])
+fi
+AC_SUBST(USE_DIGEST_AUTH)
+AC_MSG_CHECKING(if digest auth is enabled)
+AC_ARG_ENABLE(digest_auth,
+ [ --disable-digest-auth disable digest auth],,
+ [enable_digest_auth="yes"])
+if test x"$enable_digest_auth" = xyes -a x"$w3m_ssl" = xfound; then
+ AC_DEFINE(USE_DIGEST_AUTH)
+else
+ enable_digest_auth="no"
+fi
+AC_MSG_RESULT($enable_digest_auth)
+])
#
# ----------------------------------------------------------------
# AC_W3M_ALARM
@@ -585,6 +586,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)
@@ -630,16 +632,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
@@ -658,15 +661,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],
@@ -683,46 +702,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