~ubuntu-branches/ubuntu/hoary/devil/hoary

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Bazaar Package Importer
  • Author(s): Marcelo E. Magallon
  • Date: 2005-01-03 19:57:42 UTC
  • Revision ID: james.westby@ubuntu.com-20050103195742-4ipkplcwygu3irv0
Tags: upstream-1.6.7
ImportĀ upstreamĀ versionĀ 1.6.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
dnl 
 
2
dnl Autoconf script for DevIL Library
 
3
dnl Written by Edouard Gomez <ed.gomez@wanadoo.fr>
 
4
dnl 
 
5
 
 
6
 
 
7
dnl
 
8
dnl configure.in initialization
 
9
dnl
 
10
AC_INIT
 
11
AC_CONFIG_SRCDIR([README])
 
12
 
 
13
dnl
 
14
dnl Minimum Autoconf version
 
15
dnl
 
16
AC_PREREQ(2.52)
 
17
 
 
18
dnl
 
19
dnl Version Info
 
20
dnl
 
21
 
 
22
DEVIL_MAJOR=1
 
23
DEVIL_MINOR=6
 
24
DEVIL_REVISION=7
 
25
DEVIL_VERSION=$DEVIL_MAJOR$DEVIL_MINOR$DEVIL_REVISION
 
26
 
 
27
dnl
 
28
dnl Note that the libtool version has nothing to do
 
29
dnl with the actual DevIL version, it is a version number
 
30
dnl describing the interface version (see libtool doc)
 
31
dnl wich only changes when the interface changes  
 
32
dnl
 
33
DEVIL_LTVERSION=1:0:0
 
34
AC_SUBST(DEVIL_LTVERSION)
 
35
 
 
36
dnl
 
37
dnl Basic conf
 
38
dnl
 
39
 
 
40
AC_REVISION($Revision: 1.40 $)
 
41
AC_CONFIG_AUX_DIR(libtools)
 
42
AC_PREFIX_DEFAULT(/usr/local)
 
43
AC_CANONICAL_HOST
 
44
AC_CANONICAL_TARGET
 
45
AC_LANG([C])
 
46
AC_PROG_CC
 
47
AC_PROG_INSTALL
 
48
AC_PROG_MAKE_SET
 
49
AC_C_BIGENDIAN
 
50
AC_LIBTOOL_WIN32_DLL
 
51
AC_PATH_XTRA
 
52
 
 
53
AM_INIT_AUTOMAKE("DevIL", $DEVIL_MAJOR.$DEVIL_MINOR.$DEVIL_REVISION)
 
54
AM_CONFIG_HEADER(include/IL/config.h)
 
55
AM_DISABLE_STATIC
 
56
AM_PROG_LIBTOOL
 
57
AM_MAINTAINER_MODE
 
58
 
 
59
 
 
60
dnl
 
61
dnl Altives Check
 
62
dnl
 
63
AC_MSG_CHECKING(Altivec) 
 
64
CFLAGS_TMP=$CFLAGS
 
65
CFLAGS="-force_cpusubtype_ALL"
 
66
AC_COMPILE_IFELSE([
 
67
int main() {
 
68
        asm("vspltisw v0,0");
 
69
}], [AC_DEFINE([ALTIVEC])] [CFLAGS="$CFLAGS_TMP -force_cpusubtype_ALL";] [AC_MSG_RESULT(yes)], [CFLAGS="$CFLAGS_TMP";] [AC_MSG_RESULT(no)] );
 
70
 
 
71
 
 
72
AC_MSG_CHECKING(Altivec gcc extension)
 
73
CFLAGS_TMP=$CFLAGS
 
74
CFLAGS="-faltivec"
 
75
AC_COMPILE_IFELSE([
 
76
int main() {
 
77
        vector unsigned int vec;
 
78
        vec = vec_splat_u32(0);
 
79
        return 0;
 
80
}], [AC_DEFINE([ALTIVEC_GCC])] [CFLAGS="$CFLAGS_TMP -faltivec";] [AC_MSG_RESULT(yes)], [CFLAGS=$CFLAGS_TMP;] [AC_MSG_RESULT(no)] );
 
81
 
 
82
 
 
83
 
 
84
CFLAGS="-Wall -funroll-loops -ffast-math -fomit-frame-pointer -fexpensive-optimizations $CFLAGS"
 
85
LIBIL_CFLAGS="$CFLAGS"
 
86
LIBILU_CFLAGS="$CFLAGS"
 
87
LIBILUT_CFLAGS="$CFLAGS"
 
88
 
 
89
dnl
 
90
dnl Default supported formats : all except lcms
 
91
dnl
 
92
dnl no_bmp="no"
 
93
dnl no_dcx="no"
 
94
dnl no_dds="no"
 
95
dnl no_doom="no"
 
96
dnl no_gif="no"
 
97
dnl no_hdr="no"
 
98
dnl no_icon="no"
 
