Diff

Differences From Artifact [d398d3b4ba]:

To Artifact [ab8a5ebb9e]:


   115    115   
   116    116   	SAVELIBS="${LIBS}"
   117    117   	staticlib=""
   118    118   	found="0"
   119    119   	dnl HP/UX uses -Wl,-a,archive -lstdc++ -Wl,-a,shared_archive
   120    120   	dnl Linux and Solaris us -Wl,-Bstatic ... -Wl,-Bdynamic
   121    121   	for trylink in "-Wl,-a,archive $2 -Wl,-a,shared_archive" "-Wl,-Bstatic $2 -Wl,-Bdynamic" "$2"; do
          122  +		if echo " ${LDFLAGS} " | grep ' -static ' >/dev/null; then
          123  +			if test "${trylink}" != "$2"; then
          124  +				continue
          125  +			fi
          126  +		fi
          127  +
   122    128   		LIBS="${SAVELIBS} ${trylink}"
   123    129   
   124    130   		AC_LINK_IFELSE(AC_LANG_PROGRAM([], []), [
   125    131   			staticlib="${trylink}"
   126    132   			found="1"
   127    133   
   128    134   			break