Browse code

add support for version scripts when using Sun's ld on Solaris. use $GREP to grep binary files, needed for autoit to build on Solaris. add support for both GNU and Sun ld version scripts. add version script maps to libclamunrar, libclamunrar_iface. Enumerate all symbols, Sun's ld doesn't support cl_* (only *). cli_decodesig needs a dummy definition on Solaris.

git-svn: trunk@3474

Török Edvin authored on 2007/12/31 21:46:26
Showing 26 changed files
... ...
@@ -1,3 +1,13 @@
1
+Mon Dec 31 14:08:40 EET 2007 (edwin)
2
+------------------------------------
3
+ * configure*: add support for version scripts when using Sun's ld on Solaris.
4
+ * acinclude.m4: use $GREP to grep binary files, needed for autoit to build on
5
+ Solaris.
6
+ * */Makefile.am/.in: add support for both GNU and Sun ld version scripts.
7
+ * */*.map: add version script maps to libclamunrar, libclamunrar_iface.
8
+  Enumerate all symbols, Sun's ld doesn't support cl_* (only *).
9
+ * libclamav/dsig.c: cli_decodesig needs a dummy definition on Solaris.
10
+
1 11
 Sun Dec 30 13:57:45 EET 2007 (edwin)
2 12
 -----------------------------------
3 13
  * libclamav/str.c: optimize cli_strcasestr()
... ...
@@ -186,6 +186,7 @@ STRIP = @STRIP@
186 186
 THREAD_LIBS = @THREAD_LIBS@
187 187
 TH_SAFE = @TH_SAFE@
188 188
 VERSION = @VERSION@
189
+VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
189 190
 abs_builddir = @abs_builddir@
190 191
 abs_srcdir = @abs_srcdir@
191 192
 abs_top_builddir = @abs_top_builddir@
... ...
@@ -594,10 +594,10 @@ AC_DEFUN([AC_C_FPU_BIGENDIAN],
594 594
 [AC_CACHE_CHECK([whether FPU byte ordering is bigendian], [ac_cv_c_fpu_bigendian],
595 595
 [ac_cv_c_fpu_bigendian=unknown
596 596
 AC_COMPILE_IFELSE([AC_LANG_SOURCE([[double d = 3815911171354501045744583353695226502220105394563506259449467213186125718792664588210662403287568710818873279842508553551908601408568128557088985172985437412593385138085986771664896.0;]])],[
597
-if grep emmeelle conftest.$ac_objext >/dev/null 2>&1 ; then
597
+if ${GREP-grep} emmeelle conftest.$ac_objext >/dev/null 2>&1 ; then
598 598
 	ac_cv_c_fpu_bigendian=yes
599 599
 fi
600
-if grep elleemme conftest.$ac_objext >/dev/null 2>&1 ; then
600
+if ${GREP-grep} elleemme conftest.$ac_objext >/dev/null 2>&1 ; then
601 601
 	ac_cv_c_fpu_bigendian=no
602 602
 fi
603 603
 ])])
... ...
@@ -169,6 +169,7 @@ STRIP = @STRIP@
169 169
 THREAD_LIBS = @THREAD_LIBS@
170 170
 TH_SAFE = @TH_SAFE@
171 171
 VERSION = @VERSION@
172
+VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
172 173
 abs_builddir = @abs_builddir@
173 174
 abs_srcdir = @abs_srcdir@
174 175
 abs_top_builddir = @abs_top_builddir@
... ...
@@ -154,6 +154,7 @@ STRIP = @STRIP@
154 154
 THREAD_LIBS = @THREAD_LIBS@
155 155
 TH_SAFE = @TH_SAFE@
156 156
 VERSION = @VERSION@
157
+VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
157 158
 abs_builddir = @abs_builddir@
158 159
 abs_srcdir = @abs_srcdir@
159 160
 abs_top_builddir = @abs_top_builddir@
... ...
@@ -174,6 +174,7 @@ STRIP = @STRIP@
174 174
 THREAD_LIBS = @THREAD_LIBS@
175 175
 TH_SAFE = @TH_SAFE@
176 176
 VERSION = @VERSION@
177
+VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
177 178
 abs_builddir = @abs_builddir@
178 179
 abs_srcdir = @abs_srcdir@
179 180
 abs_top_builddir = @abs_top_builddir@
... ...
@@ -163,6 +163,7 @@ STRIP = @STRIP@
163 163
 THREAD_LIBS = @THREAD_LIBS@
164 164
 TH_SAFE = @TH_SAFE@
165 165
 VERSION = @VERSION@
166
+VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
166 167
 abs_builddir = @abs_builddir@
167 168
 abs_srcdir = @abs_srcdir@
168 169
 abs_top_builddir = @abs_top_builddir@
... ...
@@ -157,6 +157,7 @@ STRIP = @STRIP@
157 157
 THREAD_LIBS = @THREAD_LIBS@
158 158
 TH_SAFE = @TH_SAFE@
159 159
 VERSION = @VERSION@
160
+VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
160 161
 abs_builddir = @abs_builddir@
161 162
 abs_srcdir = @abs_srcdir@
162 163
 abs_top_builddir = @abs_top_builddir@
... ...
@@ -877,6 +877,7 @@ LIBTOOL
877 877
 MAINTAINER_MODE_TRUE
878 878
 MAINTAINER_MODE_FALSE
879 879
 MAINT
880
+VERSIONSCRIPTFLAG
880 881
 VERSIONSCRIPT_TRUE
881 882
 VERSIONSCRIPT_FALSE
882 883
 sendmailprog
... ...
@@ -4747,7 +4748,7 @@ ia64-*-hpux*)
4747 4747
   ;;
4748 4748
 *-*-irix6*)
4749 4749
   # Find out which ABI we are using.
4750
-  echo '#line 4750 "configure"' > conftest.$ac_ext
4750
+  echo '#line 4751 "configure"' > conftest.$ac_ext
4751 4751
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4752 4752
   (eval $ac_compile) 2>&5
4753 4753
   ac_status=$?
... ...
@@ -7484,11 +7485,11 @@ else
7484 7484
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7485 7485
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7486 7486
    -e 's:$: $lt_compiler_flag:'`
7487
-   (eval echo "\"\$as_me:7487: $lt_compile\"" >&5)
7487
+   (eval echo "\"\$as_me:7488: $lt_compile\"" >&5)
7488 7488
    (eval "$lt_compile" 2>conftest.err)
7489 7489
    ac_status=$?
7490 7490
    cat conftest.err >&5
7491
-   echo "$as_me:7491: \$? = $ac_status" >&5
7491
+   echo "$as_me:7492: \$? = $ac_status" >&5
7492 7492
    if (exit $ac_status) && test -s "$ac_outfile"; then
7493 7493
      # The compiler can only warn and ignore the option if not recognized
7494 7494
      # So say no if there are warnings other than the usual output.
... ...
@@ -7774,11 +7775,11 @@ else
7774 7774
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7775 7775
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7776 7776
    -e 's:$: $lt_compiler_flag:'`
7777
-   (eval echo "\"\$as_me:7777: $lt_compile\"" >&5)
7777
+   (eval echo "\"\$as_me:7778: $lt_compile\"" >&5)
7778 7778
    (eval "$lt_compile" 2>conftest.err)
7779 7779
    ac_status=$?
7780 7780
    cat conftest.err >&5
7781
-   echo "$as_me:7781: \$? = $ac_status" >&5
7781
+   echo "$as_me:7782: \$? = $ac_status" >&5
7782 7782
    if (exit $ac_status) && test -s "$ac_outfile"; then
7783 7783
      # The compiler can only warn and ignore the option if not recognized
7784 7784
      # So say no if there are warnings other than the usual output.
... ...
@@ -7878,11 +7879,11 @@ else
7878 7878
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7879 7879
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7880 7880
    -e 's:$: $lt_compiler_flag:'`
7881
-   (eval echo "\"\$as_me:7881: $lt_compile\"" >&5)
7881
+   (eval echo "\"\$as_me:7882: $lt_compile\"" >&5)
7882 7882
    (eval "$lt_compile" 2>out/conftest.err)
7883 7883
    ac_status=$?
7884 7884
    cat out/conftest.err >&5
7885
-   echo "$as_me:7885: \$? = $ac_status" >&5
7885
+   echo "$as_me:7886: \$? = $ac_status" >&5
7886 7886
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
7887 7887
    then
7888 7888
      # The compiler can only warn and ignore the option if not recognized
... ...
@@ -10240,7 +10241,7 @@ else
10240 10240
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10241 10241
   lt_status=$lt_dlunknown
10242 10242
   cat > conftest.$ac_ext <<EOF
10243
-#line 10243 "configure"
10243
+#line 10244 "configure"
10244 10244
 #include "confdefs.h"
10245 10245
 
10246 10246
 #if HAVE_DLFCN_H
... ...
@@ -10340,7 +10341,7 @@ else
10340 10340
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10341 10341
   lt_status=$lt_dlunknown
10342 10342
   cat > conftest.$ac_ext <<EOF
10343
-#line 10343 "configure"
10343
+#line 10344 "configure"
10344 10344
 #include "confdefs.h"
10345 10345
 
10346 10346
 #if HAVE_DLFCN_H
... ...
@@ -12760,11 +12761,11 @@ else
12760 12760
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
12761 12761
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
12762 12762
    -e 's:$: $lt_compiler_flag:'`
12763
-   (eval echo "\"\$as_me:12763: $lt_compile\"" >&5)
12763
+   (eval echo "\"\$as_me:12764: $lt_compile\"" >&5)
12764 12764
    (eval "$lt_compile" 2>conftest.err)
12765 12765
    ac_status=$?
12766 12766
    cat conftest.err >&5
12767
-   echo "$as_me:12767: \$? = $ac_status" >&5
12767
+   echo "$as_me:12768: \$? = $ac_status" >&5
12768 12768
    if (exit $ac_status) && test -s "$ac_outfile"; then
12769 12769
      # The compiler can only warn and ignore the option if not recognized
12770 12770
      # So say no if there are warnings other than the usual output.
... ...
@@ -12864,11 +12865,11 @@ else
12864 12864
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
12865 12865
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
12866 12866
    -e 's:$: $lt_compiler_flag:'`
12867
-   (eval echo "\"\$as_me:12867: $lt_compile\"" >&5)
12867
+   (eval echo "\"\$as_me:12868: $lt_compile\"" >&5)
12868 12868
    (eval "$lt_compile" 2>out/conftest.err)
12869 12869
    ac_status=$?
12870 12870
    cat out/conftest.err >&5
12871
-   echo "$as_me:12871: \$? = $ac_status" >&5
12871
+   echo "$as_me:12872: \$? = $ac_status" >&5
12872 12872
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
12873 12873
    then
12874 12874
      # The compiler can only warn and ignore the option if not recognized
... ...
@@ -14441,11 +14442,11 @@ else
14441 14441
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14442 14442
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
14443 14443
    -e 's:$: $lt_compiler_flag:'`
14444
-   (eval echo "\"\$as_me:14444: $lt_compile\"" >&5)
14444
+   (eval echo "\"\$as_me:14445: $lt_compile\"" >&5)
14445 14445
    (eval "$lt_compile" 2>conftest.err)
14446 14446
    ac_status=$?
14447 14447
    cat conftest.err >&5
14448
-   echo "$as_me:14448: \$? = $ac_status" >&5
14448
+   echo "$as_me:14449: \$? = $ac_status" >&5
14449 14449
    if (exit $ac_status) && test -s "$ac_outfile"; then
14450 14450
      # The compiler can only warn and ignore the option if not recognized
14451 14451
      # So say no if there are warnings other than the usual output.
... ...
@@ -14545,11 +14546,11 @@ else
14545 14545
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14546 14546
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
14547 14547
    -e 's:$: $lt_compiler_flag:'`
14548
-   (eval echo "\"\$as_me:14548: $lt_compile\"" >&5)
14548
+   (eval echo "\"\$as_me:14549: $lt_compile\"" >&5)
14549 14549
    (eval "$lt_compile" 2>out/conftest.err)
14550 14550
    ac_status=$?
14551 14551
    cat out/conftest.err >&5
14552
-   echo "$as_me:14552: \$? = $ac_status" >&5
14552
+   echo "$as_me:14553: \$? = $ac_status" >&5
14553 14553
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
14554 14554
    then
14555 14555
      # The compiler can only warn and ignore the option if not recognized
... ...
@@ -16745,11 +16746,11 @@ else
16745 16745
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
16746 16746
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
16747 16747
    -e 's:$: $lt_compiler_flag:'`
16748
-   (eval echo "\"\$as_me:16748: $lt_compile\"" >&5)
16748
+   (eval echo "\"\$as_me:16749: $lt_compile\"" >&5)
16749 16749
    (eval "$lt_compile" 2>conftest.err)
16750 16750
    ac_status=$?
16751 16751
    cat conftest.err >&5
16752
-   echo "$as_me:16752: \$? = $ac_status" >&5
16752
+   echo "$as_me:16753: \$? = $ac_status" >&5
16753 16753
    if (exit $ac_status) && test -s "$ac_outfile"; then
16754 16754
      # The compiler can only warn and ignore the option if not recognized
16755 16755
      # So say no if there are warnings other than the usual output.
... ...
@@ -17035,11 +17036,11 @@ else
17035 17035
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
17036 17036
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
17037 17037
    -e 's:$: $lt_compiler_flag:'`
17038
-   (eval echo "\"\$as_me:17038: $lt_compile\"" >&5)
17038
+   (eval echo "\"\$as_me:17039: $lt_compile\"" >&5)
17039 17039
    (eval "$lt_compile" 2>conftest.err)
17040 17040
    ac_status=$?
17041 17041
    cat conftest.err >&5
17042
-   echo "$as_me:17042: \$? = $ac_status" >&5
17042
+   echo "$as_me:17043: \$? = $ac_status" >&5
17043 17043
    if (exit $ac_status) && test -s "$ac_outfile"; then
17044 17044
      # The compiler can only warn and ignore the option if not recognized
17045 17045
      # So say no if there are warnings other than the usual output.
... ...
@@ -17139,11 +17140,11 @@ else
17139 17139
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
17140 17140
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
17141 17141
    -e 's:$: $lt_compiler_flag:'`
17142
-   (eval echo "\"\$as_me:17142: $lt_compile\"" >&5)
17142
+   (eval echo "\"\$as_me:17143: $lt_compile\"" >&5)
17143 17143
    (eval "$lt_compile" 2>out/conftest.err)
17144 17144
    ac_status=$?
17145 17145
    cat out/conftest.err >&5
17146
-   echo "$as_me:17146: \$? = $ac_status" >&5
17146
+   echo "$as_me:17147: \$? = $ac_status" >&5
17147 17147
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
17148 17148
    then
17149 17149
      # The compiler can only warn and ignore the option if not recognized
... ...
@@ -22105,7 +22106,7 @@ PRIVATE
22105 22105
 		*;
22106 22106
 };
22107 22107
 EOF
22108
-  if { ac_try='${CC-cc} $CFLAGS $pic_flag $LDFLAGS -shared
22108
+    if { ac_try='${CC-cc} $CFLAGS $pic_flag $LDFLAGS -shared
22109 22109
 				-o conftest.so conftest.c
22110 22110
 				-Wl,--version-script,conftest.map
22111 22111
 		       1>&5'
... ...
@@ -22115,14 +22116,30 @@ EOF
22115 22115
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22116 22116
   (exit $ac_status); }; };
22117 22117
   then
22118
+      VERSIONSCRIPTFLAG=--version-script
22118 22119
       ac_cv_ld_version_script=yes
22119 22120
   else
22120
-      ac_cv_ld_version_script=no
22121
+		if { ac_try='${CC-cc} $CFLAGS $pic_flag $LDFLAGS -shared
22122
+				-o conftest.so conftest.c
22123
+				-Wl,-M,conftest.map
22124
+			1>&5'
22125
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22126
+  (eval $ac_try) 2>&5
22127
+  ac_status=$?
22128
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
22129
+  (exit $ac_status); }; };
22130
+	then
22131
+		VERSIONSCRIPTFLAG=-M
22132
+		ac_cv_ld_version_script=yes;
22133
+	else
22134
+		ac_cv_ld_version_script=no
22135
+	fi
22121 22136
   fi
22122 22137
  rm -f conftest*
22123 22138
 fi
22124 22139
 { echo "$as_me:$LINENO: result: $ac_cv_ld_version_script" >&5
22125 22140
 echo "${ECHO_T}$ac_cv_ld_version_script" >&6; }
22141
+
22126 22142
  if test "x$ac_cv_ld_version_script" = "xyes"; then
22127 22143
   VERSIONSCRIPT_TRUE=
22128 22144
   VERSIONSCRIPT_FALSE='#'
... ...
@@ -26413,10 +26430,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26413 26413
 	 test ! -s conftest.err
26414 26414
        } && test -s conftest.$ac_objext; then
26415 26415
 
26416
-if grep emmeelle conftest.$ac_objext >/dev/null 2>&1 ; then
26416
+if ${GREP-grep} emmeelle conftest.$ac_objext >/dev/null 2>&1 ; then
26417 26417
 	ac_cv_c_fpu_bigendian=yes
26418 26418
 fi
26419
-if grep elleemme conftest.$ac_objext >/dev/null 2>&1 ; then
26419
+if ${GREP-grep} elleemme conftest.$ac_objext >/dev/null 2>&1 ; then
26420 26420
 	ac_cv_c_fpu_bigendian=no
26421 26421
 fi
26422 26422
 
... ...
@@ -27314,6 +27331,7 @@ LIBTOOL!$LIBTOOL$ac_delim
27314 27314
 MAINTAINER_MODE_TRUE!$MAINTAINER_MODE_TRUE$ac_delim
27315 27315
 MAINTAINER_MODE_FALSE!$MAINTAINER_MODE_FALSE$ac_delim
27316 27316
 MAINT!$MAINT$ac_delim
27317
+VERSIONSCRIPTFLAG!$VERSIONSCRIPTFLAG$ac_delim
27317 27318
 VERSIONSCRIPT_TRUE!$VERSIONSCRIPT_TRUE$ac_delim
27318 27319
 VERSIONSCRIPT_FALSE!$VERSIONSCRIPT_FALSE$ac_delim
27319 27320
 sendmailprog!$sendmailprog$ac_delim
... ...
@@ -27338,7 +27356,7 @@ LIBOBJS!$LIBOBJS$ac_delim
27338 27338
 LTLIBOBJS!$LTLIBOBJS$ac_delim
27339 27339
 _ACEOF
27340 27340
 
27341
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 35; then
27341
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 36; then
27342 27342
     break
27343 27343
   elif $ac_last_try; then
27344 27344
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
... ...
@@ -254,6 +254,7 @@ fi
254 254
 AC_MSG_RESULT($ZLIB_HOME)
255 255
 ])
256 256
 
257
+dnl check for version script support in the linker (GNU ld, or Solaris ld style)
257 258
 AC_CACHE_CHECK([for ld --version-script], [ac_cv_ld_version_script], [dnl
258 259
   cat > conftest.c <<EOF
259 260
 void cl_symbol1(void) {}
... ...
@@ -275,16 +276,29 @@ PRIVATE
275 275
 		*;
276 276
 };
277 277
 EOF
278
+  dnl check for GNU ld style linker version script
278 279
   if AC_TRY_COMMAND([${CC-cc} $CFLAGS $pic_flag $LDFLAGS -shared
279 280
 				-o conftest.so conftest.c
280 281
 				-Wl,--version-script,conftest.map
281 282
 		       1>&AS_MESSAGE_LOG_FD]);
282 283
   then
284
+      VERSIONSCRIPTFLAG=--version-script
283 285
       ac_cv_ld_version_script=yes
284 286
   else
285
-      ac_cv_ld_version_script=no
287
+	dnl check for Solaris ld style linker version script
288
+	if AC_TRY_COMMAND([${CC-cc} $CFLAGS $pic_flag $LDFLAGS -shared
289
+				-o conftest.so conftest.c
290
+				-Wl,-M,conftest.map
291
+			1>&AS_MESSAGE_LOG_FD]);
292
+	then
293
+		VERSIONSCRIPTFLAG=-M
294
+		ac_cv_ld_version_script=yes;
295
+	else
296
+		ac_cv_ld_version_script=no
297
+	fi
286 298
   fi
287 299
  rm -f conftest*])
300
+AC_SUBST(VERSIONSCRIPTFLAG)
288 301
 AM_CONDITIONAL(VERSIONSCRIPT, test "x$ac_cv_ld_version_script" = "xyes")
289 302
 
290 303
 AC_ARG_ENABLE(zlib-vcheck,
... ...
@@ -133,6 +133,7 @@ STRIP = @STRIP@
133 133
 THREAD_LIBS = @THREAD_LIBS@
134 134
 TH_SAFE = @TH_SAFE@
135 135
 VERSION = @VERSION@
136
+VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
136 137
 abs_builddir = @abs_builddir@
137 138
 abs_srcdir = @abs_srcdir@
138 139
 abs_top_builddir = @abs_top_builddir@
... ...
@@ -138,6 +138,7 @@ STRIP = @STRIP@
138 138
 THREAD_LIBS = @THREAD_LIBS@
139 139
 TH_SAFE = @TH_SAFE@
140 140
 VERSION = @VERSION@
141
+VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
141 142
 abs_builddir = @abs_builddir@
142 143
 abs_srcdir = @abs_srcdir@
143 144
 abs_top_builddir = @abs_top_builddir@
... ...
@@ -131,6 +131,7 @@ STRIP = @STRIP@
131 131
 THREAD_LIBS = @THREAD_LIBS@
132 132
 TH_SAFE = @TH_SAFE@
133 133
 VERSION = @VERSION@
134
+VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
134 135
 abs_builddir = @abs_builddir@
135 136
 abs_srcdir = @abs_srcdir@
136 137
 abs_top_builddir = @abs_top_builddir@
... ...
@@ -159,6 +159,7 @@ STRIP = @STRIP@
159 159
 THREAD_LIBS = @THREAD_LIBS@
160 160
 TH_SAFE = @TH_SAFE@
161 161
 VERSION = @VERSION@
162
+VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
162 163
 abs_builddir = @abs_builddir@
163 164
 abs_srcdir = @abs_srcdir@
164 165
 abs_top_builddir = @abs_top_builddir@
... ...
@@ -29,7 +29,7 @@ endif
29 29
 libclamav_la_LDFLAGS = @TH_SAFE@ -version-info @LIBCLAMAV_VERSION@ -no-undefined
30 30
 
31 31
 if VERSIONSCRIPT
32
-libclamav_la_LDFLAGS += -Wl,--version-script=@top_srcdir@/libclamav/libclamav.map
32
+libclamav_la_LDFLAGS += -Wl,@VERSIONSCRIPTFLAG@,@top_srcdir@/libclamav/libclamav.map
33 33
 endif
34 34
 
35 35
 include_HEADERS = clamav.h
... ...
@@ -180,8 +180,7 @@ libclamav_la_SOURCES = \
180 180
 	dconf.c \
181 181
 	dconf.h \
182 182
 	lzma_iface.c \
183
-	lzma_iface.h \
184
-	libclamav.map
183
+	lzma_iface.h
185 184
 
186 185
 libclamav_internal_utils_la_SOURCES=str.c \
187 186
 				    str.h \
... ...
@@ -194,4 +193,4 @@ libclamav_internal_utils_la_LDFLAGS=-static
194 194
 
195 195
 lib_LTLIBRARIES = libclamav.la
196 196
 noinst_LTLIBRARIES = libclamav_internal_utils.la
197
-EXTRA_DIST = regex/engine.c
197
+EXTRA_DIST = regex/engine.c libclamav.map
... ...
@@ -52,7 +52,7 @@ POST_UNINSTALL = :
52 52
 build_triplet = @build@
53 53
 host_triplet = @host@
54 54
 target_triplet = @target@
55
-@VERSIONSCRIPT_TRUE@am__append_1 = -Wl,--version-script=@top_srcdir@/libclamav/libclamav.map
55
+@VERSIONSCRIPT_TRUE@am__append_1 = -Wl,@VERSIONSCRIPTFLAG@,@top_srcdir@/libclamav/libclamav.map
56 56
 subdir = libclamav
57 57
 DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \
58 58
 	$(srcdir)/Makefile.in
... ...
@@ -200,6 +200,7 @@ STRIP = @STRIP@
200 200
 THREAD_LIBS = @THREAD_LIBS@
201 201
 TH_SAFE = @TH_SAFE@
202 202
 VERSION = @VERSION@
203
+VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
203 204
 abs_builddir = @abs_builddir@
204 205
 abs_srcdir = @abs_srcdir@
205 206
 abs_top_builddir = @abs_top_builddir@
... ...
@@ -409,8 +410,7 @@ libclamav_la_SOURCES = \
409 409
 	dconf.c \
410 410
 	dconf.h \
411 411
 	lzma_iface.c \
412
-	lzma_iface.h \
413
-	libclamav.map
412
+	lzma_iface.h
414 413
 
415 414
 libclamav_internal_utils_la_SOURCES = str.c \
416 415
 				    str.h \
... ...
@@ -422,7 +422,7 @@ libclamav_internal_utils_la_SOURCES = str.c \
422 422
 libclamav_internal_utils_la_LDFLAGS = -static
423 423
 lib_LTLIBRARIES = libclamav.la
424 424
 noinst_LTLIBRARIES = libclamav_internal_utils.la
425
-EXTRA_DIST = regex/engine.c
425
+EXTRA_DIST = regex/engine.c libclamav.map
426 426
 all: all-recursive
427 427
 
428 428
 .SUFFIXES:
... ...
@@ -148,4 +148,9 @@ int cli_versig(const char *md5, const char *dsig)
148 148
     cli_dbgmsg("cli_versig: Digital signature is correct.\n");
149 149
     return CL_SUCCESS;
150 150
 }
151
+#else
152
+/* since we are using linker version scripts, we must define all symbols listed in the .map,
153
+ * otherwise linking will fail (at least on Solaris).
154
+ * So here is a dummy definition for cli_decodesig.*/
155
+unsigned char *cli_decodesig() {}
151 156
 #endif
