3 AM_CONFIG_HEADER(conf.h)
4 AM_INIT_AUTOMAKE(d2x, 0.0.8)
17 CFLAGS="-D_REENTRANT -g -O2 -Wall -pipe"
20 AC_CHECK_LIB(SDL, SDL_Init, SDL_LIBS="-lSDL", AC_MSG_ERROR(The SDL, which is required, not found.),-ldl -lpthread)
21 AC_CHECK_HEADERS(netipx/ipx.h)
24 # Check for NASM and network
27 AC_ARG_WITH(assembler,
28 [ --without-assembler Do not use assembler optimization ],
29 if test x$withval = xno; then
33 [ --without-network Do not build network/serial support ],
34 if test x$withval = xno; then
39 AC_PATH_PROG(NASM, nasm, no)
40 if test "$NASM" = "no"; then
43 if test "$NO_ASM" = 1; then
52 NASMFLAGS="-f elf -d__ENV_LINUX__"
56 if test "$NO_NETWORK" = 0; then
59 AM_CONDITIONAL(USE_ASM, test "$NO_ASM" != 1)
64 [ --with-opengl Build OpenGL support ],
68 *) AC_MSG_ERROR(bad value ${withval} for --with-opengl) ;;
71 if test x$opengl = xtrue; then
72 AC_CHECK_LIB(MesaGL, main,
74 [AC_MSG_ERROR(MesaGL not found, OpenGL cannot be built)
76 -L/usr/X11R6/lib -lX11 -lXext -lm)
77 AC_CHECK_LIB(MesaGLU,main,
78 OGL_LIBS="${OGL_LIBS} -lMesaGLU",
79 [AC_MSG_ERROR(MesaGLU not found, OpenGL cannot be built)
81 -lMesaGL -L/usr/X11R6/lib -lX11 -lXext -lm)
84 if test x$opengl = xtrue; then
87 AM_CONDITIONAL(USE_OPENGL, test x$opengl = xtrue)
92 #libdir='$(shell pwd)/${top_srcdir}/main'