Merge branch 'master' of ssh://brick.kernel.dk/data/git/fio
[fio.git] / configure
index 87cc1cff8fa1f3691d16d7474753758d975cd2e3..8125fc3ccfb685ae0f8149b191a079121adfbc81 100755 (executable)
--- a/configure
+++ b/configure
@@ -161,7 +161,9 @@ if test "$show_help" = "yes" ; then
   exit $exit_val
 fi
 
-if check_define __linux__ ; then
+if check_define __ANDROID__ ; then
+  targetos="Android"
+elif check_define __linux__ ; then
   targetos="Linux"
 elif check_define __OpenBSD__ ; then
   targetos='OpenBSD'
@@ -222,6 +224,17 @@ CYGWIN*)
   echo "CC=$CC" >> $config_host_mak
   echo "EXTFLAGS=$CFLAGS -include config-host.h -D_GNU_SOURCE" >> $config_host_mak
   exit 0
+  ;;
+Android)
+  output_sym "CONFIG_32BIT"
+  output_sym "CONFIG_LITTLE_ENDIAN"
+  output_sym "CONFIG_SOCKLEN_T"
+  output_sym "CONFIG_GETTIMEOFDAY"
+  output_sym "CONFIG_CLOCK_GETTIME"
+  output_sym "CONFIG_CLOCK_MONOTONIC"
+  echo "CC=$cc" >> $config_host_mak
+  echo "EXTFLAGS=$CFLAGS -include config-host.h -DFIO_NO_HAVE_SHM_H -D_GNU_SOURCE" >> $config_host_mak
+  exit 0
 esac
 
 if test ! -z "$cpu" ; then
@@ -336,7 +349,7 @@ int main(void)
 }
 EOF
 if compile_prog "" "" "wordsize"; then
-  wordsize=$($TMPE)
+  wordsize=`$TMPE`
 fi
 echo "Wordsize                      $wordsize"