update openssl m4

This commit is contained in:
Max Lv
2015-09-09 17:34:11 +09:00
parent 226cfa2973
commit d8e83f6598
12 changed files with 236 additions and 6 deletions
+2 -1
View File
@@ -65,7 +65,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/mbedtls.m4 \
$(top_srcdir)/m4/openssl.m4 $(top_srcdir)/m4/polarssl.m4 \
$(top_srcdir)/libev/libev.m4 $(top_srcdir)/configure.ac
$(top_srcdir)/m4/zlib.m4 $(top_srcdir)/libev/libev.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
Vendored
+1
View File
@@ -1173,3 +1173,4 @@ m4_include([m4/lt~obsolete.m4])
m4_include([m4/mbedtls.m4])
m4_include([m4/openssl.m4])
m4_include([m4/polarssl.m4])
m4_include([m4/zlib.m4])
+6
View File
@@ -245,6 +245,12 @@
/* Define to 1 if you have the <ws2tcpip.h> header file. */
#undef HAVE_WS2TCPIP_H
/* have zlib compression support */
#undef HAVE_ZLIB
/* Define to 1 if you have the <zlib.h> header file. */
#undef HAVE_ZLIB_H
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR
Vendored
+165
View File
@@ -777,6 +777,10 @@ with_gnu_ld
with_sysroot
enable_libtool_lock
with_crypto_library
enable_zlib
with_zlib
with_zlib_include
with_zlib_lib
with_openssl
with_openssl_include
with_openssl_lib
@@ -1429,6 +1433,7 @@ Optional Features:
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
--disable-zlib disable zlib compression support
--enable-applecc enable Apple CommonCrypto API support
--disable-assert turn off assertions
--disable-largefile omit support for large files
@@ -1444,6 +1449,9 @@ Optional Packages:
--with-crypto-library=library
build with the given crypto library,
TYPE=openssl|polarssl|mbedtls [default=openssl]
--with-zlib=DIR zlib base directory, or:
--with-zlib-include=DIR zlib headers directory
--with-zlib-lib=DIR zlib library directory
--with-openssl=DIR OpenSSL base directory, or:
--with-openssl-include=DIR
OpenSSL headers directory (without trailing
@@ -12916,6 +12924,163 @@ fi
case "${with_crypto_library}" in
openssl)
# Check whether --enable-zlib was given.
if test "${enable_zlib+set}" = set; then :
enableval=$enable_zlib;
fi
if test "x$enable_zlib" != "xno"; then :
$as_echo "#define HAVE_ZLIB 1" >>confdefs.h
# Check whether --with-zlib was given.
if test "${with_zlib+set}" = set; then :
withval=$with_zlib; zlib="$withval"
CPPFLAGS="$CPPFLAGS -I$withval/include"
LDFLAGS="$LDFLAGS -L$withval/lib"
fi
# Check whether --with-zlib-include was given.
if test "${with_zlib_include+set}" = set; then :
withval=$with_zlib_include; zlib_include="$withval"
CPPFLAGS="$CPPFLAGS -I$withval"
fi
# Check whether --with-zlib-lib was given.
if test "${with_zlib_lib+set}" = set; then :
withval=$with_zlib_lib; zlib_lib="$withval"
LDFLAGS="$LDFLAGS -L$withval"
fi
for ac_header in zlib.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
if test "x$ac_cv_header_zlib_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_ZLIB_H 1
_ACEOF
else
as_fn_error $? "\"zlib header files not found.\"" "$LINENO" 5; break
fi
done
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress2 in -lz" >&5
$as_echo_n "checking for compress2 in -lz... " >&6; }
if ${ac_cv_lib_z_compress2+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lz $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char compress2 ();
int
main ()
{
return compress2 ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_z_compress2=yes
else
ac_cv_lib_z_compress2=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress2" >&5
$as_echo "$ac_cv_lib_z_compress2" >&6; }
if test "x$ac_cv_lib_z_compress2" = xyes; then :
LIBS="$LIBS -lz"
else
as_fn_error $? "\"zlib libraries not found.\"" "$LINENO" 5
fi
fi
case $host_os in
*mingw*)
;;
*)
ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
if test "x$ac_cv_func_dlopen" = xyes; then :
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
$as_echo_n "checking for dlopen in -ldl... " >&6; }
if ${ac_cv_lib_dl_dlopen+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldl $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char dlopen ();
int
main ()
{
return dlopen ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_dl_dlopen=yes
else
ac_cv_lib_dl_dlopen=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
LIBS="$LIBS -ldl"
else
as_fn_error $? "OpenSSL depends on libdl." "$LINENO" 5; break
fi
fi
;;
esac
# Check whether --with-openssl was given.
+1
View File
@@ -59,6 +59,7 @@ AX_TLS([:], [:])
dnl Checks for crypto library
case "${with_crypto_library}" in
openssl)
ss_ZLIB
ss_OPENSSL
AC_DEFINE([USE_CRYPTO_OPENSSL], [1], [Use OpenSSL library])
;;
+2 -1
View File
@@ -78,7 +78,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/mbedtls.m4 \
$(top_srcdir)/m4/openssl.m4 $(top_srcdir)/m4/polarssl.m4 \
$(top_srcdir)/libev/libev.m4 $(top_srcdir)/configure.ac
$(top_srcdir)/m4/zlib.m4 $(top_srcdir)/libev/libev.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
+2 -1
View File
@@ -62,7 +62,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/mbedtls.m4 \
$(top_srcdir)/m4/openssl.m4 $(top_srcdir)/m4/polarssl.m4 \
$(top_srcdir)/libev/libev.m4 $(top_srcdir)/configure.ac
$(top_srcdir)/m4/zlib.m4 $(top_srcdir)/libev/libev.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
+2 -1
View File
@@ -78,7 +78,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/mbedtls.m4 \
$(top_srcdir)/m4/openssl.m4 $(top_srcdir)/m4/polarssl.m4 \
$(top_srcdir)/libev/libev.m4 $(top_srcdir)/configure.ac
$(top_srcdir)/m4/zlib.m4 $(top_srcdir)/libev/libev.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
+2 -1
View File
@@ -78,7 +78,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/mbedtls.m4 \
$(top_srcdir)/m4/openssl.m4 $(top_srcdir)/m4/polarssl.m4 \
$(top_srcdir)/libev/libev.m4 $(top_srcdir)/configure.ac
$(top_srcdir)/m4/zlib.m4 $(top_srcdir)/libev/libev.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
+13
View File
@@ -2,6 +2,19 @@ dnl Check to find the OpenSSL headers/libraries
AC_DEFUN([ss_OPENSSL],
[
case $host_os in
*mingw*)
;;
*)
AC_CHECK_FUNC(dlopen,
[],
[AC_CHECK_LIB(dl, dlopen,
[LIBS="$LIBS -ldl"],
[AC_MSG_ERROR([OpenSSL depends on libdl.]); break]
)]
)
;;
esac
AC_ARG_WITH(openssl,
AS_HELP_STRING([--with-openssl=DIR], [OpenSSL base directory, or:]),
+38
View File
@@ -0,0 +1,38 @@
dnl Check to find the zlib headers/libraries
AC_DEFUN([ss_ZLIB],
[
AC_ARG_ENABLE([zlib],
AS_HELP_STRING([--disable-zlib], [disable zlib compression support]))
AS_IF([test "x$enable_zlib" != "xno"], [
AC_DEFINE(HAVE_ZLIB, 1, [have zlib compression support])
AC_ARG_WITH(zlib,
AS_HELP_STRING([--with-zlib=DIR], [zlib base directory, or:]),
[zlib="$withval"
CPPFLAGS="$CPPFLAGS -I$withval/include"
LDFLAGS="$LDFLAGS -L$withval/lib"]
)
AC_ARG_WITH(zlib-include,
AS_HELP_STRING([--with-zlib-include=DIR], [zlib headers directory]),
[zlib_include="$withval"
CPPFLAGS="$CPPFLAGS -I$withval"]
)
AC_ARG_WITH(zlib-lib,
AS_HELP_STRING([--with-zlib-lib=DIR], [zlib library directory]),
[zlib_lib="$withval"
LDFLAGS="$LDFLAGS -L$withval"]
)
AC_CHECK_HEADERS(zlib.h,
[],
[AC_MSG_ERROR("zlib header files not found."); break]
)
AC_CHECK_LIB(z, compress2,
[LIBS="$LIBS -lz"],
[AC_MSG_ERROR("zlib libraries not found.")]
)
])
])
+2 -1
View File
@@ -69,7 +69,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/mbedtls.m4 \
$(top_srcdir)/m4/openssl.m4 $(top_srcdir)/m4/polarssl.m4 \
$(top_srcdir)/libev/libev.m4 $(top_srcdir)/configure.ac
$(top_srcdir)/m4/zlib.m4 $(top_srcdir)/libev/libev.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d