Index: kitsh/buildsrc/kitsh-0.0/Makefile.kitdll.in ================================================================== --- kitsh/buildsrc/kitsh-0.0/Makefile.kitdll.in +++ kitsh/buildsrc/kitsh-0.0/Makefile.kitdll.in @@ -17,23 +17,23 @@ mv libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@.safe libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@ -rm -f libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@.safe ## Static archive build libtclkit@KITDLL_LIB_VERSION@.a: $(OBJS) $(EXTRA_KIT_DEPS) $(EXTRA_OBJS) $(EXTRA_VFS_OBJS) - rm -f libtclkit@KITDLL_LIB_VERSION@.a.new - rm -rf __TMP__ - mkdir __TMP__ - for arch in $(ARCHS); do ( cd __TMP__ && ar x ../$${arch} ); done - $(OBJCOPY) --redefine-sym Tcl_Init=Tcl_InitReal __TMP__/tclInterp.o - $(AR) cr libtclkit@KITDLL_LIB_VERSION@.a.new $(OBJS) $(EXTRA_OBJS) $(EXTRA_VFS_OBJS) __TMP__/*.o - rm -rf __TMP__ - $(RANLIB) libtclkit@KITDLL_LIB_VERSION@.a.new - mv libtclkit@KITDLL_LIB_VERSION@.a.new libtclkit@KITDLL_LIB_VERSION@.a + rm -f libtclkit@KITDLL_LIB_VERSION@.a.new + rm -rf __TMP__ + mkdir __TMP__ + for arch in $(ARCHS); do ( cd __TMP__ && ar x ../$${arch} ); done + $(OBJCOPY) --redefine-sym Tcl_Init=Tcl_InitReal __TMP__/tclInterp.o + $(AR) cr libtclkit@KITDLL_LIB_VERSION@.a.new $(OBJS) $(EXTRA_OBJS) $(EXTRA_VFS_OBJS) __TMP__/*.o + rm -rf __TMP__ + $(RANLIB) libtclkit@KITDLL_LIB_VERSION@.a.new + mv libtclkit@KITDLL_LIB_VERSION@.a.new libtclkit@KITDLL_LIB_VERSION@.a # Test driver tclsh.o: tclsh.c -tclsh: tclsh.o $(EXTRA_OBJS) libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@ +tclsh: tclsh.o $(EXTRA_OBJS) @TARGET@ $(CC) $(CPPFLAGS) $(CFLAGS) -o tclsh tclsh.o $(EXTRA_OBJS) -L. -ltclkit@KITDLL_LIB_VERSION@ $(LDRUNPATH) wish.o: wish.c wish: wish.o $(EXTRA_OBJS) libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@ $(CC) $(CPPFLAGS) $(CFLAGS) $(WISH_CFLAGS) -o wish wish.o $(EXTRA_OBJS) -L. -ltclkit@KITDLL_LIB_VERSION@ $(LDRUNPATH) Index: kitsh/buildsrc/kitsh-0.0/configure.ac ================================================================== --- kitsh/buildsrc/kitsh-0.0/configure.ac +++ kitsh/buildsrc/kitsh-0.0/configure.ac @@ -17,11 +17,11 @@ [yes|kitdll], [ TARGET="kitdll" ], static, [ TARGET="kitdll-static" - ] + ], no, [ true ], [ AC_MSG_RESULT([unknown]) @@ -36,15 +36,18 @@ AC_SEARCH_LIBS(acos, m,, [ AC_MSG_WARN([Couldn't find acos (normally in libm)!]) ]) AC_SEARCH_LIBS(dlsym, dl,, [ AC_MSG_WARN([Couldn't find dlsym (normally in libdl)!]) ]) AS_IF([test "$TARGET" = "tclkit"], [ dnl We have Tclkit + TARGET_BASE='tclkit' dnl Specify local Appinit function AC_DEFINE(TK_LOCAL_APPINIT, [TclKit_AppInit], [Tclkit appinit function]) + ], [ dnl We have KitDLL + TARGET_BASE='kitdll' dnl Determine system information DC_CHK_OS_INFO dnl Determine how to create a shared object @@ -56,12 +59,14 @@ dnl Define KitDLL usage AC_DEFINE([TCLKIT_DLL], [1], [Define if you are using a KitDLL rather than a Tclkit]) dnl Define a static KitDLL AS_IF([test "$TARGET" = "kitdll-static"], [ + AC_CHECK_TOOL(RANLIB, [ranlib], [:]) + AC_CHECK_TOOL(AR, [ar], [false MISSING AR]) + AC_DEFINE([TCLKIT_DLL_STATIC], [1], [Define if you are building a static KitDLL]) - SHOBJE ]) ]) dnl Figure out how to statically link to libgcc, if needed DC_STATIC_LIBGCC @@ -209,9 +214,9 @@ AC_SUBST(EXTRA_KIT_DEPS) AC_SUBST(LDFLAGS_ADD) dnl Put correct Makefile template in place rm -f Makefile.in -cp Makefile.${TARGET}.in Makefile.in +cp Makefile.${TARGET_BASE}.in Makefile.in dnl Produce output AC_OUTPUT(Makefile Makefile.common)