1 # -*- mode: shell-script -*-
2 AC_INIT(main/inferno.c)
4 AC_VALIDATE_CACHED_SYSTEM_TUPLE(
10 AM_CONFIG_HEADER(conf.h)
11 AM_INIT_AUTOMAKE(d2x, 0.0.9)
16 AC_CHECK_TOOL(CC, gcc, :)
18 AC_CHECK_TOOL(RANLIB, ranlib, :)
19 AC_CHECK_TOOL(AR, ar, :)
27 dnl Count warnings as errors?
29 [ --with-werror Count compiler warning as errors ],
31 yes) CFLAGS="-Werror $CFLAGS" ;;
33 *) AC_MSG_ERROR(bad value ${withval} for --with-werror) ;;
36 dnl Build with NDEBUG?
38 [ --with-ndebug Take out extra Asserts, Int3, etc ],
40 yes) AC_DEFINE(NDEBUG) ;;
42 *) AC_MSG_ERROR(bad value ${withval} for --with-ndebug) ;;
46 AM_CONDITIONAL(ENV_DJGPP, test "$host_os" = "msdosdjgpp")
47 if test "$host_os" = "msdosdjgpp"; then
49 CFLAGS="-I \$(top_srcdir)/arch/dos/include $CFLAGS"
50 AC_DEFINE(__ENV_DJGPP__)
51 AC_PATH_PROG(NASM, nasm, no)
55 CFLAGS="-D_REENTRANT -pipe $CFLAGS"
56 AM_CONDITIONAL(ENV_CYGWIN, test "$host_os" = "cygwin")
58 AC_DEFINE(__ENV_LINUX__)
60 if test "$host_os" = "cygwin"; then
61 AC_CHECK_LIB(SDL, SDL_Init, SDL_LIBS="-lSDL", AC_MSG_ERROR(The SDL which is required not found.))
63 AC_CHECK_LIB(SDL, SDL_Init, SDL_LIBS="-lSDL", AC_MSG_ERROR(The SDL which is required not found.),-ldl -lpthread)
65 AC_CHECK_HEADERS(netipx/ipx.h)
70 [ --with-opengl Build OpenGL support ],
74 *) AC_MSG_ERROR(bad value ${withval} for --with-opengl) ;;
77 if test x$opengl = xtrue; then
78 AC_CHECK_LIB(GL, main,
80 [AC_MSG_ERROR([GL not found, OpenGL cannot be built])
83 AC_CHECK_LIB(GLU,main,
84 OGL_LIBS="${OGL_LIBS} -lGLU",
85 [AC_MSG_ERROR([GLU not found, OpenGL cannot be built])
90 AM_CONDITIONAL(USE_OPENGL, test x$opengl = xtrue)
94 [ --with-ggi Build GGI support ],
98 *) AC_MSG_ERROR(bad value ${withval} for --with-ggi) ;;
101 if test x$ggi = xtrue; then
102 AC_CHECK_LIB(ggi, ggiInit,
104 [AC_MSG_ERROR([GGI not found, GGI version cannot be built]); ggi=false])
105 AC_CHECK_LIB(gii, giiInit,
106 GGI_LIBS="${GGI_LIBS} -lgii",
107 [AC_MSG_ERROR([GII not found, GGI version cannot be built]); ggi=false])
110 AM_CONDITIONAL(USE_GGI, test x$ggi = xtrue)
114 [ --with-svga Build SVGALib support ],
115 [case "${withval}" in
118 *) AC_MSG_ERROR(bad value ${withval} for --with-svga) ;;
121 if test x$svga = xtrue; then
122 AC_CHECK_LIB(vga, vga_getmousetype,
124 [AC_MSG_ERROR([vga not found, SVGALib cannot be built])
127 AC_CHECK_LIB(vgagl,gl_getcontext,
128 SVGA_LIBS="${SVGA_LIBS} -lvgagl",
129 [AC_MSG_ERROR([vgagl not found, SVGALib cannot be built])
134 AM_CONDITIONAL(USE_SVGALIB, test x$svga = xtrue)
136 if test x$opengl = xtrue; then
140 if test x$svga = xtrue; then
144 if test x$ggi = xtrue; then
153 AC_PATH_PROG(NASM, nasm, no)
154 CFLAGS="-I\$(top_srcdir)/input/linux/include -I\$(top_srcdir)/arch/linux/include $CFLAGS"
158 # Check for NASM and network
161 AC_ARG_WITH(assembler,
162 [ --without-assembler Do not use assembler optimization ],
163 if test x$withval = xno; then
167 [ --without-network Do not build network/serial support ],
168 if test x$withval = xno; then
172 if test "$NASM" = "no"; then
175 if test "$NO_ASM" = 1; then
181 NASMFLAGS="-f win32 -i\$(srcdir)/"
184 NASMFLAGS="-f coff -i\$(srcdir)/"
187 NASMFLAGS="-f elf -d__ENV_LINUX__ -i\$(srcdir)/"
190 AC_MSG_ERROR([Assembler not supported for this OS])
193 if test "$NO_NETWORK" = 0; then
196 AM_CONDITIONAL(USE_ASM, test "$NO_ASM" != 1)
197 AM_CONDITIONAL(USE_NETWORK, test "$NO_NETWORK" != 1)
207 #libdir='$(shell pwd)/${top_srcdir}/main'
214 arch/dos/allg_snd/Makefile
215 arch/dos/allg_snd/sound/Makefile
216 arch/dos/allg_snd/sound/drv/Makefile
217 arch/dos/bak/Makefile
218 arch/dos/comm/Makefile
219 arch/dos/comm/include/Makefile
220 arch/dos/include/Makefile
221 arch/dos/mm_snd/Makefile
222 arch/dos/mm_snd/include/Makefile
223 arch/include/Makefile
225 arch/ogl/include/Makefile
227 arch/linux/include/Makefile
229 arch/win32/d3dframe/Makefile
230 arch/win32/include/Makefile
237 input/linux/include/Makefile
249 unused/novga/Makefile
250 unused/pa_null/Makefile
253 unused/vga/new/Makefile
254 unused/win95/Makefile
257 tools/cvs2cl/Makefile