Browse code

fix detection of inet_ntop on Solaris

git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@752 77e5149b-7576-45b1-b177-96237e5ba77b

Tomasz Kojm authored on 2004/08/14 21:54:15
Showing 4 changed files
... ...
@@ -1,3 +1,8 @@
1
+Sat Aug 14 14:44:39 CEST 2004 (tk)
2
+----------------------------------
3
+  * configure: fix detection of inet_ntop on Solaris (patch by David Champion
4
+	       <dgc*uchicago.edu>)
5
+
1 6
 Sat Aug 14 14:23:41 CEST 2004 (tk)
2 7
 ----------------------------------
3 8
   * libclamav: pe: fix Petite v2.1 support (aCaB)
... ...
@@ -46,7 +46,7 @@ while test $# -gt 0; do
46 46
 	;;
47 47
 
48 48
     --version)
49
-	echo devel-20040729
49
+	echo devel-20040814
50 50
 	exit 0
51 51
 	;;
52 52
 
... ...
@@ -8964,6 +8964,142 @@ _ACEOF
8964 8964
 
8965 8965
 
8966 8966
 
8967
+echo "$as_me:$LINENO: checking for bind in -lsocket" >&5
8968
+echo $ECHO_N "checking for bind in -lsocket... $ECHO_C" >&6
8969
+if test "${ac_cv_lib_socket_bind+set}" = set; then
8970
+  echo $ECHO_N "(cached) $ECHO_C" >&6
8971
+else
8972
+  ac_check_lib_save_LIBS=$LIBS
8973
+LIBS="-lsocket  $LIBS"
8974
+cat >conftest.$ac_ext <<_ACEOF
8975
+/* confdefs.h.  */
8976
+_ACEOF
8977
+cat confdefs.h >>conftest.$ac_ext
8978
+cat >>conftest.$ac_ext <<_ACEOF
8979
+/* end confdefs.h.  */
8980
+
8981
+/* Override any gcc2 internal prototype to avoid an error.  */
8982
+#ifdef __cplusplus
8983
+extern "C"
8984
+#endif
8985
+/* We use char because int might match the return type of a gcc2
8986
+   builtin and then its argument prototype would still apply.  */
8987
+char bind ();
8988
+int
8989
+main ()
8990
+{
8991
+bind ();
8992
+  ;
8993
+  return 0;
8994
+}
8995
+_ACEOF
8996
+rm -f conftest.$ac_objext conftest$ac_exeext
8997
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8998
+  (eval $ac_link) 2>conftest.er1
8999
+  ac_status=$?
9000
+  grep -v '^ *+' conftest.er1 >conftest.err
9001
+  rm -f conftest.er1
9002
+  cat conftest.err >&5
9003
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9004
+  (exit $ac_status); } &&
9005
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
9006
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9007
+  (eval $ac_try) 2>&5
9008
+  ac_status=$?
9009
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9010
+  (exit $ac_status); }; } &&
9011
+	 { ac_try='test -s conftest$ac_exeext'
9012
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9013
+  (eval $ac_try) 2>&5
9014
+  ac_status=$?
9015
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9016
+  (exit $ac_status); }; }; then
9017
+  ac_cv_lib_socket_bind=yes
9018
+else
9019
+  echo "$as_me: failed program was:" >&5
9020
+sed 's/^/| /' conftest.$ac_ext >&5
9021
+
9022
+ac_cv_lib_socket_bind=no
9023
+fi
9024
+rm -f conftest.err conftest.$ac_objext \
9025
+      conftest$ac_exeext conftest.$ac_ext
9026
+LIBS=$ac_check_lib_save_LIBS
9027
+fi
9028
+echo "$as_me:$LINENO: result: $ac_cv_lib_socket_bind" >&5
9029
+echo "${ECHO_T}$ac_cv_lib_socket_bind" >&6
9030
+if test $ac_cv_lib_socket_bind = yes; then
9031
+  LIBS="$LIBS -lsocket"; CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lsocket"; LDFLAGS="$LDFLAGS -lsocket"; FRESHCLAM_LIBS="$FRESHCLAM_LIBS -lsocket"; CLAMD_LIBS="$CLAMD_LIBS -lsocket"
9032
+fi
9033
+
9034
+echo "$as_me:$LINENO: checking for gethostent in -lnsl" >&5
9035
+echo $ECHO_N "checking for gethostent in -lnsl... $ECHO_C" >&6
9036
+if test "${ac_cv_lib_nsl_gethostent+set}" = set; then
9037
+  echo $ECHO_N "(cached) $ECHO_C" >&6
9038
+else
9039
+  ac_check_lib_save_LIBS=$LIBS
9040
+LIBS="-lnsl  $LIBS"
9041
+cat >conftest.$ac_ext <<_ACEOF
9042
+/* confdefs.h.  */
9043
+_ACEOF
9044
+cat confdefs.h >>conftest.$ac_ext
9045
+cat >>conftest.$ac_ext <<_ACEOF
9046
+/* end confdefs.h.  */
9047
+
9048
+/* Override any gcc2 internal prototype to avoid an error.  */
9049
+#ifdef __cplusplus
9050
+extern "C"
9051
+#endif
9052
+/* We use char because int might match the return type of a gcc2
9053
+   builtin and then its argument prototype would still apply.  */
9054
+char gethostent ();
9055
+int
9056
+main ()
9057
+{
9058
+gethostent ();
9059
+  ;
9060
+  return 0;
9061
+}
9062
+_ACEOF
9063
+rm -f conftest.$ac_objext conftest$ac_exeext
9064
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9065
+  (eval $ac_link) 2>conftest.er1
9066
+  ac_status=$?
9067
+  grep -v '^ *+' conftest.er1 >conftest.err
9068
+  rm -f conftest.er1
9069
+  cat conftest.err >&5
9070
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9071
+  (exit $ac_status); } &&
9072
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
9073
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9074
+  (eval $ac_try) 2>&5
9075
+  ac_status=$?
9076
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9077
+  (exit $ac_status); }; } &&
9078
+	 { ac_try='test -s conftest$ac_exeext'
9079
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9080
+  (eval $ac_try) 2>&5
9081
+  ac_status=$?
9082
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9083
+  (exit $ac_status); }; }; then
9084
+  ac_cv_lib_nsl_gethostent=yes
9085
+else
9086
+  echo "$as_me: failed program was:" >&5
9087
+sed 's/^/| /' conftest.$ac_ext >&5
9088
+
9089
+ac_cv_lib_nsl_gethostent=no
9090
+fi
9091
+rm -f conftest.err conftest.$ac_objext \
9092
+      conftest$ac_exeext conftest.$ac_ext
9093
+LIBS=$ac_check_lib_save_LIBS
9094
+fi
9095
+echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostent" >&5
9096
+echo "${ECHO_T}$ac_cv_lib_nsl_gethostent" >&6
9097
+if test $ac_cv_lib_nsl_gethostent = yes; then
9098
+  LIBS="$LIBS -lnsl"; CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lnsl"; LDFLAGS="$LDFLAGS -lnsl"; FRESHCLAM_LIBS="$FRESHCLAM_LIBS -lnsl"; CLAMD_LIBS="$CLAMD_LIBS -lnsl"
9099
+fi
9100
+
9101
+
9102
+
8967 9103
 
