Diff

Differences From Artifact [a84d1ae23f]:

To Artifact [b28720a899]:


    29     29   AC_MSG_RESULT([$TARGET])
    30     30   
    31     31   dnl Find the appropriate libraries to link to
    32     32   AC_SEARCH_LIBS(acos, m,, [ AC_MSG_WARN([Couldn't find acos (normally in libm)!]) ])
    33     33   AC_SEARCH_LIBS(dlsym, dl,, [ AC_MSG_WARN([Couldn't find dlsym (normally in libdl)!]) ])
    34     34   
    35     35   AS_IF([test "$TARGET" = "tclkit"], [
           36  +	dnl We have Tclkit
           37  +
    36     38   	dnl Figure out how to statically link to libgcc, if needed
    37     39   	DC_STATIC_LIBGCC
    38     40   
    39     41   	dnl Specify local Appinit function
    40     42   	AC_DEFINE(DTK_LOCAL_APPINIT, [TclKit_AppInit], [Tclkit appinit function])
    41     43   ], [
    42     44   	dnl We have KitDLL
................................................................................
    43     45   
    44     46   	dnl Determine system information
    45     47   	DC_CHK_OS_INFO
    46     48   
    47     49   	dnl Determine how to create a shared object
    48     50   	DC_GET_SHOBJFLAGS
    49     51   
    50         -	dnl KitDLL always uses C-VFS
    51         -	AC_DEFINE([KIT_STORAGE_CVFS], [1], [Define if you are going to use C-VFS for kit storage])
           52  +	dnl Determine if we have "objcopy" available to weaken non-Tcl/Tk symbols
           53  +	AC_CHECK_TOOL(OBJCOPY, objcopy, [:])
    52     54   
    53     55   	dnl Define KitDLL usage
    54     56   	AC_DEFINE([TCLKIT_DLL], [1], [Define if you are using a KitDLL rather than a Tclkit])
    55     57   ])
           58  +
           59  +dnl Set linker rpath for tclsh/wish
           60  +DC_SETLDRUNPATH([.])
    56     61   
    57     62   dnl Find the appropriate Tcl headers and libraries
    58     63   DC_DO_TCL
    59     64   
    60     65   dnl Find archives we need to link to
    61     66   DC_FIND_TCLKIT_LIBS
    62     67   
    63     68   dnl Find extra objects we need to link as a part of "kit"
    64     69   AC_SUBST(EXTRA_OBJS)
           70  +AC_SUBST(EXTRA_VFS_OBJS)
    65     71   
    66     72   dnl Check for Windows Resource Compiler
    67     73   AC_CHECK_TOOL([RC], [windres], [false])
    68     74   
    69     75   dnl If we found the resource compiler, add "kit.res.o" to our list of objects to build
    70     76   dnl (as long as the source for such an object exists)
    71     77   AS_IF([test "$RC" != "false"], [
................................................................................
    99    105   AC_ARG_WITH(zlib, AC_HELP_STRING([--with-zlib], [directory containing zlib]), [
   100    106   	CPPFLAGS="${CPPFLAGS} -I${with_zlib}/include -I${with_zlib}"
   101    107   	CFLAGS="${CFLAGS} -I${with_zlib}/include -I${with_zlib}"
   102    108   	LDFLAGS="${LDFLAGS} -L${with_zlib}/lib -L${with_zlib}"
   103    109   ])
   104    110   
   105    111   dnl Only needed for Tclkit
   106         -AS_IF([test "$TARGET" = "tclkit"], [
   107         -	DC_DO_STATIC_LINK_LIB(zlib, -lz,, [
   108         -		DC_DO_STATIC_LINK_LIB(zlib, -lzlib,, [
   109         -			AC_SEARCH_LIBS(inflate, z zlib,, [
   110         -				AC_MSG_WARN([Couldn't find inflate (normally in zlib)!])
   111         -			])
          112  +DC_DO_STATIC_LINK_LIB(zlib, -lz,, [
          113  +	DC_DO_STATIC_LINK_LIB(zlib, -lzlib,, [
          114  +		AC_SEARCH_LIBS(inflate, z zlib,, [
          115  +			AC_MSG_WARN([Couldn't find inflate (normally in zlib)!])
   112    116   		])
   113    117   	])
   114    118   ])
   115    119   
   116    120   dnl Determine which storage mechanism to use
   117    121   AC_MSG_CHECKING([which Tclkit Storage mechanism to use])
   118    122   
................................................................................
   179    183   		AC_DEFINE([KIT_STORAGE_CVFS], [1], [Define if you are going to use C-VFS for kit storage])
   180    184   
   181    185   		dnl Define that C-VFS should be make [load]-able
   182    186   		AC_DEFINE([KITDLL_MAKE_LOADABLE], [1], [Specify that the C-VFS should be able to be loaded])
   183    187   
   184    188   		dnl Add appropriate dependencies
   185    189   		EXTRA_KIT_DEPS="vfs_kitdll.tcl.h"
          190  +		EXTRA_VFS_OBJS="${EXTRA_VFS_OBJS} vfs_kitdll_data_tcl.o"
   186    191   	]
   187    192   )
   188    193   
   189    194   AC_SUBST(EXTRA_KIT_DEPS)
   190    195   
   191    196   dnl Put correct Makefile template in place
   192    197   rm -f Makefile.in
   193    198   cp Makefile.${TARGET}.in Makefile.in
   194    199   
   195    200   dnl Produce output
   196    201   AC_OUTPUT(Makefile Makefile.common)