3 Star 2 Fork 0

Gitee 极速下载/alsa-lib

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/alsa-project/alsa-lib
克隆/下载
gitcompile 2.25 KB
一键复制 编辑 原始数据 按行查看 历史
Jaroslav Kysela 提交于 2023-09-04 09:37 . gitcompile: Add static build
#!/bin/bash
set -e
bits32=
cbits32=
modules=
alisp=
lto=
if [ $# -ne 0 ]; then
endloop=
while [ -z "$endloop" ]; do
case "$1" in
32)
bits32=yes
cbits32="-m32"
echo "Forced 32-bit library build..."
shift ;;
modules)
modules=yes
echo "Forced mixer modules build..."
shift ;;
alisp)
alisp=yes
echo "Forced alisp code build..."
shift ;;
python2)
python2=yes
echo "Forced python2 interpreter build..."
shift ;;
lto)
lto="-flto -flto-partition=none"
echo "Forced lto build..."
shift ;;
static)
static=yes
echo "Selected static build..."
shift ;;
*)
endloop=yes
;;
esac
done
fi
if [ $# -ne 0 -a -z "$bit32" ]; then
args="$@"
elif [ -r /etc/asound/library_args ]; then
args="`cat /etc/asound/library_args`"
if [ -z "$bits32" ]; then
test -r /etc/asound/library64_args && \
args="`cat /etc/asound/library64_args`"
fi
else
prefix="/usr"
libdir="/usr/lib"
libdir2="/usr/lib"
if [ -z "$bits32" ]; then
test -d /usr/lib64 && libdir="/usr/lib64"
test -f /lib64/libasound.so.2 && libdir="/lib64"
test -d /usr/lib64 && libdir2="/usr/lib64"
else
test -f /lib/libasound.so.2 && libdir="/lib"
fi
args="--disable-aload --prefix=$prefix --libdir=$libdir"
args="$args --with-plugindir=$libdir2/alsa-lib"
args="$args --with-pkgconfdir=$libdir2/pkgconfig"
fi
if [ "$modules" = "yes" ]; then
args="$args --enable-mixer-modules"
args="$args --enable-mixer-pymods"
fi
if [ "$alisp" = "yes" ]; then
args="$args --enable-alisp"
fi
if [ "$python2" = "yes" ]; then
args="$args --enable-python2"
fi
if [ "$static" = "yes" ]; then
#args="$args --enable-shared=no --enable-static=yes"
args="$args --disable-shared"
fi
touch ltconfig
libtoolize --force --copy --automake
aclocal $ACLOCAL_FLAGS
autoheader
automake --foreign --copy --add-missing
touch depcomp # seems to be missing for old automake
autoconf
export CFLAGS="$cbits32 -O2 -Wall -W -Wunused-const-variable=0 -pipe -g $lto"
if [ -n "$lto" ]; then
export AR="gcc-ar"
export RANLIB="gcc-ranlib"
fi
echo "CFLAGS=$CFLAGS"
echo "./configure $args"
./configure $args || exit 1
unset CFLAGS
if [ -z "$GITCOMPILE_NO_MAKE" ]; then
make
fi
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors/alsa-lib.git
git@gitee.com:mirrors/alsa-lib.git
mirrors
alsa-lib
alsa-lib
master

搜索帮助