git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@102 77e5149b-7576-45b1-b177-96237e5ba77b
Tomasz Kojm authored on 2003/11/06 11:03:35... | ... |
@@ -1,3 +1,10 @@ |
1 |
+Thu Nov 6 03:00:44 CET 2003 (tk) |
|
2 |
+--------------------------------- |
|
3 |
+ * database/Makefile: fixed an installation problem with unprivileged user |
|
4 |
+ (thanks to Tomasz Papszun) |
|
5 |
+ * configure: + _REENTRANT defined globally (thanks to Ed Phillips) |
|
6 |
+ + test for GMP 2 (and not only v3) |
|
7 |
+ |
|
1 | 8 |
Wed Nov 5 22:31:26 CET 2003 (tk) |
2 | 9 |
--------------------------------- |
3 | 10 |
* clamd: cl_scanfile() error message fixed (thanks to Ed Phillips) |
... | ... |
@@ -81,7 +81,7 @@ dnl there is now a CREATE_PREFIX_TARGET_H in this file as a shorthand for |
81 | 81 |
dnl PREFIX_CONFIG_H from a target.h file, however w/o the target.h ever created |
82 | 82 |
dnl (the prefix is a bit different, since we add an extra -target- and -host-) |
83 | 83 |
dnl |
84 |
-dnl @version: $Id: aclocal.m4,v 1.10 2003/10/31 02:23:54 kojm Exp $ |
|
84 |
+dnl @version: $Id: aclocal.m4,v 1.11 2003/11/06 02:03:35 kojm Exp $ |
|
85 | 85 |
dnl @author Guido Draheim <guidod@gmx.de> STATUS: used often |
86 | 86 |
|
87 | 87 |
AC_DEFUN([AC_CREATE_TARGET_H], |
... | ... |
@@ -4041,7 +4041,7 @@ dnl AC_COMPILE_CHECK_SIZEOF(ptrdiff_t, $headers) |
4041 | 4041 |
dnl AC_COMPILE_CHECK_SIZEOF(off_t, $headers) |
4042 | 4042 |
dnl |
4043 | 4043 |
dnl @author Kaveh Ghazi <ghazi@caip.rutgers.edu> |
4044 |
-dnl @version $Id: aclocal.m4,v 1.10 2003/10/31 02:23:54 kojm Exp $ |
|
4044 |
+dnl @version $Id: aclocal.m4,v 1.11 2003/11/06 02:03:35 kojm Exp $ |
|
4045 | 4045 |
dnl |
4046 | 4046 |
AC_DEFUN([AC_COMPILE_CHECK_SIZEOF], |
4047 | 4047 |
[changequote(<<, >>)dnl |
... | ... |
@@ -8804,7 +8804,70 @@ if test $ac_cv_lib_gmp___gmpz_init = yes; then |
8804 | 8804 |
_ACEOF |
8805 | 8805 |
|
8806 | 8806 |
else |
8807 |
- echo "WARNING: GNU MP 3 or newer NOT FOUND - digital signature support will be disabled !"; want_dsig="no" |
|
8807 |
+ echo "$as_me:$LINENO: checking for mpz_init in -lgmp" >&5 |
|
8808 |
+echo $ECHO_N "checking for mpz_init in -lgmp... $ECHO_C" >&6 |
|
8809 |
+if test "${ac_cv_lib_gmp_mpz_init+set}" = set; then |
|
8810 |
+ echo $ECHO_N "(cached) $ECHO_C" >&6 |
|
8811 |
+else |
|
8812 |
+ ac_check_lib_save_LIBS=$LIBS |
|
8813 |
+LIBS="-lgmp $LIBS" |
|
8814 |
+cat >conftest.$ac_ext <<_ACEOF |
|
8815 |
+#line $LINENO "configure" |
|
8816 |
+#include "confdefs.h" |
|
8817 |
+ |
|
8818 |
+/* Override any gcc2 internal prototype to avoid an error. */ |
|
8819 |
+#ifdef __cplusplus |
|
8820 |
+extern "C" |
|
8821 |
+#endif |
|
8822 |
+/* We use char because int might match the return type of a gcc2 |
|
8823 |
+ builtin and then its argument prototype would still apply. */ |
|
8824 |
+char mpz_init (); |
|
8825 |
+#ifdef F77_DUMMY_MAIN |
|
8826 |
+# ifdef __cplusplus |
|
8827 |
+ extern "C" |
|
8828 |
+# endif |
|
8829 |
+ int F77_DUMMY_MAIN() { return 1; } |
|
8830 |
+#endif |
|
8831 |
+int |
|
8832 |
+main () |
|
8833 |
+{ |
|
8834 |
+mpz_init (); |
|
8835 |
+ ; |
|
8836 |
+ return 0; |
|
8837 |
+} |
|
8838 |
+_ACEOF |
|
8839 |
+rm -f conftest.$ac_objext conftest$ac_exeext |
|
8840 |
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
|
8841 |
+ (eval $ac_link) 2>&5 |
|
8842 |
+ ac_status=$? |
|
8843 |
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|
8844 |
+ (exit $ac_status); } && |
|
8845 |
+ { ac_try='test -s conftest$ac_exeext' |
|
8846 |
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
|
8847 |
+ (eval $ac_try) 2>&5 |
|
8848 |
+ ac_status=$? |
|
8849 |
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|
8850 |
+ (exit $ac_status); }; }; then |
|
8851 |
+ ac_cv_lib_gmp_mpz_init=yes |
|
8852 |
+else |
|
8853 |
+ echo "$as_me: failed program was:" >&5 |
|
8854 |
+cat conftest.$ac_ext >&5 |
|
8855 |
+ac_cv_lib_gmp_mpz_init=no |
|
8856 |
+fi |
|
8857 |
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext |
|
8858 |
+LIBS=$ac_check_lib_save_LIBS |
|
8859 |
+fi |
|
8860 |
+echo "$as_me:$LINENO: result: $ac_cv_lib_gmp_mpz_init" >&5 |
|
8861 |
+echo "${ECHO_T}$ac_cv_lib_gmp_mpz_init" >&6 |
|
8862 |
+if test $ac_cv_lib_gmp_mpz_init = yes; then |
|
8863 |
+ LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -lgmp"; cat >>confdefs.h <<\_ACEOF |
|
8864 |
+#define HAVE_GMP 1 |
|
8865 |
+_ACEOF |
|
8866 |
+ |
|
8867 |
+else |
|
8868 |
+ echo "WARNING: GNU MP 2 or newer NOT FOUND - digital signature support will be disabled !"; want_dsig="no" |
|
8869 |
+fi |
|
8870 |
+ |
|
8808 | 8871 |
fi |
8809 | 8872 |
|
8810 | 8873 |
fi |
... | ... |
@@ -8924,6 +8987,11 @@ fi |
8924 | 8924 |
if test "${enable_pthreads+set}" = set; then |
8925 | 8925 |
enableval="$enable_pthreads" |
8926 | 8926 |
have_pthreads=no |
8927 |
+else |
|
8928 |
+ cat >>confdefs.h <<\_ACEOF |
|
8929 |
+#define _REENTRANT 1 |
|
8930 |
+_ACEOF |
|
8931 |
+ |
|
8927 | 8932 |
fi; |
8928 | 8933 |
|
8929 | 8934 |
# Check whether --enable-cr or --disable-cr was given. |
... | ... |
@@ -88,7 +88,7 @@ want_dsig="no",) |
88 | 88 |
|
89 | 89 |
if test "$want_dsig" = "yes" |
90 | 90 |
then |
91 |
- AC_CHECK_LIB(gmp, __gmpz_init, [LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -lgmp"; AC_DEFINE(HAVE_GMP)], [echo "WARNING: GNU MP 3 or newer NOT FOUND - digital signature support will be disabled !"; want_dsig="no"]) |
|
91 |
+ AC_CHECK_LIB(gmp, __gmpz_init, [LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -lgmp"; AC_DEFINE(HAVE_GMP)], [AC_CHECK_LIB(gmp, mpz_init, [LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -lgmp"; AC_DEFINE(HAVE_GMP)], [echo "WARNING: GNU MP 2 or newer NOT FOUND - digital signature support will be disabled !"; want_dsig="no"])]) |
|
92 | 92 |
fi |
93 | 93 |
|
94 | 94 |
AC_CHECK_HEADER(syslog.h,AC_DEFINE(CLAMD_USE_SYSLOG),) |
... | ... |
@@ -98,7 +98,7 @@ dnl AC_CHECK_LIB(c, mkstemp, AC_DEFINE(HAVE_MKSTEMP),) |
98 | 98 |
|
99 | 99 |
AC_ARG_ENABLE(pthreads, |
100 | 100 |
[ --disable-pthreads Disable POSIX threads support], |
101 |
-have_pthreads=no,) |
|
101 |
+have_pthreads=no, AC_DEFINE(_REENTRANT)) |
|
102 | 102 |
|
103 | 103 |
AC_ARG_ENABLE(cr, |
104 | 104 |
[ --disable-cr Don't link with C reentrant library (BSD) ], |
... | ... |
@@ -24,10 +24,10 @@ CLAMAVGROUP = @CLAMAVGROUP@ |
24 | 24 |
|
25 | 25 |
install: |
26 | 26 |
$(mkinstalldirs) $(DESTDIR)$(DBINST) |
27 |
-# @$(INSTALL_DATA) main.cvd $(DESTDIR)$(DBINST) |
|
28 |
-# @$(INSTALL_DATA) daily.cvd $(DESTDIR)$(DBINST) |
|
27 |
+ @$(INSTALL_DATA) main.cvd $(DESTDIR)$(DBINST) |
|
28 |
+ @$(INSTALL_DATA) daily.cvd $(DESTDIR)$(DBINST) |
|
29 | 29 |
@$(INSTALL_DATA) mirrors.txt $(DESTDIR)$(DBINST) |
30 |
- @if test -n "${CLAMAVUSER}" && test -n "${CLAMAVGROUP}"; then \ |
|
30 |
+ @if test `id -u` -eq 0 && test -n "${CLAMAVUSER}" && test -n "${CLAMAVGROUP}"; then \ |
|
31 | 31 |
chmod 775 $(DESTDIR)$(DBINST); \ |
32 | 32 |
chown ${CLAMAVUSER} $(DESTDIR)$(DBINST); \ |
33 | 33 |
chgrp ${CLAMAVGROUP} $(DESTDIR)$(DBINST); \ |
... | ... |
@@ -246,10 +246,10 @@ uninstall-am: uninstall-info-am |
246 | 246 |
|
247 | 247 |
install: |
248 | 248 |
$(mkinstalldirs) $(DESTDIR)$(DBINST) |
249 |
-# @$(INSTALL_DATA) main.cvd $(DESTDIR)$(DBINST) |
|
250 |
-# @$(INSTALL_DATA) daily.cvd $(DESTDIR)$(DBINST) |
|
249 |
+ @$(INSTALL_DATA) main.cvd $(DESTDIR)$(DBINST) |
|
250 |
+ @$(INSTALL_DATA) daily.cvd $(DESTDIR)$(DBINST) |
|
251 | 251 |
@$(INSTALL_DATA) mirrors.txt $(DESTDIR)$(DBINST) |
252 |
- @if test -n "${CLAMAVUSER}" && test -n "${CLAMAVGROUP}"; then \ |
|
252 |
+ @if test `id -u` -eq 0 && test -n "${CLAMAVUSER}" && test -n "${CLAMAVGROUP}"; then \ |
|
253 | 253 |
chmod 775 $(DESTDIR)$(DBINST); \ |
254 | 254 |
chown ${CLAMAVUSER} $(DESTDIR)$(DBINST); \ |
255 | 255 |
chgrp ${CLAMAVGROUP} $(DESTDIR)$(DBINST); \ |