Browse code

add --with-system-tommath

git-svn: trunk@4843

aCaB authored on 2009/02/21 18:26:34
Showing 7 changed files
... ...
@@ -1,3 +1,8 @@
1
+Sat Feb 21 10:55:30 CET 2009 (acab)
2
+-----------------------------------
3
+ * build system: Allow to link to system libtommath.
4
+		 Based on an idea from Steve Gran.
5
+
1 6
 Fri Feb 20 15:57:11 CET 2009 (tk)
2 7
 ---------------------------------
3 8
  * examples/ex1.c: use new API
... ...
@@ -341,6 +341,9 @@
341 341
 /* Define to 1 if you have the `strlcpy' function. */
342 342
 #undef HAVE_STRLCPY
343 343
 
344
+/* link against system-wide libtommath */
345
+#undef HAVE_SYSTEM_TOMMATH
346
+
344 347
 /* Define to 1 if you have the <sys/dl.h> header file. */
345 348
 #undef HAVE_SYS_DL_H
346 349
 
... ...
@@ -915,6 +915,8 @@ LTLIBBZ2
915 915
 LIBBZ2_PREFIX
916 916
 ENABLE_UNRAR_TRUE
917 917
 ENABLE_UNRAR_FALSE
918
+LINK_TOMMATH_TRUE
919
+LINK_TOMMATH_FALSE
918 920
 DBDIR
919 921
 CFGDIR
920 922
 LIBCLAMAV_LIBS
... ...
@@ -1579,6 +1581,7 @@ Optional Packages:
1579 1579
 			  /usr/local or /usr if not found in /usr/local)
1580 1580
   --with-libbz2-prefix[=DIR]  search for libbz2 in DIR/include and DIR/lib
1581 1581
   --without-libbz2-prefix     don't search for libbz2 in includedir and libdir
1582
+  --with-system-tommath	link against system libtommath (default = no, use bundled)
1582 1583
   --with-iconv supports iconv() (default=auto)
1583 1584
   --with-user=uid	  name of the clamav user (default=clamav)
1584 1585
   --with-group=gid	  name of the clamav group (default=clamav)
... ...
@@ -4778,13 +4781,13 @@ if test "${lt_cv_nm_interface+set}" = set; then
4778 4778
 else
4779 4779
   lt_cv_nm_interface="BSD nm"
4780 4780
   echo "int some_variable = 0;" > conftest.$ac_ext
4781
-  (eval echo "\"\$as_me:4781: $ac_compile\"" >&5)
4781
+  (eval echo "\"\$as_me:4784: $ac_compile\"" >&5)
4782 4782
   (eval "$ac_compile" 2>conftest.err)
4783 4783
   cat conftest.err >&5
4784
-  (eval echo "\"\$as_me:4784: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
4784
+  (eval echo "\"\$as_me:4787: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
4785 4785
   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4786 4786
   cat conftest.err >&5
4787
-  (eval echo "\"\$as_me:4787: output\"" >&5)
4787
+  (eval echo "\"\$as_me:4790: output\"" >&5)
4788 4788
   cat conftest.out >&5
4789 4789
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4790 4790
     lt_cv_nm_interface="MS dumpbin"
... ...
@@ -5995,7 +5998,7 @@ ia64-*-hpux*)
5995 5995
   ;;
5996 5996
 *-*-irix6*)
5997 5997
   # Find out which ABI we are using.
5998
-  echo '#line 5998 "configure"' > conftest.$ac_ext
5998
+  echo '#line 6001 "configure"' > conftest.$ac_ext
5999 5999
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6000 6000
   (eval $ac_compile) 2>&5
6001 6001
   ac_status=$?
