aboutsummaryrefslogtreecommitdiffstats
path: root/acinclude.m4
diff options
context:
space:
mode:
authorTatsuya Kinoshita <tats@vega.ocn.ne.jp>2011-05-04 07:41:45 +0000
committerTatsuya Kinoshita <tats@vega.ocn.ne.jp>2011-05-04 07:41:45 +0000
commit5397d09e585a1938fb64bc9c5cd5daed1959eb90 (patch)
treecd2673d4ca9584c426f9291e54b7bbb508c11e76 /acinclude.m4
parentAdding upstream version 0.5.2 (diff)
downloadw3m-5397d09e585a1938fb64bc9c5cd5daed1959eb90.tar.gz
w3m-5397d09e585a1938fb64bc9c5cd5daed1959eb90.zip
Adding upstream version 0.5.3upstream/0.5.3
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m465
1 files changed, 43 insertions, 22 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index e10b7ed..e4ccc3d 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -283,18 +283,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],
@@ -394,7 +382,7 @@ AC_DEFUN([AC_W3M_EXTLIBS],
[lib=$1
AC_MSG_CHECKING(for -l$lib)
extlib="not found"
- for dir in /lib /usr/lib /usr/local/lib /usr/ucblib /usr/ccslib /usr/ccs/lib
+ for dir in /lib /usr/lib /usr/local/lib /usr/ucblib /usr/ccslib /usr/ccs/lib /lib64 /usr/lib64
do
if test -f $dir/lib$lib.a -o -f $dir/lib$lib.so ; then
LIBS="$LIBS -l$lib"
@@ -426,6 +414,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])],
@@ -456,7 +445,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)
@@ -466,7 +455,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
@@ -475,9 +464,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)
@@ -519,7 +508,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
@@ -568,6 +569,8 @@ AC_DEFUN([AC_W3M_IMAGE],
[AC_SUBST(USE_IMAGE)
AC_SUBST(USE_W3MIMG_X11)
AC_SUBST(USE_W3MIMG_FB)
+ AC_SUBST(USE_W3MIMG_WIN)
+ AC_SUBST(IMGLINK)
AC_SUBST(W3MIMGDISPLAY_SETUID)
AC_SUBST(INSTALL_W3MIMGDISPLAY)
INSTALL_W3MIMGDISPLAY='${INSTALL_PROGRAM}'
@@ -582,10 +585,12 @@ AC_DEFUN([AC_W3M_IMAGE],
AC_SUBST(IMGX11LDFLAGS)
AC_SUBST(IMGFBCFLAGS)
AC_SUBST(IMGFBLDFLAGS)
+ AC_SUBST(IMGWINCFLAGS)
+ AC_SUBST(IMGWINLDFLAGS)
AC_MSG_CHECKING(if image is enabled)
AC_ARG_ENABLE(image,
[ --enable-image[=DEVS] enable inline image handler for DEVS
- DEVS may be comma separeted: x11,fb,fb+s
+ DEVS may be comma separeted: x11,fb,fb+s,win
default: autodetected.
'no' means disable inline image],,
[enable_image="yes"])
@@ -599,10 +604,14 @@ AC_DEFUN([AC_W3M_IMAGE],
if test -c /dev/fb0; then
enable_image=x11,fb
fi;;
+ CYGWIN*)
+ enable_image=x11,win;;
esac
fi
save_ifs="$IFS"; IFS=",";
- for img in $enable_image; do
+ set x $enable_image; shift
+ IFS="$save_ifs"
+ for img in "$[]@"; do
case $img in
x11) x11=yes;;
fb) fb=yes;;
@@ -610,9 +619,9 @@ AC_DEFUN([AC_W3M_IMAGE],
AC_DEFINE(W3MIMGDISPLAY_SETUID)
INSTALL_W3MIMGDISPLAY='${INSTALL} -o root -m 4755 -s'
AC_DEFINE(INSTALL_W3MIMGDISPLAY, $INSTALL_W3MIMGDISPLAY);;
+ win) win=yes;;
esac
done
- IFS="$save_ifs"
enable_image=yes
AC_DEFINE(USE_IMAGE)
AC_MSG_CHECKING(image library)
@@ -658,6 +667,7 @@ AC_DEFUN([AC_W3M_IMAGE],
esac
done
IMGTARGETS=""
+ IMGLINK='$(CC)'
if test x"$with_gtk2" = xyes; then
AC_W3M_CHECK_VER([GdkPixbuf],
[`$PKG_CONFIG --modversion gdk-pixbuf-2.0 2>/dev/null`],
@@ -751,12 +761,23 @@ AC_DEFUN([AC_W3M_IMAGE],
AC_MSG_WARN([unable to build w3mimgdisplay with FB support])
fi
fi
+ if test x"$win" = xyes; then
+ AC_DEFINE(USE_W3MIMG_WIN)
+ IMGOBJS="$IMGOBJS win/win_w3mimg.o"
+ IMGTARGETS="${IMGTARGETS} win"
+ IMGWINCFLAGS="-I/usr/include/w32api"
+ IMGWINLDFLAGS="-lgdiplus -lgdi32 -luser32"
+ IMGLINK='$(CXX)'
+ fi
AC_DEFINE(IMGTARGETS, "$IMGTARGETS")
AC_DEFINE(IMGOBJS, "$IMGOBJS")
AC_DEFINE(IMGX11CFLAGS, "$IMGX11CFLAGS")
AC_DEFINE(IMGX11LDFLAGS, "$IMGX11LDFLAGS")
AC_DEFINE(IMGFBCFLAGS, "$IMGFBCFLAGS")
- AC_DEFINE(IMGFBLDFLAGS, "$IMGLDFLAGS")
+ AC_DEFINE(IMGFBLDFLAGS, "$IMGFBLDFLAGS")
+ AC_DEFINE(IMGLINK, "$IMGLINK")
+ AC_DEFINE(IMGWINCFLAGS, "$IMGWINCFLAGS")
+ AC_DEFINE(IMGWINLDFLAGS, "$IMGWINLDFLAGS")
fi])
# ----------------------------------------------------------------
# AC_W3M_XFACE