Browse code

reorganize the NodalCore code and add support for runtime detection and loading of the acceleration library

git-svn: trunk@2528

Tomasz Kojm authored on 2006/12/02 09:09:02
Showing 12 changed files
... ...
@@ -1,3 +1,9 @@
1
+Sat Dec  2 01:02:45 CET 2006 (tk)
2
+---------------------------------
3
+  * libclamav: reorganize the NodalCore code and add support for runtime
4
+	       detection and loading of the acceleration library; based on
5
+	       patch from Peter Duthie <peter.duthie*sensorynetworks.com>
6
+
1 7
 Thu Nov 30 09:35:46 GMT 2006 (njh)
2 8
 ----------------------------------
3 9
   * libclamav/mbox.c:	Fix compilation errors when SAVE_TO_DISC is not defined
... ...
@@ -168,7 +168,7 @@
168 168
 /* Define to 1 if you have a working `mmap' system call. */
169 169
 #undef HAVE_MMAP
170 170
 
171
-/* hardware acceleration */
171
+/* Support for NodalCore acceleration */
172 172
 #undef HAVE_NCORE
173 173
 
174 174
 /* Define to 1 if you have the <ndir.h> header file. */
... ...
@@ -1,6 +1,6 @@
1 1
 #! /bin/sh
2 2
 # Guess values for system-dependent variables and create Makefiles.
3
-# Generated by GNU Autoconf 2.60a.
3
+# Generated by GNU Autoconf 2.61.
4 4
 #
5 5
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6 6
 # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
... ...
@@ -10,7 +10,8 @@
10 10
 ## M4sh Initialization.  ##
11 11
 ## --------------------- ##
12 12
 
13
-# Be Bourne compatible
13
+# Be more Bourne compatible
14
+DUALCASE=1; export DUALCASE # for MKS sh
14 15
 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15 16
   emulate sh
16 17
   NULLCMD=:
... ...
@@ -19,10 +20,13 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19 19
   alias -g '${1+"$@"}'='"$@"'
20 20
   setopt NO_GLOB_SUBST
21 21
 else
22
-  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
22
+  case `(set -o) 2>/dev/null` in
23
+  *posix*) set -o posix ;;
24
+esac
25
+
23 26
 fi
24
-BIN_SH=xpg4; export BIN_SH # for Tru64
25
-DUALCASE=1; export DUALCASE # for MKS sh
27
+
28
+
26 29
 
27 30
 
28 31
 # PATH needs CR
... ...
@@ -215,7 +219,7 @@ test \$exitcode = 0) || { (exit 1); exit 1; }
215 215
 else
216 216
   as_candidate_shells=
217 217
     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
218
-for as_dir in /usr/bin/posix$PATH_SEPARATOR/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
218
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219 219
 do
220 220
   IFS=$as_save_IFS
221 221
   test -z "$as_dir" && as_dir=.
... ...
@@ -233,7 +237,6 @@ IFS=$as_save_IFS
233 233
 	 # Try only shells that exist, to save several forks.
234 234
 	 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
235 235
 		{ ("$as_shell") 2> /dev/null <<\_ASEOF
236
-# Be Bourne compatible
237 236
 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
238 237
   emulate sh
239 238
   NULLCMD=:
... ...
@@ -242,10 +245,12 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
242 242
   alias -g '${1+"$@"}'='"$@"'
243 243
   setopt NO_GLOB_SUBST
244 244
 else
245
-  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
245
+  case `(set -o) 2>/dev/null` in
246
+  *posix*) set -o posix ;;
247
+esac
248
+
246 249
 fi
247
-BIN_SH=xpg4; export BIN_SH # for Tru64
248
-DUALCASE=1; export DUALCASE # for MKS sh
250
+
249 251
 
250 252
 :
251 253
 _ASEOF
... ...
@@ -253,7 +258,6 @@ _ASEOF
253 253
   CONFIG_SHELL=$as_shell
254 254
 	       as_have_required=yes
255 255
 	       if { "$as_shell" 2> /dev/null <<\_ASEOF
256
-# Be Bourne compatible
257 256
 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
258 257
   emulate sh
259 258
   NULLCMD=:
... ...
@@ -262,10 +266,12 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
262 262
   alias -g '${1+"$@"}'='"$@"'
263 263
   setopt NO_GLOB_SUBST
264 264
 else
265
-  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
265
+  case `(set -o) 2>/dev/null` in
266
+  *posix*) set -o posix ;;
267
+esac
268
+
266 269
 fi
267
-BIN_SH=xpg4; export BIN_SH # for Tru64
268
-DUALCASE=1; export DUALCASE # for MKS sh
270
+
269 271
 
270 272
 :
271 273
 (as_func_return () {
... ...
@@ -512,19 +518,28 @@ else
512 512
   as_mkdir_p=false
513 513
 fi
514 514
 
515
-# Find out whether ``test -x'' works.  Don't use a zero-byte file, as
516
-# systems may use methods other than mode bits to determine executability.
517
-cat >conf$$.file <<_ASEOF
518
-#! /bin/sh
519
-exit 0
520
-_ASEOF
521
-chmod +x conf$$.file
522
-if test -x conf$$.file >/dev/null 2>&1; then
523
-  as_executable_p="test -x"
515
+if test -x / >/dev/null 2>&1; then
516
+  as_test_x='test -x'
524 517
 else
525
-  as_executable_p=:
518
+  if ls -dL / >/dev/null 2>&1; then
519
+    as_ls_L_option=L
520
+  else
521
+    as_ls_L_option=
522
+  fi
523
+  as_test_x='
524
+    eval sh -c '\''
525
+      if test -d "$1"; then
526
+        test -d "$1/.";
527
+      else
528
+	case $1 in
529
+        -*)set "./$1";;
530
+	esac;
531
+	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
532
+	???[sx]*):;;*)false;;esac;fi
533
+    '\'' sh
534
+  '
526 535
 fi
527
-rm -f conf$$.file
536
+as_executable_p=$as_test_x
528 537
 
529 538
 # Sed expression to map a string onto a valid CPP name.
530 539
 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
... ...
@@ -879,6 +894,7 @@ target_alias
879 879
 CC
880 880
 CFLAGS
881 881
 LDFLAGS
882
+LIBS
882 883
 CPPFLAGS
883 884
 CPP'
884 885
 
... ...
@@ -986,10 +1002,10 @@ do
986 986
   -disable-* | --disable-*)
987 987
     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
988 988
     # Reject names that are not valid shell variable names.
989
-    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
989
+    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
990 990
       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
991 991
    { (exit 1); exit 1; }; }
992
-    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
992
+    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
993 993
     eval enable_$ac_feature=no ;;
994 994
 
995 995
   -docdir | --docdir | --docdi | --doc | --do)
... ...
@@ -1005,10 +1021,10 @@ do
1005 1005
   -enable-* | --enable-*)
1006 1006
     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1007 1007
     # Reject names that are not valid shell variable names.
1008
-    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
1008
+    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1009 1009
       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
1010 1010
    { (exit 1); exit 1; }; }
1011
-    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
1011
+    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
1012 1012
     eval enable_$ac_feature=\$ac_optarg ;;
1013 1013
 
1014 1014
   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
... ...
@@ -1202,19 +1218,19 @@ do
1202 1202
   -with-* | --with-*)
1203 1203
     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1204 1204
     # Reject names that are not valid shell variable names.
1205
-    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
1205
+    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1206 1206
       { echo "$as_me: error: invalid package name: $ac_package" >&2
1207 1207
    { (exit 1); exit 1; }; }
1208
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
1208
+    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1209 1209
     eval with_$ac_package=\$ac_optarg ;;
1210 1210
 
1211 1211
   -without-* | --without-*)
1212 1212
     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1213 1213
     # Reject names that are not valid shell variable names.
1214
-    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
1214
+    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1215 1215
       { echo "$as_me: error: invalid package name: $ac_package" >&2
1216 1216
    { (exit 1); exit 1; }; }
1217
-    ac_package=`echo $ac_package | sed 's/-/_/g'`
1217
+    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1218 1218
     eval with_$ac_package=no ;;
1219 1219
 
1220 1220
   --x)
... ...
@@ -1509,6 +1525,7 @@ Some influential environment variables:
1509 1509
   CFLAGS      C compiler flags
1510 1510
   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1511 1511
               nonstandard directory <lib dir>
1512
+  LIBS        libraries to pass to the linker, e.g. -l<library>
1512 1513
   CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1513 1514
               you have headers in a nonstandard directory <include dir>
1514 1515
   CPP         C preprocessor
... ...
@@ -1577,7 +1594,7 @@ test -n "$ac_init_help" && exit $ac_status
1577 1577
 if $ac_init_version; then
1578 1578
   cat <<\_ACEOF
1579 1579
 configure
1580
-generated by GNU Autoconf 2.60a
1580
+generated by GNU Autoconf 2.61
1581 1581
 
1582 1582
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
1583 1583
 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
... ...
@@ -1591,7 +1608,7 @@ This file contains any messages produced by compilers while
1591 1591
 running configure, to aid debugging if configure makes a mistake.
1592 1592
 
1593 1593
 It was created by $as_me, which was
1594
-generated by GNU Autoconf 2.60a.  Invocation command line was
1594
+generated by GNU Autoconf 2.61.  Invocation command line was
1595 1595
 
1596 1596
   $ $0 $@
1597 1597
 
... ...
@@ -2316,7 +2333,7 @@ case $as_dir/ in
2316 2316
     # by default.
2317 2317
     for ac_prog in ginstall scoinst install; do
2318 2318
       for ac_exec_ext in '' $ac_executable_extensions; do
2319
-	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; }; then
2319
+	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
2320 2320
 	  if test $ac_prog = install &&
2321 2321
 	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2322 2322
 	    # AIX install.  It has an incompatible calling convention.
... ...
@@ -2482,7 +2499,7 @@ do
2482 2482
   IFS=$as_save_IFS
2483 2483
   test -z "$as_dir" && as_dir=.
2484 2484
   for ac_exec_ext in '' $ac_executable_extensions; do
2485
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
2485
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2486 2486
     ac_cv_prog_AWK="$ac_prog"
2487 2487
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2488 2488
     break 2
... ...
@@ -2617,7 +2634,7 @@ do
2617 2617
   IFS=$as_save_IFS
2618 2618
   test -z "$as_dir" && as_dir=.
2619 2619
   for ac_exec_ext in '' $ac_executable_extensions; do
2620
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
2620
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2621 2621
     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2622 2622
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2623 2623
     break 2
... ...
@@ -2657,7 +2674,7 @@ do
2657 2657
   IFS=$as_save_IFS
2658 2658
   test -z "$as_dir" && as_dir=.
2659 2659
   for ac_exec_ext in '' $ac_executable_extensions; do
2660
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
2660
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2661 2661
     ac_cv_prog_ac_ct_STRIP="strip"
2662 2662
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2663 2663
     break 2
... ...
@@ -2738,7 +2755,7 @@ do
2738 2738
   IFS=$as_save_IFS
2739 2739
   test -z "$as_dir" && as_dir=.
2740 2740
   for ac_exec_ext in '' $ac_executable_extensions; do
2741
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
2741
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2742 2742
     ac_cv_prog_AWK="$ac_prog"
2743 2743
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2744 2744
     break 2
... ...
@@ -2784,7 +2801,7 @@ do
2784 2784
   IFS=$as_save_IFS
2785 2785
   test -z "$as_dir" && as_dir=.
2786 2786
   for ac_exec_ext in '' $ac_executable_extensions; do
2787
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
2787
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2788 2788
     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2789 2789
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2790 2790
     break 2
... ...
@@ -2824,7 +2841,7 @@ do
2824 2824
   IFS=$as_save_IFS
2825 2825
   test -z "$as_dir" && as_dir=.
2826 2826
   for ac_exec_ext in '' $ac_executable_extensions; do
2827
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
2827
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2828 2828
     ac_cv_prog_ac_ct_CC="gcc"
2829 2829
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2830 2830
     break 2
... ...
@@ -2881,7 +2898,7 @@ do
2881 2881
   IFS=$as_save_IFS
2882 2882
   test -z "$as_dir" && as_dir=.
2883 2883
   for ac_exec_ext in '' $ac_executable_extensions; do
2884
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
2884
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2885 2885
     ac_cv_prog_CC="${ac_tool_prefix}cc"
2886 2886
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2887 2887
     break 2
... ...
@@ -2922,7 +2939,7 @@ do
2922 2922
   IFS=$as_save_IFS
2923 2923
   test -z "$as_dir" && as_dir=.
2924 2924
   for ac_exec_ext in '' $ac_executable_extensions; do
2925
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
2925
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2926 2926
     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2927 2927
        ac_prog_rejected=yes
2928 2928
        continue
... ...
@@ -2980,7 +2997,7 @@ do
2980 2980
   IFS=$as_save_IFS
2981 2981
   test -z "$as_dir" && as_dir=.
2982 2982
   for ac_exec_ext in '' $ac_executable_extensions; do
2983
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
2983
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2984 2984
     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2985 2985
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2986 2986
     break 2
... ...
@@ -3024,7 +3041,7 @@ do
3024 3024
   IFS=$as_save_IFS
3025 3025
   test -z "$as_dir" && as_dir=.
3026 3026
   for ac_exec_ext in '' $ac_executable_extensions; do
3027
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
3027
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3028 3028
     ac_cv_prog_ac_ct_CC="$ac_prog"
3029 3029
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3030 3030
     break 2
... ...
@@ -3387,27 +3404,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3387 3387
   rm -f conftest.er1
3388 3388
   cat conftest.err >&5
3389 3389
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3390
-  (exit $ac_status); } &&
3391
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3392
-  { (case "(($ac_try" in
3393
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3394
-  *) ac_try_echo=$ac_try;;
3395
-esac
3396
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3397
-  (eval "$ac_try") 2>&5
3398
-  ac_status=$?
3399
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3400
-  (exit $ac_status); }; } &&
3401
-	 { ac_try='test -s conftest.$ac_objext'
3402
-  { (case "(($ac_try" in
3403
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3404
-  *) ac_try_echo=$ac_try;;
3405
-esac
3406
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3407
-  (eval "$ac_try") 2>&5
3408
-  ac_status=$?
3409
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3410
-  (exit $ac_status); }; }; then
3390
+  (exit $ac_status); } && {
3391
+	 test -z "$ac_c_werror_flag" ||
3392
+	 test ! -s conftest.err
3393
+       } && test -s conftest.$ac_objext; then
3411 3394
   ac_compiler_gnu=yes
3412 3395
 else
3413 3396
   echo "$as_me: failed program was:" >&5
... ...
@@ -3462,27 +3462,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3462 3462
   rm -f conftest.er1
3463 3463
   cat conftest.err >&5
3464 3464
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3465
-  (exit $ac_status); } &&
3466
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3467
-  { (case "(($ac_try" in
3468
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3469
-  *) ac_try_echo=$ac_try;;
3470
-esac
3471
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3472
-  (eval "$ac_try") 2>&5
3473
-  ac_status=$?
3474
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3475
-  (exit $ac_status); }; } &&
3476
-	 { ac_try='test -s conftest.$ac_objext'
3477
-  { (case "(($ac_try" in
3478
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3479
-  *) ac_try_echo=$ac_try;;
3480
-esac
3481
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3482
-  (eval "$ac_try") 2>&5
3483
-  ac_status=$?
3484
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3485
-  (exit $ac_status); }; }; then
3465
+  (exit $ac_status); } && {
3466
+	 test -z "$ac_c_werror_flag" ||
3467
+	 test ! -s conftest.err
3468
+       } && test -s conftest.$ac_objext; then
3486 3469
   ac_cv_prog_cc_g=yes
3487 3470
 else
3488 3471
   echo "$as_me: failed program was:" >&5
... ...
@@ -3517,27 +3500,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3517 3517
   rm -f conftest.er1
3518 3518
   cat conftest.err >&5
3519 3519
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3520
-  (exit $ac_status); } &&
3521
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3522
-  { (case "(($ac_try" in
3523
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3524
-  *) ac_try_echo=$ac_try;;
3525
-esac
3526
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3527
-  (eval "$ac_try") 2>&5
3528
-  ac_status=$?
3529
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3530
-  (exit $ac_status); }; } &&
3531
-	 { ac_try='test -s conftest.$ac_objext'
3532
-  { (case "(($ac_try" in
3533
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3534
-  *) ac_try_echo=$ac_try;;
3535
-esac
3536
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3537
-  (eval "$ac_try") 2>&5
3538
-  ac_status=$?
3539
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3540
-  (exit $ac_status); }; }; then
3520
+  (exit $ac_status); } && {
3521
+	 test -z "$ac_c_werror_flag" ||
3522
+	 test ! -s conftest.err
3523
+       } && test -s conftest.$ac_objext; then
3541 3524
   :
3542 3525
 else
3543 3526
   echo "$as_me: failed program was:" >&5
... ...
@@ -3573,27 +3539,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3573 3573
   rm -f conftest.er1
3574 3574
   cat conftest.err >&5
3575 3575
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3576
-  (exit $ac_status); } &&
3577
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3578
-  { (case "(($ac_try" in
3579
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3580
-  *) ac_try_echo=$ac_try;;
3581
-esac
3582
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3583
-  (eval "$ac_try") 2>&5
3584
-  ac_status=$?
3585
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3586
-  (exit $ac_status); }; } &&
3587
-	 { ac_try='test -s conftest.$ac_objext'
3588
-  { (case "(($ac_try" in
3589
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3590
-  *) ac_try_echo=$ac_try;;
3591
-esac
3592
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3593
-  (eval "$ac_try") 2>&5
3594
-  ac_status=$?
3595
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3596
-  (exit $ac_status); }; }; then
3576
+  (exit $ac_status); } && {
3577
+	 test -z "$ac_c_werror_flag" ||
3578
+	 test ! -s conftest.err
3579
+       } && test -s conftest.$ac_objext; then
3597 3580
   ac_cv_prog_cc_g=yes
3598 3581
 else
3599 3582
   echo "$as_me: failed program was:" >&5
... ...
@@ -3709,27 +3658,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3709 3709
   rm -f conftest.er1
3710 3710
   cat conftest.err >&5
3711 3711
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3712
-  (exit $ac_status); } &&
3713
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3714
-  { (case "(($ac_try" in
3715
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3716
-  *) ac_try_echo=$ac_try;;
3717
-esac
3718
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3719
-  (eval "$ac_try") 2>&5
3720
-  ac_status=$?
3721
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3722
-  (exit $ac_status); }; } &&
3723
-	 { ac_try='test -s conftest.$ac_objext'
3724
-  { (case "(($ac_try" in
3725
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3726
-  *) ac_try_echo=$ac_try;;
3727
-esac
3728
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3729
-  (eval "$ac_try") 2>&5
3730
-  ac_status=$?
3731
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3732
-  (exit $ac_status); }; }; then
3712
+  (exit $ac_status); } && {
3713
+	 test -z "$ac_c_werror_flag" ||
3714
+	 test ! -s conftest.err
3715
+       } && test -s conftest.$ac_objext; then
3733 3716
   ac_cv_prog_cc_c89=$ac_arg
3734 3717
 else
3735 3718
   echo "$as_me: failed program was:" >&5
... ...
@@ -3976,7 +3908,7 @@ case $as_dir/ in
3976 3976
     # by default.
3977 3977
     for ac_prog in ginstall scoinst install; do
3978 3978
       for ac_exec_ext in '' $ac_executable_extensions; do
3979
-	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; }; then
3979
+	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3980 3980
 	  if test $ac_prog = install &&
3981 3981
 	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3982 3982
 	    # AIX install.  It has an incompatible calling convention.
... ...
@@ -4496,7 +4428,7 @@ do
4496 4496
   for ac_prog in grep ggrep; do
4497 4497
   for ac_exec_ext in '' $ac_executable_extensions; do
4498 4498
     ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4499
-    { test -f "$ac_path_GREP" && $as_executable_p "$ac_path_GREP"; } || continue
4499
+    { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4500 4500
     # Check for GNU ac_path_GREP and select it if it is found.
4501 4501
   # Check for GNU $ac_path_GREP
4502 4502
 case `"$ac_path_GREP" --version 2>&1` in
... ...
@@ -4578,7 +4510,7 @@ do
4578 4578
   for ac_prog in egrep; do
4579 4579
   for ac_exec_ext in '' $ac_executable_extensions; do
4580 4580
     ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4581
-    { test -f "$ac_path_EGREP" && $as_executable_p "$ac_path_EGREP"; } || continue
4581
+    { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4582 4582
     # Check for GNU ac_path_EGREP and select it if it is found.
4583 4583
   # Check for GNU $ac_path_EGREP
4584 4584
 case `"$ac_path_EGREP" --version 2>&1` in
... ...
@@ -4888,17 +4820,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4888 4888
   rm -f conftest.er1
4889 4889
   cat conftest.err >&5
4890 4890
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4891
-  (exit $ac_status); } >/dev/null; then
4892
-  if test -s conftest.err; then
4893
-    ac_cpp_err=$ac_c_preproc_warn_flag
4894
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4895
-  else
4896
-    ac_cpp_err=
4897
-  fi
4898
-else
4899
-  ac_cpp_err=yes
4900
-fi
4901
-if test -z "$ac_cpp_err"; then
4891
+  (exit $ac_status); } >/dev/null && {
4892
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4893
+	 test ! -s conftest.err
4894
+       }; then
4902 4895
   :
4903 4896
 else
4904 4897
   echo "$as_me: failed program was:" >&5
... ...
@@ -4932,17 +4857,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4932 4932
   rm -f conftest.er1
4933 4933
   cat conftest.err >&5
4934 4934
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4935
-  (exit $ac_status); } >/dev/null; then
4936
-  if test -s conftest.err; then
4937
-    ac_cpp_err=$ac_c_preproc_warn_flag
4938
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4939
-  else
4940
-    ac_cpp_err=
4941
-  fi
4942
-else
4943
-  ac_cpp_err=yes
4944
-fi
4945
-if test -z "$ac_cpp_err"; then
4935
+  (exit $ac_status); } >/dev/null && {
4936
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4937
+	 test ! -s conftest.err
4938
+       }; then
4946 4939
   # Broken: success on invalid input.
4947 4940
 continue
4948 4941
 else
... ...
@@ -5007,17 +4925,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5007 5007
   rm -f conftest.er1
5008 5008
   cat conftest.err >&5
5009 5009
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5010
-  (exit $ac_status); } >/dev/null; then
5011
-  if test -s conftest.err; then
5012
-    ac_cpp_err=$ac_c_preproc_warn_flag
5013
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5014
-  else
5015
-    ac_cpp_err=
5016
-  fi
5017
-else
5018
-  ac_cpp_err=yes
5019
-fi
5020
-if test -z "$ac_cpp_err"; then
5010
+  (exit $ac_status); } >/dev/null && {
5011
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5012
+	 test ! -s conftest.err
5013
+       }; then
5021 5014
   :
5022 5015
 else
5023 5016
   echo "$as_me: failed program was:" >&5
... ...
@@ -5051,17 +4962,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5051 5051
   rm -f conftest.er1
5052 5052
   cat conftest.err >&5
5053 5053
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5054
-  (exit $ac_status); } >/dev/null; then
5055
-  if test -s conftest.err; then
5056
-    ac_cpp_err=$ac_c_preproc_warn_flag
5057
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5058
-  else
5059
-    ac_cpp_err=
5060
-  fi
5061
-else
5062
-  ac_cpp_err=yes
5063
-fi
5064
-if test -z "$ac_cpp_err"; then
5054
+  (exit $ac_status); } >/dev/null && {
5055
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5056
+	 test ! -s conftest.err
5057
+       }; then
5065 5058
   # Broken: success on invalid input.
5066 5059
 continue
5067 5060
 else
... ...
@@ -5132,27 +5036,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5132 5132
   rm -f conftest.er1
5133 5133
   cat conftest.err >&5
5134 5134
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5135
-  (exit $ac_status); } &&
5136
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5137
-  { (case "(($ac_try" in
5138
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5139
-  *) ac_try_echo=$ac_try;;
5140
-esac
5141
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5142
-  (eval "$ac_try") 2>&5
5143
-  ac_status=$?
5144
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5145
-  (exit $ac_status); }; } &&
5146
-	 { ac_try='test -s conftest.$ac_objext'
5147
-  { (case "(($ac_try" in
5148
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5149
-  *) ac_try_echo=$ac_try;;
5150
-esac
5151
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5152
-  (eval "$ac_try") 2>&5
5153
-  ac_status=$?
5154
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5155
-  (exit $ac_status); }; }; then
5135
+  (exit $ac_status); } && {
5136
+	 test -z "$ac_c_werror_flag" ||
5137
+	 test ! -s conftest.err
5138
+       } && test -s conftest.$ac_objext; then
5156 5139
   ac_cv_header_stdc=yes
5157 5140
 else
5158 5141
   echo "$as_me: failed program was:" >&5
... ...
@@ -5328,27 +5215,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5328 5328
   rm -f conftest.er1
5329 5329
   cat conftest.err >&5