8968 9104
 
8969 9105
 
... ...
@@ -11206,141 +11342,6 @@ esac
11206 11206
 
11207 11207
 
11208 11208
 
11209
-echo "$as_me:$LINENO: checking for bind in -lsocket" >&5
11210
-echo $ECHO_N "checking for bind in -lsocket... $ECHO_C" >&6
11211
-if test "${ac_cv_lib_socket_bind+set}" = set; then
11212
-  echo $ECHO_N "(cached) $ECHO_C" >&6
11213
-else
11214
-  ac_check_lib_save_LIBS=$LIBS
11215
-LIBS="-lsocket  $LIBS"
11216
-cat >conftest.$ac_ext <<_ACEOF
11217
-/* confdefs.h.  */
11218
-_ACEOF
11219
-cat confdefs.h >>conftest.$ac_ext
11220
-cat >>conftest.$ac_ext <<_ACEOF
11221
-/* end confdefs.h.  */
11222
-
11223
-/* Override any gcc2 internal prototype to avoid an error.  */
11224
-#ifdef __cplusplus
11225
-extern "C"
11226
-#endif
11227
-/* We use char because int might match the return type of a gcc2
11228
-   builtin and then its argument prototype would still apply.  */
11229
-char bind ();
11230
-int
11231
-main ()
11232
-{
11233
-bind ();
11234
-  ;
11235
-  return 0;
11236
-}
11237
-_ACEOF
11238
-rm -f conftest.$ac_objext conftest$ac_exeext
11239
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11240
-  (eval $ac_link) 2>conftest.er1
11241
-  ac_status=$?
11242
-  grep -v '^ *+' conftest.er1 >conftest.err
11243
-  rm -f conftest.er1
11244
-  cat conftest.err >&5
11245
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11246
-  (exit $ac_status); } &&
11247
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
11248
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11249
-  (eval $ac_try) 2>&5
11250
-  ac_status=$?
11251
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11252
-  (exit $ac_status); }; } &&
11253
-	 { ac_try='test -s conftest$ac_exeext'
11254
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11255
-  (eval $ac_try) 2>&5
11256
-  ac_status=$?
11257
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11258
-  (exit $ac_status); }; }; then
11259
-  ac_cv_lib_socket_bind=yes
11260
-else
11261
-  echo "$as_me: failed program was:" >&5
11262
-sed 's/^/| /' conftest.$ac_ext >&5
11263
-
11264
-ac_cv_lib_socket_bind=no
11265
-fi
11266
-rm -f conftest.err conftest.$ac_objext \
11267
-      conftest$ac_exeext conftest.$ac_ext
11268
-LIBS=$ac_check_lib_save_LIBS
11269
-fi
11270
-echo "$as_me:$LINENO: result: $ac_cv_lib_socket_bind" >&5
11271
-echo "${ECHO_T}$ac_cv_lib_socket_bind" >&6
11272
-if test $ac_cv_lib_socket_bind = yes; then
11273
-  LIBS="$LIBS -lsocket"; CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lsocket"; LDFLAGS="$LDFLAGS -lsocket"; FRESHCLAM_LIBS="$FRESHCLAM_LIBS -lsocket"; CLAMD_LIBS="$CLAMD_LIBS -lsocket"
11274
-fi
11275
-
11276
-echo "$as_me:$LINENO: checking for gethostent in -lnsl" >&5
11277
-echo $ECHO_N "checking for gethostent in -lnsl... $ECHO_C" >&6
11278
-if test "${ac_cv_lib_nsl_gethostent+set}" = set; then
11279
-  echo $ECHO_N "(cached) $ECHO_C" >&6
11280
-else
11281
-  ac_check_lib_save_LIBS=$LIBS
11282
-LIBS="-lnsl  $LIBS"
11283
-cat >conftest.$ac_ext <<_ACEOF
11284
-/* confdefs.h.  */
11285
-_ACEOF
11286
-cat confdefs.h >>conftest.$ac_ext
11287
-cat >>conftest.$ac_ext <<_ACEOF
11288
-/* end confdefs.h.  */
11289
-
11290
-/* Override any gcc2 internal prototype to avoid an error.  */
11291
-#ifdef __cplusplus
11292
-extern "C"
11293
-#endif
11294
-/* We use char because int might match the return type of a gcc2
11295
-   builtin and then its argument prototype would still apply.  */
11296
-char gethostent ();
11297
-int
11298
-main ()
11299
-{
11300
-gethostent ();
11301
-  ;
11302
-  return 0;
11303
-}
11304
-_ACEOF
11305
-rm -f conftest.$ac_objext conftest$ac_exeext
11306
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11307
-  (eval $ac_link) 2>conftest.er1
11308
-  ac_status=$?
11309
-  grep -v '^ *+' conftest.er1 >conftest.err
11310
-  rm -f conftest.er1
11311
-  cat conftest.err >&5
11312
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11313
-  (exit $ac_status); } &&
11314
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
11315
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11316
-  (eval $ac_try) 2>&5
11317
-  ac_status=$?
11318
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11319
-  (exit $ac_status); }; } &&
11320
-	 { ac_try='test -s conftest$ac_exeext'
11321
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11322
-  (eval $ac_try) 2>&5
11323
-  ac_status=$?
11324
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11325
-  (exit $ac_status); }; }; then
11326
-  ac_cv_lib_nsl_gethostent=yes
11327
-else
11328
-  echo "$as_me: failed program was:" >&5
11329
-sed 's/^/| /' conftest.$ac_ext >&5
11330
-
11331
-ac_cv_lib_nsl_gethostent=no
11332
-fi
11333
-rm -f conftest.err conftest.$ac_objext \
11334
-      conftest$ac_exeext conftest.$ac_ext
11335
-LIBS=$ac_check_lib_save_LIBS
11336
-fi
11337
-echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostent" >&5
11338
-echo "${ECHO_T}$ac_cv_lib_nsl_gethostent" >&6
11339
-if test $ac_cv_lib_nsl_gethostent = yes; then
11340
-  LIBS="$LIBS -lnsl"; CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lnsl"; LDFLAGS="$LDFLAGS -lnsl"; FRESHCLAM_LIBS="$FRESHCLAM_LIBS -lnsl"; CLAMD_LIBS="$CLAMD_LIBS -lnsl"
11341
-fi
11342
-
11343
-
11344 11209
 if test "$have_milter" = "yes"; then
