1 AC_INIT(main/inferno.c)
3 AM_CONFIG_HEADER(conf.h)
4 AM_INIT_AUTOMAKE(d2x, 0.0.9)
18 dnl Count warnings as errors?
20 [ --enable-werror Count compiler warning as errors ],
21 [case "${enableval}" in
22 yes) CFLAGS="-Werror $CFLAGS" ;;
24 *) AC_MSG_ERROR(bad value ${enableval} for --enable-werror) ;;
27 dnl Build with NDEBUG?
29 [ --enable-ndebug Take out extra Asserts, Int3, etc ],
30 [case "${enableval}" in
31 yes) AC_DEFINE(NDEBUG) ;;
33 *) AC_MSG_ERROR(bad value ${withval} for --enable-ndebug) ;;
37 AM_CONDITIONAL(ENV_DJGPP, test "$OSTYPE" = "MSDOS")
38 if test "$OSTYPE" = "MSDOS"; then
40 CFLAGS="-I \$(top_srcdir)/arch/dos/include $CFLAGS"
41 AC_DEFINE(__ENV_DJGPP__)
42 AC_PATH_PROG(NASM, nasmw, no)
46 CFLAGS="-D_REENTRANT -pipe $CFLAGS"
47 AM_CONDITIONAL(ENV_CYGWIN, test "$CYGWIN" = "yes")
49 AM_CONDITIONAL(ENV_LINUX, test "$OSTYPE" != "MSDOS")
50 AC_DEFINE(__ENV_LINUX__)
53 if test "$CYGWIN" = "yes"; then
54 AC_CHECK_LIB(SDL, SDL_Init, SDL_LIBS="-lSDL", AC_MSG_ERROR(The SDL which is required not found.))
56 AC_CHECK_LIB(SDL, SDL_Init, SDL_LIBS="-lSDL", AC_MSG_ERROR(The SDL which is required not found.),-ldl -lpthread)
58 AC_CHECK_HEADERS(netipx/ipx.h)
63 [ --with-opengl Build OpenGL support ],
67 *) AC_MSG_ERROR(bad value ${withval} for --with-opengl) ;;
70 if test x$opengl = xtrue; then
71 AC_CHECK_LIB(GL, main,
73 [AC_MSG_ERROR([GL not found, OpenGL cannot be built])
76 AC_CHECK_LIB(GLU,main,
77 OGL_LIBS="${OGL_LIBS} -lGLU",
78 [AC_MSG_ERROR([GLU not found, OpenGL cannot be built])
83 AM_CONDITIONAL(USE_OPENGL, test x$opengl = xtrue)
87 [ --with-ggi Build GGI support ],
91 *) AC_MSG_ERROR(bad value ${withval} for --with-ggi) ;;
94 if test x$ggi = xtrue; then
95 AC_CHECK_LIB(ggi, ggiInit,
97 [AC_MSG_ERROR([GGI not found, GGI version cannot be built]); ggi=false])
98 AC_CHECK_LIB(gii, giiInit,
99 GGI_LIBS="${GGI_LIBS} -lgii",
100 [AC_MSG_ERROR([GII not found, GGI version cannot be built]); ggi=false])
103 AM_CONDITIONAL(USE_GGI, test x$ggi = xtrue)
107 [ --with-svga Build SVGALib support ],
108 [case "${withval}" in
111 *) AC_MSG_ERROR(bad value ${withval} for --with-svga) ;;
114 if test x$svga = xtrue; then
115 AC_CHECK_LIB(vga, vga_getmousetype,
117 [AC_MSG_ERROR([vga not found, SVGALib cannot be built])
120 AC_CHECK_LIB(vgagl,gl_getcontext,
121 SVGA_LIBS="${SVGA_LIBS} -lvgagl",
122 [AC_MSG_ERROR([vgagl not found, SVGALib cannot be built])
127 AM_CONDITIONAL(USE_SVGALIB, test x$svga = xtrue)
129 if test x$opengl = xtrue; then
133 if test x$svga = xtrue; then
137 if test x$ggi = xtrue; then
146 AC_PATH_PROG(NASM, nasm, no)
147 CFLAGS="-I\$(top_srcdir)/input/linux/include -I\$(top_srcdir)/arch/linux/include $CFLAGS"
151 # Check for NASM and network
154 AC_ARG_WITH(assembler,
155 [ --without-assembler Do not use assembler optimization ],
156 if test x$withval = xno; then
160 [ --without-network Do not build network/serial support ],
161 if test x$withval = xno; then
165 if test "$NASM" = "no"; then
168 if test "$NO_ASM" = 1; then
177 if test "$OSTYPE" = "MSDOS"; then
180 NASMFLAGS="-f elf -d__ENV_LINUX__ -i\$(srcdir)/"
185 if test "$NO_NETWORK" = 0; then
188 AM_CONDITIONAL(USE_ASM, test "$NO_ASM" != 1)
189 AM_CONDITIONAL(USE_NETWORK, test "$NO_NETWORK" != 1)
199 #libdir='$(shell pwd)/${top_srcdir}/main'
206 arch/dos/allg_snd/Makefile
207 arch/dos/allg_snd/sound/Makefile
208 arch/dos/allg_snd/sound/drv/Makefile
209 arch/dos/bak/Makefile
210 arch/dos/comm/Makefile
211 arch/dos/comm/include/Makefile
212 arch/dos/include/Makefile
213 arch/dos/mm_snd/Makefile
214 arch/dos/mm_snd/include/Makefile
215 arch/include/Makefile
217 arch/ogl/include/Makefile
219 arch/linux/include/Makefile
221 arch/win32/d3dframe/Makefile
222 arch/win32/include/Makefile
229 input/linux/include/Makefile
241 unused/novga/Makefile
242 unused/pa_null/Makefile
245 unused/vga/new/Makefile
246 unused/win95/Makefile
249 tools/cvs2cl/Makefile