5330 5330
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5331
-  (exit $ac_status); } &&
5332
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5333
-  { (case "(($ac_try" in
5334
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5335
-  *) ac_try_echo=$ac_try;;
5336
-esac
5337
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5338
-  (eval "$ac_try") 2>&5
5339
-  ac_status=$?
5340
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5341
-  (exit $ac_status); }; } &&
5342
-	 { ac_try='test -s conftest.$ac_objext'
5343
-  { (case "(($ac_try" in
5344
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5345
-  *) ac_try_echo=$ac_try;;
5346
-esac
5347
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5348
-  (eval "$ac_try") 2>&5
5349
-  ac_status=$?
5350
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5351
-  (exit $ac_status); }; }; then
5331
+  (exit $ac_status); } && {
5332
+	 test -z "$ac_c_werror_flag" ||
5333
+	 test ! -s conftest.err
5334
+       } && test -s conftest.$ac_objext; then
5352 5335
   eval "$as_ac_Header=yes"
5353 5336
 else
5354 5337
   echo "$as_me: failed program was:" >&5
... ...
@@ -5411,27 +5281,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5411 5411
   rm -f conftest.er1
5412 5412
   cat conftest.err >&5
5413 5413
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5414
-  (exit $ac_status); } &&
5415
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5416
-  { (case "(($ac_try" in
5417
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5418
-  *) ac_try_echo=$ac_try;;
5419
-esac
5420
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5421
-  (eval "$ac_try") 2>&5
5422
-  ac_status=$?
5423
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5424
-  (exit $ac_status); }; } &&
5425
-	 { ac_try='test -s conftest.$ac_objext'
5426
-  { (case "(($ac_try" in
5427
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5428
-  *) ac_try_echo=$ac_try;;
5429
-esac
5430
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5431
-  (eval "$ac_try") 2>&5
5432
-  ac_status=$?
5433
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5434
-  (exit $ac_status); }; }; then
5414
+  (exit $ac_status); } && {
5415
+	 test -z "$ac_c_werror_flag" ||
5416
+	 test ! -s conftest.err
5417
+       } && test -s conftest.$ac_objext; then
5435 5418
   ac_header_compiler=yes
5436 5419
 else
5437 5420
   echo "$as_me: failed program was:" >&5
... ...
@@ -5467,17 +5320,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5467 5467
   rm -f conftest.er1
5468 5468
   cat conftest.err >&5
5469 5469
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5470
-  (exit $ac_status); } >/dev/null; then
5471
-  if test -s conftest.err; then
5472
-    ac_cpp_err=$ac_c_preproc_warn_flag
5473
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5474
-  else
5475
-    ac_cpp_err=
5476
-  fi
5477
-else
5478
-  ac_cpp_err=yes
5479
-fi
5480
-if test -z "$ac_cpp_err"; then
5470
+  (exit $ac_status); } >/dev/null && {
5471
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5472
+	 test ! -s conftest.err
5473
+       }; then
5481 5474
   ac_header_preproc=yes
5482 5475
 else
5483 5476
   echo "$as_me: failed program was:" >&5
... ...
@@ -5696,7 +5542,7 @@ do
5696 5696
   IFS=$as_save_IFS
5697 5697
   test -z "$as_dir" && as_dir=.
5698 5698
   for ac_exec_ext in '' $ac_executable_extensions; do
5699
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
5699
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5700 5700
     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5701 5701
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5702 5702
     break 2
... ...
@@ -5736,7 +5582,7 @@ do
5736 5736
   IFS=$as_save_IFS
5737 5737
   test -z "$as_dir" && as_dir=.
5738 5738
   for ac_exec_ext in '' $ac_executable_extensions; do
5739
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
5739
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5740 5740
     ac_cv_prog_ac_ct_RANLIB="ranlib"
5741 5741
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5742 5742
     break 2
... ...
@@ -5792,7 +5638,7 @@ do
5792 5792
   IFS=$as_save_IFS
5793 5793
   test -z "$as_dir" && as_dir=.
5794 5794
   for ac_exec_ext in '' $ac_executable_extensions; do
5795
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
5795
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5796 5796
     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
5797 5797
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5798 5798
     break 2
... ...
@@ -5832,7 +5678,7 @@ do
5832 5832
   IFS=$as_save_IFS
5833 5833
   test -z "$as_dir" && as_dir=.
5834 5834
   for ac_exec_ext in '' $ac_executable_extensions; do
5835
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
5835
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5836 5836
     ac_cv_prog_ac_ct_STRIP="strip"
5837 5837
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5838 5838
     break 2
... ...
@@ -5887,7 +5733,7 @@ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
5887 5887
 case $host in
5888 5888
 *-*-irix6*)
5889 5889
   # Find out which ABI we are using.
5890
-  echo '#line 5890 "configure"' > conftest.$ac_ext
5890
+  echo '#line 5736 "configure"' > conftest.$ac_ext
5891 5891
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5892 5892
   (eval $ac_compile) 2>&5
5893 5893
   ac_status=$?
... ...
@@ -5970,27 +5816,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5970 5970
   rm -f conftest.er1
5971 5971
   cat conftest.err >&5
5972 5972
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5973
-  (exit $ac_status); } &&
5974
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5975
-  { (case "(($ac_try" in
5976
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5977
-  *) ac_try_echo=$ac_try;;
5978
-esac
5979
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5980
-  (eval "$ac_try") 2>&5
5981
-  ac_status=$?
5982
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5983
-  (exit $ac_status); }; } &&
5984
-	 { ac_try='test -s conftest$ac_exeext'
5985
-  { (case "(($ac_try" in
5986
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5987
-  *) ac_try_echo=$ac_try;;
5988
-esac
5989
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5990
-  (eval "$ac_try") 2>&5
5991
-  ac_status=$?
5992
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5993
-  (exit $ac_status); }; }; then
5973
+  (exit $ac_status); } && {
5974
+	 test -z "$ac_c_werror_flag" ||
5975
+	 test ! -s conftest.err
5976
+       } && test -s conftest$ac_exeext &&
5977
+       $as_test_x conftest$ac_exeext; then
5994 5978
   lt_cv_cc_needs_belf=yes
5995 5979
 else
5996 5980
   echo "$as_me: failed program was:" >&5
... ...
@@ -6332,27 +6162,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6332 6332
   rm -f conftest.er1
6333 6333
   cat conftest.err >&5
6334 6334
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6335
-  (exit $ac_status); } &&
6336
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6337
-  { (case "(($ac_try" in
6338
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6339
-  *) ac_try_echo=$ac_try;;
6340
-esac
6341
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6342
-  (eval "$ac_try") 2>&5
6343
-  ac_status=$?
6344
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6345
-  (exit $ac_status); }; } &&
6346
-	 { ac_try='test -s conftest.$ac_objext'
6347
-  { (case "(($ac_try" in
6348
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6349
-  *) ac_try_echo=$ac_try;;
6350
-esac
6351
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6352
-  (eval "$ac_try") 2>&5
6353
-  ac_status=$?
6354
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6355
-  (exit $ac_status); }; }; then
6335
+  (exit $ac_status); } && {
6336
+	 test -z "$ac_c_werror_flag" ||
6337
+	 test ! -s conftest.err
6338
+       } && test -s conftest.$ac_objext; then
6356 6339
         case $host_os in
6357 6340
       hpux9* | hpux10* | hpux11*)
6358 6341
 	# On HP-UX, both CC and GCC only warn that PIC is supported... then
... ...
@@ -6446,27 +6259,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6446 6446
   rm -f conftest.er1
6447 6447
   cat conftest.err >&5
6448 6448
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6449
-  (exit $ac_status); } &&
6450
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6451
-  { (case "(($ac_try" in
6452
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6453
-  *) ac_try_echo=$ac_try;;
6454
-esac
6455
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6456
-  (eval "$ac_try") 2>&5
6457
-  ac_status=$?
6458
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6459
-  (exit $ac_status); }; } &&
6460
-	 { ac_try='test -s conftest$ac_exeext'
6461
-  { (case "(($ac_try" in
6462
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6463
-  *) ac_try_echo=$ac_try;;
6464
-esac
6465
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6466
-  (eval "$ac_try") 2>&5
6467
-  ac_status=$?
6468
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6469
-  (exit $ac_status); }; }; then
6449
+  (exit $ac_status); } && {
6450
+	 test -z "$ac_c_werror_flag" ||
6451
+	 test ! -s conftest.err
6452
+       } && test -s conftest$ac_exeext &&
6453
+       $as_test_x conftest$ac_exeext; then
6470 6454
   lt_cv_prog_cc_static_works=yes
6471 6455
 else
6472 6456
   echo "$as_me: failed program was:" >&5
... ...
@@ -6520,7 +6317,7 @@ chmod -w .
6520 6520
 save_CFLAGS="$CFLAGS"
6521 6521
 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
6522 6522
 compiler_c_o=no
6523
-if { (eval echo configure:6523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
6523
+if { (eval echo configure:6320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
6524 6524
   # The compiler can only warn and ignore the option if not recognized
6525 6525
   # So say no if there are warnings
6526 6526
   if test -s out/conftest.err; then
... ...
@@ -6588,27 +6385,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6588 6588
   rm -f conftest.er1
6589 6589
   cat conftest.err >&5
6590 6590
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6591
-  (exit $ac_status); } &&
6592
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6593
-  { (case "(($ac_try" in
6594
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6595
-  *) ac_try_echo=$ac_try;;
6596
-esac
6597
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6598
-  (eval "$ac_try") 2>&5
6599
-  ac_status=$?
6600
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6601
-  (exit $ac_status); }; } &&
6602
-	 { ac_try='test -s conftest.$ac_objext'
6603
-  { (case "(($ac_try" in
6604
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6605
-  *) ac_try_echo=$ac_try;;
6606
-esac
6607
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6608
-  (eval "$ac_try") 2>&5
6609
-  ac_status=$?
6610
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6611
-  (exit $ac_status); }; }; then
6591
+  (exit $ac_status); } && {
6592
+	 test -z "$ac_c_werror_flag" ||
6593
+	 test ! -s conftest.err
6594
+       } && test -s conftest.$ac_objext; then
6612 6595
       # The compiler can only warn and ignore the option if not recognized
6613 6596
     # So say no if there are warnings
6614 6597
     if test -s conftest.err; then
... ...
@@ -6704,27 +6484,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6704 6704
   rm -f conftest.er1
6705 6705
   cat conftest.err >&5
6706 6706
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6707
-  (exit $ac_status); } &&
6708
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6709
-  { (case "(($ac_try" in
6710
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6711
-  *) ac_try_echo=$ac_try;;
6712
-esac
6713
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6714
-  (eval "$ac_try") 2>&5
6715
-  ac_status=$?
6716
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6717
-  (exit $ac_status); }; } &&
6718
-	 { ac_try='test -s conftest.$ac_objext'
6719
-  { (case "(($ac_try" in
6720
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6721
-  *) ac_try_echo=$ac_try;;
6722
-esac
6723
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6724
-  (eval "$ac_try") 2>&5
6725
-  ac_status=$?
6726
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6727
-  (exit $ac_status); }; }; then
6707
+  (exit $ac_status); } && {
6708
+	 test -z "$ac_c_werror_flag" ||
6709
+	 test ! -s conftest.err
6710
+       } && test -s conftest.$ac_objext; then
6728 6711
       # The compiler can only warn and ignore the option if not recognized
6729 6712
     # So say no if there are warnings
6730 6713
     if test -s conftest.err; then
... ...
@@ -8052,27 +7815,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8052 8052
   rm -f conftest.er1
8053 8053
   cat conftest.err >&5
8054 8054
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8055
-  (exit $ac_status); } &&
8056
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8057
-  { (case "(($ac_try" in
8058
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8059
-  *) ac_try_echo=$ac_try;;
8060
-esac
8061
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8062
-  (eval "$ac_try") 2>&5
8063
-  ac_status=$?
8064
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8065
-  (exit $ac_status); }; } &&
8066
-	 { ac_try='test -s conftest$ac_exeext'
8067
-  { (case "(($ac_try" in
8068
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8069
-  *) ac_try_echo=$ac_try;;
8070
-esac
8071
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8072
-  (eval "$ac_try") 2>&5
8073
-  ac_status=$?
8074
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8075
-  (exit $ac_status); }; }; then
8055
+  (exit $ac_status); } && {
8056
+	 test -z "$ac_c_werror_flag" ||
8057
+	 test ! -s conftest.err
8058
+       } && test -s conftest$ac_exeext &&
8059
+       $as_test_x conftest$ac_exeext; then
8076 8060
   ac_cv_func_shl_load=yes
8077 8061
 else
8078 8062
   echo "$as_me: failed program was:" >&5
... ...
@@ -8131,27 +7878,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8131 8131
   rm -f conftest.er1
8132 8132
   cat conftest.err >&5
8133 8133
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8134
-  (exit $ac_status); } &&
8135
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8136
-  { (case "(($ac_try" in
8137
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8138
-  *) ac_try_echo=$ac_try;;
8139
-esac
8140
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8141
-  (eval "$ac_try") 2>&5
8142
-  ac_status=$?
8143
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8144
-  (exit $ac_status); }; } &&
8145
-	 { ac_try='test -s conftest$ac_exeext'
8146
-  { (case "(($ac_try" in
8147
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8148
-  *) ac_try_echo=$ac_try;;
8149
-esac
8150
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8151
-  (eval "$ac_try") 2>&5
8152
-  ac_status=$?
8153
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8154
-  (exit $ac_status); }; }; then
8134
+  (exit $ac_status); } && {
8135
+	 test -z "$ac_c_werror_flag" ||
8136
+	 test ! -s conftest.err
8137
+       } && test -s conftest$ac_exeext &&
8138
+       $as_test_x conftest$ac_exeext; then
8155 8139
   ac_cv_lib_dld_shl_load=yes
8156 8140
 else
8157 8141
   echo "$as_me: failed program was:" >&5
... ...
@@ -8232,27 +7963,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8232 8232
   rm -f conftest.er1
8233 8233
   cat conftest.err >&5
8234 8234
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8235
-  (exit $ac_status); } &&
8236
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8237
-  { (case "(($ac_try" in
8238
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8239
-  *) ac_try_echo=$ac_try;;
8240
-esac
8241
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8242
-  (eval "$ac_try") 2>&5
8243
-  ac_status=$?
8244
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8245
-  (exit $ac_status); }; } &&
8246
-	 { ac_try='test -s conftest$ac_exeext'
8247
-  { (case "(($ac_try" in
8248
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8249
-  *) ac_try_echo=$ac_try;;
8250
-esac
8251
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8252
-  (eval "$ac_try") 2>&5
8253
-  ac_status=$?
8254
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8255
-  (exit $ac_status); }; }; then
8235
+  (exit $ac_status); } && {
8236
+	 test -z "$ac_c_werror_flag" ||
8237
+	 test ! -s conftest.err
8238
+       } && test -s conftest$ac_exeext &&
8239
+       $as_test_x conftest$ac_exeext; then
8256 8240
   ac_cv_func_dlopen=yes
8257 8241
 else
8258 8242
   echo "$as_me: failed program was:" >&5
... ...
@@ -8311,27 +8026,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8311 8311
   rm -f conftest.er1
8312 8312
   cat conftest.err >&5
8313 8313
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8314
-  (exit $ac_status); } &&
8315
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8316
-  { (case "(($ac_try" in
8317
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8318
-  *) ac_try_echo=$ac_try;;
8319
-esac
8320
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8321
-  (eval "$ac_try") 2>&5
8322
-  ac_status=$?
8323
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8324
-  (exit $ac_status); }; } &&
8325
-	 { ac_try='test -s conftest$ac_exeext'
8326
-  { (case "(($ac_try" in
8327
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8328
-  *) ac_try_echo=$ac_try;;
8329
-esac
8330
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8331
-  (eval "$ac_try") 2>&5
8332
-  ac_status=$?
8333
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8334
-  (exit $ac_status); }; }; then
8314
+  (exit $ac_status); } && {
8315
+	 test -z "$ac_c_werror_flag" ||
8316
+	 test ! -s conftest.err
8317
+       } && test -s conftest$ac_exeext &&
8318
+       $as_test_x conftest$ac_exeext; then
8335 8319
   ac_cv_lib_dl_dlopen=yes
8336 8320
 else
8337 8321
   echo "$as_me: failed program was:" >&5
... ...
@@ -8391,27 +8090,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8391 8391
   rm -f conftest.er1
8392 8392
   cat conftest.err >&5
8393 8393
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8394
-  (exit $ac_status); } &&
8395
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8396
-  { (case "(($ac_try" in
8397
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8398
-  *) ac_try_echo=$ac_try;;
8399
-esac
8400
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8401
-  (eval "$ac_try") 2>&5
8402
-  ac_status=$?
8403
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8404
-  (exit $ac_status); }; } &&
8405
-	 { ac_try='test -s conftest$ac_exeext'
8406
-  { (case "(($ac_try" in
8407
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8408
-  *) ac_try_echo=$ac_try;;
8409
-esac
8410
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8411
-  (eval "$ac_try") 2>&5
8412
-  ac_status=$?
8413
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8414
-  (exit $ac_status); }; }; then
8394
+  (exit $ac_status); } && {
8395
+	 test -z "$ac_c_werror_flag" ||
8396
+	 test ! -s conftest.err
8397
+       } && test -s conftest$ac_exeext &&
8398
+       $as_test_x conftest$ac_exeext; then
8415 8399
   ac_cv_lib_svld_dlopen=yes
8416 8400
 else
8417 8401
   echo "$as_me: failed program was:" >&5
... ...
@@ -8471,27 +8154,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8471 8471
   rm -f conftest.er1
8472 8472
   cat conftest.err >&5
8473 8473
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8474
-  (exit $ac_status); } &&
8475
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8476
-  { (case "(($ac_try" in
8477
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8478
-  *) ac_try_echo=$ac_try;;
8479
-esac
8480
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8481
-  (eval "$ac_try") 2>&5
8482
-  ac_status=$?
8483
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8484
-  (exit $ac_status); }; } &&
8485
-	 { ac_try='test -s conftest$ac_exeext'
8486
-  { (case "(($ac_try" in
8487
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8488
-  *) ac_try_echo=$ac_try;;
8489
-esac
8490
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8491
-  (eval "$ac_try") 2>&5
8492
-  ac_status=$?
8493
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8494
-  (exit $ac_status); }; }; then
8474
+  (exit $ac_status); } && {
8475
+	 test -z "$ac_c_werror_flag" ||
8476
+	 test ! -s conftest.err
8477
+       } && test -s conftest$ac_exeext &&
8478
+       $as_test_x conftest$ac_exeext; then
8495 8479
   ac_cv_lib_dld_dld_link=yes
8496 8480
 else
8497 8481
   echo "$as_me: failed program was:" >&5
... ...
@@ -8556,7 +8223,7 @@ else
8556 8556
     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
8557 8557
   lt_status=$lt_dlunknown
8558 8558
   cat > conftest.$ac_ext <<EOF
8559
-#line 8559 "configure"
8559
+#line 8226 "configure"
8560 8560
 #include "confdefs.h"
8561 8561
 
8562 8562
 #if HAVE_DLFCN_H
... ...
@@ -8654,7 +8321,7 @@ else
8654 8654
     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
8655 8655
   lt_status=$lt_dlunknown
8656 8656
   cat > conftest.$ac_ext <<EOF
8657
-#line 8657 "configure"
8657
+#line 8324 "configure"
8658 8658
 #include "confdefs.h"
8659 8659
 
8660 8660
 #if HAVE_DLFCN_H
... ...
@@ -9438,27 +9105,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9438 9438
   rm -f conftest.er1
9439 9439
   cat conftest.err >&5
9440 9440
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9441
-  (exit $ac_status); } &&
9442
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9443
-  { (case "(($ac_try" in
9444
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9445
-  *) ac_try_echo=$ac_try;;
9446
-esac
9447
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9448
-  (eval "$ac_try") 2>&5
9449
-  ac_status=$?
9450
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9451
-  (exit $ac_status); }; } &&
9452
-	 { ac_try='test -s conftest.$ac_objext'
9453
-  { (case "(($ac_try" in
9454
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9455
-  *) ac_try_echo=$ac_try;;
9456
-esac
9457
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9458
-  (eval "$ac_try") 2>&5
9459
-  ac_status=$?
9460
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9461
-  (exit $ac_status); }; }; then
9441
+  (exit $ac_status); } && {
9442
+	 test -z "$ac_c_werror_flag" ||
9443
+	 test ! -s conftest.err
9444
+       } && test -s conftest.$ac_objext; then
9462 9445
   ac_cv_header_stdc=yes
9463 9446
 else
9464 9447
   echo "$as_me: failed program was:" >&5
... ...
@@ -9652,27 +9302,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9652 9652
   rm -f conftest.er1
9653 9653
   cat conftest.err >&5
9654 9654
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9655
-  (exit $ac_status); } &&
9656
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9657
-  { (case "(($ac_try" in
9658
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9659
-  *) ac_try_echo=$ac_try;;
9660
-esac
9661
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9662
-  (eval "$ac_try") 2>&5
9663
-  ac_status=$?
9664
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9665
-  (exit $ac_status); }; } &&
9666
-	 { ac_try='test -s conftest.$ac_objext'
9667
-  { (case "(($ac_try" in
9668
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9669
-  *) ac_try_echo=$ac_try;;
9670
-esac
9671
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9672
-  (eval "$ac_try") 2>&5
9673
-  ac_status=$?
9674
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9675
-  (exit $ac_status); }; }; then
9655
+  (exit $ac_status); } && {
9656
+	 test -z "$ac_c_werror_flag" ||
9657
+	 test ! -s conftest.err
9658
+       } && test -s conftest.$ac_objext; then
9676 9659
   ac_header_compiler=yes
9677 9660
 else
9678 9661
   echo "$as_me: failed program was:" >&5
... ...
@@ -9708,17 +9341,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9708 9708
   rm -f conftest.er1
9709 9709
   cat conftest.err >&5
9710 9710
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9711
-  (exit $ac_status); } >/dev/null; then
9712
-  if test -s conftest.err; then
9713
-    ac_cpp_err=$ac_c_preproc_warn_flag
9714
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9715
-  else
9716
-    ac_cpp_err=
9717
-  fi
9718
-else
9719
-  ac_cpp_err=yes
9720
-fi
9721
-if test -z "$ac_cpp_err"; then
9711
+  (exit $ac_status); } >/dev/null && {
9712
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9713
+	 test ! -s conftest.err
9714
+       }; then
9722 9715
   ac_header_preproc=yes
9723 9716
 else
9724 9717
   echo "$as_me: failed program was:" >&5
... ...
@@ -9811,27 +9437,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9811 9811
   rm -f conftest.er1
9812 9812
   cat conftest.err >&5
9813 9813
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9814
-  (exit $ac_status); } &&
9815
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9816
-  { (case "(($ac_try" in
9817
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9818
-  *) ac_try_echo=$ac_try;;
9819
-esac
9820
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9821
-  (eval "$ac_try") 2>&5
9822
-  ac_status=$?
9823
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9824
-  (exit $ac_status); }; } &&
9825
-	 { ac_try='test -s conftest.$ac_objext'
9826
-  { (case "(($ac_try" in
9827
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9828
-  *) ac_try_echo=$ac_try;;
9829
-esac
9830
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9831
-  (eval "$ac_try") 2>&5
9832
-  ac_status=$?
9833
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9834
-  (exit $ac_status); }; }; then
9814
+  (exit $ac_status); } && {
9815
+	 test -z "$ac_c_werror_flag" ||
9816
+	 test ! -s conftest.err
9817
+       } && test -s conftest.$ac_objext; then
9835 9818
   ac_header_compiler=yes
9836 9819
 else
9837 9820
   echo "$as_me: failed program was:" >&5
... ...
@@ -9867,17 +9476,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9867 9867
   rm -f conftest.er1
9868 9868
   cat conftest.err >&5
9869 9869
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9870
-  (exit $ac_status); } >/dev/null; then
9871
-  if test -s conftest.err; then
9872
-    ac_cpp_err=$ac_c_preproc_warn_flag
9873
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9874
-  else
9875
-    ac_cpp_err=
9876
-  fi
9877
-else
9878
-  ac_cpp_err=yes
9879
-fi
9880
-if test -z "$ac_cpp_err"; then
9870
+  (exit $ac_status); } >/dev/null && {
9871
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9872
+	 test ! -s conftest.err
9873
+       }; then
9881 9874
   ac_header_preproc=yes
9882 9875
 else
9883 9876
   echo "$as_me: failed program was:" >&5
... ...
@@ -9973,27 +9575,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9973 9973
   rm -f conftest.er1
9974 9974
   cat conftest.err >&5
9975 9975
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9976
-  (exit $ac_status); } &&
9977
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9978
-  { (case "(($ac_try" in
9979
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9980
-  *) ac_try_echo=$ac_try;;
9981
-esac
9982
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9983
-  (eval "$ac_try") 2>&5
9984
-  ac_status=$?
9985
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9986
-  (exit $ac_status); }; } &&
9987
-	 { ac_try='test -s conftest.$ac_objext'
9988
-  { (case "(($ac_try" in
9989
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9990
-  *) ac_try_echo=$ac_try;;
9991
-esac
9992
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9993
-  (eval "$ac_try") 2>&5
9994
-  ac_status=$?
9995
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9996
-  (exit $ac_status); }; }; then
9976
+  (exit $ac_status); } && {
9977
+	 test -z "$ac_c_werror_flag" ||
9978
+	 test ! -s conftest.err
9979
+       } && test -s conftest.$ac_objext; then
9997 9980
   ac_cv_type_off_t=yes
