mirror of
https://github.com/rofl0r/proxychains-ng
synced 2025-01-08 06:02:51 +08:00
Add option to build for i386 architecture on x64 Intel Macs
closes #26 closes #27
This commit is contained in:
parent
44150485cb
commit
e2af2f2bd7
32
configure
vendored
32
configure
vendored
@ -2,6 +2,18 @@
|
|||||||
|
|
||||||
prefix=/usr/local
|
prefix=/usr/local
|
||||||
|
|
||||||
|
ismac() {
|
||||||
|
uname -s | grep Darwin >/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
isx86_64() {
|
||||||
|
uname -m | grep -i X86_64 >/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
isbsd() {
|
||||||
|
uname -s | grep BSD >/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "supported arguments"
|
echo "supported arguments"
|
||||||
echo "--prefix=/path default: $prefix"
|
echo "--prefix=/path default: $prefix"
|
||||||
@ -10,6 +22,7 @@ usage() {
|
|||||||
echo "--libdir=/path default: $prefix/lib"
|
echo "--libdir=/path default: $prefix/lib"
|
||||||
echo "--includedir=/path default: $prefix/include"
|
echo "--includedir=/path default: $prefix/include"
|
||||||
echo "--sysconfdir=/path default: $prefix/etc"
|
echo "--sysconfdir=/path default: $prefix/etc"
|
||||||
|
ismac && isx86_64 && echo "--fat-binary : build for both i386 and x86_64 architectures on 64-bit Macs"
|
||||||
echo "--help : show this text"
|
echo "--help : show this text"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
@ -21,6 +34,8 @@ spliteq() {
|
|||||||
# or echo "$arg" | sed 's/[^=]*=//'
|
# or echo "$arg" | sed 's/[^=]*=//'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fat_binary=
|
||||||
|
|
||||||
parsearg() {
|
parsearg() {
|
||||||
case "$1" in
|
case "$1" in
|
||||||
--prefix=*) prefix=`spliteq $1`;;
|
--prefix=*) prefix=`spliteq $1`;;
|
||||||
@ -29,18 +44,11 @@ parsearg() {
|
|||||||
--libdir=*) libdir=`spliteq $1`;;
|
--libdir=*) libdir=`spliteq $1`;;
|
||||||
--includedir=*) includedir=`spliteq $1`;;
|
--includedir=*) includedir=`spliteq $1`;;
|
||||||
--sysconfdir=*) sysconfdir=`spliteq $1`;;
|
--sysconfdir=*) sysconfdir=`spliteq $1`;;
|
||||||
|
--fat-binary) fat_binary=1;;
|
||||||
--help) usage;;
|
--help) usage;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
ismac() {
|
|
||||||
uname -s | grep Darwin >/dev/null
|
|
||||||
}
|
|
||||||
|
|
||||||
isbsd() {
|
|
||||||
uname -s | grep BSD >/dev/null
|
|
||||||
}
|
|
||||||
|
|
||||||
while true ; do
|
while true ; do
|
||||||
case $1 in
|
case $1 in
|
||||||
-*) parsearg "$1"; shift;;
|
-*) parsearg "$1"; shift;;
|
||||||
@ -85,6 +93,11 @@ if ismac ; then
|
|||||||
echo NO_AS_NEEDED=>>config.mak
|
echo NO_AS_NEEDED=>>config.mak
|
||||||
echo LDSO_SUFFIX=dylib>>config.mak
|
echo LDSO_SUFFIX=dylib>>config.mak
|
||||||
echo MAC_CFLAGS+=-DIS_MAC=1>>config.mak
|
echo MAC_CFLAGS+=-DIS_MAC=1>>config.mak
|
||||||
|
if isx86_64 && [ "$fat_binary" = 1 ] ; then
|
||||||
|
echo "Configuring a fat binary for i386 and x86_64"
|
||||||
|
echo MAC_CFLAGS+=-arch i386 -arch x86_64>>config.mak
|
||||||
|
echo LDFLAGS+=-arch i386 -arch x86_64>>config.mak
|
||||||
|
fi
|
||||||
echo LD_SET_SONAME=-Wl,-install_name,>>config.mak
|
echo LD_SET_SONAME=-Wl,-install_name,>>config.mak
|
||||||
echo INSTALL_FLAGS=-m>>config.mak
|
echo INSTALL_FLAGS=-m>>config.mak
|
||||||
elif isbsd ; then
|
elif isbsd ; then
|
||||||
@ -93,5 +106,4 @@ elif isbsd ; then
|
|||||||
echo INSTALL_FLAGS=-m>>config.mak
|
echo INSTALL_FLAGS=-m>>config.mak
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo done, now run make \&\& make install
|
echo "Done, now run make && make install"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user