Module: sip-router
Branch: master
Commit: 942dedaf0b54b8aa2767b5bbf2bc327aa4f4cc06
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=942deda…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Thu Mar 31 14:08:37 2011 +0200
Makefile.radius: option to use freeradius-client library
- using FREERADIUS=1 turns on usage of freeradius-client library instead
of radiusclient-ng
- kamailio radius modules have support for freeradius-client, library
which is included in opensuse instead of radiusclient-ng
---
Makefile.radius | 19 ++++++++++++++++---
1 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/Makefile.radius b/Makefile.radius
index bedea2b..0abc2a7 100644
--- a/Makefile.radius
+++ b/Makefile.radius
@@ -6,9 +6,11 @@
#
# (To be included from Makefiles of radius related modules)
#
-# The purpose of this makefile is to perform radiusclient library
-# detection and setup library and include paths in DEFS and LIBS
-# variables. In addition RADIUSCLIENT_NG_4 will be defined when
+# The purpose of this makefile is to perform RADIUS client library
+# selection (radiusclient-ng or freeradius-client) and setup
+# library and include paths in DEFS and LIBS variables.
+#
+# In addition RADIUSCLIENT_NG_4 will be defined when
# libradiusclient-ng version 4 is detected. That means the module
# should include radiusclient.h, otherwise radiusclient-ng.h
# should be included. Variable RADIUSCLIENT_LIB contains the
@@ -21,6 +23,15 @@
#
INCLUDES+=-I$(LOCALBASE)/include
+ifeq ($(FREERADIUS),1)
+
+# - freeradius-client library
+DEFS+= -DUSE_FREERADIUS
+RADIUSCLIENT_LIB=freeradius-client
+
+else
+
+# - radiusclient-ng v5 or v4 library
ifneq ($(radiusclient_ng), 4)
# radiusclient-ng 5+
@@ -34,4 +45,6 @@ RADIUSCLIENT_LIB=radiusclient
endif
+endif
+
LIBS=-L$(LOCALBASE)/lib -l$(RADIUSCLIENT_LIB)