9998 9981
 else
9999 9982
   echo "$as_me: failed program was:" >&5
... ...
@@ -10053,27 +9638,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10053 10053
   rm -f conftest.er1
10054 10054
   cat conftest.err >&5
10055 10055
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10056
-  (exit $ac_status); } &&
10057
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10058
-  { (case "(($ac_try" in
10059
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10060
-  *) ac_try_echo=$ac_try;;
10061
-esac
10062
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10063
-  (eval "$ac_try") 2>&5
10064
-  ac_status=$?
10065
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10066
-  (exit $ac_status); }; } &&
10067
-	 { ac_try='test -s conftest.$ac_objext'
10068
-  { (case "(($ac_try" in
10069
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10070
-  *) ac_try_echo=$ac_try;;
10071
-esac
10072
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10073
-  (eval "$ac_try") 2>&5
10074
-  ac_status=$?
10075
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10076
-  (exit $ac_status); }; }; then
10056
+  (exit $ac_status); } && {
10057
+	 test -z "$ac_c_werror_flag" ||
10058
+	 test ! -s conftest.err
10059
+       } && test -s conftest.$ac_objext; then
10077 10060
   ac_cv_sizeof_short=$ac_size
10078 10061
 else
10079 10062
   echo "$as_me: failed program was:" >&5
... ...
@@ -10138,27 +9706,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10138 10138
   rm -f conftest.er1
10139 10139
   cat conftest.err >&5
10140 10140
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10141
-  (exit $ac_status); } &&
10142
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10143
-  { (case "(($ac_try" in
10144
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10145
-  *) ac_try_echo=$ac_try;;
10146
-esac
10147
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10148
-  (eval "$ac_try") 2>&5
10149
-  ac_status=$?
10150
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10151
-  (exit $ac_status); }; } &&
10152
-	 { ac_try='test -s conftest.$ac_objext'
10153
-  { (case "(($ac_try" in
10154
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10155
-  *) ac_try_echo=$ac_try;;
10156
-esac
10157
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10158
-  (eval "$ac_try") 2>&5
10159
-  ac_status=$?
10160
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10161
-  (exit $ac_status); }; }; then
10141
+  (exit $ac_status); } && {
10142
+	 test -z "$ac_c_werror_flag" ||
10143
+	 test ! -s conftest.err
10144
+       } && test -s conftest.$ac_objext; then
10162 10145
   ac_cv_sizeof_int=$ac_size
10163 10146
 else
10164 10147
   echo "$as_me: failed program was:" >&5
... ...
@@ -10223,27 +9774,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10223 10223
   rm -f conftest.er1
10224 10224
   cat conftest.err >&5
10225 10225
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10226
-  (exit $ac_status); } &&
10227
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10228
-  { (case "(($ac_try" in
10229
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10230
-  *) ac_try_echo=$ac_try;;
10231
-esac
10232
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10233
-  (eval "$ac_try") 2>&5
10234
-  ac_status=$?
10235
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10236
-  (exit $ac_status); }; } &&
10237
-	 { ac_try='test -s conftest.$ac_objext'
10238
-  { (case "(($ac_try" in
10239
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10240
-  *) ac_try_echo=$ac_try;;
10241
-esac
10242
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10243
-  (eval "$ac_try") 2>&5
10244
-  ac_status=$?
10245
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10246
-  (exit $ac_status); }; }; then
10226
+  (exit $ac_status); } && {
10227
+	 test -z "$ac_c_werror_flag" ||
10228
+	 test ! -s conftest.err
10229
+       } && test -s conftest.$ac_objext; then
10247 10230
   ac_cv_sizeof_long=$ac_size
10248 10231
 else
10249 10232
   echo "$as_me: failed program was:" >&5
... ...
@@ -10308,27 +9842,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10308 10308
   rm -f conftest.er1
10309 10309
   cat conftest.err >&5
10310 10310
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10311
-  (exit $ac_status); } &&
10312
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10313
-  { (case "(($ac_try" in
10314
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10315
-  *) ac_try_echo=$ac_try;;
10316
-esac
10317
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10318
-  (eval "$ac_try") 2>&5
10319
-  ac_status=$?
10320
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10321
-  (exit $ac_status); }; } &&
10322
-	 { ac_try='test -s conftest.$ac_objext'
10323
-  { (case "(($ac_try" in
10324
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10325
-  *) ac_try_echo=$ac_try;;
10326
-esac
10327
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10328
-  (eval "$ac_try") 2>&5
10329
-  ac_status=$?
10330
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10331
-  (exit $ac_status); }; }; then
10311
+  (exit $ac_status); } && {
10312
+	 test -z "$ac_c_werror_flag" ||
10313
+	 test ! -s conftest.err
10314
+       } && test -s conftest.$ac_objext; then
10332 10315
   ac_cv_sizeof_long_long=$ac_size
10333 10316
 else
10334 10317
   echo "$as_me: failed program was:" >&5
... ...
@@ -10399,27 +9916,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10399 10399
   rm -f conftest.er1
10400 10400
   cat conftest.err >&5
10401 10401
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10402
-  (exit $ac_status); } &&
10403
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10404
-  { (case "(($ac_try" in
10405
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10406
-  *) ac_try_echo=$ac_try;;
10407
-esac
10408
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10409
-  (eval "$ac_try") 2>&5
10410
-  ac_status=$?
10411
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10412
-  (exit $ac_status); }; } &&
10413
-	 { ac_try='test -s conftest$ac_exeext'
10414
-  { (case "(($ac_try" in
10415
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10416
-  *) ac_try_echo=$ac_try;;
10417
-esac
10418
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10419
-  (eval "$ac_try") 2>&5
10420
-  ac_status=$?
10421
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10422
-  (exit $ac_status); }; }; then
10402
+  (exit $ac_status); } && {
10403
+	 test -z "$ac_c_werror_flag" ||
10404
+	 test ! -s conftest.err
10405
+       } && test -s conftest$ac_exeext &&
10406
+       $as_test_x conftest$ac_exeext; then
10423 10407
   ac_cv_lib_socket_bind=yes
10424 10408
 else
10425 10409
   echo "$as_me: failed program was:" >&5
... ...
@@ -10480,27 +9981,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10480 10480
   rm -f conftest.er1
10481 10481
   cat conftest.err >&5
10482 10482
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10483
-  (exit $ac_status); } &&
10484
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10485
-  { (case "(($ac_try" in
10486
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10487
-  *) ac_try_echo=$ac_try;;
10488
-esac
10489
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10490
-  (eval "$ac_try") 2>&5
10491
-  ac_status=$?
10492
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10493
-  (exit $ac_status); }; } &&
10494
-	 { ac_try='test -s conftest$ac_exeext'
10495
-  { (case "(($ac_try" in
10496
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10497
-  *) ac_try_echo=$ac_try;;
10498
-esac
10499
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10500
-  (eval "$ac_try") 2>&5
10501
-  ac_status=$?
10502
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10503
-  (exit $ac_status); }; }; then
10483
+  (exit $ac_status); } && {
10484
+	 test -z "$ac_c_werror_flag" ||
10485
+	 test ! -s conftest.err
10486
+       } && test -s conftest$ac_exeext &&
10487
+       $as_test_x conftest$ac_exeext; then
10504 10488
   ac_cv_lib_nsl_gethostent=yes
10505 10489
 else
10506 10490
   echo "$as_me: failed program was:" >&5
... ...
@@ -10598,27 +10083,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10598 10598
   rm -f conftest.er1
10599 10599
   cat conftest.err >&5
10600 10600
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10601
-  (exit $ac_status); } &&
10602
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10603
-  { (case "(($ac_try" in
10604
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10605
-  *) ac_try_echo=$ac_try;;
10606
-esac
10607
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10608
-  (eval "$ac_try") 2>&5
10609
-  ac_status=$?
10610
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10611
-  (exit $ac_status); }; } &&
10612
-	 { ac_try='test -s conftest$ac_exeext'
10613
-  { (case "(($ac_try" in
10614
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10615
-  *) ac_try_echo=$ac_try;;
10616
-esac
10617
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10618
-  (eval "$ac_try") 2>&5
10619
-  ac_status=$?
10620
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10621
-  (exit $ac_status); }; }; then
10601
+  (exit $ac_status); } && {
10602
+	 test -z "$ac_c_werror_flag" ||
10603
+	 test ! -s conftest.err
10604
+       } && test -s conftest$ac_exeext &&
10605
+       $as_test_x conftest$ac_exeext; then
10622 10606
   eval "$as_ac_var=yes"
10623 10607
 else
10624 10608
   echo "$as_me: failed program was:" >&5
... ...
@@ -10681,27 +10150,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10681 10681
   rm -f conftest.er1
10682 10682
   cat conftest.err >&5
10683 10683
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10684
-  (exit $ac_status); } &&
10685
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10686
-  { (case "(($ac_try" in
10687
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10688
-  *) ac_try_echo=$ac_try;;
10689
-esac
10690
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10691
-  (eval "$ac_try") 2>&5
10692
-  ac_status=$?
10693
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10694
-  (exit $ac_status); }; } &&
10695
-	 { ac_try='test -s conftest.$ac_objext'
10696
-  { (case "(($ac_try" in
10697
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10698
-  *) ac_try_echo=$ac_try;;
10699
-esac
10700
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10701
-  (eval "$ac_try") 2>&5
10702
-  ac_status=$?
10703
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10704
-  (exit $ac_status); }; }; then
10684
+  (exit $ac_status); } && {
10685
+	 test -z "$ac_c_werror_flag" ||
10686
+	 test ! -s conftest.err
10687
+       } && test -s conftest.$ac_objext; then
10705 10688
   ac_header_compiler=yes
10706 10689
 else
10707 10690
   echo "$as_me: failed program was:" >&5
... ...
@@ -10737,17 +10189,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10737 10737
   rm -f conftest.er1
10738 10738
   cat conftest.err >&5
10739 10739
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10740
-  (exit $ac_status); } >/dev/null; then
10741
-  if test -s conftest.err; then
10742
-    ac_cpp_err=$ac_c_preproc_warn_flag
10743
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10744
-  else
10745
-    ac_cpp_err=
10746
-  fi
10747
-else
10748
-  ac_cpp_err=yes
10749
-fi
10750
-if test -z "$ac_cpp_err"; then
10740
+  (exit $ac_status); } >/dev/null && {
10741
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10742
+	 test ! -s conftest.err
10743
+       }; then
10751 10744
   ac_header_preproc=yes
10752 10745
 else
10753 10746
   echo "$as_me: failed program was:" >&5
... ...
@@ -10873,27 +10318,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10873 10873
   rm -f conftest.er1
10874 10874
   cat conftest.err >&5
10875 10875
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10876
-  (exit $ac_status); } &&
10877
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10878
-  { (case "(($ac_try" in
10879
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10880
-  *) ac_try_echo=$ac_try;;
10881
-esac
10882
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10883
-  (eval "$ac_try") 2>&5
10884
-  ac_status=$?
10885
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10886
-  (exit $ac_status); }; } &&
10887
-	 { ac_try='test -s conftest$ac_exeext'
10888
-  { (case "(($ac_try" in
10889
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10890
-  *) ac_try_echo=$ac_try;;
10891
-esac
10892
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10893
-  (eval "$ac_try") 2>&5
10894
-  ac_status=$?
10895
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10896
-  (exit $ac_status); }; }; then
10876
+  (exit $ac_status); } && {
10877
+	 test -z "$ac_c_werror_flag" ||
10878
+	 test ! -s conftest.err
10879
+       } && test -s conftest$ac_exeext &&
10880
+       $as_test_x conftest$ac_exeext; then
10897 10881
   eval "$as_ac_var=yes"
10898 10882
 else
10899 10883
   echo "$as_me: failed program was:" >&5
... ...
@@ -11108,7 +10537,6 @@ if test "${ac_cv_sys_largefile_source+set}" = set; then
11108 11108
   echo $ECHO_N "(cached) $ECHO_C" >&6
11109 11109
 else
11110 11110
   while :; do
11111
-  ac_cv_sys_largefile_source=no
11112 11111
   cat >conftest.$ac_ext <<_ACEOF
11113 11112
 /* confdefs.h.  */
11114 11113
 _ACEOF
... ...
@@ -11119,46 +10547,30 @@ cat >>conftest.$ac_ext <<_ACEOF
11119 11119
 int
11120 11120
 main ()
11121 11121
 {
11122
-return !fseeko;
11122
+return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
11123 11123
   ;
11124 11124
   return 0;
11125 11125
 }
11126 11126
 _ACEOF
11127
-rm -f conftest.$ac_objext
11128
-if { (ac_try="$ac_compile"
11127
+rm -f conftest.$ac_objext conftest$ac_exeext
11128
+if { (ac_try="$ac_link"
11129 11129
 case "(($ac_try" in
11130 11130
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11131 11131
   *) ac_try_echo=$ac_try;;
11132 11132
 esac
11133 11133
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11134
-  (eval "$ac_compile") 2>conftest.er1
11134
+  (eval "$ac_link") 2>conftest.er1
11135 11135
   ac_status=$?
11136 11136
   grep -v '^ *+' conftest.er1 >conftest.err
11137 11137
   rm -f conftest.er1
11138 11138
   cat conftest.err >&5
11139 11139
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11140
-  (exit $ac_status); } &&
11141
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11142
-  { (case "(($ac_try" in
11143
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11144
-  *) ac_try_echo=$ac_try;;
11145
-esac
11146
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11147
-  (eval "$ac_try") 2>&5
11148
-  ac_status=$?
11149
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11150
-  (exit $ac_status); }; } &&
11151
-	 { ac_try='test -s conftest.$ac_objext'
11152
-  { (case "(($ac_try" in
11153
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11154
-  *) ac_try_echo=$ac_try;;
11155
-esac
11156
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11157
-  (eval "$ac_try") 2>&5
11158
-  ac_status=$?
11159
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11160
-  (exit $ac_status); }; }; then
11161
-  break
11140
+  (exit $ac_status); } && {
11141
+	 test -z "$ac_c_werror_flag" ||
11142
+	 test ! -s conftest.err
11143
+       } && test -s conftest$ac_exeext &&
11144
+       $as_test_x conftest$ac_exeext; then
11145
+  ac_cv_sys_largefile_source=no; break
11162 11146
 else
11163 11147
   echo "$as_me: failed program was:" >&5
11164 11148
 sed 's/^/| /' conftest.$ac_ext >&5
... ...
@@ -11166,7 +10578,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
11166 11166
 
11167 11167
 fi
11168 11168
 
11169
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11169
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11170
+      conftest$ac_exeext conftest.$ac_ext
11170 11171
   cat >conftest.$ac_ext <<_ACEOF
11171 11172
 /* confdefs.h.  */
11172 11173
 _ACEOF
... ...
@@ -11178,45 +10591,29 @@ cat >>conftest.$ac_ext <<_ACEOF
11178 11178
 int
11179 11179
 main ()
11180 11180
 {
11181
-return !fseeko;
11181
+return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
11182 11182
   ;
11183 11183
   return 0;
11184 11184
 }
11185 11185
 _ACEOF
11186
-rm -f conftest.$ac_objext
11187
-if { (ac_try="$ac_compile"
11186
+rm -f conftest.$ac_objext conftest$ac_exeext
11187
+if { (ac_try="$ac_link"
11188 11188
 case "(($ac_try" in
11189 11189
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11190 11190
   *) ac_try_echo=$ac_try;;
11191 11191
 esac
11192 11192
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11193
-  (eval "$ac_compile") 2>conftest.er1
11193
+  (eval "$ac_link") 2>conftest.er1
11194 11194
   ac_status=$?
11195 11195
   grep -v '^ *+' conftest.er1 >conftest.err
11196 11196
   rm -f conftest.er1
11197 11197
   cat conftest.err >&5
11198 11198
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11199
-  (exit $ac_status); } &&
11200
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11201
-  { (case "(($ac_try" in
11202
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11203
-  *) ac_try_echo=$ac_try;;
11204
-esac
11205
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11206
-  (eval "$ac_try") 2>&5
11207
-  ac_status=$?
11208
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11209
-  (exit $ac_status); }; } &&
11210
-	 { ac_try='test -s conftest.$ac_objext'
11211
-  { (case "(($ac_try" in
11212
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11213
-  *) ac_try_echo=$ac_try;;
11214
-esac
11215
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11216
-  (eval "$ac_try") 2>&5
11217
-  ac_status=$?
11218
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11219
-  (exit $ac_status); }; }; then
11199
+  (exit $ac_status); } && {
11200
+	 test -z "$ac_c_werror_flag" ||
11201
+	 test ! -s conftest.err
11202
+       } && test -s conftest$ac_exeext &&
11203
+       $as_test_x conftest$ac_exeext; then
11220 11204
   ac_cv_sys_largefile_source=1; break
11221 11205
 else
11222 11206
   echo "$as_me: failed program was:" >&5
... ...
@@ -11225,92 +10622,28 @@ sed 's/^/| /' conftest.$ac_ext >&5
11225 11225
 
11226 11226
 fi
11227 11227
 
11228
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11228
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11229
+      conftest$ac_exeext conftest.$ac_ext
11230
+  ac_cv_sys_largefile_source=unknown
11229 11231
   break
11230 11232
 done
11231 11233
 fi
11232 11234
 { echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
11233 11235
 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6; }
11234
-if test "$ac_cv_sys_largefile_source" != no; then
11235
-
11236
+case $ac_cv_sys_largefile_source in #(
11237
+  no | unknown) ;;
11238
+  *)
11236 11239
 cat >>confdefs.h <<_ACEOF
11237 11240
 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
11238 11241
 _ACEOF
11239
-
11240
-fi
11242
+;;
11243
+esac
11241 11244
 rm -f conftest*
11242 11245
 
11243 11246
 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
11244 11247
 # in glibc 2.1.3, but that breaks too many other things.
11245 11248
 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
11246
-{ echo "$as_me:$LINENO: checking for fseeko" >&5
11247
-echo $ECHO_N "checking for fseeko... $ECHO_C" >&6; }
11248
-if test "${ac_cv_func_fseeko+set}" = set; then
11249
-  echo $ECHO_N "(cached) $ECHO_C" >&6
11250
-else
11251
-  cat >conftest.$ac_ext <<_ACEOF
11252
-/* confdefs.h.  */
11253
-_ACEOF
11254
-cat confdefs.h >>conftest.$ac_ext
11255
-cat >>conftest.$ac_ext <<_ACEOF
11256
-/* end confdefs.h.  */
11257
-#include <stdio.h>
11258
-int
11259
-main ()
11260
-{
11261
-return fseeko && fseeko (stdin, 0, 0);
11262
-  ;
11263
-  return 0;
11264
-}
11265
-_ACEOF
11266
-rm -f conftest.$ac_objext conftest$ac_exeext
11267
-if { (ac_try="$ac_link"
11268
-case "(($ac_try" in
11269
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11270
-  *) ac_try_echo=$ac_try;;
11271
-esac
11272
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11273
-  (eval "$ac_link") 2>conftest.er1
11274
-  ac_status=$?
11275
-  grep -v '^ *+' conftest.er1 >conftest.err
11276
-  rm -f conftest.er1
11277
-  cat conftest.err >&5
11278
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11279
-  (exit $ac_status); } &&
11280
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11281
-  { (case "(($ac_try" in
11282
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11283
-  *) ac_try_echo=$ac_try;;
11284
-esac
11285
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11286
-  (eval "$ac_try") 2>&5
11287
-  ac_status=$?
11288
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11289
-  (exit $ac_status); }; } &&
11290
-	 { ac_try='test -s conftest$ac_exeext'
11291
-  { (case "(($ac_try" in
11292
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11293
-  *) ac_try_echo=$ac_try;;
11294
-esac
11295
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11296
-  (eval "$ac_try") 2>&5
11297
-  ac_status=$?
11298
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11299
-  (exit $ac_status); }; }; then
11300
-  ac_cv_func_fseeko=yes
11301
-else
11302
-  echo "$as_me: failed program was:" >&5
11303
-sed 's/^/| /' conftest.$ac_ext >&5
11304
-
11305
-	ac_cv_func_fseeko=no
11306
-fi
11307
-
11308
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11309
-      conftest$ac_exeext conftest.$ac_ext
11310
-fi
11311
-{ echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5
11312
-echo "${ECHO_T}$ac_cv_func_fseeko" >&6; }
11313
-if test $ac_cv_func_fseeko = yes; then
11249
+if test $ac_cv_sys_largefile_source != unknown; then
11314 11250
 
11315 11251
 cat >>confdefs.h <<\_ACEOF
11316 11252
 #define HAVE_FSEEKO 1
... ...
@@ -11422,27 +10755,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11422 11422
   rm -f conftest.er1
11423 11423
   cat conftest.err >&5
11424 11424
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11425
-  (exit $ac_status); } &&
11426
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11427
-  { (case "(($ac_try" in
11428
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11429
-  *) ac_try_echo=$ac_try;;
11430
-esac
11431
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11432
-  (eval "$ac_try") 2>&5
11433
-  ac_status=$?
11434
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11435
-  (exit $ac_status); }; } &&
11436
-	 { ac_try='test -s conftest.$ac_objext'
11437
-  { (case "(($ac_try" in
11438
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11439
-  *) ac_try_echo=$ac_try;;
11440
-esac
11441
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11442
-  (eval "$ac_try") 2>&5
11443
-  ac_status=$?
11444
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11445
-  (exit $ac_status); }; }; then
11425
+  (exit $ac_status); } && {
11426
+	 test -z "$ac_c_werror_flag" ||
11427
+	 test ! -s conftest.err
11428
+       } && test -s conftest.$ac_objext; then
11446 11429
   ac_header_compiler=yes
11447 11430
 else
11448 11431
   echo "$as_me: failed program was:" >&5
... ...
@@ -11478,17 +10794,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11478 11478
   rm -f conftest.er1
11479 11479
   cat conftest.err >&5
11480 11480
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11481
-  (exit $ac_status); } >/dev/null; then
11482
-  if test -s conftest.err; then
11483
-    ac_cpp_err=$ac_c_preproc_warn_flag
11484
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
11485
-  else
11486
-    ac_cpp_err=
11487
-  fi
11488
-else
11489
-  ac_cpp_err=yes
11490
-fi
11491
-if test -z "$ac_cpp_err"; then
11481
+  (exit $ac_status); } >/dev/null && {
11482
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11483
+	 test ! -s conftest.err
11484
+       }; then
11492 11485
   ac_header_preproc=yes
11493 11486
 else
11494 11487
   echo "$as_me: failed program was:" >&5
... ...
@@ -11672,27 +10981,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11672 11672
   rm -f conftest.er1
11673 11673
   cat conftest.err >&5
11674 11674
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11675
-  (exit $ac_status); } &&
11676
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11677
-  { (case "(($ac_try" in
11678
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11679
-  *) ac_try_echo=$ac_try;;
11680
-esac
11681
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11682
-  (eval "$ac_try") 2>&5
11683
-  ac_status=$?
11684
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11685
-  (exit $ac_status); }; } &&
11686
-	 { ac_try='test -s conftest$ac_exeext'
11687
-  { (case "(($ac_try" in
11688
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11689
-  *) ac_try_echo=$ac_try;;
11690
-esac
11691
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11692
-  (eval "$ac_try") 2>&5
11693
-  ac_status=$?
11694
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11695
-  (exit $ac_status); }; }; then
11675
+  (exit $ac_status); } && {
11676
+	 test -z "$ac_c_werror_flag" ||
11677
+	 test ! -s conftest.err
11678
+       } && test -s conftest$ac_exeext &&
11679
+       $as_test_x conftest$ac_exeext; then
11696 11680
   ac_cv_lib_z_inflateEnd=yes
11697 11681
 else
11698 11682
   echo "$as_me: failed program was:" >&5
... ...
@@ -11762,27 +11055,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11762 11762
   rm -f conftest.er1
11763 11763
   cat conftest.err >&5
11764 11764
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11765
-  (exit $ac_status); } &&
11766
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11767
-  { (case "(($ac_try" in
11768
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11769
-  *) ac_try_echo=$ac_try;;
11770
-esac
11771
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11772
-  (eval "$ac_try") 2>&5
11773
-  ac_status=$?
11774
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11775
-  (exit $ac_status); }; } &&
11776
-	 { ac_try='test -s conftest$ac_exeext'
11777
-  { (case "(($ac_try" in
11778
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11779
-  *) ac_try_echo=$ac_try;;
11780
-esac
11781
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11782
-  (eval "$ac_try") 2>&5
11783
-  ac_status=$?
11784
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11785
-  (exit $ac_status); }; }; then
11765
+  (exit $ac_status); } && {
11766
+	 test -z "$ac_c_werror_flag" ||
11767
+	 test ! -s conftest.err
11768
+       } && test -s conftest$ac_exeext &&
11769
+       $as_test_x conftest$ac_exeext; then
11786 11770
   ac_cv_lib_z_inflateEnd=yes
