Self-explanatory. The code in question adds -quadmath to archname, but only if it isn't already there. However, since this was copied from a few lines earlier, it checks for -ld instead of -quadmath.
$define)
echo "quadmath selected." >&4
case "$archname" in
- *-ld*) echo "...and architecture name already has -quadmath." >&4
+ *-quadmath*) echo "...and architecture name already has -quadmath." >&4
;;
*) archname="$archname-quadmath"
echo "...setting architecture name to $archname." >&4