1
0
Fork 0
mirror of https://github.com/albfan/miraclecast.git synced 2025-02-12 13:21:56 +00:00
miraclecast/autogen.sh

69 lines
1.4 KiB
Bash
Raw Permalink Normal View History

#!/bin/sh
2016-08-22 01:08:40 +00:00
set -e
oldpwd=$(pwd)
topdir=$(dirname $0)
cd $topdir
#intltoolize --force --automake
autoreconf --force --install --symlink
libdir() {
echo $(cd "$1/$(gcc -print-multi-os-directory)"; pwd)
}
args="\
--sysconfdir=/etc \
--localstatedir=/var \
--libdir=$(libdir /usr/lib) \
"
if [ -f "$topdir/.config.args" ]; then
args="$args $(cat $topdir/.config.args)"
fi
cd $oldpwd
if [ "x$1" = "xc" ]; then
2017-04-18 02:50:13 +00:00
shift
args="$args $@"
2016-08-22 01:08:40 +00:00
$topdir/configure CFLAGS='-g -O0 -ftrapv' $args
elif [ "x$1" = "xg" ]; then
2017-04-18 02:50:13 +00:00
shift
args="$args $@"
$topdir/configure CFLAGS='-g -O0 -ftrapv' $args
2016-08-22 01:08:40 +00:00
elif [ "x$1" = "xa" ]; then
2017-04-18 02:50:13 +00:00
shift
args="$args $@"
2016-08-22 01:08:40 +00:00
$topdir/configure CFLAGS='-g -O0 -Wsuggest-attribute=pure -Wsuggest-attribute=const -ftrapv' $args
elif [ "x$1" = "xl" ]; then
2017-04-18 02:50:13 +00:00
shift
args="$args $@"
2016-08-22 01:08:40 +00:00
$topdir/configure CC=clang CFLAGS='-g -O0 -ftrapv' $args
elif [ "x$1" = "xs" ]; then
2017-04-18 02:50:13 +00:00
shift
args="$args $@"
2016-08-22 01:08:40 +00:00
scan-build $topdir/configure CFLAGS='-std=gnu99 -g -O0 -ftrapv' $args
scan-build make
else
cat <<EOF
----------------------------------------------------------------
Initialized build system. For a common configuration please run:
----------------------------------------------------------------
$topdir/configure CFLAGS='-g -O0 -ftrapv' $args
or run $0 with param:
- c: compilation
- g: debugging
- a: pure/const warning
- l: clang build
- s: scan-build reporting
EOF
fi