$NetBSD: patch-ac,v 1.4 1999/04/10 21:49:05 tron Exp $ --- ../tk/unix/Makefile.in.orig Mon Dec 7 04:47:30 1998 +++ ../tk/unix/Makefile.in Mon Apr 5 23:08:17 1999 @@ -43,9 +43,9 @@ LIBS = ${TKX_LD_SEARCH_FLAGS} ${TK_LIB} ${TK_XLIBSW} @SHARED_LIBS@ -ALL_LIBS = ${TKX_BUILD_LIB_SPEC} ${TK_LIB} ${TK_XLIBSW} \ - ${TCLX_BUILD_LIB_SPEC} ${TCL_LIB} ${TK_LIBS} ${TCLX_LIBS} \ - ${XLDLIBS} ${TKX_CC_SEARCH_FLAGS} +ALL_LIBS = ${TKX_STLIB_NAME:.a=.la} ${TK_LIB} ${TK_XLIBSW} \ + ${TCLX_UNIX_BLD_DIR}/${TCLX_STLIB_NAME:.a=.la} ${TCL_LIB} \ + ${TK_LIBS} ${TCLX_LIBS} ${XLDLIBS} ${TKX_CC_SEARCH_FLAGS} STATIC_LIBS = ${TKX_STLIB_NAME} ${TK_UNIX_DIR}/${TK_STLIB_NAME} ${TK_XLIBSW} \ ${TCLX_UNIX_SRC_DIR}/${TCLX_STLIB_NAME} \ @@ -85,14 +85,14 @@ # If a link fails, purge the executable, as some systems leave invalid # executables around. # -all: wishx RUNTIME tktest +all: wishx RUNTIME static: wishx.static tktest.static standalone: wishx.standalone tktest.standalone hello -wishx: tkXAppInit.o @TKX_SHLIB_BUILD_REF@ @TKX_STLIB_BUILD_REF@ ${TCL} Makefile - ${CC} ${LD_SWITCHES} tkXAppInit.o ${ALL_LIBS} \ +wishx: tkXAppInit.o ${TKX_STLIB_NAME:.a=.la} ${TCL} Makefile + ${LIBTOOL} --mode=link ${CC} ${LD_SWITCHES} tkXAppInit.o ${ALL_LIBS} \ -o $@ || (rm -f $@; exit 1) wishx.static: tkXAppInit.o ${TKX_STLIB_NAME} ${LIBTCLX} Makefile @@ -103,9 +103,8 @@ ${CC} ${LD_SWITCHES} tkXAppInitSA.o ${STATIC_LIBS} -o $@ || \ (rm -f $@; exit 1) -${TKX_STLIB_NAME}: ${OBJS} - ${AR} cr ${TKX_STLIB_NAME} ${OBJS} - ${RANLIB} ${TKX_STLIB_NAME} +${TKX_STLIB_NAME:.a=.la}: ${OBJS} + ${LIBTOOL} --mode=link ${CC} -rpath ${PREFIX}/lib -version-info 1:0 -o $@ ${OBJS:.o=.lo} @TKX_SHLIB_BUILD_TARGET@: ${SOBJS} rm -f ${TKX_SHLIB_NAME} @@ -217,17 +216,10 @@ ${INSTCOPY} tkx.tcl ${INSTALL_ROOT}${TKX_INST_RUNTIME} install-exec: - ${INSTCOPY} wishx ${INSTALL_ROOT}${TKX_INST_BIN} - ${STRIP} ${INSTALL_ROOT}${TKX_INST_BIN}/wishx - if test "X@TKX_STLIB_BUILD_REF@" != "X"; then \ - ${INSTCOPY} ${TKX_STLIB_NAME} ${INSTALL_ROOT}${TKX_INST_LIB}; \ - ${RANLIB} ${INSTALL_ROOT}${TKX_INST_LIB}/${TKX_STLIB_NAME}; \ - fi + ${LIBTOOL} --mode=install ${BSD_INSTALL_PROGRAM} wishx ${INSTALL_ROOT}${TKX_INST_BIN} ${INSTCOPY} tkxConfig.sh ${INSTALL_ROOT}${TKX_INST_LIB} - if test "@BUILD_SHARED@" = "YES"; then \ - ${INSTCOPY} ${TKX_SHLIB_NAME} ${INSTALL_ROOT}${TKX_INST_LIB} ;\ - ${INSTCOPY} pkgIndex.tcl ${INSTALL_ROOT}${TKX_EXEC_RUNTIME} ;\ - fi + ${LIBTOOL} --mode=install ${BSD_INSTALL_DATA} ${TKX_STLIB_NAME:.a=.la} ${PREFIX}/lib + ${INSTCOPY} pkgIndex.tcl ${INSTALL_ROOT}${TKX_EXEC_RUNTIME} ${INSTCOPY} tclhelp ${INSTALL_ROOT}${TKX_INST_BIN} #------------------------------------------------------------------------------ @@ -261,20 +253,20 @@ # Dependencies for generating objects. # tkXinit.o: ${TKX_GENERIC_DIR}/tkXinit.c Makefile - ${CC} -c ${CC_SWITCHES} -DTKX_LIBRARY=\"${TKX_INST_RUNTIME}\" \ + ${LIBTOOL} --mode=compile ${CC} -c ${CC_SWITCHES} -DTKX_LIBRARY=\"${TKX_INST_RUNTIME}\" \ ${TKX_GENERIC_DIR}/tkXinit.c tkXshell.o: ${TKX_GENERIC_DIR}/tkXshell.c - ${CC} -c ${CC_SWITCHES} ${TKX_GENERIC_DIR}/tkXshell.c + ${LIBTOOL} --mode=compile ${CC} -c ${CC_SWITCHES} ${TKX_GENERIC_DIR}/tkXshell.c tkXAppInit.o: ${TKX_UNIX_SRC_DIR}/tkXAppInit.c - ${CC} -c ${CC_SWITCHES} ${TKX_UNIX_SRC_DIR}/tkXAppInit.c + ${LIBTOOL} --mode=compile ${CC} -c ${CC_SWITCHES} ${TKX_UNIX_SRC_DIR}/tkXAppInit.c tkXinitSA.o: ${TKX_GENERIC_DIR}/tkXinitSA.c ${STANDALONE_SRCS} - ${CC} -c ${CC_SWITCHES} ${TKX_GENERIC_DIR}/tkXinitSA.c + ${LIBTOOL} --mode=compile ${CC} -c ${CC_SWITCHES} ${TKX_GENERIC_DIR}/tkXinitSA.c tkXinitDSA.o: ${TKX_GENERIC_DIR}/tkXinitDSA.c Makefile - ${CC} -c ${CC_SWITCHES} ${TKX_GENERIC_DIR}/tkXinitDSA.c + ${LIBTOOL} --mode=compile ${CC} -c ${CC_SWITCHES} ${TKX_GENERIC_DIR}/tkXinitDSA.c tkXAppInitSA.c: ${TKX_UNIX_SRC_DIR}/tkXAppInit.c Makefile rm -f tkXinitSA.c @@ -285,10 +277,10 @@ ${TKX_UNIX_SRC_DIR}/tkXAppInit.c >tkXAppInitSA.c tkXunixTest.o: ${TKX_UNIX_SRC_DIR}/tkXunixTest.c - ${CC} -c ${CC_SWITCHES} ${TKX_UNIX_SRC_DIR}/tkXunixTest.c + ${LIBTOOL} --mode=compile ${CC} -c ${CC_SWITCHES} ${TKX_UNIX_SRC_DIR}/tkXunixTest.c tkXunixTestDA.o: ${TKX_UNIX_SRC_DIR}/tkXunixTestSA.c - ${CC} -c ${CC_SWITCHES} ${TKX_UNIX_SRC_DIR}/tkXunixTestSA.c + ${LIBTOOL} --mode=compile ${CC} -c ${CC_SWITCHES} ${TKX_UNIX_SRC_DIR}/tkXunixTestSA.c tkXunixTestSA.c: ${TKX_UNIX_SRC_DIR}/tkXunixTest.c Makefile rm -f tkXinitSA.c