~ubuntu-branches/ubuntu/saucy/clamav/saucy-backports

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
case "$target_os" in
linux*)
    AC_DEFINE([C_LINUX],1,[target is linux])
    if test "$have_pthreads" = "yes"; then
	THREAD_LIBS="-lpthread"
	TH_SAFE="-thread-safe"
	if test "$want_fanotify" = "yes"; then
	    AC_CHECK_HEADER([sys/fanotify.h],AC_DEFINE([FANOTIFY],1,[use fanotify]),)
	fi
    fi
    ;;
kfreebsd*-gnu)
    AC_DEFINE([C_KFREEBSD_GNU],1,[target is kfreebsd-gnu])
    if test "$have_pthreads" = "yes"; then
       THREAD_LIBS="-lpthread"
       TH_SAFE="-thread-safe"
    fi
    ;;
solaris*)
    CLAMDSCAN_LIBS="$CLAMDSCAN_LIBS -lresolv"
    FRESHCLAM_LIBS="$FRESHCLAM_LIBS -lresolv"
    if test "$have_pthreads" = "yes"; then
	THREAD_LIBS="-lpthread"
	CLAMD_LIBS="$CLAMD_LIBS -lresolv"
	CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lresolv"
	TH_SAFE="-thread-safe"
    fi
    AC_DEFINE([C_SOLARIS],1,[os is solaris])
    ;;
freebsd[[45]]*)
    if test "$have_pthreads" = "yes"; then
	THREAD_LIBS="-pthread -lc_r"
	TH_SAFE="-thread-safe"
    fi
    AC_DEFINE([C_BSD],1,[os is freebsd 4 or 5])
    ;;
freebsd*)
    if test "$have_pthreads" = "yes"; then
	THREAD_LIBS="-lthr"
	TH_SAFE="-thread-safe"
    fi
    AC_DEFINE([C_BSD],1,[os is freebsd 6])
    ;;
dragonfly*)
    if test "$have_pthreads" = "yes"; then
	THREAD_LIBS="-pthread"
	TH_SAFE="-thread-safe"
    fi
    AC_DEFINE([C_BSD],1,[os is dragonfly])
    ;;
openbsd*)
    if test "$have_pthreads" = "yes"; then
	THREAD_LIBS="-pthread"
	CLAMD_LIBS="$CLAMD_LIBS -pthread"
	CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -pthread"
	TH_SAFE="-thread-safe"
    fi
    AC_DEFINE([C_BSD],1,[os is OpenBSD])
    ;;
bsdi*)
    if test "$have_pthreads" = "yes"; then
	THREAD_LIBS="-pthread"
	TH_SAFE="-thread-safe"
    fi
    AC_DEFINE([C_BSD],1,[os is BSDI BSD/OS])
    ;;
netbsd*)
     if test "$have_pthreads" = "yes"; then
	THREAD_LIBS="-lpthread"
     fi
    AC_DEFINE([C_BSD],1,[os is NetBSD])
    ;;
bsd*)
    AC_MSG_RESULT([Unknown BSD detected. Disabling thread support.])
    have_pthreads="no"
    AC_DEFINE([C_BSD],1,[os is bsd flavor])
    ;;
beos*)
    AC_MSG_RESULT([BeOS detected. Disabling thread support.])
    have_pthreads="no"
    AC_DEFINE([C_BEOS],1,[os is beos])
    ;;
x86:Interix*)
    AC_DEFINE([C_INTERIX],1,[os is Interix])
    ;;
darwin*)
    AC_DEFINE([C_BSD],1,[os is bsd flavor])
    AC_DEFINE([C_DARWIN],1,[os is darwin])
    AC_DEFINE([BIND_8_COMPAT],1,[enable bind8 compatibility])
    AC_DEFINE([CLAMAUTH],1,[use ClamAuth])
    use_netinfo="yes"
    ;;
os2*)
    CLAMDSCAN_LIBS="$CLAMDSCAN_LIBS -lsyslog"
    FRESHCLAM_LIBS="$FRESHCLAM_LIBS -lsyslog"
    CLAMD_LIBS="$CLAMD_LIBS -lsyslog"
    CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lsyslog"
    if test "$have_pthreads" = "yes"; then
	THREAD_LIBS="-lpthread"
	TH_SAFE="-thread-safe"
    fi
    AC_DEFINE([C_OS2],1,[os is OS/2])
    ;;
sco*)
    dnl njh@bandsman.sco.uk: SCO Unix port
    dnl FRESHCLAM_LIBS="-lsocket"
    dnl CLAMD_LIBS="-lsocket"
    dnl CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lsocket"
    ;;
hpux*)
    if test "$have_pthreads" = "yes"; then
	THREAD_LIBS="-lpthread"
	TH_SAFE="-thread-safe"
    fi
    AC_DEFINE([C_HPUX],1,[os is hpux])
    if test "$have_mempool" = "yes"; then
	LDFLAGS="$LDFLAGS -Wl,+pd,1M"
    fi
    ;;
aix*)
    if test "$have_pthreads" = "yes"; then
	THREAD_LIBS="-lpthread"
	TH_SAFE="-thread-safe"
	AC_DEFINE([_THREAD_SAFE],1,[thread safe])
    fi
    AC_DEFINE([C_AIX],1,[os is aix])
    ;;
*-*-osf*)
    if test "$have_pthreads" = "yes"; then
	THREAD_LIBS="-pthread"
	TH_SAFE="-thread-safe"
	AC_DEFINE([_POSIX_PII_SOCKET],1,[POSIX compatibility])
    fi
    AC_DEFINE([C_OSF],1,[os is osf/tru64])
    ;;
nto-qnx*)
    AC_DEFINE([C_QNX6],1,[os is QNX 6.x.x])
    ;;
irix*)
    if test "$have_pthreads" = "yes"; then
	THREAD_LIBS="-lpthread"
	TH_SAFE="-thread-safe"
    fi
    LIBS="$LIBS -lgen"
    AC_DEFINE([C_IRIX],1,[os is irix])
    ;;
interix*)
    AC_DEFINE([C_INTERIX],1,[os is interix])
    if test "$test_clamav" = "yes"; then
	if test ! -r /etc/passwd; then
	   test_clamav="no"
	fi
    fi
    if test "$have_pthreads" = "yes"; then
	THREAD_LIBS="-lpthread"
	TH_SAFE="-thread-safe"
    fi
    ;;
gnu*)
    AC_DEFINE([C_GNU_HURD],1,[target is gnu-hurd])
    if test "$have_pthreads" = "yes"; then
       THREAD_LIBS="-lpthread"
       TH_SAFE="-thread-safe"
    fi
    ;;
*)
    ;;
esac