Browse code

fix compilation issues under FreeBSD 4.x and 5.x (bb#455)

git-svn: trunk@3072

Tomasz Kojm authored on 2007/05/29 01:27:51
Showing 3 changed files
... ...
@@ -1,3 +1,7 @@
1
+Mon May 28 17:52:26 CEST 2007 (tk)
2
+----------------------------------
3
+  * configure: fix compilation issues under FreeBSD 4.x and 5.x (bb#455)
4
+
1 5
 Mon May 28 16:47:23 CEST 2007 (tk)
2 6
 ----------------------------------
3 7
   * clamd/server-th.c: fix incorrect handling of SIGSEGV (bb#504)
... ...
@@ -22240,7 +22240,11 @@ _ACEOF
22240 22240
 cat confdefs.h >>conftest.$ac_ext
22241 22241
 cat >>conftest.$ac_ext <<_ACEOF
22242 22242
 /* end confdefs.h.  */
22243
+
22244
+#include <sys/types.h>
22243 22245
 #include <netinet/in.h>
22246
+#include <arpa/nameser.h>
22247
+
22244 22248
 
22245 22249
 #include <resolv.h>
22246 22250
 _ACEOF
... ...
@@ -23027,7 +23031,7 @@ cat >>confdefs.h <<\_ACEOF
23027 23027
 _ACEOF
23028 23028
 
23029 23029
     ;;
23030
-freebsd45*)
23030
+freebsd[45]*)
23031 23031
     if test "$have_pthreads" = "yes"; then
23032 23032
 	THREAD_LIBS="-pthread -lc_r"
23033 23033
 	TH_SAFE="-thread-safe"
... ...
@@ -177,7 +177,11 @@ if test $want_dns = yes; then
177 177
     if test -z "$resolv_lib"; then
178 178
 	AC_CHECK_LIB(resolv, dn_expand, resolv_lib="-lresolv",)
179 179
     fi
180
-    AC_CHECK_HEADER(resolv.h,[FRESHCLAM_LIBS="$FRESHCLAM_LIBS $resolv_lib"; CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS $resolv_lib"; AC_DEFINE(HAVE_RESOLV_H,1,have resolv.h)], AC_MSG_WARN([****** DNS support disabled]), [#include <netinet/in.h>])
180
+    AC_CHECK_HEADER(resolv.h,[FRESHCLAM_LIBS="$FRESHCLAM_LIBS $resolv_lib"; CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS $resolv_lib"; AC_DEFINE(HAVE_RESOLV_H,1,have resolv.h)], AC_MSG_WARN([****** DNS support disabled]), [
181
+#include <sys/types.h>
182
+#include <netinet/in.h>
183
+#include <arpa/nameser.h>
184
+])
181 185
 fi
182 186
 
183 187
 AC_ARG_ENABLE(clamuko,
... ...
@@ -395,7 +399,7 @@ solaris*)
395 395
     fi
396 396
     AC_DEFINE(C_SOLARIS,1,[os is solaris])
397 397
     ;;
398
-freebsd[45]*)
398
+freebsd[[45]]*)
399 399
     if test "$have_pthreads" = "yes"; then
400 400
 	THREAD_LIBS="-pthread -lc_r"
401 401
 	TH_SAFE="-thread-safe"