11787 11771
 else
11788 11772
   echo "$as_me: failed program was:" >&5
... ...
@@ -11864,27 +11141,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11864 11864
   rm -f conftest.er1
11865 11865
   cat conftest.err >&5
11866 11866
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11867
-  (exit $ac_status); } &&
11868
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11869
-  { (case "(($ac_try" in
11870
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11871
-  *) ac_try_echo=$ac_try;;
11872
-esac
11873
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11874
-  (eval "$ac_try") 2>&5
11875
-  ac_status=$?
11876
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11877
-  (exit $ac_status); }; } &&
11878
-	 { ac_try='test -s conftest$ac_exeext'
11879
-  { (case "(($ac_try" in
11880
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11881
-  *) ac_try_echo=$ac_try;;
11882
-esac
11883
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11884
-  (eval "$ac_try") 2>&5
11885
-  ac_status=$?
11886
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11887
-  (exit $ac_status); }; }; then
11867
+  (exit $ac_status); } && {
11868
+	 test -z "$ac_c_werror_flag" ||
11869
+	 test ! -s conftest.err
11870
+       } && test -s conftest$ac_exeext &&
11871
+       $as_test_x conftest$ac_exeext; then
11888 11872
   ac_cv_lib_bz2_bzReadOpen=yes
11889 11873
 else
11890 11874
   echo "$as_me: failed program was:" >&5
... ...
@@ -11941,27 +11202,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11941 11941
   rm -f conftest.er1
11942 11942
   cat conftest.err >&5
11943 11943
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11944
-  (exit $ac_status); } &&
11945
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11946
-  { (case "(($ac_try" in
11947
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11948
-  *) ac_try_echo=$ac_try;;
11949
-esac
11950
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11951
-  (eval "$ac_try") 2>&5
11952
-  ac_status=$?
11953
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11954
-  (exit $ac_status); }; } &&
11955
-	 { ac_try='test -s conftest.$ac_objext'
11956
-  { (case "(($ac_try" in
11957
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11958
-  *) ac_try_echo=$ac_try;;
11959
-esac
11960
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11961
-  (eval "$ac_try") 2>&5
11962
-  ac_status=$?
11963
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11964
-  (exit $ac_status); }; }; then
11944
+  (exit $ac_status); } && {
11945
+	 test -z "$ac_c_werror_flag" ||
11946
+	 test ! -s conftest.err
11947
+       } && test -s conftest.$ac_objext; then
11965 11948
   ac_header_compiler=yes
11966 11949
 else
11967 11950
   echo "$as_me: failed program was:" >&5
... ...
@@ -11997,17 +11241,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11997 11997
   rm -f conftest.er1
11998 11998
   cat conftest.err >&5
11999 11999
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12000
-  (exit $ac_status); } >/dev/null; then
12001
-  if test -s conftest.err; then
12002
-    ac_cpp_err=$ac_c_preproc_warn_flag
12003
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
12004
-  else
12005
-    ac_cpp_err=
12006
-  fi
12007
-else
12008
-  ac_cpp_err=yes
12009
-fi
12010
-if test -z "$ac_cpp_err"; then
12000
+  (exit $ac_status); } >/dev/null && {
12001
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12002
+	 test ! -s conftest.err
12003
+       }; then
12011 12004
   ac_header_preproc=yes
12012 12005
 else
12013 12006
   echo "$as_me: failed program was:" >&5
... ...
@@ -12074,11 +11311,11 @@ fi
12074 12074
 if test "${enable_ncore+set}" = set; then
12075 12075
   enableval=$enable_ncore; want_ncore=$enableval
12076 12076
 else
12077
-  want_ncore="yes"
12077
+  want_ncore="auto"
12078 12078
 fi
12079 12079
 
12080 12080
 
12081
-if test "$want_ncore" = "yes"
12081
+if test "$want_ncore" = "auto"
12082 12082
 then
12083 12083
     { echo "$as_me:$LINENO: checking for sn_sigscan_initdb in -lsn_sigscan" >&5
12084 12084
 echo $ECHO_N "checking for sn_sigscan_initdb in -lsn_sigscan... $ECHO_C" >&6; }
... ...
@@ -12122,27 +11359,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12122 12122
   rm -f conftest.er1
12123 12123
   cat conftest.err >&5
12124 12124
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12125
-  (exit $ac_status); } &&
12126
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12127
-  { (case "(($ac_try" in
12128
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12129
-  *) ac_try_echo=$ac_try;;
12130
-esac
12131
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12132
-  (eval "$ac_try") 2>&5
12133
-  ac_status=$?
12134
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12135
-  (exit $ac_status); }; } &&
12136
-	 { ac_try='test -s conftest$ac_exeext'
12137
-  { (case "(($ac_try" in
12138
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12139
-  *) ac_try_echo=$ac_try;;
12140
-esac
12141
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12142
-  (eval "$ac_try") 2>&5
12143
-  ac_status=$?
12144
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12145
-  (exit $ac_status); }; }; then
12125
+  (exit $ac_status); } && {
12126
+	 test -z "$ac_c_werror_flag" ||
12127
+	 test ! -s conftest.err
12128
+       } && test -s conftest$ac_exeext &&
12129
+       $as_test_x conftest$ac_exeext; then
12146 12130
   ac_cv_lib_sn_sigscan_sn_sigscan_initdb=yes
12147 12131
 else
12148 12132
   echo "$as_me: failed program was:" >&5
... ...
@@ -12161,20 +11382,25 @@ if test $ac_cv_lib_sn_sigscan_sn_sigscan_initdb = yes; then
12161 12161
   have_sigscan=yes
12162 12162
 fi
12163 12163
 
12164
-    if test "$have_sigscan" = "yes"
12165
-    then
12166
-	if test "${ac_cv_header_sn_sigscan_sn_sigscan_h+set}" = set; then
12167
-  { echo "$as_me:$LINENO: checking for sn_sigscan/sn_sigscan.h" >&5
12168
-echo $ECHO_N "checking for sn_sigscan/sn_sigscan.h... $ECHO_C" >&6; }
12169
-if test "${ac_cv_header_sn_sigscan_sn_sigscan_h+set}" = set; then
12164
+    if test "$have_sigscan" = "yes"; then
12165
+	want_ncore="yes"
12166
+    fi
12167
+fi
12168
+
12169
+if test "$want_ncore" = "yes"
12170
+then
12171
+    if test "${ac_cv_header_dlfcn_h+set}" = set; then
12172
+  { echo "$as_me:$LINENO: checking for dlfcn.h" >&5
12173
+echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; }
12174
+if test "${ac_cv_header_dlfcn_h+set}" = set; then
12170 12175
   echo $ECHO_N "(cached) $ECHO_C" >&6
12171 12176
 fi
12172
-{ echo "$as_me:$LINENO: result: $ac_cv_header_sn_sigscan_sn_sigscan_h" >&5
12173
-echo "${ECHO_T}$ac_cv_header_sn_sigscan_sn_sigscan_h" >&6; }
12177
+{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
12178
+echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; }
12174 12179
 else
12175 12180
   # Is the header compilable?
12176
-{ echo "$as_me:$LINENO: checking sn_sigscan/sn_sigscan.h usability" >&5
12177
-echo $ECHO_N "checking sn_sigscan/sn_sigscan.h usability... $ECHO_C" >&6; }
12181
+{ echo "$as_me:$LINENO: checking dlfcn.h usability" >&5
12182
+echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6; }
12178 12183
 cat >conftest.$ac_ext <<_ACEOF
12179 12184
 /* confdefs.h.  */
12180 12185
 _ACEOF
... ...
@@ -12182,7 +11408,7 @@ cat confdefs.h >>conftest.$ac_ext
12182 12182
 cat >>conftest.$ac_ext <<_ACEOF
12183 12183
 /* end confdefs.h.  */
12184 12184
 $ac_includes_default
12185
-#include <sn_sigscan/sn_sigscan.h>
12185
+#include <dlfcn.h>
12186 12186
 _ACEOF
12187 12187
 rm -f conftest.$ac_objext
12188 12188
 if { (ac_try="$ac_compile"
... ...
@@ -12197,27 +11423,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12197 12197
   rm -f conftest.er1
12198 12198
   cat conftest.err >&5
12199 12199
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12200
-  (exit $ac_status); } &&
12201
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12202
-  { (case "(($ac_try" in
12203
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12204
-  *) ac_try_echo=$ac_try;;
12205
-esac
12206
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12207
-  (eval "$ac_try") 2>&5
12208
-  ac_status=$?
12209
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12210
-  (exit $ac_status); }; } &&
12211
-	 { ac_try='test -s conftest.$ac_objext'
12212
-  { (case "(($ac_try" in
12213
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12214
-  *) ac_try_echo=$ac_try;;
12215
-esac
12216
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12217
-  (eval "$ac_try") 2>&5
12218
-  ac_status=$?
12219
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12220
-  (exit $ac_status); }; }; then
12200
+  (exit $ac_status); } && {
12201
+	 test -z "$ac_c_werror_flag" ||
12202
+	 test ! -s conftest.err
12203
+       } && test -s conftest.$ac_objext; then
12221 12204
   ac_header_compiler=yes
12222 12205
 else
12223 12206
   echo "$as_me: failed program was:" >&5
... ...
@@ -12231,15 +11440,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12231 12231
 echo "${ECHO_T}$ac_header_compiler" >&6; }
12232 12232
 
12233 12233
 # Is the header present?
12234
-{ echo "$as_me:$LINENO: checking sn_sigscan/sn_sigscan.h presence" >&5
12235
-echo $ECHO_N "checking sn_sigscan/sn_sigscan.h presence... $ECHO_C" >&6; }
12234
+{ echo "$as_me:$LINENO: checking dlfcn.h presence" >&5
12235
+echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6; }
12236 12236
 cat >conftest.$ac_ext <<_ACEOF
12237 12237
 /* confdefs.h.  */
12238 12238
 _ACEOF
12239 12239
 cat confdefs.h >>conftest.$ac_ext
12240 12240
 cat >>conftest.$ac_ext <<_ACEOF
12241 12241
 /* end confdefs.h.  */
12242
-#include <sn_sigscan/sn_sigscan.h>
12242
+#include <dlfcn.h>
12243 12243
 _ACEOF
12244 12244
 if { (ac_try="$ac_cpp conftest.$ac_ext"
12245 12245
 case "(($ac_try" in
... ...
@@ -12253,17 +11462,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12253 12253
   rm -f conftest.er1
12254 12254
   cat conftest.err >&5
12255 12255
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12256
-  (exit $ac_status); } >/dev/null; then
12257
-  if test -s conftest.err; then
12258
-    ac_cpp_err=$ac_c_preproc_warn_flag
12259
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
12260
-  else
12261
-    ac_cpp_err=
12262
-  fi
12263
-else
12264
-  ac_cpp_err=yes
12265
-fi
12266
-if test -z "$ac_cpp_err"; then
12256
+  (exit $ac_status); } >/dev/null && {
12257
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12258
+	 test ! -s conftest.err
12259
+       }; then
12267 12260
   ac_header_preproc=yes
12268 12261
 else
12269 12262
   echo "$as_me: failed program was:" >&5
... ...
@@ -12279,52 +11481,51 @@ echo "${ECHO_T}$ac_header_preproc" >&6; }
12279 12279
 # So?  What about this header?
12280 12280
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12281 12281
   yes:no: )
12282
-    { echo "$as_me:$LINENO: WARNING: sn_sigscan/sn_sigscan.h: accepted by the compiler, rejected by the preprocessor!" >&5
12283
-echo "$as_me: WARNING: sn_sigscan/sn_sigscan.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12284
-    { echo "$as_me:$LINENO: WARNING: sn_sigscan/sn_sigscan.h: proceeding with the compiler's result" >&5
12285
-echo "$as_me: WARNING: sn_sigscan/sn_sigscan.h: proceeding with the compiler's result" >&2;}
12282
+    { echo "$as_me:$LINENO: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&5
12283
+echo "$as_me: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12284
+    { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the compiler's result" >&5
12285
+echo "$as_me: WARNING: dlfcn.h: proceeding with the compiler's result" >&2;}
12286 12286
     ac_header_preproc=yes
12287 12287
     ;;
12288 12288
   no:yes:* )
12289
-    { echo "$as_me:$LINENO: WARNING: sn_sigscan/sn_sigscan.h: present but cannot be compiled" >&5
12290
-echo "$as_me: WARNING: sn_sigscan/sn_sigscan.h: present but cannot be compiled" >&2;}
12291
-    { echo "$as_me:$LINENO: WARNING: sn_sigscan/sn_sigscan.h:     check for missing prerequisite headers?" >&5
12292
-echo "$as_me: WARNING: sn_sigscan/sn_sigscan.h:     check for missing prerequisite headers?" >&2;}
12293
-    { echo "$as_me:$LINENO: WARNING: sn_sigscan/sn_sigscan.h: see the Autoconf documentation" >&5
12294
-echo "$as_me: WARNING: sn_sigscan/sn_sigscan.h: see the Autoconf documentation" >&2;}
12295
-    { echo "$as_me:$LINENO: WARNING: sn_sigscan/sn_sigscan.h:     section \"Present But Cannot Be Compiled\"" >&5
12296
-echo "$as_me: WARNING: sn_sigscan/sn_sigscan.h:     section \"Present But Cannot Be Compiled\"" >&2;}
12297
-    { echo "$as_me:$LINENO: WARNING: sn_sigscan/sn_sigscan.h: proceeding with the preprocessor's result" >&5
12298
-echo "$as_me: WARNING: sn_sigscan/sn_sigscan.h: proceeding with the preprocessor's result" >&2;}
12299
-    { echo "$as_me:$LINENO: WARNING: sn_sigscan/sn_sigscan.h: in the future, the compiler will take precedence" >&5
12300
-echo "$as_me: WARNING: sn_sigscan/sn_sigscan.h: in the future, the compiler will take precedence" >&2;}
12289
+    { echo "$as_me:$LINENO: WARNING: dlfcn.h: present but cannot be compiled" >&5
12290
+echo "$as_me: WARNING: dlfcn.h: present but cannot be compiled" >&2;}
12291
+    { echo "$as_me:$LINENO: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&5
12292
+echo "$as_me: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&2;}
12293
+    { echo "$as_me:$LINENO: WARNING: dlfcn.h: see the Autoconf documentation" >&5
12294
+echo "$as_me: WARNING: dlfcn.h: see the Autoconf documentation" >&2;}
12295
+    { echo "$as_me:$LINENO: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&5
12296
+echo "$as_me: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&2;}
12297
+    { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&5
12298
+echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;}
12299
+    { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5
12300
+echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;}
12301 12301
 
12302 12302
     ;;
12303 12303
 esac
12304
-{ echo "$as_me:$LINENO: checking for sn_sigscan/sn_sigscan.h" >&5
12305
-echo $ECHO_N "checking for sn_sigscan/sn_sigscan.h... $ECHO_C" >&6; }
12306
-if test "${ac_cv_header_sn_sigscan_sn_sigscan_h+set}" = set; then
12304
+{ echo "$as_me:$LINENO: checking for dlfcn.h" >&5
12305
+echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; }
12306
+if test "${ac_cv_header_dlfcn_h+set}" = set; then
12307 12307
   echo $ECHO_N "(cached) $ECHO_C" >&6
12308 12308
 else
12309
-  ac_cv_header_sn_sigscan_sn_sigscan_h=$ac_header_preproc
12309
+  ac_cv_header_dlfcn_h=$ac_header_preproc
12310 12310
 fi
12311
-{ echo "$as_me:$LINENO: result: $ac_cv_header_sn_sigscan_sn_sigscan_h" >&5
12312
-echo "${ECHO_T}$ac_cv_header_sn_sigscan_sn_sigscan_h" >&6; }
12311
+{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
12312
+echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; }
12313 12313
 
12314 12314
 fi
12315
-if test $ac_cv_header_sn_sigscan_sn_sigscan_h = yes; then
12316
-  LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -lsn_sigscan";
12315
+if test $ac_cv_header_dlfcn_h = yes; then
12316
+  LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -ldl" ;
12317 12317
 cat >>confdefs.h <<\_ACEOF
12318 12318
 #define HAVE_NCORE 1
12319 12319
 _ACEOF
12320 12320
 
12321 12321
 else
12322
-  { echo "$as_me:$LINENO: WARNING: ****** hardware acceleration support disabled -- please install libsigscan-devel " >&5
12323
-echo "$as_me: WARNING: ****** hardware acceleration support disabled -- please install libsigscan-devel " >&2;}
12322
+  { echo "$as_me:$LINENO: WARNING: ****** NodalCore support disabled (no support for dlopen)" >&5
12323
+echo "$as_me: WARNING: ****** NodalCore support disabled (no support for dlopen)" >&2;}
12324 12324
 fi
12325 12325
 
12326 12326
 
12327
-    fi
12328 12327
 fi
12329 12328
 
12330 12329
 # Check whether --enable-dns was given.
... ...
@@ -12378,27 +11579,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12378 12378
   rm -f conftest.er1
12379 12379
   cat conftest.err >&5
12380 12380
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12381
-  (exit $ac_status); } &&
12382
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12383
-  { (case "(($ac_try" in
12384
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12385
-  *) ac_try_echo=$ac_try;;
12386
-esac
12387
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12388
-  (eval "$ac_try") 2>&5
12389
-  ac_status=$?
12390
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12391
-  (exit $ac_status); }; } &&
12392
-	 { ac_try='test -s conftest$ac_exeext'
12393
-  { (case "(($ac_try" in
12394
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12395
-  *) ac_try_echo=$ac_try;;
12396
-esac
12397
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12398
-  (eval "$ac_try") 2>&5
12399
-  ac_status=$?
12400
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12401
-  (exit $ac_status); }; }; then
12381
+  (exit $ac_status); } && {
12382
+	 test -z "$ac_c_werror_flag" ||
12383
+	 test ! -s conftest.err
12384
+       } && test -s conftest$ac_exeext &&
12385
+       $as_test_x conftest$ac_exeext; then
12402 12386
   ac_cv_lib_resolv___dn_expand=yes
12403 12387
 else
12404 12388
   echo "$as_me: failed program was:" >&5
... ...
@@ -12460,27 +11645,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12460 12460
   rm -f conftest.er1
12461 12461
   cat conftest.err >&5
12462 12462
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12463
-  (exit $ac_status); } &&
12464
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12465
-  { (case "(($ac_try" in
12466
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12467
-  *) ac_try_echo=$ac_try;;
12468
-esac
12469
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12470
-  (eval "$ac_try") 2>&5
12471
-  ac_status=$?
12472
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12473
-  (exit $ac_status); }; } &&
12474
-	 { ac_try='test -s conftest$ac_exeext'
12475
-  { (case "(($ac_try" in
12476
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12477
-  *) ac_try_echo=$ac_try;;
12478
-esac
12479
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12480
-  (eval "$ac_try") 2>&5
12481
-  ac_status=$?
12482
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12483
-  (exit $ac_status); }; }; then
12463
+  (exit $ac_status); } && {
12464
+	 test -z "$ac_c_werror_flag" ||
12465
+	 test ! -s conftest.err
12466
+       } && test -s conftest$ac_exeext &&
12467
+       $as_test_x conftest$ac_exeext; then
12484 12468
   ac_cv_lib_resolv_dn_expand=yes
12485 12469
 else
12486 12470
   echo "$as_me: failed program was:" >&5
... ...
@@ -12534,27 +11703,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12534 12534
   rm -f conftest.er1
12535 12535
   cat conftest.err >&5
12536 12536
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12537
-  (exit $ac_status); } &&
12538
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12539
-  { (case "(($ac_try" in
12540
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12541
-  *) ac_try_echo=$ac_try;;
12542
-esac
12543
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12544
-  (eval "$ac_try") 2>&5
12545
-  ac_status=$?
12546
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12547
-  (exit $ac_status); }; } &&
12548
-	 { ac_try='test -s conftest.$ac_objext'
12549
-  { (case "(($ac_try" in
12550
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12551
-  *) ac_try_echo=$ac_try;;
12552
-esac
12553
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12554
-  (eval "$ac_try") 2>&5
12555
-  ac_status=$?
12556
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12557
-  (exit $ac_status); }; }; then
12537
+  (exit $ac_status); } && {
12538
+	 test -z "$ac_c_werror_flag" ||
12539
+	 test ! -s conftest.err
12540
+       } && test -s conftest.$ac_objext; then
12558 12541
   ac_header_compiler=yes
12559 12542
 else
12560 12543
   echo "$as_me: failed program was:" >&5
... ...
@@ -12590,17 +11742,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12590 12590
   rm -f conftest.er1
12591 12591
   cat conftest.err >&5
12592 12592
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12593
-  (exit $ac_status); } >/dev/null; then
12594
-  if test -s conftest.err; then
12595
-    ac_cpp_err=$ac_c_preproc_warn_flag
12596
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
12597
-  else
12598
-    ac_cpp_err=
12599
-  fi
12600
-else
12601
-  ac_cpp_err=yes
12602
-fi
12603
-if test -z "$ac_cpp_err"; then
12593
+  (exit $ac_status); } >/dev/null && {
12594
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12595
+	 test ! -s conftest.err
12596
+       }; then
12604 12597
   ac_header_preproc=yes
12605 12598
 else
12606 12599
   echo "$as_me: failed program was:" >&5
... ...
@@ -12783,7 +11928,7 @@ do
12783 12783
   IFS=$as_save_IFS
12784 12784
   test -z "$as_dir" && as_dir=.
12785 12785
   for ac_exec_ext in '' $ac_executable_extensions; do
12786
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
12786
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12787 12787
     ac_cv_path_sendmailprog="$as_dir/$ac_word$ac_exec_ext"
12788 12788
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12789 12789
     break 2
... ...
@@ -12891,27 +12036,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12891 12891
   rm -f conftest.er1
12892 12892
   cat conftest.err >&5
12893 12893
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12894
-  (exit $ac_status); } &&
12895
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12896
-  { (case "(($ac_try" in
12897
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12898
-  *) ac_try_echo=$ac_try;;
12899
-esac
12900
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12901
-  (eval "$ac_try") 2>&5
12902
-  ac_status=$?
12903
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12904
-  (exit $ac_status); }; } &&
12905
-	 { ac_try='test -s conftest$ac_exeext'
12906
-  { (case "(($ac_try" in
12907
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12908
-  *) ac_try_echo=$ac_try;;
12909
-esac
12910
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12911
-  (eval "$ac_try") 2>&5
12912
-  ac_status=$?
12913
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12914
-  (exit $ac_status); }; }; then
12894
+  (exit $ac_status); } && {
12895
+	 test -z "$ac_c_werror_flag" ||
12896
+	 test ! -s conftest.err
12897
+       } && test -s conftest$ac_exeext &&
12898
+       $as_test_x conftest$ac_exeext; then
12915 12899
   ac_cv_lib_gmp___gmpz_init=yes
12916 12900
 else
12917 12901
   echo "$as_me: failed program was:" >&5
... ...
@@ -12975,27 +12104,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12975 12975
   rm -f conftest.er1
12976 12976
   cat conftest.err >&5
12977 12977
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12978
-  (exit $ac_status); } &&
12979
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12980
-  { (case "(($ac_try" in
12981
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12982
-  *) ac_try_echo=$ac_try;;
12983
-esac
12984
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12985
-  (eval "$ac_try") 2>&5
12986
-  ac_status=$?
12987
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12988
-  (exit $ac_status); }; } &&
12989
-	 { ac_try='test -s conftest$ac_exeext'
12990
-  { (case "(($ac_try" in
12991
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12992
-  *) ac_try_echo=$ac_try;;
12993
-esac
12994
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12995
-  (eval "$ac_try") 2>&5
12996
-  ac_status=$?
12997
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
12998
-  (exit $ac_status); }; }; then
12978
+  (exit $ac_status); } && {
12979
+	 test -z "$ac_c_werror_flag" ||
12980
+	 test ! -s conftest.err
12981
+       } && test -s conftest$ac_exeext &&
12982
+       $as_test_x conftest$ac_exeext; then
12999 12983
   ac_cv_lib_gmp_mpz_init=yes
13000 12984
 else
13001 12985
   echo "$as_me: failed program was:" >&5
... ...
@@ -13898,27 +13011,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13898 13898
   rm -f conftest.er1
13899 13899
   cat conftest.err >&5
13900 13900
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13901
-  (exit $ac_status); } &&
13902
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13903
-  { (case "(($ac_try" in
13904
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13905
-  *) ac_try_echo=$ac_try;;
13906
-esac
13907
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13908
-  (eval "$ac_try") 2>&5
13909
-  ac_status=$?
13910
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13911
-  (exit $ac_status); }; } &&
13912
-	 { ac_try='test -s conftest$ac_exeext'
13913
-  { (case "(($ac_try" in
13914
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13915
-  *) ac_try_echo=$ac_try;;
13916
-esac
13917
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13918
-  (eval "$ac_try") 2>&5
13919
-  ac_status=$?
13920
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13921
-  (exit $ac_status); }; }; then
13901
+  (exit $ac_status); } && {
13902
+	 test -z "$ac_c_werror_flag" ||
13903
+	 test ! -s conftest.err
13904
+       } && test -s conftest$ac_exeext &&
13905
+       $as_test_x conftest$ac_exeext; then
13922 13906
   ac_cv_lib_milter_mi_stop=yes