99
dnl no_jpeg="no"
 
100
dnl no_lif="no"
 
101
dnl no_mdl="no"
 
102
dnl no_mng="no"
 
103
dnl no_pcd="no"
 
104
dnl no_pcx="no"
 
105
dnl no_pic="no"
 
106
dnl no_pix="no"
 
107
dnl no_png="no"
 
108
dnl no_pnm="no"
 
109
dnl no_psd="no"
 
110
dnl no_psp="no"
 
111
dnl no_pxr="no"
 
112
dnl no_lcms="no"
 
113
dnl no_raw="no"
 
114
dnl no_sgi="no"
 
115
dnl no_tga="no"
 
116
dnl no_tiff="no"
 
117
dnl no_wal="no"
 
118
dnl no_xpm="no"
 
119
 
 
120
dnl
 
121
dnl Arguments
 
122
dnl
 
123
AC_ARG_ENABLE(bmp,
 
124
[  --disable-bmp           Doesn't compile bmp support],
 
125
[case "$enable_bmp" in
 
126
  no)
 
127
    no_bmp="yes"
 
128
    ;;
 
129
  *)
 
130
    no_bmp="no"
 
131
    ;;
 
132
esac],
 
133
no_bmp="no")
 
134
 
 
135
AC_ARG_ENABLE(dcx,
 
136
[  --disable-dcx           Doesn't compile dcx support],
 
137
[case "$enable_dcx" in
 
138
  no)
 
139
    no_dcx="yes"
 
140
    ;;
 
141
  *)
 
142
    no_dcx="no"
 
143
    ;;
 
144
esac],
 
145
no_dcx="no")
 
146
 
 
147
AC_ARG_ENABLE(doom,
 
148
[  --disable-doom          Doesn't compile wad support],
 
149
[case "$enable_doom" in
 
150
  no)
 
151
    no_doom="yes"
 
152
    ;;
 
153
  *)
 
154
    no_doom="no"
 
155
    ;;
 
156
esac],
 
157
no_doom="no")
 
158
 
 
159
AC_ARG_ENABLE(gif,
 
160
[  --disable-gif           Doesn't compile gif support],
 
161
[case "$enable_gif" in
 
162
  no)
 
163
    no_gif="yes"
 
164
    ;;
 
165
  *)
 
166
    no_gif="no"
 
167
    ;;
 
168
esac],
 
169
no_gif="no")
 
170
 
 
171
AC_ARG_ENABLE(hdr,
 
172
[  --disable-hdr           Doesn't compile hdr support],
 
173
[case "$enable_hdr" in
 
174
  no)
 
175
    no_hdr="yes"
 
176
    ;;
 
177
  *)
 
178
    no_hdr="no"
 
179
    ;;
 
180
esac],
 
181
no_hdr="no")
 
182
 
 
183
AC_ARG_ENABLE(icon,
 
184
[  --disable-icon          Doesn't compile icon support],
 
185
[case "$enable_icon" in
 
186
  no)
 
187
    no_icon="yes"
 
188
    ;;
 
189
  *)
 
190
    no_icon="no"
 
191
    ;;
 
192
esac],
 
193
no_icon="no")
 
194
 
 
195
AC_ARG_ENABLE(jpeg,
 
196
[  --disable-jpeg          Doesn't compile jpeg support],
 
197
[case "$enable_jpeg" in
 
198
  no)
 
199
    no_jpeg="yes"
 
200
    ;;
 
201
  *)
 
202
    no_jpeg="no"
 
203
    ;;
 
204
esac],
 
205
no_jpeg="no")
 
206
 
 
207
AC_ARG_ENABLE(lif,
 
208
[  --disable-lif           Doesn't compile lif support],
 
209
[case "$enable_lif" in
 
210
  no)
 
211
    no_lif="yes"
 
212
    ;;
 
213
  *)
 
214
    no_lif="no"
 
215
    ;;
 
216
esac],
 
217
no_lif="no")
 
218
 
 
219
AC_ARG_ENABLE(lcms,
 
220
[  --disable-lcms          Doesn't compile lcms support],
 
221
[case "$enable_lcms" in
 
222
  no)
 
223
    no_lcms="yes"
 
224
    ;;
 
225
  *)
 
226
    no_lcms="no"
 
227
    ;;
 
228
esac],
 
229
no_lcms="no")
 
230
 
 
231
AC_ARG_ENABLE(mdl,
 
232
[  --disable-mdl           Doesn't compile mdl support],
 
233
[case "$enable_mdl" in
 
234
  no)
 
235
    no_mdl="yes"
 
236
    ;;
 
237
  *)
 
238
    no_mdl="no"
 
239
    ;;
 
240
esac],
 
241
no_mdl="no")
 
