Diff

Differences From Artifact [e5b75fa21b]:

To Artifact [04ee15ac39]:


    81     81   
    82     82   	if test -f "${tkconfigsh}"; then
    83     83   		. "${tkconfigsh}"
    84     84   
    85     85   		CFLAGS="${CFLAGS} ${TK_INCLUDE_SPEC} -I${tkconfigshdir} -I${TK_SRC_DIR}/generic -I${TK_SRC_DIR}/xlib"
    86     86   		CPPFLAGS="${CPPFLAGS} ${TK_INCLUDE_SPEC} -I${tkconfigshdir} -I${TK_SRC_DIR}/generic -I${TK_SRC_DIR}/xlib"
    87     87   		LIBS="${LIBS} ${TK_LIBS}"
           88  +
           89  +		NEWLIBS=""
           90  +		for lib in ${LIBS}; do
           91  +			if echo "${lib}" | grep '^-l' >/dev/null; then
           92  +				if echo " ${NEWLIBS} " | grep " ${lib} " >/dev/null; then
           93  +					continue
           94  +				fi
           95  +			fi
           96  +			NEWLIBS="${NEWLIBS} ${lib}"
           97  +		done
           98  +		LIBS="${NEWLIBS}"
    88     99   	fi
    89    100   
    90    101   	AC_SUBST(CFLAGS)
    91    102   	AC_SUBST(CPPFLAGS)
    92    103   	AC_SUBST(LIBS)
    93    104   
    94    105   	AC_MSG_RESULT([$tkconfigsh])