Last active
December 4, 2018 23:56
-
-
Save yinyin/54701f8caf3482ba2b125d9b840af32c to your computer and use it in GitHub Desktop.
Set environment variables for autotools
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# source ~/bin/env-autotools.sh | |
OPT_BASE=/opt | |
which autoreconf | |
if [ "$?" != "0" ]; then | |
export PATH=${OPT_BASE}/autoconf-2.69/bin:$PATH | |
fi | |
which automake | |
if [ "$?" != "0" ]; then | |
export PATH=${OPT_BASE}/automake-1.15/bin:$PATH | |
fi | |
which libtoolize | |
if [ "$?" != "0" ]; then | |
export PATH=${OPT_BASE}/libtool-2.4.6/bin:$PATH | |
export ACLOCAL_PATH=${OPT_BASE}/libtool-2.4.6/share/aclocal:$ACLOCAL_PATH | |
fi | |
which pkg-config | |
if [ "$?" != "0" ]; then | |
export PATH=${OPT_BASE}/pkg-config-0.29.2/bin:$PATH | |
export PKG_CONFIG_PATH=${OPT_BASE}/pkg-config-data:$PKG_CONFIG_PATH | |
export ACLOCAL_PATH=${OPT_BASE}/pkg-config-0.29.2/share/aclocal:$ACLOCAL_PATH | |
fi | |
export ACLOCAL_PATH=${ACLOCAL_PATH%:} | |
export PKG_CONFIG_PATH=${PKG_CONFIG_PATH%:} | |
echo "PATH=${PATH}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment