File: configure.in

package info (click to toggle)
nessus-plugins 1.0.10-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 4,924 kB
  • ctags: 408
  • sloc: sh: 7,838; ansic: 3,415; makefile: 233
file content (158 lines) | stat: -rw-r--r-- 3,587 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
dnl
dnl autoconf script for Nessus-plugins
dnl


AC_INIT(.root-dir)
AC_REVISION($Revision: 1.29.2.1 $)dnl


AC_CONFIG_HEADER(plugins/nmap_wrapper/nmap.h)
dnl Set up the main lines of the config script
AC_PREFIX_DEFAULT("/usr/local")


test "x$prefix" != "xNONE" || prefix=/usr/local

AC_LANG_C

dnl Check for several programs
AM_PROG_LIBTOOL
AC_PROG_CC
AC_PROG_MAKE_SET
AC_PROG_INSTALL

PWDD=`pwd`

dnl
dnl Do not use the system install script.
dnl
dnl INSTALL="`pwd`/install-sh -c"
INSTALL_DIR="$INSTALL -d"

dnl extending the search path for AC_PATH_PROG when searching for config scripts
XPATH=$prefix/bin:$prefix/bin



AC_ARG_ENABLE(install,[  --enable-install=user	  for debugging, install as non-root user],
	installuser=$enable_install)
: ${installuser:=root}


dnl containing funny things, like openpty, forkpty
dnl this library is deprecated because of portability
AC_CHECK_LIB(util, openpty, LIBUTIL="-lutil")

AC_PATH_PROG(NESSUSCONFIG, nessus-config,,$XPATH:$PATH)

test "x$NESSUSCONFIG" = x && AC_ERROR(""
""
"*** nessus-libraries is not installed ! You need to install it before you"
"compile nessus-core."
"Get it at ftp://ftp.nessus.org/pub/nessus/")


CFLAGS="$CFLAGS `$NESSUSCONFIG --cflags`"
LIBS="$LIBS `$NESSUSCONFIG --libs`"


test "x$NESSUSCONFIG" = x && AC_ERROR(""
""
"*** nessus-libraries is not installed ! You need to install it before you"
"compile nessus-core."
"Get it at ftp://ftp.nessus.org/pub/nessus/")

test "x$prefix" = xNONE && prefix=/usr/local
AC_PATH_PROG(CP, cp)
AC_PATH_PROG(MV, mv)
AC_PATH_PROG(RM, rm)
AC_PATH_PROG(MAKE, gmake)
test "$MAKE" || {
	AC_PATH_PROG(MAKE, make)
	}

INSTALL_DIR="$INSTALL -d"

AC_PATH_PROG(ECHO, echo)
AC_PATH_PROG(TEST, test)
AC_PATH_PROG(MKDIR, mkdir)
AC_PATH_PROG(CAT, cat)
AC_PATH_PROG(LYNX, lynx)
AC_PATH_PROG(GZIP, gzip)

AC_PATH_PROG(NMAP, nmap)
major=0
minor=0
test "$NMAP" && {
 dnl Find out nmap version
 
 AC_MSG_CHECKING("nmap version...")
 version=`$NMAP -V|grep nmap|head -n 1|awk '{print $3}'`
 AC_MSG_RESULT($version)
 major=`echo $version|sed 's/\./ /g'|awk '{print $1}'`
 minor=`echo $version|sed 's/\./ /g'|sed 's/BETA/ /g' | awk '{print $2}'`
 
 beta=`echo $version|grep BETA|sed 's/BETA/ /g'|awk '{print $2}'`
 AC_DEFINE_UNQUOTED(NMAP_VERSION, "$version")
 AC_DEFINE_UNQUOTED(NMAP_MAJOR, $major)
 AC_DEFINE_UNQUOTED(NMAP_MINOR, $minor)
 AC_DEFINE_UNQUOTED(NMAP_BETA, $beta)
 AC_DEFINE_UNQUOTED(NMAP, "$NMAP")
 
 NMAP_VERSION=version
 NMAP_BETA=beta
 }
 
 
if [ test -n "$LYNX" -a  -n "$GZIP" ];
then
 INSTALL_UPDATER=install-updater
else
 AC_WARN(lynx and/or gzip could not be found. I will not install nessus-update-plugins)
fi
 
AC_SUBST(INSTALL_DIR)
AC_SUBST(INSTALL)
AC_SUBST(INSTALL_UPDATER)
AC_SUBST(CP)
AC_SUBST(MV)
AC_SUBST(RM)
AC_SUBST(MAKE)
AC_SUBST(ECHO)
AC_SUBST(TEST)
AC_SUBST(MKDIR)
AC_SUBST(CAT)
AC_SUBST(LYNX)
AC_SUBST(GZIP)
AC_SUBST(PWDD)
AC_SUBST(LIBUTIL)
AC_SUBST(installuser)



AC_OUTPUT(pf/nessus-build
nessus-update-plugins
nessus.tmpl)

test -z "$NMAP" -o $major -lt 2 -o  $minor -lt 3 && {
	AC_WARN(""
"Nmap 2.3BETA is not installed."
""
"Nmap is a powerful portscanner that Nessus can use"
"Although it is not strictly necessary since Nessus includes its own"
"port scanners we suggest you download it at http://www.insecure.org "
"and install it before you install nessus-plugins"
""
"Download Nmap 2.3BETA or better and do not forget to do"
"a make distclean in nessus-libraries"
""
"However you can safely ignore this message and continue"
"to build Nessus"
"")
} 

test -z "$NMAP" -a $major -lt 2 -a  $minor -lt 3 ||
{
echo > plugins/nmap_wrapper/nmap_installed
}