Parcourir la source

WIP: add autotools support for radcli

Not working:

- include dir is detected incorrectly for some reason (-I/usr/include/p11-kit-1)
- version check is not implemented
Baptiste Jonglez il y a 7 ans
Parent
commit
ebfbae925d
1 fichiers modifiés avec 34 ajouts et 0 suppressions
  1. 34 0
      configure.ac

+ 34 - 0
configure.ac

@@ -986,6 +986,25 @@ AC_SUBST(CRYPTO_PACKAGE)
 AC_SUBST(CRYPTO_RPATH)
 AC_SUBST(DISTCHECK_CRYPTO_CONFIGURE_FLAG)
 
+default_radcli_val=yes
+AC_ARG_WITH([radcli], [AS_HELP_STRING([--with-radcli],
+        [use radcli for Radius-based host reservation])],
+        [with_radcli=$withval],
+        [with_radcli=$default_radcli_val])
+
+if test "$with_radcli" != no; then                                                                                                                                  
+        PKG_CHECK_MODULES(RADCLI, [radcli], [use_radcli=yes], [use_radcli=no])
+
+        if test "$use_radcli" = yes;then
+                AC_SUBST(RADCLI_CFLAGS)
+                AC_SUBST(RADCLI_LIBS)
+                AC_DEFINE([HAVE_RADCLI], 1, [Define to 1 to use radcli.])
+        fi
+fi
+
+AM_CONDITIONAL(ENABLE_RADCLI, test "$use_radcli" = "yes")
+
+
 # Check for MySql.  The path to the mysql_config program is given with
 # the --with-mysql-config (default to /usr/bin/mysql-config).  By default,
 # the software is not built with MySQL support enabled.
@@ -1906,6 +1925,21 @@ Cassandra CQL:
 END
 fi
 
+if test "$RADCLI_CFLAGS" != "" ; then
+cat >> config.report << END
+
+Radius client:
+  RADCLI_CFLAGS:    ${RADCLI_CFLAGS}
+  RADCLI_LIBS:      ${RADCLI_LIBS}
+END
+else
+cat >> config.report << END
+
+Radius client:
+  no
+END
+fi
+
 if test "$enable_gtest" != "no"; then
 cat >> config.report << END