]> git.pld-linux.org Git - packages/dialog.git/blob - dialog-shared.patch
Dialog patch: allow build shared lib and link dialog binary with this lib
[packages/dialog.git] / dialog-shared.patch
1 diff -ur dialog-0.69.old/Makefile.in dialog-0.69/Makefile.in
2 --- dialog-0.69.old/Makefile.in Tue Jan 16 13:32:48 1996
3 +++ dialog-0.69/Makefile.in     Wed Apr 28 03:02:38 1999
4 @@ -38,6 +38,7 @@
5  INSTINC = $(INSTALL) -m 644
6  INSTMAN = $(INSTALL) -m 644
7  
8 +LN_S = @LN_S@
9  
10  HDRS = $(TARGET).h colors.h
11  
12 @@ -46,14 +47,14 @@
13  
14  SRCS = $(OBJS:.o=.c)
15  
16 -all: configure Makefile $(LIBRARY) $(TARGET) $(TARGET).1 demo
17 +all: configure Makefile depend $(SHLIB) $(TARGET) $(LIBRARY) $(TARGET).1 demo
18  
19  # Use ranlib instead of "ar rcs" for portability
20  $(LIBRARY): $(OBJS)
21         ar rc $@ $(OBJS)
22         ranlib $@
23  
24 -$(TARGET): $(TARGET).o $(LIBRARY)
25 +$(TARGET): $(TARGET).o $(SHLIB)
26         $(CC) $(CFLAGS) $(TARGET).o $(LDFLAGS) $(LIBS) -o $@ 
27  
28  $(TARGET).1: doc/doc.$(TARGET)
29 @@ -69,7 +70,7 @@
30  distclean: clean
31         rm config.* Makefile
32  
33 -install: $(LIBRARY) $(TARGET)
34 +install: $(SHLIB) $(TARGET) $(LIBRARY) 
35         -for n in $(BINDIR) $(LIBDIR) $(INCDIR) $(MAN1DIR) \
36                         $(MAN3DIR) $(INFDIR); do\
37                 if [ -d $$n ]; then true; else \
38 @@ -89,12 +90,9 @@
39         #install the shlib too, if any
40         if [ -f "$(SHLIB)" ]; then \
41                 $(INSTALL) $(INSTBINFLAGS) $(SHLIB) $(LIBDIR); \
42 +               $(LN_S) $(SHLIB_SO) $(LIBDIR)/lib$(TARGET).so; \
43                 sync;\
44         fi
45 -       @-if [ -f "$(SHLIB)" ]; then \
46 -               echo "Running ldconfig"; \
47 -               ldconfig; \
48 -       fi
49  
50  
51  #########################
52 @@ -122,6 +120,7 @@
53  
54  $(SHLIB): $(SHLOBJS)
55         $(LDSHARED) -o $@ $(SHLOBJS)
56 +       $(LN_S) -f $(SHLIB_SO) lib$(TARGET).so 
57  
58  ######################### Generic targets and tasks
59  
60 @@ -171,3 +170,5 @@
61  
62  test:
63         $(MAKE) -C samples test DIALOG=`pwd`/dialog
64 +
65 +.PHONY:        configure Makefile depend $(SHLIB) $(TARGET) $(LIBRARY) mpage info $(TARGET).1 demo install clean distclean
66 diff -ur dialog-0.69.old/configure.in dialog-0.69/configure.in
67 --- dialog-0.69.old/configure.in        Tue Jan 16 11:51:35 1996
68 +++ dialog-0.69/configure.in    Wed Apr 28 03:02:24 1999
69 @@ -4,6 +4,7 @@
70  dnl      (1.x will complain)
71  
72  AC_INIT(dialog.c)
73 +AC_PROG_LN_S
74  AC_PROG_CC
75  AC_PROG_CPP
76  AC_PROG_INSTALL
77 @@ -117,6 +118,7 @@
78  AC_SUBST(CCSHARED)
79  AC_SUBST(LDSHARED)
80  AC_SUBST(SHLIB)
81 +AC_SUBST(LN_S)
82  
83  if test "$SHLIB" = ""
84    then
This page took 0.037556 seconds and 4 git commands to generate.