242
 
 
243
AC_ARG_ENABLE(mng,
 
244
[  --disable-mng           Doesn't compile mng support],
 
245
[case "$enable_mng" in
 
246
  no)
 
247
    no_mng="yes"
 
248
    ;;
 
249
  *)
 
250
    no_mng="no"
 
251
    ;;
 
252
esac],
 
253
no_mng="no")
 
254
 
 
255
AC_ARG_ENABLE(pcd,
 
256
[  --disable-pcd           Doesn't compile pcd support],
 
257
[case "$enable_pcd" in
 
258
  no)
 
259
    no_pcd="yes"
 
260
    ;;
 
261
  *)
 
262
    no_pcd="no"
 
263
    ;;
 
264
esac],
 
265
no_pcd="no")
 
266
 
 
267
AC_ARG_ENABLE(pcx,
 
268
[  --disable-pcx           Doesn't compile pcx support],
 
269
[case "$enable_pcx" in
 
270
  no)
 
271
    no_pcx="yes"
 
272
    ;;
 
273
  *)
 
274
    no_pcx="no"
 
275
    ;;
 
276
esac],
 
277
no_pcx="no")
 
278
 
 
279
AC_ARG_ENABLE(pic,
 
280
[  --disable-pic           Doesn't compile pic support],
 
281
[case "$enable_pic" in
 
282
  no)
 
283
    no_pic="yes"
 
284
    ;;
 
285
  *)
 
286
    no_pic="no"
 
287
    ;;
 
288
esac],
 
289
no_pic="no")
 
290
 
 
291
AC_ARG_ENABLE(pix,
 
292
[  --disable-pix           Doesn't compile pix support],
 
293
[case "$enable_pix" in
 
294
  no)
 
295
    no_pix="yes"
 
296
    ;;
 
297
  *)
 
298
    no_pix="no"
 
299
    ;;
 
300
esac],
 
301
no_pix="no")
 
302
 
 
303
AC_ARG_ENABLE(png,
 
304
[  --disable-png           Doesn't compile png support],
 
305
[case "$enable_png" in
 
306
  no)
 
307
    no_png="yes"
 
308
    ;;
 
309
  *)
 
310
    no_png="no"
 
311
    ;;
 
312
esac],
 
313
no_png="no")
 
314
 
 
315
AC_ARG_ENABLE(pnm,
 
316
[  --disable-pnm           Doesn't compile pnm support],
 
317
[case "$enable_pnm" in
 
318
  no)
 
319
    no_pnm="yes"
 
320
    ;;
 
321
  *)
 
322
    no_pnm="no"
 
323
    ;;
 
324
esac],
 
325
no_pnm="no")
 
326
 
 
327
AC_ARG_ENABLE(psd,
 
328
[  --disable-psd           Doesn't compile psd support],
 
329
[case "$enable_psd" in
 
330
  no)
 
331
    no_psd="yes"
 
332
    ;;
 
333
  *)
 
334
    no_psd="no"
 
335
    ;;
 
336
esac],
 
337
no_psd="no")
 
338
 
 
339
AC_ARG_ENABLE(psp,
 
340
[  --disable-psp           Doesn't compile psp support],
 
341
[case "$enable_psp" in
 
342
  no)
 
343
    no_psp="yes"
 
344
    ;;
 
345
  *)
 
346
    no_psp="no"
 
347
    ;;
 
348
esac],
 
349
no_psp="no")
 
350
 
 
351
AC_ARG_ENABLE(pxr,
 
352
[  --disable-pxr           Doesn't compile pxr support],
 
353
[case "$enable_pxr" in
 
354
  no)
 
355
    no_pxr="yes"
 
356
    ;;
 
357
  *)
 
358
    no_pxr="no"
 
359
    ;;
 
360
esac],
 
361
no_pxr="no")
 
362
 
 
363
AC_ARG_ENABLE(lcms,
 
364
[  --disable-lcms          Doesn't compile lcms support],
 
365
[case "$enable_lcms" in
 
366
  no)
 
367
    no_lcms="yes"
 
368
    ;;
 
369
  *)
 
370
    no_lcms="no"
 
371
    ;;
 
372
esac],
 
373
no_lcms="no")
 
374
 
 
375
AC_ARG_ENABLE(raw,
 
376
[  --disable-raw           Doesn't compile raw support],
 
377
[case "$enable_raw" in
 
378
  no)
 
379
    no_raw="yes"
 
380
    ;;
 
381
  *)
 
382
    no_raw="no"
 
383
    ;;
 
384
esac],
 
385
no_raw="no")
 
386
 
 
387
AC_ARG_ENABLE(sgi,
 
388
[  --disable-sgi           Doesn't compile sgi support],
 
389
[case "$enable_sgi" in
 
390
  no)
 
391
    no_sgi="yes"
 
392
    ;;
 
393
  *)
 
394
    no_sgi="no"
 
395
    ;;
 
396
esac],
 
397
no_sgi="no")
 
