Constantin Kaplinsky | 0ca4425 | 2008-09-28 05:08:48 +0000 | [diff] [blame] | 1 | # -*- Autoconf -*- |
| 2 | # Process this file with autoconf to produce a configure script. |
| 3 | |
DRC | bf0fab9 | 2010-02-12 22:22:01 +0000 | [diff] [blame] | 4 | AC_PREREQ([2.56]) |
DRC | 17745dd | 2013-04-25 09:45:50 +0000 | [diff] [blame] | 5 | AC_INIT([libjpeg-turbo], [1.3.80]) |
DRC | 079b434 | 2010-02-15 11:32:23 +0000 | [diff] [blame] | 6 | BUILD=`date +%Y%m%d` |
Constantin Kaplinsky | 0ca4425 | 2008-09-28 05:08:48 +0000 | [diff] [blame] | 7 | |
| 8 | AM_INIT_AUTOMAKE([-Wall foreign dist-bzip2]) |
DRC | 8ff1f25 | 2010-02-15 11:08:57 +0000 | [diff] [blame] | 9 | AC_PREFIX_DEFAULT(/opt/libjpeg-turbo) |
Constantin Kaplinsky | 0ca4425 | 2008-09-28 05:08:48 +0000 | [diff] [blame] | 10 | |
DRC | c7e10b2 | 2014-03-21 08:36:06 +0000 | [diff] [blame] | 11 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) |
| 12 | |
Constantin Kaplinsky | 0ca4425 | 2008-09-28 05:08:48 +0000 | [diff] [blame] | 13 | # Checks for programs. |
DRC | e7b699d | 2010-02-14 07:39:07 +0000 | [diff] [blame] | 14 | SAVED_CFLAGS=${CFLAGS} |
DRC | b4a50ce | 2011-02-26 21:07:50 +0000 | [diff] [blame] | 15 | SAVED_CPPFLAGS=${CPPFLAGS} |
Pierre Ossman | 2ae181c | 2009-03-09 13:21:27 +0000 | [diff] [blame] | 16 | AC_PROG_CPP |
Constantin Kaplinsky | 0ca4425 | 2008-09-28 05:08:48 +0000 | [diff] [blame] | 17 | AC_PROG_CC |
DRC | 6f75a35 | 2014-02-20 19:33:44 +0000 | [diff] [blame] | 18 | m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) |
DRC | 321e068 | 2011-05-03 08:47:43 +0000 | [diff] [blame] | 19 | AM_PROG_AS |
DRC | c56cb47 | 2014-02-15 07:02:04 +0000 | [diff] [blame] | 20 | AM_PROG_CC_C_O |
Constantin Kaplinsky | 0ca4425 | 2008-09-28 05:08:48 +0000 | [diff] [blame] | 21 | AC_PROG_INSTALL |
| 22 | AC_PROG_LIBTOOL |
| 23 | AC_PROG_LN_S |
| 24 | |
DRC | 764e1e2 | 2013-04-19 04:25:14 +0000 | [diff] [blame] | 25 | # When the prefix is /opt/libjpeg-turbo, we assume that an "official" binary is |
| 26 | # being created, and thus we install things into specific locations. |
| 27 | |
| 28 | old_prefix=${prefix} |
| 29 | if test "x$prefix" = "xNONE" -a "x$ac_default_prefix" != "x"; then |
| 30 | prefix=$ac_default_prefix |
| 31 | fi |
| 32 | DATADIR=`eval echo ${datadir}` |
| 33 | DATADIR=`eval echo $DATADIR` |
| 34 | if test "$DATADIR" = "/opt/libjpeg-turbo/share"; then |
| 35 | datadir='${prefix}' |
| 36 | fi |
DRC | 7175e51 | 2013-04-23 22:29:00 +0000 | [diff] [blame] | 37 | DATADIR=`eval echo ${datarootdir}` |
| 38 | DATADIR=`eval echo $DATADIR` |
| 39 | if test "$DATADIR" = "/opt/libjpeg-turbo/share"; then |
| 40 | datarootdir='${prefix}' |
| 41 | fi |
DRC | 764e1e2 | 2013-04-19 04:25:14 +0000 | [diff] [blame] | 42 | |
| 43 | old_exec_prefix=${exec_prefix} |
| 44 | if test "x$exec_prefix" = "xNONE"; then |
| 45 | exec_prefix=${prefix} |
| 46 | fi |
| 47 | |
| 48 | if test "x${libdir}" = 'x${exec_prefix}/lib' -o "x${libdir}" = 'x${prefix}/lib'; then |
| 49 | LIBDIR=`eval echo ${libdir}` |
| 50 | LIBDIR=`eval echo $LIBDIR` |
| 51 | if test "$LIBDIR" = "/opt/libjpeg-turbo/lib"; then |
| 52 | case $host_os in |
| 53 | darwin*) |
| 54 | ;; |
| 55 | *) |
DRC | c32e0c2 | 2013-08-11 22:57:19 +0000 | [diff] [blame] | 56 | AC_CHECK_SIZEOF(long) |
| 57 | if test "${ac_cv_sizeof_long}" = "8"; then |
| 58 | libdir='${exec_prefix}/lib64' |
| 59 | elif test "${ac_cv_sizeof_long}" = "4"; then |
| 60 | libdir='${exec_prefix}/lib32' |
| 61 | fi |
DRC | 764e1e2 | 2013-04-19 04:25:14 +0000 | [diff] [blame] | 62 | ;; |
| 63 | esac |
| 64 | fi |
| 65 | fi |
| 66 | exec_prefix=${old_exec_prefix} |
| 67 | prefix=${old_prefix} |
| 68 | |
DRC | bdb1288 | 2010-08-21 21:14:17 +0000 | [diff] [blame] | 69 | # Check whether compiler supports pointers to undefined structures |
| 70 | AC_MSG_CHECKING(whether compiler supports pointers to undefined structures) |
| 71 | AC_TRY_COMPILE([ typedef struct undefined_structure * undef_struct_ptr; ], , |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 72 | AC_MSG_RESULT(yes), |
| 73 | [AC_MSG_RESULT(no) |
| 74 | AC_DEFINE([INCOMPLETE_TYPES_BROKEN], [1], |
| 75 | [Compiler does not support pointers to undefined structures.])]) |
DRC | bdb1288 | 2010-08-21 21:14:17 +0000 | [diff] [blame] | 76 | |
DRC | e7b699d | 2010-02-14 07:39:07 +0000 | [diff] [blame] | 77 | if test "x${GCC}" = "xyes"; then |
| 78 | if test "x${SAVED_CFLAGS}" = "x"; then |
| 79 | CFLAGS=-O3 |
| 80 | fi |
DRC | b4a50ce | 2011-02-26 21:07:50 +0000 | [diff] [blame] | 81 | if test "x${SAVED_CPPFLAGS}" = "x"; then |
| 82 | CPPFLAGS=-Wall |
| 83 | fi |
DRC | e7b699d | 2010-02-14 07:39:07 +0000 | [diff] [blame] | 84 | fi |
| 85 | |
DRC | 1e2f298 | 2010-02-16 22:35:25 +0000 | [diff] [blame] | 86 | AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) |
| 87 | if test "x${SUNCC}" = "xyes"; then |
| 88 | if test "x${SAVED_CFLAGS}" = "x"; then |
| 89 | CFLAGS=-xO5 |
| 90 | fi |
DRC | 1e2f298 | 2010-02-16 22:35:25 +0000 | [diff] [blame] | 91 | fi |
| 92 | |
Constantin Kaplinsky | 0ca4425 | 2008-09-28 05:08:48 +0000 | [diff] [blame] | 93 | # Checks for libraries. |
| 94 | |
| 95 | # Checks for header files. |
| 96 | AC_HEADER_STDC |
DRC | ff6961f | 2014-04-20 09:17:11 +0000 | [diff] [blame] | 97 | AC_CHECK_HEADERS([stddef.h stdlib.h locale.h string.h]) |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 98 | AC_CHECK_HEADER([sys/types.h], |
DRC | ff6961f | 2014-04-20 09:17:11 +0000 | [diff] [blame] | 99 | AC_DEFINE([NEED_SYS_TYPES_H], 1, [Define if you need to include <sys/types.h> to get size_t.])) |
Constantin Kaplinsky | 0ca4425 | 2008-09-28 05:08:48 +0000 | [diff] [blame] | 100 | |
| 101 | # Checks for typedefs, structures, and compiler characteristics. |
| 102 | AC_C_CONST |
| 103 | AC_C_CHAR_UNSIGNED |
| 104 | AC_C_INLINE |
| 105 | AC_TYPE_SIZE_T |
| 106 | AC_CHECK_TYPES([unsigned char, unsigned short]) |
| 107 | |
| 108 | AC_MSG_CHECKING([if right shift is signed]) |
| 109 | AC_TRY_RUN( |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 110 | [#include <stdio.h> |
| 111 | int is_shifting_signed (long arg) { |
| 112 | long res = arg >> 4; |
Constantin Kaplinsky | 0ca4425 | 2008-09-28 05:08:48 +0000 | [diff] [blame] | 113 | |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 114 | if (res == -0x7F7E80CL) |
| 115 | return 1; /* right shift is signed */ |
Constantin Kaplinsky | 0ca4425 | 2008-09-28 05:08:48 +0000 | [diff] [blame] | 116 | |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 117 | /* see if unsigned-shift hack will fix it. */ |
| 118 | /* we can't just test exact value since it depends on width of long... */ |
| 119 | res |= (~0L) << (32-4); |
| 120 | if (res == -0x7F7E80CL) |
| 121 | return 0; /* right shift is unsigned */ |
Constantin Kaplinsky | 0ca4425 | 2008-09-28 05:08:48 +0000 | [diff] [blame] | 122 | |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 123 | printf("Right shift isn't acting as I expect it to.\n"); |
| 124 | printf("I fear the JPEG software will not work at all.\n\n"); |
| 125 | return 0; /* try it with unsigned anyway */ |
| 126 | } |
| 127 | int main (void) { |
| 128 | exit(is_shifting_signed(-0x7F7E80B1L)); |
| 129 | }], |
| 130 | [AC_MSG_RESULT(no) |
DRC | ff6961f | 2014-04-20 09:17:11 +0000 | [diff] [blame] | 131 | AC_DEFINE([RIGHT_SHIFT_IS_UNSIGNED], 1, |
| 132 | [Define if your (broken) compiler shifts signed values as if they were unsigned.])], |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 133 | [AC_MSG_RESULT(yes)], |
| 134 | [AC_MSG_RESULT(Assuming that right shift is signed on target machine.)]) |
Constantin Kaplinsky | 0ca4425 | 2008-09-28 05:08:48 +0000 | [diff] [blame] | 135 | |
Constantin Kaplinsky | 0ca4425 | 2008-09-28 05:08:48 +0000 | [diff] [blame] | 136 | # Checks for library functions. |
Constantin Kaplinsky | 0ca4425 | 2008-09-28 05:08:48 +0000 | [diff] [blame] | 137 | AC_CHECK_FUNCS([memset memcpy], [], |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 138 | [AC_DEFINE([NEED_BSD_STRINGS], 1, |
DRC | ff6961f | 2014-04-20 09:17:11 +0000 | [diff] [blame] | 139 | [Define if you have BSD-like bzero and bcopy in <strings.h> rather than memset/memcpy in <string.h>.])]) |
Constantin Kaplinsky | 0ca4425 | 2008-09-28 05:08:48 +0000 | [diff] [blame] | 140 | |
DRC | 1f80a10 | 2010-10-18 00:15:31 +0000 | [diff] [blame] | 141 | AC_MSG_CHECKING([libjpeg API version]) |
| 142 | AC_ARG_VAR(JPEG_LIB_VERSION, [libjpeg API version (62, 70, or 80)]) |
| 143 | if test "x$JPEG_LIB_VERSION" = "x"; then |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 144 | AC_ARG_WITH([jpeg7], |
| 145 | AC_HELP_STRING([--with-jpeg7], |
| 146 | [Emulate libjpeg v7 API/ABI (this makes libjpeg-turbo backward incompatible with libjpeg v6b.)])) |
| 147 | AC_ARG_WITH([jpeg8], |
| 148 | AC_HELP_STRING([--with-jpeg8], |
| 149 | [Emulate libjpeg v8 API/ABI (this makes libjpeg-turbo backward incompatible with libjpeg v6b.)])) |
| 150 | if test "x${with_jpeg8}" = "xyes"; then |
| 151 | JPEG_LIB_VERSION=80 |
| 152 | else |
| 153 | if test "x${with_jpeg7}" = "xyes"; then |
| 154 | JPEG_LIB_VERSION=70 |
DRC | 36a6eec | 2010-10-08 08:05:44 +0000 | [diff] [blame] | 155 | else |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 156 | JPEG_LIB_VERSION=62 |
DRC | 36a6eec | 2010-10-08 08:05:44 +0000 | [diff] [blame] | 157 | fi |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 158 | fi |
DRC | 36a6eec | 2010-10-08 08:05:44 +0000 | [diff] [blame] | 159 | fi |
DRC | 1f80a10 | 2010-10-18 00:15:31 +0000 | [diff] [blame] | 160 | JPEG_LIB_VERSION_DECIMAL=`expr $JPEG_LIB_VERSION / 10`.`expr $JPEG_LIB_VERSION % 10` |
DRC | 8515d3d | 2010-10-19 06:38:57 +0000 | [diff] [blame] | 161 | AC_SUBST(JPEG_LIB_VERSION_DECIMAL) |
DRC | 1f80a10 | 2010-10-18 00:15:31 +0000 | [diff] [blame] | 162 | AC_MSG_RESULT([$JPEG_LIB_VERSION_DECIMAL]) |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 163 | AC_DEFINE_UNQUOTED(JPEG_LIB_VERSION, [$JPEG_LIB_VERSION], |
| 164 | [libjpeg API version]) |
DRC | 1f80a10 | 2010-10-18 00:15:31 +0000 | [diff] [blame] | 165 | |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 166 | AC_ARG_VAR(SO_MAJOR_VERSION, |
| 167 | [Major version of the libjpeg-turbo shared library (default is determined by the API version)]) |
| 168 | AC_ARG_VAR(SO_MINOR_VERSION, |
| 169 | [Minor version of the libjpeg-turbo shared library (default is determined by the API version)]) |
DRC | 1f80a10 | 2010-10-18 00:15:31 +0000 | [diff] [blame] | 170 | if test "x$SO_MAJOR_VERSION" = "x"; then |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 171 | case "$JPEG_LIB_VERSION" in |
| 172 | 62) SO_MAJOR_VERSION=$JPEG_LIB_VERSION ;; |
| 173 | *) SO_MAJOR_VERSION=`expr $JPEG_LIB_VERSION / 10` ;; |
| 174 | esac |
DRC | 1f80a10 | 2010-10-18 00:15:31 +0000 | [diff] [blame] | 175 | fi |
| 176 | if test "x$SO_MINOR_VERSION" = "x"; then |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 177 | case "$JPEG_LIB_VERSION" in |
| 178 | 80) SO_MINOR_VERSION=2 ;; |
| 179 | *) SO_MINOR_VERSION=0 ;; |
| 180 | esac |
DRC | 1f80a10 | 2010-10-18 00:15:31 +0000 | [diff] [blame] | 181 | fi |
DRC | ab70623 | 2013-01-18 23:42:31 +0000 | [diff] [blame] | 182 | |
DRC | 6da61db | 2013-01-19 01:06:46 +0000 | [diff] [blame] | 183 | RPM_CONFIG_ARGS= |
| 184 | |
DRC | ab70623 | 2013-01-18 23:42:31 +0000 | [diff] [blame] | 185 | # Memory source/destination managers |
| 186 | SO_AGE=0 |
| 187 | MEM_SRCDST_FUNCTIONS= |
| 188 | if test "x${with_jpeg8}" != "xyes"; then |
| 189 | AC_MSG_CHECKING([whether to include in-memory source/destination managers]) |
| 190 | AC_ARG_WITH([mem-srcdst], |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 191 | AC_HELP_STRING([--without-mem-srcdst], |
| 192 | [Do not include in-memory source/destination manager functions when emulating the libjpeg v6b or v7 API/ABI])) |
DRC | ab70623 | 2013-01-18 23:42:31 +0000 | [diff] [blame] | 193 | if test "x$with_mem_srcdst" != "xno"; then |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 194 | AC_MSG_RESULT(yes) |
| 195 | AC_DEFINE([MEM_SRCDST_SUPPORTED], [1], |
| 196 | [Support in-memory source/destination managers]) |
| 197 | SO_AGE=1 |
| 198 | MEM_SRCDST_FUNCTIONS="global: jpeg_mem_dest; jpeg_mem_src;"; |
DRC | ab70623 | 2013-01-18 23:42:31 +0000 | [diff] [blame] | 199 | else |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 200 | AC_MSG_RESULT(no) |
| 201 | RPM_CONFIG_ARGS="$RPM_CONFIG_ARGS --without-mem-srcdst" |
DRC | ab70623 | 2013-01-18 23:42:31 +0000 | [diff] [blame] | 202 | fi |
| 203 | fi |
| 204 | |
| 205 | AC_MSG_CHECKING([libjpeg shared library version]) |
| 206 | AC_MSG_RESULT([$SO_MAJOR_VERSION.$SO_AGE.$SO_MINOR_VERSION]) |
DRC | 6da61db | 2013-01-19 01:06:46 +0000 | [diff] [blame] | 207 | LIBTOOL_CURRENT=`expr $SO_MAJOR_VERSION + $SO_AGE` |
| 208 | AC_SUBST(LIBTOOL_CURRENT) |
DRC | 1f80a10 | 2010-10-18 00:15:31 +0000 | [diff] [blame] | 209 | AC_SUBST(SO_MAJOR_VERSION) |
| 210 | AC_SUBST(SO_MINOR_VERSION) |
DRC | ab70623 | 2013-01-18 23:42:31 +0000 | [diff] [blame] | 211 | AC_SUBST(SO_AGE) |
| 212 | AC_SUBST(MEM_SRCDST_FUNCTIONS) |
DRC | 36a6eec | 2010-10-08 08:05:44 +0000 | [diff] [blame] | 213 | |
DRC | ab64b62 | 2011-12-18 16:29:35 +0000 | [diff] [blame] | 214 | AC_DEFINE_UNQUOTED(LIBJPEG_TURBO_VERSION, [$VERSION], [libjpeg-turbo version]) |
| 215 | |
DRC | 7a0478e | 2010-11-07 19:12:30 +0000 | [diff] [blame] | 216 | VERSION_SCRIPT=yes |
| 217 | AC_ARG_ENABLE([ld-version-script], |
| 218 | AS_HELP_STRING([--disable-ld-version-script], |
| 219 | [Disable linker version script for libjpeg-turbo (default is to use linker version script if the linker supports it)]), |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 220 | [VERSION_SCRIPT=$enableval], []) |
DRC | 8515d3d | 2010-10-19 06:38:57 +0000 | [diff] [blame] | 221 | |
| 222 | AC_MSG_CHECKING([whether the linker supports version scripts]) |
| 223 | SAVED_LDFLAGS="$LDFLAGS" |
| 224 | LDFLAGS="$LDFLAGS -Wl,--version-script,conftest.map" |
| 225 | cat > conftest.map <<EOF |
| 226 | VERS_1 { |
| 227 | global: *; |
| 228 | }; |
| 229 | EOF |
DRC | c56cb47 | 2014-02-15 07:02:04 +0000 | [diff] [blame] | 230 | AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 231 | [VERSION_SCRIPT_FLAG=-Wl,--version-script,; |
| 232 | AC_MSG_RESULT([yes (GNU style)])], |
| 233 | []) |
DRC | 8515d3d | 2010-10-19 06:38:57 +0000 | [diff] [blame] | 234 | if test "x$VERSION_SCRIPT_FLAG" = "x"; then |
| 235 | LDFLAGS="$SAVED_LDFLAGS -Wl,-M,conftest.map" |
DRC | c56cb47 | 2014-02-15 07:02:04 +0000 | [diff] [blame] | 236 | AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 237 | [VERSION_SCRIPT_FLAG=-Wl,-M,; |
| 238 | AC_MSG_RESULT([yes (Sun style)])], |
| 239 | []) |
DRC | 8515d3d | 2010-10-19 06:38:57 +0000 | [diff] [blame] | 240 | fi |
| 241 | if test "x$VERSION_SCRIPT_FLAG" = "x"; then |
| 242 | VERSION_SCRIPT=no |
| 243 | AC_MSG_RESULT(no) |
| 244 | fi |
DRC | 8515d3d | 2010-10-19 06:38:57 +0000 | [diff] [blame] | 245 | LDFLAGS="$SAVED_LDFLAGS" |
| 246 | |
DRC | 9fa9559 | 2011-02-25 00:23:44 +0000 | [diff] [blame] | 247 | AC_MSG_CHECKING([whether to use version script when building libjpeg-turbo]) |
DRC | 8515d3d | 2010-10-19 06:38:57 +0000 | [diff] [blame] | 248 | AC_MSG_RESULT($VERSION_SCRIPT) |
| 249 | |
| 250 | AM_CONDITIONAL(VERSION_SCRIPT, test "x$VERSION_SCRIPT" = "xyes") |
DRC | 8515d3d | 2010-10-19 06:38:57 +0000 | [diff] [blame] | 251 | AC_SUBST(VERSION_SCRIPT_FLAG) |
DRC | 8515d3d | 2010-10-19 06:38:57 +0000 | [diff] [blame] | 252 | |
DRC | b4570bb | 2011-09-07 06:31:00 +0000 | [diff] [blame] | 253 | # Check for non-broken inline under various spellings |
| 254 | AC_MSG_CHECKING(for inline) |
| 255 | ljt_cv_inline="" |
DRC | ff6961f | 2014-04-20 09:17:11 +0000 | [diff] [blame] | 256 | AC_TRY_COMPILE(, [} inline __attribute__((always_inline)) int foo() { return 0; } |
DRC | ad64b5a | 2014-03-21 09:22:21 +0000 | [diff] [blame] | 257 | int bar() { return foo();], ljt_cv_inline="inline __attribute__((always_inline))", |
DRC | b4570bb | 2011-09-07 06:31:00 +0000 | [diff] [blame] | 258 | AC_TRY_COMPILE(, [} __inline__ int foo() { return 0; } |
| 259 | int bar() { return foo();], ljt_cv_inline="__inline__", |
| 260 | AC_TRY_COMPILE(, [} __inline int foo() { return 0; } |
| 261 | int bar() { return foo();], ljt_cv_inline="__inline", |
| 262 | AC_TRY_COMPILE(, [} inline int foo() { return 0; } |
| 263 | int bar() { return foo();], ljt_cv_inline="inline")))) |
| 264 | AC_MSG_RESULT($ljt_cv_inline) |
| 265 | AC_DEFINE_UNQUOTED([INLINE],[$ljt_cv_inline],[How to obtain function inlining.]) |
| 266 | |
DRC | 211d1e7 | 2013-01-13 11:25:20 +0000 | [diff] [blame] | 267 | # Arithmetic coding support |
DRC | 990e28d | 2011-01-04 21:40:11 +0000 | [diff] [blame] | 268 | AC_MSG_CHECKING([whether to include arithmetic encoding support]) |
DRC | e372004 | 2010-11-23 06:50:14 +0000 | [diff] [blame] | 269 | AC_ARG_WITH([arith-enc], |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 270 | AC_HELP_STRING([--without-arith-enc], |
| 271 | [Do not include arithmetic encoding support])) |
DRC | e372004 | 2010-11-23 06:50:14 +0000 | [diff] [blame] | 272 | if test "x$with_arith_enc" = "xno"; then |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 273 | AC_MSG_RESULT(no) |
| 274 | RPM_CONFIG_ARGS="$RPM_CONFIG_ARGS --without-arith-enc" |
DRC | e372004 | 2010-11-23 06:50:14 +0000 | [diff] [blame] | 275 | else |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 276 | AC_DEFINE([C_ARITH_CODING_SUPPORTED], [1], [Support arithmetic encoding]) |
| 277 | AC_MSG_RESULT(yes) |
DRC | e372004 | 2010-11-23 06:50:14 +0000 | [diff] [blame] | 278 | fi |
| 279 | AM_CONDITIONAL([WITH_ARITH_ENC], [test "x$with_arith_enc" != "xno"]) |
| 280 | |
DRC | 990e28d | 2011-01-04 21:40:11 +0000 | [diff] [blame] | 281 | AC_MSG_CHECKING([whether to include arithmetic decoding support]) |
DRC | e372004 | 2010-11-23 06:50:14 +0000 | [diff] [blame] | 282 | AC_ARG_WITH([arith-dec], |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 283 | AC_HELP_STRING([--without-arith-dec], |
| 284 | [Do not include arithmetic decoding support])) |
DRC | e372004 | 2010-11-23 06:50:14 +0000 | [diff] [blame] | 285 | if test "x$with_arith_dec" = "xno"; then |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 286 | AC_MSG_RESULT(no) |
| 287 | RPM_CONFIG_ARGS="$RPM_CONFIG_ARGS --without-arith-dec" |
DRC | e372004 | 2010-11-23 06:50:14 +0000 | [diff] [blame] | 288 | else |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 289 | AC_DEFINE([D_ARITH_CODING_SUPPORTED], [1], [Support arithmetic decoding]) |
| 290 | AC_MSG_RESULT(yes) |
DRC | e372004 | 2010-11-23 06:50:14 +0000 | [diff] [blame] | 291 | fi |
| 292 | AM_CONDITIONAL([WITH_ARITH_DEC], [test "x$with_arith_dec" != "xno"]) |
| 293 | |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 294 | AM_CONDITIONAL([WITH_ARITH], |
| 295 | [test "x$with_arith_dec" != "xno" -o "x$with_arith_enc" != "xno"]) |
DRC | e372004 | 2010-11-23 06:50:14 +0000 | [diff] [blame] | 296 | |
DRC | 211d1e7 | 2013-01-13 11:25:20 +0000 | [diff] [blame] | 297 | # TurboJPEG support |
DRC | 5039d73 | 2013-01-21 23:42:12 +0000 | [diff] [blame] | 298 | AC_MSG_CHECKING([whether to build TurboJPEG C wrapper]) |
DRC | 211d1e7 | 2013-01-13 11:25:20 +0000 | [diff] [blame] | 299 | AC_ARG_WITH([turbojpeg], |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 300 | AC_HELP_STRING([--without-turbojpeg], |
| 301 | [Do not include the TurboJPEG wrapper library and associated test programs])) |
DRC | 211d1e7 | 2013-01-13 11:25:20 +0000 | [diff] [blame] | 302 | if test "x$with_turbojpeg" = "xno"; then |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 303 | AC_MSG_RESULT(no) |
| 304 | RPM_CONFIG_ARGS="$RPM_CONFIG_ARGS --without-turbojpeg" |
DRC | 211d1e7 | 2013-01-13 11:25:20 +0000 | [diff] [blame] | 305 | else |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 306 | AC_MSG_RESULT(yes) |
DRC | 211d1e7 | 2013-01-13 11:25:20 +0000 | [diff] [blame] | 307 | fi |
| 308 | |
| 309 | # Java support |
DRC | f2602ce | 2011-04-01 00:20:33 +0000 | [diff] [blame] | 310 | AC_ARG_VAR(JAVAC, [Java compiler command (default: javac)]) |
| 311 | if test "x$JAVAC" = "x"; then |
| 312 | JAVAC=javac |
| 313 | fi |
| 314 | AC_SUBST(JAVAC) |
| 315 | AC_ARG_VAR(JAVACFLAGS, [Java compiler flags]) |
| 316 | AC_SUBST(JAVACFLAGS) |
| 317 | AC_ARG_VAR(JAR, [Java archive command (default: jar)]) |
| 318 | if test "x$JAR" = "x"; then |
| 319 | JAR=jar |
| 320 | fi |
| 321 | AC_SUBST(JAR) |
| 322 | AC_ARG_VAR(JAVA, [Java runtime command (default: java)]) |
| 323 | if test "x$JAVA" = "x"; then |
| 324 | JAVA=java |
| 325 | fi |
| 326 | AC_SUBST(JAVA) |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 327 | AC_ARG_VAR(JNI_CFLAGS, |
| 328 | [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)]) |
DRC | 063ab49 | 2011-02-04 22:16:41 +0000 | [diff] [blame] | 329 | |
DRC | 5039d73 | 2013-01-21 23:42:12 +0000 | [diff] [blame] | 330 | AC_MSG_CHECKING([whether to build TurboJPEG Java wrapper]) |
DRC | f2602ce | 2011-04-01 00:20:33 +0000 | [diff] [blame] | 331 | AC_ARG_WITH([java], |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 332 | AC_HELP_STRING([--with-java], [Build Java wrapper for the TurboJPEG library])) |
DRC | 211d1e7 | 2013-01-13 11:25:20 +0000 | [diff] [blame] | 333 | if test "x$with_turbojpeg" = "xno"; then |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 334 | with_java=no |
DRC | 211d1e7 | 2013-01-13 11:25:20 +0000 | [diff] [blame] | 335 | fi |
DRC | 1421a26 | 2011-02-06 15:35:38 +0000 | [diff] [blame] | 336 | |
DRC | f2602ce | 2011-04-01 00:20:33 +0000 | [diff] [blame] | 337 | WITH_JAVA=0 |
| 338 | if test "x$with_java" = "xyes"; then |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 339 | AC_MSG_RESULT(yes) |
DRC | 1421a26 | 2011-02-06 15:35:38 +0000 | [diff] [blame] | 340 | |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 341 | case $host_os in |
| 342 | darwin*) |
| 343 | DEFAULT_JNI_CFLAGS=-I/System/Library/Frameworks/JavaVM.framework/Headers |
| 344 | ;; |
| 345 | solaris*) |
| 346 | DEFAULT_JNI_CFLAGS='-I/usr/java/include -I/usr/java/include/solaris' |
| 347 | ;; |
| 348 | linux*) |
| 349 | DEFAULT_JNI_CFLAGS='-I/usr/java/default/include -I/usr/java/default/include/linux' |
| 350 | ;; |
| 351 | esac |
| 352 | if test "x$JNI_CFLAGS" = "x"; then |
| 353 | JNI_CFLAGS=$DEFAULT_JNI_CFLAGS |
| 354 | fi |
DRC | 1421a26 | 2011-02-06 15:35:38 +0000 | [diff] [blame] | 355 | |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 356 | SAVE_CPPFLAGS=${CPPFLAGS} |
| 357 | CPPFLAGS="${CPPFLAGS} ${JNI_CFLAGS}" |
| 358 | AC_CHECK_HEADERS([jni.h], [DUMMY=1], |
| 359 | [AC_MSG_ERROR([Could not find JNI header file])]) |
| 360 | CPPFLAGS=${SAVE_CPPFLAGS} |
| 361 | AC_SUBST(JNI_CFLAGS) |
DRC | 1b0c3b0 | 2011-02-06 15:51:27 +0000 | [diff] [blame] | 362 | |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 363 | RPM_CONFIG_ARGS="$RPM_CONFIG_ARGS --with-java" |
DRC | 764e1e2 | 2013-04-19 04:25:14 +0000 | [diff] [blame] | 364 | JAVA_RPM_CONTENTS_1='%dir %{_datadir}/classes' |
| 365 | JAVA_RPM_CONTENTS_2=%{_datadir}/classes/turbojpeg.jar |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 366 | WITH_JAVA=1 |
DRC | f8e0055 | 2011-02-04 11:06:36 +0000 | [diff] [blame] | 367 | else |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 368 | AC_MSG_RESULT(no) |
DRC | f8e0055 | 2011-02-04 11:06:36 +0000 | [diff] [blame] | 369 | fi |
DRC | f2602ce | 2011-04-01 00:20:33 +0000 | [diff] [blame] | 370 | AM_CONDITIONAL([WITH_JAVA], [test "x$with_java" = "xyes"]) |
| 371 | AC_SUBST(WITH_JAVA) |
| 372 | AC_SUBST(JAVA_RPM_CONTENTS_1) |
| 373 | AC_SUBST(JAVA_RPM_CONTENTS_2) |
DRC | f8e0055 | 2011-02-04 11:06:36 +0000 | [diff] [blame] | 374 | |
DRC | 4346f91 | 2011-06-14 22:16:50 +0000 | [diff] [blame] | 375 | # optionally force using gas-preprocessor.pl for compatibility testing |
| 376 | AC_ARG_WITH([gas-preprocessor], |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 377 | AC_HELP_STRING([--with-gas-preprocessor], |
| 378 | [Force using gas-preprocessor.pl on ARM.])) |
DRC | 4346f91 | 2011-06-14 22:16:50 +0000 | [diff] [blame] | 379 | if test "x${with_gas_preprocessor}" = "xyes"; then |
| 380 | case $host_os in |
| 381 | darwin*) |
| 382 | CCAS="gas-preprocessor.pl -fix-unreq $CC" |
| 383 | ;; |
| 384 | *) |
| 385 | CCAS="gas-preprocessor.pl -no-fix-unreq $CC" |
| 386 | ;; |
| 387 | esac |
| 388 | AC_SUBST([CCAS]) |
| 389 | fi |
| 390 | |
DRC | 60cddeb | 2010-02-12 05:37:07 +0000 | [diff] [blame] | 391 | # SIMD is optional |
| 392 | AC_ARG_WITH([simd], |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 393 | AC_HELP_STRING([--without-simd], [Do not include SIMD extensions])) |
DRC | 60cddeb | 2010-02-12 05:37:07 +0000 | [diff] [blame] | 394 | if test "x${with_simd}" != "xno"; then |
DRC | 8ca34d4 | 2013-09-25 04:36:44 +0000 | [diff] [blame] | 395 | require_simd=no |
| 396 | if test "x${with_simd}" = "xyes"; then |
| 397 | require_simd=yes |
| 398 | fi |
DRC | 60cddeb | 2010-02-12 05:37:07 +0000 | [diff] [blame] | 399 | # Check if we're on a supported CPU |
| 400 | AC_MSG_CHECKING([if we have SIMD optimisations for cpu type]) |
| 401 | case "$host_cpu" in |
DRC | 4959787 | 2010-05-17 20:47:57 +0000 | [diff] [blame] | 402 | x86_64 | amd64) |
DRC | 60cddeb | 2010-02-12 05:37:07 +0000 | [diff] [blame] | 403 | AC_MSG_RESULT([yes (x86_64)]) |
| 404 | AC_PROG_NASM |
| 405 | simd_arch=x86_64 |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 406 | ;; |
DRC | 60cddeb | 2010-02-12 05:37:07 +0000 | [diff] [blame] | 407 | i*86 | x86 | ia32) |
| 408 | AC_MSG_RESULT([yes (i386)]) |
| 409 | AC_PROG_NASM |
| 410 | simd_arch=i386 |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 411 | ;; |
DRC | 321e068 | 2011-05-03 08:47:43 +0000 | [diff] [blame] | 412 | arm*) |
| 413 | AC_MSG_RESULT([yes (arm)]) |
| 414 | AC_MSG_CHECKING([if the assembler is GNU-compatible and can be used]) |
| 415 | AC_CHECK_COMPATIBLE_ARM_ASSEMBLER_IFELSE( |
| 416 | [AC_MSG_RESULT([yes]) |
| 417 | simd_arch=arm], |
| 418 | [AC_MSG_RESULT([no]) |
DRC | 8ca34d4 | 2013-09-25 04:36:44 +0000 | [diff] [blame] | 419 | with_simd=no]) |
DRC | 596b966 | 2013-10-26 00:29:53 +0000 | [diff] [blame] | 420 | if test "x${with_simd}" = "xno"; then |
| 421 | if test "x${require_simd}" = "xyes"; then |
| 422 | AC_MSG_ERROR([SIMD support can't be enabled.]) |
| 423 | else |
| 424 | AC_MSG_WARN([SIMD support can't be enabled. Performance will suffer.]) |
DRC | ba55b2c | 2014-02-05 08:15:44 +0000 | [diff] [blame] | 425 | fi |
DRC | 596b966 | 2013-10-26 00:29:53 +0000 | [diff] [blame] | 426 | fi |
DRC | ba55b2c | 2014-02-05 08:15:44 +0000 | [diff] [blame] | 427 | ;; |
| 428 | aarch64*) |
| 429 | AC_MSG_RESULT([yes (arm64)]) |
| 430 | AC_MSG_CHECKING([if the assembler is GNU-compatible and can be used]) |
| 431 | AC_CHECK_COMPATIBLE_ARM64_ASSEMBLER_IFELSE( |
| 432 | [AC_MSG_RESULT([yes]) |
| 433 | simd_arch=aarch64], |
| 434 | [AC_MSG_RESULT([no]) |
| 435 | with_simd=no]) |
| 436 | if test "x${with_simd}" = "xno"; then |
| 437 | if test "x${require_simd}" = "xyes"; then |
| 438 | AC_MSG_ERROR([SIMD support can't be enabled.]) |
| 439 | else |
| 440 | AC_MSG_WARN([SIMD support can't be enabled. Performance will suffer.]) |
| 441 | fi |
DRC | 8ca34d4 | 2013-09-25 04:36:44 +0000 | [diff] [blame] | 442 | fi |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 443 | ;; |
DRC | 495e434 | 2014-05-19 19:13:22 +0000 | [diff] [blame^] | 444 | mips*) |
| 445 | AC_MSG_RESULT([yes (mips)]) |
DRC | 0be9fa5 | 2013-07-24 21:50:20 +0000 | [diff] [blame] | 446 | AC_MSG_CHECKING([if the assembler is GNU-compatible and can be used]) |
DRC | 495e434 | 2014-05-19 19:13:22 +0000 | [diff] [blame^] | 447 | AC_CHECK_COMPATIBLE_MIPS_ASSEMBLER_IFELSE( |
DRC | 0be9fa5 | 2013-07-24 21:50:20 +0000 | [diff] [blame] | 448 | [AC_MSG_RESULT([yes]) |
DRC | 495e434 | 2014-05-19 19:13:22 +0000 | [diff] [blame^] | 449 | simd_arch=mips], |
DRC | 0be9fa5 | 2013-07-24 21:50:20 +0000 | [diff] [blame] | 450 | [AC_MSG_RESULT([no]) |
DRC | 8ca34d4 | 2013-09-25 04:36:44 +0000 | [diff] [blame] | 451 | with_simd=no]) |
DRC | 596b966 | 2013-10-26 00:29:53 +0000 | [diff] [blame] | 452 | if test "x${with_simd}" = "xno"; then |
| 453 | if test "x${require_simd}" = "xyes"; then |
| 454 | AC_MSG_ERROR([SIMD support can't be enabled.]) |
| 455 | else |
| 456 | AC_MSG_WARN([SIMD support can't be enabled. Performance will suffer.]) |
| 457 | fi |
DRC | 8ca34d4 | 2013-09-25 04:36:44 +0000 | [diff] [blame] | 458 | fi |
DRC | 0be9fa5 | 2013-07-24 21:50:20 +0000 | [diff] [blame] | 459 | ;; |
DRC | 60cddeb | 2010-02-12 05:37:07 +0000 | [diff] [blame] | 460 | *) |
| 461 | AC_MSG_RESULT([no ("$host_cpu")]) |
DRC | 83f2144 | 2010-06-10 18:52:41 +0000 | [diff] [blame] | 462 | with_simd=no; |
DRC | 596b966 | 2013-10-26 00:29:53 +0000 | [diff] [blame] | 463 | if test "x${require_simd}" = "xyes"; then |
DRC | 8ca34d4 | 2013-09-25 04:36:44 +0000 | [diff] [blame] | 464 | AC_MSG_ERROR([SIMD support not available for this CPU.]) |
| 465 | else |
| 466 | AC_MSG_WARN([SIMD support not available for this CPU. Performance will suffer.]) |
| 467 | fi |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 468 | ;; |
DRC | 60cddeb | 2010-02-12 05:37:07 +0000 | [diff] [blame] | 469 | esac |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 470 | |
DRC | 60cddeb | 2010-02-12 05:37:07 +0000 | [diff] [blame] | 471 | if test "x${with_simd}" != "xno"; then |
| 472 | AC_DEFINE([WITH_SIMD], [1], [Use accelerated SIMD routines.]) |
| 473 | fi |
DRC | 6da61db | 2013-01-19 01:06:46 +0000 | [diff] [blame] | 474 | else |
| 475 | RPM_CONFIG_ARGS="$RPM_CONFIG_ARGS --without-simd" |
DRC | 60cddeb | 2010-02-12 05:37:07 +0000 | [diff] [blame] | 476 | fi |
DRC | 411dcf5 | 2010-02-12 04:28:29 +0000 | [diff] [blame] | 477 | |
DRC | 60cddeb | 2010-02-12 05:37:07 +0000 | [diff] [blame] | 478 | AM_CONDITIONAL([WITH_SIMD], [test "x$with_simd" != "xno"]) |
DRC | 321e068 | 2011-05-03 08:47:43 +0000 | [diff] [blame] | 479 | AM_CONDITIONAL([WITH_SSE_FLOAT_DCT], [test "x$simd_arch" = "xx86_64" -o "x$simd_arch" = "xi386"]) |
Pierre Ossman | ba82ddf | 2009-06-29 11:20:42 +0000 | [diff] [blame] | 480 | AM_CONDITIONAL([SIMD_I386], [test "x$simd_arch" = "xi386"]) |
| 481 | AM_CONDITIONAL([SIMD_X86_64], [test "x$simd_arch" = "xx86_64"]) |
DRC | 321e068 | 2011-05-03 08:47:43 +0000 | [diff] [blame] | 482 | AM_CONDITIONAL([SIMD_ARM], [test "x$simd_arch" = "xarm"]) |
DRC | ba55b2c | 2014-02-05 08:15:44 +0000 | [diff] [blame] | 483 | AM_CONDITIONAL([SIMD_ARM_64], [test "x$simd_arch" = "xaarch64"]) |
DRC | 495e434 | 2014-05-19 19:13:22 +0000 | [diff] [blame^] | 484 | AM_CONDITIONAL([SIMD_MIPS], [test "x$simd_arch" = "xmips"]) |
DRC | 4959787 | 2010-05-17 20:47:57 +0000 | [diff] [blame] | 485 | AM_CONDITIONAL([X86_64], [test "x$host_cpu" = "xx86_64" -o "x$host_cpu" = "xamd64"]) |
DRC | 211d1e7 | 2013-01-13 11:25:20 +0000 | [diff] [blame] | 486 | AM_CONDITIONAL([WITH_TURBOJPEG], [test "x$with_turbojpeg" != "xno"]) |
Pierre Ossman | 59a3938 | 2009-03-09 13:15:56 +0000 | [diff] [blame] | 487 | |
DRC | 764e1e2 | 2013-04-19 04:25:14 +0000 | [diff] [blame] | 488 | AC_ARG_VAR(PKGNAME, [distribution package name (default: libjpeg-turbo)]) |
| 489 | if test "x$PKGNAME" = "x"; then |
| 490 | PKGNAME=$PACKAGE_NAME |
| 491 | fi |
| 492 | AC_SUBST(PKGNAME) |
| 493 | |
DRC | 079b434 | 2010-02-15 11:32:23 +0000 | [diff] [blame] | 494 | case "$host_cpu" in |
| 495 | x86_64) |
| 496 | RPMARCH=x86_64 |
DRC | 52a19f2 | 2010-02-15 12:06:27 +0000 | [diff] [blame] | 497 | DEBARCH=amd64 |
DRC | 079b434 | 2010-02-15 11:32:23 +0000 | [diff] [blame] | 498 | ;; |
| 499 | i*86 | x86 | ia32) |
| 500 | RPMARCH=i386 |
DRC | 52a19f2 | 2010-02-15 12:06:27 +0000 | [diff] [blame] | 501 | DEBARCH=i386 |
DRC | 079b434 | 2010-02-15 11:32:23 +0000 | [diff] [blame] | 502 | ;; |
| 503 | esac |
| 504 | |
| 505 | AC_SUBST(RPMARCH) |
DRC | 6da61db | 2013-01-19 01:06:46 +0000 | [diff] [blame] | 506 | AC_SUBST(RPM_CONFIG_ARGS) |
DRC | 52a19f2 | 2010-02-15 12:06:27 +0000 | [diff] [blame] | 507 | AC_SUBST(DEBARCH) |
DRC | 079b434 | 2010-02-15 11:32:23 +0000 | [diff] [blame] | 508 | AC_SUBST(BUILD) |
DRC | ff6961f | 2014-04-20 09:17:11 +0000 | [diff] [blame] | 509 | AC_DEFINE_UNQUOTED([BUILD], "$BUILD", [libjpeg-turbo build number]) |
DRC | 079b434 | 2010-02-15 11:32:23 +0000 | [diff] [blame] | 510 | |
DRC | 990342c | 2014-04-15 03:41:31 +0000 | [diff] [blame] | 511 | # NOTE: autoheader automatically modifies the input file of the first |
| 512 | # invocation of AC_CONFIG_HEADERS, so we put config.h first to prevent |
| 513 | # jconfig.h.in from being clobbered. config.h is used only internally, whereas |
| 514 | # jconfig.h contains macros that are relevant to external programs (macros that |
| 515 | # specify which features were built into the library.) |
Constantin Kaplinsky | 0ca4425 | 2008-09-28 05:08:48 +0000 | [diff] [blame] | 516 | AC_CONFIG_HEADERS([config.h]) |
| 517 | AC_CONFIG_HEADERS([jconfig.h]) |
DRC | ff6961f | 2014-04-20 09:17:11 +0000 | [diff] [blame] | 518 | AC_CONFIG_HEADERS([jconfigint.h]) |
DRC | 764e1e2 | 2013-04-19 04:25:14 +0000 | [diff] [blame] | 519 | AC_CONFIG_FILES([pkgscripts/libjpeg-turbo.spec.tmpl:release/libjpeg-turbo.spec.in]) |
DRC | 7175e51 | 2013-04-23 22:29:00 +0000 | [diff] [blame] | 520 | AC_CONFIG_FILES([pkgscripts/makecygwinpkg.tmpl:release/makecygwinpkg.in]) |
DRC | 764e1e2 | 2013-04-19 04:25:14 +0000 | [diff] [blame] | 521 | AC_CONFIG_FILES([pkgscripts/makedpkg.tmpl:release/makedpkg.in]) |
DRC | 7175e51 | 2013-04-23 22:29:00 +0000 | [diff] [blame] | 522 | AC_CONFIG_FILES([pkgscripts/makemacpkg.tmpl:release/makemacpkg.in]) |
DRC | 7175e51 | 2013-04-23 22:29:00 +0000 | [diff] [blame] | 523 | AC_CONFIG_FILES([pkgscripts/uninstall.tmpl:release/uninstall.in]) |
DRC | 211d1e7 | 2013-01-13 11:25:20 +0000 | [diff] [blame] | 524 | if test "x$with_turbojpeg" != "xno"; then |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 525 | AC_CONFIG_FILES([tjbenchtest]) |
DRC | 211d1e7 | 2013-01-13 11:25:20 +0000 | [diff] [blame] | 526 | fi |
| 527 | if test "x$with_java" = "xyes"; then |
DRC | 0ddff3b | 2013-04-11 05:17:53 +0000 | [diff] [blame] | 528 | AC_CONFIG_FILES([tjbenchtest.java]) |
| 529 | AC_CONFIG_FILES([tjexampletest]) |
DRC | 211d1e7 | 2013-01-13 11:25:20 +0000 | [diff] [blame] | 530 | fi |
DRC | 8515d3d | 2010-10-19 06:38:57 +0000 | [diff] [blame] | 531 | AC_CONFIG_FILES([libjpeg.map]) |
Pierre Ossman | 3a65ef4 | 2009-03-16 13:34:18 +0000 | [diff] [blame] | 532 | AC_CONFIG_FILES([Makefile simd/Makefile]) |
DRC | dffd53d | 2011-04-01 00:37:20 +0000 | [diff] [blame] | 533 | AC_CONFIG_FILES([java/Makefile]) |
DRC | 0bf58f2 | 2013-02-06 23:51:08 +0000 | [diff] [blame] | 534 | AC_CONFIG_FILES([md5/Makefile]) |
Constantin Kaplinsky | 0ca4425 | 2008-09-28 05:08:48 +0000 | [diff] [blame] | 535 | AC_OUTPUT |