Configure, Android hints: Changes to allow native builds
authorBrian Fraser <fraserbn@gmail.com>
Mon, 13 Jan 2014 02:56:47 +0000 (23:56 -0300)
committerBrian Fraser <fraserbn@gmail.com>
Sun, 26 Jan 2014 17:44:21 +0000 (14:44 -0300)
Configure
hints/linux-android.sh

index a9bec78..71fa2d2 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -3391,6 +3391,7 @@ EOM
                        case "$3" in
                        *)      osvers="$3" ;;
                        esac
+                       $test -f /system/lib/libandroid.so && osname=linux-android
                        ;;
                MiNT)   osname=mint
                        ;;
index 58be201..ae031cb 100644 (file)
@@ -20,6 +20,12 @@ d_libname_unique='define'
 
 # On Android the shell is /system/bin/sh:
 targetsh='/system/bin/sh'
+case "$usecrosscompile" in
+define) ;;
+   # If we aren't cross-compiling, then sh should also point
+   # to /system/bin/sh.
+*) sh=$targetsh ;;
+esac
 
 # Make sure that we look for libm
 libswanted="$libswanted m"
@@ -244,9 +250,13 @@ $chmod a+rx $from
 
 fi # Cross-compiling with adb
 
+case "$usecrosscompile" in
+define)
 if $test "X$hostosname" = "Xdarwin"; then
   firstmakefile=GNUmakefile;
 fi
+;;
+esac
 
 osvers="`$run getprop ro.build.version.release`"