... ...
@@ -7845,11 +7848,11 @@ else
7845 7845
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7846 7846
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7847 7847
    -e 's:$: $lt_compiler_flag:'`
7848
-   (eval echo "\"\$as_me:7848: $lt_compile\"" >&5)
7848
+   (eval echo "\"\$as_me:7851: $lt_compile\"" >&5)
7849 7849
    (eval "$lt_compile" 2>conftest.err)
7850 7850
    ac_status=$?
7851 7851
    cat conftest.err >&5
7852
-   echo "$as_me:7852: \$? = $ac_status" >&5
7852
+   echo "$as_me:7855: \$? = $ac_status" >&5
7853 7853
    if (exit $ac_status) && test -s "$ac_outfile"; then
7854 7854
      # The compiler can only warn and ignore the option if not recognized
7855 7855
      # So say no if there are warnings other than the usual output.
... ...
@@ -8184,11 +8187,11 @@ else
8184 8184
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8185 8185
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8186 8186
    -e 's:$: $lt_compiler_flag:'`
8187
-   (eval echo "\"\$as_me:8187: $lt_compile\"" >&5)
8187
+   (eval echo "\"\$as_me:8190: $lt_compile\"" >&5)
8188 8188
    (eval "$lt_compile" 2>conftest.err)
8189 8189
    ac_status=$?
8190 8190
    cat conftest.err >&5
8191
-   echo "$as_me:8191: \$? = $ac_status" >&5
8191
+   echo "$as_me:8194: \$? = $ac_status" >&5
8192 8192
    if (exit $ac_status) && test -s "$ac_outfile"; then
8193 8193
      # The compiler can only warn and ignore the option if not recognized
8194 8194
      # So say no if there are warnings other than the usual output.
... ...
@@ -8289,11 +8292,11 @@ else
8289 8289
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8290 8290
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8291 8291
    -e 's:$: $lt_compiler_flag:'`
8292
-   (eval echo "\"\$as_me:8292: $lt_compile\"" >&5)
8292
+   (eval echo "\"\$as_me:8295: $lt_compile\"" >&5)
8293 8293
    (eval "$lt_compile" 2>out/conftest.err)
8294 8294
    ac_status=$?
8295 8295
    cat out/conftest.err >&5
8296
-   echo "$as_me:8296: \$? = $ac_status" >&5
8296
+   echo "$as_me:8299: \$? = $ac_status" >&5
8297 8297
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
8298 8298
    then
8299 8299
      # The compiler can only warn and ignore the option if not recognized
... ...
@@ -8344,11 +8347,11 @@ else
8344 8344
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8345 8345
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8346 8346
    -e 's:$: $lt_compiler_flag:'`
8347
-   (eval echo "\"\$as_me:8347: $lt_compile\"" >&5)
8347
+   (eval echo "\"\$as_me:8350: $lt_compile\"" >&5)
8348 8348
    (eval "$lt_compile" 2>out/conftest.err)
8349 8349
    ac_status=$?
8350 8350
    cat out/conftest.err >&5
8351
-   echo "$as_me:8351: \$? = $ac_status" >&5
8351
+   echo "$as_me:8354: \$? = $ac_status" >&5
8352 8352
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
8353 8353
    then
8354 8354
      # The compiler can only warn and ignore the option if not recognized
... ...
@@ -11100,7 +11103,7 @@ else
11100 11100
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
11101 11101
   lt_status=$lt_dlunknown
11102 11102
   cat > conftest.$ac_ext <<_LT_EOF
11103
-#line 11103 "configure"
11103
+#line 11106 "configure"
11104 11104
 #include "confdefs.h"
11105 11105
 
11106 11106
 #if HAVE_DLFCN_H
... ...
@@ -11196,7 +11199,7 @@ else
11196 11196
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
11197 11197
   lt_status=$lt_dlunknown
11198 11198
   cat > conftest.$ac_ext <<_LT_EOF
11199
-#line 11199 "configure"
11199
+#line 11202 "configure"
11200 11200
 #include "confdefs.h"
11201 11201
 
11202 11202
 #if HAVE_DLFCN_H
... ...
@@ -12311,7 +12314,7 @@ else
12311 12311
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
12312 12312
   lt_status=$lt_dlunknown
12313 12313
   cat > conftest.$ac_ext <<_LT_EOF
12314
-#line 12314 "configure"
12314
+#line 12317 "configure"
12315 12315
 #include "confdefs.h"
12316 12316
 
