Permalink
Browse files

make ssl work with R14A (TSUN-157)

  • Loading branch information...
nniclausse committed Aug 3, 2010
1 parent 24f908d commit 75e5ccf58c3b3db145c8e1e7a9eec001713c272c
Showing with 192 additions and 3 deletions.
  1. +174 −1 configure
  2. +18 −2 configure.in
View
175 configure
@@ -616,6 +616,8 @@ DTD
ERLANG_APPLICATIONS
ERL_OPTS
erlang_cv_orelse
+ERLANG_LIB_VER_public_key
+ERLANG_LIB_DIR_public_key
ERLANG_LIB_VER_crypto
ERLANG_LIB_DIR_crypto
ERLANG_LIB_VER_ssl
@@ -2779,6 +2781,113 @@ ERLANG_LIB_VER_crypto=$erlang_cv_lib_ver_crypto
+{ $as_echo "$as_me:$LINENO: checking for Erlang/OTP 'public_key' library subdirectory" >&5
+$as_echo_n "checking for Erlang/OTP 'public_key' library subdirectory... " >&6; }
+if test "${erlang_cv_lib_dir_public_key+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_ext=erl
+ac_compile='$ERLC $ERLCFLAGS -b beam conftest.$ac_ext >&5'
+ac_link='$ERLC $ERLCFLAGS -b beam conftest.$ac_ext >&5 ; echo "#!/bin/sh" > conftest$ac_exeext ; $as_echo "\"$ERL\" -run conftest start -run init stop -noshell" >> conftest$ac_exeext ; chmod +x conftest$ac_exeext'
+ if test "$cross_compiling" = yes; then
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }; }
+else
+ cat >conftest.$ac_ext <<_ACEOF
+-module(conftest).
+-export([start/0]).
+
+start() ->
+ ReturnValue = case code:lib_dir("public_key") of
+ {error, bad_name} ->
+ file:write_file("conftest.out", "not found\n"),
+ 1;
+ LibDir ->
+ file:write_file("conftest.out", LibDir),
+ 0
+ end,
+ halt(ReturnValue)
+.
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ erlang_cv_lib_dir_public_key=`cat conftest.out`
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+if test ! -f conftest.out; then
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: test Erlang program execution failed
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: test Erlang program execution failed
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }; }
+ else
+ erlang_cv_lib_dir_public_key="not found"
+ fi
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+ ac_ext=erl
+ac_compile='$ERLC $ERLCFLAGS -b beam conftest.$ac_ext >&5'
+ac_link='$ERLC $ERLCFLAGS -b beam conftest.$ac_ext >&5 ; echo "#!/bin/sh" > conftest$ac_exeext ; $as_echo "\"$ERL\" -run conftest start -run init stop -noshell" >> conftest$ac_exeext ; chmod +x conftest$ac_exeext'
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $erlang_cv_lib_dir_public_key" >&5
+$as_echo "$erlang_cv_lib_dir_public_key" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for Erlang/OTP 'public_key' library version" >&5
+$as_echo_n "checking for Erlang/OTP 'public_key' library version... " >&6; }
+if test "${erlang_cv_lib_ver_public_key+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$erlang_cv_lib_dir_public_key" = "not found"; then
+ erlang_cv_lib_ver_public_key="not found"
+else
+ erlang_cv_lib_ver_public_key=`$as_echo "$erlang_cv_lib_dir_public_key" | sed -n -e 's,^.*-\([^/-]*\)$,\1,p'`
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $erlang_cv_lib_ver_public_key" >&5
+$as_echo "$erlang_cv_lib_ver_public_key" >&6; }
+ERLANG_LIB_DIR_public_key=$erlang_cv_lib_dir_public_key
+
+ERLANG_LIB_VER_public_key=$erlang_cv_lib_ver_public_key
+
+
+
{ $as_echo "$as_me:$LINENO: checking if Erlang/OTP SSL application is running fine" >&5
$as_echo_n "checking if Erlang/OTP SSL application is running fine... " >&6; }
@@ -2837,9 +2946,64 @@ else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+( exit $ac_status )
+
+ if test "$cross_compiling" = yes; then
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }; }
+else
+ cat >conftest.$ac_ext <<_ACEOF
+-module(conftest).
+-export([start/0]).
+
+start() ->
+ application:start(crypto),
+ application:start(public_key),
+ case application:start(ssl) of
+ ok -> ok;
+ Err -> halt(1)
+ end,
+ halt(0)
+.
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ erlang_cv_ssl_runnable=yes
+ ERLANG_APPLICATIONS="kernel,stdlib,crypto,public_key,ssl"
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
( exit $ac_status )
ERLANG_APPLICATIONS="kernel,stdlib"
- { $as_echo "$as_me:$LINENO: result: WARNING: ssl application is not working properly !!!" >&5
+ { $as_echo "$as_me:$LINENO: result: WARNING: ssl application is not working properly !!!" >&5
$as_echo "WARNING: ssl application is not working properly !!!" >&6; }
fi
rm -rf conftest.dSYM
@@ -2848,10 +3012,19 @@ fi
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+
fi
{ $as_echo "$as_me:$LINENO: result: $erlang_cv_ssl_runnable" >&5
$as_echo "$erlang_cv_ssl_runnable" >&6; }
+
+
{ $as_echo "$as_me:$LINENO: checking if Erlang/OTP crypto application is running fine" >&5
$as_echo_n "checking if Erlang/OTP crypto application is running fine... " >&6; }
if test "${erlang_cv_crypto_runnable+set}" = set; then
View
@@ -33,6 +33,7 @@ dnl check for xmerl include path
AC_ERLANG_CHECK_LIB(xmerl)
AC_ERLANG_CHECK_LIB(ssl)
AC_ERLANG_CHECK_LIB(crypto)
+AC_ERLANG_CHECK_LIB(public_key)
dnl check if ssl is working
AC_CACHE_CHECK([if Erlang/OTP SSL application is running fine],
@@ -47,10 +48,25 @@ AC_CACHE_CHECK([if Erlang/OTP SSL application is running fine],
halt(0)])],
[erlang_cv_ssl_runnable=yes
ERLANG_APPLICATIONS="kernel,stdlib,ssl"],
- [ERLANG_APPLICATIONS="kernel,stdlib"
- AC_MSG_RESULT(WARNING: ssl application is not working properly !!!)])
+ [
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM([], [dnl
+ application:start(crypto),
+ application:start(public_key),
+ case application:start(ssl) of
+ ok -> ok;
+ Err -> halt(1)
+ end,
+ halt(0)])],
+ [erlang_cv_ssl_runnable=yes
+ ERLANG_APPLICATIONS="kernel,stdlib,crypto,public_key,ssl"],
+ [ERLANG_APPLICATIONS="kernel,stdlib"
+ AC_MSG_RESULT(WARNING: ssl application is not working properly !!!)])
+ ])
])
+
+
dnl check if crypto is working
AC_CACHE_CHECK([if Erlang/OTP crypto application is running fine],
[erlang_cv_crypto_runnable],

0 comments on commit 75e5ccf

Please sign in to comment.