398
 
 
399
AC_ARG_ENABLE(tga,
 
400
[  --disable-tga           Doesn't compile tga support],
 
401
[case "$enable_tga" in
 
402
  no)
 
403
    no_tga="yes"
 
404
    ;;
 
405
  *)
 
406
    no_tga="no"
 
407
    ;;
 
408
esac], no_tga="no")
 
409
 
 
410
AC_ARG_ENABLE(tiff,
 
411
[  --disable-tiff          Doesn't compile tiff support],
 
412
[case "$enable_tiff" in
 
413
  no)
 
414
    no_tiff="yes"
 
415
    ;;
 
416
  *)
 
417
    no_tiff="no"
 
418
    ;;
 
419
esac],
 
420
no_tiff="no")
 
421
 
 
422
AC_ARG_ENABLE(wal,
 
423
[  --disable-wal           Doesn't compile wal support],
 
424
[case "$enable_wal" in
 
425
  no)
 
426
    no_wal="yes"
 
427
    ;;
 
428
  *)
 
429
    no_wal="no"
 
430
    ;;
 
431
esac],
 
432
no_wal="no")
 
433
 
 
434
AC_ARG_ENABLE(xpm,
 
435
[  --disable-xpm           Doesn't compile xpm support],
 
436
[case "$enable_xpm" in
 
437
  no)
 
438
    no_xpm="yes"
 
439
    ;;
 
440
  *)
 
441
    no_xpm="no"
 
442
    ;;
 
443
esac],
 
444
no_xpm="no")
 
445
 
 
446
AC_ARG_ENABLE(allegro,
 
447
[  --disable-allegro       Doesn't compile allegro support],
 
448
use_allegro=$enable_allegro, use_allegro="yes")
 
449
 
 
450
AC_ARG_ENABLE(directx,
 
451
[  --disable-directx       Doesn't compile directx support],
 
452
use_directx=$enable_directx, use_directx="yes")
 
453
 
 
454
AC_ARG_ENABLE(opengl,
 
455
[  --disable-opengl        Doesn't compile opengl support],
 
456
use_opengl=$enable_opengl, use_opengl="yes")
 
457
 
 
458
AC_ARG_ENABLE(sdl,
 
459
[  --disable-sdl           Doesn't compile sdl support],
 
460
use_sdl=$enable_sdl, use_sdl="yes")
 
461
 
 
462
AC_ARG_ENABLE(win32,
 
463
[  --disable-win32         Doesn't compile win32 support],
 
464
use_win32=$enable_win32, use_win32="yes")
 
465
 
 
466
AC_ARG_ENABLE(release,
 
467
[  --disable-release         Compile a debug version of the library],
 
468
[case "$enable_release" in
 
469
  yes)
 
470
    debug_symbols="no"
 
471
    ;;
 
472
  no)
 
473
    debug_symbols="yes"
 
474
    ;;
 
475
esac],
 
476
debug_symbols="no")
 
477
 
 
478
if test "$debug_symbols" = "yes" ; then
 
479
        CFLAGS="-Wall -g"
 
480
  LIBIL_CFLAGS="-Wall -g"
 
481
  LIBILU_CFLAGS="-Wall -g"
 
482
  LIBILUT_CFLAGS="-Wall -g"
 
483
fi
 
484
 
 
485
case "$host" in
 
486
  *mingw32*)
 
487
                LIBIL_CFLAGS=$LIBIL_CFLAGS" -mno-cygwin"
 
488
                LIBILU_CFLAGS=$LIBILU_CFLAGS" -mno-cygwin"
 
489
                LIBILUT_CFLAGS=$LIBILUT_CFLAGS" -mno-cygwin"
 
490
                VERSIONINFO=""
 
491
              ;;
 
492
  *cygwin*)
 
493
                LIBILUT_WIN32LIBPATH="-L/usr/lib/w32api"
 
494
                VERSIONINFO=""
 
495
              ;;
 
496
  *)
 
497
                use_win32="no"
 
498
                use_directx="no"
 
499
                VERSIONINFO="-version-info $DEVIL_LTVERSION"
 
500
              ;;
 
501
esac
 
502
AC_SUBST(VERSIONINFO)
 
503
 
 
504
dnl
 
505
dnl Libraries development checking
 
506
dnl
 
507
CPPFLAGS=$X_CFLAGS
 
508
AC_SUBST(X_CFLAGS)
 
509
AC_CHECK_HEADER(jpeglib.h, ,no_jpeg="yes")
 
510
AC_CHECK_HEADER(tiffio.h, ,no_tiff="yes")
 
511
AC_CHECK_HEADER(png.h, ,no_png="yes")
 
512
AC_CHECK_HEADER(lcms/lcms.h, ,no_lcms="yes")
 
513
AC_CHECK_HEADER(libmng.h, ,no_mng="yes")
 
514
AC_CHECK_HEADER(GL/gl.h, , use_opengl="no")
 
515
AC_CHECK_HEADER(d3d8.h, , use_directx="no")
 
