@@ -15,10 +15,13 @@ AC_ARG_ENABLE(kitdll, AC_HELP_STRING([--enable-kitdll], [Enable building KitDLL instead of Tclkit (default: no)]), [ AS_CASE([$enableval], [yes|kitdll], [ TARGET="kitdll" ], + static, [ + TARGET="kitdll-static" + ] no, [ true ], [ AC_MSG_RESULT([unknown]) @@ -25,10 +28,11 @@ AC_MSG_ERROR([Invalid option: $enableval]) ] ) ]) AC_MSG_RESULT([$TARGET]) +AC_SUBST(TARGET) dnl Find the appropriate libraries to link to 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)!]) ]) @@ -49,10 +53,16 @@ dnl Determine if we have "objcopy" available to weaken non-Tcl/Tk symbols AC_CHECK_TOOL(OBJCOPY, objcopy, [:]) 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_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