Permalink
Browse files

[fix] configure: fix for the 'XXX[@] : undefined variable' under some…

… versions of bash

these seem to confuse empty and undefined arrays, hence raise an unsound error
  • Loading branch information...
1 parent d9c2db6 commit 17a5e593c60dd8d4cfe47a9c05e85626ddc2fdee Louis Gesbert committed Jun 24, 2011
Showing with 6 additions and 2 deletions.
  1. +6 −2 configure
View
@@ -331,20 +331,24 @@ check-c-lib () (
)
HAS_LIBNATPMP=
-LIBNATPMP=
+LIBNATPMP=()
HAS_MINIUPNPC=
-MINIUPNPC=
+MINIUPNPC=()
if [ -n "$HAS_CAMLIDL" ]; then
# - checking libnatpmp *
echo-check libnatpmp
if LIBNATPMP=($(check-c-lib libnatpmp/natpmp netinet/in.h arpa/inet.h libnatpmp/getgateway.h libnatpmp/natpmp.h)); then
HAS_LIBNATPMP=1
+ else
+ LIBNATPMP=("")
fi
# - checking miniupnpc *
echo-check miniupnpc
if MINIUPNPC=($(check-c-lib miniupnpc/miniupnpc miniupnpc/miniwget.h miniupnpc/miniupnpc.h miniupnpc/upnpcommands.h)); then
HAS_MINIUPNPC=1
+ else
+ MINIUPNPC=("")
fi
fi

0 comments on commit 17a5e59

Please sign in to comment.