516
AC_CHECK_HEADER(SDL.h, , use_sdl="no")
 
517
AC_CHECK_HEADER(zlib.h, LIBZ="-lz", LIBZ="")
 
518
AC_SUBST(LIBZ)
 
519
 
 
520
dnl
 
521
dnl Now we can check for bin libraries
 
522
dnl
 
523
if test "$no_jpeg" = "no" ; then
 
524
  AC_CHECK_LIB(jpeg, jpeg_start_decompress, LIBJPG="-ljpeg", LIBJPG="", )
 
525
  if test "$LIBJPG" != "-ljpeg" ; then
 
526
    no_jpeg="yes"
 
527
  else
 
528
    AC_CHECK_LIB(jpeg, jpeg_init_exif_field, use_exif="yes", use_exif="no", )
 
529
    if test "$use_exif" = "no" ; then
 
530
      AC_DEFINE(IL_USE_JPEGLIB_UNMODIFIED)
 
531
    fi
 
532
    AC_DEFINE(IL_USE_JPEGLIB_UNMODIFIED)
 
533
  fi
 
534
 
 
535
else
 
536
  LIBJPG=""
 
537
fi
 
538
AC_SUBST(LIBJPG)
 
539
case "$target" in
 
540
*-apple-darwin*)
 
541
    AC_DEFINE(IL_USE_JPEGLIB_UNMODIFIED)
 
542
    AC_DEFINE(MAX_OS_X)
 
543
esac
 
544
 
 
545
if test "$no_tiff" = "no" ; then
 
546
   AC_CHECK_LIB(tiff, TIFFReadRGBAImage, LIBTIFF="-ltiff", LIBTIFF="", -lm)
 
547
   if test "$LIBTIFF" != "-ltiff" ; then
 
548
     no_tiff="yes"
 
549
   fi
 
550
else
 
551
  LIBTIFF=""
 
552
fi
 
553
AC_SUBST(LIBTIFF)
 
554
 
 
555
if test "$no_png" = "no" ; then
 
556
   AC_CHECK_LIB(png, png_start_read_image, LIBPNG="-lpng", LIBPNG="", `libpng-config --libs`)
 
557
   if test "$LIBPNG" != "-lpng" ; then
 
558
     no_png="yes"
 
559
   fi
 
560
else
 
561
  LIBPNG=""
 
562
fi
 
563
AC_SUBST(LIBPNG)
 
564
 
 
565
if test "$no_lcms" = "no" ; then
 
566
   AC_CHECK_LIB(lcms,  cmsOpenProfileFromFile, LIBLCMS="-llcms", LIBLCMS="", -lm)
 
567
   if test "$LIBLCMS" != "-llcms" ; then
 
568
     no_lcms="yes"
 
569
   fi
 
570
else
 
571
  LIBLCMS=""
 
572
fi
 
573
AC_SUBST(LIBLCMS)
 
574
 
 
575
if test "$no_mng" = "no" ; then
 
576
   AC_CHECK_LIB(mng, mng_setcb_openstream, LIBMNG="-lmng", LIBMNG="", )
 
577
   if test "$LIBMNG" != "-lmng" ; then
 
578
     no_mng="yes"
 
579
   fi
 
580
else
 
581
  LIBMNG=""
 
582
fi
 
583
AC_SUBST(LIBMNG)
 
584
 
 
585
dnl
 
586
dnl ILUT APIs checking
 
587
dnl
 
588
 
 
589
dnl Check for SDL
 
590
AM_PATH_SDL(1.2.5,,)
 
591
HSDL="$SDL_CFLAGS"
 
592
LIBSDL="$SDL_LIBS"
 
593
AC_SUBST(LIBSDL)
 
594
AC_SUBST(HSDL)
 
595
 
 
596
 
 
597
if test "$use_opengl" = "yes" ; then
 
598
AC_CHECK_HEADER(GL/gl.h, [have_gl_hdr=yes])
 
599
case "$target" in
 
600
*-*-cygwin* | *-*-mingw32*)
 
601
        LIBGL="-lopengl32 -lglu32"
 
602
        ;;
 
603
*-apple-darwin*)
 
604
        LIBGL="-framework OpenGL"
 
605
        LDFLAGS_ILUT="-framework OpenGL"
 
606
        AC_SUBST(LDFLAGS_ILUT)
 
607
        ;;
 
608
*-*-*)
 
609
        AC_CHECK_LIB(GL,glLoadIdentity,[LIBGL="-lGL"])
 
610
        AC_CHECK_LIB(GLU,gluPerspective,[LIBGL="-lGLU"])
 
611
        ;;
 
612
esac
 
613
   if test "x$have_gl_hdr" != "xyes" ; then
 
614
     use_opengl="no"
 
615
     LIBGL=""
 
616
   fi
 
617
else
 
618
  LIBGL=""
 
619
fi
 
620
 
 
621
AC_SUBST(LIBGL)
 
