OSDN Git Service

Android: add makefile and config.h
[android-x86/external-alsa-lib.git] / gitcompile
index 0ff3a2d..41da25d 100755 (executable)
@@ -4,6 +4,8 @@ set -e
 
 bit32=
 modules=
+alisp=
+lto=
 if [ $# -ne 0 ]; then
   endloop=
   while [ -z "$endloop" ]; do
@@ -16,6 +18,18 @@ if [ $# -ne 0 ]; then
       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
       ;;
@@ -48,7 +62,15 @@ fi
 
 if [ "$modules" = "yes" ]; then
   args="$args --enable-mixer-modules"
-  args="$args --enable-mixer-pymodules"
+  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
@@ -58,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