13923 13907
 else
13924 13908
   echo "$as_me: failed program was:" >&5
... ...
@@ -13985,27 +13082,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13985 13985
   rm -f conftest.er1
13986 13986
   cat conftest.err >&5
13987 13987
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13988
-  (exit $ac_status); } &&
13989
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13990
-  { (case "(($ac_try" in
13991
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13992
-  *) ac_try_echo=$ac_try;;
13993
-esac
13994
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13995
-  (eval "$ac_try") 2>&5
13996
-  ac_status=$?
13997
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
13998
-  (exit $ac_status); }; } &&
13999
-	 { ac_try='test -s conftest$ac_exeext'
14000
-  { (case "(($ac_try" in
14001
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14002
-  *) ac_try_echo=$ac_try;;
14003
-esac
14004
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14005
-  (eval "$ac_try") 2>&5
14006
-  ac_status=$?
14007
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14008
-  (exit $ac_status); }; }; then
13988
+  (exit $ac_status); } && {
13989
+	 test -z "$ac_c_werror_flag" ||
13990
+	 test ! -s conftest.err
13991
+       } && test -s conftest$ac_exeext &&
13992
+       $as_test_x conftest$ac_exeext; then
14009 13993
   ac_cv_search_strlcpy=$ac_res
14010 13994
 else
14011 13995
   echo "$as_me: failed program was:" >&5
... ...
@@ -14080,27 +13161,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14080 14080
   rm -f conftest.er1
14081 14081
   cat conftest.err >&5
14082 14082
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14083
-  (exit $ac_status); } &&
14084
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14085
-  { (case "(($ac_try" in
14086
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14087
-  *) ac_try_echo=$ac_try;;
14088
-esac
14089
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14090
-  (eval "$ac_try") 2>&5
14091
-  ac_status=$?
14092
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14093
-  (exit $ac_status); }; } &&
14094
-	 { ac_try='test -s conftest$ac_exeext'
14095
-  { (case "(($ac_try" in
14096
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14097
-  *) ac_try_echo=$ac_try;;
14098
-esac
14099
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14100
-  (eval "$ac_try") 2>&5
14101
-  ac_status=$?
14102
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14103
-  (exit $ac_status); }; }; then
14083
+  (exit $ac_status); } && {
14084
+	 test -z "$ac_c_werror_flag" ||
14085
+	 test ! -s conftest.err
14086
+       } && test -s conftest$ac_exeext &&
14087
+       $as_test_x conftest$ac_exeext; then
14104 14088
   ac_cv_lib_milter_mi_stop=yes
14105 14089
 else
14106 14090
   echo "$as_me: failed program was:" >&5
... ...
@@ -14168,27 +13233,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14168 14168
   rm -f conftest.er1
14169 14169
   cat conftest.err >&5
14170 14170
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14171
-  (exit $ac_status); } &&
14172
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14173
-  { (case "(($ac_try" in
14174
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14175
-  *) ac_try_echo=$ac_try;;
14176
-esac
14177
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14178
-  (eval "$ac_try") 2>&5
14179
-  ac_status=$?
14180
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14181
-  (exit $ac_status); }; } &&
14182
-	 { ac_try='test -s conftest.$ac_objext'
14183
-  { (case "(($ac_try" in
14184
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14185
-  *) ac_try_echo=$ac_try;;
14186
-esac
14187
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14188
-  (eval "$ac_try") 2>&5
14189
-  ac_status=$?
14190
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14191
-  (exit $ac_status); }; }; then
14171
+  (exit $ac_status); } && {
14172
+	 test -z "$ac_c_werror_flag" ||
14173
+	 test ! -s conftest.err
14174
+       } && test -s conftest.$ac_objext; then
14192 14175
   ac_header_compiler=yes
14193 14176
 else
14194 14177
   echo "$as_me: failed program was:" >&5
... ...
@@ -14224,17 +13272,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14224 14224
   rm -f conftest.er1
14225 14225
   cat conftest.err >&5
14226 14226
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14227
-  (exit $ac_status); } >/dev/null; then
14228
-  if test -s conftest.err; then
14229
-    ac_cpp_err=$ac_c_preproc_warn_flag
14230
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
14231
-  else
14232
-    ac_cpp_err=
14233
-  fi
14234
-else
14235
-  ac_cpp_err=yes
14236
-fi
14237
-if test -z "$ac_cpp_err"; then
14227
+  (exit $ac_status); } >/dev/null && {
14228
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14229
+	 test ! -s conftest.err
14230
+       }; then
14238 14231
   ac_header_preproc=yes
14239 14232
 else
14240 14233
   echo "$as_me: failed program was:" >&5
... ...
@@ -14399,27 +13440,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14399 14399
   rm -f conftest.er1
14400 14400
   cat conftest.err >&5
14401 14401
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14402
-  (exit $ac_status); } &&
14403
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14404
-  { (case "(($ac_try" in
14405
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14406
-  *) ac_try_echo=$ac_try;;
14407
-esac
14408
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14409
-  (eval "$ac_try") 2>&5
14410
-  ac_status=$?
14411
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14412
-  (exit $ac_status); }; } &&
14413
-	 { ac_try='test -s conftest$ac_exeext'
14414
-  { (case "(($ac_try" in
14415
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14416
-  *) ac_try_echo=$ac_try;;
14417
-esac
14418
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14419
-  (eval "$ac_try") 2>&5
14420
-  ac_status=$?
14421
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14422
-  (exit $ac_status); }; }; then
14402
+  (exit $ac_status); } && {
14403
+	 test -z "$ac_c_werror_flag" ||
14404
+	 test ! -s conftest.err
14405
+       } && test -s conftest$ac_exeext &&
14406
+       $as_test_x conftest$ac_exeext; then
14423 14407
   eval "$as_ac_var=yes"
14424 14408
 else
14425 14409
   echo "$as_me: failed program was:" >&5
... ...
@@ -14654,27 +13679,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14654 14654
   rm -f conftest.er1
14655 14655
   cat conftest.err >&5
14656 14656
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14657
-  (exit $ac_status); } &&
14658
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14659
-  { (case "(($ac_try" in
14660
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14661
-  *) ac_try_echo=$ac_try;;
14662
-esac
14663
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14664
-  (eval "$ac_try") 2>&5
14665
-  ac_status=$?
14666
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14667
-  (exit $ac_status); }; } &&
14668
-	 { ac_try='test -s conftest.$ac_objext'
14669
-  { (case "(($ac_try" in
14670
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14671
-  *) ac_try_echo=$ac_try;;
14672
-esac
14673
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14674
-  (eval "$ac_try") 2>&5
14675
-  ac_status=$?
14676
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14677
-  (exit $ac_status); }; }; then
14657
+  (exit $ac_status); } && {
14658
+	 test -z "$ac_c_werror_flag" ||
14659
+	 test ! -s conftest.err
14660
+       } && test -s conftest.$ac_objext; then
14678 14661
   ac_header_compiler=yes
14679 14662
 else
14680 14663
   echo "$as_me: failed program was:" >&5
... ...
@@ -14710,17 +13718,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14710 14710
   rm -f conftest.er1
14711 14711
   cat conftest.err >&5
14712 14712
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14713
-  (exit $ac_status); } >/dev/null; then
14714
-  if test -s conftest.err; then
14715
-    ac_cpp_err=$ac_c_preproc_warn_flag
14716
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
14717
-  else
14718
-    ac_cpp_err=
14719
-  fi
14720
-else
14721
-  ac_cpp_err=yes
14722
-fi
14723
-if test -z "$ac_cpp_err"; then
14713
+  (exit $ac_status); } >/dev/null && {
14714
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14715
+	 test ! -s conftest.err
14716
+       }; then
14724 14717
   ac_header_preproc=yes
14725 14718
 else
14726 14719
   echo "$as_me: failed program was:" >&5
... ...
@@ -14815,27 +13816,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14815 14815
   rm -f conftest.er1
14816 14816
   cat conftest.err >&5
14817 14817
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14818
-  (exit $ac_status); } &&
14819
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14820
-  { (case "(($ac_try" in
14821
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14822
-  *) ac_try_echo=$ac_try;;
14823
-esac
14824
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14825
-  (eval "$ac_try") 2>&5
14826
-  ac_status=$?
14827
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14828
-  (exit $ac_status); }; } &&
14829
-	 { ac_try='test -s conftest$ac_exeext'
14830
-  { (case "(($ac_try" in
14831
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14832
-  *) ac_try_echo=$ac_try;;
14833
-esac
14834
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14835
-  (eval "$ac_try") 2>&5
14836
-  ac_status=$?
14837
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14838
-  (exit $ac_status); }; }; then
14818
+  (exit $ac_status); } && {
14819
+	 test -z "$ac_c_werror_flag" ||
14820
+	 test ! -s conftest.err
14821
+       } && test -s conftest$ac_exeext &&
14822
+       $as_test_x conftest$ac_exeext; then
14839 14823
   { echo "$as_me:$LINENO: result: -lwrap" >&5
14840 14824
 echo "${ECHO_T}-lwrap" >&6; }
14841 14825
                 have_wrappers=yes
... ...
@@ -14883,27 +13868,11 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14883 14883
   rm -f conftest.er1
14884 14884
   cat conftest.err >&5
14885 14885
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14886
-  (exit $ac_status); } &&
14887
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14888
-  { (case "(($ac_try" in
14889
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14890
-  *) ac_try_echo=$ac_try;;
14891
-esac
14892
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14893
-  (eval "$ac_try") 2>&5
14894
-  ac_status=$?
14895
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14896
-  (exit $ac_status); }; } &&
14897
-	 { ac_try='test -s conftest$ac_exeext'
14898
-  { (case "(($ac_try" in
14899
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14900
-  *) ac_try_echo=$ac_try;;
14901
-esac
14902
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14903
-  (eval "$ac_try") 2>&5
14904
-  ac_status=$?
14905
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
14906
-  (exit $ac_status); }; }; then
14886
+  (exit $ac_status); } && {
14887
+	 test -z "$ac_c_werror_flag" ||
14888
+	 test ! -s conftest.err
14889
+       } && test -s conftest$ac_exeext &&
14890
+       $as_test_x conftest$ac_exeext; then
14907 14891
   { echo "$as_me:$LINENO: result: -lwrap -lnsl" >&5
14908 14892
 echo "${ECHO_T}-lwrap -lnsl" >&6; }
14909 14893
                 have_wrappers=yes
... ...
@@ -14989,27 +13958,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14989 14989
   rm -f conftest.er1
14990 14990
   cat conftest.err >&5
14991 14991
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14992
-  (exit $ac_status); } &&
14993
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14994
-  { (case "(($ac_try" in
14995
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14996
-  *) ac_try_echo=$ac_try;;
14997
-esac
14998
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14999
-  (eval "$ac_try") 2>&5
15000
-  ac_status=$?
15001
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15002
-  (exit $ac_status); }; } &&
15003
-	 { ac_try='test -s conftest.$ac_objext'
15004
-  { (case "(($ac_try" in
15005
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15006
-  *) ac_try_echo=$ac_try;;
15007
-esac
15008
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15009
-  (eval "$ac_try") 2>&5
15010
-  ac_status=$?
15011
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15012
-  (exit $ac_status); }; }; then
14992
+  (exit $ac_status); } && {
14993
+	 test -z "$ac_c_werror_flag" ||
14994
+	 test ! -s conftest.err
14995
+       } && test -s conftest.$ac_objext; then
15013 14996
   ac_cv_gethostbyname_args=5
15014 14997
 else
15015 14998
   echo "$as_me: failed program was:" >&5
... ...
@@ -15058,27 +14010,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15058 15058
   rm -f conftest.er1
15059 15059
   cat conftest.err >&5
15060 15060
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15061
-  (exit $ac_status); } &&
15062
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15063
-  { (case "(($ac_try" in
15064
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15065
-  *) ac_try_echo=$ac_try;;
15066
-esac
15067
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15068
-  (eval "$ac_try") 2>&5
15069
-  ac_status=$?
15070
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15071
-  (exit $ac_status); }; } &&
15072
-	 { ac_try='test -s conftest.$ac_objext'
15073
-  { (case "(($ac_try" in
15074
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15075
-  *) ac_try_echo=$ac_try;;
15076
-esac
15077
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15078
-  (eval "$ac_try") 2>&5
15079
-  ac_status=$?
15080
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15081
-  (exit $ac_status); }; }; then
15061
+  (exit $ac_status); } && {
15062
+	 test -z "$ac_c_werror_flag" ||
15063
+	 test ! -s conftest.err
15064
+       } && test -s conftest.$ac_objext; then
15082 15065
   ac_cv_gethostbyname_args=3
15083 15066
 else
15084 15067
   echo "$as_me: failed program was:" >&5
... ...
@@ -15130,27 +14065,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15130 15130
   rm -f conftest.er1
15131 15131
   cat conftest.err >&5
15132 15132
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15133
-  (exit $ac_status); } &&
15134
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15135
-  { (case "(($ac_try" in
15136
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15137
-  *) ac_try_echo=$ac_try;;
15138
-esac
15139
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15140
-  (eval "$ac_try") 2>&5
15141
-  ac_status=$?
15142
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15143
-  (exit $ac_status); }; } &&
15144
-	 { ac_try='test -s conftest.$ac_objext'
15145
-  { (case "(($ac_try" in
15146
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15147
-  *) ac_try_echo=$ac_try;;
15148
-esac
15149
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15150
-  (eval "$ac_try") 2>&5
15151
-  ac_status=$?
15152
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15153
-  (exit $ac_status); }; }; then
15133
+  (exit $ac_status); } && {
15134
+	 test -z "$ac_c_werror_flag" ||
15135
+	 test ! -s conftest.err
15136
+       } && test -s conftest.$ac_objext; then
15154 15137
   ac_cv_gethostbyname_args=6
15155 15138
 else
15156 15139
   echo "$as_me: failed program was:" >&5
... ...
@@ -15237,27 +14155,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15237 15237
   rm -f conftest.er1
15238 15238
   cat conftest.err >&5
15239 15239
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15240
-  (exit $ac_status); } &&
15241
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15242
-  { (case "(($ac_try" in
15243
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15244
-  *) ac_try_echo=$ac_try;;
15245
-esac
15246
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15247
-  (eval "$ac_try") 2>&5
15248
-  ac_status=$?
15249
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15250
-  (exit $ac_status); }; } &&
15251
-	 { ac_try='test -s conftest.$ac_objext'
15252
-  { (case "(($ac_try" in
15253
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15254
-  *) ac_try_echo=$ac_try;;
15255
-esac
15256
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15257
-  (eval "$ac_try") 2>&5
15258
-  ac_status=$?
15259
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15260
-  (exit $ac_status); }; }; then
15240
+  (exit $ac_status); } && {
15241
+	 test -z "$ac_c_werror_flag" ||
15242
+	 test ! -s conftest.err
15243
+       } && test -s conftest.$ac_objext; then
15261 15244
   ac_cv_readdir_args=2
15262 15245
 else
15263 15246
   echo "$as_me: failed program was:" >&5
... ...
@@ -15305,27 +14206,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15305 15305
   rm -f conftest.er1
15306 15306
   cat conftest.err >&5
15307 15307
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15308
-  (exit $ac_status); } &&
15309
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15310
-  { (case "(($ac_try" in
15311
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15312
-  *) ac_try_echo=$ac_try;;
15313
-esac
15314
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15315
-  (eval "$ac_try") 2>&5
15316
-  ac_status=$?
15317
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15318
-  (exit $ac_status); }; } &&
15319
-	 { ac_try='test -s conftest.$ac_objext'
15320
-  { (case "(($ac_try" in
15321
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15322
-  *) ac_try_echo=$ac_try;;
15323
-esac
15324
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15325
-  (eval "$ac_try") 2>&5
15326
-  ac_status=$?
15327
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15328
-  (exit $ac_status); }; }; then
15308
+  (exit $ac_status); } && {
15309
+	 test -z "$ac_c_werror_flag" ||
15310
+	 test ! -s conftest.err
15311
+       } && test -s conftest.$ac_objext; then
15329 15312
   ac_cv_readdir_args=3
15330 15313
 else
15331 15314
   echo "$as_me: failed program was:" >&5
... ...
@@ -15406,27 +14290,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15406 15406
   rm -f conftest.er1
15407 15407
   cat conftest.err >&5
15408 15408
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15409
-  (exit $ac_status); } &&
15410
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15411
-  { (case "(($ac_try" in
15412
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15413
-  *) ac_try_echo=$ac_try;;
15414
-esac
15415
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15416
-  (eval "$ac_try") 2>&5
15417
-  ac_status=$?
15418
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15419
-  (exit $ac_status); }; } &&
15420
-	 { ac_try='test -s conftest.$ac_objext'
15421
-  { (case "(($ac_try" in
15422
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15423
-  *) ac_try_echo=$ac_try;;
15424
-esac
15425
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15426
-  (eval "$ac_try") 2>&5
15427
-  ac_status=$?
15428
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15429
-  (exit $ac_status); }; }; then
15409
+  (exit $ac_status); } && {
15410
+	 test -z "$ac_c_werror_flag" ||
15411
+	 test ! -s conftest.err
15412
+       } && test -s conftest.$ac_objext; then
15430 15413
 
15431 15414
 	ac_cv_ctime_args=3
15432 15415
 
... ...
@@ -15496,27 +14363,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15496 15496
   rm -f conftest.er1
15497 15497
   cat conftest.err >&5
15498 15498
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15499
-  (exit $ac_status); } &&
15500
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15501
-  { (case "(($ac_try" in
15502
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15503
-  *) ac_try_echo=$ac_try;;
15504
-esac
15505
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15506
-  (eval "$ac_try") 2>&5
15507
-  ac_status=$?
15508
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15509
-  (exit $ac_status); }; } &&
15510
-	 { ac_try='test -s conftest.$ac_objext'
15511
-  { (case "(($ac_try" in
15512
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15513
-  *) ac_try_echo=$ac_try;;
15514
-esac
15515
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15516
-  (eval "$ac_try") 2>&5
15517
-  ac_status=$?
15518
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15519
-  (exit $ac_status); }; }; then
15499
+  (exit $ac_status); } && {
15500
+	 test -z "$ac_c_werror_flag" ||
15501
+	 test ! -s conftest.err
15502
+       } && test -s conftest.$ac_objext; then
15520 15503
 
15521 15504
 	ac_cv_socklen_t=yes
15522 15505
 
... ...
@@ -15576,27 +14426,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15576 15576
   rm -f conftest.er1
15577 15577
   cat conftest.err >&5
15578 15578
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15579
-  (exit $ac_status); } &&
15580
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15581
-  { (case "(($ac_try" in
15582
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15583
-  *) ac_try_echo=$ac_try;;
15584
-esac
15585
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15586
-  (eval "$ac_try") 2>&5
15587
-  ac_status=$?
15588
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15589
-  (exit $ac_status); }; } &&
15590
-	 { ac_try='test -s conftest.$ac_objext'
15591
-  { (case "(($ac_try" in
15592
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15593
-  *) ac_try_echo=$ac_try;;
15594
-esac
15595
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15596
-  (eval "$ac_try") 2>&5
15597
-  ac_status=$?
15598
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15599
-  (exit $ac_status); }; }; then
15579
+  (exit $ac_status); } && {
15580
+	 test -z "$ac_c_werror_flag" ||
15581
+	 test ! -s conftest.err
15582
+       } && test -s conftest.$ac_objext; then
15600 15583
 
15601 15584
 		ac_cv_socklen_t_equiv="$t"
15602 15585
 		break
... ...
@@ -15656,7 +14489,7 @@ do
15656 15656
   IFS=$as_save_IFS
15657 15657
   test -z "$as_dir" && as_dir=.
15658 15658
   for ac_exec_ext in '' $ac_executable_extensions; do
15659
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
15659
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15660 15660
     ac_cv_path_GETENT="$as_dir/$ac_word$ac_exec_ext"
15661 15661
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15662 15662
     break 2
... ...
@@ -15801,27 +14634,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15801 15801
   rm -f conftest.er1
15802 15802
   cat conftest.err >&5
15803 15803
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15804
-  (exit $ac_status); } &&
15805
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15806
-  { (case "(($ac_try" in
15807
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15808
-  *) ac_try_echo=$ac_try;;
15809
-esac
15810
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15811
-  (eval "$ac_try") 2>&5
15812
-  ac_status=$?
15813
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15814
-  (exit $ac_status); }; } &&
15815
-	 { ac_try='test -s conftest.$ac_objext'
15816
-  { (case "(($ac_try" in
15817
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15818
-  *) ac_try_echo=$ac_try;;
15819
-esac
15820
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15821
-  (eval "$ac_try") 2>&5
15822
-  ac_status=$?
15823
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15824
-  (exit $ac_status); }; }; then
15804
+  (exit $ac_status); } && {
15805
+	 test -z "$ac_c_werror_flag" ||
15806
+	 test ! -s conftest.err
15807
+       } && test -s conftest.$ac_objext; then
15825 15808
   ac_cv_c_const=yes
15826 15809
 else
15827 15810
   echo "$as_me: failed program was:" >&5
... ...
@@ -15875,27 +14691,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15875 15875
   rm -f conftest.er1
15876 15876
   cat conftest.err >&5
15877 15877
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15878
-  (exit $ac_status); } &&
15879
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15880
-  { (case "(($ac_try" in
15881
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15882
-  *) ac_try_echo=$ac_try;;
15883
-esac
15884
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15885
-  (eval "$ac_try") 2>&5
15886
-  ac_status=$?
15887
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15888
-  (exit $ac_status); }; } &&
15889
-	 { ac_try='test -s conftest.$ac_objext'
15890
-  { (case "(($ac_try" in
15891
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15892
-  *) ac_try_echo=$ac_try;;
15893
-esac
15894
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15895
-  (eval "$ac_try") 2>&5
15896
-  ac_status=$?
15897
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15898
-  (exit $ac_status); }; }; then
15878
+  (exit $ac_status); } && {
15879
+	 test -z "$ac_c_werror_flag" ||
15880
+	 test ! -s conftest.err
15881
+       } && test -s conftest.$ac_objext; then
15899 15882
   ac_cv_c_inline=$ac_kw
15900 15883
 else
15901 15884
   echo "$as_me: failed program was:" >&5
... ...
@@ -15968,27 +14767,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15968 15968
   rm -f conftest.er1
15969 15969
   cat conftest.err >&5
15970 15970
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15971
-  (exit $ac_status); } &&
15972
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15973
-  { (case "(($ac_try" in
15974
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15975
-  *) ac_try_echo=$ac_try;;
15976
-esac
15977
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15978
-  (eval "$ac_try") 2>&5
15979
-  ac_status=$?
15980
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15981
-  (exit $ac_status); }; } &&
15982
-	 { ac_try='test -s conftest.$ac_objext'
15983
-  { (case "(($ac_try" in
15984
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15985
-  *) ac_try_echo=$ac_try;;
15986
-esac
15987
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15988
-  (eval "$ac_try") 2>&5
15989
-  ac_status=$?
15990
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
15991
-  (exit $ac_status); }; }; then
15971
+  (exit $ac_status); } && {
15972
+	 test -z "$ac_c_werror_flag" ||
15973
+	 test ! -s conftest.err
15974
+       } && test -s conftest.$ac_objext; then
15992 15975
   # It does; now see whether it defined to BIG_ENDIAN or not.
15993 15976
 cat >conftest.$ac_ext <<_ACEOF
15994 15977
 /* confdefs.h.  */
... ...
@@ -16023,27 +14805,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16023 16023
   rm -f conftest.er1
16024 16024
   cat conftest.err >&5
16025 16025
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16026
-  (exit $ac_status); } &&
16027
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16028
-  { (case "(($ac_try" in
16029
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16030
-  *) ac_try_echo=$ac_try;;
16031
-esac
16032
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16033
-  (eval "$ac_try") 2>&5
16034
-  ac_status=$?
16035
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16036
-  (exit $ac_status); }; } &&
16037
-	 { ac_try='test -s conftest.$ac_objext'
16038
-  { (case "(($ac_try" in
16039
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16040
-  *) ac_try_echo=$ac_try;;
16041
-esac
16042
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16043
-  (eval "$ac_try") 2>&5
16044
-  ac_status=$?
16045
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16046
-  (exit $ac_status); }; }; then
16026
+  (exit $ac_status); } && {
16027
+	 test -z "$ac_c_werror_flag" ||
16028
+	 test ! -s conftest.err
16029
+       } && test -s conftest.$ac_objext; then
16047 16030
   ac_cv_c_bigendian=yes
16048 16031
 else
16049 16032
   echo "$as_me: failed program was:" >&5
... ...
@@ -16094,27 +14859,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16094 16094
   rm -f conftest.er1