12317 12317
 #if HAVE_DLFCN_H
... ...
@@ -19298,6 +19301,109 @@ else
19298 19298
 fi
19299 19299
 
19300 19300
 
19301
+have_system_tommath=no
19302
+
19303
+# Check whether --with-system-tommath was given.
19304
+if test "${with_system_tommath+set}" = set; then
19305
+  withval=$with_system_tommath;
19306
+	case "$withval" in
19307
+	yes)
19308
+		{ echo "$as_me:$LINENO: checking for mp_mul_2d in -ltommath" >&5
19309
+echo $ECHO_N "checking for mp_mul_2d in -ltommath... $ECHO_C" >&6; }
19310
+if test "${ac_cv_lib_tommath_mp_mul_2d+set}" = set; then
19311
+  echo $ECHO_N "(cached) $ECHO_C" >&6
19312
+else
19313
+  ac_check_lib_save_LIBS=$LIBS
19314
+LIBS="-ltommath  $LIBS"
19315
+cat >conftest.$ac_ext <<_ACEOF
19316
+/* confdefs.h.  */
19317
+_ACEOF
19318
+cat confdefs.h >>conftest.$ac_ext
19319
+cat >>conftest.$ac_ext <<_ACEOF
19320
+/* end confdefs.h.  */
19321
+
19322
+/* Override any GCC internal prototype to avoid an error.
19323
+   Use char because int might match the return type of a GCC
19324
+   builtin and then its argument prototype would still apply.  */
19325
+#ifdef __cplusplus
19326
+extern "C"
19327
+#endif
19328
+char mp_mul_2d ();
19329
+int
19330
+main ()
19331
+{
19332
+return mp_mul_2d ();
19333
+  ;
19334
+  return 0;
19335
+}
19336
+_ACEOF
19337
+rm -f conftest.$ac_objext conftest$ac_exeext
19338
+if { (ac_try="$ac_link"
19339
+case "(($ac_try" in
19340
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19341
+  *) ac_try_echo=$ac_try;;
19342
+esac
19343
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19344
+  (eval "$ac_link") 2>conftest.er1
19345
+  ac_status=$?
19346
+  grep -v '^ *+' conftest.er1 >conftest.err
19347
+  rm -f conftest.er1
19348
+  cat conftest.err >&5
19349
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
19350
+  (exit $ac_status); } && {
19351
+	 test -z "$ac_c_werror_flag" ||
19352
+	 test ! -s conftest.err
19353
+       } && test -s conftest$ac_exeext &&
19354
+       $as_test_x conftest$ac_exeext; then
19355
+  ac_cv_lib_tommath_mp_mul_2d=yes
19356
+else
19357
+  echo "$as_me: failed program was:" >&5
19358
+sed 's/^/| /' conftest.$ac_ext >&5
19359
+
19360
+	ac_cv_lib_tommath_mp_mul_2d=no
19361
+fi
19362
+
19363
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19364
+      conftest$ac_exeext conftest.$ac_ext
19365
+LIBS=$ac_check_lib_save_LIBS
19366
+fi
19367
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_tommath_mp_mul_2d" >&5
19368
+echo "${ECHO_T}$ac_cv_lib_tommath_mp_mul_2d" >&6; }
19369
+if test $ac_cv_lib_tommath_mp_mul_2d = yes; then
19370
+
19371
+
19372
+cat >>confdefs.h <<\_ACEOF
19373
+#define HAVE_SYSTEM_TOMMATH 1
19374
+_ACEOF
19375
+
19376
+				LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -ltommath"
19377
+				have_system_tommath=yes
19378
+
19379
+else
19380
+  { echo "$as_me:$LINENO: WARNING: ****** Option --with-system-tommath was given but libtommath does not seem to be available, using bundled files instead" >&5
19381
+echo "$as_me: WARNING: ****** Option --with-system-tommath was given but libtommath does not seem to be available, using bundled files instead" >&2;}
19382
+
19383
+fi
19384
+
19385
+	;;
19386
+	no) ;;
19387
+	*) { { echo "$as_me:$LINENO: error: --with-system-tommath does not take an argument" >&5
19388
+echo "$as_me: error: --with-system-tommath does not take an argument" >&2;}
19389
+   { (exit 1); exit 1; }; } ;;
19390
+	esac
19391
+
19392
+fi
19393
+
19394
+ if test "x$have_system_tommath" = "xyes"; then
19395
+  LINK_TOMMATH_TRUE=
19396
+  LINK_TOMMATH_FALSE='#'
19397
+else
19398
+  LINK_TOMMATH_TRUE='#'
19399
+  LINK_TOMMATH_FALSE=
19400
+fi
19401
+
19402
+
19403
+
19301 19404
 
