source: trunk/configure.ac@ 95

Last change on this file since 95 was 91, checked in by rainer, 18 years ago

Slightly improved fix for samhain_hide module.

File size: 66.6 KB
Line 
1
2dnl We want to override the standard _AC_INIT_PARSE_ARGS
3dnl
4AU_ALIAS([_AC_INIT_PARSE_ARGS], [SH_INIT_PARSE_ARGS])
5AU_ALIAS([_AC_INIT_help], [SH_INIT_HELP])
6
7AC_INIT(src/samhain.c)
8
9
10AC_ARG_VAR([LIBS], [libraries to link against, e.g. -lintl])
11
12dnl
13dnl start
14dnl
15AM_INIT_AUTOMAKE(samhain, 2.3.3)
16AC_CANONICAL_HOST
17
18dnl
19dnl checks for programs
20dnl
21
22AC_PROG_CC
23AC_PROG_CPP
24AC_PROG_INSTALL
25AC_PROG_LN_S
26AC_PROG_AWK
27AC_PATH_PROG(cmd_hostname,hostname)
28AC_SUBST(cmd_hostname)
29
30GCC_STACK_PROTECT_CC
31
32
33AC_HEADER_STDC
34dnl
35dnl first one is a dummy because of an autoconf bug
36dnl (no HAVE_... for first one)
37dnl
38AC_CHECK_HEADERS([sys/ipc.h sys/msg.h sys/uio.h fcntl.h])
39
40
41AC_MSG_CHECKING([for host-specific issues])
42mydebugflag=no
43myneedg3=no
44uid_cast="signed long"
45selectconfig=linux
46mynetbsd=no
47sh_use_lcaps="undef"
48
49case "$host_os" in
50
51 *linux*)
52 sh_use_lcaps="yes"
53 AC_DEFINE(HOST_IS_LINUX)
54 AC_DEFINE(HAVE_EXT2_IOCTLS)
55 AC_MSG_RESULT(LINUX use ioctl to get e2fs flags)
56 case "$host_cpu" in
57 i*86*)
58 AC_DEFINE(HOST_IS_I86LINUX)
59 ;;
60 *)
61 ;;
62 esac
63 ;;
64
65 *osf*)
66 AC_DEFINE([HOST_IS_OSF], 1, [Define if host OS is OSF])
67 if test "x$GCC" != "xyes"; then
68 CFLAGS=`echo $CFLAGS | sed 's%\-g%%' `
69 CFLAGS="$CFLAGS -O2 -assume noaligned_objects"
70 myneedg3=yes
71 AC_MSG_RESULT(OSF1 compiler needs assume noaligned_objects)
72 else
73 AC_MSG_RESULT(none)
74 fi
75 ;;
76
77 *cygwin*)
78 AC_DEFINE(HOST_IS_CYGWIN)
79 AC_MSG_RESULT(CYGWIN do not check for trusted paths)
80 ;;
81
82 *darwin*)
83 AC_DEFINE(HOST_IS_DARWIN)
84 AC_MSG_RESULT(DARWIN check resource forks)
85 ;;
86
87 *freebsd*)
88 AC_DEFINE(HOST_IS_FREEBSD)
89 selectconfig=freebsd
90 AC_MSG_RESULT(none)
91 ;;
92
93 *openbsd*)
94 selectconfig=freebsd
95 AC_MSG_RESULT(none)
96 ;;
97
98 *netbsd*)
99 mynetbsd=yes
100 selectconfig=netbsd
101 AC_MSG_RESULT(NETBSD bug with libresolve)
102 ;;
103
104 *solaris*)
105 selectconfig=solaris
106 AC_DEFINE(HOST_IS_SOLARIS)
107 case "$host_cpu" in
108 i*86)
109 AC_DEFINE(HOST_IS_I86SOLARIS)
110 AC_MSG_RESULT(SOLARIS I86 vsnprintf prototype)
111 ;;
112 *)
113 AC_MSG_RESULT(none)
114 ;;
115 esac
116 if test "x$GCC" != "xyes"; then
117 if test ! -z "`echo "$CFLAGS" | grep "\-g" 2> /dev/null`" ; then
118 CFLAGS=`echo $CFLAGS | sed 's%\-g%%' `
119 fi
120 if test -z "`echo "$CFLAGS" | grep "\-xO2" 2> /dev/null`"; then
121 CFLAGS="$CFLAGS -xO2"
122 fi
123 if test -z "`echo "$CFLAGS" | grep "\-Xa" 2> /dev/null`"; then
124 CFLAGS="$CFLAGS -Xa"
125 fi
126 LIBS="-lc $LIBS"
127 fi
128 ;;
129
130
131 *sun*)
132 selectconfig=solaris
133 AC_DEFINE(HOST_IS_SOLARIS)
134 AC_MSG_RESULT(none)
135 ;;
136
137 *aix*)
138 AC_DEFINE(HOST_IS_AIX)
139 selectconfig=aix5.2.0
140 uid_cast="unsigned long"
141 if test "x$GCC" != "xyes"; then
142 if test ! -z "`echo "$CFLAGS" | grep "\-g" 2> /dev/null`" ; then
143 CFLAGS=`echo $CFLAGS | sed 's%\-g%%' `
144 fi
145 if test -z "`echo "$CFLAGS" | grep "\-O3" 2> /dev/null`"; then
146 CFLAGS="$CFLAGS -O3"
147 fi
148 if test -z "`echo "$CFLAGS" | grep "\-qstrict" 2> /dev/null`"; then
149 CFLAGS="$CFLAGS -qstrict"
150 fi
151 AC_MSG_RESULT(AIX size_t in the accept call and optimize O3 qstrict)
152 else
153 AC_MSG_RESULT(AIX size_t in the accept call)
154 fi
155 ;;
156
157 *hpux*)
158 AC_MSG_RESULT(HPUX has not always h_errno defined)
159 AC_DEFINE(HOST_IS_HPUX)
160 if test "x$GCC" != "xyes"; then
161 if test ! -z "`echo "$CFLAGS" | grep "\-g" 2> /dev/null`" ; then
162 CFLAGS=`echo $CFLAGS | sed 's%\-g%%' `
163 fi
164 if test -z "`echo "$CFLAGS" | grep "\-fast" 2> /dev/null`"; then
165 CFLAGS="$CFLAGS -fast"
166 fi
167 fi
168 ;;
169
170 *ultrix*)
171 AC_MSG_RESULT(ULTRIX getcwd uses popen)
172 AC_DEFINE(HAVE_BROKEN_GETCWD)
173 ;;
174
175 *)
176 AC_MSG_RESULT(none)
177 ;;
178esac
179
180AC_SUBST(selectconfig)
181AC_DEFINE_UNQUOTED(UID_CAST, ${uid_cast})
182
183
184dnl *****************************************
185dnl
186dnl checks for header files
187dnl
188dnl *****************************************
189
190AC_HEADER_DIRENT
191AC_HEADER_MAJOR
192AC_HEADER_TIME
193dnl used in minilzo.c
194AC_HEADER_STAT
195AC_DECL_SYS_SIGLIST
196
197AC_CHECK_HEADERS(stddef.h libgen.h sched.h \
198 sys/vfs.h mntent.h \
199 sys/select.h sys/socket.h netinet/in.h \
200 regex.h glob.h \
201 linux/ext2_fs.h ext2fs/ext2_fs.h \
202 elf.h linux/elf.h \
203 paths.h arpa/nameser.h arpa/nameser_compat.h \
204 rpc/rpcent.h sys/statvfs.h,
205 [],
206 [],
207 [#include <sys/types.h>]
208)
209
210
211AC_CHECK_HEADER(utmpx.h, sh_utmpx="yes", sh_utmpx="no")
212if test "x$sh_utmpx" = "xyes"; then
213 if cat "/usr/include/utmpx.h" 2>&5 |
214 egrep "WTMPX_FILE" >/dev/null 2>&1; then
215 AC_DEFINE(HAVE_UTMPX_H)
216 AC_EGREP_HEADER(ut_host, utmpx.h, AC_DEFINE(HAVE_UTHOST) )
217 AC_EGREP_HEADER(ut_addr, utmpx.h, AC_DEFINE(HAVE_UTADDR) )
218 AC_EGREP_HEADER(ut_xtime,utmpx.h, AC_DEFINE(HAVE_UTXTIME) )
219 AC_EGREP_HEADER(ut_type, utmpx.h, AC_DEFINE(HAVE_UTTYPE) )
220 else
221 AC_EGREP_HEADER(ut_addr, utmp.h, AC_DEFINE(HAVE_UTADDR) )
222 AC_EGREP_HEADER(ut_host, utmp.h, AC_DEFINE(HAVE_UTHOST) )
223 AC_EGREP_HEADER(ut_type, utmp.h, AC_DEFINE(HAVE_UTTYPE) )
224 fi
225else
226 AC_EGREP_HEADER(ut_host, utmp.h, AC_DEFINE(HAVE_UTHOST) )
227 AC_EGREP_HEADER(ut_type, utmp.h, AC_DEFINE(HAVE_UTTYPE) )
228fi
229
230dnl need to check because AIX 4.2 does not have it
231dnl
232AC_CHECK_MEMBERS([struct statfs.f_flags],[],[],[
233#ifdef HAVE_SYS_TYPES_H
234#include <sys/types.h>
235#endif
236#ifdef HAVE_SYS_STAT_H
237#include <sys/stat.h>
238#endif
239#ifdef HAVE_SYS_VFS_H
240#include <sys/vfs.h>
241#endif
242#ifdef HAVE_UNISTD_H
243#include <unistd.h>
244#endif
245])
246
247AC_SYS_LARGEFILE
248
249dnl
250dnl check whether _POSIX_SOURCE is required
251dnl
252SAMHAIN_POSIX
253
254
255dnl *****************************************
256dnl
257dnl Checks for library functions.
258dnl
259dnl *****************************************
260AC_FUNC_STRFTIME
261AC_CHECK_FUNCS(memcmp memcpy memmove memset getpwent endpwent \
262 gettimeofday strlcat strlcpy strstr strchr strerror strsignal \
263 seteuid setreuid setresuid lstat getwd getcwd ptrace \
264 usleep setpriority getpeereid nanosleep \
265 strptime basename sched_yield hasmntopt \
266 inet_aton gethostbyname setutent setrlimit gethostname uname \
267 initgroups getpagesize \
268 ttyname fchmod \
269 getsid getpriority getpgid statvfs
270)
271AC_CHECK_FUNC(statfs, AC_DEFINE(HAVE_STATFS) statfs="yes", statfs="no")
272SL_CHECK_VA_COPY
273AC_CHECK_FUNCS(vsnprintf, [SL_CHECK_VSNPRINTF])
274AC_CHECK_MLOCK
275
276AC_MSG_CHECKING(how to get filesystem type)
277fstype=no
278# The order of these tests is important.
279AC_TRY_CPP([#include <sys/statvfs.h>
280#include <sys/fstyp.h>], AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4)
281if test $fstype = no; then
282AC_TRY_CPP([#include <sys/statfs.h>
283#include <sys/fstyp.h>], AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3)
284fi
285if test $fstype = no; then
286AC_TRY_CPP([#include <sys/statfs.h>
287#include <sys/vmount.h>], AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX)
288fi
289if test $fstype = no; then
290AC_TRY_CPP([#include <mntent.h>], AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD)
291fi
292if test $fstype = no; then
293AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS) fstype=4.4BSD/OSF)
294fi
295if test $fstype = no; then
296AC_TRY_CPP([#include <sys/mount.h>
297#include <sys/fs_types.h>], AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix)
298fi
299AC_MSG_RESULT($fstype)
300
301sh_libsocket=
302
303dnl Solaris needs -lsocket and -lnsl. Unisys system includes
304dnl gethostbyname in libsocket but needs libnsl for socket.
305AC_CHECK_LIB(nsl, gethostbyname)
306AC_CHECK_LIB(socket, socket, ac_need_libsocket=1, ac_try_nsl=1)
307if test x$ac_need_libsocket = x1; then
308 LIBS="$LIBS -lsocket"
309 sh_libsocket="-lsocket"
310fi
311if test x$ac_try_nsl = x1; then
312 AC_CHECK_LIB(nsl, gethostbyname, ac_need_libnsl=1)
313 if test x$ac_need_libnsl = x1
314 then
315 LIBS="$LIBS -lnsl"
316 fi
317fi
318AC_SUBST(sh_libsocket)
319
320AC_CHECK_LIB(socket, res_search, [
321 AC_CHECK_LIB(resolv, dn_skipname)
322 AC_CHECK_LIB(resolv, __dn_skipname)
323 if test x$ac_need_libsocket = x1; then
324 :
325 else
326 LIBS="$LIBS -lsocket"
327 fi
328 ], [
329 AC_CHECK_LIB(resolv, res_search, [
330 LIBS="$LIBS -lresolv"
331 ], [
332 AC_CHECK_LIB(resolv, dn_skipname)
333 AC_CHECK_LIB(resolv, __dn_skipname)
334 ])
335 ])
336
337dnl arguments for accept
338
339dnl check for Unix98 socklen_t (found on
340dnl xemacs-patches mailing list, written
341dnl by Martin Buchholz)
342dnl
343dnl On Darwin(MacOSX) socklen_t needs to be
344dnl an int (see accept man page), on all other
345dnl unix systems we need a size_t.
346
347AC_MSG_CHECKING(for socklen_t)
348AC_TRY_COMPILE([
349#ifdef HAVE_SYS_TYPES_H
350#include <sys/types.h>
351#endif
352#ifdef HAVE_SYS_SOCKET_H
353#include <sys/socket.h>
354#endif
355 socklen_t x;
356], [],[
357 AC_MSG_RESULT(yes)
358 AC_DEFINE_UNQUOTED([ACCEPT_TYPE_ARG3],[socklen_t], [type of arg3 of accept])
359 AC_DEFINE([HAVE_SOCKLEN_T], 1, [Define if you have socklen_t])
360],[
361 AC_TRY_COMPILE([
362#ifdef HAVE_SYS_TYPES_H
363#include <sys/types.h>
364#endif
365#ifdef HAVE_SYS_SOCKET_H
366#include <sys/socket.h>
367#endif
368 int accept (int, struct sockaddr *, size_t *);
369 ],[],[
370 AC_MSG_RESULT(size_t)
371 AC_DEFINE_UNQUOTED([ACCEPT_TYPE_ARG3],[size_t], [type of arg3 of accept])
372 ], [
373 AC_MSG_RESULT(int)
374 AC_DEFINE_UNQUOTED([ACCEPT_TYPE_ARG3],[int], [type of arg3 of accept])
375 ]
376 )
377])
378
379dnl *****************************************
380dnl checks for extended attribute or ACL
381dnl support
382dnl *****************************************
383
384sh_CHECK_XATTR
385sh_CHECK_POSIX_ACL
386
387dnl *****************************************
388dnl checks for typedefs
389dnl *****************************************
390
391AC_C_LONG_DOUBLE
392SH_CHECK_TYPEDEF(long long, HAVE_LONG_LONG)
393if test "$sh_HAVE_LONG_LONG" = "yes"; then
394 AC_CHECK_SIZEOF(unsigned long long, 4)
395 sh_sizeof_unsigned_long_long=`echo "$ac_cv_sizeof_unsigned_long_long" | sed 's%[^0-9]%%g'`
396 if test "$sh_sizeof_unsigned_long_long" = "8"; then
397 AC_DEFINE(HAVE_LONG_LONG_64, 1, [Define if you have 64bit long long])
398 fi
399fi
400
401AC_CHECK_TYPE(ptrdiff_t, long)
402AC_TYPE_SIZE_T
403AC_CHECK_SIZEOF(char *, 4)
404AC_CHECK_SIZEOF(size_t, 4)
405
406AC_CHECK_SIZEOF(unsigned long, 4)
407AC_CHECK_SIZEOF(unsigned int, 4)
408AC_CHECK_SIZEOF(unsigned short, 2)
409
410
411sh_sizeof_unsigned_long=`echo "$ac_cv_sizeof_unsigned_long" | sed 's%[^0-9]%%g'`
412if test "$sh_sizeof_unsigned_long" = "4"; then
413 AC_DEFINE(HAVE_LONG_32)
414fi
415if test "$sh_sizeof_unsigned_long" = "8"; then
416 AC_DEFINE(HAVE_LONG_64)
417fi
418sh_sizeof_unsigned_int=`echo "$ac_cv_sizeof_unsigned_int" | sed 's%[^0-9]%%g'`
419if test "$sh_sizeof_unsigned_int" = "4"; then
420 AC_DEFINE(HAVE_INT_32)
421fi
422sh_sizeof_unsigned_short=`echo "$ac_cv_sizeof_unsigned_short" | sed 's%[^0-9]%%g'`
423if test "$sh_sizeof_unsigned_short" = "4"; then
424 AC_DEFINE(HAVE_SHORT_32)
425fi
426
427dnl
428dnl check for 64 bit programming environment
429dnl
430SAMHAIN_64
431
432
433dnl *****************************************
434dnl checks for structures
435dnl *****************************************
436
437AC_STRUCT_TM
438
439dnl
440dnl from e2fsprogs
441dnl
442AC_MSG_CHECKING(whether struct stat has a st_flags field)
443AC_CACHE_VAL(e2fsprogs_cv_struct_st_flags,
444 AC_TRY_COMPILE([#include <sys/stat.h>],
445 [struct stat stat; stat.st_flags = 0;],
446 [e2fsprogs_cv_struct_st_flags=yes],
447 [e2fsprogs_cv_struct_st_flags=no]))
448AC_MSG_RESULT($e2fsprogs_cv_struct_st_flags)
449if test "$e2fsprogs_cv_struct_st_flags" = yes; then
450 AC_MSG_CHECKING(whether st_flags field is useful)
451 AC_CACHE_VAL(e2fsprogs_cv_struct_st_flags_immut,
452 AC_TRY_COMPILE([#include <sys/stat.h>],
453 [struct stat stat; stat.st_flags |= UF_IMMUTABLE;],
454 [e2fsprogs_cv_struct_st_flags_immut=yes],
455 [e2fsprogs_cv_struct_st_flags_immut=no]))
456 AC_MSG_RESULT($e2fsprogs_cv_struct_st_flags_immut)
457 if test "$e2fsprogs_cv_struct_st_flags_immut" = yes; then
458 AC_DEFINE(HAVE_STAT_FLAGS)
459 fi
460fi
461
462dnl
463dnl from dbus
464dnl
465AC_MSG_CHECKING(for struct cmsgcred)
466AC_TRY_COMPILE([
467#include <sys/types.h>
468#include <sys/socket.h>
469],[
470struct cmsgcred cred;
471
472cred.cmcred_pid = 0;
473],sh_have_struct_cmsgcred=yes,sh_have_struct_cmsgcred=no)
474AC_MSG_RESULT($sh_have_struct_cmsgcred)
475
476if test x$sh_have_struct_cmsgcred = xyes; then
477 AC_DEFINE(HAVE_STRUCT_CMSGCRED,1,[Have cmsgcred structure])
478fi
479
480AC_MSG_CHECKING(for struct fcred)
481AC_TRY_COMPILE([
482#include <sys/param.h>
483#include <sys/socket.h>
484#include <sys/ucred.h>
485],[
486struct fcred sockcred;
487],sh_have_struct_fcred=yes,sh_have_struct_fcred=no)
488AC_MSG_RESULT($sh_have_struct_fcred)
489
490if test x$sh_have_struct_fcred = xyes; then
491 AC_DEFINE(HAVE_STRUCT_FCRED,1,[Have fcred structure])
492fi
493
494AC_MSG_CHECKING(for struct sockcred)
495AC_TRY_COMPILE([
496#include <sys/param.h>
497#include <sys/socket.h>
498#include <sys/ucred.h>
499],[
500struct sockcred sockcred;
501],sh_have_struct_sockcred=yes,sh_have_struct_sockcred=no)
502AC_MSG_RESULT($sh_have_struct_sockcred)
503
504if test x$sh_have_struct_sockcred = xyes; then
505 AC_DEFINE(HAVE_STRUCT_SOCKCRED,1,[Have sockcred structure])
506fi
507
508AC_MSG_CHECKING(for SO_PEERCRED)
509AC_TRY_COMPILE([
510#include <sys/types.h>
511#include <sys/socket.h>
512],[
513int test = SO_PEERCRED;
514],sh_have_SO_PEERCRED=yes,sh_have_SO_PEERCRED=no)
515AC_MSG_RESULT($sh_have_SO_PEERCRED)
516
517if test x$sh_have_SO_PEERCRED = xyes; then
518 AC_DEFINE(HAVE_SO_PEERCRED,1,[Have SO_PEERCRED define])
519fi
520
521
522dnl *****************************************
523dnl checks for compiler characteristics
524dnl *****************************************
525AC_C_INLINE
526AC_C_CONST
527AC_C_BIGENDIAN
528AC_C_RESTRICT
529
530AM_SA_SIGACTION_WORKS
531
532dnl *****************************************
533dnl
534dnl checks for system services
535dnl
536dnl *****************************************
537
538dnl
539dnl check for /proc filesystem
540dnl
541if test -d "/proc/$$"
542then
543 AC_DEFINE([HAVE_PROCFS],[1],[Define if you have a proc fs])
544fi
545
546dnl
547dnl check for GNU gmp
548dnl
549AC_CHECK_LIB(gmp, __gmpz_init, [sh_have_gmp=yes], [sh_have_gmp=no])
550if test "x${sh_have_gmp}" = xno
551then
552 AC_CHECK_LIB(gmp, mpz_init, [sh_have_gmp=yes], [sh_have_gmp=no])
553fi
554if test "x${sh_have_gmp}" = xyes
555then
556 # LIBS="-lgmp $LIBS"
557 AC_DEFINE(HAVE_LIBGMP, 1, [Have GNU gmp library])
558fi
559AC_CHECK_HEADERS(gmp.h)
560
561AC_MSG_CHECKING([for ps])
562PS=
563for ff in /usr/ucb /bin /usr/bin; do
564 if test -x "$ff/ps"; then
565 PS="$ff/ps"
566 AC_MSG_RESULT([$PS])
567 break
568 fi
569done
570if test x$PS = x
571then
572 AC_MSG_RESULT([no])
573 AC_MSG_ERROR([No ps in /usr/ucb /bin /usr/bin])
574fi
575AC_DEFINE_UNQUOTED([PSPATH], _("$PS"), [Path to ps])
576
577AC_MSG_CHECKING([how to use ps])
578$PS ax >/dev/null 2>&1
579if test $? -eq 0; then
580 one=`$PS ax | wc -l`
581else
582 one=0
583fi
584$PS -e >/dev/null 2>&1
585if test $? -eq 0; then
586 two=`$PS -e | wc -l`
587else
588 two=0
589fi
590if test $one -ge $two
591then
592 PSARG="ax"
593else
594 PSARG="-e"
595fi
596AC_DEFINE_UNQUOTED([PSARG], _("$PSARG"), [Argument for ps])
597AC_MSG_RESULT([$PS $PSARG])
598
599dnl *****************************************
600dnl
601dnl enable features
602dnl
603dnl *****************************************
604
605AC_ARG_ENABLE(db-reload,
606 [ --enable-db-reload enable database reload on SIGHUP [no]],
607 [
608 if test "x${enable_db_reload}" = xyes; then
609 AC_DEFINE(RELOAD_DATABASE)
610 fi
611 ]
612)
613
614AC_ARG_ENABLE(xml-log,
615 [ --enable-xml-log enable XML logfile format [[no]]],
616 [
617 if test "x${enable_xml_log}" = xyes; then
618 AC_DEFINE(SH_USE_XML)
619 fi
620 ]
621)
622
623
624AC_ARG_ENABLE(mail,
625 [ --disable-mail disable the internal SMTP mailer],
626 [
627 if test "x${enable_mail}" = xno; then
628 :
629 else
630 AC_DEFINE(SH_WITH_MAIL)
631 fi
632 ],
633 [AC_DEFINE(SH_WITH_MAIL)]
634)
635
636AC_ARG_ENABLE(external-scripts,
637 [ --disable-external-scripts disable interface to external scripts],
638 [
639 if test "x${enableval}" = xno; then
640 :
641 else
642 AC_DEFINE(WITH_EXTERNAL)
643 fi
644 ],
645 [AC_DEFINE(WITH_EXTERNAL)]
646)
647
648AC_ARG_ENABLE(message-queue,
649 [ --enable-message-queue[[=MODE]] enable SysV message queue [[MODE=0700]]],
650 [
651 if test "x${ac_cv_header_sys_msg_h}" = "xyes"; then
652 if test "x${enable_message_queue}" = xyes; then
653 AC_DEFINE(WITH_MESSAGE_QUEUE)
654 AC_DEFINE_UNQUOTED(MESSAGE_QUEUE_MODE, 0700)
655 elif test "x${enable_message_queue}" != xno; then
656 echo "${enableval}" | grep ['[^0123456789]'] >/dev/null 2>&1 &&
657 AC_MSG_ERROR([--enable-message-queue: MODE must be numeric])
658 echo "${enableval}" | \
659 grep ['0[0123456789][0123456789][0123456789]'] >/dev/null 2>&1 ||
660 AC_MSG_ERROR([--enable-message-queue: MODE must be an octal (0nnn) number])
661 AC_DEFINE(WITH_MESSAGE_QUEUE)
662 AC_DEFINE_UNQUOTED(MESSAGE_QUEUE_MODE, ${enable_message_queue})
663 fi
664 else
665 echo
666 echo "**********************************************"
667 echo
668 AC_MSG_WARN([sys/msg.h missing, --enable-message-queue disabled])
669 echo
670 echo "**********************************************"
671 echo
672 fi
673 ]
674)
675
676AC_ARG_WITH(cflags,
677 [ --with-cflags additional flags to pass to compiler],
678 [
679 if test "x$withval" != "xno" ; then
680 CFLAGS="$CFLAGS $withval"
681 fi
682 ]
683)
684AC_ARG_WITH(libs,
685 [ --with-libs additional libraries to link with],
686 [
687 if test "x$withval" != "xno" ; then
688 LIBS="$LIBS $withval"
689 fi
690 ]
691)
692
693
694#
695# this is from ssh
696#
697AC_MSG_CHECKING(whether to use libwrap)
698LIBWRAP_LIB=""
699LIBWRAP_INC=""
700AC_ARG_WITH(libwrap,
701[ --with-libwrap[=PATH] Compile in libwrap (TCP Wrappers) support],
702[ AC_MSG_RESULT($withval)
703 case "$withval" in
704 no)
705 ;;
706 ""|yes)
707 LIBWRAP_LIB="-lwrap"
708 ;;
709 *)
710 if test -d "$withval"; then
711 LIBWRAP_LIB="-L$withval -lwrap"
712 changequote(<<, >>)dnl
713 sh_libwrap_inc=`echo ${withval} | sed 's%/[^/][^/]*$%%'`
714 LIBWRAP_INC="-I${sh_libwrap_inc}/include"
715 changequote([, ])dnl
716 else
717 LIBWRAP_LIB="-lwrap"
718 changequote(<<, >>)dnl
719 sh_libwrap_inc=`echo ${withval} | sed 's%/[^/][^/]*$%%'`
720 LIBWRAP_INC="-I${sh_libwrap_inc}"
721 changequote([, ])dnl
722 fi
723 ;;
724 esac
725 if test -n "$LIBWRAP_LIB"; then
726 # OLDLIBS="$LIBS"
727 LIBS="$LIBWRAP_LIB $LIBS"
728 # OLDCFLAGS="$CFLAGS"
729 CFLAGS="$CFLAGS $LIBWRAP_INC"
730 AC_CHECK_HEADER(tcpd.h,
731 [],
732 [ AC_MSG_ERROR([Could not find tcpd.h for libwrap. You must first install tcp_wrappers]) ])
733 AC_TRY_LINK([ #include <tcpd.h>
734 int allow_severity; int deny_severity; ],
735 [ hosts_access((struct request_info *) 0); ],
736 [ AC_DEFINE(SH_USE_LIBWRAP,1,[Build with tcp wrapper support]) ],
737 [ AC_MSG_ERROR([Could not find the libwrap library.]) ])
738 fi ],
739 AC_MSG_RESULT(no)
740)
741
742
743#
744# this is from the snort configure.in
745#
746AC_DEFUN(FAIL_MESSAGE,[
747 echo
748 echo
749 echo "**********************************************"
750 echo " ERROR: unable to find" $1
751 echo " checked in the following places"
752 for i in `echo $2`; do
753 echo " $i"
754 done
755 echo "**********************************************"
756 echo
757 exit
758])
759
760AC_ARG_WITH(libprelude-prefix,
761 [ --with-libprelude-prefix=PFX Prefix where libprelude is installed (optional)],
762 libprelude_config_prefix="$withval", libprelude_config_prefix="")
763
764AC_MSG_CHECKING(whether to use prelude)
765AC_ARG_WITH(prelude,
766 [ --with-prelude Prelude IDS support [[no]]],
767 [
768 if test "x${withval}" = "xno"; then
769 AC_MSG_RESULT(no)
770 else
771 AC_MSG_RESULT(yes)
772 if test x$libprelude_config_prefix != x ; then
773 if test x${LIBPRELUDE_CONFIG+set} != xset ; then
774 LIBPRELUDE_CONFIG=$libprelude_config_prefix/bin/libprelude-config
775 fi
776 fi
777
778 AC_PATH_PROG(LIBPRELUDE_CONFIG, libprelude-config, no)
779 if test x"$LIBPRELUDE_CONFIG" = "xno" ; then
780 HAVE_PRELUDE_CONFIG=no
781 else
782 HAVE_PRELUDE_CONFIG=yes
783 fi
784dnl AC_CHECK_PROG(HAVE_PRELUDE_CONFIG, libprelude-config, yes, no)
785 if test "$HAVE_PRELUDE_CONFIG" = "yes"; then
786 sh_libprelude_version=`$LIBPRELUDE_CONFIG --version`
787 case "$sh_libprelude_version" in
788 0.8*)
789 sh_prelude_libs=`$LIBPRELUDE_CONFIG --libs | sed 's,\(.*\)\( -L.* -lprelude$\),\2 \1,'`
790 sh_prelude_cflags=`$LIBPRELUDE_CONFIG --cflags`
791 LIBS="$LIBS ${sh_prelude_libs}"
792 CFLAGS="$CFLAGS ${sh_prelude_cflags}"
793 AC_DEFINE(HAVE_LIBPRELUDE,1,[Have libprelude])
794 AC_DEFINE(HAVE_LIBPRELUDE_8,1,[Have libprelude 0.8])
795 ;;
796 *)
797 AM_PATH_LIBPRELUDE([0.9.6],
798 [
799 AC_DEFINE(HAVE_LIBPRELUDE,1,[Have libprelude])
800 AC_DEFINE(HAVE_LIBPRELUDE_9,1,[Have libprelude 0.9])
801 CFLAGS="$CFLAGS $LIBPRELUDE_PTHREAD_CFLAGS"
802 LDFLAGS="$LDFLAGS $LIBPRELUDE_LDFLAGS"
803 LIBS="$LIBS $LIBPRELUDE_LIBS"
804 ],
805 [
806 AC_MSG_ERROR([Could not find libprelude.])
807 ])
808 ;;
809 esac
810 else
811 AC_MSG_ERROR([Could not find libprelude.])
812 fi
813 fi
814 ],
815 [
816 AC_MSG_RESULT(no)
817 ]
818)
819
820dnl AC_MSG_CHECKING(whether to use prelude)
821dnl AC_ARG_WITH(prelude,
822dnl [ --with-prelude Prelude IDS support [[no]]],
823dnl [
824dnl if test "x${withval}" = "xno"; then
825dnl AC_MSG_RESULT(no)
826dnl else
827dnl AC_CHECK_PROG(HAVE_PRELUDE_CONFIG, libprelude-config, yes, no)
828dnl if test "$HAVE_PRELUDE_CONFIG" = "yes"; then
829dnl sh_prelude_libs=`libprelude-config --libs | sed 's,\(.*\)\( -L.* -lprelude$\),\2 \1,'`
830dnl sh_prelude_cflags=`libprelude-config --cflags`
831dnl LIBS="$LIBS ${sh_prelude_libs}"
832dnl CFLAGS="$CFLAGS ${sh_prelude_cflags}"
833dnl AC_DEFINE(HAVE_LIBPRELUDE,1,[Have libprelude])
834dnl else
835dnl AC_MSG_ERROR([Could not find libprelude-config. Did you specify a valid path?])
836dnl fi
837dnl fi
838dnl ],
839dnl AC_MSG_RESULT(no)
840dnl )
841
842AC_ARG_ENABLE(static,
843 [ --enable-static enable static linking (recommended) [[no]]],
844 [
845 if test x$enable_static = xyes; then
846 if test x"$mynetbsd" = xyes
847 then
848 tmp_LIBS=`echo $LIBS | sed 's%\-lresolv%%' `
849 LIBS="${tmp_LIBS}"
850 fi
851 AC_DEFINE(SH_COMPILE_STATIC, 1, [Define if compiling static])
852 if test "x$GCC" = "xyes"; then
853 LDFLAGS="$LDFLAGS -static"
854 else
855 case "$host_os" in
856
857 *aix*)
858 LDFLAGS="$LDFLAGS -bnso -bI:/lib/syscalls.exp"
859 ;;
860
861 *hpux*)
862 LDFLAGS="$LDFLAGS -Wl,-a,archive"
863 ;;
864
865 *osf*)
866 LDFLAGS="$LDFLAGS -non_shared"
867 ;;
868
869 *irix*)
870 LDFLAGS="$LDFLAGS -non_shared"
871 ;;
872
873 *sco*)
874 LDFLAGS="$LDFLAGS -dn"
875 ;;
876
877 *sun*)
878 LDFLAGS="$LDFLAGS -Bstatic"
879 ;;
880
881 *solaris*)
882 LDFLAGS="$LDFLAGS -Bstatic"
883 ;;
884
885 *)
886 echo "***********************************************"
887 echo "*"
888 echo "* Don't know how to enable static linking"
889 echo "* with your compiler. Please set the environment"
890 echo "* variable LDFLAGS to:"
891 echo "* ${LDFLAGS} + the static linking flag"
892 echo "* and run configure again"
893 echo "*"
894 echo "***********************************************"
895 ;;
896
897 esac
898 fi
899 fi
900 ]
901)
902
903#
904# partly based on the snort configure.in
905#
906AC_ARG_WITH(database,
907 [ --with-database=[[mysql|postgresql|oracle|odbc]] database support [[no]]],
908 [
909 if test x"$enable_xml_log" != xyes; then
910 AC_MSG_ERROR([--with-database: --enable-xml-log required])
911 fi
912 if test "x${withval}" = "xmysql"; then
913 AC_CHECK_PROG(HAVE_MYSQL_CONFIG, mysql_config, yes, no)
914 if test "$HAVE_MYSQL_CONFIG" = "yes"; then
915 # echo "mysql_config found"
916 sh_mysql_libs="`mysql_config --libs`"
917 # echo ${sh_mysql_libs}
918 sh_mysql_libs="`eval echo ${sh_mysql_libs}`"
919 # echo $mysql_libs
920 # save_libs="$LIBS"
921 # LIBS="$LIBS `mysql_config --libs`"
922 # echo $LIBS
923 LIBS="$LIBS ${sh_mysql_libs}"
924 # echo $LIBS
925 sh_mysql_cflags="`mysql_config --cflags`"
926 sh_mysql_cflags="`eval echo ${sh_mysql_cflags}`"
927 # CFLAGS="$CFLAGS `mysql_config --cflags`"
928 # CFLAGS="$CFLAGS ${sh_mysql_cflags}"
929 CPPFLAGS="$CPPFLAGS ${sh_mysql_cflags}"
930 else
931 AC_MSG_CHECKING(for MySQL in /usr /usr/local /usr/local/mysql MYSQL_HOME)
932 mysql_directory="/usr /usr/local /usr/local/mysql ${MYSQL_HOME}"
933
934 for i in $mysql_directory; do
935 if test -r $i/include/mysql/mysql.h; then
936 MYSQL_DIR=$i
937 MYSQL_INC_DIR=$i/include
938 # we use AC_CHECK_HEADERS to check for mysql/mysql.h
939 fi
940 done
941 if test -z "$MYSQL_DIR"; then
942 for i in $mysql_directory; do
943 if test -r $i/include/mysql.h; then
944 MYSQL_DIR=$i
945 MYSQL_INC_DIR=$i/include
946 fi
947 done
948 fi
949
950 if test -z "$MYSQL_DIR"; then
951 tmp=""
952 for i in $mysql_directory; do
953 tmp="$tmp $i/include $i/include/mysql"
954 done
955 FAIL_MESSAGE("mysql headers (mysql.h)", $tmp)
956 fi
957
958 for i in lib lib/mysql; do
959 str="$MYSQL_DIR/$i/libmysqlclient.*"
960 for j in `echo $str`; do
961 if test -r $j; then
962 MYSQL_LIB_DIR="$MYSQL_DIR/$i"
963 break 2
964 fi
965 done
966 done
967
968 if test -z "$MYSQL_LIB_DIR"; then
969 for ff in $mysql_directory; do
970 for i in lib lib/mysql; do
971 str="$ff/$i/libmysqlclient.*"
972 for j in `echo $str`; do
973 if test -r $j; then
974 MYSQL_LIB_DIR="$ff/$i"
975 break 3
976 fi
977 done
978 done
979 done
980 fi
981
982 if test -z "$MYSQL_LIB_DIR"; then
983 tmp=""
984 for i in $mysql_directory; do
985 tmp="$i/lib $i/lib/mysql"
986 done
987 FAIL_MESSAGE("mysql library libmysqlclient", $tmp)
988 fi
989
990 AC_MSG_RESULT(yes)
991 LIBS="$LIBS -L${MYSQL_LIB_DIR} -lmysqlclient"
992 # CFLAGS="$CFLAGS -I${MYSQL_INC_DIR}"
993 CPPFLAGS="$CPPFLAGS -I${MYSQL_INC_DIR}"
994 fi
995 AC_DEFINE(WITH_MYSQL)
996 AC_DEFINE(WITH_DATABASE)
997 AC_CHECK_LIB(z, inflateEnd, [zlib_cv_libz=yes], [zlib_cv_libz=no])
998 AC_MSG_CHECKING(for zlib)
999 if test "$zlib_cv_libz" = "yes"
1000 then
1001 LIBS="$LIBS -lz -lm"
1002 AC_MSG_RESULT(ok)
1003 else
1004 AC_MSG_RESULT(failed)
1005 echo
1006 echo " Either the mysql or the zlib library was not found"
1007 echo " or was unusable, maybe because an old, incompatible"
1008 echo " version is installed on your system, eg compiled from"
1009 echo " source long time ago. See config.log for the error"
1010 echo " message from the compiler."
1011 echo " Please review your installed mysql and zlib libraries"
1012 echo " and/or use --with-libs=-L/path/to/libdirectory"
1013 echo " where libdirectory is the directory holding libmysql"
1014 echo " or libz."
1015 if test x"$enable_static" = xyes; then
1016 echo " Note that for compiling a static binary, you need"
1017 echo " the static libraries, rather than the shared ones."
1018 fi
1019 echo
1020 AC_MSG_ERROR([libmysql or zlib not found or unuseable])
1021 fi
1022 AC_CHECK_HEADERS(mysql/mysql.h)
1023 elif test "x${withval}" = "xpostgresql"; then
1024 AC_DEFINE(WITH_POSTGRES)
1025 AC_DEFINE(WITH_DATABASE)
1026 #
1027 PGCONF="no"
1028 MY_PATH="${PATH}:/usr/local/bin:/usr/local/pgsql/bin"
1029 OLD_IFS="$IFS"
1030 IFS=":"
1031 for ff in ${MY_PATH}
1032 do
1033 if test -f "$ff/pg_config"
1034 then
1035 PGCONF="$ff/pg_config"
1036 fi
1037 done
1038 IFS="${OLD_IFS}"
1039 #
1040 #
1041 if test "x${PGCONF}" = "xno"
1042 then
1043 AC_MSG_CHECKING(for PostgreSQL in /usr/local/pgsql /usr/pgsql /usr/local /usr PGSQL_HOME)
1044 pgsql_directory="/usr/local/pgsql /usr/pgsql /usr/local /usr ${PGSQL_HOME}"
1045 for i in $pgsql_directory; do
1046 if test -r $i/include/pgsql/libpq-fe.h; then
1047 PGSQL_INC_DIR=$i/include
1048 PGSQL_DIR=$i
1049 # use AC_CHECK_HEADERS to check for pgsql/libpq-fe.h
1050 fi
1051 done
1052 if test -z "$PGSQL_DIR"; then
1053 for i in $pgsql_directory; do
1054 if test -r $i/include/libpq-fe.h; then
1055 PGSQL_INC_DIR=$i/include
1056 PGSQL_DIR=$i
1057 fi
1058 done
1059 fi
1060
1061 if test -z "$PGSQL_DIR"; then
1062 tmp=""
1063 for i in $pgsql_directory; do
1064 tmp="$tmp $i/include $i/include/pgsql"
1065 done
1066 FAIL_MESSAGE("PostgreSQL header file (libpq-fe.h)", $tmp)
1067 fi
1068
1069 for i in lib lib/pgsql; do
1070 str="$PGSQL_DIR/$i/libpq.*"
1071 for j in `echo $str`; do
1072 if test -r $j; then
1073 PGSQL_LIB_DIR="$PGSQL_DIR/$i"
1074 break 2
1075 fi
1076 done
1077 done
1078
1079 if test -z "$PGSQL_LIB_DIR"; then
1080 for ff in $pgsql_directory; do
1081 for i in lib lib/pgsql; do
1082 str="$ff/$i/libpq.*"
1083 for j in `echo $str`; do
1084 if test -r $j; then
1085 PGSQL_LIB_DIR="$ff/$i"
1086 break 3
1087 fi
1088 done
1089 done
1090 done
1091 fi
1092
1093 if test -z "$PGSQL_LIB_DIR"; then
1094 tmp=""
1095 for i in $pgsql_directory; do
1096 tmp="$i/lib $i/lib/pgsql"
1097 done
1098 FAIL_MESSAGE("postgresql library libpq", $tmp)
1099 fi
1100
1101 AC_MSG_RESULT(yes)
1102
1103 LIBS="$LIBS -L${PGSQL_LIB_DIR} -lpq -lm"
1104 if test x"$enable_static" = xyes; then
1105 LIBS="$LIBS -L${PGSQL_LIB_DIR} -lpq -lcrypt -lm"
1106 else
1107 LIBS="$LIBS -L${PGSQL_LIB_DIR} -lpq -lm"
1108 fi
1109 # CFLAGS="$CFLAGS -I${PGSQL_INC_DIR}"
1110 CPPFLAGS="$CPPFLAGS -I${PGSQL_INC_DIR}"
1111 AC_CHECK_HEADERS(pgsql/libpq-fe.h)
1112 else
1113 pg_lib_dir=`${PGCONF} --libdir`
1114 if test x"$enable_static" = xyes; then
1115 LIBS="$LIBS -L${pg_lib_dir} -lpq -lcrypt -lm"
1116 else
1117 LIBS="$LIBS -L${pg_lib_dir} -lpq -lm"
1118 fi
1119 pg_inc_dir=`${PGCONF} --includedir`
1120 # CFLAGS="$CFLAGS -I${pg_inc_dir}"
1121 CPPFLAGS="$CPPFLAGS -I${pg_inc_dir}"
1122 fi
1123 elif test "x${withval}" = "xodbc"; then
1124 AC_MSG_CHECKING(for odbc in /usr /usr/local ODBC_HOME)
1125 odbc_directory="/usr /usr/local"
1126
1127 for i in $odbc_directory; do
1128 if test -r $i/include/sql.h; then
1129 if test -r $i/include/sqlext.h; then
1130 if test -r $i/include/sqltypes.h; then
1131 ODBC_DIR=$i
1132 ODBC_INC_DIR=$i/include
1133 fi
1134 fi
1135 fi
1136 done
1137
1138 if test -z "$ODBC_DIR"; then
1139 tmp=""
1140 for i in $odbc_directory; do
1141 tmp="$tmp $i/include"
1142 done
1143 FAIL_MESSAGE("odbc headers (sql.h sqlext.h sqltypes.h)", $tmp)
1144 fi
1145
1146 str="$ODBC_DIR/lib/libodbc.*"
1147 for j in `echo $str`; do
1148 if test -r $j; then
1149 ODBC_LIB_DIR="$ODBC_DIR/lib"
1150 ODBC_LIB="odbc"
1151 fi
1152 done
1153
1154 if test -z "$ODBC_LIB_DIR"; then
1155 FAIL_MESSAGE("odbc library (libodbc)", "$ODBC_DIR/lib")
1156 fi
1157
1158 AC_MSG_RESULT(yes)
1159 CPPFLAGS="${CPPFLAGS} -I${ODBC_INC_DIR}"
1160 LIBS="${LIBS} -L${ODBC_LIB_DIR} -l$ODBC_LIB"
1161 AC_DEFINE(WITH_ODBC)
1162 AC_DEFINE(WITH_DATABASE)
1163
1164 elif test "x${withval}" = "xoracle"; then
1165 AC_MSG_CHECKING(for oracle in /usr /usr/local ORACLE_HOME)
1166 oracle_directory="/usr /usr/local ${ORACLE_HOME}"
1167 for i in $oracle_directory; do
1168 if test -r $i/rdbms/demo/oci.h; then
1169 ORACLE_DIR=$i
1170 fi
1171 done
1172
1173 if test -z "$ORACLE_DIR"; then
1174 tmp=""
1175 for i in $oracle_directory; do
1176 tmp="$tmp $i/rdbms/demo"
1177 done
1178 FAIL_MESSAGE("OCI header file (oci.h)", $tmp)
1179 else
1180 for i in rdbms/demo rdbms/public network/public; do
1181 ORACLE_CPP_FLAGS="$ORACLE_CPP_FLAGS -I$ORACLE_DIR/$i"
1182 done
1183 ORACLE_LIB_DIR="$ORACLE_DIR/lib"
1184 AC_MSG_RESULT(yes)
1185
1186 CPPFLAGS="${CPPFLAGS} ${ORACLE_CPP_FLAGS}"
1187
1188 ORACLE_LIBS="-lclntsh"
1189 if test -r $ORACLE_LIB_DIR/libwtc9.so; then
1190 ORACLE_LIBS="${ORACLE_LIBS} -lwtc9"
1191 elif test -r $ORACLE_LIB_DIR/libwtc8.so; then
1192 ORACLE_LIBS="${ORACLE_LIBS} -lwtc8"
1193 fi
1194 LIBS="${LIBS} -L${ORACLE_LIB_DIR} ${ORACLE_LIBS}"
1195 if test "x$GCC" != "xyes"; then
1196 CFLAGS="${CFLAGS} -fno-strict-aliasing"
1197 fi
1198 fi
1199 AC_DEFINE(WITH_ORACLE)
1200 AC_DEFINE(WITH_DATABASE)
1201
1202 else
1203 AC_MSG_ERROR([--with-database: unsupported database ${withval}])
1204 fi
1205 ]
1206)
1207
1208AC_ARG_WITH(console,
1209 [ --with-console=PATH set path to console device [[/dev/console]]],
1210 [
1211 if test "x${withval}" != xno; then
1212 mycons="$withval"
1213 AC_DEFINE_UNQUOTED(DEFAULT_CONSOLE, _("${mycons}") )
1214 fi
1215 ])
1216
1217AC_ARG_WITH(altconsole,
1218 [ --with-altconsole=PATH set path to second console device [[none]]],
1219 [
1220 if test "x${withval}" != xno; then
1221 myaltcons="$withval"
1222 else
1223 myaltcons="NULL"
1224 fi
1225 ],
1226 [myaltcons="NULL"])
1227AC_DEFINE_UNQUOTED(ALT_CONSOLE, _("${myaltcons}") )
1228
1229AC_ARG_WITH(timeserver,
1230 [ --with-timeserver=HOST set host address for time server [[none]]],
1231 [
1232 if test "x${withval}" != xno; then
1233 mytimeserv="$withval"
1234 AC_DEFINE(HAVE_NTIME)
1235 else
1236 mytimeserv="NULL"
1237 fi
1238 ],
1239 mytimeserv="NULL")
1240AC_DEFINE_UNQUOTED(DEFAULT_TIMESERVER, _("${mytimeserv}") )
1241
1242AC_ARG_WITH(alttimeserver,
1243 [ --with-alttimeserver=HOST set address for backup time server [[none]]],
1244 [
1245 if test "x${withval}" != xno; then
1246 myalttimeserv="$withval"
1247 AC_DEFINE(HAVE_NTIME)
1248 else
1249 myalttimeserv="NULL"
1250 fi
1251 ],
1252 myalttimeserv="NULL")
1253AC_DEFINE_UNQUOTED(ALT_TIMESERVER, _("${myalttimeserv}") )
1254
1255AC_ARG_ENABLE(login-watch,
1256 [ --enable-login-watch watch for login/logout [[no]]],
1257 [
1258 if test "x${enable_login_watch}" = xyes; then
1259 AC_DEFINE(SH_USE_UTMP)
1260 fi
1261 ]
1262)
1263
1264AC_ARG_ENABLE(mounts-check,
1265 [ --enable-mounts-check check mount options on filesystems [[no]]],
1266 [
1267 if test "x${enable_mounts_check}" = xyes; then
1268 AC_DEFINE(SH_USE_MOUNTS)
1269 fi
1270 ]
1271)
1272
1273AC_ARG_ENABLE(process-check,
1274 [ --enable-process-check check processes [[no]]],
1275 [
1276 if test "x${enable_process_check}" = xyes; then
1277 AC_CHECK_LIB([rt], [sched_getparam], sh_lrt=yes, sh_lrt=no)
1278 if test x"$sh_lrt" = xyes; then
1279 LIBRT=-lrt
1280 else
1281 LIBRT=
1282 fi
1283 LIBS="$LIBS $LIBRT"
1284 AC_DEFINE(SH_USE_PROCESSCHECK, [1], [Define if you want to check processes])
1285 fi
1286 ]
1287)
1288
1289AC_ARG_ENABLE(port-check,
1290 [ --enable-port-check check ports [[no]]],
1291 [
1292 if test "x${enable_port_check}" = xyes; then
1293 AC_DEFINE(SH_USE_PORTCHECK, [1], [Define if you want to check ports])
1294 fi
1295 ]
1296)
1297
1298AC_ARG_ENABLE(userfiles,
1299 [ --enable-userfiles check for users' config files [[no]]],
1300 [
1301 if test "x${enableval}" = "xyes"; then
1302 AC_DEFINE(SH_USE_USERFILES)
1303 fi
1304 ]
1305)
1306
1307AC_ARG_ENABLE(debug,
1308 [ --enable-debug enable debug options [[no]]],
1309 [
1310 if test "x${enable_debug}" = "xyes"; then
1311 if test "x${mydebugflag}" != "xyes"; then
1312 AC_DEFINE(MEM_DEBUG)
1313 fi
1314 AC_DEFINE(WITH_TPT)
1315 AC_DEFINE(SL_DEBUG)
1316 AC_DEFINE(SL_FAIL_ON_ERROR)
1317 if test "x${myneedg3}" = "xyes"; then
1318 mydebugdef="-g3"
1319 else
1320 mydebugdef="-g"
1321 fi
1322 mydebugit="yes"
1323 fi
1324 ]
1325)
1326AC_SUBST(mydebugdef)
1327
1328AC_ARG_ENABLE(ptrace,
1329 [ --enable-ptrace use anti-debugger options [[no]]],
1330 [
1331 if test "x${enable_ptrace}" = xyes; then
1332 if test "x$mydebugit" != "xyes"; then
1333 AC_DEFINE(SCREW_IT_UP)
1334 fi
1335 fi
1336 ]
1337)
1338
1339dnl
1340if test "x$GCC" = "xyes"; then
1341 if test ! -z "`echo "$CFLAGS" | grep "\-g\ " 2> /dev/null`" ; then
1342 CFLAGS=`echo $CFLAGS | sed 's%\-g%%' `
1343 fi
1344
1345dnl if test ! -z "`echo "$CFLAGS" | grep "\-O2" 2> /dev/null`" ; then
1346dnl CFLAGS=`echo $CFLAGS | sed 's%\-O2%\-O3%' `
1347dnl fi
1348
1349 if test -z "`echo "$CFLAGS" | grep "\-Wall" 2> /dev/null`" ; then
1350 CFLAGS="$CFLAGS -Wall -W "
1351 fi
1352
1353 if test -z "`echo "$CFLAGS" | grep "\-fstrength\-reduce" 2> /dev/null`"
1354 then
1355 if test -z "`echo "$CFLAGS" | grep "\-fno\-strength\-reduce" 2> /dev/null`"
1356 then
1357 CFLAGS="$CFLAGS -fno-strength-reduce"
1358 fi
1359 fi
1360
1361 if test -z "`echo "$CFLAGS" | grep "\-fomit\-frame\-pointer" 2> /dev/null`"
1362 then
1363 if test -z "`echo "$CFLAGS" | grep "\-fno\-omit\-frame\-pointer" 2> /dev/null`"
1364 then
1365 CFLAGS="$CFLAGS -fno-omit-frame-pointer"
1366 fi
1367 fi
1368
1369fi
1370
1371AC_MSG_CHECKING([which random module to use])
1372AC_ARG_WITH(rnd,
1373 [ --with-rnd=[[egd|unix|dev|default]] random number generator [[default]]],
1374[use_static_rnd=$withval], [use_static_rnd=default] )
1375
1376if test "$use_static_rnd" = no; then
1377 use_static_rnd=default
1378fi
1379
1380case "$use_static_rnd" in
1381 egd | dev | unix | default )
1382 AC_MSG_RESULT($use_static_rnd)
1383 ;;
1384 * )
1385 AC_MSG_RESULT([invalid argument])
1386 AC_MSG_ERROR([--with-rnd: there is no random module ${use_static_rnd}])
1387 ;;
1388esac
1389
1390AC_ARG_WITH(egd-socket,
1391 [ --with-egd-socket=NAME EGD socket name],
1392 egd_socket_name="$withval", egd_socket_name="" )
1393AC_DEFINE_UNQUOTED(EGD_SOCKET_NAME, _("$egd_socket_name") )
1394
1395dnl
1396dnl See whether the user wants to disable checking for /dev/random
1397
1398try_dev_random=yes
1399
1400case "$use_static_rnd" in
1401dev | default )
1402 try_dev_random=yes
1403 ;;
1404egd)
1405 AC_DEFINE(HAVE_EGD_RANDOM)
1406 try_dev_random=no
1407 ;;
1408unix)
1409 AC_DEFINE(HAVE_UNIX_RANDOM)
1410 try_dev_random=no
1411 ;;
1412esac
1413
1414
1415if test "x$try_dev_random" = "xyes"; then
1416 AC_MSG_CHECKING(whether /dev/random exists)
1417 if test -r "/dev/srandom" && test -c "/dev/srandom"; then
1418 AC_DEFINE(HAVE_URANDOM)
1419 AC_DEFINE_UNQUOTED(NAME_OF_DEV_RANDOM, _("/dev/srandom") )
1420 AC_MSG_RESULT(yes)
1421 if test -r "/dev/urandom" && test -c "/dev/urandom"; then
1422 AC_DEFINE_UNQUOTED(NAME_OF_DEV_URANDOM, _("/dev/urandom") )
1423 fi
1424 else
1425 if test -r "/dev/random" && test -c "/dev/random"; then
1426 AC_DEFINE(HAVE_URANDOM)
1427 AC_DEFINE_UNQUOTED(NAME_OF_DEV_RANDOM, _("/dev/random") )
1428 AC_MSG_RESULT(yes)
1429 if test -r "/dev/urandom" && test -c "/dev/urandom"; then
1430 AC_DEFINE_UNQUOTED(NAME_OF_DEV_URANDOM, _("/dev/urandom") )
1431 fi
1432 else
1433 AC_MSG_RESULT(no)
1434 AC_DEFINE(HAVE_UNIX_RANDOM)
1435 fi
1436 fi
1437fi
1438
1439
1440dnl
1441dnl NETWORK OPTIONS
1442dnl
1443
1444
1445AC_ARG_ENABLE(network,
1446 [ --enable-network=[[client|server]] compile client or server [[no]]],
1447 [
1448 if test "x$enable_network" = xclient; then
1449 mytclient="-DSH_WITH_CLIENT"
1450 yulectl_prg=
1451 setpwd_prg="samhain_setpwd"
1452 sh_main_prg="samhain"
1453 if test "x${sh_have_gmp}" = xyes
1454 then
1455 LIBS="-lgmp $LIBS"
1456 fi
1457dnl AC_CHECK_HEADER(sys/capability.h,
1458dnl [AC_CHECK_LIB(cap, cap_get_proc,,sh_use_lcaps="no")],
1459dnl [sh_use_lcaps="no"])
1460 elif test "x$enable_network" = xserver; then
1461 mytclient="-DSH_WITH_SERVER"
1462 yulectl_prg="yulectl"
1463 setpwd_prg="samhain_setpwd"
1464 sh_main_prg="yule"
1465 if test "x${sh_have_gmp}" = xyes
1466 then
1467 LIBS="-lgmp $LIBS"
1468 fi
1469 sh_use_lcaps="undef"
1470 elif test "x$enable_network" = xno; then
1471 mytclient="-DSH_STANDALONE"
1472 yulectl_prg=
1473 setpwd_prg=
1474 sh_main_prg="samhain"
1475dnl AC_CHECK_HEADER(sys/capability.h,
1476dnl [AC_CHECK_LIB(cap, cap_get_proc,,sh_use_lcaps="no")],
1477dnl [sh_use_lcaps="no"])
1478 else
1479 AC_MSG_ERROR([--enable-network=WHAT: WHAT must be client, server, or no])
1480 fi
1481 ],
1482 [
1483 mytclient="-DSH_STANDALONE"
1484 setpwd_prg=
1485 yulectl_prg=
1486 sh_main_prg="samhain"
1487dnl AC_CHECK_HEADER(sys/capability.h,
1488dnl [AC_CHECK_LIB(cap, cap_get_proc,,sh_use_lcaps="no")],
1489dnl [sh_use_lcaps="no"])
1490 ],
1491)
1492AC_SUBST(setpwd_prg)
1493AC_SUBST(yulectl_prg)
1494AC_SUBST(sh_main_prg)
1495AC_SUBST(mytclient)
1496
1497# needed for the rpm spec
1498clmytclient=`echo ${mytclient} | sed s%\-%%`
1499AC_SUBST(clmytclient)
1500
1501AC_ARG_ENABLE(udp,
1502 [ --enable-udp server can listen on port 514/udp [[no]]],
1503 [
1504 if test "x${enable_udp}" = xyes; then
1505 AC_DEFINE(INET_SYSLOG)
1506 fi
1507 ]
1508)
1509
1510myencrypt=yes
1511AC_ARG_ENABLE(encrypt,
1512 [ --disable-encrypt disable client/server encryption],
1513 [
1514 if test "x${enable_encrypt}" = xno; then
1515 myencrypt=no
1516 elif test "x${enable_encrypt}" = "x1"; then
1517 myencrypt=1
1518 fi
1519 ]
1520)
1521if test "x${myencrypt}" = "xyes"; then
1522 AC_DEFINE(SH_ENCRYPT)
1523 AC_DEFINE(SH_ENCRYPT_2)
1524elif test "x${myencrypt}" = "x1"; then
1525 AC_DEFINE(SH_ENCRYPT)
1526fi
1527
1528sh_use_srp_proto=yes
1529AC_ARG_ENABLE(srp,
1530 [ --disable-srp disable SRP for authentication],
1531 [
1532 if test "x${enable_srp}" = xno; then
1533 sh_use_srp_proto=no
1534 fi
1535 ]
1536)
1537if test "x${sh_use_srp_proto}" = xyes; then
1538 AC_DEFINE(USE_SRP_PROTOCOL)
1539fi
1540
1541AC_ARG_WITH(port,
1542 [ --with-port=PORT set port to use for TCP/IP connection [[49777]]],
1543 [
1544 echo "${withval}" | grep ['[^0123456789]'] >/dev/null 2>&1 &&
1545 AC_MSG_ERROR([--with-port: PORT must be numeric])
1546 myport=${withval}
1547 ],
1548 [myport="49777"])
1549AC_DEFINE_UNQUOTED(SH_DEFAULT_PORT, ${myport})
1550AC_SUBST(myport)
1551
1552AC_ARG_WITH(logserver,
1553 [ --with-logserver=HOST set host address for log server [[none]]],
1554 [
1555 case "$withval" in
1556 *.* | localhost)
1557 mylogsrv="$withval"
1558 ;;
1559 *)
1560 mylogsrv="$withval"
1561 ;;
1562 esac
1563 ],
1564 [mylogsrv="NULL"])
1565AC_DEFINE_UNQUOTED(DEFAULT_LOGSERVER, _("${mylogsrv}") )
1566AC_SUBST(mylogsrv)
1567
1568AC_ARG_WITH(altlogserver,
1569 [ --with-altlogserver=HOST set address for backup log server [[none]]],
1570 [
1571 case "$withval" in
1572 *.* | localhost)
1573 myaltlogsrv="$withval"
1574 ;;
1575 *)
1576 myaltlogsrv="$withval"
1577 ;;
1578 esac
1579 ],
1580 [myaltlogsrv="NULL"])
1581AC_DEFINE_UNQUOTED(ALT_LOGSERVER, _("${myaltlogsrv}"))
1582
1583
1584
1585dnl
1586dnl STEALTH OPTIONS
1587dnl
1588nocl_code=
1589xor_code=0
1590AC_ARG_ENABLE(nocl,
1591 [ --enable-nocl=PW no CL parsing unless first CL argument is PW],
1592 [
1593 if test "x${enableval}" != "x"; then
1594 AC_DEFINE(SH_STEALTH_NOCL)
1595 fi
1596 if test "x${enableval}" = "xstop" || test "x${enableval}" = "xstart"; then
1597 AC_MSG_ERROR([--enable-nocl: start/stop/reload/restart/status are reserved words])
1598 fi
1599 if test "x${enableval}" = "xreload" || test "x${enableval}" = "xrestart"; then
1600 AC_MSG_ERROR([--enable-nocl: start/stop/reload/restart/status are reserved words])
1601 fi
1602 if test "x${enableval}" = "xstatus"; then
1603 AC_MSG_ERROR([--enable-nocl: start/stop/reload/restart/status are reserved words])
1604 fi
1605 if test "x${enableval}" = "xno"; then
1606 AC_MSG_ERROR([--enable-nocl: use of --enable-nocl=no is ambiguous])
1607 fi
1608 nocl_code="${enable_nocl}"
1609 ]
1610)
1611AC_DEFINE_UNQUOTED(NOCL_CODE, _("${nocl_code}") )
1612AC_SUBST(nocl_code)
1613AC_ARG_ENABLE(stealth,
1614 [ --enable-stealth=XOR_VAL enable stealth mode [[no]]],
1615 [AC_DEFINE(SH_STEALTH)
1616 if test "x${enableval}" != "xyes"; then
1617 echo "${enableval}" | grep ['[^0123456789]'] >/dev/null 2>&1 &&
1618 AC_MSG_ERROR([--enable-stealth: XOR_VAL must be numeric])
1619 if test "${enableval}" -lt 127 || test "${enableval}" -gt 255; then
1620 if test x"${enableval}" = x0
1621 then
1622 :
1623 else
1624 AC_MSG_ERROR([--enable-stealth: XOR_VAL must be in the range 127 to 255])
1625 fi
1626 fi
1627 xor_code="${enable_stealth}"
1628 else
1629 xor_code=0
1630 fi
1631 stegin_prg="samhain_stealth"
1632 ],
1633 [
1634 stegin_prg=
1635 ]
1636)
1637AC_ARG_ENABLE(micro-stealth,
1638 [ --enable-micro-stealth=XOR_VAL enable micro stealth mode [[no]]],
1639 [
1640 AC_DEFINE(SH_STEALTH)
1641 AC_DEFINE(SH_STEALTH_MICRO)
1642 if test "x${enableval}" != "xyes"; then
1643 echo "${enableval}" | grep ['[^0123456789]'] >/dev/null 2>&1 &&
1644 AC_MSG_ERROR([--enable-micro-stealth: XOR_VAL must be numeric])
1645 if test "${enableval}" -lt 127 || test "${enableval}" -gt 255; then
1646 if test x"${enableval}" = x0
1647 then
1648 :
1649 else
1650 AC_MSG_ERROR([--enable-micro-stealth: XOR_VAL must be in the range 127 to 255])
1651 fi
1652 fi
1653 xor_code="${enable_micro_stealth}"
1654 else
1655 xor_code=0
1656 fi
1657 ]
1658)
1659install_name="samhain"
1660INSTALL_NAME="SAMHAIN"
1661AC_ARG_ENABLE(install-name,
1662 [ --enable-install-name=NAME name under which to install [[samhain|yule]]],
1663 [
1664 if test "x${enableval}" != "xyes"; then
1665 install_name="${enableval}"
1666 INSTALL_NAME=`echo "${enableval}" | tr [a-z] [A-Z]`
1667 else
1668 install_name="${sh_main_prg}"
1669 INSTALL_NAME=`echo "${sh_main_prg}" | tr [a-z] [A-Z]`
1670 fi
1671 ],
1672 [
1673 install_name="${sh_main_prg}"
1674 INSTALL_NAME=`echo "${sh_main_prg}" | tr [a-z] [A-Z]`
1675 ]
1676)
1677
1678
1679need_user_install=0
1680
1681AC_ARG_ENABLE(identity,
1682 [ --enable-identity=USER user if dropping root [[daemon]]],
1683 [
1684 if test x"$enableval" = xno; then
1685 myident="daemon"
1686 else
1687 myident="$enableval"
1688 fi
1689 echo "${myident}" | grep ['[^0123456789]'] >/dev/null 2>&1 || \
1690 AC_MSG_ERROR([--enable-identity: need username, not UID])
1691 myident_uid=`(cat /etc/passwd; ypcat passwd) 2>/dev/null |\
1692 grep "^${myident}:" | awk -F: '{ print $3; }'`
1693 if test x"${myident_uid}" = x; then
1694 AC_MSG_WARN([--enable-identity: user ${myident} will be added upon install])
1695 need_user_install=1
1696 fi
1697 ],
1698 [
1699 for myident in ${install_name} daemon nobody; do
1700 AC_MSG_CHECKING(for user ${myident})
1701 myident_uid=`(cat /etc/passwd; ypcat passwd) 2>/dev/null |\
1702 grep "^${myident}:" | awk -F: '{ print $3; }'`
1703 if test x"${myident_uid}" != x; then
1704 AC_MSG_RESULT(yes)
1705 break;
1706 else
1707 AC_MSG_RESULT(no)
1708 fi
1709 done
1710 if test x"${myident_uid}" = x; then
1711 myident=${install_name}
1712 AC_MSG_WARN([--enable-identity: user ${myident} will be added upon install])
1713 need_user_install=1
1714 fi
1715 ])
1716AC_DEFINE_UNQUOTED(DEFAULT_IDENT, _("${myident}") )
1717AC_SUBST(myident)
1718AC_SUBST(need_user_install)
1719
1720sh_insmod_cmd=": # no kernel module"
1721sh_lkm=""
1722lkm_inc=""
1723khidemap="/boot/System.map"
1724sh_syscalltable="0x0"
1725AC_ARG_ENABLE(khide,
1726 [ --enable-khide=SYSTEM_MAP use kernel module to hide (Linux only)[[/boot/System.map]]],
1727 [
1728 if test "x${enable_khide}" != xno; then
1729 if test "x${enableval}" != "xyes"; then
1730 khidemap="${enableval}"
1731 fi
1732 sh_syscalltable=`egrep '(D|d|R|r) sys_call_table' ${khidemap} | awk '{print $1}'`
1733 if test x"$sh_syscalltable" = x; then
1734 AC_MSG_ERROR([--enable-khide: symbol sys_call_table not found in ${khidemap}])
1735 fi
1736 sh_syscalltable="0x${sh_syscalltable}"
1737 install_name_len=`echo ${install_name} | awk '{ print(length()); }'`
1738 if test "${install_name_len}" -gt 15 ; then
1739 AC_MSG_ERROR([--enable-khide: install_name exceeds 15 char length limit])
1740 fi
1741 AC_DEFINE(SH_USE_LKM)
1742 AC_DEFINE_UNQUOTED(SH_MAGIC_HIDE, "${install_name}")
1743
1744 # -- NEW --
1745 kernel_version=`uname -r | sed s,2.6.*,LINUX26,`
1746 kernel_numeric=`uname -r | sed 's%-%.%g' | sed 's%_%.%g' | awk -F. '{ print $1*65536+$2*256+$3 }'`
1747 AC_DEFINE_UNQUOTED(SH_KERNEL_NUMERIC, ${kernel_numeric}, [Kernel number])
1748
1749 if test x"$kernel_version" = xLINUX26
1750 then
1751
1752 sh_modlist_lock=`egrep ['[bd] modlist_lock$'] ${khidemap} | awk '{print $1}'`
1753 if test x"$sh_modlist_lock" = x; then
1754 echo "--enable-khide: symbol modlist_lock not found in ${khidemap}"
1755 else
1756 sh_modlist_lock="0x${sh_modlist_lock}"
1757 AC_DEFINE_UNQUOTED(SH_MODLIST_LOCK, ${sh_modlist_lock}, [The address of the modules list spinlock])
1758 fi
1759
1760 sh_modlist_mutex=`egrep ['[bd] module_mutex$'] ${khidemap} | awk '{print $1}'`
1761 if test x"$sh_modlist_mutex" = x; then
1762 echo "--enable-khide: symbol module_mutex not found in ${khidemap}"
1763 else
1764 sh_modlist_mutex="0x${sh_modlist_mutex}"
1765 AC_DEFINE_UNQUOTED(SH_MODLIST_MUTEX, ${sh_modlist_mutex}, [The address of the modules list mutex])
1766 fi
1767
1768 sh_list_modules=`egrep 'd modules$' ${khidemap} | awk '{print $1}'`
1769 if test x"$sh_list_modules" = x; then
1770 AC_MSG_ERROR([--enable-khide: symbol modules not found in ${khidemap}])
1771 fi
1772 sh_list_modules="0x${sh_list_modules}"
1773 AC_DEFINE_UNQUOTED(SH_LIST_MODULES, ${sh_list_modules}, [The address of the modules list])
1774
1775 AC_DEFINE(LINUX26, 1, [Define if kernel is 2.6])
1776 sh_insmod_cmd="modprobe ${install_name}_hide"
1777 sh_lkm="samhain_hide.ko"
1778 else
1779 sh_insmod_cmd="insmod ${install_name}_hide; insmod ${install_name}_erase; rmmod ${install_name}_erase"
1780 sh_lkm="samhain_hide.o samhain_erase.o"
1781 fi
1782 # -- END NEW --
1783
1784 kvers=`uname -r`
1785 if test -f /lib/modules/${kvers}/build/include/linux/kernel.h; then
1786 lkm_inc="-I/lib/modules/${kvers}/build/include"
1787 else
1788 AC_MSG_WARN([--enable-khide: /lib/modules/${kvers}/build/include/linux not found])
1789 AC_MSG_WARN([--enable-khide: You may need to install the kernel-source])
1790 AC_MSG_WARN([--enable-khide: headers for the currently-running kernel.])
1791 fi
1792 sh_is_vanilla_kernel=yes
1793 if test -f /lib/modules/${kvers}/build/include/linux/sched.h; then
1794 grep 'next_task,' /lib/modules/${kvers}/build/include/linux/sched.h >/dev/null 2>&1 || sh_is_vanilla_kernel=no
1795 fi
1796 if test x"${sh_is_vanilla_kernel}" = xno; then
1797 echo "This is not a 2.4 vanilla kernel"
1798 else
1799 AC_DEFINE(SH_VANILLA_KERNEL)
1800 fi
1801 fi
1802 ]
1803)
1804AC_SUBST(lkm_inc)
1805AC_SUBST(sh_lkm)
1806AC_SUBST(sh_insmod_cmd)
1807AC_SUBST(install_name)
1808AC_SUBST(INSTALL_NAME)
1809AC_SUBST(stegin_prg)
1810AC_SUBST(xor_code)
1811
1812AC_DEFINE_UNQUOTED(XOR_CODE, ${xor_code})
1813AC_DEFINE_UNQUOTED(SH_SYSCALLTABLE, ${sh_syscalltable})
1814
1815
1816exepack_state0=`${srcdir}/c_random.sh 2>/dev/null`
1817exepack_state1=`${srcdir}/c_random.sh 2>/dev/null`
1818exepack_state2=`${srcdir}/c_random.sh 2>/dev/null`
1819
1820AC_DEFINE_UNQUOTED(EXEPACK_STATE_0, ${exepack_state0})
1821AC_DEFINE_UNQUOTED(EXEPACK_STATE_1, ${exepack_state1})
1822AC_DEFINE_UNQUOTED(EXEPACK_STATE_2, ${exepack_state2})
1823
1824
1825AC_ARG_ENABLE(suidcheck,
1826 [ --enable-suidcheck check for suid/sgid files [[no]]],
1827 [
1828 if test "x${enableval}" = "xyes"; then
1829 AC_DEFINE(SH_USE_SUIDCHK)
1830 fi
1831 ]
1832)
1833
1834
1835systemmap="/boot/System.map"
1836sh_libkvm=""
1837AC_ARG_WITH(kcheck,
1838 [ --with-kcheck[[=SYSTEM_MAP]] check Linux/FreeBSD/OpenBSD kernel integrity [[/boot/System.map]]],
1839 [
1840 if test "x${withval}" != "xno"; then
1841 AC_DEFINE(SH_USE_KERN)
1842 kernelversion=`uname -r`
1843 AC_DEFINE_UNQUOTED(SH_KERNEL_VERSION, _("${kernelversion}"), [Define the kernel version])
1844 if test "x${withval}" != "xyes"; then
1845 systemmap="${withval}"
1846 fi
1847 if test "x${cross_compiling}" = xyes; then
1848 :
1849 elif test "x$selectconfig" = "xfreebsd"; then
1850 LIBS="$LIBS -lkvm"
1851 sh_libkvm="-lkvm"
1852 elif test -f "${systemmap}"; then
1853 :
1854 else
1855 AC_MSG_ERROR([--with-kcheck: cannot find system map ${systemmap}])
1856 fi
1857 fi
1858 ]
1859)
1860AC_SUBST(systemmap)
1861AC_SUBST(sh_libkvm)
1862
1863AC_ARG_ENABLE(base,
1864 [ --enable-base=B1,B2 base key (0...2147483647)],
1865 [
1866 AC_MSG_CHECKING(base key setting)
1867 my_key_A=`echo ${enableval} | awk 'BEGIN{FS=","}{print $1}'`
1868 my_key_B=`echo ${enableval} | awk 'BEGIN{FS=","}{print $2}'`
1869 AC_MSG_RESULT(${my_key_A} ${my_key_B})
1870 if test "x${my_key_A}" = x; then
1871 AC_MSG_ERROR([--enable-base: first base key has zero length])
1872 fi
1873 if test "x${my_key_B}" = x; then
1874 AC_MSG_ERROR([--enable-base: second base key has zero length])
1875 fi
1876 echo "${my_key_A}" | grep ['[^0123456789]'] >/dev/null 2>&1 &&
1877 AC_MSG_ERROR([--enable-base: base key must be numeric in the range 0 to 2147483647])
1878 echo "${my_key_B}" | grep ['[^0123456789]'] >/dev/null 2>&1 &&
1879 AC_MSG_ERROR([--enable-base: base key must be numeric in the range 0 to 2147483647])
1880 ],
1881 [
1882 AC_MSG_CHECKING(base key setting .. collecting entropy)
1883 my_key_1=`${srcdir}/c_random.sh 2>/dev/null`
1884 my_key_2=`${srcdir}/c_random.sh 2>/dev/null`
1885 my_key_3=`${srcdir}/c_random.sh 2>/dev/null`
1886 my_key_4=`${srcdir}/c_random.sh 2>/dev/null`
1887 my_key_A=`expr $my_key_1 \* 32767`
1888 my_key_A=`echo ${my_key_A} | sed 's%^0*%%g' 2>/dev/null`
1889 my_key_A=`expr $my_key_A \+ $my_key_2`
1890 my_key_B=`expr $my_key_3 \* 32767`
1891 my_key_B=`echo ${my_key_B} | sed 's%^0*%%g' 2>/dev/null`
1892 my_key_B=`expr $my_key_B \+ $my_key_4`
1893 AC_MSG_RESULT(${my_key_A} ${my_key_B})
1894 ]
1895 )
1896AC_SUBST(my_key_A)
1897AC_SUBST(my_key_B)
1898
1899dnl low bytes
1900my_key_1=`expr $my_key_A \% 65536`
1901dnl high bytes
1902my_key_2=`expr $my_key_A \/ 65536`
1903dnl low bytes
1904my_key_3=`expr $my_key_B \% 65536`
1905dnl high bytes
1906my_key_4=`expr $my_key_B \/ 65536`
1907
1908dnl echo ${my_key_1} ${my_key_2} ${my_key_3} ${my_key_4}
1909
1910dnl touch ./sh_MK.h
1911dnl echo "#ifndef SH_MK_H" >> ./sh_MK.h
1912dnl echo "#define SH_MK_H" >> ./sh_MK.h
1913dnl ${srcdir}/c_bits.sh ${my_key_1} MKB >> ./sh_MK.h
1914dnl ${srcdir}/c_bits.sh ${my_key_2} MKA >> ./sh_MK.h
1915dnl ${srcdir}/c_bits.sh ${my_key_3} MKC >> ./sh_MK.h
1916dnl ${srcdir}/c_bits.sh ${my_key_4} MKD >> ./sh_MK.h
1917dnl echo "#endif" >> ./sh_MK.h
1918AC_SUBST(my_key_1)
1919AC_SUBST(my_key_2)
1920AC_SUBST(my_key_3)
1921AC_SUBST(my_key_4)
1922
1923AC_MSG_CHECKING(key position)
1924pos_tf_1=`${srcdir}/c_random.sh 2>/dev/null`
1925pos_tf_2=`expr $pos_tf_1 \% 8`
1926pos_tf=`expr $pos_tf_2 + 1`
1927AC_MSG_RESULT(${pos_tf})
1928AC_DEFINE_UNQUOTED(POS_TF, ${pos_tf} )
1929
1930mykeybase=`echo ${my_key_A},${my_key_B}`
1931AC_DEFINE_UNQUOTED(DEFKEY, ${mykeybase} )
1932AC_SUBST(mykeybase)
1933
1934
1935dnl
1936dnl GPG/PGP options
1937dnl
1938
1939AC_ARG_WITH(gpg,
1940 [ --with-gpg=PATH use GnuPG to verify database/config [[no]]],
1941 [
1942 if test "x${withval}" != "xno"; then
1943 if test "x${cross_compiling}" = xyes; then
1944 mygpg="${withval}"
1945 else
1946 if test -f "${withval}"; then
1947 mygpg="${withval}"
1948 mychk0=`${withval} --load-extension tiger --print-md TIGER192 ${withval} 2>/dev/null`
1949 if test "x$?" != "x0"; then
1950 mychktest=no
1951 for sampre in ./samhain ./yule /usr/local/sbin/samhain /usr/local/bin/samhain /usr/bin/samhain /usr/sbin/samhain /usr/local/sbin/yule /usr/local/bin/yule /usr/bin/yule /usr/sbin/yule; do
1952 if test x"${mychktest}" = xyes
1953 then
1954 :
1955 else
1956 if test -f ${sampre}
1957 then
1958 echo "use existing ${sampre} for gpg checksum"
1959 mychk0=`${sampre} -H ${withval} 2>/dev/null`
1960 if test "x$?" != "x0"; then
1961 :
1962 else
1963 mychk="${mychk0}"
1964 mychktest=yes
1965 fi
1966 fi
1967 fi
1968 done
1969 if test x${mychktest} = xno; then
1970 AC_MSG_WARN([--with-gpg: cannot determine TIGER192 checksum of ${withval}])
1971 echo "-------------------------------------------------------------"
1972 echo " Your gpg binary does not support the TIGER192 checksum, "
1973 echo " and I cannot find an existing samhain binary to use instead."
1974 echo " You can:"
1975 echo " (a) run make to compile a samhain binary, then repeat"
1976 echo " ./configure and make"
1977 echo " (b) ignore the failure. The checksum of the gpg binary"
1978 echo " will not get compiled in, thus allowing an attacker"
1979 echo " to replace gpg with a trojan and subverting the gpg"
1980 echo " signature verification of configure and database files."
1981 echo
1982 echo " PLEASE IGNORE THIS MESSAGE IF YOU ALSO USE --with-checksum"
1983 echo "-------------------------------------------------------------"
1984 fi
1985 else
1986 mychk="${mychk0}"
1987 fi
1988 else
1989 AC_MSG_WARN([--with-gpg: cannot find GnuPG PATH=${withval}])
1990 fi
1991 fi
1992 AC_DEFINE(WITH_GPG)
1993 AC_DEFINE_UNQUOTED(DEFAULT_GPG_PATH, _("${mygpg}") )
1994 AC_SUBST(mygpg)
1995 fi
1996 ]
1997)
1998
1999dnl AC_ARG_WITH(pgp,
2000dnl [ --with-pgp=PATH Use PGP to verify database/config (no).],
2001dnl [myppg="$withval"
2002dnl AC_DEFINE(WITH_PGP)
2003dnl AC_DEFINE_UNQUOTED(DEFAULT_PGP_PATH, _("${myppg}") )
2004dnl ])
2005
2006AC_ARG_WITH(checksum,
2007 [ --with-checksum=CHKSUM compile in gpg/pgp checksum [[yes]]],
2008 [
2009 if test "x${withval}" != "xno"; then
2010 if test "x${withval}" != "xyes"; then
2011 if test "x${mychk}" != "x"; then
2012 if test "x${mychk}" != "x${withval}"; then
2013 AC_MSG_WARN([--with-checksum: possible gpg CHKSUM problem])
2014 AC_MSG_WARN([--with-checksum: CHKSUM=${withval}])
2015 AC_MSG_WARN([--with-checksum: autodetected=${mychk}])
2016 fi
2017 fi
2018 mychk="${withval}"
2019 else
2020 if test "x${mychk}" = "x"; then
2021 AC_MSG_ERROR([--with-checksum: gpg CHKSUM not specified])
2022 fi
2023 fi
2024 AC_DEFINE(HAVE_GPG_CHECKSUM)
2025 AC_DEFINE_UNQUOTED(GPG_HASH, _("${mychk}") )
2026 echo "${mychk}" | sed 's,.*:,,g' | sed 's, ,,g' | sed 's,\(.\),\1:,g' | awk '{ split($0, arr, ":"); m = length($1)/2; print "#ifndef CHKSUM_H"; print "#define CHKSUM_H"; print "char gpgchk[50];"; for (i=1; i <= m; i++) printf "gpgchk[%d] = %c%s%c;\n", i-1, 39, arr[i], 39; printf "gpgchk[48] = %c%c0%c;\n", 39, 92, 39; print "#endif"; }' > sh_gpg_chksum.h
2027 fi
2028 ],
2029 [
2030 if test "x${mygpg}" != "x"; then
2031 if test "x${mychk}" != "x"; then
2032 AC_DEFINE(HAVE_GPG_CHECKSUM)
2033 AC_DEFINE_UNQUOTED(GPG_HASH, _("${mychk}") )
2034 echo "${mychk}" | sed 's,.*:,,g' | sed 's, ,,g' | sed 's,\(.\),\1:,g' | awk '{ split($0, arr, ":"); m = length($1)/2; print "#ifndef CHKSUM_H"; print "#define CHKSUM_H"; print "char gpgchk[50];"; for (i=1; i <= m; i++) printf "gpgchk[%d] = %c%s%c;\n", i-1, 39, arr[i], 39; printf "gpgchk[48] = %c%c0%c;\n", 39, 92, 39; print "#endif"; }' > sh_gpg_chksum.h
2035 fi
2036 fi
2037 ]
2038)
2039
2040AC_ARG_WITH(fp,
2041 [ --with-fp=FINGERPRINT compile in public key fingerprint [[no]]],
2042 [
2043 if test "x${withval}" != "xno"; then
2044 if test "x${withval}" != "xyes"; then
2045 withval0=`echo ${withval} | sed 's% %%g'`
2046 echo "${withval0}" | \
2047 grep ['[^0123456789abcdefABCDEF]'] >/dev/null 2>&1 &&
2048 AC_MSG_ERROR([--with-fp: invalid character(s) in FINGERPRINT=${withval0}])
2049 sh_len=`echo ${withval0} | wc -c | sed 's% %%g'`
2050 sh_len0=`expr ${sh_len} \- 1`
2051 if test "x${sh_len0}" = "x40" || test "x${sh_len0}" = "x32"
2052 then
2053 myfp="${withval0}"
2054 AC_DEFINE(USE_FINGERPRINT)
2055 AC_DEFINE_UNQUOTED(SH_GPG_FP, _("${myfp}") )
2056 echo "${myfp}" | sed 's,.*:,,g' | sed 's, ,,g' | sed 's,\(.\),\1:,g' | awk '{ split($0, arr, ":"); m = length($1)/2; print "#ifndef FINGERPRINT_H"; print "#define FINGERPRINT_H"; printf "char gpgfp[%d];\n", m+1; for (i=1; i <= m; i++) printf "gpgfp[%d] = %c%s%c;\n", i-1, 39, arr[i], 39; printf "gpgfp[%d] = %c%c0%c;\n", m, 39, 92, 39; print "#endif"; }' > sh_gpg_fp.h
2057 else
2058 AC_MSG_ERROR([--with-fp: length (${sh_len0}) of FINGERPRINT ${withval0} incorrect])
2059 fi
2060 else
2061 AC_MSG_ERROR([--with-fp: usage error ... FINGERPRINT=yes])
2062 fi
2063 fi
2064 ])
2065
2066
2067dnl
2068dnl MAIL OPTIONS
2069dnl
2070
2071AC_ARG_WITH(recipient,
2072 [ --with-recipient=ADDR set recipient(s) for e-mail [[none]]],
2073 [
2074 withval0=`echo ${withval} | sed 's%,% %g'`
2075 for sh_item in ${withval0}
2076 do
2077 case ${sh_item} in
2078 *@localhost)
2079 ;;
2080 *@*.*)
2081 sh_tmp=`echo ${sh_item} | awk '{ if ($1 ~ [/^[a-zA-Z0-9][a-zA-Z0-9\-_\.]*@[a-zA-Z0-9\-\.]+\.([a-zA-Z]+|[0-9]+)$/]) {print 1; } else { print 0}}'`
2082 if test "x${sh_tmp}" != "x1"
2083 then
2084 AC_MSG_ERROR([--with-recipient: invalid mail address ${sh_item}])
2085 fi
2086 ;;
2087 *)
2088 AC_MSG_ERROR([--with-recipient: invalid mail address ${sh_item}])
2089 ;;
2090 esac
2091 done
2092 myrcp="$withval0"
2093 ],
2094 [myrcp="NULL"])
2095AC_DEFINE_UNQUOTED(DEFAULT_MAILADDRESS, _("${myrcp}") )
2096
2097
2098AC_ARG_WITH(sender,
2099 [ --with-sender=SENDER set sender for e-mail [[daemon]]],
2100 [
2101 mysender="${withval}"
2102 ],
2103 [
2104 mysender="daemon"
2105 ])
2106AC_DEFINE_UNQUOTED(DEFAULT_SENDER, _("${mysender}") )
2107
2108
2109dnl
2110dnl PATHS
2111dnl
2112
2113AC_ARG_WITH(trusted,
2114 [ --with-trusted=UID Set uid(s) of trusted users [[0]]],
2115 [
2116 sh_tmp_test=no
2117 sh_tmp=`echo ${withval} | sed 's%,% %g'`
2118 for sh_tmp1 in ${sh_tmp}
2119 do
2120 echo "${sh_tmp1}" | grep ['[^0123456789]'] >/dev/null 2>&1 &&
2121 AC_MSG_ERROR([--with-trusted: non-numeric UID in ${withval}])
2122 if test "x${sh_tmp1}" = "x0"
2123 then
2124 sh_tmp_test=yes
2125 fi
2126 done
2127 if test "x${sh_tmp_test}" = "xno"
2128 then
2129 withval="0,${withval}"
2130 fi
2131 mytrust="${withval}"
2132 ],
2133 [mytrust="0"] )
2134AC_DEFINE_UNQUOTED(SL_ALWAYS_TRUSTED, ${mytrust} )
2135AC_SUBST(mytrust)
2136
2137AC_ARG_WITH(tmp-dir,
2138 [ --with-tmp-dir=PFX set directory for temporary files [[HOME]]],
2139 [
2140 if test "x${cross_compiling}" = xyes; then
2141 :
2142 else
2143 if test -d "${withval}"; then
2144 my_tmp_dir="$withval"
2145 AC_DEFINE_UNQUOTED(SH_TMPDIR, _("${my_tmp_dir}") )
2146 else
2147 AC_MSG_ERROR([--with-tmp-dir: tmp directory ${withval} does not exist])
2148 fi
2149 fi
2150 ]
2151)
2152
2153dnl
2154dnl PATH DEFAULTS
2155dnl
2156
2157if test "x${ac_prefix_set}" = xyes
2158then
2159 if test "x${exec_prefix}" = xNONE
2160 then
2161 exec_prefix="${prefix}"
2162 fi
2163
2164 if test "x${prefix}" = xOPT
2165 then
2166 tmp_sbindir="/opt/${install_name}/bin"
2167 tmp_sysconfdir="/etc/opt"
2168 tmp_mandir="/opt/${install_name}/man"
2169 tmp_localstatedir="/var/opt/${install_name}"
2170 elif test "x${prefix}" = xUSR
2171 then
2172 tmp_sbindir="/usr/sbin"
2173 tmp_sysconfdir="/etc"
2174 tmp_mandir="/usr/share/man"
2175 tmp_localstatedir="/var"
2176 else
2177 tmp_sbindir=`eval echo ${sbindir}`
2178 tmp_sysconfdir=`eval echo ${sysconfdir}`
2179 tmp_mandir=`eval echo ${mandir}`
2180 tmp_localstatedir=`eval echo ${localstatedir}`
2181 fi
2182else
2183 prefix=""
2184 if test "x${ac_exec_prefix_set}" = xyes
2185 then
2186 tmp_sbindir=`eval echo ${sbindir}`
2187 else
2188 tmp_sbindir="/usr/local/sbin"
2189 fi
2190 tmp_sysconfdir="/etc"
2191 # share/man -> man (FHS) 11.10.2002
2192 tmp_mandir="/usr/local/man"
2193 tmp_localstatedir="/var"
2194fi
2195
2196
2197if test "x${ac_sbindir_set}" = xyes
2198then
2199 :
2200else
2201 sbindir=`eval echo ${tmp_sbindir}`
2202fi
2203
2204
2205if test "x${ac_sysconfdir_set}" = xyes
2206then
2207 :
2208else
2209 sysconfdir=`eval echo ${tmp_sysconfdir}`
2210fi
2211
2212if test "x${ac_mandir_set}" = xyes
2213then
2214 :
2215else
2216 mandir=`eval echo ${tmp_mandir}`
2217fi
2218
2219if test "x${ac_localstatedir_set}" = xyes
2220then
2221 :
2222else
2223 localstatedir=`eval echo ${tmp_localstatedir}`
2224fi
2225
2226
2227
2228AC_ARG_WITH(config-file,
2229 [ --with-config-file=FILE configuration file [[/etc/{install_name}rc]]],
2230 [
2231 myconffile="${withval}"
2232 changequote(<<, >>)dnl
2233 tmp=`echo ${withval} | sed 's%^REQ_FROM_SERVER%%'`
2234 sysconfdir=`echo ${tmp} | sed 's%/[^/][^/]*$%%'`
2235 myrpmconffile="${tmp}"
2236 changequote([, ])dnl
2237 ],
2238 [
2239 myconffile="${sysconfdir}/${install_name}rc"
2240 myrpmconffile="${myconffile}"
2241 ]
2242)
2243AC_DEFINE_UNQUOTED(DEFAULT_CONFIGFILE, _("${myconffile}") )
2244AC_SUBST(myconffile)
2245AC_SUBST(myrpmconffile)
2246
2247AC_ARG_WITH(log-file,
2248 [ --with-log-file=FILE path of log file [[/var/log/{install_name}_log]]],
2249 [
2250 mylogfile="$withval"
2251 changequote(<<, >>)dnl
2252 mylogdir=`echo ${withval} | sed 's%/[^/][^/]*$%%'`
2253 changequote([, ])dnl
2254 ],
2255 [
2256 if test "x${mytclient}" = "x-DSH_WITH_SERVER"; then
2257 mylogfile="${localstatedir}/log/${install_name}/${install_name}_log"
2258 mylogdir="${localstatedir}/log/${install_name}"
2259 else
2260 mylogfile="${localstatedir}/log/${install_name}_log"
2261 mylogdir="${localstatedir}/log"
2262 fi
2263 ]
2264)
2265AC_DEFINE_UNQUOTED(DEFAULT_ERRFILE, _("${mylogfile}") )
2266AC_DEFINE_UNQUOTED(DEFAULT_LOGDIR, _("${mylogdir}") )
2267AC_SUBST(mylogfile)
2268AC_SUBST(mylogdir)
2269
2270AC_ARG_WITH(pid-file,
2271 [ --with-pid-file=FILE set path of pid file [[/var/run/{install_name}.pid]]],
2272 [
2273 mylockfile="$withval"
2274 changequote(<<, >>)dnl
2275 mylockdir=`echo ${withval} | sed 's%/[^/][^/]*$%%'`
2276 changequote([, ])dnl
2277 ],
2278 [
2279 mylockfile="${localstatedir}/run/${install_name}.pid"
2280 mylockdir="${localstatedir}/run"
2281 ]
2282)
2283AC_DEFINE_UNQUOTED(DEFAULT_ERRLOCK, _("${mylockfile}") )
2284AC_DEFINE_UNQUOTED(DEFAULT_PIDDIR, _("${mylockdir}") )
2285AC_SUBST(mylockfile)
2286AC_SUBST(mylockdir)
2287
2288AC_ARG_WITH(state-dir,
2289 [ --with-state-dir=PFX set state data directory [[/var/lib/{install_name}]]],
2290 [
2291 mydataroot="$withval"
2292 ],
2293 [
2294 mydataroot="${localstatedir}/lib/${install_name}"
2295 ]
2296 )
2297AC_ARG_WITH(data-file,
2298 [ --with-data-file=FILE set path of data file],
2299 [
2300 mydatafile="$withval"
2301 changequote(<<, >>)dnl
2302 tmp=`echo ${withval} | sed 's%^REQ_FROM_SERVER%%'`
2303 mydataroot=`echo ${tmp} | sed 's%/[^/][^/]*$%%'`
2304 myrpmdatafile="${tmp}"
2305 changequote([, ])dnl
2306 if test x"${tmp}" = x
2307 then
2308 echo "No local path in data file ${withval}"
2309 echo "This will not work for initializing the database."
2310 if test x"${withval}" = xREQ_FROM_SERVER
2311 then
2312 echo "It should be REQ_FROM_SERVER/some/local/path"
2313 fi
2314 AC_MSG_ERROR([--with-data-file: invalid path ${withval}])
2315 fi
2316 ],
2317 [
2318 mydatafile="${mydataroot}/${install_name}_file"
2319 myrpmdatafile="${mydatafile}"
2320 ])
2321AC_DEFINE_UNQUOTED(DEFAULT_DATA_FILE, _("${mydatafile}") )
2322AC_SUBST(mydatafile)
2323AC_SUBST(myrpmdatafile)
2324
2325AC_DEFINE_UNQUOTED(DEFAULT_DATAROOT, _("${mydataroot}") )
2326AC_SUBST(mydataroot)
2327
2328AC_DEFINE_UNQUOTED(DEFAULT_QDIR, _("${mydataroot}/.quarantine") )
2329AC_SUBST(myqdir)
2330
2331
2332AC_ARG_WITH(html-file,
2333 [ --with-html-file=FILE set path of html file,],
2334 [
2335 myhtmlfile="$withval"
2336 ],
2337 [
2338 myhtmlfile="${mylogdir}/${install_name}.html"
2339 ])
2340AC_DEFINE_UNQUOTED(DEFAULT_HTML_FILE, _("${myhtmlfile}") )
2341AC_SUBST(myhtmlfile)
2342
2343
2344mydefargs=$ac_configure_args
2345# if test -z "`echo "$mydefargs" | grep "\-\-enable\-static" 2> /dev/null`"
2346# then
2347# mydefargs="--enable-static $mydefargs"
2348# fi
2349if test -z "`echo "$mydefargs" | grep "\-\-enable\-base" 2> /dev/null`"
2350then
2351 mydefargs="--enable-base=${mykeybase} $mydefargs"
2352fi
2353AC_SUBST(mydefargs)
2354
2355
2356AC_DEFINE_UNQUOTED(SH_INSTALL_DIR, _("${sbindir}"))
2357AC_DEFINE_UNQUOTED(SH_INSTALL_PATH, _("${sbindir}/${install_name}"))
2358AC_DEFINE_UNQUOTED(SH_INSTALL_NAME, _("${install_name}"))
2359
2360AC_CONFIG_HEADER(config.h)
2361
2362AC_OUTPUT(
2363[
2364Makefile
2365samhain-install.sh
2366init/samhain.startLSB
2367init/samhain.startLinux
2368init/samhain.startGentoo
2369init/samhain.startFreeBSD
2370init/samhain.startSolaris
2371init/samhain.startHPUX
2372init/samhain.startIRIX
2373init/samhain.startMACOSX
2374samhain.spec
2375rules.deb
2376rules.deb-light
2377hp_ux.psf
2378scripts/samhain.spec
2379scripts/redhat_i386.client.spec
2380scripts/samhain.ebuild
2381scripts/samhain.ebuild-light
2382scripts/samhainadmin.pl
2383scripts/check_samhain.pl
2384deploy.sh
2385],
2386[
2387echo timestamp > stamp-h
2388chmod +x samhain-install.sh
2389chmod +x scripts/samhainadmin.pl
2390chmod +x scripts/check_samhain.pl
2391]
2392)
2393
2394chmod +x deploy.sh
2395
2396if test "x${cross_compiling}" = xyes
2397then
2398
2399echo "--------------------------------------------------------------"
2400echo
2401echo "You are using a cross-compiler. The following system dependent"
2402echo "values may have been set to default values that may be"
2403echo "incorrect for your target system: "
2404echo
2405echo "ac_cv_c_bigendian bigendian byte order ${ac_cv_c_bigendian}"
2406echo "ac_cv_c_long_double long double exists ${ac_cv_c_long_double}"
2407echo "ac_cv_sizeof_char_p size of pointer to char ${ac_cv_sizeof_char_p}"
2408echo "ac_cv_sizeof_char_p size of size_t ${ac_cv_sizeof_size_t}"
2409echo "ac_cv_sizeof_unsigned_int_ size of unsigned int ${ac_cv_sizeof_unsigned_int_}"
2410echo "ac_cv_sizeof_unsigned_long size of unsigned long ${ac_cv_sizeof_unsigned_long}"
2411echo "ac_cv_sizeof_unsigned_short size of unsigned short ${ac_cv_sizeof_unsigned_short}"
2412echo
2413echo "If these values are incorrect, change them in the file "
2414echo "config.cache and run configure again."
2415echo
2416echo "--------------------------------------------------------------"
2417
2418fi
2419
2420if test x${silent} != xyes
2421then
2422
2423 # A=`eval echo ${sbindir}` ; A=`eval echo ${A}`
2424 # B=`eval echo ${myconffile}` ; B=`eval echo ${B}`
2425 # C=`eval echo ${mandir}` ; C=`eval echo ${C}`
2426 # D=`eval echo ${mylockfile}` ; D=`eval echo ${D}`
2427 # E=`eval echo ${mylogfile}` ; E=`eval echo ${E}`
2428 # F=`eval echo ${mydataroot}` ; F=`eval echo ${F}`
2429
2430 echo
2431 echo " samhain has been configured as follows:"
2432 echo " System binaries: ${sbindir}"
2433 echo " Configuration file: ${myconffile}"
2434 echo " Manual pages: ${mandir}"
2435 echo " Data: ${mydataroot}"
2436 echo " PID file: ${mylockfile}"
2437 echo " Log file: ${mylogfile}"
2438 echo " Base key: ${mykeybase}"
2439 echo
2440 if test x"$mytclient" = x"-DSH_WITH_SERVER"
2441 then
2442 echo " Selected rc file: yulerc"
2443 else
2444 echo " Selected rc file: samhainrc.${selectconfig}"
2445 fi
2446
2447fi
2448
Note: See TracBrowser for help on using the repository browser.