diff options
author | Kevin Harwell <kharwell@digium.com> | 2014-01-28 23:23:15 +0000 |
---|---|---|
committer | Kevin Harwell <kharwell@digium.com> | 2014-01-28 23:23:15 +0000 |
commit | ade5c8a2a47d2c2b1b0a4ab70eabd4bc095bd289 (patch) | |
tree | 24b1bfa3538e5486dceee618949f4cc43315df12 /configure | |
parent | 01a537d515af85c50ae608eb8486f42da7b84101 (diff) |
cdr_radius, cel_radius: build agains libfreeradius-client
Asterisk's RADIUS module currently build against libradiusclient-ng, but this
project has been superseeded by libfreeradius-client. The API is 99% compatible
except that the header name has changed, the library name has changed, and
the configuration file location has changed.
(closes issue ASTERISK-22980)
Reported by: Jeremy Lainé
Patches:
freeradius-client.patch uploaded by sharky (license 6561)
........
Merged revisions 406801 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 406802 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 406803 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@406825 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 114 |
1 files changed, 113 insertions, 1 deletions
@@ -1,5 +1,5 @@ #! /bin/sh -# From configure.ac Revision: 403330 . +# From configure.ac Revision: 405130 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for asterisk trunk. # @@ -27758,6 +27758,117 @@ fi +# Accept either RADIUS client library, their APIs are fully compatible, +# just different header filenames and different SONAMEs + +if test "x${PBX_RADIUS}" != "x1" -a "${USE_RADIUS}" != "no"; then + pbxlibdir="" + # if --with-RADIUS=DIR has been specified, use it. + if test "x${RADIUS_DIR}" != "x"; then + if test -d ${RADIUS_DIR}/lib; then + pbxlibdir="-L${RADIUS_DIR}/lib" + else + pbxlibdir="-L${RADIUS_DIR}" + fi + fi + pbxfuncname="rc_read_config" + if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers + AST_RADIUS_FOUND=yes + else + ast_ext_lib_check_save_CFLAGS="${CFLAGS}" + CFLAGS="${CFLAGS} " + as_ac_Lib=`$as_echo "ac_cv_lib_freeradius-client_${pbxfuncname}" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lfreeradius-client" >&5 +$as_echo_n "checking for ${pbxfuncname} in -lfreeradius-client... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lfreeradius-client ${pbxlibdir} $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 ${pbxfuncname} (); +int +main () +{ +return ${pbxfuncname} (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$as_ac_Lib=yes" +else + eval "$as_ac_Lib=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +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 : + AST_RADIUS_FOUND=yes +else + AST_RADIUS_FOUND=no +fi + + CFLAGS="${ast_ext_lib_check_save_CFLAGS}" + fi + + # now check for the header. + if test "${AST_RADIUS_FOUND}" = "yes"; then + RADIUS_LIB="${pbxlibdir} -lfreeradius-client " + # if --with-RADIUS=DIR has been specified, use it. + if test "x${RADIUS_DIR}" != "x"; then + RADIUS_INCLUDE="-I${RADIUS_DIR}/include" + fi + RADIUS_INCLUDE="${RADIUS_INCLUDE} " + if test "xfreeradius-client.h" = "x" ; then # no header, assume found + RADIUS_HEADER_FOUND="1" + else # check for the header + ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}" + CPPFLAGS="${CPPFLAGS} ${RADIUS_INCLUDE}" + ac_fn_c_check_header_mongrel "$LINENO" "freeradius-client.h" "ac_cv_header_freeradius_client_h" "$ac_includes_default" +if test "x$ac_cv_header_freeradius_client_h" = xyes; then : + RADIUS_HEADER_FOUND=1 +else + RADIUS_HEADER_FOUND=0 +fi + + + CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}" + fi + if test "x${RADIUS_HEADER_FOUND}" = "x0" ; then + RADIUS_LIB="" + RADIUS_INCLUDE="" + else + if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library + RADIUS_LIB="" + fi + PBX_RADIUS=1 + cat >>confdefs.h <<_ACEOF +#define HAVE_RADIUS 1 +_ACEOF + + fi + fi +fi + + +if test "x${PBX_RADIUS}" = "x1"; then + +$as_echo "#define FREERADIUS_CLIENT /**/" >>confdefs.h + +else if test "x${PBX_RADIUS}" != "x1" -a "${USE_RADIUS}" != "no"; then pbxlibdir="" @@ -27862,6 +27973,7 @@ _ACEOF fi +fi if test "x${PBX_COROSYNC}" != "x1" -a "${USE_COROSYNC}" != "no"; then |