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