# SOCKS4 support checking
#
+SAVELIBS="$LIBS"
+SAVECFLAGS="$CFLAGS"
AC_MSG_CHECKING(whether to support SOCKS4)
AC_ARG_WITH(socks4,
[[ --with-socks4[=DIR] with SOCKS4 support [search in DIR/lib and DIR/include]]],
no)
AC_MSG_RESULT(no)
;;
+ yes)
+ AC_MSG_RESULT(yes)
+ socks=4
+ LIBS="-lsocks $LIBS"
+ ;;
*)
AC_MSG_RESULT(yes)
socks=4
fi
LIBS="$withval $LIBS"
- AC_TRY_LINK([],
- [
- Rconnect();
- ], [],
- [
- AC_MSG_ERROR(Could not find SOCKS4 library.)
- ])
;;
esac
+
+ AC_TRY_LINK([],
+ [
+ Rconnect();
+ ], [],
+ [
+ AC_MSG_ERROR(Could not find SOCKS4 library.)
+ CFLAGS="$SAVECFLAGS"
+ LIBS="$SAVELIBS"
+ ])
],
AC_MSG_RESULT(no)
)
# SOCKS5 support checking
#
+SAVELIBS="$LIBS"
+SAVECFLAGS="$CFLAGS"
AC_MSG_CHECKING(whether to support SOCKS5)
AC_ARG_WITH(socks5,
[[ --with-socks5[=DIR] with SOCKS5 support [search in DIR/lib and DIR/include]]],
no)
AC_MSG_RESULT(no)
;;
+ yes)
+ AC_MSG_RESULT(yes)
+ socks=5
+ LIBS="-lsocks5 $LIBS"
+ ;;
*)
AC_MSG_RESULT(yes)
socks=5
fi
LIBS="$withval $LIBS"
- AC_TRY_LINK([],
- [
- SOCKSconnect();
- ], [],
- [
- AC_MSG_ERROR(Could not find SOCKS5 library.)
- ])
;;
esac
+
+ AC_TRY_LINK([],
+ [
+ SOCKSconnect();
+ ], [],
+ [
+ AC_MSG_ERROR(Could not find SOCKS5 library.)
+ CFLAGS="$SAVECFLAGS"
+ LIBS="$SAVELIBS"
+ ])
],
AC_MSG_RESULT(no)
)