1 Description: Find multiarch paths in makefile
2 Search multiarch directories when searching for libraries in makefile
4 Bug-Debian: http://bugs.debian.org/639747
5 Author: Daniel T Chen <seven.steps@gmail.com>
6 Author: Ian Beckwith <ianb@debian.org>
7 Last-Update: 2012-01-29
9 Index: ckermit/makefile
10 ===================================================================
11 --- ckermit.orig/makefile 2012-01-29 00:15:30.000000000 +0000
12 +++ ckermit/makefile 2012-01-29 00:32:46.000000000 +0000
13 @@ -6100,10 +6100,14 @@
14 test -f /usr/lib/libncurses.a || \
15 test -f /usr/lib/libncurses.so; then \
16 HAVE_LIBCURSES='-lncurses'; \
17 + else if test -f /usr/lib/$(MULTIARCH)/libncurses.so || \
18 + test -f /usr/lib/$(MULTIARCH)/libncurses.a || \
19 + test -f /usr/lib/$(MULTIARCH)/libncurses.so; then \
20 + HAVE_LIBCURSES='-lncurses'; \
21 else if test -f /usr/lib64/libcurses.so || \
22 test -f /usr/lib/libcurses.a || \
23 test -f /usr/lib/libcurses.so; then \
24 - HAVE_LIBCURSES='-lcurses'; fi; fi; \
25 + HAVE_LIBCURSES='-lcurses'; fi; fi; fi; \
27 if test -n '$$HAVE_LIBCURSES'; then \
28 if test -f /usr/include/ncurses.h; then \
29 @@ -6130,16 +6134,19 @@
30 || test -f /usr/lib/libresolv.a || test -f /usr/lib/libresolv.so \
31 || test -f /usr/lib/i386-linux-gnu/libresolv.a \
32 || test -f /usr/lib/i386-linux-gnu/libresolv.so \
33 + || ls /lib/$(MULTIARCH)/libresolv.* > /dev/null 2> /dev/null \
34 || ls /lib/x86_64-linux-gnu/libresolv.* > /dev/null 2> /dev/null; \
35 then echo -lresolv; fi` \
36 `if test -f /usr/lib64/libcrypt.a || test -f /usr/lib64/libcrypt.so \
37 || test -f /usr/lib/libcrypt.a || test -f /usr/lib/libcrypt.so \
38 + || ls /lib/$(MULTIARCH)/libcrypt.* > /dev/null 2> /dev/null \
39 || ls /lib/x86_64-linux-gnu/libcrypt.* > /dev/null 2> /dev/null; \
40 then echo -lcrypt; fi` \
41 `if test -f /usr/lib64/liblockdev.a || \
42 test -f /usr/lib64/liblockdev.so || \
43 test -f /usr/lib/liblockdev.a || \
44 - test -f /usr/lib/liblockdev.so; \
45 + test -f /usr/lib/liblockdev.so \
46 + ls /usr/lib/$(MULTIARCH)/liblockdev.* > /dev/null 2> /dev/null; \
47 then echo -llockdev; fi`" \
51 K5CRYPTO='-lk5crypto'; \
52 else if ls /usr/lib64/libk5crypto* > /dev/null 2> /dev/null; then \
53 K5CRYPTO='-lk5crypto'; \
55 + else if ls /usr/lib/$(MULTIARCH)/libk5crypto* > /dev/null 2> /dev/null; then \
56 + K5CRYPTO='-lk5crypto'; \
59 if ls /lib/libcom_err* > /dev/null 2> /dev/null; then \
60 COM_ERR='-lcom_err'; \
62 GSSAPILIB='-lgssapi'; \
63 if ls /lib/libgssapi_krb5* > /dev/null 2> /dev/null; then \
64 GSSAPILIB='-lgssapi_krb5'; \
65 - else if ls /usr/lib/libgssapi_krb5* > /dev/null 2> /dev/null; then \
66 + else if ls /usr/lib/$(MULTIARCH)/libgssapi_krb5* > /dev/null 2> /dev/null; then \
67 GSSAPILIB='-lgssapi_krb5'; \
68 else K5DIR=`echo $(K5LIB) | sed 's|-L||'`; \
69 if ls $$K5DIR/libgssapi_krb5* > /dev/null 2> /dev/null; then \