Skip to content

Instantly share code, notes, and snippets.

@ywkaras
Created May 9, 2018 16:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ywkaras/9eaaac5f110eece77b4528122035a44a to your computer and use it in GitHub Desktop.
Save ywkaras/9eaaac5f110eece77b4528122035a44a to your computer and use it in GitHub Desktop.
TS build config script
#!/bin/bash
if [[ ! -f configure.ac ]] ; then
echo "configure.ac not found"
exit 1
fi
DIR="$(basename $PWD )"
# "--enable-layout=Yahoo"
"./configure" \
"--with-openssl=/home/y/libexec64/yssl" \
"--with-brotli=/home/y/lib64" \
"--enable-debug" \
"--enable-docs" \
"--prefix=/home/wkaras/TSX/$DIR" \
"--exec-prefix=/home/wkaras/TSX/$DIR" \
"--enable-experimental-plugins" \
LDFLAGS="-Wl,--add-needed -L/home/y/lib64 -Wl,-rpath,/home/y/lib64" \
"PKG_CONFIG_PATH=/opt/rh/httpd24/root/usr/lib64/pkgconfig:/opt/rh/rh-python35/root/usr/lib64/pkgconfig" \
"$@"
# Hack for autotools not include pthread lib in link.
#
MFILE=cmd/traffic_cache_tool/Makefile
grep -F --silent -e -lpthread $MFILE
if [[ "$?" != 0 ]] ; then
TMFILE=/tmp/config.my.$$
sed '/^[^=]*-lssl/s/$/ -lpthread/' < $MFILE > $TMFILE
cp $TMFILE $MFILE
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment