1 $NetBSD: patch-aa,v 1.4 2009/12/17 18:23:49 abs Exp $
3 --- unix/Makefile.in.orig 2001-10-20 00:24:40.000000000 +0000
5 @@ -37,7 +37,7 @@ mandir = @mandir@
6 # to be different than those used for actually reference files at
7 # run-time. INSTALL_ROOT is prepended to $prefix and $exec_prefix
8 # when installing files.
10 +INSTALL_ROOT = $(DESTDIR)
12 # Directory from which applications will reference the library of Tcl
13 # scripts (note: you can set the TK_LIBRARY environment variable at
14 @@ -76,7 +76,7 @@ MANN_INSTALL_DIR = $(MAN_INSTALL_DIR)/ma
15 # The directory containing the Tcl sources and headers appropriate
16 # for this version of Tk ("srcdir" will be replaced or has already
17 # been replaced by the configure script):
18 -TCL_GENERIC_DIR = @TCL_SRC_DIR@/generic
19 +TCL_GENERIC_DIR = $(TCL_BIN_DIR)/../include/tcl/generic
21 # The directory containing the Tcl library archive file appropriate
22 # for this version of Tk:
23 @@ -100,7 +100,7 @@ CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@
24 #CFLAGS = $(CFLAGS_DEBUG)
25 #CFLAGS = $(CFLAGS_OPTIMIZE)
26 #CFLAGS = $(CFLAGS_DEBUG) $(CFLAGS_OPTIMIZE)
27 -CFLAGS = @CFLAGS@ @CFLAGS_DEFAULT@
28 +CFLAGS += @CFLAGS@ @CFLAGS_DEFAULT@
30 # Flags to pass to the linker
31 LDFLAGS_DEBUG = @LDFLAGS_DEBUG@
32 @@ -159,8 +159,8 @@ SHELL = /bin/sh
33 # "install" around; better to use the install-sh script that comes
34 # with the distribution, which is slower but guaranteed to work.
36 -INSTALL = @srcdir@/install-sh -c
37 -INSTALL_PROGRAM = ${INSTALL}
38 +INSTALL = ${LIBTOOL} --mode=install @srcdir@/install-sh -c
39 +INSTALL_PROGRAM = ${INSTALL} -s
40 INSTALL_DATA = ${INSTALL} -m 644
42 # The following specifies which Tcl executable to use for make targets
43 @@ -209,7 +209,7 @@ WISH_LIBS = $(TCL_LIB_SPEC) @LIBS@ $(X11
44 # The values of the symbolis normally set by the configure script.
47 -SHLIB_LD = @SHLIB_LD@
48 +SHLIB_LD = ${LIBTOOL} --mode=link @CC@ -rpath ${PREFIX}/lib
49 SHLIB_LD_LIBS = @SHLIB_LD_LIBS@
51 # Additional search flags needed to find the various shared libraries
52 @@ -240,7 +240,8 @@ TOOL_DIR = @TCL_SRC_DIR@/tools
54 #----------------------------------------------------------------
57 +CC = ${LIBTOOL} --mode=compile @CC@
58 +LD = ${LIBTOOL} --mode=link @CC@ -Wl,-R${PREFIX}/lib -Wl,-R${X11BASE}/lib
60 CC_SWITCHES_NO_STUBS = ${CFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} \
61 -I${UNIX_DIR} -I${GENERIC_DIR} \
62 @@ -373,6 +374,7 @@ ${TK_LIB_FILE}: ${OBJS}
65 $(RANLIB) ${TK_LIB_FILE}
66 + ${TOUCH} ${TK_LIB_FILE}
68 ${STUB_LIB_FILE}: ${STUB_LIB_OBJS}
69 rm -f ${STUB_LIB_FILE}
70 @@ -391,9 +393,9 @@ objs: ${OBJS}
73 wish: $(WISH_OBJS) $(TK_LIB_FILE) $(TK_STUB_LIB_FILE)
74 - $(CC) $(LDFLAGS) $(WISH_OBJS) \
75 + $(LD) $(LDFLAGS) $(WISH_OBJS) \
77 - $(WISH_LIBS) $(TK_CC_SEARCH_FLAGS) -o wish
78 + $(WISH_LIBS) -o wish
80 # This rule is executed if the user tried to run tktest without first
81 # building tcltest in the Tcl bin directory. Just do it for them.
82 @@ -402,12 +404,12 @@ ${TCL_BIN_DIR}/tcltest:
85 tktest: ${TCL_BIN_DIR}/tcltest $(TKTEST_OBJS) $(TK_LIB_FILE)
86 - ${CC} $(LDFLAGS) $(TKTEST_OBJS) \
87 + ${LD} $(LDFLAGS) $(TKTEST_OBJS) \
89 - $(WISH_LIBS) $(TK_CC_SEARCH_FLAGS) -o tktest
90 + $(WISH_LIBS) -o tktest
92 xttest: test.o tkTest.o tkSquare.o $(TK_LIB_FILE)
93 - ${CC} $(LDFLAGS) test.o tkTest.o tkSquare.o \
94 + ${LD} $(LDFLAGS) test.o tkTest.o tkSquare.o \
96 $(WISH_LIBS) $(TK_LD_SEARCH_FLAGS) -lXt -o xttest
98 @@ -462,7 +464,7 @@ install-binaries: $(TK_LIB_FILE) $(TK_ST
99 chmod +x $(UNIX_DIR)/mkLinks; \
101 @echo "Installing $(TK_LIB_FILE) to $(LIB_INSTALL_DIR)/"
102 - @$(INSTALL_DATA) $(TK_LIB_FILE) $(LIB_INSTALL_DIR)/$(TK_LIB_FILE)
103 + @$(INSTALL_DATA) $(TK_LIB_FILE:C/\.so.*/.la/) $(LIB_INSTALL_DIR)/$(TK_LIB_FILE)
104 @(cd $(LIB_INSTALL_DIR); $(RANLIB) $(TK_LIB_FILE))
105 @chmod 555 $(LIB_INSTALL_DIR)/$(TK_LIB_FILE)
106 @echo "Installing wish as $(BIN_INSTALL_DIR)/wish$(VERSION)"