summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2014-02-03 13:09:13 +0000
committerRoy Marples <roy@marples.name>2014-02-03 13:09:13 +0000
commit90ada440ecae51f1041e16e54d86f1add7d6d72f (patch)
treea29261444b60d512cca528febbe383151c480971 /configure
parent2d468029e193f44742c48859aa5bcf383511b9c0 (diff)
downloaddhcpcd-90ada440ecae51f1041e16e54d86f1add7d6d72f.tar.xz
Fix make import with compat sources.
Use -lmd for MD5 if available.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure6
1 files changed, 6 insertions, 0 deletions
diff --git a/configure b/configure
index 92cca512..e5758cdf 100755
--- a/configure
+++ b/configure
@@ -626,8 +626,10 @@ pselect)
esac
if [ -z "$MD5" ]; then
+ MD5_LIB=
printf "Testing for MD5Init ... "
cat <<EOF >_md5.c
+#include <sys/types.h>
#include <md5.h>
#include <stdlib.h>
int main(void) {
@@ -638,6 +640,9 @@ int main(void) {
EOF
if $XCC _md5.c -o _md5 2>/dev/null; then
MD5=yes
+ elif $XCC _md5.c -lmd -o _md5; then
+ MD5="yes (-lmd)"
+ MD5_LIB=-lmd
else
MD5=no
fi
@@ -649,6 +654,7 @@ if [ "$MD5" = no ]; then
else
echo "MD5_SRC=" >>$CONFIG_MK
echo "CPPFLAGS+= -DHAVE_MD5_H" >>$CONFIG_MK
+ [ -n "$MD5_LIB" ] && echo "LDADD+= $MD5_LIB" >>$CONFIG_MK
fi
if [ "$DEV" != no -a "$UDEV" != no ]; then