16095 16095
   cat conftest.err >&5
16096 16096
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16097
-  (exit $ac_status); } &&
16098
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16099
-  { (case "(($ac_try" in
16100
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16101
-  *) ac_try_echo=$ac_try;;
16102
-esac
16103
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16104
-  (eval "$ac_try") 2>&5
16105
-  ac_status=$?
16106
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16107
-  (exit $ac_status); }; } &&
16108
-	 { ac_try='test -s conftest.$ac_objext'
16109
-  { (case "(($ac_try" in
16110
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16111
-  *) ac_try_echo=$ac_try;;
16112
-esac
16113
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16114
-  (eval "$ac_try") 2>&5
16115
-  ac_status=$?
16116
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16117
-  (exit $ac_status); }; }; then
16097
+  (exit $ac_status); } && {
16098
+	 test -z "$ac_c_werror_flag" ||
16099
+	 test ! -s conftest.err
16100
+       } && test -s conftest.$ac_objext; then
16118 16101
   if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
16119 16102
   ac_cv_c_bigendian=yes
16120 16103
 fi
... ...
@@ -16263,27 +15011,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16263 16263
   rm -f conftest.er1
16264 16264
   cat conftest.err >&5
16265 16265
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16266
-  (exit $ac_status); } &&
16267
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16268
-  { (case "(($ac_try" in
16269
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16270
-  *) ac_try_echo=$ac_try;;
16271
-esac
16272
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16273
-  (eval "$ac_try") 2>&5
16274
-  ac_status=$?
16275
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16276
-  (exit $ac_status); }; } &&
16277
-	 { ac_try='test -s conftest.$ac_objext'
16278
-  { (case "(($ac_try" in
16279
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16280
-  *) ac_try_echo=$ac_try;;
16281
-esac
16282
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16283
-  (eval "$ac_try") 2>&5
16284
-  ac_status=$?
16285
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16286
-  (exit $ac_status); }; }; then
16266
+  (exit $ac_status); } && {
16267
+	 test -z "$ac_c_werror_flag" ||
16268
+	 test ! -s conftest.err
16269
+       } && test -s conftest.$ac_objext; then
16287 16270
   have_attrib_packed=yes
16288 16271
 else
16289 16272
   echo "$as_me: failed program was:" >&5
... ...
@@ -16403,27 +15134,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16403 16403
   rm -f conftest.er1
16404 16404
   cat conftest.err >&5
16405 16405
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16406
-  (exit $ac_status); } &&
16407
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16408
-  { (case "(($ac_try" in
16409
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16410
-  *) ac_try_echo=$ac_try;;
16411
-esac
16412
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16413
-  (eval "$ac_try") 2>&5
16414
-  ac_status=$?
16415
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16416
-  (exit $ac_status); }; } &&
16417
-	 { ac_try='test -s conftest.$ac_objext'
16418
-  { (case "(($ac_try" in
16419
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16420
-  *) ac_try_echo=$ac_try;;
16421
-esac
16422
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16423
-  (eval "$ac_try") 2>&5
16424
-  ac_status=$?
16425
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16426
-  (exit $ac_status); }; }; then
16406
+  (exit $ac_status); } && {
16407
+	 test -z "$ac_c_werror_flag" ||
16408
+	 test ! -s conftest.err
16409
+       } && test -s conftest.$ac_objext; then
16427 16410
   have_attrib_aligned=yes
16428 16411
 else
16429 16412
   echo "$as_me: failed program was:" >&5
... ...
@@ -16491,27 +15205,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16491 16491
   rm -f conftest.er1
16492 16492
   cat conftest.err >&5
16493 16493
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16494
-  (exit $ac_status); } &&
16495
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16496
-  { (case "(($ac_try" in
16497
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16498
-  *) ac_try_echo=$ac_try;;
16499
-esac
16500
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16501
-  (eval "$ac_try") 2>&5
16502
-  ac_status=$?
16503
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16504
-  (exit $ac_status); }; } &&
16505
-	 { ac_try='test -s conftest.$ac_objext'
16506
-  { (case "(($ac_try" in
16507
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16508
-  *) ac_try_echo=$ac_try;;
16509
-esac
16510
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16511
-  (eval "$ac_try") 2>&5
16512
-  ac_status=$?
16513
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16514
-  (exit $ac_status); }; }; then
16494
+  (exit $ac_status); } && {
16495
+	 test -z "$ac_c_werror_flag" ||
16496
+	 test ! -s conftest.err
16497
+       } && test -s conftest.$ac_objext; then
16515 16498
   have_fd_set=yes
16516 16499
 else
16517 16500
   echo "$as_me: failed program was:" >&5
... ...
@@ -16781,7 +15478,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF
16781 16781
 ## M4sh Initialization.  ##
16782 16782
 ## --------------------- ##
16783 16783
 
16784
-# Be Bourne compatible
16784
+# Be more Bourne compatible
16785
+DUALCASE=1; export DUALCASE # for MKS sh
16785 16786
 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16786 16787
   emulate sh
16787 16788
   NULLCMD=:
... ...
@@ -16790,10 +15488,13 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16790 16790
   alias -g '${1+"$@"}'='"$@"'
16791 16791
   setopt NO_GLOB_SUBST
16792 16792
 else
16793
-  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
16793
+  case `(set -o) 2>/dev/null` in
16794
+  *posix*) set -o posix ;;
16795
+esac
16796
+
16794 16797
 fi
16795
-BIN_SH=xpg4; export BIN_SH # for Tru64
16796
-DUALCASE=1; export DUALCASE # for MKS sh
16798
+
16799
+
16797 16800
 
16798 16801
 
16799 16802
 # PATH needs CR
... ...
@@ -17017,19 +15718,28 @@ else
17017 17017
   as_mkdir_p=false
17018 17018
 fi
17019 17019
 
17020
-# Find out whether ``test -x'' works.  Don't use a zero-byte file, as
17021
-# systems may use methods other than mode bits to determine executability.
17022
-cat >conf$$.file <<_ASEOF
17023
-#! /bin/sh
17024
-exit 0
17025
-_ASEOF
17026
-chmod +x conf$$.file
17027
-if test -x conf$$.file >/dev/null 2>&1; then
17028
-  as_executable_p="test -x"
17020
+if test -x / >/dev/null 2>&1; then
17021
+  as_test_x='test -x'
17029 17022
 else
17030
-  as_executable_p=:
17023
+  if ls -dL / >/dev/null 2>&1; then
17024
+    as_ls_L_option=L
17025
+  else
17026
+    as_ls_L_option=
17027
+  fi
17028
+  as_test_x='
17029
+    eval sh -c '\''
17030
+      if test -d "$1"; then
17031
+        test -d "$1/.";
17032
+      else
17033
+	case $1 in
17034
+        -*)set "./$1";;
17035
+	esac;
17036
+	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
17037
+	???[sx]*):;;*)false;;esac;fi
17038
+    '\'' sh
17039
+  '
17031 17040
 fi
17032
-rm -f conf$$.file
17041
+as_executable_p=$as_test_x
17033 17042
 
17034 17043
 # Sed expression to map a string onto a valid CPP name.
17035 17044
 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
... ...
@@ -17045,7 +15755,7 @@ exec 6>&1
17045 17045
 # values after options handling.
17046 17046
 ac_log="
17047 17047
 This file was extended by $as_me, which was
17048
-generated by GNU Autoconf 2.60a.  Invocation command line was
17048
+generated by GNU Autoconf 2.61.  Invocation command line was
17049 17049
 
17050 17050
   CONFIG_FILES    = $CONFIG_FILES
17051 17051
   CONFIG_HEADERS  = $CONFIG_HEADERS
... ...
@@ -17098,7 +15808,7 @@ _ACEOF
17098 17098
 cat >>$CONFIG_STATUS <<_ACEOF
17099 17099
 ac_cs_version="\\
17100 17100
 config.status
17101
-configured by $0, generated by GNU Autoconf 2.60a,
17101
+configured by $0, generated by GNU Autoconf 2.61,
17102 17102
   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
17103 17103
 
17104 17104
 Copyright (C) 2006 Free Software Foundation, Inc.
... ...
@@ -141,17 +141,21 @@ fi
141 141
 
142 142
 AC_ARG_ENABLE(ncore,
143 143
 [  --disable-ncore	  disable support for NodalCore acceleration (default=auto)],
144
-want_ncore=$enableval, want_ncore="yes")
144
+want_ncore=$enableval, want_ncore="auto")
145 145
 
146
-if test "$want_ncore" = "yes"
146
+if test "$want_ncore" = "auto"
147 147
 then
148 148
     AC_CHECK_LIB(sn_sigscan, sn_sigscan_initdb, have_sigscan=yes,)
