libjpeg should #define __ARM_HAVE_NEON.

Bug: 18556103
Change-Id: Ifcedc68c4625b07a1bb494085842003f35bacdd4
diff --git a/Android.mk b/Android.mk
index a53d907..db87e77 100644
--- a/Android.mk
+++ b/Android.mk
@@ -11,7 +11,9 @@
     jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \
     jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \
     jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
-    jquant2.c jutils.c jmemmgr.c armv6_idct.S
+    jquant2.c jutils.c jmemmgr.c
+
+LOCAL_SRC_FILES_arm += armv6_idct.S
 
 # jsimd_arm_neon.S does not compile with clang.
 LOCAL_CLANG_ASFLAGS_arm += -no-integrated-as
@@ -46,7 +48,7 @@
 ifeq ($(strip $(TARGET_ARCH)),arm)
   ifeq ($(ARCH_ARM_HAVE_NEON),true)
     #use NEON accelerations
-    LOCAL_CFLAGS += -DNV_ARM_NEON
+    LOCAL_CFLAGS += -DNV_ARM_NEON -D__ARM_HAVE_NEON
     LOCAL_SRC_FILES += \
         jsimd_arm_neon.S \
         jsimd_neon.c
diff --git a/armv6_idct.S b/armv6_idct.S
index 18e4e8a..843c2dd 100644
--- a/armv6_idct.S
+++ b/armv6_idct.S
@@ -59,12 +59,6 @@
  * this might be futher improved using a system profiler.
  */
 
-#ifdef __arm__
-#include <machine/cpu-features.h>
-#endif
-
-#if __ARM_ARCH__ >= 6
-
 // void armv6_idct(short *coefs, int *quans, unsigned char *rows, int col)
     .arm
     .text
@@ -362,5 +356,3 @@
     ldmia   sp!, {r4, r5, r6, r7, r8, r9, r10, r11, r12, r14}
     bx      lr
     .endfunc
-
-#endif
diff --git a/jddctmgr.c b/jddctmgr.c
index 980f8f3..6d7567b 100644
--- a/jddctmgr.c
+++ b/jddctmgr.c
@@ -20,18 +20,6 @@
 #include "jpeglib.h"
 #include "jdct.h"		/* Private declarations for DCT subsystem */
 
-#ifdef ANDROID_ARMV6_IDCT
-  #undef ANDROID_ARMV6_IDCT
-  #ifdef __arm__
-    #include <machine/cpu-features.h>
-    #if __ARM_ARCH__ >= 6
-      #define ANDROID_ARMV6_IDCT
-    #else
-      #warning "ANDROID_ARMV6_IDCT is disabled"
-    #endif
-  #endif
-#endif
-
 #ifdef NV_ARM_NEON
 #include "jsimd_neon.h"
 #endif
diff --git a/jsimd_neon.c b/jsimd_neon.c
index 6ad1bd3..3c23b82 100644
--- a/jsimd_neon.c
+++ b/jsimd_neon.c
@@ -29,7 +29,6 @@
 #include "jinclude.h"
 #include "jpeglib.h"
 #include "jdct.h"
-#include <machine/cpu-features.h>
 
 
 #if defined(NV_ARM_NEON) && defined(__ARM_HAVE_NEON)
diff --git a/jsimd_neon.h b/jsimd_neon.h
index 24320aa..f02bd68 100644
--- a/jsimd_neon.h
+++ b/jsimd_neon.h
@@ -29,7 +29,6 @@
 #define __JSIMD_NEON_H__
 #include "jinclude.h"
 #include "jpeglib.h"
-#include <machine/cpu-features.h>
 
 #if defined(NV_ARM_NEON) && defined(__ARM_HAVE_NEON)