19302 19405
 # Check whether --with-iconv was given.
19303 19406
 if test "${with_iconv+set}" = set; then
... ...
@@ -22628,6 +22734,13 @@ echo "$as_me: error: conditional \"ENABLE_UNRAR\" was never defined.
22628 22628
 Usually this means the macro was only invoked conditionally." >&2;}
22629 22629
    { (exit 1); exit 1; }; }
22630 22630
 fi
22631
+if test -z "${LINK_TOMMATH_TRUE}" && test -z "${LINK_TOMMATH_FALSE}"; then
22632
+  { { echo "$as_me:$LINENO: error: conditional \"LINK_TOMMATH\" was never defined.
22633
+Usually this means the macro was only invoked conditionally." >&5
22634
+echo "$as_me: error: conditional \"LINK_TOMMATH\" was never defined.
22635
+Usually this means the macro was only invoked conditionally." >&2;}
22636
+   { (exit 1); exit 1; }; }
22637
+fi
22631 22638
 if test -z "${BUILD_CLAMD_TRUE}" && test -z "${BUILD_CLAMD_FALSE}"; then
22632 22639
   { { echo "$as_me:$LINENO: error: conditional \"BUILD_CLAMD\" was never defined.
22633 22640
 Usually this means the macro was only invoked conditionally." >&5
... ...
@@ -23646,6 +23759,8 @@ LTLIBBZ2!$LTLIBBZ2$ac_delim
23646 23646
 LIBBZ2_PREFIX!$LIBBZ2_PREFIX$ac_delim
23647 23647
 ENABLE_UNRAR_TRUE!$ENABLE_UNRAR_TRUE$ac_delim
23648 23648
 ENABLE_UNRAR_FALSE!$ENABLE_UNRAR_FALSE$ac_delim
23649
+LINK_TOMMATH_TRUE!$LINK_TOMMATH_TRUE$ac_delim
23650
+LINK_TOMMATH_FALSE!$LINK_TOMMATH_FALSE$ac_delim
23649 23651
 DBDIR!$DBDIR$ac_delim
23650 23652
 CFGDIR!$CFGDIR$ac_delim
23651 23653
 LIBCLAMAV_LIBS!$LIBCLAMAV_LIBS$ac_delim
... ...
@@ -23667,7 +23782,7 @@ ltdl_LIBOBJS!$ltdl_LIBOBJS$ac_delim
23667 23667
 ltdl_LTLIBOBJS!$ltdl_LTLIBOBJS$ac_delim
23668 23668
 _ACEOF
23669 23669
 
23670
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 71; then
23670
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 73; then
23671 23671
     break
23672 23672
   elif $ac_last_try; then
23673 23673
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
... ...
@@ -703,6 +703,28 @@ AC_ARG_ENABLE([milter],
703 703
 [  --enable-milter	  build clamav-milter],
704 704
 have_milter=$enableval, have_milter="no")
705 705
 
706
+have_system_tommath=no
707
+AC_ARG_WITH([system-tommath],
708
+[  --with-system-tommath	link against system libtommath (default = no, use bundled)],
709
+[
710
+	case "$withval" in
711
+	yes)
712
+		AC_CHECK_LIB([tommath], [mp_mul_2d],
713
+			[
714
+				AC_DEFINE([HAVE_SYSTEM_TOMMATH], 1, [link against system-wide libtommath])
715
+				LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -ltommath"
716
+				have_system_tommath=yes
717
+			],
718
+			[AC_MSG_WARN([****** Option --with-system-tommath was given but libtommath does not seem to be available, using bundled files instead])]
719
+		)
720
+	;;
721
+	no) ;;
722
+	*) AC_MSG_ERROR([--with-system-tommath does not take an argument]) ;;
723
+	esac
724
+])
725
+AM_CONDITIONAL([LINK_TOMMATH], test "x$have_system_tommath" = "xyes")
726
+
727
+
706 728
 dnl we need to try to link with iconv, otherwise there could be a 
