source: libcaca/trunk/configure.ac @ 2864

Last change on this file since 2864 was 2864, checked in by Sam Hocevar, 14 years ago

configure.ac: use more modern autoconf syntax.

  • Property svn:keywords set to Id
File size: 16.4 KB
Line 
1# $Id: configure.ac 2864 2008-10-04 13:05:13Z sam $
2
3AC_INIT(libcaca, 0.99.beta15)
4AC_PREREQ(2.50)
5AC_CONFIG_AUX_DIR(.auto)
6AC_CANONICAL_SYSTEM
7AM_INIT_AUTOMAKE([no-define tar-ustar])
8dnl AM_MAINTAINER_MODE
9
10AM_CONFIG_HEADER(config.h)
11
12LT_MAJOR="0"
13LT_MINOR="99"
14LT_MICRO="15"
15AC_SUBST(LT_MAJOR)
16AC_SUBST(LT_MINOR)
17AC_SUBST(LT_MICRO)
18LT_VERSION="$LT_MAJOR:$LT_MINOR:$LT_MICRO"
19AC_SUBST(LT_VERSION)
20
21AM_PROG_CC_C_O
22AC_PROG_CPP
23AC_PROG_CXX
24AC_PROG_CXXCPP
25_AM_DEPENDENCIES([OBJC])
26OBJC="${CC}"
27AC_SUBST(OBJC)
28AC_SUBST(OBJCFLAGS)
29AM_PROG_AS
30
31AC_LIBTOOL_WIN32_DLL
32AM_PROG_LIBTOOL
33AC_LIBTOOL_CXX
34
35AC_C_CONST
36AC_C_INLINE
37AC_TYPE_SIGNAL
38
39dnl AC_PROG_EGREP only exists in autoconf 2.54+, so we use AC_EGREP_CPP right
40dnl now otherwise it might be set in an obscure if statement. Same thing for
41dnl PKG_PROG_PKG_CONFIG which needs to be called first.
42AC_EGREP_CPP(yes, foo)
43PKG_PROG_PKG_CONFIG()
44m4_pattern_allow([^PKG_CONFIG_LIBDIR$])
45if test "${build}" != "${host}" -a "${PKG_CONFIG_LIBDIR}" = ""; then
46  export PKG_CONFIG_LIBDIR=/dev/null
47fi
48
49dnl output driver features
50AC_ARG_ENABLE(slang,
51  [  --enable-slang          slang graphics support (autodetected)])
52AC_ARG_ENABLE(ncurses,
53  [  --enable-ncurses        ncurses graphics support (autodetected)])
54AC_ARG_ENABLE(win32,
55  [  --enable-win32          Windows console support (autodetected)])
56AC_ARG_ENABLE(conio,
57  [  --enable-conio          DOS conio.h graphics support (autodetected)])
58AC_ARG_ENABLE(x11,
59  [  --enable-x11            X11 support (autodetected)])
60AC_ARG_ENABLE(gl,
61  [  --enable-gl             OpenGL support (autodetected)])
62AC_ARG_ENABLE(cocoa,
63  [  --enable-cocoa          Cocoa support (autodetected)])
64AC_ARG_ENABLE(network,
65  [  --enable-network        Network support (autodetected)])
66AC_ARG_ENABLE(vga,
67  [  --enable-vga            VGA support (default disabled)])
68
69dnl language bindings
70AC_ARG_ENABLE(csharp,
71  [  --enable-csharp         C# bindings (autodetected)])
72AC_ARG_ENABLE(cxx,
73  [  --enable-cxx            C++ bindings (autodetected)])
74AC_ARG_ENABLE(ruby,
75  [  --enable-ruby           Ruby bindings (autodetected)])
76
77dnl example programs features
78AC_ARG_ENABLE(imlib2,
79  [  --enable-imlib2         Imlib2 graphics support (autodetected)])
80
81dnl conditional builds
82AC_ARG_ENABLE(debug,
83  [  --enable-debug          build debug versions of the library (default no)])
84AC_ARG_ENABLE(plugins,
85  [  --enable-plugins        make X11 and GL drivers plugins (default disabled)])
86AC_ARG_ENABLE(doc,
87  [  --enable-doc            build documentation (needs doxygen and LaTeX)])
88AC_ARG_ENABLE(cppunit,
89  [  --enable-cppunit        use cppunit for unit tests (autodetected)])
90AC_ARG_ENABLE(zzuf,
91  [  --enable-zzuf           use zzuf for fuzzing tests (autodetected)])
92
93AC_CHECK_HEADERS(stdio.h stdarg.h signal.h sys/ioctl.h sys/time.h endian.h unistd.h arpa/inet.h netinet/in.h winsock2.h errno.h locale.h getopt.h dlfcn.h termios.h)
94AC_CHECK_FUNCS(signal ioctl snprintf vsnprintf getenv putenv strcasecmp htons)
95AC_CHECK_FUNCS(usleep gettimeofday)
96
97ac_cv_have_getopt_long="no"
98AC_CHECK_FUNCS(getopt_long,
99 [ac_cv_have_getopt_long="yes"],
100 [AC_CHECK_LIB(gnugetopt, getopt_long,
101   [ac_cv_have_getopt_long="yes"
102    GETOPT_LIBS="${GETOPT_LIBS} -lgnugetopt"])])
103if test "$ac_cv_have_getopt_long" != "no"; then
104  AC_DEFINE(HAVE_GETOPT_LONG, 1, Define to 1 if you have the `getopt_long' function.)
105fi
106AM_CONDITIONAL(NEED_GETOPT_LONG, test "$ac_cv_have_getopt_long" = "no")
107AC_SUBST(GETOPT_LIBS)
108
109AC_MSG_CHECKING(for Sleep)
110AC_TRY_COMPILE([#include <windows.h>],[Sleep(42);],
111 [AC_MSG_RESULT(yes)
112  AC_DEFINE(HAVE_SLEEP, 1, [Define to 1 if you have the `Sleep' function.])],
113 [AC_MSG_RESULT(no)])
114
115AC_MSG_CHECKING(for fsin/fcos)
116AC_TRY_COMPILE([],[double x; asm("fsin\n\tfcos":"=t"(x):);],
117 [AC_MSG_RESULT(yes)
118  AC_DEFINE(HAVE_FSIN_FCOS, 1, [Define to 1 if you have the `fsin' and `fcos' operands.])],
119 [AC_MSG_RESULT(no)])
120
121AC_MSG_CHECKING(for fldln2/fxch/fyl2x)
122AC_TRY_COMPILE([],[double x; asm("fldln2; fldln2; fxch; fyl2x":"=t"(x):);],
123 [AC_MSG_RESULT(yes)
124  AC_DEFINE(HAVE_FLDLN2, 1, [Define to 1 if you have the `fldln2' and other floating points operands.])],
125 [AC_MSG_RESULT(no)])
126
127AC_CHECK_HEADERS(zlib.h)
128AC_CHECK_LIB(z, gzopen, [ZLIB_LIBS="${ZLIB_LIBS} -lz"])
129
130AC_CHECK_LIB(m, sin, MATH_LIBS="${MATH_LIBS} -lm")
131
132CACA_DRIVERS=""
133
134if test "${enable_conio}" != "no"; then
135  ac_cv_my_have_conio="no"
136  AC_CHECK_HEADERS(conio.h,
137   [AC_MSG_CHECKING(for ScreenUpdate in pc.h)
138    AC_EGREP_HEADER(ScreenUpdate, pc.h,
139     [ac_cv_my_have_conio="yes"
140      AC_MSG_RESULT(yes)
141      AC_DEFINE(SCREENUPDATE_IN_PC_H, 1,
142                Define to 1 if <pc.h> defines ScreenUpdate.)
143      AC_DEFINE(USE_CONIO, 1, Define to 1 to activate the conio.h backend driver)
144      CACA_DRIVERS="${CACA_DRIVERS} conio"],
145     [AC_MSG_RESULT(no)])])
146  if test "${ac_cv_my_have_conio}" = "no" -a "${enable_conio}" = "yes"; then
147    AC_MSG_ERROR([cannot find conio.h])
148  fi
149fi
150
151if test "${enable_win32}" != "no"; then
152  ac_cv_my_have_win32="no"
153  AC_CHECK_HEADERS(windows.h,
154   [AC_MSG_CHECKING(for AllocConsole in windows.h)
155    AC_EGREP_HEADER(AllocConsole, windows.h,
156     [ac_cv_my_have_win32="yes"
157      AC_MSG_RESULT(yes)
158      AC_DEFINE(ALLOCCONSOLE_IN_WINDOWS_H, 1,
159                Define to 1 if <windows.h> defines AllocConsole.)
160      AC_DEFINE(USE_WIN32, 1, Define to 1 to activate the win32 backend driver)
161      CACA_DRIVERS="${CACA_DRIVERS} win32"],
162     [AC_MSG_RESULT(no)])])
163  if test "${ac_cv_my_have_win32}" = "no" -a "${enable_win32}" = "yes"; then
164    AC_MSG_ERROR([cannot find win32 console development files])
165  fi
166fi
167
168if test "${enable_slang}" != "no"; then
169  ac_cv_my_have_slang="no"
170  AC_CHECK_HEADERS(slang.h slang/slang.h,
171   [ac_cv_my_have_slang="yes"
172    AC_DEFINE(USE_SLANG, 1, Define to 1 to activate the slang backend driver)
173    AC_CHECK_LIB(slang, SLsmg_utf8_enable,
174     [AC_DEFINE(HAVE_SLSMG_UTF8_ENABLE, 1, Define to 1 if you have the `SLsmg_utf8_enable' function.)])
175    CPPFLAGS="${CPPFLAGS} -DOPTIMISE_SLANG_PALETTE=1"
176    CACA_LIBS="${CACA_LIBS} -lslang"
177    CACA_DRIVERS="${CACA_DRIVERS} slang"
178    break])
179  if test "${ac_cv_my_have_slang}" = "no" -a "${enable_slang}" = "yes"; then
180    AC_MSG_ERROR([cannot find slang development files])
181  fi
182fi
183
184if test "${enable_x11}" != "no"; then
185  AC_PATH_X
186  AC_CHECK_LIB(X11, XOpenDisplay,
187   [ac_cv_my_have_x11="yes"
188    if test -n "${x_includes}"; then X_CFLAGS="-I${x_includes}"; fi
189    if test -n "${x_libraries}"; then X_LIBS="-L${x_libraries}"; fi
190    AC_DEFINE(USE_X11, 1, Define to 1 to activate the X11 backend driver)
191    CPPFLAGS="${CPPFLAGS} ${X_CFLAGS}"
192    X11_LIBS="${X11_LIBS} -lX11 ${X_LIBS}"
193    CACA_DRIVERS="${CACA_DRIVERS} x11"],
194   [ac_cv_my_have_x11="no"],
195   [[`if test -n "${x_libraries}"; then echo -L${x_libraries}; fi`]])
196  AC_CHECK_HEADERS(X11/XKBlib.h)
197  if test "${ac_cv_my_have_x11}" != "yes" -a "${enable_x11}" = "yes"; then
198    AC_MSG_ERROR([cannot find X11 development files])
199  fi
200fi
201
202if test "${enable_gl}" != "no"; then
203  ac_cv_my_have_gl="no"
204  AC_CHECK_HEADERS(GL/gl.h OpenGL/gl.h,
205   [AC_CHECK_HEADERS(GL/glut.h,
206     [AC_CHECK_LIB(glut, glutCloseFunc,
207       [AC_DEFINE(HAVE_GLUTCLOSEFUNC, 1, Define to 1 if you have the `glutCloseFunc' function.)])
208      AC_CHECK_LIB(glut, glutMainLoopEvent,
209       [ac_cv_my_have_gl="yes"])
210      AC_CHECK_LIB(glut, glutCheckLoop,
211       [ac_cv_my_have_gl="yes"
212        AC_DEFINE(HAVE_GLUTCHECKLOOP, 1, Define to 1 if you have the `glutCheckLoop' function.)])])
213      break])
214  if test "${ac_cv_my_have_gl}" = "yes"; then
215    AC_DEFINE(USE_GL, 1, Define to 1 to activate the OpenGL backend driver)
216    GL_LIBS="${GL_LIBS} -lGL -lglut"
217    CACA_DRIVERS="${CACA_DRIVERS} gl"
218  elif test "${enable_gl}" = "yes"; then
219    AC_MSG_ERROR([cannot find OpenGL+FreeGLUT development files])
220  fi
221  PKG_CHECK_MODULES(FTGL, ftgl >= 2.1.3, [FTGL="yes"], [FTGL="no"])
222fi
223AM_CONDITIONAL(USE_FTGL, test "${FTGL}" = "yes")
224
225if test "${enable_cocoa}" != "no"; then
226  ac_cv_my_have_cocoa="no"
227  AC_CHECK_HEADERS(Cocoa/Cocoa.h,
228   [ac_cv_my_have_cocoa="yes"])
229  if test "${ac_cv_my_have_cocoa}" = "yes"; then
230    case x${target} in
231    xpowerpc*darwin*)
232      # 10.3 needed to link with X11
233      MACOSX_SDK=/Developer/SDKs/MacOSX10.3.9.sdk
234      GCC_VERSION=3.3
235      ARCH="-arch ppc"
236      MACOSX_SDK_CFLAGS="-nostdinc -isystem ${MACOSX_SDK}/usr/include/gcc/darwin/${GCC_VERSION} -isystem ${MACOSX_SDK}/usr/include"
237      MACOSX_SDK_CXXFLAGS="-nostdinc++ -I${MACOSX_SDK}/usr/include/gcc/darwin/${GCC_VERSION}/c++ -I${MACOSX_SDK}/usr/include/gcc/darwin/${GCC_VERSION}/c++/ppc-darwin -I${MACOSX_SDK}/usr/include/gcc/darwin/${GCC_VERSION}/c++/backward"
238      MACOSX_SDK_LDFLAGS="-L${MACOSX_SDK}/usr/lib/gcc/darwin -L${MACOSX_SDK}/usr/lib/gcc/darwin/${GCC_VERSION} -L${MACOSX_SDK}/usr/lib"
239      ;;
240    x*86*darwin*)
241      MACOSX_SDK=/Developer/SDKs/MacOSX10.4u.sdk
242      GCC_VERSION=4.0
243      ARCH="-arch i386"
244      MACOSX_SDK_CFLAGS="-isysroot ${MACOSX_SDK}"
245      MACOSX_SDK_CXXFLAGS="${MACOSX_SDK_CFLAGS}"
246      ;;
247    esac
248    CC=gcc-${GCC_VERSION}
249    CXX=g++-${GCC_VERSION}
250    MACOSX_SDK_FRAMEWORKS="-F${MACOSX_SDK}/System/Library/Frameworks"
251    CPPFLAGS="${CPPFLAGS} ${ARCH} ${MACOSX_SDK_FRAMEWORKS}"
252    CFLAGS="${CFLAGS} ${MACOSX_SDK_CFLAGS}"
253    CXXFLAGS="${CXXFLAGS} ${MACOSX_SDK_CXXFLAGS}"
254    OBJCFLAGS="${OBJCFLAGS} ${MACOSX_SDK_CFLAGS}"
255    LDFLAGS="${ARCH} ${MACOSX_SDK_LDFLAGS} ${LDFLAGS}"
256    AC_DEFINE(USE_COCOA, 1, Define to 1 to activate the Cocoa backend driver)
257    CACA_LIBS="${CACA_LIBS} -Wl,-syslibroot,${MACOSX_SDK},-framework,Cocoa"
258    CACA_DRIVERS="${CACA_DRIVERS} cocoa"
259  elif test "${enable_cocoa}" = "yes"; then
260    AC_MSG_ERROR([cannot find Cocoa development files])
261  fi
262fi
263AM_CONDITIONAL(USE_COCOA, test "${ac_cv_my_have_cocoa}" = "yes")
264
265if test "${enable_ncurses}" != "no"; then
266  ac_cv_my_have_ncurses="no"
267  AC_CHECK_HEADERS(ncursesw/ncurses.h ncurses/ncurses.h ncurses.h curses.h,
268   [ncurses="no"
269    AC_CHECK_LIB(ncursesw, initscr,
270     [ncurses="-lncursesw"],
271     [AC_CHECK_LIB(ncurses, initscr,
272       [ncurses="-lncurses"])])
273    if test "${ncurses}" = "no"; then
274      continue
275    fi
276    ac_cv_my_have_ncurses="yes"
277    AC_DEFINE(USE_NCURSES, 1, Define to 1 to activate the ncurses backend driver)
278    CACA_LIBS="${CACA_LIBS} ${ncurses}"
279    CACA_DRIVERS="${CACA_DRIVERS} ncurses"
280    dnl  Check for resizeterm or resize_term
281    SAVED_LIBS="${LIBS}"
282    LIBS="${LIBS} ${ncurses}"
283    AC_CHECK_FUNCS(resizeterm resize_term)
284    LIBS="${SAVED_LIBS}"
285    break])
286  if test "${ac_cv_my_have_ncurses}" = "no" -a "${enable_ncurses}" = "yes"; then
287    AC_MSG_ERROR([cannot find ncurses development files])
288  fi
289fi
290
291if test "${enable_vga}" = "yes"; then
292  ac_cv_my_have_vga="yes"
293  CPPFLAGS="${CPPFLAGS} -I. -D__KERNEL__ -nostdinc -include kernel/kernel.h -fno-stack-protector"
294  CFLAGS="${CFLAGS} -fno-builtin -O2 -Wall -fno-stack-protector"
295  CCASFLAGS="${CCASFLAGS} -I. -fno-stack-protector"
296  LDFLAGS="${LDFLAGS} -nostdlib -Wl,-N -Wl,-Ttext -Wl,100000 -fno-stack-protector"
297  AC_DEFINE(USE_VGA, 1, Define to 1 to activate the VGA backend driver)
298  CACA_DRIVERS="${CACA_DRIVERS} vga"
299fi
300AM_CONDITIONAL(USE_KERNEL, test "${ac_cv_my_have_vga}" = "yes")
301
302if test "${enable_debug}" = "yes"; then
303  AC_DEFINE(DEBUG, 1, Define to 1 to activate debug)
304fi
305
306if test "${enable_plugins}" = "yes"; then
307  ac_cv_my_have_plugins="yes"
308  AC_DEFINE(USE_PLUGINS, 1, Define to 1 to activate plugins)
309  CACA_LIBS="${CACA_LIBS} -ldl"
310else
311  CACA_CFLAGS="${CACA_CFLAGS} ${X11_CFLAGS} ${GL_CFLAGS} ${FTGL_CFLAGS}"
312  CACA_LIBS="${CACA_LIBS} ${X11_LIBS} ${GL_LIBS} ${FTGL_LIBS}"
313fi
314AM_CONDITIONAL(USE_PLUGINS, test "${ac_cv_my_have_plugins}" = "yes")
315
316AC_MSG_CHECKING(valid output drivers)
317if test -z "${CACA_DRIVERS}"; then
318  AC_MSG_RESULT(no)
319  AC_MSG_ERROR([no output drivers were selected!])
320else
321  CACA_DRIVERS="${CACA_DRIVERS# *}"
322  AC_MSG_RESULT([${CACA_DRIVERS}])
323fi
324
325AC_SUBST(MATH_LIBS)
326AC_SUBST(ZLIB_LIBS)
327AC_SUBST(GETOPT_LIBS)
328AC_SUBST(CACA_CFLAGS)
329AC_SUBST(CACA_LIBS)
330AC_SUBST(X11_CFLAGS)
331AC_SUBST(X11_LIBS)
332AC_SUBST(GL_CFLAGS)
333AC_SUBST(GL_LIBS)
334
335# How to get the C99 types. See caca/caca_types.h.in for details about
336# the CACA_TYPES variable
337if test "${ac_cv_my_have_vga}" = "yes"; then
338  CACA_TYPES=0
339else
340  AC_CHECK_HEADERS(stdint.h,
341    [CACA_TYPES=1],
342    [AC_CHECK_HEADERS(inttypes.h,
343      [CACA_TYPES=2],
344      [AC_CHECK_HEADERS(windows.h,
345        [CACA_TYPES=3],
346        [CACA_TYPES=0])])])
347fi
348AC_SUBST(CACA_TYPES)
349
350# Optimizations
351CFLAGS="${CFLAGS} -g -O2 -fno-strength-reduce -fomit-frame-pointer"
352# Code qui fait des warnings == code de porc == deux baffes dans ta gueule
353CFLAGS="${CFLAGS} -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs -Wsign-compare"
354
355CACA_BINDINGS=""
356
357# Build the C++ bindings?
358ac_cv_my_have_cxx="no"
359if test "${enable_cxx}" != "no"; then
360  AC_MSG_CHECKING([working <iostream>])
361  AC_LANG_PUSH(C++)
362  AC_TRY_COMPILE(
363   [#include <iostream>],
364   [],
365   [ac_cv_my_have_cxx="yes"
366    CACA_BINDINGS="${CACA_BINDINGS} C++"])
367  AC_LANG_POP(C++)
368  AC_MSG_RESULT([$ac_cv_my_have_cxx])
369fi
370AM_CONDITIONAL(USE_CXX, test "${ac_cv_my_have_cxx}" = "yes")
371
372# Build the .NET bindings?
373ac_cv_my_have_csharp="no"
374if test "${enable_csharp}" != "no"; then
375  AC_PATH_PROG(GMCS, gmcs, no)
376  AC_PATH_PROG(GACUTIL, gacutil, no)
377  if test "${GMCS}" != "no" -a "${GACUTIL}" != "no"; then
378    ac_cv_my_have_csharp="yes"
379    CACA_BINDINGS="${CACA_BINDINGS} C#"
380  fi
381fi
382AM_CONDITIONAL(USE_CSHARP, test "${ac_cv_my_have_csharp}" = "yes")
383
384# Build the Ruby bindings?
385ac_cv_my_have_ruby="no"
386if test "${enable_ruby}" != "no"; then
387  AC_PATH_PROG(RUBY, ruby, no)
388  if test "${RUBY}" != "no"; then
389    RUBY_CFLAGS="-I$(ruby -r rbconfig -e 'print Config::CONFIG@<:@"archdir"@:>@')"
390    RUBY_LIBS="-L$(ruby -r rbconfig -e 'print Config::CONFIG@<:@"libdir"@:>@') -l$(ruby -r rbconfig -e 'print Config::CONFIG@<:@"RUBY_SO_NAME"@:>@')"
391    RUBY_SITEARCHDIR=`ruby -r rbconfig -e 'print Config::CONFIG@<:@"sitearchdir"@:>@'`
392    RUBY_SITELIBDIR=`ruby -r rbconfig -e 'print Config::CONFIG@<:@"sitelibdir"@:>@'`
393    AC_SUBST(RUBY_CFLAGS)
394    AC_SUBST(RUBY_LIBS)
395    AC_SUBST(RUBY_SITEARCHDIR)
396    AC_SUBST(RUBY_SITELIBDIR)
397    CPPFLAGS="${CPPFLAGS} ${RUBY_CFLAGS}"
398    AC_CHECK_HEADERS([ruby.h],
399     [ac_cv_my_have_ruby="yes"
400      CACA_BINDINGS="${CACA_BINDINGS} Ruby"])
401  fi
402fi
403AM_CONDITIONAL(USE_RUBY, test "${ac_cv_my_have_ruby}" = "yes")
404
405AC_MSG_CHECKING(available language bindings)
406if test -z "${CACA_BINDINGS}"; then
407  AC_MSG_RESULT(no)
408else
409  CACA_BINDINGS="${CACA_BINDINGS# *}"
410  AC_MSG_RESULT([${CACA_BINDINGS}])
411fi
412
413# Build cacaserver?
414ac_cv_my_have_network="no"
415AC_CHECK_HEADERS(sys/socket.h,
416 [ac_cv_my_have_network="yes"])
417AM_CONDITIONAL(USE_NETWORK, test "${ac_cv_my_have_network}" = "yes")
418
419# Use Imlib2?
420if test "${enable_imlib2}" != "no"; then
421  PKG_CHECK_MODULES(IMLIB2, imlib2, [IMLIB2="yes"], [IMLIB2="no"])
422  if test "${IMLIB2}" = "yes"; then
423    AC_DEFINE(USE_IMLIB2, 1, Define to 1 to use Imlib2)
424  fi
425fi
426
427# Build development tools?
428PKG_CHECK_MODULES(PANGOFT2, pangoft2, [PANGOFT2="yes"], [PANGOFT2="no"])
429AM_CONDITIONAL(USE_PANGO, test "${PANGOFT2}" = "yes")
430
431# Build documentation?
432DOXYGEN="no"
433LATEX="no"
434if test "${enable_doc}" != "no"; then
435  AC_PATH_PROG(DOXYGEN, doxygen, no)
436  if test "${DOXYGEN}" != "no"; then
437    # Build LaTeX documentation?
438    AC_PATH_PROG(LATEX, pdflatex, no)
439    AC_PATH_PROG(KPSEWHICH, kpsewhich, no)
440    AC_PATH_PROG(DVIPS, dvips, no)
441    if test "${DVIPS}" = "no" -o "${KPSEWHICH}" = "no"; then
442      LATEX="no"
443    fi
444    if test "${LATEX}" != "no"; then
445      AC_MSG_CHECKING(for a4.sty and a4wide.sty)
446      if "${KPSEWHICH}" a4.sty >/dev/null 2>&1; then
447        if "${KPSEWHICH}" a4wide.sty >/dev/null 2>&1; then
448          AC_MSG_RESULT(yes)
449        else
450          LATEX="no"
451          AC_MSG_RESULT(no)
452        fi
453      else
454        LATEX="no"
455        AC_MSG_RESULT(no)
456      fi
457    fi
458  fi
459fi
460AM_CONDITIONAL(BUILD_DOCUMENTATION, test "${DOXYGEN}" != "no")
461AM_CONDITIONAL(USE_LATEX, test "${LATEX}" != "no")
462
463# Use cppunit for unit tests?
464PKG_CHECK_MODULES(CPPUNIT, cppunit, [CPPUNIT="yes"], [CPPUNIT="no"])
465AM_CONDITIONAL(USE_CPPUNIT, test "$CPPUNIT" = "yes")
466
467# Use zzuf for fuzzing tests?
468ZZUF="no"
469if test "${enable_zzuf}" != "no"; then
470  AC_PATH_PROG(ZZUF, zzuf, no)
471fi
472AM_CONDITIONAL(USE_ZZUF, test "${ZZUF}" != "no")
473
474AC_CONFIG_FILES([
475  Makefile
476  kernel/Makefile
477  caca/Makefile
478  src/Makefile
479  examples/Makefile
480  tests/Makefile
481  tools/Makefile
482  csharp/Makefile
483  cxx/Makefile
484  python/Makefile
485  ruby/Makefile
486  doc/Makefile
487  msvc/Makefile
488])
489AC_CONFIG_FILES([
490  caca/caca_types.h
491  caca/caca.pc
492  csharp/caca-sharp.dll.config
493  cxx/caca++.pc
494  doc/doxygen.cfg
495])
496AC_CONFIG_FILES([caca-config], [chmod 0755 caca-config])
497AC_OUTPUT
498
Note: See TracBrowser for help on using the repository browser.