summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>2010-04-20 16:39:20 -0700
committerInaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>2010-05-13 01:28:32 -0700
commita0d311677557ca298271c50458a11306e750592f (patch)
tree469f620ab8d473abe39437eb2d099d5c68405d0f
parent6cb8aa03a2e9f5cbdf450e725857eb0fda3bab35 (diff)
wpa-supplicant: enable WPA open source supplicant build
This required some changes in the previous support enabled in the initial patch. These are aimed towards making the build process detect when things go wrong better. - set off proper configuration values in the installed PREFIX/etc/wimax/config.xml pointing to WHEREVER/lib/libeap.so.0 - Use pkg-config to lookup the proper settings to load/link libeap. Not yet run tested. Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
-rw-r--r--InfraStack/OSAgnostic/Product/AppSrvInfra/Makefile.am7
-rw-r--r--InfraStack/OSAgnostic/WiMax/Agents/Supplicant/Makefile.am2
-rw-r--r--InfraStack/OSDependent/Linux/Config/config.xml.in2
-rw-r--r--configure.ac20
4 files changed, 25 insertions, 6 deletions
diff --git a/InfraStack/OSAgnostic/Product/AppSrvInfra/Makefile.am b/InfraStack/OSAgnostic/Product/AppSrvInfra/Makefile.am
index 720b3f4..27dbb2b 100644
--- a/InfraStack/OSAgnostic/Product/AppSrvInfra/Makefile.am
+++ b/InfraStack/OSAgnostic/Product/AppSrvInfra/Makefile.am
@@ -115,10 +115,17 @@ if ! BINDB_ENABLED
fi
endif
+if WPA_SUP_ENABLE
+sup_lib_path=@LIBEAP0_PREFIX@/lib/libeap.so.0
+else
+sup_lib_path=$(libdir)/wimax/libwpa_wimax_supplicant.so
+endif
+
config.xml: $(top_srcdir)/InfraStack/OSDependent/Linux/Config/config.xml.in
sed \
-e "s|@@pkgdatadir@@|$(pkgdatadir)|g" \
-e "s|@@lib@@dir@@|$(libdir)|g" \
+ -e "s|@@sup_lib_path@@|$(sup_lib_path)|g" \
-e "s|@@use_inst@@|$(USE_INST)|g" \
-e "s|<DisableObfuscate>.*\<DisableObfuscate>|<DisableObfuscate>$(DISABLE_OBFUSCATE)</DisableObfuscate>|" \
$< > $@
diff --git a/InfraStack/OSAgnostic/WiMax/Agents/Supplicant/Makefile.am b/InfraStack/OSAgnostic/WiMax/Agents/Supplicant/Makefile.am
index a359abb..d763c4e 100644
--- a/InfraStack/OSAgnostic/WiMax/Agents/Supplicant/Makefile.am
+++ b/InfraStack/OSAgnostic/WiMax/Agents/Supplicant/Makefile.am
@@ -83,7 +83,7 @@ WPA_SUP_SOURCES = \
WPA_SUP_CFLAGS = \
-D "WPA_OPEN_SOURCE" -D "USE_STANDARD_TLS_H_ONLY" \
- -I "/usr/include/eap_peer"
+ $(LIBEAP0_CFLAGS)
libSupplicantAgent_la_SOURCES = $(srcdir)/Source/SupplicantAgent.c \
diff --git a/InfraStack/OSDependent/Linux/Config/config.xml.in b/InfraStack/OSDependent/Linux/Config/config.xml.in
index 006734c..326c2b8 100644
--- a/InfraStack/OSDependent/Linux/Config/config.xml.in
+++ b/InfraStack/OSDependent/Linux/Config/config.xml.in
@@ -4,7 +4,7 @@
<DriverMode>Driver</DriverMode>
<DriverOrDsim>Driver</DriverOrDsim>
<IPC>Sockets</IPC>
- <SupplicantLibName>@@lib@@dir@@/libwpa_wimax_supplicant.so</SupplicantLibName>
+ <SupplicantLibName>@@sup_lib_path@@</SupplicantLibName>
<InterfaceName>wmx0</InterfaceName>
<DriverInterface>Nlsock</DriverInterface>
<dSimIpAddress>0.0.0.0</dSimIpAddress>
diff --git a/configure.ac b/configure.ac
index 587884c..7ddfdd9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -142,12 +142,20 @@ AC_ARG_ENABLE(sup-ds,
supplicant (disabled by default)]),
[], [enable_sup_ds=no])
-with_sup_wpa=/usr
AC_ARG_WITH(sup-wpa,
AC_HELP_STRING([--with-sup-wpa],
[Specify prefix where the WPA supplicant
can be found. USE ABSOLUTE PATHS.]),
- [], [])
+ [
+ test -z "$with_sup_wpa" && with_sup_wpa=/usr
+ test x"$with_sup_wpa" = xyes && with_sup_wpa=/usr
+ enable_sup_wpa=yes
+ enable_sup_ds=no
+ export PKG_CONFIG_PATH="$with_sup_wpa:$with_sup_wpa/lib/pkgconfig:$PKG_CONFIG_PATH"
+ ],
+ [
+ with_sup_wpa=/usr
+ ])
if test x$enable_sup_ds = xyes
then
@@ -155,8 +163,12 @@ then
enable_sup_wpa=no
else
enable_sup_wpa=yes
- AC_MSG_RESULT([supplicant: configured WPA open source supplicant from $with_sup_wpa])
- AC_MSG_ERROR([FIXME: not finished, need to detect the supplicant library])
+ PKG_CHECK_MODULES(LIBEAP0, libeap0)
+ libeap0_prefix=`pkg-config libeap0 --variable=prefix`
+ AC_MSG_RESULT(Using EAP library from $libeap0_prefix)
+ AC_SUBST(LIBEAP0_CFLAGS)
+ AC_SUBST(LIBEAP0_LIBS)
+ AC_SUBST(LIBEAP0_PREFIX, $libeap0_prefix)
fi
AC_SUBST(WPA_SUP_PREFIX, $with_sup_wpa)
AM_CONDITIONAL(WPA_SUP_ENABLE, test x$enable_sup_wpa = xyes)