⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 configure.in

📁 sock protocol ,it is useful!
💻 IN
📖 第 1 页 / 共 3 页
字号:
AC_MSG_CHECKING(to see if dlopen param has DL_ and not RTLD_ prefix)AC_EGREP_CPP(yes, [#include <dlfcn.h>#ifdef DL_LAZY#else# ifdef RTLD_LAZYyes# endif#endif], [AC_DEFINE(NEED_DYNA_RTLD)    AC_MSG_RESULT(yes)],   AC_MSG_RESULT(no))#XXX should be more generic, check if nonexistent#SV_INTERRUPT, but not SA_RESTART defined?AC_MSG_CHECKING(to see if SV_INTERRUPT should be used)AC_EGREP_CPP(yes, [#include <signal.h>#ifdef SA_RESTART#else# ifdef SV_INTERRUPTyes# endif#endif], [AC_DEFINE(NEED_SA_RESTART)    AC_MSG_RESULT(yes)],   AC_MSG_RESULT(no))#XXXseems to be supported on solaris2.6, but there might be some#defines that need to be set (should _XOPEN_SOURCE be defined on all#platforms?)AC_MSG_CHECKING(if cmsghdr exists in <sys/socket.h>)case $host in    *-*-hpux*)	AC_MSG_RESULT(no) #disable test	;;    *)	AC_TRY_COMPILE([#include <sys/types.h>#include <sys/socket.h>], [struct cmsghdr foo = {1,1,1}; struct msghdr bar; foo.cmsg_len = 0; foo.cmsg_type = SCM_RIGHTS; foo.cmsg_level = SOL_SOCKET; bar.msg_controllen = 1;], [AC_DEFINE(HAVE_CMSGHDR)    AC_MSG_RESULT(yes)],   AC_MSG_RESULT(no))	;;esacAC_MSG_CHECKING(to see if malloc_options exists)AC_TRY_LINK([extern char *malloc_options;],[ malloc_options = 0; ],[AC_DEFINE(HAVE_MALLOC_OPTIONS) AC_MSG_RESULT(yes)],AC_MSG_RESULT(no))AC_MSG_CHECKING(to see if __progname exists)AC_TRY_LINK([extern char *__progname;],[ __progname = 0; ],[AC_DEFINE(HAVE_PROGNAME) AC_MSG_RESULT(yes)],AC_MSG_RESULT(no))dnl Checks for libraries.AC_SEARCH_LIBS(crypt, crypt)#FreeBSD has setproctitle in -lutil (Per Hedeland <per@erix.ericsson.se>)AC_SEARCH_LIBS(setproctitle, util)#Look for functions needed for socksify located in other places than libcSOCKSIFY_PRELOAD_LIBS=""oLIBS=$LIBSLIBS=""AC_SEARCH_LIBS(connect, socket)NLIBS="${NLIBS}${NLIBS:+ }$LIBS"LIBS=""#XXX can be ignored when preloading is disabled (only the AC_SEARCH_LIBS test#is needed)if test "x${ac_cv_search_connect}" = "x-lsocket"; then	AC_DEFINE_UNQUOTED(LIBRARY_LIBSOCKET, "${base_library_path}libsocket.so")	SOCKSIFY_PRELOAD_LIBS="${SOCKSIFY_PRELOAD_LIBS}${SOCKSIFY_PRELOAD_LIBS:+${PRELOAD_SEPERATOR}}${base_library_path}libsocket.so"	AC_DEFINE(LIBRARY_CONNECT, LIBRARY_LIBSOCKET)	AC_CHECK_LIB(socket, accept,		AC_DEFINE(LIBRARY_ACCEPT, LIBRARY_LIBSOCKET))	AC_CHECK_LIB(socket, bind,		AC_DEFINE(LIBRARY_BIND, LIBRARY_LIBSOCKET))	AC_CHECK_LIB(socket, bindresvport,		AC_DEFINE(LIBRARY_BINDRESVPORT, LIBRARY_LIBSOCKET))	AC_CHECK_LIB(socket, getpeername,		AC_DEFINE(LIBRARY_GETPEERNAME, LIBRARY_LIBSOCKET))	AC_CHECK_LIB(socket, getsockname,		AC_DEFINE(LIBRARY_GETSOCKNAME, LIBRARY_LIBSOCKET))	AC_CHECK_LIB(socket, recvfrom,		AC_DEFINE(LIBRARY_RECVFROM, LIBRARY_LIBSOCKET))	AC_CHECK_LIB(socket, rresvport,		AC_DEFINE(LIBRARY_RRESVPORT, LIBRARY_LIBSOCKET))	AC_CHECK_LIB(socket, recvmsg,		AC_DEFINE(LIBRARY_RECVMSG, LIBRARY_LIBSOCKET))	AC_CHECK_LIB(socket, sendmsg,		AC_DEFINE(LIBRARY_SENDMSG, LIBRARY_LIBSOCKET))	AC_CHECK_LIB(socket, send,		AC_DEFINE(LIBRARY_SEND, LIBRARY_LIBSOCKET))	AC_CHECK_LIB(socket, recv,		AC_DEFINE(LIBRARY_RECV, LIBRARY_LIBSOCKET))	AC_CHECK_LIB(socket, sendto,		AC_DEFINE(LIBRARY_SENDTO, LIBRARY_LIBSOCKET))fi#doesn't work if test links with -lsocket (solaris)AC_SEARCH_LIBS(inet_addr, nsl)NLIBS="${NLIBS}${NLIBS:+ }$LIBS"LIBS=""if test "x${ac_cv_search_inet_addr}" = "x-lnsl"; then	AC_DEFINE_UNQUOTED(LIBRARY_LIBNSL, "${base_library_path}libnsl.so")	SOCKSIFY_PRELOAD_LIBS="${SOCKSIFY_PRELOAD_LIBS}${SOCKSIFY_PRELOAD_LIBS:+${PRELOAD_SEPERATOR}}${base_library_path}libnsl.so"	AC_CHECK_LIB(nsl, gethostbyname,		AC_DEFINE(LIBRARY_GETHOSTBYNAME, LIBRARY_LIBNSL))fi#XXX used for anything but gethostbyname2? consider testing for it# on solaris (atleast 2.6, gcc)#linking with -lresolv results in error unless -shared is included#since gcc insists on linking statically with libresolv for which#no static version existsAC_SEARCH_LIBS(inet_aton, resolv)NLIBS="${NLIBS}${NLIBS:+ }$LIBS"LIBS=""if test "x${ac_cv_search_inet_aton}" = "x-lresolv"; then	AC_DEFINE_UNQUOTED(LIBRARY_LIBRESOLV, "${base_library_path}libresolv.so")	SOCKSIFY_PRELOAD_LIBS="${SOCKSIFY_PRELOAD_LIBS}${SOCKSIFY_PRELOAD_LIBS:+${PRELOAD_SEPERATOR}}${base_library_path}libresolv.so"	AC_CHECK_LIB(resolv, gethostbyname2,		[AC_DEFINE(LIBRARY_GETHOSTBYNAME2, LIBRARY_LIBRESOLV)		 AC_DEFINE(HAVE_GETHOSTBYNAME2)])fi#XXX gcc on solaris (using gnu ld) doesn't seems to implicitly link#with libdl in this test, which means that libdl will not be included#in socksify.AC_SEARCH_LIBS(dlopen, dl)NLIBS="${NLIBS}${NLIBS:+ }$LIBS"LIBS=""if test "x${ac_cv_search_dlopen}" = "x-ldl"; then	case $host in	    *-*-sunos4*) #XXX attemtpt to get libdl name		libdl=`ls ${base_library_path}libdl.so* | sed -e 's/.*\///' | sort -nr | head -1`		if test x$libdl = x; then		    AC_MSG_WARN(unable to locate libdl)		else		    LIBRARY_DLOPEN=${base_library_path}${libdl}		    AC_MSG_WARN(hardcoding libdl to $LIBRARY_DLOPEN)		fi	    ;;	    *)		LIBRARY_DLOPEN="${base_library_path}libdl.so"	    ;;	esac	SOCKSIFY_PRELOAD_LIBS="${SOCKSIFY_PRELOAD_LIBS}${LIBRARY_DLOPEN:+${PRELOAD_SEPERATOR}}${LIBRARY_DLOPEN}"fiLIBS="$oLIBS $NLIBS"AC_SUBST(SOCKSIFY_PRELOAD_LIBS)#specify location of the socks library in socksify too#NOTE: exec_prefix and prefix have the value NONE here if they are unseto_exec_prefix=${exec_prefix}o_prefix=${prefix}if test x${prefix} = xNONE; then	prefix=$ac_default_prefixfiif test x${exec_prefix} = xNONE; then	exec_prefix=$prefixfiLIBRARY_PREFIX=`eval echo \$libdir`LIBRARY_PREFIX=`eval echo \$LIBRARY_PREFIX`exec_prefix=${o_exec_prefix}prefix=${o_prefix}AC_SUBST(LIBRARY_PREFIX)#allow user to specify libc name, use default value otherwiseAC_MSG_CHECKING(for libc name)AC_ARG_WITH(libc, [  --with-libc=NAME        manually set name of c library if necessary], [LIBC_NAME=$withval])#set default?if test "x${LIBC_NAME}" = x; then	case $host in		*-*-linux-*)		#XXX attempt to find latest c library		#can't set it to libc.so directly, might be ld script		LIBC_NAME=`ls /usr/lib/libc.so* /lib/libc.so* | sed -e 's/.*\///' | sort -nr | head -1`		if test "x${LIBC_NAME}" = x; then			#nothing found, set libc.so anyway			LIBC_NAME="${base_library_path}libc.so"		fi	;;	*)		LIBC_NAME="${base_library_path}libc.so"	;;	esacfiAC_MSG_RESULT(${LIBC_NAME})AC_DEFINE_UNQUOTED(LIBRARY_LIBC, "${LIBC_NAME}")dnl #XXX include header in compilation test?dnl normal library testing doesn't work for libwrap (doesn't linkdnl without allow/deny_severity)if test "x${ac_cv_header_tcpd_h}" = "xyes"; then    AC_MSG_CHECKING(for libwrap)    if test x$no_libwrap = xt; then	echo "disabled"    else	oLIBS=$LIBS	LIBS="$LIBS -lwrap"	AC_TRY_LINK([int allow_severity;int deny_severity;], [hosts_access(0);], [AC_MSG_RESULT(yes)  AC_DEFINE(HAVE_LIBWRAP)], [AC_MSG_RESULT(no)  LIBS="$oLIBS"])    fifi#XXX should be more genericcase $host in	*-*-freebsdelf* | *-*-solaris* | *-*-linux-* | *-*-irix* | \	alpha-dec-osf*)		AC_DEFINE(HAVE_NO_SYMBOL_UNDERSCORE)esac#try to detect gcc bug (irix 64 problem, affects among others inet_ntoa)AC_MSG_CHECKING(for incorrect inet_ntoa behaviour)AC_TRY_RUN([#include <sys/types.h>#include <netinet/in.h>#include <arpa/inet.h>#include <sys/socket.h>int main(void){  struct sockaddr_in addr;  char *a, *b = "195.195.195.195";  addr.sin_addr.s_addr = inet_addr(b);  a = inet_ntoa(addr.sin_addr);  if (strcmp(a, b) == 0)    return 1;  else    return 0;}], [AC_DEFINE(HAVE_BROKEN_INET_NTOA)    AC_MSG_RESULT(yes)],   AC_MSG_RESULT(no))dnl Check for in_port_t type#solaris2.6AC_MSG_CHECKING(whether an in_port_t typedef exists in <netinet/in.h>)AC_EGREP_CPP(in_port_t, [#include <netinet/in.h>], [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)AC_CHECK_TYPE(in_port_t, ubits_16)dnl Check for in_addr_t typeAC_CHECK_TYPE(in_addr_t, ubits_32)dnl Check for ssize_t typeAC_CHECK_TYPE(ssize_t, int)])#linux (redhat 5.2) defines socklen_t in <socketbits.h>, which is#included by <sys/socket.h>.  check for this first.AC_MSG_CHECKING(for socklen_t)AC_TRY_COMPILE([#include <sys/types.h>#include <sys/socket.h>], [socklen_t foo = 1;],   [AC_MSG_RESULT(yes)    socklen_found=t],   [AC_MSG_RESULT(no)    socklen_found=""])if test x"$socklen_found" = x; then    case $host in	alpha-dec-osf*)		AC_DEFINE(socklen_t, size_t)		;;	*)		AC_DEFINE(socklen_t, int)		;;    esacfi#sig_atomic_tAC_MSG_CHECKING(for sig_atomic_t in <signal.h>)AC_EGREP_CPP(sig_atomic_t, [#include <signal.h>], [AC_DEFINE(HAVE_SIG_ATOMIC_T)    AC_MSG_RESULT(yes)],   [AC_MSG_RESULT(no)])AC_CHECK_TYPE(int32_t, sbits_32)AC_CHECK_TYPE(int16_t, sbits_16)dnl Checks for library functions.AC_PROG_GCC_TRADITIONALAC_FUNC_MEMCMPAC_FUNC_SETVBUF_REVERSEDAC_TYPE_SIGNALAC_FUNC_STRFTIMEAC_FUNC_UTIME_NULLAC_FUNC_VPRINTFAC_CHECK_FUNCS(select socket strcspn strdup strspn hstrerror issetugid)AC_CHECK_FUNCS(strvis snprintf getdtablesize sysconf inet_pton vsyslog)AC_CHECK_FUNCS(daemon bzero sockatmark difftime memmove seteuid setproctitle)AC_CHECK_FUNCS(inet_aton)#sun4 seems to have a profiled libc missing strerrorif test x$s_profiling = x; then	AC_CHECK_FUNCS(strerror)else	case $host in		*-*-sunos4*)			AC_MSG_WARN(omitting strerror test on sunos4 with profiling enabled)		;;		*)			AC_CHECK_FUNCS(strerror)		;;	esacfi#add any warning flags (value set above)CFLAGS="$CFLAGS $warn"#XXXslowdnl Creating symbolic linksAC_LINK_FILES(lib/config.c, sockd/config.c)AC_LINK_FILES(lib/config_parse.y, sockd/config_parse.y)AC_LINK_FILES(lib/config_scan.l, sockd/config_scan.l)AC_LINK_FILES(lib/io.c, sockd/io.c)AC_LINK_FILES(lib/log.c, sockd/log.c)AC_LINK_FILES(lib/protocol.c, sockd/lib_protocol.c)AC_LINK_FILES(lib/socket.c, sockd/socket.c)AC_LINK_FILES(lib/util.c, sockd/util.c)AC_LINK_FILES(lib/udp_util.c, sockd/udp_util.c)AC_LINK_FILES(lib/debug.c, sockd/debug.c)AC_LINK_FILES(lib/hostcache.c, sockd/hostcache.c)#The dlib directory is for building a shared library with preloading#support (SOCKSLIBRARY_DYNAMIC is defined), when dlopen support is#available and requested.AC_LINK_FILES(lib/Raccept.c, dlib/Raccept.c)AC_LINK_FILES(lib/Rbind.c, dlib/Rbind.c)AC_LINK_FILES(lib/Rbindresvport.c, dlib/Rbindresvport.c)AC_LINK_FILES(lib/Rconnect.c, dlib/Rconnect.c)AC_LINK_FILES(lib/Rgethostbyname.c, dlib/Rgethostbyname.c)AC_LINK_FILES(lib/Rgetpeername.c, dlib/Rgetpeername.c)AC_LINK_FILES(lib/Rgetsockname.c, dlib/Rgetsockname.c)AC_LINK_FILES(lib/Rrresvport.c, dlib/Rrresvport.c)AC_LINK_FILES(lib/Rcompat.c, dlib/Rcompat.c)AC_LINK_FILES(lib/address.c, dlib/address.c)AC_LINK_FILES(lib/authneg.c, dlib/authneg.c)AC_LINK_FILES(lib/client.c, dlib/client.c)AC_LINK_FILES(lib/clientconfig.c, dlib/clientconfig.c)AC_LINK_FILES(lib/clientprotocol.c, dlib/clientprotocol.c)AC_LINK_FILES(lib/msproxy_clientprotocol.c, dlib/msproxy_clientprotocol.c)AC_LINK_FILES(lib/config.c, dlib/config.c)AC_LINK_FILES(lib/config_parse.y, dlib/config_parse.y)AC_LINK_FILES(lib/config_scan.l, dlib/config_scan.l)AC_LINK_FILES(lib/debug.c, dlib/debug.c)AC_LINK_FILES(lib/io.c, dlib/io.c)AC_LINK_FILES(lib/log.c, dlib/log.c)AC_LINK_FILES(lib/method_uname.c, dlib/method_uname.c)AC_LINK_FILES(lib/protocol.c, dlib/protocol.c)AC_LINK_FILES(lib/socket.c, dlib/socket.c)AC_LINK_FILES(lib/connectchild.c, dlib/connectchild.c)AC_LINK_FILES(lib/udp.c, dlib/udp.c)AC_LINK_FILES(lib/udp_util.c, dlib/udp_util.c)AC_LINK_FILES(lib/userio.c, dlib/userio.c)AC_LINK_FILES(lib/util.c, dlib/util.c)AC_LINK_FILES(lib/hostcache.c, dlib/hostcache.c)AC_OUTPUT([sockd/Makefile include/Makefile lib/Makefile dlib/Makefile \	   Makefile example/Makefile doc/Makefile bin/Makefile \	   SPECS/Makefile SPECS/dante.spec bin/socksify \	   libscompat/Makefile VERSION])

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -