1.2 libnl-1.1-stable
后面编译 wpa_supplicant-2.6 时报错,"can‘t find -lnl",所以编译 libnl-1.1-stable。
./configure --prefix=/home/fnie/wpa/out/libnl-1.1-stable
make
make check
make install
// to install the API documentation:
mkdir -vp /home/fnie/wpa/out/libnl/doc
tar -xf ../libnl-doc-3.4.0.tar.gz --strip-components=1 --no-same-owner -C /home/fnie/wpa/out/libnl/doc
openssl
./config shared --prefix=/home/fnie/wpa/out/ssl/prefix --openssldir=/home/fnie/wpa/out/ssl/configuration
make
make test
make install
wpa_supplicant-2.6
cd ~/wpa/wpa_supplicant-2.6/wpa_supplicant
cp defconfig .config
修改配置文件 .config,在"#Uncomment following two linee and fix..."下增加如下语句,用来添加openssl和libnl的头文件和库文件目录,更新编译链接环境变量:
CFLAGS += -I/home/fnie/wpa/out/ssl/prefix/include
CFLAGS += -I/home/fnie/wpa/out/libnl/include
LIBS += -L/home/fnie/wpa/out/ssl/prefix/lib
LIBS += -L/home/fnie/wpa/out/libnl/lib
LIBS += -L/home/fnie/wpa/out/libnl-1.1-stable/lib
LIBS_p += -L/home/fnie/wpa/out/ssl/prefix/lib
执行 make 进行编译,成功后生成三个目标文件 wpa_supplicant, wpa_cli, wpa_passphrase 。
原文地址:http://blog.51cto.com/frankniefaquan/2118934