- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL support" >&5
-$as_echo_n "checking for OpenSSL support... " >&6; }
- if test "x$OPENSSL_LIBS" != "x"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
- ac_ext=c
+ smart_try_dir=$rlm_eap_pwd_include_dir
+ ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-as_ac_Lib=`$as_echo "ac_cv_lib_c $OPENSSL_LIBS''_EVP_sha256" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_sha256 in -lc $OPENSSL_LIBS" >&5
-$as_echo_n "checking for EVP_sha256 in -lc $OPENSSL_LIBS... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
- $as_echo_n "(cached) " >&6
+
+
+ac_safe=`echo "openssl/ec.h" | sed 'y%./+-%__pm%'`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ec.h" >&5
+$as_echo_n "checking for openssl/ec.h... " >&6; }
+
+old_CFLAGS="$CFLAGS"
+smart_include=
+smart_include_dir=
+
+if test "x$smart_try_dir" != "x"; then
+ for try in $smart_try_dir; do
+ CFLAGS="$old_CFLAGS -I$try"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <openssl/ec.h>
+int
+main ()
+{
+ int a = 1;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ smart_include="-I$try"
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lc $OPENSSL_LIBS $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ smart_include=
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test "x$smart_include" != "x"; then
+ break;
+ fi
+ done
+ CFLAGS="$old_CFLAGS"
+fi
+
+if test "x$smart_include" = "x"; then
+ 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 EVP_sha256 ();
+ #include <openssl/ec.h>
int
main ()
{
-return EVP_sha256 ();
+ int a = 1;
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- eval "$as_ac_Lib=yes"
+if ac_fn_c_try_compile "$LINENO"; then :
+ smart_include=" "
else
- eval "$as_ac_Lib=no"
+ smart_include=
fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-eval ac_res=\$$as_ac_Lib
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
-$as_echo "#define HAVE_OPENSSL_EVP_SHA256 1" >>confdefs.h
+if test "x$smart_include" = "x"; then
+if test "x$LOCATE" != "x"; then
+ DIRS=
+ file=openssl/ec.h
+
+ for x in `${LOCATE} $file 2>/dev/null`; do
+ base=`echo $x | sed "s%/${file}%%"`
+ if test "x$x" = "x$base"; then
+ continue;
+ fi
+
+ dir=`${DIRNAME} $x 2>/dev/null`
+ exclude=`echo ${dir} | ${GREP} /home`
+ if test "x$exclude" != "x"; then
+ continue
+ fi
+
+ already=`echo \$smart_include_dir ${DIRS} | ${GREP} ${dir}`
+ if test "x$already" = "x"; then
+ DIRS="$DIRS $dir"
+ fi
+ done
+fi
+
+eval "smart_include_dir=\"\$smart_include_dir $DIRS\""
+
+
+ for try in $smart_include_dir /usr/local/include /opt/include; do
+ CFLAGS="$old_CFLAGS -I$try"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <openssl/ec.h>
+int
+main ()
+{
+ int a = 1;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ smart_include="-I$try"
+else
+ smart_include=
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test "x$smart_include" != "x"; then
+ break;
+ fi
+ done
+ CFLAGS="$old_CFLAGS"
+fi
+
+if test "x$smart_include" != "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ eval "ac_cv_header_$ac_safe=yes"
+ CFLAGS="$old_CFLAGS $smart_include"
+ SMART_CFLAGS="$SMART_CFLAGS $smart_include"
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: EVP_sha256 not found, may have issues wirh WiMAX certificates" >&5
-$as_echo "$as_me: WARNING: EVP_sha256 not found, may have issues wirh WiMAX certificates" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
+ if test "$ac_cv_header_openssl_ec_h" != "yes"; then
+ fail="$fail openssl/ec.h"
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL support" >&5
+$as_echo_n "checking for OpenSSL support... " >&6; }
+ if test "x$OPENSSL_LIBS" != "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5