aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorTom Gall <tom.gall@linaro.org>2011-08-09 14:49:46 -0500
committerTom Gall <tom.gall@linaro.org>2011-08-09 14:49:46 -0500
commit4a72099711359606b1fc10c1744057a6c568d5d8 (patch)
tree9413089fe9922a1a0e23c4739bd87caf5f357877 /configure.ac
parent0c0e874b223e9ccc4a756c471f8792102b2d34a4 (diff)
Sync with mainline apply everything between 1.1.1 to 8/8/2011
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac95
1 files changed, 93 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 10d1880..44a3ac1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.56])
-AC_INIT([libjpeg-turbo], [1.1.1])
+AC_INIT([libjpeg-turbo], [1.1.90])
BUILD=`date +%Y%m%d`
AM_INIT_AUTOMAKE([-Wall foreign dist-bzip2])
@@ -16,6 +16,7 @@ SAVED_CFLAGS=${CFLAGS}
SAVED_CPPFLAGS=${CPPFLAGS}
AC_PROG_CPP
AC_PROG_CC
+AM_PROG_AS
AC_PROG_INSTALL
AC_PROG_LIBTOOL
AC_PROG_LN_S
@@ -196,6 +197,84 @@ AM_CONDITIONAL([WITH_ARITH_DEC], [test "x$with_arith_dec" != "xno"])
AM_CONDITIONAL([WITH_ARITH], [test "x$with_arith_dec" != "xno" -o "x$with_arith_enc" != "xno"])
+AC_ARG_VAR(JAVAC, [Java compiler command (default: javac)])
+if test "x$JAVAC" = "x"; then
+ JAVAC=javac
+fi
+AC_SUBST(JAVAC)
+AC_ARG_VAR(JAVACFLAGS, [Java compiler flags])
+AC_SUBST(JAVACFLAGS)
+AC_ARG_VAR(JAR, [Java archive command (default: jar)])
+if test "x$JAR" = "x"; then
+ JAR=jar
+fi
+AC_SUBST(JAR)
+AC_ARG_VAR(JAVA, [Java runtime command (default: java)])
+if test "x$JAVA" = "x"; then
+ JAVA=java
+fi
+AC_SUBST(JAVA)
+AC_ARG_VAR(JNI_CFLAGS, [C compiler flags needed to include jni.h (default: -I/System/Library/Frameworks/JavaVM.framework/Headers on OS X, '-I/usr/java/include -I/usr/java/include/solaris' on Solaris, and '-I/usr/java/default/include -I/usr/java/default/include/linux' on Linux)])
+
+AC_MSG_CHECKING([whether to build TurboJPEG/OSS Java wrapper])
+AC_ARG_WITH([java],
+ AC_HELP_STRING([--with-java],[Build Java wrapper for the TurboJPEG/OSS library]))
+
+RPM_CONFIG_ARGS=
+WITH_JAVA=0
+if test "x$with_java" = "xyes"; then
+ AC_MSG_RESULT(yes)
+
+ case $host_os in
+ darwin*)
+ DEFAULT_JNI_CFLAGS=-I/System/Library/Frameworks/JavaVM.framework/Headers
+ ;;
+ solaris*)
+ DEFAULT_JNI_CFLAGS='-I/usr/java/include -I/usr/java/include/solaris'
+ ;;
+ linux*)
+ DEFAULT_JNI_CFLAGS='-I/usr/java/default/include -I/usr/java/default/include/linux'
+ ;;
+ esac
+ if test "x$JNI_CFLAGS" = "x"; then
+ JNI_CFLAGS=$DEFAULT_JNI_CFLAGS
+ fi
+
+ SAVE_CPPFLAGS=${CPPFLAGS}
+ CPPFLAGS="${CPPFLAGS} ${JNI_CFLAGS}"
+ AC_CHECK_HEADERS([jni.h], [DUMMY=1],
+ [AC_MSG_ERROR([Could not find JNI header file])])
+ CPPFLAGS=${SAVE_CPPFLAGS}
+ AC_SUBST(JNI_CFLAGS)
+
+ RPM_CONFIG_ARGS=--with-java
+ JAVA_RPM_CONTENTS_1='%dir /opt/%{name}/classes'
+ JAVA_RPM_CONTENTS_2=/opt/%{name}/classes/turbojpeg.jar
+ WITH_JAVA=1
+else
+ AC_MSG_RESULT(no)
+fi
+AM_CONDITIONAL([WITH_JAVA], [test "x$with_java" = "xyes"])
+AC_SUBST(WITH_JAVA)
+AC_SUBST(JAVA_RPM_CONTENTS_1)
+AC_SUBST(JAVA_RPM_CONTENTS_2)
+AC_SUBST(RPM_CONFIG_ARGS)
+
+# optionally force using gas-preprocessor.pl for compatibility testing
+AC_ARG_WITH([gas-preprocessor],
+ AC_HELP_STRING([--with-gas-preprocessor],[Force using gas-preprocessor.pl on ARM.]))
+if test "x${with_gas_preprocessor}" = "xyes"; then
+ case $host_os in
+ darwin*)
+ CCAS="gas-preprocessor.pl -fix-unreq $CC"
+ ;;
+ *)
+ CCAS="gas-preprocessor.pl -no-fix-unreq $CC"
+ ;;
+ esac
+ AC_SUBST([CCAS])
+fi
+
# SIMD is optional
AC_ARG_WITH([simd],
AC_HELP_STRING([--without-simd],[Omit SIMD extensions.]))
@@ -213,6 +292,16 @@ if test "x${with_simd}" != "xno"; then
AC_PROG_NASM
simd_arch=i386
;;
+ arm*)
+ AC_MSG_RESULT([yes (arm)])
+ AC_MSG_CHECKING([if the assembler is GNU-compatible and can be used])
+ AC_CHECK_COMPATIBLE_ARM_ASSEMBLER_IFELSE(
+ [AC_MSG_RESULT([yes])
+ simd_arch=arm],
+ [AC_MSG_RESULT([no])
+ with_simd=no
+ AC_MSG_WARN([SIMD support can't be enabled. Performance will suffer.])])
+ ;;
*)
AC_MSG_RESULT([no ("$host_cpu")])
AC_MSG_WARN([SIMD support not available for this CPU. Performance will suffer.])
@@ -226,8 +315,10 @@ if test "x${with_simd}" != "xno"; then
fi
AM_CONDITIONAL([WITH_SIMD], [test "x$with_simd" != "xno"])
+AM_CONDITIONAL([WITH_SSE_FLOAT_DCT], [test "x$simd_arch" = "xx86_64" -o "x$simd_arch" = "xi386"])
AM_CONDITIONAL([SIMD_I386], [test "x$simd_arch" = "xi386"])
AM_CONDITIONAL([SIMD_X86_64], [test "x$simd_arch" = "xx86_64"])
+AM_CONDITIONAL([SIMD_ARM], [test "x$simd_arch" = "xarm"])
AM_CONDITIONAL([X86_64], [test "x$host_cpu" = "xx86_64" -o "x$host_cpu" = "xamd64"])
case "$host_cpu" in
@@ -255,7 +346,6 @@ AC_CONFIG_HEADERS([jconfig.h])
AC_CONFIG_FILES([pkgscripts/libjpeg-turbo.spec:release/libjpeg-turbo.spec.in])
AC_CONFIG_FILES([pkgscripts/makecygwinpkg:release/makecygwinpkg.in])
AC_CONFIG_FILES([pkgscripts/makedpkg:release/makedpkg.in])
-AC_CONFIG_FILES([pkgscripts/deb-control:release/deb-control.in])
AC_CONFIG_FILES([pkgscripts/makemacpkg:release/makemacpkg.in])
AC_CONFIG_FILES([pkgscripts/Description.plist:release/Description.plist.in])
AC_CONFIG_FILES([pkgscripts/Info.plist:release/Info.plist.in])
@@ -264,4 +354,5 @@ AC_CONFIG_FILES([pkgscripts/makesunpkg:release/makesunpkg.in])
AC_CONFIG_FILES([pkgscripts/pkginfo:release/pkginfo.in])
AC_CONFIG_FILES([libjpeg.map])
AC_CONFIG_FILES([Makefile simd/Makefile])
+AC_CONFIG_FILES([java/Makefile])
AC_OUTPUT