mirror of
https://github.com/rsmarples/dhcpcd.git
synced 2024-11-23 10:06:42 +08:00
Fix make import with compat sources.
Use -lmd for MD5 if available.
This commit is contained in:
parent
2d468029e1
commit
90ada440ec
10
Makefile
10
Makefile
@ -161,7 +161,9 @@ import: ${SRCS}
|
||||
sort -u) /tmp/${DISTPREFIX}; \
|
||||
if test -n "${CRYPT_SRCS}"; then \
|
||||
${INSTALL} -d /tmp/${DISTPREFIX}/crypt; \
|
||||
cp crypt/${CRYPT_SRCS} /tmp/${DISTPREFIX}/crypt; \
|
||||
cp $$(echo ${CRYPT_SRCS} | tr ' ' '\n' | \
|
||||
sed -e 's:^:crypt/:g') \
|
||||
/tmp/${DISTPREFIX}/crypt; \
|
||||
cp $$(cd crypt && ${CC} ${CPPFLAGS} -MM ${CRYPT_SRCS} | \
|
||||
sed -e 's/^.*c //g' -e 's/.*\.c$$//g' -e 's/\\//g' | \
|
||||
tr ' ' '\n' | sed -e 's:^:crypt/:g' | \
|
||||
@ -169,10 +171,10 @@ import: ${SRCS}
|
||||
fi;
|
||||
if test -n "${COMPAT_SRCS}"; then \
|
||||
${INSTALL} -d /tmp/${DISTPREFIX}/compat; \
|
||||
cp compat/${COMPAT_SRCS} /tmp/${DISTPREFIX}/compat; \
|
||||
cp $$(cd compat && ${CC} ${CPPFLAGS} -MM ${COMPAT_SRCS} | \
|
||||
cp ${COMPAT_SRCS} /tmp/${DISTPREFIX}/compat; \
|
||||
cp $$(${CC} ${CPPFLAGS} -MM ${COMPAT_SRCS} | \
|
||||
sed -e 's/^.*c //g' -e 's/.*\.c$$//g' -e 's/\\//g' | \
|
||||
tr ' ' '\n' | sed -e 's:^:compat/:g' | \
|
||||
tr ' ' '\n' | \
|
||||
sort -u) /tmp/${DISTPREFIX}/compat; \
|
||||
fi;
|
||||
if test -n "${IMPORT_RCSID}"; then \
|
||||
|
6
configure
vendored
6
configure
vendored
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user