707 729
 dnl mismatch between a 32-bit and 64-bit lib. Detect this at configure time.
708 730
 dnl we need to check after zlib/bzip2, because they can change the include path
... ...
@@ -88,9 +88,12 @@ libclamav_internal_utils_la_SOURCES=str.c \
88 88
 				    regex/regex.h \
89 89
 				    regex/regex2.h \
90 90
 				    regex/utils.h \
91
-				    bignum.c \
92
-				    bignum.h \
91
+				    bignum.h
92
+
93
+if !LINK_TOMMATH
94
+libclamav_internal_utils_la_SOURCES += bignum.c \
93 95
 				    bignum_class.h
96
+endif
94 97
 
95 98
 libclamav_internal_utils_la_LDFLAGS=-static
96 99
 libclamav_internal_utils_la_CFLAGS=  -fPIC -DPIC
... ...
@@ -60,7 +60,10 @@ target_triplet = @target@
60 60
 @ENABLE_UNRAR_TRUE@	@top_srcdir@/libclamunrar/libclamunrar.map \
61 61
 @ENABLE_UNRAR_TRUE@	@top_srcdir@/libclamunrar_iface/libclamunrar_iface.map
62 62
 @ENABLE_UNRAR_TRUE@@VERSIONSCRIPT_TRUE@am__append_5 = -Wl,@VERSIONSCRIPTFLAG@,@top_srcdir@/libclamunrar_iface/libclamunrar_iface.map
63
-@VERSIONSCRIPT_TRUE@am__append_6 = -Wl,@VERSIONSCRIPTFLAG@,@top_srcdir@/libclamav/libclamav.map
63
+@LINK_TOMMATH_FALSE@am__append_6 = bignum.c \
64
+@LINK_TOMMATH_FALSE@				    bignum_class.h
65
+
66
+@VERSIONSCRIPT_TRUE@am__append_7 = -Wl,@VERSIONSCRIPTFLAG@,@top_srcdir@/libclamav/libclamav.map
64 67
 subdir = libclamav
65 68
 DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \
66 69
 	$(srcdir)/Makefile.in
... ...
@@ -107,6 +110,13 @@ libclamav_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
107 107
 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
108 108
 	$(libclamav_la_LDFLAGS) $(LDFLAGS) -o $@
109 109
 libclamav_internal_utils_la_LIBADD =
110
+am__libclamav_internal_utils_la_SOURCES_DIST = str.c str.h \
111
+	others_common.c others.h regex/strlcpy.c regex/regcomp.c \
112
+	regex/regerror.c regex/regexec.c regex/regfree.c \
113
+	regex/cclass.h regex/cname.h regex/regex.h regex/regex2.h \
114
+	regex/utils.h bignum.h bignum.c bignum_class.h
115
+@LINK_TOMMATH_FALSE@am__objects_1 =  \
116
+@LINK_TOMMATH_FALSE@	libclamav_internal_utils_la-bignum.lo
110 117
 am_libclamav_internal_utils_la_OBJECTS =  \
111 118
 	libclamav_internal_utils_la-str.lo \
112 119
 	libclamav_internal_utils_la-others_common.lo \
... ...
@@ -114,8 +124,7 @@ am_libclamav_internal_utils_la_OBJECTS =  \
114 114
 	libclamav_internal_utils_la-regcomp.lo \
115 115
 	libclamav_internal_utils_la-regerror.lo \
116 116
 	libclamav_internal_utils_la-regexec.lo \
