Index: kitsh/buildsrc/kitsh-0.0/aclocal.m4 ================================================================== --- kitsh/buildsrc/kitsh-0.0/aclocal.m4 +++ kitsh/buildsrc/kitsh-0.0/aclocal.m4 @@ -30,11 +30,11 @@ tclconfigshdir="${with_tcl}" tclconfigsh="${tclconfigshdir}/tclConfig.sh" fi if test -f "${tclconfigsh}"; then - source "${tclconfigsh}" + . "${tclconfigsh}" CFLAGS="${CFLAGS} ${TCL_INCLUDE_SPEC} -I${TCL_SRC_DIR}/generic -I${tclconfigshdir}" CPPFLAGS="${CPPFLAGS} ${TCL_INCLUDE_SPEC} -I${TCL_SRC_DIR}/generic -I${tclconfigshdir}" LDFLAGS="${LDFLAGS}" LIBS="${LIBS} ${TCL_LIBS}" @@ -80,11 +80,11 @@ tkconfigshdir="${with_tk}" tkconfigsh="${tkconfigshdir}/tkConfig.sh" fi if test -f "${tkconfigsh}"; then - source "${tkconfigsh}" + . "${tkconfigsh}" CFLAGS="${CFLAGS} ${TK_INCLUDE_SPEC} -I${TK_SRC_DIR}/generic -I${tkconfigshdir}" CPPFLAGS="${CPPFLAGS} ${TK_INCLUDE_SPEC} -I${TK_SRC_DIR}/generic -I${tkconfigshdir}" LDFLAGS="${LDFLAGS}" LIBS="${LIBS} ${TK_LIBS}" @@ -101,11 +101,15 @@ AC_DEFUN(DC_DO_STATIC_LINK_LIBCXX, [ AC_MSG_CHECKING([for how to statically link to libstdc++]) SAVELIBS="${LIBS}" staticlibcxx="" - for trylink in "-Wl,-Bstatic -lCstd -lCrun -Wl,-Bdynamic" "-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic" "-lCstd -lCrun" "-lstdc++"; do + dnl HP/UX uses -Wl,-a,archive -lstdc++ -Wl,-a,shared_archive + dnl Linux and Solaris us -Wl,-Bstatic ... -Wl,-Bdynamic + dnl + dnl Sun Studio uses -lCstd -lCrun, most platforms use -lstdc++ + for trylink in "-Wl,-a,archive -lstdc++ -Wl,-a,shared_archive" "-Wl,-Bstatic -lCstd -lCrun -Wl,-Bdynamic" "-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic" "-lCstd -lCrun" "-lstdc++"; do LIBS="${SAVELIBS} ${trylink}" AC_LINK_IFELSE(AC_LANG_PROGRAM([], []), [ staticlibcxx="${trylink}" @@ -171,6 +175,29 @@ ;; cygwin*) CFLAGS="${CFLAGS} -mms-bitfields" ;; esac +]) + +AC_DEFUN(DC_STATIC_LIBGCC, [ + AC_MSG_CHECKING([how to link statically against libgcc]) + + SAVELDFLAGS="${LDFLAGS}" + staticlibgcc="" + for trylink in "-static-libgcc"; do + LDFLAGS="${SAVELDFLAGS} ${trylink}" + AC_LINK_IFELSE(AC_LANG_PROGRAM([], []), [ + staticlibgcc="${trylink}" + + break + ]) + done + if test -n "${staticlibgcc}"; then + LDFLAGS="${SAVELDFLAGS} ${staticlibgcc}" + AC_MSG_RESULT([${staticlibgcc}]) + else + LDFLAGS="${SAVELDFLAGS}" + AC_MSG_RESULT([not needed]) + fi + ]) Index: kitsh/buildsrc/kitsh-0.0/configure.ac ================================================================== --- kitsh/buildsrc/kitsh-0.0/configure.ac +++ kitsh/buildsrc/kitsh-0.0/configure.ac @@ -9,10 +9,13 @@ AC_GNU_SOURCE 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)!]) ]) + +dnl Figure out how to statically link to libgcc, if needed +DC_STATIC_LIBGCC dnl Find the appropriate Tcl headers and libraries DC_DO_TCL dnl Find archives we need to link to ADDED mk4tcl/patches/all/metakit-2.4.9.7-dontrequireautoconf.diff Index: mk4tcl/patches/all/metakit-2.4.9.7-dontrequireautoconf.diff ================================================================== --- /dev/null +++ mk4tcl/patches/all/metakit-2.4.9.7-dontrequireautoconf.diff @@ -0,0 +1,12 @@ +diff -uNr metakit-2.4.9.7-orig/unix/Makefile.in metakit-2.4.9.7-rsk/unix/Makefile.in +--- metakit-2.4.9.7-orig/unix/Makefile.in 2007-06-15 19:23:25.000000000 -0500 ++++ metakit-2.4.9.7-rsk/unix/Makefile.in 2010-02-28 18:44:18.000000000 -0600 +@@ -127,7 +127,7 @@ + $(SHELL) ./config.status --recheck + + $(srcdir)/configure: $(srcdir)/configure.in +- cd $(srcdir) && autoconf ++ cd $(srcdir) && true + + libmk4$(LIB_SUFFIX): $(LOBJS) + ar rcu $@ $(LOBJS)