source: libcaca/trunk/configure.ac @ 2535

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