622
 
 
623
if test "$use_allegro" = "yes" ; then
 
624
  AC_CHECK_PROG(allegro_config, allegro-config, yes, no, )
 
625
  if test $allegro_config = no ; then
 
626
    use_allegro="no"
 
627
    LIBALLEGRO=""
 
628
    HALLEGRO=""
 
629
  else
 
630
    LIBALLEGRO=`allegro-config --libs`
 
631
    HALLEGRO=`allegro-config --cflags`
 
632
  fi
 
633
fi
 
634
AC_SUBST(LIBALLEGRO)
 
635
AC_SUBST(HALLEGRO)
 
636
 
 
637
if test "$use_win32" = "no" ; then
 
638
  LIBGDI32=""
 
639
else
 
640
  LIBGDI32="-lgdi32"
 
641
fi
 
642
AC_SUBST(LIBGDI32)
 
643
 
 
644
dnl
 
645
dnl Prepares substitutions in config.h
 
646
dnl
 
647
 
 
648
SUPPORTED_FORMATS=""
 
649
 
 
650
if test "$no_bmp"  = "yes"  ; then
 
651
  AC_DEFINE(IL_NO_BMP)
 
652
else
 
653
  SUPPORTED_FORMATS=$SUPPORTED_FORMATS"BMP "
 
654
fi
 
655
AM_CONDITIONAL(IL_NO_BMP, test x$no_bmp != "xyes")
 
656
 
 
657
if test "$no_dcx"  = "yes"  ; then
 
658
  AC_DEFINE(IL_NO_DCX)
 
659
else
 
660
  SUPPORTED_FORMATS=$SUPPORTED_FORMATS"DCX "
 
661
fi
 
662
AM_CONDITIONAL(IL_NO_DCX, test x$no_dcx != "xyes")
 
663
 
 
664
if test "$no_dds"  = "yes"  ; then
 
665
  AC_DEFINE(IL_NO_DDS)
 
666
else
 
667
  SUPPORTED_FORMATS=$SUPPORTED_FORMATS"DDS "
 
668
fi
 
669
AM_CONDITIONAL(IL_NO_DDS, test x$no_dds != "xyes")
 
670
 
 
671
if test "$no_doom" = "yes" ; then
 
672
  AC_DEFINE(IL_NO_DOOM)
 
673
else
 
674
  SUPPORTED_FORMATS=$SUPPORTED_FORMATS"WAD "
 
675
fi
 
676
AM_CONDITIONAL(IL_NO_DOOM, test x$no_doom != "xyes")
 
677
 
 
678
if test "$no_gif"  = "yes"  ; then
 
679
  AC_DEFINE(IL_NO_GIF)
 
680
else
 
681
  SUPPORTED_FORMATS=$SUPPORTED_FORMATS"GIF "
 
682
fi
 
683
AM_CONDITIONAL(IL_NO_GIF, test x$no_gif != "xyes")
 
684
 
 
685
if test "$no_hdr"  = "yes"  ; then
 
686
  AC_DEFINE(IL_NO_HDR)
 
687
else
 
688
  SUPPORTED_FORMATS=$SUPPORTED_FORMATS"HDR "
 
689
fi
 
690
AM_CONDITIONAL(IL_NO_HDR, test x$no_hdr != "xyes")
 
691
 
 
692
if test "$no_icon" = "yes"  ; then
 
693
  AC_DEFINE(IL_NO_ICO)
 
694
else
 
695
  SUPPORTED_FORMATS=$SUPPORTED_FORMATS"ICO "
 
696
fi
 
697
AM_CONDITIONAL(IL_NO_ICO, test x$no_icon != "xyes")
 
698
 
 
699
if test "$no_jpeg" = "yes"  ; then
 
700
  AC_DEFINE(IL_NO_JPG)
 
701
else
 
702
  SUPPORTED_FORMATS=$SUPPORTED_FORMATS"JPG "
 
703
fi
 
704
AM_CONDITIONAL(IL_NO_JPG, test x$no_jpeg != "xyes")
 
705
 
 
706
if test "$no_lif"  = "yes"  ; then
 
707
  AC_DEFINE(IL_NO_LIF)
 
708
else
 
709
  SUPPORTED_FORMATS=$SUPPORTED_FORMATS"LIF "
 
710
fi
 
711
AM_CONDITIONAL(IL_NO_LIF, test x$no_lif != "xyes")
 
712
 
 
713
if test "$no_lcms"  = "yes"  ; then
 
714
  AC_DEFINE(IL_NO_LCMS)
 
715
else
 
716
  SUPPORTED_FORMATS=$SUPPORTED_FORMATS"LCMS "
 
717
fi
 
718
AM_CONDITIONAL(IL_NO_LCMS, test x$no_lcms != "xyes")
 
719
 
 
720
if test "$no_mdl"  = "yes"  ; then
 
721
  AC_DEFINE(IL_NO_MDL)
 