... ...
@@ -1,6 +1,26 @@
1 1
 CLAMAV_PUBLIC {
2 2
   global:
3
-    cl_*;
3
+    cl_build;
4
+    cl_cvdfree;
5
+    cl_cvdhead;
6
+    cl_cvdparse;
7
+    cl_cvdverify;
8
+    cl_debug;
9
+    cl_dup;
10
+    cl_free;
11
+    cl_load;
12
+    cl_loaddb;
13
+    cl_loaddbdir;
14
+    cl_retdbdir;
15
+    cl_retflevel;
16
+    cl_retver;
17
+    cl_scandesc;
18
+    cl_scanfile;
19
+    cl_settempdir;
20
+    cl_statchkdir;
21
+    cl_statfree;
22
+    cl_statinidir;
23
+    cl_strerror;
4 24
   local:
5 25
     *;
6 26
 };
... ...
@@ -38,7 +58,6 @@ CLAMAV_PRIVATE {
38 38
     cli_utf16toascii;
39 39
 
40 40
     cli_malloc;
41
-    cli_strtok_buf;
42 41
     cli_memstr;
43 42
     cli_strdup;
44 43
     cli_realloc;
... ...
@@ -151,6 +151,7 @@ STRIP = @STRIP@
151 151
 THREAD_LIBS = @THREAD_LIBS@
152 152
 TH_SAFE = @TH_SAFE@
153 153
 VERSION = @VERSION@
154
+VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
154 155
 abs_builddir = @abs_builddir@
155 156
 abs_srcdir = @abs_srcdir@
156 157
 abs_top_builddir = @abs_top_builddir@
... ...
@@ -8,6 +8,10 @@ INCLUDES = -I$(top_srcdir)
8 8
 
9 9
 libclamunrar_la_LDFLAGS = @TH_SAFE@ -version-info @LIBCLAMAV_VERSION@ -no-undefined
10 10
 
11
+if VERSIONSCRIPT
12
+libclamunrar_la_LDFLAGS += -Wl,@VERSIONSCRIPTFLAG@,@top_srcdir@/libclamunrar/libclamunrar.map
13
+endif
14
+
11 15
 libclamunrar_la_SOURCES = \
12 16
 	unrar15.c \
13 17
 	unrar20.h \
... ...
@@ -28,5 +32,5 @@ libclamunrar_la_SOURCES = \
28 28
 	unrarhlp.h
29 29
 
30 30
 lib_LTLIBRARIES = libclamunrar.la
31
-
31
+EXTRA_DIST = libclamunrar.map
32 32
 endif
... ...
@@ -37,6 +37,7 @@ POST_UNINSTALL = :
37 37
 build_triplet = @build@
38 38
 host_triplet = @host@
39 39
 target_triplet = @target@
40
+@ENABLE_UNRAR_TRUE@@VERSIONSCRIPT_TRUE@am__append_1 = -Wl,@VERSIONSCRIPTFLAG@,@top_srcdir@/libclamunrar/libclamunrar.map
40 41
 subdir = libclamunrar
41 42
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
42 43
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
... ...
@@ -154,6 +155,7 @@ STRIP = @STRIP@
154 154
 THREAD_LIBS = @THREAD_LIBS@
155 155
 TH_SAFE = @TH_SAFE@
156 156
 VERSION = @VERSION@
157
+VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
157 158
 abs_builddir = @abs_builddir@
158 159
 abs_srcdir = @abs_srcdir@
159 160
 abs_top_builddir = @abs_top_builddir@
... ...
@@ -211,7 +213,9 @@ target_vendor = @target_vendor@
211 211
 top_builddir = @top_builddir@
212 212
 top_srcdir = @top_srcdir@
213 213
 @ENABLE_UNRAR_TRUE@INCLUDES = -I$(top_srcdir)
214
-@ENABLE_UNRAR_TRUE@libclamunrar_la_LDFLAGS = @TH_SAFE@ -version-info @LIBCLAMAV_VERSION@ -no-undefined
214
+@ENABLE_UNRAR_TRUE@libclamunrar_la_LDFLAGS = @TH_SAFE@ -version-info \
215
+@ENABLE_UNRAR_TRUE@	@LIBCLAMAV_VERSION@ -no-undefined \
216
+@ENABLE_UNRAR_TRUE@	$(am__append_1)
215 217
 @ENABLE_UNRAR_TRUE@libclamunrar_la_SOURCES = \
216 218
 @ENABLE_UNRAR_TRUE@	unrar15.c \
217 219
 @ENABLE_UNRAR_TRUE@	unrar20.h \
... ...
@@ -232,6 +236,7 @@ top_srcdir = @top_srcdir@
232 232
 @ENABLE_UNRAR_TRUE@	unrarhlp.h
233 233
 
234 234
 @ENABLE_UNRAR_TRUE@lib_LTLIBRARIES = libclamunrar.la
235
+@ENABLE_UNRAR_TRUE@EXTRA_DIST = libclamunrar.map
235 236
 all: all-am
236 237
 
237 238
 .SUFFIXES:
238 239
new file mode 100644
... ...
@@ -0,0 +1,10 @@
0
+CLAMAV_PRIVATE_UNRAR {
1
+	global:
2
+		ppm_constructor;
3
+		ppm_destructor;
4
+		rar_init_filters;
5
+                rar_unpack;
6
+                rarvm_free;
7
+	local:
8
+		*;
9
+};
... ...
@@ -10,10 +10,14 @@ libclamunrar_iface_la_LIBADD = $(top_builddir)/libclamunrar/libclamunrar.la
10 10
 
11 11
 libclamunrar_iface_la_LDFLAGS = @TH_SAFE@ -version-info @LIBCLAMAV_VERSION@ -no-undefined
12 12
 
13
+if VERSIONSCRIPT
14
+libclamunrar_iface_la_LDFLAGS += -Wl,@VERSIONSCRIPTFLAG@,@top_srcdir@/libclamunrar_iface/libclamunrar_iface.map
15
+endif
16
+
13 17
 libclamunrar_iface_la_SOURCES = \
14 18
 	unrar_iface.c \
15 19
 	unrar_iface.h
16 20
 
17 21
 lib_LTLIBRARIES = libclamunrar_iface.la
18
-
22
+EXTRA_DIST = libclamunrar_iface.map
19 23
 endif
... ...
@@ -37,6 +37,7 @@ POST_UNINSTALL = :
37 37
 build_triplet = @build@
38 38
 host_triplet = @host@
39 39
 target_triplet = @target@
40
+@ENABLE_UNRAR_TRUE@@VERSIONSCRIPT_TRUE@am__append_1 = -Wl,@VERSIONSCRIPTFLAG@,@top_srcdir@/libclamunrar_iface/unrar_iface.map
40 41
 subdir = libclamunrar_iface
41 42
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
42 43
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
... ...
@@ -149,6 +150,7 @@ STRIP = @STRIP@
149 149
 THREAD_LIBS = @THREAD_LIBS@
150 150
 TH_SAFE = @TH_SAFE@
151 151
 VERSION = @VERSION@
152
+VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
152 153
 abs_builddir = @abs_builddir@
153 154
 abs_srcdir = @abs_srcdir@
154 155
 abs_top_builddir = @abs_top_builddir@
... ...
@@ -207,12 +209,15 @@ top_builddir = @top_builddir@
207 207
 top_srcdir = @top_srcdir@
208 208
 @ENABLE_UNRAR_TRUE@INCLUDES = -I$(top_srcdir)
209 209
 @ENABLE_UNRAR_TRUE@libclamunrar_iface_la_LIBADD = $(top_builddir)/libclamunrar/libclamunrar.la
210
-@ENABLE_UNRAR_TRUE@libclamunrar_iface_la_LDFLAGS = @TH_SAFE@ -version-info @LIBCLAMAV_VERSION@ -no-undefined
210
+@ENABLE_UNRAR_TRUE@libclamunrar_iface_la_LDFLAGS = @TH_SAFE@ \
211
+@ENABLE_UNRAR_TRUE@	-version-info @LIBCLAMAV_VERSION@ \
212
+@ENABLE_UNRAR_TRUE@	-no-undefined $(am__append_1)
211 213
 @ENABLE_UNRAR_TRUE@libclamunrar_iface_la_SOURCES = \
212 214
 @ENABLE_UNRAR_TRUE@	unrar_iface.c \
213 215
 @ENABLE_UNRAR_TRUE@	unrar_iface.h
214 216
 
215 217
 @ENABLE_UNRAR_TRUE@lib_LTLIBRARIES = libclamunrar_iface.la
218
+@ENABLE_UNRAR_TRUE@EXTRA_DIST = libclamunrar_iface.map
216 219
 all: all-am
217 220
 
218 221
 .SUFFIXES:
219 222
new file mode 100644
... ...
@@ -0,0 +1,9 @@
0
+CLAMAV_PRIVATE {
1
+	global:
2
+		unrar_open;
3
+		unrar_extract_next;
4
+		unrar_extract_next_prepare;
5
+		unrar_close;
6
+	local:
7
+		*;
8
+};
... ...
@@ -158,6 +158,7 @@ STRIP = @STRIP@
158 158
 THREAD_LIBS = @THREAD_LIBS@
159 159
 TH_SAFE = @TH_SAFE@
160 160
 VERSION = @VERSION@
161
+VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
161 162
 abs_builddir = @abs_builddir@
162 163
 abs_srcdir = @abs_srcdir@
163 164
 abs_top_builddir = @abs_top_builddir@