diff options
| author | Roy Marples <roy@marples.name> | 2014-09-10 01:46:58 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2014-09-10 01:46:58 +0000 |
| commit | 67ed6c5fdc76fa237307750d84251de7857f7e99 (patch) | |
| tree | 222a295dad91aa2076420b8403173728aa6ca711 /configure | |
| parent | 681c71eccec20e3977bd29e376fb325d843cb56e (diff) | |
| download | dhcpcd-67ed6c5fdc76fa237307750d84251de7857f7e99.tar.xz | |
Use the nl80211 interface on Linux to get the wireless SSID.
If this is not found in the system headers, fall back to assuming WEXT.
This has been done because the WEXT module has been marked as deprecated
for a while now and I'm getting bored of people asking me why their
wireless wasn't working. Bloated dhcpcd by another 600 bytes as a result.
Diffstat (limited to 'configure')
| -rwxr-xr-x | configure | 20 |
1 files changed, 19 insertions, 1 deletions
@@ -382,7 +382,7 @@ fi case "$OS" in linux*) echo "CPPFLAGS+= -D_BSD_SOURCE -D_XOPEN_SOURCE=700" >>$CONFIG_MK - echo "DHCPCD_SRCS+= if-linux.c if-linux-wireless.c" >>$CONFIG_MK + echo "DHCPCD_SRCS+= if-linux.c" >>$CONFIG_MK ;; kfreebsd*) echo "CPPFLAGS+= -D_GNU_SOURCE" >>$CONFIG_MK @@ -1024,6 +1024,24 @@ EOF $abort && exit 1 fi +if [ "$OS" = linux ]; then + printf "Testing for nl80211 ... " + cat <<EOF >_nl80211.c +#include <linux/nl80211.h> +int main(void) { + return 0; +} +EOF + if $XCC _nl80211.c -o _nl80211 2>/dev/null; then + echo "yes" + echo "#define HAVE_NL80211_H" >>$CONFIG_H + else + echo "no" + echo "DHCPCD_SRCS+= if-linux-wireless.c" >>$CONFIG_MK + fi + rm -f _nl80211.c _nl80211 +fi + # Transform for a make file SERVICEEXISTS=$(echo "$SERVICEEXISTS" | $SED \ -e 's:\\:\\\\:g' \ |