722
else
 
723
  SUPPORTED_FORMATS=$SUPPORTED_FORMATS"MDL "
 
724
fi
 
725
AM_CONDITIONAL(IL_NO_MDL, test x$no_mdl != "xyes")
 
726
 
 
727
if test "$no_mng"  = "yes"  ; then
 
728
  AC_DEFINE(IL_NO_MNG)
 
729
else
 
730
  SUPPORTED_FORMATS=$SUPPORTED_FORMATS"MNG "
 
731
fi
 
732
AM_CONDITIONAL(IL_NO_MNG, test x$no_mng != "xyes")
 
733
 
 
734
if test "$no_pcd"  = "yes"  ; then
 
735
  AC_DEFINE(IL_NO_PCD)
 
736
else
 
737
  SUPPORTED_FORMATS=$SUPPORTED_FORMATS"PCD "
 
738
fi
 
739
AM_CONDITIONAL(IL_NO_PCD, test x$no_pcd != "xyes")
 
740
 
 
741
if test "$no_pcx"  = "yes"  ; then
 
742
  AC_DEFINE(IL_NO_PCX)
 
743
else
 
744
  SUPPORTED_FORMATS=$SUPPORTED_FORMATS"PCX "
 
745
fi
 
746
AM_CONDITIONAL(IL_NO_PCX, test x$no_pcx != "xyes")
 
747
 
 
748
if test "$no_pic"  = "yes"  ; then
 
749
  AC_DEFINE(IL_NO_PIC)
 
750
else
 
751
  SUPPORTED_FORMATS=$SUPPORTED_FORMATS"PIC "
 
752
fi
 
753
AM_CONDITIONAL(IL_NO_PIC, test x$no_pic != "xyes")
 
754
 
 
755
if test "$no_pix"  = "yes"  ; then
 
756
  AC_DEFINE(IL_NO_PIX)
 
757
else
 
758
  SUPPORTED_FORMATS=$SUPPORTED_FORMATS"PIX "
 
759
fi
 
760
AM_CONDITIONAL(IL_NO_PIX, test x$no_pix != "xyes")
 
761
 
 
762
if test "$no_png"  = "yes"  ; then
 
763
  AC_DEFINE(IL_NO_PNG)
 
764
else
 
765
  SUPPORTED_FORMATS=$SUPPORTED_FORMATS"PNG "
 
766
fi
 
767
AM_CONDITIONAL(IL_NO_PNG, test x$no_png != "xyes")
 
768
 
 
769
if test "$no_pnm"  = "yes"  ; then
 
770
  AC_DEFINE(IL_NO_PNM)
 
771
else
 
772
  SUPPORTED_FORMATS=$SUPPORTED_FORMATS"PNM "
 
773
fi
 
774
AM_CONDITIONAL(IL_NO_PNM, test x$no_pnm != "xyes")
 
775
 
 
776
if test "$no_psd"  = "yes"  ; then
 
777
  AC_DEFINE(IL_NO_PSD)
 
778
else
 
779
  SUPPORTED_FORMATS=$SUPPORTED_FORMATS"PSD "
 
780
fi
 
781
AM_CONDITIONAL(IL_NO_PSD, test x$no_psd != "xyes")
 
782
 
 
783
if test "$no_psp"  = "yes"  ; then
 
784
  AC_DEFINE(IL_NO_PSP)
 
785
else
 
786
  SUPPORTED_FORMATS=$SUPPORTED_FORMATS"PSP "
 
787
fi
 
788
AM_CONDITIONAL(IL_NO_PSP, test x$no_psp != "xyes")
 
789
 
 
790
if test "$no_pxr"  = "yes"  ; then
 
791
  AC_DEFINE(IL_NO_PXR)
 
792
else
 
793
  SUPPORTED_FORMATS=$SUPPORTED_FORMATS"PXR "
 
794
fi
 
795
AM_CONDITIONAL(IL_NO_PXR, test x$no_pxr != "xyes")
 
796
 
 
797
if test "$no_raw"  = "yes"  ; then
 
798
  AC_DEFINE(IL_NO_RAW)
 
799
else
 
800
  SUPPORTED_FORMATS=$SUPPORTED_FORMATS"RAW "
 
801
fi
 
802
AM_CONDITIONAL(IL_NO_RAW, test x$no_raw != "xyes")
 
803
 
 
804
if test "$no_sgi"  = "yes"  ; then
 
805
  AC_DEFINE(IL_NO_SGI)
 
806
else
 
807
  SUPPORTED_FORMATS=$SUPPORTED_FORMATS"SGI "
 
808
fi
 
809
AM_CONDITIONAL(IL_NO_SGI, test x$no_sgi != "xyes")
 
810
 
 
811
if test "$no_tga"  = "yes"  ; then
 
812
  AC_DEFINE(IL_NO_TGA)
 
813
else
 
