Diff

Differences From Artifact [e7c0e6436b]:

To Artifact [f6144b21a4]:


   137    137   	# Create pkgIndex if needed
   138    138   	if [ ! -e "${INSTDIR}/lib/tls${TLSVERS}/pkgIndex.tcl" ]; then
   139    139   		cat << _EOF_ > "${INSTDIR}/lib/tls${TLSVERS}/pkgIndex.tcl"
   140    140   package ifneeded tls ${TLSVERS} \
   141    141       "[list source [file join \$dir tls.tcl]] ; \
   142    142        [list load {} tls]"
   143    143   _EOF_
   144         -		## XXX: TODO: Determine what we actually need to link against
   145         -		echo '-Wl,-Bstatic -lssl -lcrypto -Wl,-Bdynamic' > "${INSTDIR}/lib/tls${TLSVERS}/libtls${TLSVERS}.a.linkadd"
          144  +	fi
          145  +
          146  +	## XXX: TODO: Determine what we actually need to link against
          147  +	addlibs="-lssl -lcrypto"
          148  +	if [ "${KC_TLS_LINKSSLSTATIC}" = '1' ]; then
          149  +		echo "-Wl,-Bstatic ${addlibs} -Wl,-Bdynamic"
   146    150   	else
   147         -		## XXX: TODO: Determine what we actually need to link against
   148         -		echo '-lssl -lcrypto' > "${INSTDIR}/lib/tls${TLSVERS}/libtls${TLSVERS}.a.linkadd"
   149         -	fi
          151  +		echo "${addlibs}"
          152  +	fi > "${INSTDIR}/lib/tls${TLSVERS}/libtls${TLSVERS}.a.linkadd"
   150    153   
   151    154   	# Install files needed by installation
   152    155   	cp -r "${INSTDIR}/lib" "${OUTDIR}" || exit 1
   153    156   	find "${OUTDIR}" -name '*.a' -type f | xargs -n 1 rm -f --
   154    157   
   155    158   	exit 0
   156    159   ) || exit 1
   157    160   
   158    161   exit 0