OSDN Git Service

pcm: remove extra NULL checks in snd_pcm_dsnoop_open()
[android-x86/external-alsa-lib.git] / gitcompile
index 0b60aed..41da25d 100755 (executable)
@@ -3,9 +3,38 @@
 set -e
 
 bit32=
-if [ $# -ne 0 -a "$1" == "32" ]; then
-  bit32=yes
-  echo "Forced 32-bit library build..."
+modules=
+alisp=
+lto=
+if [ $# -ne 0 ]; then
+  endloop=
+  while [ -z "$endloop" ]; do
+    case "$1" in
+    32)
+      bits32=yes
+      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 ;;
+    *)
+      endloop=yes
+      ;;
+    esac
+  done
 fi
 if [ $# -ne 0 -a -z "$bit32" ]; then
   args="$@"
@@ -30,7 +59,20 @@ else
   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
+
 touch ltconfig
 libtoolize --force --copy --automake
 aclocal $ACLOCAL_FLAGS
@@ -38,7 +80,11 @@ autoheader
 automake --foreign --copy --add-missing
 touch depcomp          # seems to be missing for old automake
 autoconf
-export CFLAGS='-O2 -Wall -W -pipe -g'
+export CFLAGS="-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