814
  SUPPORTED_FORMATS=$SUPPORTED_FORMATS"TGA "
 
815
fi
 
816
AM_CONDITIONAL(IL_NO_TGA, test x$no_tga != "xyes")
 
817
 
 
818
if test "$no_tiff" = "yes"  ; then
 
819
  AC_DEFINE(IL_NO_TIF)
 
820
else
 
821
  SUPPORTED_FORMATS=$SUPPORTED_FORMATS"TIF "
 
822
fi
 
823
AM_CONDITIONAL(IL_NO_TIF, test x$no_tiff != "xyes")
 
824
 
 
825
if test "$no_wal"  = "yes"  ; then
 
826
  AC_DEFINE(IL_NO_WAL)
 
827
else
 
828
  SUPPORTED_FORMATS=$SUPPORTED_FORMATS"WAL "
 
829
fi
 
830
AM_CONDITIONAL(IL_NO_WAL, test x$no_wal != "xyes")
 
831
 
 
832
if test "$no_xpm"  = "yes"  ; then
 
833
  AC_DEFINE(IL_NO_XPM)
 
834
else
 
835
  SUPPORTED_FORMATS=$SUPPORTED_FORMATS"XPM "
 
836
fi
 
837
AM_CONDITIONAL(IL_NO_XPM, test x$no_xpm != "xyes")
 
838
 
 
839
 
 
840
AC_MSG_RESULT([ ])
 
841
AC_MSG_RESULT([+----------------------------------------+])
 
842
AC_MSG_RESULT([|     IL library  Supported formats      |])
 
843
AC_MSG_RESULT([+----------------------------------------+-------+])
 
844
AC_MSG_RESULT([$SUPPORTED_FORMATS])
 
845
 
 
846
 
 
847
SUPPORTED_API=""
 
848
 
 
849
if test "$use_allegro" = "yes" ; then
 
850
  AC_DEFINE(ILUT_USE_ALLEGRO)
 
851
  SUPPORTED_API=$SUPPORTED_API"Allegro "
 
852
fi
 
853
 
 
854
if test "$use_directx" = "yes" ; then
 
855
  AC_DEFINE(ILUT_USE_DIRECTX8)
 
856
  SUPPORTED_APPI=$SUPPORTED_API"Directx8 "
 
857
fi
 
858
 
 
859
if test "$use_opengl" = "yes" ; then
 
860
  AC_DEFINE(ILUT_USE_OPENGL)
 
861
  SUPPORTED_API=$SUPPORTED_API"OpenGL "
 
862
  case "$target" in
 
863
    *-apple-darwin*)
 
864
        LIBILUT_CFLAGS=$LIBILUT_CFLAGS" -framework OpenGL"
 
865
  esac
 
866
fi
 
867
 
 
868
if test "$use_sdl" = "yes" ; then
 
869
  AC_DEFINE(ILUT_USE_SDL)
 
870
  SUPPORTED_API=$SUPPORTED_API"SDL "
 
871
fi
 
872
 
 
873
if test "$use_win32" = "yes" ; then
 
874
  AC_DEFINE(ILUT_USE_WIN32)
 
875
  SUPPORTED_API=$SUPPORTED_API"Win32 "
 
876
fi
 
877
 
 
878
if test "$use_directx" = "yes" ; then
 
879
  AC_DEFINE(ILUT_USE_DIRECTX8)
 
880
  SUPPORTED_API=$SUPPORTED_API"DirectX8 "
 
881
fi
 
882
 
 
883
AC_MSG_RESULT([ ])
 
884
AC_MSG_RESULT([+----------------------------------------+])
 
885
AC_MSG_RESULT([|      ILUT library  Supported APIs      |])
 
886
AC_MSG_RESULT([+----------------------------------------+-------+])
 
887
AC_MSG_RESULT([$SUPPORTED_API])
 
888
 
 
889
AC_MSG_RESULT([ ])
 
890
 
 
891
dnl
 
892
dnl Final vars
 
893
dnl
 
894
AC_SUBST(LIBIL_CFLAGS)
 
895
AC_SUBST(LIBILU_CFLAGS)
 
896
AC_SUBST(LIBILUT_CFLAGS)
 
897
AC_SUBST(LIBILUT_WIN32LIBPATH)
 
898
 
 
899
dnl
 
900
dnl Ouput files to generate
 
901
dnl
 
902
AC_CONFIG_FILES([Makefile \
 
903
           src-IL/Makefile \
 
904
           src-IL/src/Makefile \
 
905
           src-IL/include/Makefile \
 
906
           src-ILU/Makefile \
 
907
           src-ILU/src/Makefile \
 
908
           src-ILU/include/Makefile \
 
909
           src-ILUT/Makefile \
 
910
           src-ILUT/src/Makefile \
 
911
           src-ILUT/include/Makefile \
 
912
           include/Makefile \
 
913
           include/IL/Makefile ])
 
914
AC_OUTPUT