aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/source/Irrlicht/jpeglib/configure.ac
diff options
context:
space:
mode:
authorDavid Walter Seikel2013-01-13 17:24:39 +1000
committerDavid Walter Seikel2013-01-13 17:24:39 +1000
commit393b5cd1dc438872af89d334ef6e5fcc59f27d47 (patch)
tree6a14521219942a08a1b95cb2f5a923a9edd60f63 /libraries/irrlicht-1.8/source/Irrlicht/jpeglib/configure.ac
parentAdd a note about rasters suggested start up code. (diff)
downloadSledjHamr-393b5cd1dc438872af89d334ef6e5fcc59f27d47.zip
SledjHamr-393b5cd1dc438872af89d334ef6e5fcc59f27d47.tar.gz
SledjHamr-393b5cd1dc438872af89d334ef6e5fcc59f27d47.tar.bz2
SledjHamr-393b5cd1dc438872af89d334ef6e5fcc59f27d47.tar.xz
Added Irrlicht 1.8, but without all the Windows binaries.
Diffstat (limited to 'libraries/irrlicht-1.8/source/Irrlicht/jpeglib/configure.ac')
-rw-r--r--libraries/irrlicht-1.8/source/Irrlicht/jpeglib/configure.ac356
1 files changed, 356 insertions, 0 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/jpeglib/configure.ac b/libraries/irrlicht-1.8/source/Irrlicht/jpeglib/configure.ac
new file mode 100644
index 0000000..c3c3d81
--- /dev/null
+++ b/libraries/irrlicht-1.8/source/Irrlicht/jpeglib/configure.ac
@@ -0,0 +1,356 @@
1# IJG auto-configuration source file.
2# Process this file with autoconf to produce a configure script.
3
4#
5# Configure script for IJG libjpeg
6#
7
8AC_INIT([libjpeg], [8.4.0])
9
10# Directory where autotools helper scripts lives.
11AC_CONFIG_AUX_DIR([.])
12
13# Generate configuration headers.
14AC_CONFIG_HEADERS([jconfig.h:jconfig.cfg])
15
16# Hack: disable autoheader so that it doesn't overwrite our cfg template.
17AUTOHEADER="echo autoheader ignored"
18
19# Check system type
20AC_CANONICAL_TARGET
21
22# Initialize Automake
23# Don't require all the GNU mandated files
24AM_INIT_AUTOMAKE([-Wall -Werror -Wno-obsolete ansi2knr no-dist foreign])
25
26# Make --enable-silent-rules the default.
27# To get verbose build output you may configure
28# with --disable-silent-rules or use "make V=1".
29AM_SILENT_RULES([yes])
30
31# This is required when using the de-ANSI-fication feature.
32AM_C_PROTOTYPES
33
34# Add configure option --enable-maintainer-mode which enables
35# dependency checking and generation useful to package maintainers.
36# This is made an option to avoid confusing end users.
37AM_MAINTAINER_MODE
38
39# Check for programs
40AC_PROG_CC
41AC_PROG_CC_STDC
42AC_PROG_CPP
43AC_PROG_INSTALL
44AC_PROG_MAKE_SET
45AC_PROG_LN_S
46
47# Check if LD supports linker scripts,
48# and define automake conditional HAVE_LD_VERSION_SCRIPT if so.
49AC_ARG_ENABLE([ld-version-script],
50 AS_HELP_STRING([--enable-ld-version-script],
51 [enable linker version script (default is enabled when possible)]),
52 [have_ld_version_script=$enableval], [])
53if test -z "$have_ld_version_script"; then
54 AC_MSG_CHECKING([if LD -Wl,--version-script works])
55 save_LDFLAGS="$LDFLAGS"
56 LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
57 cat > conftest.map <<EOF
58VERS_1 {
59 global: sym;
60};
61
62VERS_2 {
63 global: sym;
64} VERS_1;
65EOF
66 AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
67 [have_ld_version_script=yes], [have_ld_version_script=no])
68 rm -f conftest.map
69 LDFLAGS="$save_LDFLAGS"
70 AC_MSG_RESULT($have_ld_version_script)
71fi
72AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
73
74# See if compiler supports prototypes.
75AC_MSG_CHECKING([for function prototypes])
76AC_CACHE_VAL([ijg_cv_have_prototypes],
77[AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
78int testfunction (int arg1, int * arg2); /* check prototypes */
79struct methods_struct { /* check method-pointer declarations */
80 int (*error_exit) (char *msgtext);
81 int (*trace_message) (char *msgtext);
82 int (*another_method) (void);
83};
84int testfunction (int arg1, int * arg2) /* check definitions */
85{ return arg2[arg1]; }
86int test2function (void) /* check void arg list */
87{ return 0; }
88]])],
89 [ijg_cv_have_prototypes=yes],
90 [ijg_cv_have_prototypes=no])])
91AC_MSG_RESULT([$ijg_cv_have_prototypes])
92if test $ijg_cv_have_prototypes = yes; then
93 AC_DEFINE([HAVE_PROTOTYPES],[1],[Compiler supports function prototypes.])
94else
95 AC_MSG_WARN([Your compiler does not seem to know about function prototypes.
96 Perhaps it needs a special switch to enable ANSI C mode.
97 If so, we recommend running configure like this:
98 ./configure CC='cc -switch'
99 where -switch is the proper switch.])
100fi
101
102# Check header files
103AC_CHECK_HEADERS([stddef.h stdlib.h locale.h])
104AC_CHECK_HEADER([string.h], [],
105 [AC_DEFINE([NEED_BSD_STRINGS], [1],
106 [Compiler has <strings.h> rather than standard <string.h>.])])
107
108# See whether type size_t is defined in any ANSI-standard places;
109# if not, perhaps it is defined in <sys/types.h>.
110AC_MSG_CHECKING([for size_t])
111AC_TRY_COMPILE([
112#ifdef HAVE_STDDEF_H
113#include <stddef.h>
114#endif
115#ifdef HAVE_STDLIB_H
116#include <stdlib.h>
117#endif
118#include <stdio.h>
119#ifdef NEED_BSD_STRINGS
120#include <strings.h>
121#else
122#include <string.h>
123#endif
124typedef size_t my_size_t;
125],
126 [ my_size_t foovar; ],
127 [ijg_size_t_ok=yes],
128 [ijg_size_t_ok="not ANSI, perhaps it is in sys/types.h"])
129AC_MSG_RESULT([$ijg_size_t_ok])
130if test "$ijg_size_t_ok" != yes; then
131 AC_CHECK_HEADER([sys/types.h],
132 [AC_DEFINE([NEED_SYS_TYPES_H], [1],
133 [Need to include <sys/types.h> in order to obtain size_t.])
134 AC_EGREP_CPP([size_t], [#include <sys/types.h>],
135 [ijg_size_t_ok="size_t is in sys/types.h"],
136 [ijg_size_t_ok=no])],
137 [ijg_size_t_ok=no])
138 AC_MSG_RESULT([$ijg_size_t_ok])
139 if test "$ijg_size_t_ok" = no; then
140 AC_MSG_WARN([Type size_t is not defined in any of the usual places.
141 Try putting '"typedef unsigned int size_t;"' in jconfig.h.])
142 fi
143fi
144
145# Check compiler characteristics
146AC_MSG_CHECKING([for type unsigned char])
147AC_TRY_COMPILE([], [ unsigned char un_char; ],
148 [AC_MSG_RESULT(yes)
149 AC_DEFINE([HAVE_UNSIGNED_CHAR], [1],
150 [Compiler supports 'unsigned char'.])],
151 [AC_MSG_RESULT(no)])
152
153AC_MSG_CHECKING([for type unsigned short])
154AC_TRY_COMPILE([], [ unsigned short un_short; ],
155 [AC_MSG_RESULT(yes)
156 AC_DEFINE([HAVE_UNSIGNED_SHORT], [1],
157 [Compiler supports 'unsigned short'.])],
158 [AC_MSG_RESULT(no)])
159
160AC_MSG_CHECKING([for type void])
161AC_TRY_COMPILE([
162/* Caution: a C++ compiler will insist on valid prototypes */
163typedef void * void_ptr; /* check void * */
164#ifdef HAVE_PROTOTYPES /* check ptr to function returning void */
165typedef void (*void_func) (int a, int b);
166#else
167typedef void (*void_func) ();
168#endif
169
170#ifdef HAVE_PROTOTYPES /* check void function result */
171void test3function (void_ptr arg1, void_func arg2)
172#else
173void test3function (arg1, arg2)
174 void_ptr arg1;
175 void_func arg2;
176#endif
177{
178 char * locptr = (char *) arg1; /* check casting to and from void * */
179 arg1 = (void *) locptr;
180 (*arg2) (1, 2); /* check call of fcn returning void */
181}
182], [ ],
183 [AC_MSG_RESULT(yes)],
184 [AC_MSG_RESULT(no)
185 AC_DEFINE([void], [char],
186 [Define 'void' as 'char' for archaic compilers
187 that don't understand it.])])
188AC_C_CONST
189
190# Check for non-broken inline under various spellings
191AC_MSG_CHECKING([for inline])
192ijg_cv_inline=""
193AC_TRY_COMPILE([], [} __inline__ int foo() { return 0; }
194int bar() { return foo();], ijg_cv_inline="__inline__",
195[AC_TRY_COMPILE(, [} __inline int foo() { return 0; }
196int bar() { return foo();], ijg_cv_inline="__inline",
197[AC_TRY_COMPILE(, [} inline int foo() { return 0; }
198int bar() { return foo();], ijg_cv_inline="inline")])])
199AC_MSG_RESULT($ijg_cv_inline)
200AC_DEFINE_UNQUOTED([INLINE], [$ijg_cv_inline],
201 [How to obtain function inlining.])
202
203# We cannot check for bogus warnings, but at least we can check for errors
204AC_MSG_CHECKING([for broken incomplete types])
205AC_TRY_COMPILE([ typedef struct undefined_structure * undef_struct_ptr; ],
206 [],
207 [AC_MSG_RESULT(ok)],
208 [AC_MSG_RESULT(broken)
209 AC_DEFINE([INCOMPLETE_TYPES_BROKEN], [1],
210 [Compiler does not support pointers to unspecified
211 structures.])])
212
213# Test whether global names are unique to at least 15 chars
214AC_MSG_CHECKING([for short external names])
215AC_TRY_LINK([
216int possibly_duplicate_function () { return 0; }
217int possibly_dupli_function () { return 1; }
218], [],
219 [AC_MSG_RESULT(ok)],
220 [AC_MSG_RESULT(short)
221 AC_DEFINE([NEED_SHORT_EXTERNAL_NAMES], [1],
222 [Linker requires that global names be unique in
223 first 15 characters.])])
224
225# Run-time checks
226AC_MSG_CHECKING([to see if char is signed])
227AC_TRY_RUN([
228#ifdef HAVE_PROTOTYPES
229int is_char_signed (int arg)
230#else
231int is_char_signed (arg)
232 int arg;
233#endif
234{
235 if (arg == 189) { /* expected result for unsigned char */
236 return 0; /* type char is unsigned */
237 }
238 else if (arg != -67) { /* expected result for signed char */
239 printf("Hmm, it seems 'char' is not eight bits wide on your machine.\n");
240 printf("I fear the JPEG software will not work at all.\n\n");
241 }
242 return 1; /* assume char is signed otherwise */
243}
244char signed_char_check = (char) (-67);
245int main() {
246 exit(is_char_signed((int) signed_char_check));
247}], [AC_MSG_RESULT(no)
248 AC_DEFINE([CHAR_IS_UNSIGNED], [1],
249 [Characters are unsigned])],
250 [AC_MSG_RESULT(yes)],
251[AC_MSG_WARN([Assuming that char is signed on target machine.
252 If it is unsigned, this will be a little bit inefficient.])
253])
254
255AC_MSG_CHECKING([to see if right shift is signed])
256AC_TRY_RUN([
257#ifdef HAVE_PROTOTYPES
258int is_shifting_signed (long arg)
259#else
260int is_shifting_signed (arg)
261 long arg;
262#endif
263/* See whether right-shift on a long is signed or not. */
264{
265 long res = arg >> 4;
266
267 if (res == -0x7F7E80CL) { /* expected result for signed shift */
268 return 1; /* right shift is signed */
269 }
270 /* see if unsigned-shift hack will fix it. */
271 /* we can't just test exact value since it depends on width of long... */
272 res |= (~0L) << (32-4);
273 if (res == -0x7F7E80CL) { /* expected result now? */
274 return 0; /* right shift is unsigned */
275 }
276 printf("Right shift isn't acting as I expect it to.\n");
277 printf("I fear the JPEG software will not work at all.\n\n");
278 return 0; /* try it with unsigned anyway */
279}
280int main() {
281 exit(is_shifting_signed(-0x7F7E80B1L));
282}],
283 [AC_MSG_RESULT(no)
284 AC_DEFINE([RIGHT_SHIFT_IS_UNSIGNED], [1],
285 [Broken compiler shifts signed values as an unsigned shift.])],
286 [AC_MSG_RESULT(yes)],
287 [AC_MSG_RESULT(Assuming that right shift is signed on target machine.)])
288
289AC_MSG_CHECKING([to see if fopen accepts b spec])
290AC_TRY_RUN([
291#include <stdio.h>
292int main() {
293 if (fopen("conftestdata", "wb") != NULL)
294 exit(0);
295 exit(1);
296}],
297 [AC_MSG_RESULT(yes)],
298 [AC_MSG_RESULT(no)
299 AC_DEFINE([DONT_USE_B_MODE], [1],
300 [Don't open files in binary mode.])],
301 [AC_MSG_RESULT(Assuming that it does.)])
302
303# Configure libtool
304AC_LIBTOOL_WIN32_DLL
305AC_PROG_LIBTOOL
306
307# Select memory manager depending on user input.
308# If no "-enable-maxmem", use jmemnobs
309MEMORYMGR='jmemnobs'
310MAXMEM="no"
311AC_ARG_ENABLE([maxmem],
312[ --enable-maxmem[=N] enable use of temp files, set max mem usage to N MB],
313[MAXMEM="$enableval"])
314dnl [# support --with-maxmem for backwards compatibility with IJG V5.]
315dnl AC_ARG_WITH(maxmem, , MAXMEM="$withval")
316if test "x$MAXMEM" = xyes; then
317 MAXMEM=1
318fi
319if test "x$MAXMEM" != xno; then
320 if test -n "`echo $MAXMEM | sed 's/[[0-9]]//g'`"; then
321 AC_MSG_ERROR(non-numeric argument to --enable-maxmem)
322 fi
323 DEFAULTMAXMEM=`expr $MAXMEM \* 1048576`
324 AC_DEFINE_UNQUOTED([DEFAULT_MAX_MEM], [${DEFAULTMAXMEM}],
325 [Maximum data space library will allocate.])
326 AC_MSG_CHECKING([for 'tmpfile()'])
327 AC_TRY_LINK([#include <stdio.h>], [ FILE * tfile = tmpfile(); ],
328 [AC_MSG_RESULT(yes)
329 MEMORYMGR='jmemansi'],
330 [AC_MSG_RESULT(no)
331 dnl if tmpfile is not present, must use jmemname.
332 MEMORYMGR='jmemname'
333
334 # Test for the need to remove temporary files using a signal handler
335 # (for cjpeg/djpeg)
336 AC_DEFINE([NEED_SIGNAL_CATCHER], [1],
337 [Need signal handler to clean up temporary files.])
338 AC_MSG_CHECKING([for 'mktemp()'])
339 AC_TRY_LINK([], [ char fname[80]; mktemp(fname); ],
340 [AC_MSG_RESULT(yes)],
341 [AC_MSG_RESULT(no)
342 AC_DEFINE([NO_MKTEMP], [1],
343 [The mktemp() function is not available.])])])
344fi
345AC_SUBST([MEMORYMGR])
346
347# Extract the library version IDs from jpeglib.h.
348AC_MSG_CHECKING([libjpeg version number])
349[major=`sed -ne 's/^#define JPEG_LIB_VERSION_MAJOR *\([0-9][0-9]*\).*$/\1/p' $srcdir/jpeglib.h`
350minor=`sed -ne 's/^#define JPEG_LIB_VERSION_MINOR *\([0-9][0-9]*\).*$/\1/p' $srcdir/jpeglib.h`]
351AC_SUBST([JPEG_LIB_VERSION],
352 [`expr $major + $minor`:0:$minor])
353AC_MSG_RESULT([$JPEG_LIB_VERSION])
354
355AC_CONFIG_FILES([Makefile])
356AC_OUTPUT