Reconfig for new acinclude stuff
[freeradius.git] / src / modules / rlm_eap / types / rlm_eap_ikev2 / configure
index b2f2fdf..2ced37c 100755 (executable)
@@ -1255,7 +1255,7 @@ Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
   --with-eap-ikev2-include-dir=DIR
-                          Directory where the json-c includes may be found
+                          Directory where the eap-ikev2 includes may be found
   --with-eap-ikev2-lib-dir=DIR
                           Directory where the eap-ikev2 libraries may be found
   --with-eap-ikev2-dir=DIR
@@ -1840,6 +1840,18 @@ if test "${with_eap_ikev2_dir+set}" = set; then :
 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
+$as_echo "no" >&6; }
+               fail="OpenSSL"
+       fi
+
                                smart_try_dir="$eap_ikev2_include_dir"
        ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -2634,15 +2646,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 ac_safe=`echo "EAPIKEv2/connector.h" | sed 'y%./+-%__pm%'`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EAPIKEv2/connector.h" >&5
-$as_echo_n "checking for EAPIKEv2/connector.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
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EAPIKEv2/connector.h in $try" >&5
+$as_echo_n "checking for EAPIKEv2/connector.h in $try... " >&6; }
     CFLAGS="$old_CFLAGS -I$try"
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -2651,25 +2662,33 @@ if test "x$smart_try_dir" != "x"; then
 int
 main ()
 {
- int a = 1;
+int a = 1;
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  smart_include="-I$try"
+
+                    smart_include="-I$try"
+                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+                    break
+
 else
-  smart_include=
+
+                    smart_include=
+                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
 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}: checking for EAPIKEv2/connector.h" >&5
+$as_echo_n "checking for EAPIKEv2/connector.h... " >&6; }
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -2677,15 +2696,24 @@ if test "x$smart_include" = "x"; then
 int
 main ()
 {
- int a = 1;
+int a = 1;
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  smart_include=" "
+
+                  smart_include=" "
+                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+                  break
+
 else
-  smart_include=
+
+                  smart_include=
+                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
@@ -2718,8 +2746,9 @@ fi
 
 eval "smart_include_dir=\"\$smart_include_dir $DIRS\""
 
-
   for try in $smart_include_dir /usr/local/include /opt/include; do
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EAPIKEv2/connector.h in $try" >&5
+$as_echo_n "checking for EAPIKEv2/connector.h in $try... " >&6; }
     CFLAGS="$old_CFLAGS -I$try"
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -2728,33 +2757,34 @@ eval "smart_include_dir=\"\$smart_include_dir $DIRS\""
 int
 main ()
 {
- int a = 1;
+int a = 1;
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  smart_include="-I$try"
+
+                    smart_include="-I$try"
+                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+                    break
+
 else
-  smart_include=
+
+                    smart_include=
+                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
 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}: result: no" >&5
-$as_echo "no" >&6; }
 fi
 
        if test "x$ac_cv_header_EAPIKEv2_connector_h" != "xyes"; then
@@ -2768,8 +2798,6 @@ fi
 
 sm_lib_safe=`echo "eap-ikev2" | sed 'y%./+-%__p_%'`
 sm_func_safe=`echo "ikev2_set_log_callback" | sed 'y%./+-%__p_%'`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ikev2_set_log_callback in -leap-ikev2" >&5
-$as_echo_n "checking for ikev2_set_log_callback in -leap-ikev2... " >&6; }
 
 old_LIBS="$LIBS"
 smart_lib=
@@ -2777,31 +2805,40 @@ smart_lib_dir=
 
 if test "x$smart_try_dir" != "x"; then
   for try in $smart_try_dir; do
-    LIBS="-L$try -leap-ikev2 $old_LIBS"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ikev2_set_log_callback in -leap-ikev2 in $try" >&5
+$as_echo_n "checking for ikev2_set_log_callback in -leap-ikev2 in $try... " >&6; }
+    LIBS="-L$try -leap-ikev2 $old_LIBS -Wl,-rpath,$try"
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 extern char ikev2_set_log_callback();
 int
 main ()
 {
- ikev2_set_log_callback()
+ikev2_set_log_callback()
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  smart_lib="-L$try -leap-ikev2"
+
+                smart_lib="-L$try -leap-ikev2 -Wl,-rpath,$try"
+                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+                break
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-    if test "x$smart_lib" != "x"; then
-      break;
-    fi
   done
   LIBS="$old_LIBS"
 fi
 
 if test "x$smart_lib" = "x"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ikev2_set_log_callback in -leap-ikev2" >&5
+$as_echo_n "checking for ikev2_set_log_callback in -leap-ikev2... " >&6; }
   LIBS="-leap-ikev2 $old_LIBS"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -2809,13 +2846,20 @@ extern char ikev2_set_log_callback();
 int
 main ()
 {
- ikev2_set_log_callback()
+ikev2_set_log_callback()
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  smart_lib="-leap-ikev2"
+
+               smart_lib="-leap-ikev2"
+               { $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
+$as_echo "no" >&6; }
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
@@ -2879,39 +2923,41 @@ eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
 
 
   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
-    LIBS="-L$try -leap-ikev2 $old_LIBS"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ikev2_set_log_callback in -leap-ikev2 in $try" >&5
+$as_echo_n "checking for ikev2_set_log_callback in -leap-ikev2 in $try... " >&6; }
+    LIBS="-L$try -rpath$try -leap-ikev2 $old_LIBS -Wl,-rpath,$try"
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 extern char ikev2_set_log_callback();
 int
 main ()
 {
- ikev2_set_log_callback()
+ikev2_set_log_callback()
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  smart_lib="-L$try -leap-ikev2"
+
+                 smart_lib="-L$try -leap-ikev2 -Wl,-rpath,$try"
+                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+                 break
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-    if test "x$smart_lib" != "x"; then
-      break;
-    fi
   done
   LIBS="$old_LIBS"
 fi
 
 if test "x$smart_lib" != "x"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
   LIBS="$smart_lib $old_LIBS"
   SMART_LIBS="$smart_lib $SMART_LIBS"
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
 fi
 
        if test "x$ac_cv_lib_eap_ikev2_ikev2_set_log_callback" != "xyes"; then
@@ -2937,8 +2983,7 @@ $as_echo "$as_me: WARNING: FAILURE: rlm_eap_ikev2 requires: $fail." >&2;};
 fi
 
 eap_ikev2_cflags="${SMART_CFLAGS}"
-eap_ikev2_ldflags="${OPENSSL_LIBS} ${SMART_LIBS}"
-
+eap_ikev2_ldflags="${SMART_LIBS}"