11345 11210
 
11346 11211
         save_LDFLAGS="$LDFLAGS"
... ...
@@ -42,6 +42,10 @@ AC_TYPE_OFF_T
42 42
 AC_COMPILE_CHECK_SIZEOF(short)
43 43
 AC_COMPILE_CHECK_SIZEOF(int)
44 44
 AC_COMPILE_CHECK_SIZEOF(long)
45
+
46
+AC_CHECK_LIB(socket, bind, [LIBS="$LIBS -lsocket"; CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lsocket"; LDFLAGS="$LDFLAGS -lsocket"; FRESHCLAM_LIBS="$FRESHCLAM_LIBS -lsocket"; CLAMD_LIBS="$CLAMD_LIBS -lsocket"])
47
+AC_CHECK_LIB(nsl, gethostent, [LIBS="$LIBS -lnsl"; CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lnsl"; LDFLAGS="$LDFLAGS -lnsl"; FRESHCLAM_LIBS="$FRESHCLAM_LIBS -lnsl"; CLAMD_LIBS="$CLAMD_LIBS -lnsl"])
48
+
45 49
 AC_CHECK_FUNCS(poll setsid memcpy snprintf vsnprintf strerror_r strlcpy strlcat inet_ntop setgroups initgroups)
46 50
 AC_FUNC_MMAP
47 51
 AC_FUNC_FSEEKO
... ...
@@ -378,9 +382,6 @@ AC_SUBST(FRESHCLAM_LIBS)
378 378
 AC_SUBST(TH_SAFE)
379 379
 AC_SUBST(ADDITIONAL_LIBS)
380 380
 
381
-AC_CHECK_LIB(socket, bind, [LIBS="$LIBS -lsocket"; CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lsocket"; LDFLAGS="$LDFLAGS -lsocket"; FRESHCLAM_LIBS="$FRESHCLAM_LIBS -lsocket"; CLAMD_LIBS="$CLAMD_LIBS -lsocket"])
382
-AC_CHECK_LIB(nsl, gethostent, [LIBS="$LIBS -lnsl"; CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lnsl"; LDFLAGS="$LDFLAGS -lnsl"; FRESHCLAM_LIBS="$FRESHCLAM_LIBS -lnsl"; CLAMD_LIBS="$CLAMD_LIBS -lnsl"])
383
-
384 381
 dnl --enable-milter
385 382
 if test "$have_milter" = "yes"; then
386 383
     dnl libmilter checking code adapted from spamass-milter by