52d05d8f6867e4acabe0a995dd5a55b166c8c0bb
[ckermit.git] / debian / patches / 010_multiarch-makefile.patch
1 Index: ckermit/makefile
2 ===================================================================
3 --- ckermit.orig/makefile       2012-01-29 00:15:30.000000000 +0000
4 +++ ckermit/makefile    2012-01-29 00:32:46.000000000 +0000
5 @@ -6100,10 +6100,14 @@
6            test -f /usr/lib/libncurses.a  || \
7            test -f /usr/lib/libncurses.so; then \
8           HAVE_LIBCURSES='-lncurses'; \
9 +       else if test -f /usr/lib/$(MULTIARCH)/libncurses.so || \
10 +          test -f /usr/lib/$(MULTIARCH)/libncurses.a  || \
11 +          test -f /usr/lib/$(MULTIARCH)/libncurses.so; then \
12 +         HAVE_LIBCURSES='-lncurses'; \
13         else if test -f /usr/lib64/libcurses.so || \
14            test -f /usr/lib/libcurses.a || \
15            test -f /usr/lib/libcurses.so; then \
16 -            HAVE_LIBCURSES='-lcurses'; fi; fi; \
17 +            HAVE_LIBCURSES='-lcurses'; fi; fi; fi; \
18         HAVE_CURSES=''; \
19         if test -n '$$HAVE_LIBCURSES'; then \
20           if test -f /usr/include/ncurses.h; then \
21 @@ -6130,16 +6134,19 @@
22         || test -f /usr/lib/libresolv.a || test -f /usr/lib/libresolv.so \
23         || test -f /usr/lib/i386-linux-gnu/libresolv.a \
24         || test -f /usr/lib/i386-linux-gnu/libresolv.so \
25 +       || ls /lib/$(MULTIARCH)/libresolv.* > /dev/null 2> /dev/null \
26         || ls /lib/x86_64-linux-gnu/libresolv.* > /dev/null 2> /dev/null; \
27         then echo -lresolv; fi` \
28         `if test -f /usr/lib64/libcrypt.a || test -f /usr/lib64/libcrypt.so \
29         || test -f /usr/lib/libcrypt.a || test -f /usr/lib/libcrypt.so \
30 +       || ls /lib/$(MULTIARCH)/libcrypt.* > /dev/null 2> /dev/null \
31         || ls /lib/x86_64-linux-gnu/libcrypt.* > /dev/null 2> /dev/null; \
32         then echo -lcrypt; fi` \
33         `if test -f /usr/lib64/liblockdev.a || \
34         test -f /usr/lib64/liblockdev.so || \
35         test -f /usr/lib/liblockdev.a || \
36 -       test -f /usr/lib/liblockdev.so; \
37 +       test -f /usr/lib/liblockdev.so \
38 +       ls /usr/lib/$(MULTIARCH)/liblockdev.* > /dev/null 2> /dev/null; \
39         then echo -llockdev; fi`" \
40         linuxa
41  
42 @@ -6309,7 +6316,9 @@
43                 K5CRYPTO='-lk5crypto'; \
44          else if ls /usr/lib64/libk5crypto* > /dev/null 2> /dev/null; then \
45                  K5CRYPTO='-lk5crypto'; \
46 -       fi; fi; fi; \
47 +               else if ls /usr/lib/$(MULTIARCH)/libk5crypto* > /dev/null 2> /dev/null; then \
48 +                                       K5CRYPTO='-lk5crypto'; \
49 +       fi; fi; fi; fi; \
50         COM_ERR=''; \
51         if ls /lib/libcom_err* > /dev/null 2> /dev/null; then \
52                 COM_ERR='-lcom_err'; \
53 @@ -6317,7 +6326,7 @@
54         GSSAPILIB='-lgssapi'; \
55         if ls /lib/libgssapi_krb5* > /dev/null 2> /dev/null; then \
56                 GSSAPILIB='-lgssapi_krb5'; \
57 -       else if ls /usr/lib/libgssapi_krb5* > /dev/null 2> /dev/null; then \
58 +       else if ls /usr/lib/$(MULTIARCH)/libgssapi_krb5* > /dev/null 2> /dev/null; then \
59                 GSSAPILIB='-lgssapi_krb5'; \
60         else K5DIR=`echo $(K5LIB) | sed 's|-L||'`; \
61                 if ls $$K5DIR/libgssapi_krb5* > /dev/null 2> /dev/null; then \