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

📄 configure.in

📁 大国补丁后的nessus2.2.8的源代码
💻 IN
字号:
dnldnl autoconf script for Nessusdnldnldnl Supported options :dnldnl --enable-releasednl --enable-debugdnl --enable-pthreads 	(experimental dont use dont use dont use!)dnl --enable-cipherdnl --enable-pubkey-authdnl --enable-syslogAC_INIT(.root-dir)AC_REVISION($Revision: 1.67.2.1 $)dnlPWDD=`pwd`	save_IFS="${IFS}"IFS=.read NESSUS_MAJOR NESSUS_MINOR NESSUS_PATCH NESSUS_RC <VERSIONVERSION=`cat VERSION`NESSUS_SUPER=`expr $NESSUS_MAJOR + $NESSUS_MINOR`IFS="${save_IFS}"NESSUS_DATE=\"`date '+%b %d, %Y'`\"expr 0 + $NESSUS_MAJOR + $NESSUS_MINOR + $NESSUS_PATCH + 0 >/dev/null ||AC_MSG_ERROR([ *** Panic: Corrupt version file])version=$NESSUS_MAJOR.$NESSUS_MINOR.$NESSUS_PATCHGCC_NO_PIPE=nodnl some compiler optionAC_ARG_ENABLE(gccpipe,[  --enable-gccpipe	  use \"gcc -pipe\" for compilation, where possible],	[case  $enable_gccpipe in	 n*|N*) GCC_NO_PIPE=yes ;;	 y*|Y*) unset GCC_NO_PIPE ;;	esac])test x$GCC_NO_PIPE = xno && unset GCC_NO_PIPEtest "x$prefix" != "xNONE" || prefix=/usr/localPATH=$DESTDIR${prefix}/bin:$PATH; export PATHdnl Set up the main lines of the config scriptAC_CONFIG_HEADER(include/config.h nasl/strutils.h)AC_PREFIX_DEFAULT("/usr/local")AC_LANG_Cdnl Check for several programsAC_PROG_CCAC_LIBTOOL_WIN32_DLLAM_PROG_LIBTOOLAC_PROG_MAKE_SETAC_PROG_INSTALLecho "$INSTALL" | egrep "^\./" 2>&1 > /dev/null && {  INSTALL="$PWDD/install-sh"}INSTALL_DIR="$INSTALL -d"case $host in*cygwin*)	AC_DEFINE(_CYGWIN_)	;;esac	# test, whether the compiler understands the -pipe command# (thanks to Tatu Illonen: ssh/configure.in)CC_NOPIPE="$CC"if test -z "$GCC_NO_PIPE" -a -n "$GCC"; then  AC_MSG_CHECKING([if the compiler understands -pipe])  CC="$CC -pipe"  AC_TRY_COMPILE(,,    AC_MSG_RESULT(yes),    CC="$CC_NOPIPE"    AC_MSG_RESULT(no))fiAC_PATH_PROG(NESSUSCONFIG, nessus-config)test "x$NESSUSCONFIG" = x && AC_ERROR("""""*** nessus-libraries is not installed ! You need to install it before you""compile libnasl.""Get it at ftp://ftp.nessus.org/pub/nessus/")XFLAGS="$CFLAGS"CPPFLAGS=`$NESSUSCONFIG --cflags`AC_CHECK_HEADERS(openssl/md2.h openssl/md4.h openssl/md5.h)CPPFLAGS="$XFLAGS"AC_PATH_PROG(BISON, bison)test "x$BISON" = "x" && AC_ERROR("""""*** bison is not installed on this host ! You need to install it before you""compile libnasl""Get it at ftp://ftp.gnu.org/pub/gnu/bison/ or check your operating system""packages")AC_HEADER_STDCAC_HEADER_SYS_WAITAC_HEADER_TIMEAC_HEADER_DIRENTAC_HAVE_LIBRARY(rpcsvc, rpcsvc_lib="-lrpcsvc") AC_CHECK_HEADER(/usr/ucbinclude/fcntl.h, have_ucbinclude="-DHAVE_UCBINCLUDE")AC_CHECK_HEADERS(unistd.h getopt.h string.h strings.h sys/sockio.h sys/socketio.h)AC_CHECK_HEADERS(netinet/in.h,,,[#include <sys/types.h>])AC_CHECK_HEADERS(netinet/in_systm.h,,,[#include <sys/types.h>])AC_CHECK_HEADERS(netinet/ip.h,,,[#include <sys/types.h>#include <netinet/in_systm.h>#include <netinet/in.h>])AC_CHECK_HEADERS(netinet/ip_icmp.h,,,[#include <sys/types.h>#include <netinet/in_systm.h>#include <netinet/in.h>#include <netinet/ip.h>])AC_CHECK_HEADERS(netinet/ip.h netinet/udp.h netinet/protocols.h netinet/ip_udp.h netinet/ip_tcp.h netinet/tcpip.h ,,,[#include <sys/types.h>#include <netinet/in.h>#include <netinet/ip_var.h>#include <netinet/udp.h>#include <netinet/tcp.h>])AC_CHECK_HEADERS(sys/param.h)AC_CHECK_HEADERS(sys/ioctl.h)AC_CHECK_HEADERS(rpc/rpc.h dlfcn.h sys/un.h memory.h ctype.h errno.h)AC_CHECK_HEADERS(sys/types.h stdlib.h stdio.h pthread.h sys/filio.h pwd.h)AC_CHECK_HEADERS(assert.h netdb.h netinet/in.h arpa/inet.h)AC_CHECK_HEADERS(poll.h sys/poll.h netinet/ip_tcp.h)AC_CHECK_HEADERS(sys/stat.h stat.h net/if.h sys/mman.h search.h)AC_CHECK_HEADERS(locale.h)dnl ./configure fails to determine the existence of some dnl headers under IRIXcase "$host" in *-irix*)    AC_DEFINE(HAVE_SYS_SOCKET_H)    AC_DEFINE(HAVE_NETINET_IP_H)    AC_DEFINE(HAVE_NETINET_TCP_H)    ;; *)    AC_CHECK_HEADERS(sys/socket.h netinet/ip.h netinet/tcp.h)    ;;esacdnl Check for several functionsAC_FUNC_ALLOCAAC_CHECK_FUNCS(lstat memmove gettimeofday gethrtime getrusage rand)AC_CHECK_FUNCS(strchr memcpy select poll)AC_CHECK_FUNC(vsnprintf,AC_DEFINE(HAVE_VSNPRINTF))AC_CHECK_FUNC(memmem, AC_DEFINE(HAVE_MEMMEM))AC_CHECK_FUNCS(bzero bcopy)AC_CHECK_FUNCS(addr2ascii inet_neta)AC_CHECK_FUNCS(signal sigaction wait wait3 wait4 waitpid)AC_CHECK_FUNCS(lfind)AC_CHECK_LIB(compat, lfind, compat_lib="-lcompat")test -n "$compat_lib" && AC_DEFINE(HAVE_LFIND)dnl Check for sevral types and guess our byte orderingAC_C_BIGENDIANAC_CHECK_TYPE(time_t,int)AC_TYPE_PID_TAC_TYPE_SIZE_TAC_TYPE_UID_TAC_CHECK_SIZEOF(short)AC_CHECK_SIZEOF(int)AC_CHECK_SIZEOF(long)dnl Check that the struct ip has member ip_csumAC_MSG_CHECKING([struct ip contains ip_csum])AC_TRY_COMPILE([#ifdef __linux__#define __BSD_SOURCE#define _BSD_SOURCE#define __FAVOR_BSD#endif#include <sys/types.h> #include <netinet/in.h>#include <netinet/in_systm.h>#include <netinet/ip.h>],[struct ip ip;ip.ip_csum = 0;],	       [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_STRUCT_IP_CSUM)],[AC_MSG_RESULT(no);])dnl Check whether we have to redefine the structs ip and icmpAC_MSG_CHECKING([struct ip]) AC_TRY_COMPILE([#include <sys/types.h>#include <netinet/in.h>#include <netinet/in_systm.h>#include <netinet/ip.h>],                [struct ip ip;],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_STRUCT_IP)],[AC_MSG_RESULT(no)])dnl Check whether we have to redefine the structs ip and icmpAC_MSG_CHECKING([struct ip has ip_hl]) AC_TRY_COMPILE([#include <sys/types.h>#include <netinet/in.h>#include <netinet/in_systm.h>#include <netinet/ip.h>],                [struct ip ip;ip.ip_hl = 1],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_IP_HL)],[AC_MSG_RESULT(no)]) AC_MSG_CHECKING([struct icmp])AC_TRY_COMPILE([#include <sys/types.h>#include <netinet/in.h>#include <netinet/in_systm.h>#include <netinet/ip.h>#include <netinet/ip_icmp.h>],                [struct icmp icmp;],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_STRUCT_ICMP)],[AC_MSG_RESULT(no)])AC_MSG_CHECKING([struct udphdr])AC_TRY_COMPILE([#include <sys/types.h>#include <netinet/in.h>#include <netinet/in_systm.h>#include <netinet/ip.h>#include <netinet/udp.h>],                [struct udphdr udp;],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_STRUCT_UDPHDR)],[AC_MSG_RESULT(no)])AC_MSG_CHECKING([BSD struct udphdr])AC_TRY_COMPILE([#ifdef __linux__#define __BSD_SOURCE#define _BSD_SOURCE#define __FAVOR_BSD#endif#include <sys/types.h>#include <netinet/in.h>#include <netinet/in_systm.h>#include <netinet/ip.h>#include <netinet/udp.h>],                [struct udphdr udp;udp.uh_dport = 0;],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_BSD_STRUCT_UDPHDR)],[AC_MSG_RESULT(no)])AC_MSG_CHECKING([struct tcphdr])AC_TRY_COMPILE([#include <sys/types.h>#include <netinet/in.h>#include <netinet/in_systm.h>#include <netinet/ip.h>#include <netinet/tcp.h>],                [struct tcphdr tcp;],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_STRUCT_TCPHDR)],[AC_MSG_RESULT(no)])AC_MSG_CHECKING([struct tcphdr has th_off])AC_TRY_COMPILE([#include <sys/types.h>#ifdef __linux__#define __FAVOR_BSD#endif#include <netinet/in.h>#include <netinet/in_systm.h>#include <netinet/ip.h>#include <netinet/tcp.h>],                [struct tcphdr tcp;tcp.th_off = 0;],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_TCPHDR_TH_OFF)],[AC_MSG_RESULT(no)])AC_MSG_CHECKING([struct tcphdr has th_x2_off])AC_TRY_COMPILE([#include <sys/types.h>#ifdef __linux__#define __FAVOR_BSD#endif#include <netinet/in.h>#include <netinet/in_systm.h>#include <netinet/ip.h>#include <netinet/tcp.h>],                [struct tcphdr tcp;tcp.th_x2_off = 0;],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_TCPHDR_TH_X2_OFF)],[AC_MSG_RESULT(no)])dnl Define several pathsAC_SYS_LONG_FILE_NAMESdnl Check for the libraries we may want to useAC_CHECK_LIB(c, inet_aton, AC_DEFINE(HAVE_INET_ATON))AC_CHECK_LIB(resolv, inet_aton, AC_DEFINE(HAVE_INET_ATON))if [ test "`uname`" != "IRIX" ];then AC_CHECK_LIB(socket, inet_aton, AC_DEFINE(HAVE_INET_ATON)) AC_CHECK_LIB(nsl, inet_aton, AC_DEFINE(HAVE_INET_ATON))fidnl This test is from the configure.in of Unix Network Programming seconddnl edition example code by W. Richard Stevensdnl ##################################################################dnl Check if sockaddr{} has sa_len member.dnlAC_CACHE_CHECK(if sockaddr{} has sa_len member, ac_cv_sockaddr_has_sa_len,        AC_TRY_COMPILE([#               include <sys/types.h>#               include <sys/socket.h>],                [unsigned int i = sizeof(((struct sockaddr *)0)->sa_len)],        ac_cv_sockaddr_has_sa_len=yes,        ac_cv_sockaddr_has_sa_len=no))if test $ac_cv_sockaddr_has_sa_len = yes ; then        AC_DEFINE(HAVE_SOCKADDR_SA_LEN)fiAC_MSG_CHECKING([for a working strndup implementation])AC_TRY_RUN([int main(){  char * a = "foobar";  char * b;    b = strndup(a, strlen(a));  if( b == NULL ) return 1;  if( b == a ) return 1;  return strcmp(a, b);}], [AC_MSG_RESULT([yes]);AC_DEFINE(HAVE_STRNDUP_ALREADY)],[AC_MSG_RESULT([no])])case "$host" in    *-freebsd*|*-bsdi*|*-netbsd*|*-darwin*)    AC_DEFINE(BSD_BYTE_ORDERING)esaccase "$host" in  *-netbsd*)    AC_DEFINE(NETBSD)    ;;  *-openbsd*)    AC_DEFINE(OPENBSD)    ;;  *-sgi-irix5*)    AC_DEFINE(IRIX)    no_libsocket=yes    no_libnsl=yes    if test -z "$GCC"; then      sgi_cc=yes    fi    ;;  *-sgi-irix6*)    AC_DEFINE(IRIX)    no_libsocket=yes    no_libnsl=yes    if test -z "$GCC"; then      sgi_cc=yes    fi    ;;  *-solaris2.0*)      AC_DEFINE(STUPID_SOLARIS_CHECKSUM_BUG)    AC_DEFINE(SOLARIS)    ;;  *-solaris2.1*)    AC_DEFINE(STUPID_SOLARIS_CHECKSUM_BUG)    AC_DEFINE(SOLARIS)    ;;  *-solaris2.2*)    AC_DEFINE(STUPID_SOLARIS_CHECKSUM_BUG)    AC_DEFINE(SOLARIS)    ;;  *-solaris2.3*)    AC_DEFINE(STUPID_SOLARIS_CHECKSUM_BUG)    AC_DEFINE(SOLARIS)    ;;  *-solaris2.4*)    AC_DEFINE(STUPID_SOLARIS_CHECKSUM_BUG)    AC_DEFINE(SOLARIS)    ;;  *-solaris2.5.1)    AC_DEFINE(STUPID_SOLARIS_CHECKSUM_BUG)    AC_DEFINE(SOLARIS)    ;;  *-solaris*)    AC_DEFINE(SOLARIS)    ;;  *-sunos4*)    AC_DEFINE(SUNOS)    AC_DEFINE(SPRINTF_RETURNS_STRING)    no_libnsl=yes    no_libsocket=yes    ;;  *-linux*)    linux=yes    AC_DEFINE(LINUX)    AC_DEFINE(PCAP_TIMEOUT_IGNORED)  # libpcap doesn't even LOOK at                                     # the timeout you give it under Linux    ;;  *-freebsd*)    AC_DEFINE(FREEBSD)    ;;  *-bsdi*)    AC_DEFINE(BSDI)    ;;esacOLD_CFLAGS=$CFLAGSCFLAGS="$CFLAGS `$NESSUSCONFIG --libs --cflags`"if echo $CFLAGS | grep pcap-nessus 2>&1 > /dev/null;then  AC_CHECK_LIB(pcap-nessus, pcap_restart, AC_DEFINE(PCAP_RESTART,pcap_restart),  AC_CHECK_LIB(pcap-nessus, pcap_yyrestart, AC_DEFINE(PCAP_RESTART,pcap_yyrestart),  AC_CHECK_LIB(pcap-nessus, yyrestart, AC_DEFINE(PCAP_RESTART,yyrestart),   echo no yacc restart func found   echo perhaps libpcap-nessus wasn\'t compiled with bison/flex\?   )))else  AC_CHECK_LIB(pcap, pcap_restart, AC_DEFINE(PCAP_RESTART,pcap_restart),  AC_CHECK_LIB(pcap, pcap_yyrestart, AC_DEFINE(PCAP_RESTART,pcap_yyrestart),  AC_CHECK_LIB(pcap, yyrestart, AC_DEFINE(PCAP_RESTART,yyrestart),   echo no yacc restart func found   echo perhaps libpcap wasn\'t compiled with bison/flex\?   )))fiCFLAGS=$OLD_CFLAGS      dnl Final step : substitute what we want toAC_SUBST(PWD)AC_SUBST(PWDD)AC_SUBST(CFLAGS)AC_SUBST(CWALL)AC_SUBST(CWARN)AC_SUBST(NESSUSCONFIG)AC_SUBST(INSTALL)AC_SUBST(version)AC_SUBST(NESSUS_MAJOR)AC_SUBST(NESSUS_MINOR)AC_SUBST(NESSUS_SUPER)AC_SUBST(NESSUS_PATCH)AC_SUBST(NESSUS_DATE)AC_SUBST(INSTALL_DIR)AC_SUBST(rpcsvc_lib)  AC_SUBST(compat_lib)AC_SUBST(VERSION)  AC_SUBST(have_ucbinclude)dnl And we put everything in ONE fileAC_OUTPUT(nasl.tmplnasl-config)exit 0

⌨️ 快捷键说明

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