Browse code

add support for DragonFly

git-svn: trunk@1656

Tomasz Kojm authored on 2005/07/20 04:12:55
Showing 3 changed files
... ...
@@ -1,3 +1,8 @@
1
+Tue Jul 19 21:11:25 CEST 2005 (tk)
2
+----------------------------------
3
+  * configure.in: add support for DragonFly (thanks to Joerg Sonnenberger
4
+		  <joerg*britannica.bec.de>)
5
+
1 6
 Tue Jul 19 21:01:30 CEST 2005 (tk)
2 7
 ----------------------------------
3 8
   * shared/output.c: fix mutex handling in the new implementation of logg()
... ...
@@ -1021,7 +1021,7 @@ Optional Features:
1021 1021
   --disable-bzip2	  disable bzip2 support
1022 1022
   --disable-dns           disable support for database verification through
1023 1023
                           DNS
1024
-  --disable-clamuko	  disable clamuko support (Linux and FreeBSD only)
1024
+  --disable-clamuko	  disable clamuko support (Linux, DragonFly and FreeBSD only)
1025 1025
   --enable-milter	  build clamav-milter
1026 1026
   --disable-dsig	  disable support for digital signatures
1027 1027
   --disable-pthreads      disable POSIX threads support
... ...
@@ -11818,6 +11818,37 @@ _ACEOF
11818 11818
 
11819 11819
     use_gethostbyname_r="no"
11820 11820
     ;;
11821
+dragonfly*)
11822
+    if test "$have_pthreads" = "yes"; then
11823
+	LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -pthread"
11824
+	CLAMD_LIBS="$CLAMD_LIBS -pthread"
11825
+	CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -pthread"
11826
+	TH_SAFE="-thread-safe"
11827
+
11828
+cat >>confdefs.h <<\_ACEOF
11829
+#define CL_THREAD_SAFE 1
11830
+_ACEOF
11831
+
11832
+
11833
+cat >>confdefs.h <<\_ACEOF
11834
+#define _REENTRANT 1
11835
+_ACEOF
11836
+
11837
+	if test "$want_clamuko" = "yes"; then
11838
+
11839
+cat >>confdefs.h <<\_ACEOF
11840
+#define CLAMUKO 1
11841
+_ACEOF
11842
+
11843
+	fi
11844
+    fi
11845
+
11846
+cat >>confdefs.h <<\_ACEOF
11847
+#define C_BSD 1
11848
+_ACEOF
11849
+
11850
+    use_gethostbyname_r="no"
11851
+    ;;
11821 11852
 openbsd*)
11822 11853
     if test "$have_pthreads" = "yes"; then
11823 11854
 	LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -pthread"
... ...
@@ -150,7 +150,7 @@ if test $want_dns = yes; then
150 150
 fi
151 151
 
152 152
 AC_ARG_ENABLE(clamuko,
153
-[  --disable-clamuko	  disable clamuko support (Linux and FreeBSD only)],
153
+[  --disable-clamuko	  disable clamuko support (Linux, DragonFly and FreeBSD only)],
154 154
 want_clamuko=$enableval, want_clamuko="yes")
155 155
 
156 156
 AC_FUNC_SETPGRP
... ...
@@ -402,6 +402,21 @@ freebsd*)
402 402
     AC_DEFINE(C_BSD,1,[os is freebsd])
403 403
     use_gethostbyname_r="no"
404 404
     ;;
405
+dragonfly*)
406
+    if test "$have_pthreads" = "yes"; then
407
+	LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -pthread"
408
+	CLAMD_LIBS="$CLAMD_LIBS -pthread"
409
+	CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -pthread"
410
+	TH_SAFE="-thread-safe"
411
+	AC_DEFINE(CL_THREAD_SAFE,1,[thread safe])
412
+	AC_DEFINE(_REENTRANT,1,[thread safe])
413
+	if test "$want_clamuko" = "yes"; then
414
+	    AC_DEFINE(CLAMUKO,1,[enable clamuko])
415
+	fi
416
+    fi
417
+    AC_DEFINE(C_BSD,1,[os is dragonfly])
418
+    use_gethostbyname_r="no"
419
+    ;;
405 420
 openbsd*)
406 421
     if test "$have_pthreads" = "yes"; then
407 422
 	LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -pthread"