Diff

Differences From Artifact [c2b5bbda30]:

To Artifact [abd6ccb011]:


    39     39   
    40     40   	AC_MSG_RESULT([$tclconfigsh])
    41     41   ])
    42     42   
    43     43   AC_DEFUN(DC_DO_STATIC_LINK_LIBCXX, [
    44     44   	AC_MSG_CHECKING([for how to statically link to libstdc++])
    45     45   
    46         -	STATICLIBCXX="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic"
    47         -	LIBS="${LIBS} ${STATICLIBCXX}"
           46  +	SAVELIBS="${LIBS}"
           47  +	staticlibcxx=""
           48  +	for trylink in "-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic" "-Wl,-Bstatic -lCstd -lCrun -Wl,-Bdynamic" "-lstdc++" "-lCstd -lCrun"; do
           49  +		LIBS="${SAVELIBS} ${trylink}"
           50  +
           51  +		AC_LINK_IFELSE(, [
           52  +			staticlibcxx="${trylink}"
           53  +
           54  +			break
           55  +		])
           56  +	done
           57  +	LIBS="${SAVELIBS} ${staticlibcxx}"
           58  +
           59  +	AC_MSG_RESULT([${staticlibcxx}])
    48     60   
    49     61   	AC_SUBST(LIBS)
    50         -
    51         -	AC_MSG_RESULT([${STATICLIBCXX}])
    52     62   ])
    53     63   
    54     64   AC_DEFUN(DC_FIND_TCLKIT_LIBS, [
           65  +
    55     66   	for proj in mk4tcl tcl tclvfs; do
    56     67   		AC_MSG_CHECKING([for libraries required for ${proj}])
    57     68   
    58     69   		libdir="../../../${proj}/inst"
    59     70   		libfiles="`find "${libdir}" -name '*.a' | tr "\n" ' '`"
    60     71   
    61     72   		ARCHS="${ARCHS} ${libfiles}"
    62     73   
    63     74   		AC_MSG_RESULT([${libfiles}])
           75  +
           76  +		if test "${libfiles}" != ""; then
           77  +			upperproj=`echo "${proj}" | dd conv=ucase 2>/dev/null`
           78  +
           79  +			AC_DEFINE(KIT_INCLUDES_$upperproj)
           80  +
           81  +			if test "${proj}" = "mk4tcl"; then
           82  +				DC_DO_STATIC_LINK_LIBCXX
           83  +			fi
           84  +		fi
    64     85   	done
    65     86   
    66     87   	AC_SUBST(ARCHS)
    67     88   ])