configure.ac 16 KB

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