@@ -424,6 +424,26 @@ case $host_os in
424424 * ) AC_MSG_RESULT ( no ) ;;
425425esac
426426
427+ # We default to using our zlib unless --with-included-zlib=no is given.
428+ if test x"$with_included_zlib" != x"no"; then
429+ with_included_zlib=yes
430+ elif test x"$ac_cv_header_zlib_h" != x"yes"; then
431+ with_included_zlib=yes
432+ fi
433+ if test x"$with_included_zlib" != x"yes"; then
434+ AC_CHECK_LIB ( z , deflateParams , , [ with_included_zlib=yes] )
435+ fi
436+
437+ AC_MSG_CHECKING ( [ whether to use included zlib] )
438+ if test x"$with_included_zlib" = x"yes"; then
439+ AC_MSG_RESULT ( $srcdir/zlib )
440+ BUILD_ZLIB='$(zlib_OBJS)'
441+ CFLAGS="-I$srcdir/zlib $CFLAGS"
442+ else
443+ AC_DEFINE ( EXTERNAL_ZLIB , 1 , [ Define to 1 if using external zlib] )
444+ AC_MSG_RESULT ( no )
445+ fi
446+
427447AC_MSG_CHECKING ( [ whether to enable use of openssl crypto library] )
428448AC_ARG_ENABLE ( [ openssl] ,
429449 AS_HELP_STRING ( [ --disable-openssl] ,[ disable to omit openssl crypto library] ) )
@@ -1096,26 +1116,6 @@ else
10961116 AC_MSG_RESULT ( no )
10971117fi
10981118
1099- # We default to using our zlib unless --with-included-zlib=no is given.
1100- if test x"$with_included_zlib" != x"no"; then
1101- with_included_zlib=yes
1102- elif test x"$ac_cv_header_zlib_h" != x"yes"; then
1103- with_included_zlib=yes
1104- fi
1105- if test x"$with_included_zlib" != x"yes"; then
1106- AC_CHECK_LIB ( z , deflateParams , , [ with_included_zlib=yes] )
1107- fi
1108-
1109- AC_MSG_CHECKING ( [ whether to use included zlib] )
1110- if test x"$with_included_zlib" = x"yes"; then
1111- AC_MSG_RESULT ( $srcdir/zlib )
1112- BUILD_ZLIB='$(zlib_OBJS)'
1113- CFLAGS="-I$srcdir/zlib $CFLAGS"
1114- else
1115- AC_DEFINE ( EXTERNAL_ZLIB , 1 , [ Define to 1 if using external zlib] )
1116- AC_MSG_RESULT ( no )
1117- fi
1118-
11191119AC_CACHE_CHECK ( [ for unsigned char] ,rsync_cv_SIGNED_CHAR_OK ,[
11201120AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [ ] ] , [ [ signed char *s = (signed char *)""] ] ) ] ,[ rsync_cv_SIGNED_CHAR_OK=yes] ,[ rsync_cv_SIGNED_CHAR_OK=no] ) ] )
11211121if test x"$rsync_cv_SIGNED_CHAR_OK" = x"yes"; then
0 commit comments