117
-	libclamav_internal_utils_la-regfree.lo \
118
-	libclamav_internal_utils_la-bignum.lo
117
+	libclamav_internal_utils_la-regfree.lo $(am__objects_1)
119 118
 libclamav_internal_utils_la_OBJECTS =  \
120 119
 	$(am_libclamav_internal_utils_la_OBJECTS)
121 120
 libclamav_internal_utils_la_LINK = $(LIBTOOL) --tag=CC \
... ...
@@ -167,7 +176,7 @@ SOURCES = $(libclamav_la_SOURCES) \
167 167
 	$(libclamav_internal_utils_la_SOURCES) \
168 168
 	$(libclamunrar_la_SOURCES) $(libclamunrar_iface_la_SOURCES)
169 169
 DIST_SOURCES = $(libclamav_la_SOURCES) \
170
-	$(libclamav_internal_utils_la_SOURCES) \
170
+	$(am__libclamav_internal_utils_la_SOURCES_DIST) \
171 171
 	$(am__libclamunrar_la_SOURCES_DIST) \
172 172
 	$(am__libclamunrar_iface_la_SOURCES_DIST)
173 173
 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
... ...
@@ -377,30 +386,17 @@ EXTRA_DIST = $(am__append_4) regex/engine.c libclamav.map \
377 377
 
378 378
 @ENABLE_UNRAR_TRUE@IFACELIBADD = -dlopen libclamunrar_iface.la
379 379
 @ENABLE_UNRAR_TRUE@IFACEDEP = libclamunrar_iface.la
380
-libclamav_internal_utils_la_SOURCES = str.c \
381
-				    str.h \
382
-				    others_common.c \
383
-				    others.h \
384
-				    regex/strlcpy.c \
385
-				    regex/regcomp.c \
386
-				    regex/regerror.c \
387
-				    regex/regexec.c \
388
-				    regex/regfree.c \
389
-				    regex/cclass.h \
390
-				    regex/cname.h \
391
-				    regex/regex.h \
392
-				    regex/regex2.h \
393
-				    regex/utils.h \
394
-				    bignum.c \
395
-				    bignum.h \
396
-				    bignum_class.h
397
-
380
+libclamav_internal_utils_la_SOURCES = str.c str.h others_common.c \
381
+	others.h regex/strlcpy.c regex/regcomp.c regex/regerror.c \
382
+	regex/regexec.c regex/regfree.c regex/cclass.h regex/cname.h \
383
+	regex/regex.h regex/regex2.h regex/utils.h bignum.h \
384
+	$(am__append_6)
398 385
 libclamav_internal_utils_la_LDFLAGS = -static
399 386
 libclamav_internal_utils_la_CFLAGS = -fPIC -DPIC
400 387
 libclamav_la_LIBADD = @LIBLTDL@ $(IFACELIBADD) lzma/liblzma.la libclamav_internal_utils.la @LIBCLAMAV_LIBS@ @THREAD_LIBS@
401 388
 libclamav_la_DEPENDENCIES = @LIBLTDL@ $(IFACEDEP) libclamav_internal_utils.la
402 389
 libclamav_la_LDFLAGS = @TH_SAFE@ -version-info @LIBCLAMAV_VERSION@ \
403
-	-no-undefined $(am__append_6)
390
+	-no-undefined $(am__append_7)
404 391
 include_HEADERS = clamav.h
405 392
 libclamav_la_SOURCES = \
406 393
 	clamav.h \
... ...
@@ -15,6 +15,9 @@
15 15
 #ifndef __BIGNUM_H
16 16
 #define __BIGNUM_H
17 17
 
18
+#ifdef HAVE_SYSTEM_TOMMATH
19
+#include <tommath.h>
20
+#else
18 21
 #include <stdio.h>
19 22
 #include <string.h>
20 23
 #include <stdlib.h>
... ...
@@ -580,6 +583,8 @@ extern const char *mp_s_rmap;
580 580
    }
581 581
 #endif
582 582
 
583
+#endif /* HAVE_SYSTEM_TOMMATH */
584
+
583 585
 #endif
584 586
 
585 587