proxychains-ng/configure

90 lines
1.8 KiB
Plaintext
Raw Normal View History

#!/bin/sh
prefix=/usr/local
2012-07-07 22:35:59 +00:00
usage() {
echo "supported arguments"
echo "--prefix=/path default: $prefix"
echo "--exec_prefix=/path default: $prefix/bin"
echo "--bindir=/path default: $prefix/bin"
echo "--libdir=/path default: $prefix/lib"
echo "--includedir=/path default: $prefix/include"
echo "--sysconfdir=/path default: $prefix/etc"
echo "--help : show this text"
exit 1
}
spliteq() {
arg=$1
echo "${arg#*=}"
#alternatives echo "$arg" | cut -d= -f2-
# or echo "$arg" | sed 's/[^=]*=//'
}
parsearg() {
case "$1" in
2012-01-30 17:26:38 +00:00
--prefix=*) prefix=`spliteq $1`;;
--exec_prefix=*) exec_prefix=`spliteq $1`;;
--bindir=*) bindir=`spliteq $1`;;
--libdir=*) libdir=`spliteq $1`;;
--includedir=*) includedir=`spliteq $1`;;
2012-01-30 17:26:38 +00:00
--sysconfdir=*) sysconfdir=`spliteq $1`;;
2012-07-07 22:35:59 +00:00
--help) usage;;
esac
}
2012-01-27 19:21:06 +00:00
ismac() {
uname -s | grep Darwin
}
while true ; do
case $1 in
-*) parsearg "$1"; shift;;
*) break ;;
esac
done
2012-01-30 17:35:03 +00:00
if [ -z "$exec_prefix" ] ; then
exec_prefix=$prefix
fi
2012-01-30 17:35:03 +00:00
if [ -z "$libdir" ] ; then
libdir=$prefix/lib
fi
2012-01-30 17:35:03 +00:00
if [ -z "$includedir" ] ; then
includedir=$prefix/include
fi
2012-01-30 17:35:03 +00:00
if [ -z "$sysconfdir" ] ; then
2012-01-30 17:26:38 +00:00
sysconfdir=$prefix/etc
fi
2012-01-30 17:35:03 +00:00
if [ -z "$bindir" ] ; then
bindir=$exec_prefix/bin
fi
2012-01-30 17:35:03 +00:00
if [ -z "$CC" ] ; then
CC=cc
fi
echo CC?=$CC>config.mak
[ -z "$CPPFLAGS" ] || echo CPPFLAGS?=$CPPFLAGS>>config.mak
[ -z "$CFLAGS" ] || echo USER_CFLAGS?=$CFLAGS>>config.mak
echo prefix=$prefix>>config.mak
echo exec_prefix=$exec_prefix>>config.mak
echo bindir=$bindir>>config.mak
echo libdir=$libdir>>config.mak
echo includedir=$includedir>>config.mak
2012-01-30 17:26:38 +00:00
echo sysconfdir=$sysconfdir>>config.mak
2012-01-27 19:21:06 +00:00
if ismac ; then
2012-12-16 01:39:28 +00:00
echo NO_AS_NEEDED=>>config.mak
2012-01-27 19:21:06 +00:00
echo LDSO_SUFFIX=dylib>>config.mak
2012-01-27 19:48:24 +00:00
echo MAC_CFLAGS+=-DIS_MAC=1>>config.mak
echo LD_SET_SONAME=-Wl,-install_name,>>config.mak
echo INSTALL_FLAGS=-m>>config.mak
2012-01-27 19:21:06 +00:00
fi
echo done, now run make \&\& make install