149
-    if test "$have_sigscan" = "yes"
150
-    then
151
-	AC_CHECK_HEADER(sn_sigscan/sn_sigscan.h,[LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -lsn_sigscan"; AC_DEFINE(HAVE_NCORE,1,hardware acceleration)], AC_MSG_WARN([****** hardware acceleration support disabled -- please install libsigscan-devel ]))
149
+    if test "$have_sigscan" = "yes"; then
150
+	want_ncore="yes"
152 151
     fi
153 152
 fi
154 153
 
154
+if test "$want_ncore" = "yes"
155
+then
156
+    AC_CHECK_HEADER(dlfcn.h,[LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -ldl" ; AC_DEFINE(HAVE_NCORE,1,Support for NodalCore acceleration)], AC_MSG_WARN([****** NodalCore support disabled (no support for dlopen)]))
157
+fi
158
+
155 159
 AC_ARG_ENABLE(dns,
156 160
     AC_HELP_STRING([--disable-dns], [disable support for database verification through DNS]),
157 161
     [want_dns=$enableval], [want_dns=yes]
... ...
@@ -31,6 +31,8 @@ libclamav_la_SOURCES = \
31 31
         matcher-ac.h \
32 32
         matcher-bm.c \
33 33
         matcher-bm.h \
34
+	matcher-ncore.c \
35
+	matcher-ncore.h \
34 36
         matcher.c \
35 37
         matcher.h \
36 38
         md5.c \
... ...
@@ -77,18 +77,18 @@ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"
77 77
 libLTLIBRARIES_INSTALL = $(INSTALL)
78 78
 LTLIBRARIES = $(lib_LTLIBRARIES)
79 79
 libclamav_la_DEPENDENCIES =
80
-am_libclamav_la_OBJECTS = matcher-ac.lo matcher-bm.lo matcher.lo \
81
-	md5.lo others.lo readdb.lo cvd.lo dsig.lo str.lo scanners.lo \
82
-	filetypes.lo blob.lo mbox.lo message.lo snprintf.lo table.lo \
83
-	text.lo ole2_extract.lo vba_extract.lo msexpand.lo pe.lo \
84
-	cabd.lo lzxd.lo mszipd.lo qtmd.lo system.lo upx.lo htmlnorm.lo \
85
-	chmunpack.lo rebuildpe.lo petite.lo wwunpack.lo suecrypt.lo \
86
-	unsp.lo packlibs.lo fsg.lo line.lo untar.lo unzip.lo \
87
-	special.lo binhex.lo is_tar.lo tnef.lo unrar15.lo unrarvm.lo \
88
-	unrar.lo unrarfilter.lo unrarppm.lo unrar20.lo unrarcmd.lo \
89
-	pdf.lo spin.lo yc.lo elf.lo sis.lo uuencode.lo pst.lo \
90
-	phishcheck.lo phish_domaincheck_db.lo phish_whitelist.lo \
91
-	regex_list.lo sha256.lo
80
+am_libclamav_la_OBJECTS = matcher-ac.lo matcher-bm.lo matcher-ncore.lo \
81
+	matcher.lo md5.lo others.lo readdb.lo cvd.lo dsig.lo str.lo \
82
+	scanners.lo filetypes.lo blob.lo mbox.lo message.lo \
83
+	snprintf.lo table.lo text.lo ole2_extract.lo vba_extract.lo \
84
+	msexpand.lo pe.lo cabd.lo lzxd.lo mszipd.lo qtmd.lo system.lo \
85
+	upx.lo htmlnorm.lo chmunpack.lo rebuildpe.lo petite.lo \
86
+	wwunpack.lo suecrypt.lo unsp.lo packlibs.lo fsg.lo line.lo \
87
+	untar.lo unzip.lo special.lo binhex.lo is_tar.lo tnef.lo \
88
+	unrar15.lo unrarvm.lo unrar.lo unrarfilter.lo unrarppm.lo \
89
+	unrar20.lo unrarcmd.lo pdf.lo spin.lo yc.lo elf.lo sis.lo \
90
+	uuencode.lo pst.lo phishcheck.lo phish_domaincheck_db.lo \
91
+	phish_whitelist.lo regex_list.lo sha256.lo
92 92
 libclamav_la_OBJECTS = $(am_libclamav_la_OBJECTS)
93 93
 DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
94 94
 depcomp = $(SHELL) $(top_srcdir)/depcomp
... ...
@@ -232,6 +232,8 @@ libclamav_la_SOURCES = \
232 232
         matcher-ac.h \
233 233
         matcher-bm.c \
234 234
         matcher-bm.h \
235
+	matcher-ncore.c \
236
+	matcher-ncore.h \
235 237
         matcher.c \
236 238
         matcher.h \
237 239
         md5.c \
... ...
@@ -443,6 +445,7 @@ distclean-compile:
443 443
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lzxd.Plo@am__quote@
444 444
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matcher-ac.Plo@am__quote@
445 445
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matcher-bm.Plo@am__quote@
446
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matcher-ncore.Plo@am__quote@
446 447
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matcher.Plo@am__quote@
447 448
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbox.Plo@am__quote@
448 449
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5.Plo@am__quote@
449 450
new file mode 100644
... ...
@@ -0,0 +1,601 @@
0
+/*
1
+ *  Copyright (C) 2006 Tomasz Kojm <tkojm@clamav.net>
2
+ *
3
+ *  This program is free software; you can redistribute it and/or modify
4
+ *  it under the terms of the GNU General Public License as published by
5
+ *  the Free Software Foundation; either version 2 of the License, or
6
+ *  (at your option) any later version.
7
+ *
8
+ *  This program is distributed in the hope that it will be useful,
9
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
+ *  GNU General Public License for more details.
12
+ *
13
+ *  You should have received a copy of the GNU General Public License
14
+ *  along with this program; if not, write to the Free Software
15
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
16
+ *  MA 02110-1301, USA.
17
+ */
18
+
19
+#if HAVE_CONFIG_H
20
+#include "clamav-config.h"
21
+#endif
22
+
23
+#ifdef HAVE_NCORE
24
+
25
+#include <stdio.h>
26
+#include <stdlib.h>
27
+#ifdef	HAVE_UNISTD_H
28
+#include <unistd.h>
29
+#endif
30
+#include <string.h>
31
+#include <sys/types.h>
32
+#include <sys/stat.h>
33
+#include <fcntl.h>
34
+#include <ctype.h>
35
+#ifdef HAVE_NCORE
36
+#include <dlfcn.h>
37
+#endif
38
+
39
+#include "clamav.h"
40
+#include "matcher.h"
41
+#include "cltypes.h"
42
+#include "md5.h"
43
+#include "readdb.h"
44
+#include "str.h"
45
+#include "matcher-ncore.h"
46
+
47
+#define HWBUFFSIZE 32768
48
+
49
+/* Globals */
50
+static void *g_ncore_dllhandle = 0;
51
+static const char *g_ncore_dllpath = "/usr/lib/libsn_sigscan.so";
52
+
53
+/* Function pointer types */
54
+typedef int (*sn_sigscan_initdb_t)(void **);
55
+typedef int (*sn_sigscan_loaddb_t)(void *dbhandle, const char *filename,
56
+        int devicenum, unsigned int *count);
57
+typedef int (*sn_sigscan_load2dbs_t)(void *dbhandle, const char *baseFilename,
58
+        const char *incrFilename, int devicenum, unsigned int *count);
59
+typedef int (*sn_sigscan_closedb_t)(void *dbhandle);
60
+typedef int (*sn_sigscan_createstream_t)(void *dbhandle,
61
+        const uint32_t *dbMaskData, unsigned int dbMaskWords,
62
+        void **streamhandle);
63
+typedef int (*sn_sigscan_writestream_t)(void *streamhandle, const char *buffer,
64
+        unsigned int len);
65
+typedef int (*sn_sigscan_closestream_t)(void *streamhandle,
66
+        void **resulthandle);
67
+typedef int (*sn_sigscan_resultcount_t)(void *resulthandle);
68
+typedef int (*sn_sigscan_resultget_name_t)(void *resulthandle,
69
+        unsigned int index, const char **matchname);
70
+typedef int (*sn_sigscan_resultget_startoffset_t)(void *resulthandle,
71
+        unsigned int index, unsigned long long *startoffset);
72
+typedef int (*sn_sigscan_resultget_endoffset_t)(void *resulthandle,
73
+        unsigned int index, unsigned long long *endoffset);
74
+typedef int (*sn_sigscan_resultget_targettype_t)(void *resulthandle,
75
+        unsigned int index, int *targettype);
76
+typedef int (*sn_sigscan_resultget_offsetstring_t)(void *resulthandle,
77
+        unsigned int index, const char **offsetstring);
78
+typedef int (*sn_sigscan_resultget_extradata_t)(void *resulthandle,
79
+        unsigned int index, const char **optionalsigdata);
80
+typedef int (*sn_sigscan_resultfree_t)(void *resulthandle);
81
+typedef void (*sn_sigscan_error_function_t)(const char *msg);
82
+typedef int (*sn_sigscan_seterrorlogger_t)(sn_sigscan_error_function_t errfn);
83
+
84
+/* Function pointer values */
85
+sn_sigscan_initdb_t sn_sigscan_initdb_f = 0;
86
+sn_sigscan_loaddb_t sn_sigscan_loaddb_f = 0;
87
+sn_sigscan_load2dbs_t sn_sigscan_load2dbs_f = 0;
88
+sn_sigscan_closedb_t sn_sigscan_closedb_f = 0;
89
+sn_sigscan_createstream_t sn_sigscan_createstream_f = 0;
90
+sn_sigscan_writestream_t sn_sigscan_writestream_f = 0;
91
+sn_sigscan_closestream_t sn_sigscan_closestream_f = 0;
92
+sn_sigscan_resultcount_t sn_sigscan_resultcount_f = 0;
93
+sn_sigscan_resultget_name_t sn_sigscan_resultget_name_f = 0;
94
+sn_sigscan_resultget_startoffset_t sn_sigscan_resultget_startoffset_f = 0;
95
+sn_sigscan_resultget_endoffset_t sn_sigscan_resultget_endoffset_f = 0;
96
+sn_sigscan_resultget_targettype_t sn_sigscan_resultget_targettype_f = 0;
97
+sn_sigscan_resultget_offsetstring_t sn_sigscan_resultget_offsetstring_f = 0;
98
+sn_sigscan_resultget_extradata_t sn_sigscan_resultget_extradata_f = 0;
99
+sn_sigscan_resultfree_t sn_sigscan_resultfree_f = 0;
100
+sn_sigscan_seterrorlogger_t sn_sigscan_seterrorlogger_f = 0;
101
+
102
+static int cli_ncore_dlinit()
103
+{
104
+    if(access(g_ncore_dllpath, R_OK) == -1) {
105
+	cli_dbgmsg("cli_ncore_dlinit: Can't access %s\n", g_ncore_dllpath);
106
+	return CL_ENCINIT;
107
+    }
108
+
109
+    g_ncore_dllhandle = dlopen(g_ncore_dllpath, RTLD_NOW | RTLD_LOCAL);
110
+    if(!g_ncore_dllhandle) {
111
+	cli_dbgmsg("cli_ncore_dlinit: dlopen() failed for %s\n", g_ncore_dllpath);
112
+	return CL_ENCINIT;
113
+    }
114
+
115
+    /* get the symbols */
116
+    sn_sigscan_initdb_f = (sn_sigscan_initdb_t)dlsym(g_ncore_dllhandle, "sn_sigscan_initdb");
117
+    sn_sigscan_loaddb_f = (sn_sigscan_loaddb_t)dlsym(g_ncore_dllhandle, "sn_sigscan_loaddb");
118
+    sn_sigscan_load2dbs_f = (sn_sigscan_load2dbs_t)dlsym(g_ncore_dllhandle, "sn_sigscan_load2dbs");
119
+    sn_sigscan_closedb_f = (sn_sigscan_closedb_t)dlsym(g_ncore_dllhandle, "sn_sigscan_closedb");
120
+    sn_sigscan_createstream_f = (sn_sigscan_createstream_t)dlsym(g_ncore_dllhandle, "sn_sigscan_createstream");
121
+    sn_sigscan_writestream_f = (sn_sigscan_writestream_t)dlsym(g_ncore_dllhandle, "sn_sigscan_writestream");
122
+    sn_sigscan_closestream_f = (sn_sigscan_closestream_t)dlsym(g_ncore_dllhandle, "sn_sigscan_closestream");
123
+    sn_sigscan_resultcount_f = (sn_sigscan_resultcount_t)dlsym(g_ncore_dllhandle, "sn_sigscan_resultcount");
124
+    sn_sigscan_resultget_name_f = (sn_sigscan_resultget_name_t)dlsym(g_ncore_dllhandle, "sn_sigscan_resultget_name");
125
+    sn_sigscan_resultget_startoffset_f = (sn_sigscan_resultget_startoffset_t)dlsym(g_ncore_dllhandle, "sn_sigscan_resultget_startoffset");
126
+    sn_sigscan_resultget_endoffset_f = (sn_sigscan_resultget_endoffset_t)dlsym(g_ncore_dllhandle, "sn_sigscan_resultget_endoffset");
127
+    sn_sigscan_resultget_targettype_f = (sn_sigscan_resultget_targettype_t)dlsym(g_ncore_dllhandle, "sn_sigscan_resultget_targettype");
128
+    sn_sigscan_resultget_offsetstring_f = (sn_sigscan_resultget_offsetstring_t)dlsym(g_ncore_dllhandle, "sn_sigscan_resultget_offsetstring");
129
+    sn_sigscan_resultget_extradata_f = (sn_sigscan_resultget_extradata_t)dlsym(g_ncore_dllhandle, "sn_sigscan_resultget_extradata");
130
+    sn_sigscan_resultfree_f = (sn_sigscan_resultfree_t)dlsym(g_ncore_dllhandle, "sn_sigscan_resultfree");
131
+    sn_sigscan_seterrorlogger_f = (sn_sigscan_seterrorlogger_t)dlsym(g_ncore_dllhandle, "sn_sigscan_seterrorlogger");
132
+
133
+    /* Check that we got all the symbols */
134
+    if(sn_sigscan_initdb_f && sn_sigscan_loaddb_f && sn_sigscan_load2dbs_f &&
135
+            sn_sigscan_closedb_f && sn_sigscan_createstream_f &&
136
+            sn_sigscan_writestream_f && sn_sigscan_closestream_f &&
137
+            sn_sigscan_resultcount_f && sn_sigscan_resultget_name_f &&
138
+            sn_sigscan_resultget_startoffset_f &&
139
+            sn_sigscan_resultget_endoffset_f &&
140
+            sn_sigscan_resultget_targettype_f &&
141
+            sn_sigscan_resultget_offsetstring_f &&
142
+            sn_sigscan_resultget_extradata_f && sn_sigscan_resultfree_f &&
143
+            sn_sigscan_seterrorlogger_f)
144
+    {
145
+        return CL_SUCCESS;
146
+    }
147
+
148
+    dlclose(g_ncore_dllhandle);
149
+    g_ncore_dllhandle = 0;
150
+    return CL_ENCINIT;
151
+}
152
+
153
+int cli_ncore_scanbuff(const char *buffer, unsigned int length, const char **virname, const struct cl_engine *engine, unsigned short ftype, unsigned int *targettab)
154
+{
155
+	void *streamhandle;
156
+	void *resulthandle;
157
+	static const uint32_t datamask[2] = { 0xffffffff, 0xffffffff };
158
+	int count, hret, i;
159
+	char *pt;
160
+	int ret = CL_CLEAN;
161
+
162
+
163
+    /* TODO: Setup proper data bitmask (need specs) */
164
+    /* Create the hardware scanning stream */
165
+    hret = (*sn_sigscan_createstream_f)(engine->ncdb, datamask, 2, &streamhandle);
166
+    if(hret) {
167
+        cli_errmsg("cli_ncore_scanbuff: can't create new hardware stream: %d\n", hret);
168
+        return CL_ENCIO;
169
+    }
170
+
171
+    /* Write data to the hardware scanning stream */
172
+    hret = (*sn_sigscan_writestream_f)(streamhandle, buffer, length);
173
+    if(hret) {
174
+        cli_errmsg("cli_ncore_scanbuff: can't write %u bytes to hardware stream: %d\n", length, hret);
175
+        (*sn_sigscan_closestream_f)(streamhandle, &resulthandle);
176
+        (*sn_sigscan_resultfree_f)(resulthandle);
177
+        return CL_ENCIO;
178
+    }
179
+
180
+    /* Close the hardware scanning stream and collect the result */
181
+    hret = (*sn_sigscan_closestream_f)(streamhandle, &resulthandle);
182
+    if(hret) {
183
+        cli_errmsg("cli_ncore_scanbuff: can't close hardware stream: %d\n", hret);
184
+        return CL_ENCIO;
185
+    }
186
+
187
+    /* Iterate through the results */
188
+    count = (*sn_sigscan_resultcount_f)(resulthandle);
189
+    for(i = 0; i < count; i++) {
190
+        const char *matchname = NULL, *offsetstring = NULL, *optionalsigdata = NULL;
191
+        unsigned int targettype = 0;
192
+
193
+        /* Acquire the name of the result */
194
+        hret = (*sn_sigscan_resultget_name_f)(resulthandle, i, &matchname);
195
+        if(hret) {
196
+            cli_errmsg("cli_ncore_scanbuff: sn_sigscan_resultget_name failed for result %u: %d\n", i, hret);
197
+            (*sn_sigscan_resultfree_f)(resulthandle);
198
+            return CL_ENCIO;
199
+        }
200
+        if(!matchname) {
201
+            cli_errmsg("cli_ncore_scanbuff: HW Result[%u]: Signature without name\n", i);
202
+            (*sn_sigscan_resultfree_f)(resulthandle);
203
+            return CL_EMALFDB;
204
+        }
205
+
206
+        /* Acquire the result file type and check that it is correct */
207
+        hret = (*sn_sigscan_resultget_targettype_f)(resulthandle, i, &targettype);
208
+        if(hret) {
209
+            cli_errmsg("cli_ncore_scanbuff: sn_sigscan_resultget_targettype failed for result %u, signature %s: %d\n", i, matchname, hret);
210
+            (*sn_sigscan_resultfree_f)(resulthandle);
211
+            return CL_ENCIO;
212
+        }
213
+
214
+        if(targettype && targettab[targettype] != ftype) {
215
+            cli_dbgmsg("cli_ncore_scanbuff: HW Result[%u]: %s: Target type: %u, expected: %u\n", i, matchname, targettab[targettype], ftype);
216
+            continue;
217
+        }
218
+
219
+        hret = (*sn_sigscan_resultget_offsetstring_f)(resulthandle, i, &offsetstring);
220
+        if(hret) {
221
+            cli_errmsg("cli_ncore_scanbuff: sn_sigscan_resultget_offsetstring failed for result %u, signature %s: %d\n", i, matchname, hret);
222
+            (*sn_sigscan_resultfree_f)(resulthandle);
223
+            return CL_ENCIO;
224
+        }
225
+        if(offsetstring) {
226
+            cli_dbgmsg("cli_ncore_scanbuff: HW Result[%u]: %s: Offset based signature not supported in buffer mode\n", i, matchname);
227
+            continue;
228
+        }
229
+
230
+        hret = (*sn_sigscan_resultget_extradata_f)(resulthandle, i, &optionalsigdata);
231
+        if(hret) {
232
+            cli_errmsg("cli_ncore_scanbuff: sn_sigscan_resultget_extradata failed for result %u, signature %s: %d\n", i, matchname, hret);
233
+            (*sn_sigscan_resultfree_f)(resulthandle);
234
+            return CL_ENCIO;
235
+        }
236
+        if(optionalsigdata && strlen(optionalsigdata)) {
237
+            pt = cli_strtok(optionalsigdata, 1, ":");
238
+            if(pt) {
239
+                if(!isdigit(*pt)) {
240
+                    free(pt);
241
+                    cli_errmsg("cli_ncore_scanbuff: HW Result[%u]: %s: Incorrect optional signature data: %s\n", i, matchname, optionalsigdata);
242
+                    (*sn_sigscan_resultfree_f)(resulthandle);
243
+                    return CL_EMALFDB;
244
+                }
245
+
246
+                if((unsigned int) atoi(pt) < cl_retflevel()) {
247
+                    cli_dbgmsg("cli_ncore_scanbuff: HW Result[%u]: %s: Signature max flevel: %d, current: %d\n", i, matchname, atoi(pt), cl_retflevel());
248
+                    free(pt);
249
+                    continue;
250
+                }
251
+
252
+                free(pt);
253
+                pt = cli_strtok(optionalsigdata, 0, ":");
254
+                if(pt) {
255
+                    if(!isdigit(*pt)) {
256
+                        free(pt);
257
+                        cli_errmsg("cli_ncore_scanbuff: HW Result[%u]: %s: Incorrect optional signature data: %s\n", i, matchname, optionalsigdata);
258
+                        (*sn_sigscan_resultfree_f)(resulthandle);
259
+                        return CL_EMALFDB;
260
+                    }
261
+
262
+                    if((unsigned int) atoi(pt) > cl_retflevel()) {
263
+                        cli_dbgmsg("cli_ncore_scanbuff: HW Result[%u]: %s: Signature required flevel: %u, current: %u\n", i, matchname, atoi(pt), cl_retflevel());
264
+                        free(pt);
265
+                        continue;
266
+                    }
267
+                    free(pt);
268
+                }
269
+
270
+            } else {
271
+                if(!isdigit(*optionalsigdata)) {
272
+                    cli_errmsg("cli_ncore_scanbuff: HW Result[%u]: %s: Incorrect optional signature data: %s\n", i, matchname, optionalsigdata);
273
+                    (*sn_sigscan_resultfree_f)(resulthandle);
274
+                    return CL_EMALFDB;
275
+                }
276
+
277
+                if((unsigned int) atoi(optionalsigdata) > cl_retflevel()) {
278
+                    cli_dbgmsg("cli_ncore_scandesc: HW Result[%u]: %s: Signature required flevel: %u, current: %u\n", i, matchname, atoi(optionalsigdata), cl_retflevel());
279
+                    continue;
280
+                }
281
+            }
282
+        }
283
+
284
+        /* Store the name of the match */
285
+        *virname = matchname;
286
+        ret = CL_VIRUS;
287
+        break;
288
+    }
289
+
290
+    /* Clean up the result structure */
291
+    hret = (*sn_sigscan_resultfree_f)(resulthandle);
292
+    if(hret) {
293
+        cli_errmsg("cli_ncore_scanbuff: can't free results: %d\n", ret);
294
+        return CL_ENCIO;
295
+    }
296
+
297
+    return ret;
298
+}
299
+
300
+int cli_ncore_scandesc(int desc, cli_ctx *ctx, unsigned short ftype, int *cont, unsigned int *targettab, MD5_CTX *md5ctx)
301
+{
302
+	void *streamhandle;
303
+	void *resulthandle;
304
+	uint32_t datamask[2] = { 0xffffffff, 0xffffffff };
305
+	struct cli_target_info info;
306
+	int i, count, hret, bytes, ret = CL_CLEAN;
307
+	off_t origoff;
308
+	*cont = 0;
309
+	char *buffer;
310
+
311
+
312
+    /* TODO: Setup proper data bitmask (need specs) */
313
+    /* Create the hardware scanning stream */
314
+    hret = (*sn_sigscan_createstream_f)(ctx->engine->ncdb, datamask, 2, &streamhandle);
315
+    if(hret) {
316
+        cli_errmsg("cli_ncore_scandesc: can't create new hardware stream: %d\n", hret);
317
+        return CL_ENCIO;
318
+    }
319
+
320
+    /* Obtain the initial offset */
321
+    origoff = lseek(desc, 0, SEEK_CUR);
322
+    if(origoff == -1) {
323
+        cli_errmsg("cli_ncore_scandesc: lseek() failed for descriptor %d\n", desc);
324
+	(*sn_sigscan_closestream_f)(streamhandle, &resulthandle);
325
+        (*sn_sigscan_resultfree_f)(resulthandle);
326
+        return CL_EIO;
327
+    }
328
+
329
+    buffer = (char *) cli_calloc(HWBUFFSIZE, sizeof(char));
330
+    if(!buffer) {
331
+        cli_dbgmsg("cli_ncore_scandesc: unable to cli_calloc(%u)\n", HWBUFFSIZE);
332
+	(*sn_sigscan_closestream_f)(streamhandle, &resulthandle);
333
+        (*sn_sigscan_resultfree_f)(resulthandle);
334
+        return CL_EMEM;
335
+    }
336
+
337
+    /* Initialize the MD5 hasher */
338
+    if(ctx->engine->md5_hlist)
339
+        MD5_Init(md5ctx);
340
+
341
+    /* Read and scan the data */
342
+    while ((bytes = cli_readn(desc, buffer, HWBUFFSIZE)) > 0) {
343
+        hret = (*sn_sigscan_writestream_f)(streamhandle, buffer, bytes);
344
+        if(hret) {
345
+            cli_errmsg("cli_ncore_scandesc: can't write to hardware stream: %d\n", hret);
346
+            ret = CL_ENCIO;
347
+            break;
348
+        } else {
349
+            if(ctx->scanned)
350
+                *ctx->scanned += bytes / CL_COUNT_PRECISION;
351
+ 
352
+    	    if(ctx->engine->md5_hlist)
353
+                MD5_Update(md5ctx, buffer, bytes);
354
+        }
355
+    }
356
+
357
+    free(buffer);
358
+
359
+    /* Close the stream and get the result */
360
+    hret = (*sn_sigscan_closestream_f)(streamhandle, &resulthandle);
361
+    if(hret) {
362
+        cli_errmsg("cli_ncore_scandesc: can't close hardware stream: %d\n", hret);
363
+        return CL_ENCIO;
364
+    }
365
+
366
+    memset(&info, 0, sizeof(info));
367
+
368
+    /* Iterate over the list of results */
369
+    count = (*sn_sigscan_resultcount_f)(resulthandle);
370
+    for(i = 0; i < count; i++) {
371
+    	const char *matchname = NULL, *offsetstring = NULL, *optionalsigdata = NULL;
372
+    	unsigned long long startoffset = 0;
373
+    	unsigned int targettype = 0;
374
+        char *pt;
375
+
376
+        /* Get the description of the match */
377
+        hret = (*sn_sigscan_resultget_name_f)(resulthandle, i, &matchname);
378
+        if(hret) {
379
+            cli_errmsg("cli_ncore_scandesc: sn_sigscan_resultget_name failed for result %u: %d\n", i, hret);
380
+            (*sn_sigscan_resultfree_f)(resulthandle);
381
+	    if(info.exeinfo.section)
382
+		free(info.exeinfo.section);
383
+            return CL_ENCIO;
384
+        }
385
+
386
+        if(!matchname) {
387
+            cli_errmsg("cli_ncore_scandesc: HW Result[%u]: Signature without name\n", i);
388
+            (*sn_sigscan_resultfree_f)(resulthandle);
389
+	    if(info.exeinfo.section)
390
+		free(info.exeinfo.section);
391
+            return CL_EMALFDB;
392
+        }
393
+
394
+        hret = (*sn_sigscan_resultget_targettype_f)(resulthandle, i, &targettype);
395
+        if(hret) {
396
+    	    cli_errmsg("cli_ncore_scandesc: sn_sigscan_resultget_targettype failed for result %d, signature %s: %d\n", i, matchname, hret);
397
+    	    (*sn_sigscan_resultfree_f)(resulthandle);
398
+	    if(info.exeinfo.section)
399
+		free(info.exeinfo.section);
400
+    	    return CL_ENCIO;
401
+        }
402
+        if(targettype && targettab[targettype] != ftype) {
403
+    	    cli_dbgmsg("cli_ncore_scandesc: HW Result[%u]: %s: Target type: %u, expected: %d\n", i, matchname, targettab[targettype], ftype);
404
+            continue;
405
+        }
406
+
407
+        hret = (*sn_sigscan_resultget_offsetstring_f)(resulthandle, i, &offsetstring);
408
+        if(hret) {
409
+            cli_errmsg("cli_ncore_scandesc: sn_sigscan_resultget_offsetstring failed for result %u, signature %s: %d\n", i, matchname, hret);
410
+            (*sn_sigscan_resultfree_f)(resulthandle);
411
+	    if(info.exeinfo.section)
412
+		free(info.exeinfo.section);
413
+            return CL_ENCIO;
414
+        }
415
+
416
+        hret = (*sn_sigscan_resultget_startoffset_f)(resulthandle, i, &startoffset);
417
+        if(hret) {
418
+    	    cli_errmsg("cli_ncore_scandesc: sn_sigscan_resultget_startoffset failed for result %u, signature %s: %d\n", i, matchname, hret);
419
+    	    (*sn_sigscan_resultfree_f)(resulthandle);
420
+	    if(info.exeinfo.section)
421
+		free(info.exeinfo.section);
422
+    	    return CL_ENCIO;
423
+        }
424
+        if(offsetstring && strcmp(offsetstring, "*")) {
425
+	    off_t off = cli_caloff(offsetstring, &info, desc, ftype, &hret);
426
+
427
+    	    if(hret == -1) {
428
+                cli_dbgmsg("cli_ncore_scandesc: HW Result[%u]: %s: Bad offset in signature\n", i, matchname);
429
+                (*sn_sigscan_resultfree_f)(resulthandle);
430
+		if(info.exeinfo.section)
431
+		    free(info.exeinfo.section);
432
+                return CL_EMALFDB;
433
+            }
434
+    	    if(startoffset != (unsigned long long) off) {
435
+                cli_dbgmsg("cli_ncore_scandesc: HW Result[%u]: %s: Virus offset: " "%Lu, expected: %Lu\n", i, matchname, startoffset, off);
436
+                continue;
437
+            }
438
+        }
439
+
440
+        hret = (*sn_sigscan_resultget_extradata_f)(resulthandle, i, &optionalsigdata);
441
+        if(hret) {
442
+            cli_errmsg("cli_ncore_scandesc: sn_sigscan_resultget_extradata failed for result %d, signature %s: %d\n", i, matchname, hret);
443
+            (*sn_sigscan_resultfree_f)(resulthandle);
444
+	    if(info.exeinfo.section)
445
+		free(info.exeinfo.section);
446
+            return CL_ENCIO;
447
+        }
448
+
449
+        if(optionalsigdata && strlen(optionalsigdata)) {
450
+    	    pt = cli_strtok(optionalsigdata, 1, ":");
451
+    	    if(pt) {
452
+    	        if(!isdigit(*pt)) {
453
+    		    free(pt);
454
+                    cli_errmsg("cli_ncore_scandesc: HW Result[%u]: %s: Incorrect optional signature data: %s\n", i, matchname, optionalsigdata);
455
+		    (*sn_sigscan_resultfree_f)(resulthandle);
456
+		    if(info.exeinfo.section)
457
+			free(info.exeinfo.section);
458
+                    return CL_EMALFDB;
459
+                }
460
+
461
+                if((unsigned int) atoi(pt) < cl_retflevel()) {
462
+                    cli_dbgmsg("cli_ncore_scandesc: HW Result[%u]: %s: Signature max flevel: %d, current: %d\n", i, matchname, atoi(pt), cl_retflevel());
463
+                    free(pt);
464
+                    continue;
465
+                }
466
+
467
+                free(pt);
468
+
469
+    	        pt = cli_strtok(optionalsigdata, 0, ":");
470
+    	        if(pt) {
471
+                    if(!isdigit(*pt)) {
472
+                        free(pt);
473
+                        cli_errmsg("cli_ncore_scandesc: HW Result[%u]: %s: Incorrect optional signature data: %s\n", i, matchname, optionalsigdata);
474
+			(*sn_sigscan_resultfree_f)(resulthandle);
475
+			if(info.exeinfo.section)
476
+			    free(info.exeinfo.section);
477
+                        return CL_EMALFDB;
478
+                    }
479
+
480
+                    if((unsigned int) atoi(pt) > cl_retflevel()) {
481
+                        cli_dbgmsg("cli_ncore_scandesc: HW Result[%u]: %s: Signature required flevel: %d, current: %d\n", i, matchname, atoi(pt), cl_retflevel());
482
+                        free(pt);
483
+                        continue;
484
+                    }
485
+                    free(pt);
486
+                }
487
+            } else {
488
+                if(!isdigit(*optionalsigdata)) {
489
+                    cli_errmsg("cli_ncore_scandesc: HW Result[%u]: %s: Incorrect optional signature data: %s\n", i, matchname, optionalsigdata);
490
+                    (*sn_sigscan_resultfree_f)(resulthandle);
491
+		    if(info.exeinfo.section)
492
+			free(info.exeinfo.section);
493
+                    return CL_EMALFDB;
494
+                }
495
+
496
+                if((unsigned int) atoi(optionalsigdata) > cl_retflevel()) {
497
+                    cli_dbgmsg("cli_ncore_scandesc: HW Result[%u]: %s: Signature required flevel: %d, current: %d\n", i, matchname, atoi(optionalsigdata), cl_retflevel());
498
+                    continue;
499
+                }
500
+            }
501
+        }
502
+
503
+        *ctx->virname = matchname;
504
+        ret = CL_VIRUS;
505
+        break;
506
+    }
507
+
508
+    if(info.exeinfo.section)
509
+	free(info.exeinfo.section);
510
+
511
+    hret = (*sn_sigscan_resultfree_f)(resulthandle);
512
+    if(hret) {
513
+        cli_errmsg("cli_ncore_scandesc: can't free results: %d\n", ret);
514
+        return CL_ENCIO;
515
+    }
516
+
517
+    if(ctx->engine->md5_hlist) {
518
+        unsigned char digest[16];
519
+        struct cli_md5_node *md5_node;
520
+        MD5_Final(digest, md5ctx);
521
+
522
+        md5_node = cli_vermd5(digest, ctx->engine);
523
+        if(md5_node) {
524
+            struct stat sb;
525
+            if(fstat(desc, &sb) == -1)
526
+                return CL_EIO;
527
+
528
+    	    if((unsigned int) sb.st_size != md5_node->size) {
529
+                cli_warnmsg("Detected false positive MD5 match. Please report.\n");
530
+            } else {
531
+                if(md5_node->fp) {
532
+                    cli_dbgmsg("Eliminated false positive match (fp sig: %s)\n", md5_node->virname);
533
+                    ret = CL_CLEAN;
534
+                } else {
535
+                    if(ctx->virname)
536
+                        *ctx->virname = md5_node->virname;
537
+
538
+                    ret = CL_VIRUS;
539
+                }
540
+            }
541
+        }
542
+    }
543
+
544
+    if(ret == CL_VIRUS || (ftype != CL_TYPE_UNKNOWN_TEXT && ftype != CL_TYPE_UNKNOWN_DATA))
545
+        return ret;
546
+
547
+    if(lseek(desc, origoff, SEEK_SET) == -1) {
548
+        cli_errmsg("cli_ncore_scandesc: lseek() failed for descriptor %d\n", desc);
549
+        return CL_EIO;
550
+    }
551
+
552
+    *cont = 1;
553
+    return ret;
554
+}
555
+
556
+int cli_ncore_load(const char *filename, struct cl_engine **engine, unsigned int *signo, unsigned int options)
557
+{
558
+	int ret = 0;
559
+	unsigned int newsigs = 0;
560
+
561
+
562
+    if((ret = cli_initengine(engine, options))) {
563
+	cl_free(*engine);
564
+	return ret;
565
+    }
566
+
567
+    if((ret = cli_ncore_dlinit())) {
568
+	cl_free(*engine);
569
+	return ret;
570
+    }
571
+
572
+    ret = (*sn_sigscan_initdb_f)(&(*engine)->ncdb);
573
+    if(ret) {
574
+        cli_errmsg("cli_ncore_load: error initializing the matcher: %d\n", ret);
575
+        cl_free(*engine);
576
+        return CL_ENCINIT;
577
+    }
578
+
579
+    (*engine)->ncore = 1;
580
+
581
+    ret = (*sn_sigscan_loaddb_f)((*engine)->ncdb, filename, 0, &newsigs);
582
+    if(ret) {
583
+        cli_errmsg("cli_ncore_load: can't load hardware database: %d\n", ret);
584
+        cl_free(*engine);
585
+        return CL_ENCLOAD;
586
+    }
587
+
588
+    *signo += newsigs;
589
+    return CL_SUCCESS;
590
+}
591
+
592
+void cli_ncore_unload(struct cl_engine *engine)
593
+{
594
+	int ret;
595
+
596
+    ret = (*sn_sigscan_closedb_f)(engine->ncdb);
597
+    if(ret)
598
+        cli_errmsg("cl_free: can't close hardware database: %d\n", ret);
599
+}
600
+#endif
0 601
new file mode 100644
... ...
@@ -0,0 +1,34 @@
0
+/*
1
+ *  Copyright (C) 2006 Tomasz Kojm <tkojm@clamav.net>
2
+ *
3
+ *  This program is free software; you can redistribute it and/or modify
4
+ *  it under the terms of the GNU General Public License as published by
5
+ *  the Free Software Foundation; either version 2 of the License, or
6
+ *  (at your option) any later version.
7
+ *
8
+ *  This program is distributed in the hope that it will be useful,
9
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
+ *  GNU General Public License for more details.
12
+ *
13
+ *  You should have received a copy of the GNU General Public License
14
+ *  along with this program; if not, write to the Free Software
15
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
16
+ *  MA 02110-1301, USA.
17
+ */
18
+
19
+#ifndef __MATCHER_NCORE_H
20
+#define __MATCHER_NCORE_H
21
+
22
+#include "clamav.h"
23
+#include "md5.h"
24
+
25
+int cli_ncore_scanbuff(const char *buffer, unsigned int length, const char **virname, const struct cl_engine *engine, unsigned short ftype, unsigned int *targettab);
26
+
27
+int cli_ncore_scandesc(int desc, cli_ctx *ctx, unsigned short ftype, int *cont, unsigned int *targettab, MD5_CTX *md5ctx);
28
+
29
+int cli_ncore_load(const char *filename, struct cl_engine **engine, unsigned int *signo, unsigned int options);
30
+
31
+void cli_ncore_unload(struct cl_engine *engine);
32
+
33
+#endif
... ...
@@ -42,29 +42,19 @@
42 42
 #include "special.h"
43 43
 #include "str.h"
44 44
 
45
-static int targettab[CL_TARGET_TABLE_SIZE] = { 0, CL_TYPE_MSEXE, CL_TYPE_MSOLE2, CL_TYPE_HTML, CL_TYPE_MAIL, CL_TYPE_GRAPHICS, CL_TYPE_ELF };
46
-
47
-extern short cli_debug_flag;
48
-
49 45
 #ifdef HAVE_NCORE
50
-#include <sn_sigscan/sn_sigscan.h>
51
-#define HWBUFFSIZE 32768
46
+#include "matcher-ncore.h"
52 47
 #endif
53 48
 
49
+static unsigned int targettab[CL_TARGET_TABLE_SIZE] = { 0, CL_TYPE_MSEXE, CL_TYPE_MSOLE2, CL_TYPE_HTML, CL_TYPE_MAIL, CL_TYPE_GRAPHICS, CL_TYPE_ELF };
50
+
51
+extern short cli_debug_flag;
54 52
 
55 53
 int cli_scanbuff(const unsigned char *buffer, unsigned int length, const char **virname, const struct cl_engine *engine, unsigned short ftype)
56 54
 {
57 55
 	int ret = CL_CLEAN, i;
58 56
 	struct cli_ac_data mdata;
59 57
 	struct cli_matcher *groot, *troot = NULL;
60
-#ifdef HAVE_NCORE
61
-	void *streamhandle;
62
-	void *resulthandle;
63
-	uint32_t datamask[2] = { 0xffffffff, 0xffffffff };
64
-	int count, hret;
65
-	unsigned long long offset;
66
-	char *pt;
67
-#endif
68 58
 
69 59
 
70 60
     if(!engine) {
... ...
@@ -73,126 +63,9 @@ int cli_scanbuff(const unsigned char *buffer, unsigned int length, const char **
73 73
     }
74 74
 
75 75
 #ifdef HAVE_NCORE
76
-    if(engine->ncore) {
77
-	/* TODO: Setup proper data bitmask (need specs) */
78
-	if((hret = sn_sigscan_createstream(engine->ncdb, datamask, 2, &streamhandle)) < 0) {
79
-	    cli_errmsg("cli_scanbuff: can't create new hardware stream: %d\n", hret);
80
-	    return CL_ENCIO;
81
-	}
82
-
83
-	if((hret = sn_sigscan_writestream(streamhandle, buffer, length)) < 0) {
84
-	    cli_errmsg("cli_scanbuff: can't write %u bytes to hardware stream: %d\n", length, hret);
85
-	    sn_sigscan_closestream(streamhandle, &resulthandle);
86
-	    return CL_ENCIO;
87
-	}
88
-
89
-	if((hret = sn_sigscan_closestream(streamhandle, &resulthandle)) < 0) {
90
-	    cli_errmsg("cli_scanbuff: can't close hardware stream: %d\n", hret);
91
-	    return CL_ENCIO;
92
-	}
93
-
94
-	count = sn_sigscan_resultcount(resulthandle);
95
-
96
-	for(i = 0; i < count; i++) {
97
-		const char *matchname = NULL, *offsetstring = NULL, *optionalsigdata = NULL;
98
-		int targettype = 0;
99
-
100
-	    if((hret = sn_sigscan_resultget_name(resulthandle, i, &matchname) < 0)) {
101
-		cli_errmsg("cli_scanbuff: sn_sigscan_resultget_name failed for result %u: %d\n", i, hret);
102
-		sn_sigscan_resultfree(resulthandle);
103
-		return CL_ENCIO;
104
-	    }
105
-	    if(!matchname) {
106
-		cli_errmsg("cli_scanbuff: HW Result[%u]: Signature without name\n", i);
107
-		sn_sigscan_resultfree(resulthandle);
108
-		return CL_EMALFDB;
109
-	    }
110
-
111
-	    if((hret = sn_sigscan_resultget_targettype(resulthandle, i, &targettype) < 0)) {
112
-		cli_errmsg("cli_scanbuff: sn_sigscan_resultget_targettype failed for result %u, signature %s: %d\n", i, matchname, hret);
113
-		sn_sigscan_resultfree(resulthandle);
114
-		return CL_ENCIO;
115
-	    }
116
-	    if(targettype && targettab[targettype] != (int) ftype) {
117
-		cli_dbgmsg("cli_scanbuff: HW Result[%u]: %s: Target type: %u, expected: %u\n", i, matchname, targettab[targettype], ftype);
118
-		continue;
119
-	    }
120
-
121
-	    if((hret = sn_sigscan_resultget_offsetstring(resulthandle, i, &offsetstring) < 0)) {
122
-		cli_errmsg("cli_scanbuff: sn_sigscan_resultget_offsetstring failed for result %u, signature %s: %d\n", i, matchname, hret);
123
-		sn_sigscan_resultfree(resulthandle);
124
-		return CL_ENCIO;
125
-	    }
126
-	    if(offsetstring) {
127
-		cli_dbgmsg("cli_scanbuff: HW Result[%u]: %s: Offset based signature not supported in buffer mode\n", i, matchname);
128
-		continue;
129
-	    }
130
-
131
-	    if((hret = sn_sigscan_resultget_extradata(resulthandle, i, &optionalsigdata) < 0)) {
132
-		cli_errmsg("cli_scanbuff: sn_sigscan_resultget_extradata failed for result %u, signature %s: %d\n", i, matchname, hret);
133
-		sn_sigscan_resultfree(resulthandle);
134
-		return CL_ENCIO;
135
-	    }
136
-	    if(optionalsigdata && strlen(optionalsigdata)) {
137
-		if((pt = cli_strtok(optionalsigdata, 1, ":"))) { /* max version */
138
-		    if(!isdigit(*pt)) {
139
-			free(pt);
140
-			cli_errmsg("cli_scanbuff: HW Result[%u]: %s: Incorrect optional signature data: %s\n", i, matchname, optionalsigdata);
141
-			sn_sigscan_resultfree(resulthandle);
142
-			return CL_EMALFDB;
143
-		    }
144
-
145
-		    if(atoi(pt) < cl_retflevel()) {
146
-			cli_dbgmsg("cli_scanbuff: HW Result[%u]: %s: Signature max flevel: %u, current: %u\n", i, matchname, atoi(pt), cl_retflevel());
147
-			free(pt);
148
-			continue;
149
-		    }
150
-
151
-		    free(pt);
152
-		    if((pt = cli_strtok(optionalsigdata, 0, ":"))) { /* min version */
153
-			if(!isdigit(*pt)) {
154
-			    free(pt);
155
-			    cli_errmsg("cli_scanbuff: HW Result[%u]: %s: Incorrect optional signature data: %s\n", i, matchname, optionalsigdata);
156
-			    sn_sigscan_resultfree(resulthandle);
157
-			    return CL_EMALFDB;
158
-			}
159
-
160
-			if(atoi(pt) > cl_retflevel()) {
161
-			    cli_dbgmsg("cli_scanbuff: HW Result[%u]: %s: Signature required flevel: %u, current: %u\n", i, matchname, atoi(pt), cl_retflevel());
162
-			    free(pt);
163
-			    continue;
164
-			}
165
-			free(pt);
166
-		    }
167
-
168
-		} else {
169
-		    if(!isdigit(*optionalsigdata)) {
170
-			cli_errmsg("cli_scanbuff: HW Result[%u]: %s: Incorrect optional signature data: %s\n", i, matchname, optionalsigdata);
171
-			sn_sigscan_resultfree(resulthandle);
172
-			return CL_EMALFDB;
173
-		    }
174
-
175
-		    if(atoi(optionalsigdata) > cl_retflevel()) {
176
-			cli_dbgmsg("cli_scandesc: HW Result[%u]: %s: Signature required flevel: %u, current: %u\n", i, matchname, atoi(optionalsigdata), cl_retflevel());
177
-			continue;
178
-		    }
179
-		}
180
-	    }
181
-
182
-	    *virname = matchname;
183
-	    ret = CL_VIRUS;
184
-	    break;
185
-	}
186
-
187
-	if((hret = sn_sigscan_resultfree(resulthandle)) < 0) {
188
-	    cli_errmsg("cli_scanbuff: can't free results: %d\n", ret);
189
-	    return CL_ENCIO;
190
-	}
191
-
192
-	return ret;
193
-    }
194
-#endif /* HAVE_NCORE */
195
-
76
+    if(engine->ncore)
77
+	return cli_ncore_scanbuff(buffer, length, virname, engine, ftype, targettab);
78
+#endif
196 79
 
197 80
     groot = engine->root[0]; /* generic signatures */
198 81
 
... ...
@@ -230,7 +103,7 @@ int cli_scanbuff(const unsigned char *buffer, unsigned int length, const char **
230 230
     return ret;
231 231
 }
232 232
 
233
-static struct cli_md5_node *cli_vermd5(const unsigned char *md5, const struct cl_engine *engine)
233
+struct cli_md5_node *cli_vermd5(const unsigned char *md5, const struct cl_engine *engine)
234 234
 {
235 235
 	struct cli_md5_node *pt;
236 236
 
... ...
@@ -248,7 +121,7 @@ static struct cli_md5_node *cli_vermd5(const unsigned char *md5, const struct cl
248 248
     return NULL;
249 249
 }
250 250
 
251
-static off_t cli_caloff(const char *offstr, struct cli_target_info *info, int fd, unsigned short ftype, int *ret)
251
+off_t cli_caloff(const char *offstr, struct cli_target_info *info, int fd, unsigned short ftype, int *ret)
252 252
 {
253 253
 	int (*einfo)(int, struct cli_exe_info *) = NULL;
254 254
 	unsigned int n;
... ...
@@ -413,16 +286,6 @@ int cli_scandesc(int desc, cli_ctx *ctx, unsigned short otfrec, unsigned short f
413 413
 	unsigned char digest[16];
414 414
 	struct cli_md5_node *md5_node;
415 415
 	struct cli_matcher *groot, *troot = NULL;
416
-#ifdef HAVE_NCORE
417
-	void *streamhandle;
418
-	void *resulthandle;
419
-	unsigned long long hoffset;
420
-	uint32_t datamask[2] = { 0xffffffff, 0xffffffff };
421
-	int count, hret;
422
-	off_t origoff;
423
-	char *pt;
424
-	struct cli_target_info info;
425
-#endif
426 416
 
427 417
 
428 418
     if(!ctx->engine) {
... ...
@@ -432,222 +295,13 @@ int cli_scandesc(int desc, cli_ctx *ctx, unsigned short otfrec, unsigned short f
432 432
 
433 433
 #ifdef HAVE_NCORE
434 434
     if(ctx->engine->ncore) {
435
-	/* TODO: Setup proper data bitmask (need specs) */
436
-	if((hret = sn_sigscan_createstream(ctx->engine->ncdb, datamask, 2, &streamhandle)) < 0) {
437
-	    cli_errmsg("cli_scandesc: can't create new hardware stream: %d\n", hret);
438
-	    return CL_ENCIO;
439
-	}
440
-
441
-	if(!(buffer = (char *) cli_calloc(HWBUFFSIZE, sizeof(char)))) {
442
-	    cli_dbgmsg("cli_scandesc: unable to cli_calloc(%u)\n", HWBUFFSIZE);
443
-	    return CL_EMEM;
444
-	}
445
-
446
-	if((origoff = lseek(desc, 0, SEEK_CUR)) == -1) {
447
-	    cli_errmsg("cli_scandesc: lseek() failed for descriptor %d\n", desc);
448
-	    free(buffer);
449
-	    return CL_EIO;
450
-	}
451
-
452
-	if(ctx->engine->md5_hlist)
453
-	    MD5_Init(&md5ctx);
435
+	    int cont;
454 436
 
455
-	while((bytes = cli_readn(desc, buffer, HWBUFFSIZE)) > 0) {
456
-	    if((hret = sn_sigscan_writestream(streamhandle, buffer, bytes)) < 0) {
457
-		cli_errmsg("cli_scandesc: can't write to hardware stream: %d\n", hret);
458
-		ret = CL_ENCIO;
459
-		break;
460
-	    } else {
461
-		if(ctx->scanned)
462
-		    *ctx->scanned += bytes / CL_COUNT_PRECISION;
463
-
464
-		if(ctx->engine->md5_hlist)
465
-		    MD5_Update(&md5ctx, buffer, bytes);
466
-	    }
467
-	}
468
-
469
-	free(buffer);
470
-
471
-	if((hret = sn_sigscan_closestream(streamhandle, &resulthandle)) < 0) {
472
-	    cli_errmsg("cli_scandesc: can't close hardware stream: %d\n", hret);
473
-	    return CL_ENCIO;
474
-	}
475
-
476
-	count = sn_sigscan_resultcount(resulthandle);
477
-
478
-	memset(&info, 0, sizeof(info));
479
-
480
-	for(i = 0; i < count; i++) {
481
-		const char *matchname = NULL, *offsetstring = NULL, *optionalsigdata = NULL;
482
-		unsigned long long startoffset = 0;
483
-		off_t offset;
484
-		int targettype = 0;
485
-
486
-	    if((hret = sn_sigscan_resultget_name(resulthandle, i, &matchname) < 0)) {
487
-		cli_errmsg("cli_scandesc: sn_sigscan_resultget_name failed for result %u: %d\n", i, hret);
488
-		sn_sigscan_resultfree(resulthandle);
489
-		if(info.exeinfo.section)
490
-		    free(info.exeinfo.section);
491
-		return CL_ENCIO;
492
-	    }
493
-
494
-	    if(!matchname) {
495
-		cli_errmsg("cli_scandesc: HW Result[%u]: Signature without name\n", i);
496
-		sn_sigscan_resultfree(resulthandle);
497
-		if(info.exeinfo.section)
498
-		    free(info.exeinfo.section);
499
-		return CL_EMALFDB;
500
-	    }
501
-
502
-	    if((hret = sn_sigscan_resultget_targettype(resulthandle, i, &targettype) < 0)) {
503
-		cli_errmsg("cli_scandesc: sn_sigscan_resultget_targettype failed for result %u, signature %s: %d\n", i, matchname, hret);
504
-		sn_sigscan_resultfree(resulthandle);
505
-		if(info.exeinfo.section)
506
-		    free(info.exeinfo.section);
507
-		return CL_ENCIO;
508
-	    }
509
-	    if(targettype && targettab[targettype] != (int) ftype) {
510
-		cli_dbgmsg("cli_scandesc: HW Result[%u]: %s: Target type: %u, expected: %u\n", i, matchname, targettab[targettype], ftype);
511
-		continue;
512
-	    }
513
-
514
-	    if((hret = sn_sigscan_resultget_offsetstring(resulthandle, i, &offsetstring) < 0)) {
515
-		cli_errmsg("cli_scandesc: sn_sigscan_resultget_offsetstring failed for result %u, signature %s: %d\n", i, matchname, hret);
516
-		sn_sigscan_resultfree(resulthandle);
517
-		if(info.exeinfo.section)
518
-		    free(info.exeinfo.section);
519
-		return CL_ENCIO;
520
-	    }
521
-	    if((hret = sn_sigscan_resultget_startoffset(resulthandle, i, &startoffset) < 0)) {
522
-		cli_errmsg("cli_scandesc: sn_sigscan_resultget_startoffset failed for result %u, signature %s: %d\n", i, matchname, hret);
523
-		sn_sigscan_resultfree(resulthandle);
524
-		if(info.exeinfo.section)
525
-		    free(info.exeinfo.section);
526
-		return CL_ENCIO;
527
-	    }
528
-	    if(offsetstring && strcmp(offsetstring, "*")) {
529
-		    off_t off = cli_caloff(offsetstring, &info, desc, ftype, &hret);
530
-
531
-		if(hret == -1) {
532
-		    cli_dbgmsg("cli_scandesc: HW Result[%u]: %s: Bad offset in signature\n", i, matchname);
533
-		    sn_sigscan_resultfree(resulthandle);
534
-		    if(info.exeinfo.section)
535
-			free(info.exeinfo.section);
536
-		    return CL_EMALFDB;
537
-		}
538
-
539
-		if(startoffset != (unsigned long long) off) {
540
-		    cli_dbgmsg("cli_scandesc: HW Result[%u]: %s: Virus offset: %lu, expected: %lu\n", i, matchname, startoffset, off);
541
-		    continue;
542
-		}
543
-	    }
544
-
545
-	    if((hret = sn_sigscan_resultget_extradata(resulthandle, i, &optionalsigdata) < 0)) {
546
-		cli_errmsg("cli_scandesc: sn_sigscan_resultget_extradata failed for result %u, signature %s: %u\n", i, matchname, hret);
547
-		sn_sigscan_resultfree(resulthandle);
548
-		if(info.exeinfo.section)
549
-		    free(info.exeinfo.section);
550
-		return CL_ENCIO;
551
-	    }
552
-	    if(optionalsigdata && strlen(optionalsigdata)) {
553
-		if((pt = cli_strtok(optionalsigdata, 1, ":"))) { /* max version */
554
-		    if(!isdigit(*pt)) {
555
-			free(pt);
556
-			cli_errmsg("cli_scandesc: HW Result[%u]: %s: Incorrect optional signature data: %s\n", i, matchname, optionalsigdata);
557
-			sn_sigscan_resultfree(resulthandle);
558
-			if(info.exeinfo.section)
559
-			    free(info.exeinfo.section);
560
-			return CL_EMALFDB;
561
-		    }
562
-
563
-		    if(atoi(pt) < cl_retflevel()) {
564
-			cli_dbgmsg("cli_scandesc: HW Result[%u]: %s: Signature max flevel: %u, current: %u\n", i, matchname, atoi(pt), cl_retflevel());
565
-			free(pt);
566
-			continue;
567
-		    }
568
-
569
-		    free(pt);
570
-		    if((pt = cli_strtok(optionalsigdata, 0, ":"))) { /* min version */
571
-			if(!isdigit(*pt)) {
572
-			    free(pt);
573
-			    cli_errmsg("cli_scandesc: HW Result[%u]: %s: Incorrect optional signature data: %s\n", i, matchname, optionalsigdata);
574
-			    sn_sigscan_resultfree(resulthandle);
575
-			    if(info.exeinfo.section)
576
-				free(info.exeinfo.section);
577
-			    return CL_EMALFDB;
578
-			}
579
-
580
-			if(atoi(pt) > cl_retflevel()) {
581
-			    cli_dbgmsg("cli_scandesc: HW Result[%u]: %s: Signature required flevel: %u, current: %u\n", i, matchname, atoi(pt), cl_retflevel());
582
-			    free(pt);
583
-			    continue;
584
-			}
585
-			free(pt);
586
-		    }
587
-
588
-		} else {
589
-		    if(!isdigit(*optionalsigdata)) {
590
-			cli_errmsg("cli_scandesc: HW Result[%u]: %s: Incorrect optional signature data: %s\n", i, matchname, optionalsigdata);
591
-			sn_sigscan_resultfree(resulthandle);
592
-			if(info.exeinfo.section)
593
-			    free(info.exeinfo.section);
594
-			return CL_EMALFDB;
595
-		    }
596
-
597
-		    if(atoi(optionalsigdata) > cl_retflevel()) {
598
-			cli_dbgmsg("cli_scandesc: HW Result[%u]: %s: Signature required flevel: %u, current: %u\n", i, matchname, atoi(optionalsigdata), cl_retflevel());
599
-			continue;
600
-		    }
601
-		}
602
-	    }
603
-
604
-	    *ctx->virname = matchname;
605
-	    ret = CL_VIRUS;
606
-	    break;
607
-	}
608
-
609
-	if(info.exeinfo.section)
610
-	    free(info.exeinfo.section);
611
-
612
-	if((hret = sn_sigscan_resultfree(resulthandle)) < 0) {
613
-	    cli_errmsg("cli_scandesc: can't free results: %d\n", ret);
614
-	    return CL_ENCIO;
615
-	}
616
-
617
-	if(ctx->engine->md5_hlist) {
618
-	    MD5_Final(digest, &md5ctx);
619
-
620
-	    if((md5_node = cli_vermd5(digest, ctx->engine))) {
621
-		struct stat sb;
622
-
623
-		if(fstat(desc, &sb))
624
-		    return CL_EIO;
625
-
626
-		if((unsigned int) sb.st_size != md5_node->size) {
627
-		    cli_warnmsg("Detected false positive MD5 match. Please report.\n");
628
-		} else {
629
-		    if(md5_node->fp) {
630
-			cli_dbgmsg("Eliminated false positive match (fp sig: %s)\n", md5_node->virname);
631
-			ret = CL_CLEAN;
632
-		    } else {
633
-			if(ctx->virname)
634
-			    *ctx->virname = md5_node->virname;
635
-			ret = CL_VIRUS;
636
-		    }
637
-		}
638
-	    }
639
-	}
640
-
641
-	if(ret == CL_VIRUS || (ftype != CL_TYPE_UNKNOWN_TEXT && ftype != CL_TYPE_UNKNOWN_DATA))
437
+	ret = cli_ncore_scandesc(desc, ctx, ftype, &cont, targettab, &md5ctx);
438
+	if(!cont)
642 439
 	    return ret;
643
-
644
-	if((origoff = lseek(desc, origoff, SEEK_SET)) == -1) {
645
-	    cli_errmsg("cli_scandesc: lseek() failed for descriptor %d\n", desc);
646
-	    return CL_EIO;
647
-	}
648 440
     }
649
-#endif /* HAVE_NCORE */
650
-
441
+#endif
651 442
 
652 443
     groot = ctx->engine->root[0]; /* generic signatures */
653 444
 
... ...
@@ -27,6 +27,7 @@
27 27
 #include "others.h"
28 28
 #include "execs.h"
29 29
 #include "cltypes.h"
30
+#include "md5.h"
30 31
 
31 32
 #define CL_TARGET_TABLE_SIZE 7
32 33
 
... ...
@@ -42,4 +43,8 @@ int cli_scanbuff(const unsigned char *buffer, unsigned int length, const char **
42 42
 
43 43
 int cli_validatesig(unsigned short ftype, const char *offstr, off_t fileoff, struct cli_target_info *info, int desc, const char *virname);
44 44
 
45
+struct cli_md5_node *cli_vermd5(const unsigned char *md5, const struct cl_engine *engine);
46
+
47
+off_t cli_caloff(const char *offstr, struct cli_target_info *info, int fd, unsigned short ftype, int *ret);
48
+
45 49
 #endif
... ...
@@ -79,7 +79,7 @@ static pthread_mutex_t cli_ref_mutex = PTHREAD_MUTEX_INITIALIZER;
79 79
 #endif
80 80
 
81 81
 #ifdef HAVE_NCORE
82
-#include <sn_sigscan/sn_sigscan.h>
82
+#include "matcher-ncore.h"
83 83
 #endif
84 84
 
85 85
 
... ...
@@ -475,7 +475,7 @@ int cli_parse_add(struct cli_matcher *root, const char *virname, const char *hex
475 475
     return CL_SUCCESS;
476 476
 }
477 477
 
478
-static int cli_initengine(struct cl_engine **engine, unsigned int options)
478
+int cli_initengine(struct cl_engine **engine, unsigned int options)
479 479
 {
480 480
 #ifdef CL_EXPERIMENTAL
481 481
 	int ret;
... ...
@@ -712,7 +712,7 @@ static int cli_loadndb(FILE *fd, struct cl_engine **engine, unsigned int *signo,
712 712
 		break;
713 713
 	    }
714 714
 
715
-	    if(atoi(pt) > cl_retflevel()) {
715
+	    if((unsigned int) atoi(pt) > cl_retflevel()) {
716 716
 		cli_dbgmsg("Signature for %s not loaded (required f-level: %d)\n", virname, atoi(pt));
717 717
 		sigs--;
718 718
 		free(virname);
... ...
@@ -730,7 +730,7 @@ static int cli_loadndb(FILE *fd, struct cl_engine **engine, unsigned int *signo,
730 730
 		    break;
731 731
 		}
732 732
 
733
-		if(atoi(pt) < cl_retflevel()) {
733
+		if((unsigned int) atoi(pt) < cl_retflevel()) {
734 734
 		    sigs--;
735 735
 		    free(virname);
736 736
 		    free(pt);
... ...
@@ -1100,37 +1100,6 @@ static int cli_loadmd(FILE *fd, struct cl_engine **engine, unsigned int *signo,
1100 1100
     return CL_SUCCESS;
1101 1101
 }
1102 1102
 
1103
-#ifdef HAVE_NCORE
1104
-static int cli_loadncdb(const char *filename, struct cl_engine **engine, unsigned int *signo, unsigned int options)
1105
-{
1106
-	int ret = 0;
1107
-	unsigned int newsigs = 0;
1108
-
1109
-
1110
-    if((ret = cli_initengine(engine, options))) {
1111
-	cl_free(*engine);
1112
-	return ret;
1113
-    }
1114
-
1115
-    if((ret = sn_sigscan_initdb(&(*engine)->ncdb)) < 0) {
1116
-	cli_errmsg("cli_loadncdb: error initializing the matcher: %d\n", ret);
1117
-	cl_free(*engine);
1118
-	return CL_ENCINIT;
1119
-    }
1120
-
1121
-    (*engine)->ncore = 1;
1122
-
1123
-    if((ret = sn_sigscan_loaddb((*engine)->ncdb, filename, 0, &newsigs)) < 0) {
1124
-	cli_errmsg("cli_loadncdb: can't load hardware database: %d\n", ret);
1125
-	cl_free(*engine);
1126
-	return CL_ENCLOAD;
1127
-    }
1128
-
1129
-    *signo += newsigs;
1130
-    return CL_SUCCESS;
1131
-}
1132
-#endif /* HAVE_NCORE */
1133
-
1134 1103
 static int cli_loaddbdir(const char *dirname, struct cl_engine **engine, unsigned int *signo, unsigned int options);
1135 1104
 
1136 1105
 static int cli_load(const char *filename, struct cl_engine **engine, unsigned int *signo, unsigned int options)
... ...
@@ -1193,7 +1162,7 @@ static int cli_load(const char *filename, struct cl_engine **engine, unsigned in
1193 1193
     } else if(cli_strbcasestr(filename, ".ncdb")) {
1194 1194
 #ifdef HAVE_NCORE
1195 1195
 	if(options & CL_DB_NCORE)
1196
-	    ret = cli_loadncdb(filename, engine, signo, options);
1196
+	    ret = cli_ncore_load(filename, engine, signo, options);
1197 1197
 	else
1198 1198
 #endif
1199 1199
 	    skipped = 1;
... ...
@@ -1445,7 +1414,7 @@ int cl_statchkdir(const struct cl_stat *dbstat)
1445 1445
 	} result;
1446 1446
 #endif
1447 1447
 	struct stat sb;
1448
-	int i, found;
1448
+	unsigned int i, found;
1449 1449
 	char *fname;
1450 1450
 
1451 1451
 
... ...
@@ -1566,9 +1535,6 @@ void cl_free(struct cl_engine *engine)
1566 1566
 	struct cli_md5_node *md5pt, *md5h;
1567 1567
 	struct cli_meta_node *metapt, *metah;
1568 1568
 	struct cli_matcher *root;
1569
-#ifdef HAVE_NCORE
1570
-	int ret;
1571
-#endif
1572 1569
 
1573 1570
 
1574 1571
     if(!engine) {
... ...
@@ -1593,11 +1559,8 @@ void cl_free(struct cl_engine *engine)
1593 1593
 #endif
1594 1594
 
1595 1595
 #ifdef HAVE_NCORE
1596
-    if(engine->ncore) {
1597
-	if((ret = sn_sigscan_closedb(engine->ncdb)) < 0) {
1598
-	    cli_errmsg("cl_free: can't close hardware database: %d\n", ret);
1599
-	}
1600
-    }
1596
+    if(engine->ncore)
1597
+	cli_ncore_unload(engine);
1601 1598
 #endif
1602 1599
 
1603 1600
     for(i = 0; i < CL_TARGET_TABLE_SIZE; i++) {
... ...
@@ -20,6 +20,10 @@
20 20
 #ifndef __READDB_H
21 21
 #define __READDB_H
22 22
 
23
+#include "clamav.h"
24
+
23 25
 int cli_parse_add(struct cli_matcher *root, const char *virname, const char *hexsig, unsigned short type, char *offset, unsigned short target);
24 26
 
27
+int cli_initengine(struct cl_engine **engine, unsigned int options);
28
+
25 29
 #endif