source: trunk/configure.ac@ 77

Last change on this file since 77 was 76, checked in by rainer, 18 years ago

Fix for ticket #38 (csv escaping) and #39 (building on cygwin). Also optimize a bit.

File size: 66.1 KB
RevLine 
[1]1
[43]2dnl We want to override the standard _AC_INIT_PARSE_ARGS
[1]3dnl
[43]4AU_ALIAS([_AC_INIT_PARSE_ARGS], [SH_INIT_PARSE_ARGS])
5AU_ALIAS([_AC_INIT_help], [SH_INIT_HELP])
[1]6
[43]7AC_INIT(src/samhain.c)
8
9
[46]10AC_ARG_VAR([LIBS], [libraries to link against, e.g. -lintl])
[1]11
12dnl
13dnl start
14dnl
[75]15AM_INIT_AUTOMAKE(samhain, 2.3.0a)
[1]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
[76]32
[1]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
[57]100 selectconfig=netbsd
[1]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 \
[61]198 sys/vfs.h mntent.h \
[1]199 sys/select.h sys/socket.h netinet/in.h \
200 regex.h glob.h \
201 linux/ext2_fs.h ext2fs/ext2_fs.h \
[48]202 elf.h linux/elf.h \
[68]203 paths.h arpa/nameser.h arpa/nameser_compat.h \
204 rpc/rpcent.h,
[1]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 \
[61]265 strptime basename sched_yield hasmntopt \
[1]266 inet_aton gethostbyname setutent setrlimit gethostname uname \
267 initgroups getpagesize \
[68]268 ttyname fchmod \
269 getsid getpriority getpgid
[1]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])
[46]359 AC_DEFINE([HAVE_SOCKLEN_T], 1, [Define if you have socklen_t])
[1]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
[68]379dnl *****************************************
380dnl checks for extended attribute or ACL
381dnl support
382dnl *****************************************
[1]383
[68]384sh_CHECK_XATTR
385sh_CHECK_POSIX_ACL
386
[1]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)
[76]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
[1]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)
[76]407AC_CHECK_SIZEOF(unsigned int, 4)
[1]408AC_CHECK_SIZEOF(unsigned short, 2)
409
410
[76]411sh_sizeof_unsigned_long=`echo "$ac_cv_sizeof_unsigned_long" | sed 's%[^0-9]%%g'`
412if test "$sh_sizeof_unsigned_long" = "4"; then
[1]413 AC_DEFINE(HAVE_LONG_32)
414fi
[76]415if test "$sh_sizeof_unsigned_long" = "8"; then
[1]416 AC_DEFINE(HAVE_LONG_64)
417fi
[76]418sh_sizeof_unsigned_int=`echo "$ac_cv_sizeof_unsigned_int" | sed 's%[^0-9]%%g'`
419if test "$sh_sizeof_unsigned_int" = "4"; then
[1]420 AC_DEFINE(HAVE_INT_32)
421fi
[76]422sh_sizeof_unsigned_short=`echo "$ac_cv_sizeof_unsigned_short" | sed 's%[^0-9]%%g'`
423if test "$sh_sizeof_unsigned_short" = "4"; then
[1]424 AC_DEFINE(HAVE_SHORT_32)
425fi
426
[18]427dnl
428dnl check for 64 bit programming environment
429dnl
430SAMHAIN_64
431
432
[1]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
[76]528AC_C_RESTRICT
[1]529
530AM_SA_SIGACTION_WORKS
531
532dnl *****************************************
533dnl
534dnl checks for system services
535dnl
536dnl *****************************************
537
538dnl
[68]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
[1]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
[68]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])
[1]576
[68]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
[1]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 [
[19]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])
[1]661 AC_DEFINE(WITH_MESSAGE_QUEUE)
[19]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
[1]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,
[18]701[ --with-libwrap[=PATH] Compile in libwrap (TCP Wrappers) support],
[1]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,
[18]761 [ --with-libprelude-prefix=PFX Prefix where libprelude is installed (optional)],
[1]762 libprelude_config_prefix="$withval", libprelude_config_prefix="")
763
764AC_MSG_CHECKING(whether to use prelude)
765AC_ARG_WITH(prelude,
[18]766 [ --with-prelude Prelude IDS support [[no]]],
[1]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 *)
[26]797 AM_PATH_LIBPRELUDE([0.9.6],
[1]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
[19]915 # echo "mysql_config found"
[1]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}"
[19]924 # echo $LIBS
[1]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}"
[45]1195 if test "x$GCC" != "xyes"; then
1196 CFLAGS="${CFLAGS} -fno-strict-aliasing"
1197 fi
[1]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,
[18]1209 [ --with-console=PATH set path to console device [[/dev/console]]],
[1]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,
[18]1218 [ --with-altconsole=PATH set path to second console device [[none]]],
[1]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,
[18]1230 [ --with-timeserver=HOST set host address for time server [[none]]],
[1]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,
[18]1243 [ --with-alttimeserver=HOST set address for backup time server [[none]]],
[1]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,
[18]1265 [ --enable-mounts-check check mount options on filesystems [[no]]],
[1]1266 [
1267 if test "x${enable_mounts_check}" = xyes; then
1268 AC_DEFINE(SH_USE_MOUNTS)
1269 fi
1270 ]
1271)
1272
[68]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
[1]1298AC_ARG_ENABLE(userfiles,
[18]1299 [ --enable-userfiles check for users' config files [[no]]],
[1]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,
[18]1726 [ --enable-khide=SYSTEM_MAP use kernel module to hide (Linux only)[[/boot/System.map]]],
[1]1727 [
1728 if test "x${enable_khide}" != xno; then
1729 if test "x${enableval}" != "xyes"; then
1730 khidemap="${enableval}"
1731 fi
[39]1732 sh_syscalltable=`egrep '(D|d|R|r) sys_call_table' ${khidemap} | awk '{print $1}'`
[1]1733 if test x"$sh_syscalltable" = x; then
[39]1734 AC_MSG_ERROR([--enable-khide: symbol sys_call_table not found in ${khidemap}])
[1]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 if test x"$kernel_version" = xLINUX26
1747 then
1748 sh_modlist_lock=`egrep ['[bd] modlist_lock$'] ${khidemap} | awk '{print $1}'`
1749 if test x"$sh_modlist_lock" = x; then
1750 AC_MSG_ERROR([--enable-khide: symbol modlist_lock not found in ${khidemap}])
1751 fi
1752 sh_modlist_lock="0x${sh_modlist_lock}"
1753 AC_DEFINE_UNQUOTED(SH_MODLIST_LOCK, ${sh_modlist_lock}, [The address of the modules list spinlock])
1754
1755 sh_list_modules=`egrep 'd modules$' ${khidemap} | awk '{print $1}'`
1756 if test x"$sh_list_modules" = x; then
1757 AC_MSG_ERROR([--enable-khide: symbol modules not found in ${khidemap}])
1758 fi
1759 sh_list_modules="0x${sh_list_modules}"
1760 AC_DEFINE_UNQUOTED(SH_LIST_MODULES, ${sh_list_modules}, [The address of the modules list])
1761
1762 AC_DEFINE(LINUX26, 1, [Define if kernel is 2.6])
1763 sh_insmod_cmd="modprobe ${install_name}_hide"
1764 sh_lkm="samhain_hide.ko"
1765 else
1766 sh_insmod_cmd="insmod ${install_name}_hide; insmod ${install_name}_erase; rmmod ${install_name}_erase"
1767 sh_lkm="samhain_hide.o samhain_erase.o"
1768 fi
1769 # -- END NEW --
1770
1771 kvers=`uname -r`
1772 if test -f /lib/modules/${kvers}/build/include/linux/kernel.h; then
1773 lkm_inc="-I/lib/modules/${kvers}/build/include"
1774 else
1775 AC_MSG_WARN([--enable-khide: /lib/modules/${kvers}/build/include/linux not found])
1776 AC_MSG_WARN([--enable-khide: You may need to install the kernel-source])
1777 AC_MSG_WARN([--enable-khide: headers for the currently-running kernel.])
1778 fi
1779 sh_is_vanilla_kernel=yes
1780 if test -f /lib/modules/${kvers}/build/include/linux/sched.h; then
1781 grep 'next_task,' /lib/modules/${kvers}/build/include/linux/sched.h >/dev/null 2>&1 || sh_is_vanilla_kernel=no
1782 fi
1783 if test x"${sh_is_vanilla_kernel}" = xno; then
1784 echo "This is not a 2.4 vanilla kernel"
1785 else
1786 AC_DEFINE(SH_VANILLA_KERNEL)
1787 fi
1788 fi
1789 ]
1790)
1791AC_SUBST(lkm_inc)
1792AC_SUBST(sh_lkm)
1793AC_SUBST(sh_insmod_cmd)
1794AC_SUBST(install_name)
1795AC_SUBST(INSTALL_NAME)
1796AC_SUBST(stegin_prg)
1797AC_SUBST(xor_code)
1798
1799AC_DEFINE_UNQUOTED(XOR_CODE, ${xor_code})
1800AC_DEFINE_UNQUOTED(SH_SYSCALLTABLE, ${sh_syscalltable})
1801
1802
1803exepack_state0=`${srcdir}/c_random.sh 2>/dev/null`
1804exepack_state1=`${srcdir}/c_random.sh 2>/dev/null`
1805exepack_state2=`${srcdir}/c_random.sh 2>/dev/null`
1806
1807AC_DEFINE_UNQUOTED(EXEPACK_STATE_0, ${exepack_state0})
1808AC_DEFINE_UNQUOTED(EXEPACK_STATE_1, ${exepack_state1})
1809AC_DEFINE_UNQUOTED(EXEPACK_STATE_2, ${exepack_state2})
1810
1811
1812AC_ARG_ENABLE(suidcheck,
1813 [ --enable-suidcheck check for suid/sgid files [[no]]],
1814 [
1815 if test "x${enableval}" = "xyes"; then
1816 AC_DEFINE(SH_USE_SUIDCHK)
1817 fi
1818 ]
1819)
1820
1821
1822systemmap="/boot/System.map"
1823sh_libkvm=""
1824AC_ARG_WITH(kcheck,
[18]1825 [ --with-kcheck[[=SYSTEM_MAP]] check Linux/FreeBSD/OpenBSD kernel integrity [[/boot/System.map]]],
[1]1826 [
1827 if test "x${withval}" != "xno"; then
1828 AC_DEFINE(SH_USE_KERN)
1829 kernelversion=`uname -r`
1830 AC_DEFINE_UNQUOTED(SH_KERNEL_VERSION, _("${kernelversion}"), [Define the kernel version])
1831 if test "x${withval}" != "xyes"; then
1832 systemmap="${withval}"
1833 fi
1834 if test "x${cross_compiling}" = xyes; then
1835 :
1836 elif test "x$selectconfig" = "xfreebsd"; then
1837 LIBS="$LIBS -lkvm"
1838 sh_libkvm="-lkvm"
1839 elif test -f "${systemmap}"; then
1840 :
1841 else
1842 AC_MSG_ERROR([--with-kcheck: cannot find system map ${systemmap}])
1843 fi
1844 fi
1845 ]
1846)
1847AC_SUBST(systemmap)
1848AC_SUBST(sh_libkvm)
1849
1850AC_ARG_ENABLE(base,
1851 [ --enable-base=B1,B2 base key (0...2147483647)],
1852 [
1853 AC_MSG_CHECKING(base key setting)
1854 my_key_A=`echo ${enableval} | awk 'BEGIN{FS=","}{print $1}'`
1855 my_key_B=`echo ${enableval} | awk 'BEGIN{FS=","}{print $2}'`
1856 AC_MSG_RESULT(${my_key_A} ${my_key_B})
1857 if test "x${my_key_A}" = x; then
1858 AC_MSG_ERROR([--enable-base: first base key has zero length])
1859 fi
1860 if test "x${my_key_B}" = x; then
1861 AC_MSG_ERROR([--enable-base: second base key has zero length])
1862 fi
1863 echo "${my_key_A}" | grep ['[^0123456789]'] >/dev/null 2>&1 &&
1864 AC_MSG_ERROR([--enable-base: base key must be numeric in the range 0 to 2147483647])
1865 echo "${my_key_B}" | grep ['[^0123456789]'] >/dev/null 2>&1 &&
1866 AC_MSG_ERROR([--enable-base: base key must be numeric in the range 0 to 2147483647])
1867 ],
1868 [
1869 AC_MSG_CHECKING(base key setting .. collecting entropy)
1870 my_key_1=`${srcdir}/c_random.sh 2>/dev/null`
1871 my_key_2=`${srcdir}/c_random.sh 2>/dev/null`
1872 my_key_3=`${srcdir}/c_random.sh 2>/dev/null`
1873 my_key_4=`${srcdir}/c_random.sh 2>/dev/null`
1874 my_key_A=`expr $my_key_1 \* 32767`
1875 my_key_A=`echo ${my_key_A} | sed 's%^0*%%g' 2>/dev/null`
1876 my_key_A=`expr $my_key_A \+ $my_key_2`
1877 my_key_B=`expr $my_key_3 \* 32767`
1878 my_key_B=`echo ${my_key_B} | sed 's%^0*%%g' 2>/dev/null`
1879 my_key_B=`expr $my_key_B \+ $my_key_4`
1880 AC_MSG_RESULT(${my_key_A} ${my_key_B})
1881 ]
1882 )
1883AC_SUBST(my_key_A)
1884AC_SUBST(my_key_B)
1885
1886dnl low bytes
1887my_key_1=`expr $my_key_A \% 65536`
1888dnl high bytes
1889my_key_2=`expr $my_key_A \/ 65536`
1890dnl low bytes
1891my_key_3=`expr $my_key_B \% 65536`
1892dnl high bytes
1893my_key_4=`expr $my_key_B \/ 65536`
1894
1895dnl echo ${my_key_1} ${my_key_2} ${my_key_3} ${my_key_4}
1896
1897dnl touch ./sh_MK.h
1898dnl echo "#ifndef SH_MK_H" >> ./sh_MK.h
1899dnl echo "#define SH_MK_H" >> ./sh_MK.h
1900dnl ${srcdir}/c_bits.sh ${my_key_1} MKB >> ./sh_MK.h
1901dnl ${srcdir}/c_bits.sh ${my_key_2} MKA >> ./sh_MK.h
1902dnl ${srcdir}/c_bits.sh ${my_key_3} MKC >> ./sh_MK.h
1903dnl ${srcdir}/c_bits.sh ${my_key_4} MKD >> ./sh_MK.h
1904dnl echo "#endif" >> ./sh_MK.h
1905AC_SUBST(my_key_1)
1906AC_SUBST(my_key_2)
1907AC_SUBST(my_key_3)
1908AC_SUBST(my_key_4)
1909
1910AC_MSG_CHECKING(key position)
1911pos_tf_1=`${srcdir}/c_random.sh 2>/dev/null`
1912pos_tf_2=`expr $pos_tf_1 \% 8`
1913pos_tf=`expr $pos_tf_2 + 1`
1914AC_MSG_RESULT(${pos_tf})
1915AC_DEFINE_UNQUOTED(POS_TF, ${pos_tf} )
1916
1917mykeybase=`echo ${my_key_A},${my_key_B}`
1918AC_DEFINE_UNQUOTED(DEFKEY, ${mykeybase} )
1919AC_SUBST(mykeybase)
1920
1921
1922dnl
1923dnl GPG/PGP options
1924dnl
1925
1926AC_ARG_WITH(gpg,
1927 [ --with-gpg=PATH use GnuPG to verify database/config [[no]]],
1928 [
1929 if test "x${withval}" != "xno"; then
1930 if test "x${cross_compiling}" = xyes; then
1931 mygpg="${withval}"
1932 else
1933 if test -f "${withval}"; then
1934 mygpg="${withval}"
1935 mychk0=`${withval} --load-extension tiger --print-md TIGER192 ${withval} 2>/dev/null`
1936 if test "x$?" != "x0"; then
1937 mychktest=no
1938 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
1939 if test x"${mychktest}" = xyes
1940 then
1941 :
1942 else
1943 if test -f ${sampre}
1944 then
1945 echo "use existing ${sampre} for gpg checksum"
1946 mychk0=`${sampre} -H ${withval} 2>/dev/null`
1947 if test "x$?" != "x0"; then
1948 :
1949 else
1950 mychk="${mychk0}"
1951 mychktest=yes
1952 fi
1953 fi
1954 fi
1955 done
1956 if test x${mychktest} = xno; then
1957 AC_MSG_WARN([--with-gpg: cannot determine TIGER192 checksum of ${withval}])
1958 echo "-------------------------------------------------------------"
1959 echo " Your gpg binary does not support the TIGER192 checksum, "
1960 echo " and I cannot find an existing samhain binary to use instead."
1961 echo " You can:"
1962 echo " (a) run make to compile a samhain binary, then repeat"
1963 echo " ./configure and make"
1964 echo " (b) ignore the failure. The checksum of the gpg binary"
1965 echo " will not get compiled in, thus allowing an attacker"
1966 echo " to replace gpg with a trojan and subverting the gpg"
1967 echo " signature verification of configure and database files."
[57]1968 echo
1969 echo " PLEASE IGNORE THIS MESSAGE IF YOU ALSO USE --with-checksum"
[1]1970 echo "-------------------------------------------------------------"
1971 fi
1972 else
1973 mychk="${mychk0}"
1974 fi
1975 else
1976 AC_MSG_WARN([--with-gpg: cannot find GnuPG PATH=${withval}])
1977 fi
1978 fi
1979 AC_DEFINE(WITH_GPG)
1980 AC_DEFINE_UNQUOTED(DEFAULT_GPG_PATH, _("${mygpg}") )
1981 AC_SUBST(mygpg)
1982 fi
1983 ]
1984)
1985
1986dnl AC_ARG_WITH(pgp,
1987dnl [ --with-pgp=PATH Use PGP to verify database/config (no).],
1988dnl [myppg="$withval"
1989dnl AC_DEFINE(WITH_PGP)
1990dnl AC_DEFINE_UNQUOTED(DEFAULT_PGP_PATH, _("${myppg}") )
1991dnl ])
1992
1993AC_ARG_WITH(checksum,
1994 [ --with-checksum=CHKSUM compile in gpg/pgp checksum [[yes]]],
1995 [
1996 if test "x${withval}" != "xno"; then
1997 if test "x${withval}" != "xyes"; then
1998 if test "x${mychk}" != "x"; then
1999 if test "x${mychk}" != "x${withval}"; then
2000 AC_MSG_WARN([--with-checksum: possible gpg CHKSUM problem])
2001 AC_MSG_WARN([--with-checksum: CHKSUM=${withval}])
2002 AC_MSG_WARN([--with-checksum: autodetected=${mychk}])
2003 fi
2004 fi
2005 mychk="${withval}"
2006 else
2007 if test "x${mychk}" = "x"; then
2008 AC_MSG_ERROR([--with-checksum: gpg CHKSUM not specified])
2009 fi
2010 fi
2011 AC_DEFINE(HAVE_GPG_CHECKSUM)
2012 AC_DEFINE_UNQUOTED(GPG_HASH, _("${mychk}") )
2013 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
2014 fi
2015 ],
2016 [
2017 if test "x${mygpg}" != "x"; then
2018 if test "x${mychk}" != "x"; then
2019 AC_DEFINE(HAVE_GPG_CHECKSUM)
2020 AC_DEFINE_UNQUOTED(GPG_HASH, _("${mychk}") )
2021 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
2022 fi
2023 fi
2024 ]
2025)
2026
2027AC_ARG_WITH(fp,
2028 [ --with-fp=FINGERPRINT compile in public key fingerprint [[no]]],
2029 [
2030 if test "x${withval}" != "xno"; then
2031 if test "x${withval}" != "xyes"; then
2032 withval0=`echo ${withval} | sed 's% %%g'`
2033 echo "${withval0}" | \
2034 grep ['[^0123456789abcdefABCDEF]'] >/dev/null 2>&1 &&
2035 AC_MSG_ERROR([--with-fp: invalid character(s) in FINGERPRINT=${withval0}])
2036 sh_len=`echo ${withval0} | wc -c | sed 's% %%g'`
2037 sh_len0=`expr ${sh_len} \- 1`
2038 if test "x${sh_len0}" = "x40" || test "x${sh_len0}" = "x32"
2039 then
2040 myfp="${withval0}"
2041 AC_DEFINE(USE_FINGERPRINT)
2042 AC_DEFINE_UNQUOTED(SH_GPG_FP, _("${myfp}") )
2043 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
2044 else
2045 AC_MSG_ERROR([--with-fp: length (${sh_len0}) of FINGERPRINT ${withval0} incorrect])
2046 fi
2047 else
2048 AC_MSG_ERROR([--with-fp: usage error ... FINGERPRINT=yes])
2049 fi
2050 fi
2051 ])
2052
2053
2054dnl
2055dnl MAIL OPTIONS
2056dnl
2057
2058AC_ARG_WITH(recipient,
2059 [ --with-recipient=ADDR set recipient(s) for e-mail [[none]]],
2060 [
2061 withval0=`echo ${withval} | sed 's%,% %g'`
2062 for sh_item in ${withval0}
2063 do
2064 case ${sh_item} in
[18]2065 *@localhost)
2066 ;;
[1]2067 *@*.*)
2068 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}}'`
2069 if test "x${sh_tmp}" != "x1"
2070 then
2071 AC_MSG_ERROR([--with-recipient: invalid mail address ${sh_item}])
2072 fi
2073 ;;
2074 *)
2075 AC_MSG_ERROR([--with-recipient: invalid mail address ${sh_item}])
2076 ;;
2077 esac
2078 done
2079 myrcp="$withval0"
2080 ],
2081 [myrcp="NULL"])
2082AC_DEFINE_UNQUOTED(DEFAULT_MAILADDRESS, _("${myrcp}") )
2083
2084
2085AC_ARG_WITH(sender,
2086 [ --with-sender=SENDER set sender for e-mail [[daemon]]],
2087 [
2088 mysender="${withval}"
2089 ],
2090 [
2091 mysender="daemon"
2092 ])
2093AC_DEFINE_UNQUOTED(DEFAULT_SENDER, _("${mysender}") )
2094
2095
2096dnl
2097dnl PATHS
2098dnl
2099
2100AC_ARG_WITH(trusted,
2101 [ --with-trusted=UID Set uid(s) of trusted users [[0]]],
2102 [
2103 sh_tmp_test=no
2104 sh_tmp=`echo ${withval} | sed 's%,% %g'`
2105 for sh_tmp1 in ${sh_tmp}
2106 do
2107 echo "${sh_tmp1}" | grep ['[^0123456789]'] >/dev/null 2>&1 &&
2108 AC_MSG_ERROR([--with-trusted: non-numeric UID in ${withval}])
2109 if test "x${sh_tmp1}" = "x0"
2110 then
2111 sh_tmp_test=yes
2112 fi
2113 done
2114 if test "x${sh_tmp_test}" = "xno"
2115 then
2116 withval="0,${withval}"
2117 fi
2118 mytrust="${withval}"
2119 ],
2120 [mytrust="0"] )
2121AC_DEFINE_UNQUOTED(SL_ALWAYS_TRUSTED, ${mytrust} )
2122AC_SUBST(mytrust)
2123
2124AC_ARG_WITH(tmp-dir,
2125 [ --with-tmp-dir=PFX set directory for temporary files [[HOME]]],
2126 [
2127 if test "x${cross_compiling}" = xyes; then
2128 :
2129 else
2130 if test -d "${withval}"; then
2131 my_tmp_dir="$withval"
2132 AC_DEFINE_UNQUOTED(SH_TMPDIR, _("${my_tmp_dir}") )
2133 else
2134 AC_MSG_ERROR([--with-tmp-dir: tmp directory ${withval} does not exist])
2135 fi
2136 fi
2137 ]
2138)
2139
2140dnl
2141dnl PATH DEFAULTS
2142dnl
2143
2144if test "x${ac_prefix_set}" = xyes
2145then
2146 if test "x${exec_prefix}" = xNONE
2147 then
2148 exec_prefix="${prefix}"
2149 fi
2150
2151 if test "x${prefix}" = xOPT
2152 then
2153 tmp_sbindir="/opt/${install_name}/bin"
2154 tmp_sysconfdir="/etc/opt"
2155 tmp_mandir="/opt/${install_name}/man"
2156 tmp_localstatedir="/var/opt/${install_name}"
2157 elif test "x${prefix}" = xUSR
2158 then
2159 tmp_sbindir="/usr/sbin"
2160 tmp_sysconfdir="/etc"
2161 tmp_mandir="/usr/share/man"
2162 tmp_localstatedir="/var"
2163 else
2164 tmp_sbindir=`eval echo ${sbindir}`
2165 tmp_sysconfdir=`eval echo ${sysconfdir}`
2166 tmp_mandir=`eval echo ${mandir}`
2167 tmp_localstatedir=`eval echo ${localstatedir}`
2168 fi
2169else
2170 prefix=""
2171 if test "x${ac_exec_prefix_set}" = xyes
2172 then
2173 tmp_sbindir=`eval echo ${sbindir}`
2174 else
2175 tmp_sbindir="/usr/local/sbin"
2176 fi
2177 tmp_sysconfdir="/etc"
2178 # share/man -> man (FHS) 11.10.2002
2179 tmp_mandir="/usr/local/man"
2180 tmp_localstatedir="/var"
2181fi
2182
2183
2184if test "x${ac_sbindir_set}" = xyes
2185then
2186 :
2187else
2188 sbindir=`eval echo ${tmp_sbindir}`
2189fi
2190
2191
2192if test "x${ac_sysconfdir_set}" = xyes
2193then
2194 :
2195else
2196 sysconfdir=`eval echo ${tmp_sysconfdir}`
2197fi
2198
2199if test "x${ac_mandir_set}" = xyes
2200then
2201 :
2202else
2203 mandir=`eval echo ${tmp_mandir}`
2204fi
2205
2206if test "x${ac_localstatedir_set}" = xyes
2207then
2208 :
2209else
2210 localstatedir=`eval echo ${tmp_localstatedir}`
2211fi
2212
2213
2214
2215AC_ARG_WITH(config-file,
2216 [ --with-config-file=FILE configuration file [[/etc/{install_name}rc]]],
2217 [
2218 myconffile="${withval}"
2219 changequote(<<, >>)dnl
2220 tmp=`echo ${withval} | sed 's%^REQ_FROM_SERVER%%'`
2221 sysconfdir=`echo ${tmp} | sed 's%/[^/][^/]*$%%'`
2222 myrpmconffile="${tmp}"
2223 changequote([, ])dnl
2224 ],
2225 [
2226 myconffile="${sysconfdir}/${install_name}rc"
2227 myrpmconffile="${myconffile}"
2228 ]
2229)
2230AC_DEFINE_UNQUOTED(DEFAULT_CONFIGFILE, _("${myconffile}") )
2231AC_SUBST(myconffile)
2232AC_SUBST(myrpmconffile)
2233
2234AC_ARG_WITH(log-file,
2235 [ --with-log-file=FILE path of log file [[/var/log/{install_name}_log]]],
2236 [
2237 mylogfile="$withval"
2238 changequote(<<, >>)dnl
2239 mylogdir=`echo ${withval} | sed 's%/[^/][^/]*$%%'`
2240 changequote([, ])dnl
2241 ],
2242 [
2243 if test "x${mytclient}" = "x-DSH_WITH_SERVER"; then
2244 mylogfile="${localstatedir}/log/${install_name}/${install_name}_log"
2245 mylogdir="${localstatedir}/log/${install_name}"
2246 else
2247 mylogfile="${localstatedir}/log/${install_name}_log"
2248 mylogdir="${localstatedir}/log"
2249 fi
2250 ]
2251)
2252AC_DEFINE_UNQUOTED(DEFAULT_ERRFILE, _("${mylogfile}") )
2253AC_DEFINE_UNQUOTED(DEFAULT_LOGDIR, _("${mylogdir}") )
2254AC_SUBST(mylogfile)
2255AC_SUBST(mylogdir)
2256
2257AC_ARG_WITH(pid-file,
2258 [ --with-pid-file=FILE set path of pid file [[/var/run/{install_name}.pid]]],
2259 [
2260 mylockfile="$withval"
2261 changequote(<<, >>)dnl
2262 mylockdir=`echo ${withval} | sed 's%/[^/][^/]*$%%'`
2263 changequote([, ])dnl
2264 ],
2265 [
2266 mylockfile="${localstatedir}/run/${install_name}.pid"
2267 mylockdir="${localstatedir}/run"
2268 ]
2269)
2270AC_DEFINE_UNQUOTED(DEFAULT_ERRLOCK, _("${mylockfile}") )
2271AC_DEFINE_UNQUOTED(DEFAULT_PIDDIR, _("${mylockdir}") )
2272AC_SUBST(mylockfile)
2273AC_SUBST(mylockdir)
2274
2275AC_ARG_WITH(state-dir,
2276 [ --with-state-dir=PFX set state data directory [[/var/lib/{install_name}]]],
2277 [
2278 mydataroot="$withval"
2279 ],
2280 [
2281 mydataroot="${localstatedir}/lib/${install_name}"
2282 ]
2283 )
2284AC_ARG_WITH(data-file,
2285 [ --with-data-file=FILE set path of data file],
2286 [
2287 mydatafile="$withval"
2288 changequote(<<, >>)dnl
2289 tmp=`echo ${withval} | sed 's%^REQ_FROM_SERVER%%'`
2290 mydataroot=`echo ${tmp} | sed 's%/[^/][^/]*$%%'`
2291 myrpmdatafile="${tmp}"
2292 changequote([, ])dnl
2293 if test x"${tmp}" = x
2294 then
2295 echo "No local path in data file ${withval}"
2296 echo "This will not work for initializing the database."
2297 if test x"${withval}" = xREQ_FROM_SERVER
2298 then
2299 echo "It should be REQ_FROM_SERVER/some/local/path"
2300 fi
2301 AC_MSG_ERROR([--with-data-file: invalid path ${withval}])
2302 fi
2303 ],
2304 [
2305 mydatafile="${mydataroot}/${install_name}_file"
2306 myrpmdatafile="${mydatafile}"
2307 ])
2308AC_DEFINE_UNQUOTED(DEFAULT_DATA_FILE, _("${mydatafile}") )
2309AC_SUBST(mydatafile)
2310AC_SUBST(myrpmdatafile)
2311
2312AC_DEFINE_UNQUOTED(DEFAULT_DATAROOT, _("${mydataroot}") )
2313AC_SUBST(mydataroot)
2314
2315AC_DEFINE_UNQUOTED(DEFAULT_QDIR, _("${mydataroot}/.quarantine") )
2316AC_SUBST(myqdir)
2317
2318
2319AC_ARG_WITH(html-file,
2320 [ --with-html-file=FILE set path of html file,],
2321 [
2322 myhtmlfile="$withval"
2323 ],
2324 [
2325 myhtmlfile="${mylogdir}/${install_name}.html"
2326 ])
2327AC_DEFINE_UNQUOTED(DEFAULT_HTML_FILE, _("${myhtmlfile}") )
2328AC_SUBST(myhtmlfile)
2329
2330
2331mydefargs=$ac_configure_args
2332# if test -z "`echo "$mydefargs" | grep "\-\-enable\-static" 2> /dev/null`"
2333# then
2334# mydefargs="--enable-static $mydefargs"
2335# fi
2336if test -z "`echo "$mydefargs" | grep "\-\-enable\-base" 2> /dev/null`"
2337then
2338 mydefargs="--enable-base=${mykeybase} $mydefargs"
2339fi
2340AC_SUBST(mydefargs)
2341
2342
2343AC_DEFINE_UNQUOTED(SH_INSTALL_DIR, _("${sbindir}"))
2344AC_DEFINE_UNQUOTED(SH_INSTALL_PATH, _("${sbindir}/${install_name}"))
2345AC_DEFINE_UNQUOTED(SH_INSTALL_NAME, _("${install_name}"))
2346
2347AC_CONFIG_HEADER(config.h)
2348
2349AC_OUTPUT(
2350[
2351Makefile
2352samhain-install.sh
2353init/samhain.startLSB
2354init/samhain.startLinux
2355init/samhain.startGentoo
2356init/samhain.startFreeBSD
2357init/samhain.startSolaris
2358init/samhain.startHPUX
2359init/samhain.startIRIX
[71]2360init/samhain.startMACOSX
[1]2361samhain.spec
2362rules.deb
2363rules.deb-light
2364hp_ux.psf
2365scripts/samhain.spec
2366scripts/redhat_i386.client.spec
2367scripts/samhain.ebuild
2368scripts/samhain.ebuild-light
2369scripts/samhainadmin.pl
2370scripts/check_samhain.pl
2371deploy.sh
2372],
2373[
2374echo timestamp > stamp-h
2375chmod +x samhain-install.sh
2376chmod +x scripts/samhainadmin.pl
2377chmod +x scripts/check_samhain.pl
2378]
2379)
2380
2381chmod +x deploy.sh
2382
2383if test "x${cross_compiling}" = xyes
2384then
2385
2386echo "--------------------------------------------------------------"
2387echo
2388echo "You are using a cross-compiler. The following system dependent"
2389echo "values may have been set to default values that may be"
2390echo "incorrect for your target system: "
2391echo
2392echo "ac_cv_c_bigendian bigendian byte order ${ac_cv_c_bigendian}"
2393echo "ac_cv_c_long_double long double exists ${ac_cv_c_long_double}"
2394echo "ac_cv_sizeof_char_p size of pointer to char ${ac_cv_sizeof_char_p}"
2395echo "ac_cv_sizeof_char_p size of size_t ${ac_cv_sizeof_size_t}"
2396echo "ac_cv_sizeof_unsigned_int_ size of unsigned int ${ac_cv_sizeof_unsigned_int_}"
2397echo "ac_cv_sizeof_unsigned_long size of unsigned long ${ac_cv_sizeof_unsigned_long}"
2398echo "ac_cv_sizeof_unsigned_short size of unsigned short ${ac_cv_sizeof_unsigned_short}"
2399echo
2400echo "If these values are incorrect, change them in the file "
2401echo "config.cache and run configure again."
2402echo
2403echo "--------------------------------------------------------------"
2404
2405fi
2406
2407if test x${silent} != xyes
2408then
2409
2410 # A=`eval echo ${sbindir}` ; A=`eval echo ${A}`
2411 # B=`eval echo ${myconffile}` ; B=`eval echo ${B}`
2412 # C=`eval echo ${mandir}` ; C=`eval echo ${C}`
2413 # D=`eval echo ${mylockfile}` ; D=`eval echo ${D}`
2414 # E=`eval echo ${mylogfile}` ; E=`eval echo ${E}`
2415 # F=`eval echo ${mydataroot}` ; F=`eval echo ${F}`
2416
2417 echo
2418 echo " samhain has been configured as follows:"
2419 echo " System binaries: ${sbindir}"
2420 echo " Configuration file: ${myconffile}"
2421 echo " Manual pages: ${mandir}"
2422 echo " Data: ${mydataroot}"
2423 echo " PID file: ${mylockfile}"
2424 echo " Log file: ${mylogfile}"
2425 echo " Base key: ${mykeybase}"
2426 echo
2427 if test x"$mytclient" = x"-DSH_WITH_SERVER"
2428 then
2429 echo " Selected rc file: yulerc"
2430 else
2431 echo " Selected rc file: samhainrc.${selectconfig}"
2432 fi
2433
2434fi
2435
Note: See TracBrowser for help on using the repository browser.