Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 
 
 

474 строки
15 KiB

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