2001-11-14 04:16:19 +00:00
|
|
|
# -*- mode: shell-script -*-
|
2002-07-16 20:46:33 +00:00
|
|
|
|
|
|
|
define([D2X_MAJOR],0)
|
2003-02-26 11:11:14 +00:00
|
|
|
define([D2X_MINOR],2)
|
2003-10-06 09:18:21 +00:00
|
|
|
define([D2X_MICRO],6)
|
2002-07-16 20:46:33 +00:00
|
|
|
|
|
|
|
AC_INIT(d2x,[D2X_MAJOR.D2X_MINOR.D2X_MICRO],[descent-source@warpcore.org])
|
2002-01-31 18:47:38 +00:00
|
|
|
AC_PREREQ(2.52)
|
2001-11-14 04:16:19 +00:00
|
|
|
|
|
|
|
AC_CANONICAL_BUILD
|
2001-11-14 11:00:05 +00:00
|
|
|
AC_CANONICAL_HOST
|
2002-01-29 00:15:27 +00:00
|
|
|
AC_CANONICAL_TARGET
|
2001-11-14 04:16:19 +00:00
|
|
|
|
2003-11-07 19:49:43 +00:00
|
|
|
AC_EXEEXT
|
|
|
|
AC_OBJEXT
|
|
|
|
|
2002-07-16 22:03:06 +00:00
|
|
|
AM_INIT_AUTOMAKE([1.6])
|
2002-02-11 07:17:57 +00:00
|
|
|
|
2002-07-16 20:46:33 +00:00
|
|
|
AM_CONFIG_HEADER(conf.h)
|
2002-02-11 07:17:57 +00:00
|
|
|
|
2002-07-16 20:46:33 +00:00
|
|
|
AC_DEFINE_UNQUOTED(D2XMAJOR,D2X_MAJOR,[d2x major version])
|
|
|
|
AC_DEFINE_UNQUOTED(D2XMINOR,D2X_MINOR,[d2x minor version])
|
|
|
|
AC_DEFINE_UNQUOTED(D2XMICRO,D2X_MICRO,[d2x micro version])
|
2001-11-14 04:16:19 +00:00
|
|
|
|
|
|
|
AM_MAINTAINER_MODE
|
|
|
|
|
|
|
|
#kludge to keep autoconf from adding -g -O2
|
|
|
|
CFLAGS=" $CFLAGS"
|
|
|
|
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_MAKE_SET
|
|
|
|
AC_ISC_POSIX
|
|
|
|
AC_CHECK_TOOL(CC, gcc, :)
|
|
|
|
AC_CHECK_TOOL(RANLIB, ranlib, :)
|
2001-11-27 20:00:51 +00:00
|
|
|
AC_CHECK_TOOL(STRIP, strip, :)
|
2001-11-14 04:16:19 +00:00
|
|
|
AC_CHECK_TOOL(AR, ar, :)
|
|
|
|
AC_PROG_CC
|
2002-02-11 07:17:57 +00:00
|
|
|
AC_PROG_CXX
|
2001-11-14 04:16:19 +00:00
|
|
|
AC_STDC_HEADERS
|
2002-07-16 23:32:16 +00:00
|
|
|
AC_PATH_PROGS(NASM, nasm nasmw, no)
|
2002-02-11 07:17:57 +00:00
|
|
|
AC_C_BIGENDIAN
|
2001-11-14 04:16:19 +00:00
|
|
|
|
2003-02-18 19:55:51 +00:00
|
|
|
case $host_cpu in
|
|
|
|
sparc)
|
|
|
|
AC_DEFINE(WORDS_NEED_ALIGNMENT,,[Define if your processor needs data to be word-aligned])
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2003-05-29 06:26:27 +00:00
|
|
|
build_macosx_bundle=no
|
|
|
|
build_simple_bundle=no
|
|
|
|
|
2002-07-22 01:47:42 +00:00
|
|
|
case $host_os in
|
|
|
|
cygwin)
|
|
|
|
AC_MSG_WARN([Cygwin found, setting -mno-cygwin])
|
|
|
|
CFLAGS="-mno-cygwin $CFLAGS"
|
|
|
|
MINGW32=yes
|
2002-08-06 09:28:14 +00:00
|
|
|
;;
|
2002-07-22 01:47:42 +00:00
|
|
|
mingw*)
|
|
|
|
MINGW32=yes
|
2002-08-06 09:28:14 +00:00
|
|
|
;;
|
2002-07-22 01:47:42 +00:00
|
|
|
darwin*)
|
|
|
|
MACOSX=yes
|
2003-05-29 06:26:27 +00:00
|
|
|
AC_MSG_RESULT(Mac OS X/Darwin; Mac OS X bundle)
|
|
|
|
build_macosx_bundle=yes
|
|
|
|
DATADIR='EXE>>../Resources'
|
|
|
|
#SCOREDIR='/Library/Preferences/KoboDeluxe/scores'
|
|
|
|
#CONFIGDIR='HOME>>Library/Preferences'
|
|
|
|
#CONFIGFILE='KoboDeluxe Preferences'
|
|
|
|
MATHLIB=""
|
|
|
|
;;
|
2002-07-22 01:47:42 +00:00
|
|
|
msdos*)
|
|
|
|
MSDOS=yes
|
2002-08-06 09:28:14 +00:00
|
|
|
;;
|
2002-07-22 01:47:42 +00:00
|
|
|
esac
|
2001-11-14 04:16:19 +00:00
|
|
|
|
2003-05-12 23:30:12 +00:00
|
|
|
AC_CHECK_DECLS(nanosleep,,,[#include <time.h>])
|
2003-10-04 02:50:21 +00:00
|
|
|
AC_CHECK_TYPES([struct timespec, struct timeval],,,[#include <sys/time.h>])
|
2003-05-12 23:30:12 +00:00
|
|
|
|
2001-11-14 04:16:19 +00:00
|
|
|
AM_CONDITIONAL(MINGW32, test x$MINGW32 = xyes)
|
|
|
|
if test x$MINGW32 = xyes; then
|
|
|
|
GL_LIBS="opengl32 glu32"
|
2002-07-30 21:21:02 +00:00
|
|
|
elif test x$MACOSX = xyes; then
|
2002-08-06 09:28:14 +00:00
|
|
|
GL_LIBS=""
|
2001-11-14 04:16:19 +00:00
|
|
|
else
|
|
|
|
GL_LIBS="GL GLU"
|
|
|
|
fi
|
|
|
|
|
2002-07-22 01:47:42 +00:00
|
|
|
AM_CONDITIONAL(MACOSX, test x$MACOSX = xyes)
|
2003-05-29 06:26:27 +00:00
|
|
|
AM_CONDITIONAL(BUILD_MACOSX_BUNDLE, test x$build_macosx_bundle = xyes)
|
|
|
|
AM_CONDITIONAL(BUILD_SIMPLE_BUNDLE, test x$build_simple_bundle = xyes)
|
2002-07-22 01:47:42 +00:00
|
|
|
|
2002-01-28 00:03:47 +00:00
|
|
|
dnl Set $prefix and $exec_prefix to $ac_default_prefix if they are not set
|
|
|
|
test "x$prefix" = "xNONE" && prefix=$ac_default_prefix
|
|
|
|
test "x$exec_prefix" = "xNONE" && exec_prefix="${prefix}"
|
|
|
|
|
|
|
|
dnl Set default locations to find data files.
|
2002-08-22 02:24:01 +00:00
|
|
|
default_sharepath="$datadir/games/$PACKAGE"
|
2002-01-28 00:03:47 +00:00
|
|
|
|
2004-01-08 16:48:35 +00:00
|
|
|
CFLAGS="-Wall -Wno-char-subscripts $CFLAGS"
|
2001-11-14 04:16:19 +00:00
|
|
|
|
|
|
|
dnl Enable editor build?
|
|
|
|
AC_ARG_ENABLE(editor,
|
2002-08-06 09:28:14 +00:00
|
|
|
[ --enable-editor Build editor? (not functional)],,)
|
2001-11-14 04:16:19 +00:00
|
|
|
if test x$enable_editor = xyes; then
|
2002-07-16 08:11:34 +00:00
|
|
|
AC_DEFINE(EDITOR,,[Define if you want to build the editor])
|
2001-11-14 04:16:19 +00:00
|
|
|
D2X_MAIN_SUBDIRS=editor
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(EDITOR, test x$enable_editor = xyes)
|
|
|
|
|
2002-10-10 19:07:45 +00:00
|
|
|
dnl Enable macdata build?
|
|
|
|
AC_ARG_ENABLE(macdata,
|
|
|
|
[ --enable-macdata Build for mac datafiles],,)
|
|
|
|
if test x$enable_macdata = xyes; then
|
|
|
|
AC_DEFINE(MACDATA,,[Define if you want to build for mac datafiles])
|
|
|
|
D2X_FEATURES="macdata ${D2X_FEATURES}"
|
2001-11-14 04:16:19 +00:00
|
|
|
fi
|
2002-10-10 19:07:45 +00:00
|
|
|
AM_CONDITIONAL(MACDATA, test x$enable_macdata = xyes)
|
2001-11-14 04:16:19 +00:00
|
|
|
|
|
|
|
dnl Build with NDEBUG?
|
|
|
|
AC_ARG_ENABLE(debug,
|
2002-08-06 09:28:14 +00:00
|
|
|
[ --disable-debug Take out debug symbols, Asserts, Int3, etc ],,)
|
2001-11-14 04:16:19 +00:00
|
|
|
if test x$enable_debug = xno; then
|
2002-07-16 08:11:34 +00:00
|
|
|
AC_DEFINE(NDEBUG,,[Define to disable asserts, int3, etc.])
|
2001-11-14 04:16:19 +00:00
|
|
|
CFLAGS="-O2 $CFLAGS"
|
|
|
|
else
|
|
|
|
CFLAGS="-g $CFLAGS"
|
2002-01-29 00:15:27 +00:00
|
|
|
D2X_FEATURES="debug ${D2X_FEATURES}"
|
2001-11-14 04:16:19 +00:00
|
|
|
fi
|
|
|
|
|
2002-02-02 23:30:26 +00:00
|
|
|
dnl Build with RELEASE?
|
|
|
|
AC_ARG_ENABLE(release,
|
2002-08-06 09:28:14 +00:00
|
|
|
[ --enable-release Release build. Removes debug/editor things ],,)
|
2002-02-02 23:30:26 +00:00
|
|
|
if test x$enable_release = xyes; then
|
2002-07-16 08:11:34 +00:00
|
|
|
AC_DEFINE(RELEASE,,[Define for a "release" build])
|
2002-02-02 23:30:26 +00:00
|
|
|
D2X_FEATURES="release ${D2X_FEATURES}"
|
|
|
|
fi
|
|
|
|
|
2003-01-01 00:55:03 +00:00
|
|
|
dnl Build without using sdl-joystick ?
|
|
|
|
AC_ARG_ENABLE(linuxjoy,
|
|
|
|
[ --enable-linuxjoy do not use the SDL Joystick. (eg for MS Sidewinder)],,)
|
|
|
|
if test x$enable_linuxjoy = xyes; then
|
|
|
|
AC_DEFINE(USE_LINUX_JOY,,[define to not use the SDL_Joystick routines.])
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(USE_LINUX_JOY, test x$enable_linuxjoy = xyes)
|
|
|
|
|
2002-08-02 04:57:19 +00:00
|
|
|
dnl Build with FAST_FILE_IO?
|
|
|
|
AC_ARG_ENABLE(fastfileio,
|
2002-08-17 11:23:11 +00:00
|
|
|
[ --disable-fastfileio Disable fast file i/o. ],,)
|
|
|
|
if test x$enable_fastfileio != xno; then
|
|
|
|
if test x$ac_cv_c_bigendian = xyes; then
|
|
|
|
AC_MSG_WARN([big-endian cpu detected. disabling fastfileio])
|
|
|
|
enable_fastfileio="no";
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if test x$enable_fastfileio != xno; then
|
|
|
|
AC_DEFINE(FAST_FILE_IO,,[Define for faster i/o on little-endian cpus])
|
2002-08-02 04:57:19 +00:00
|
|
|
D2X_FEATURES="fastfileio ${D2X_FEATURES}"
|
|
|
|
fi
|
|
|
|
|
2003-06-02 20:45:32 +00:00
|
|
|
dnl Build with CONSOLE?
|
|
|
|
AC_ARG_ENABLE(console,
|
|
|
|
[ --enable-console Enable console (experimental) ],,)
|
|
|
|
if test x$enable_console = xyes; then
|
|
|
|
AC_DEFINE(CONSOLE,,[Define to enable console])
|
2003-06-02 05:56:37 +00:00
|
|
|
D2X_SUBDIRS=console
|
2003-06-02 20:45:32 +00:00
|
|
|
fi
|
2003-06-02 05:56:37 +00:00
|
|
|
AM_CONDITIONAL(CONSOLE, test x$enable_console = xyes)
|
2003-06-02 20:45:32 +00:00
|
|
|
|
2002-01-28 00:03:47 +00:00
|
|
|
AC_ARG_WITH(sharepath,
|
2002-08-06 09:28:14 +00:00
|
|
|
[[ --with-sharepath=DIR Use DIR for shared game data (unix only) [DATADIR/games/d2x]]],
|
|
|
|
sharepath=$withval, sharepath="auto")
|
2002-01-28 00:03:47 +00:00
|
|
|
if test "x$sharepath" = "xauto" -o "x$sharepath" = "xyes" -o "x$sharepath" = "x"; then
|
|
|
|
sharepath="$default_sharepath"
|
|
|
|
fi
|
2002-08-22 02:24:01 +00:00
|
|
|
AC_SUBST(sharepath)
|
|
|
|
eval sharepath=$sharepath
|
2002-07-16 08:11:34 +00:00
|
|
|
AC_DEFINE_UNQUOTED(SHAREPATH, "$sharepath",[Define this to be the shared game directory root])
|
2002-01-28 00:03:47 +00:00
|
|
|
|
2002-07-22 01:47:42 +00:00
|
|
|
# Test for MSDOS
|
|
|
|
if test x$MSDOS = xyes; then
|
2002-08-06 09:28:14 +00:00
|
|
|
CFLAGS="-I \$(top_srcdir)/arch/dos/include $CFLAGS"
|
|
|
|
TARGETS=d2x
|
|
|
|
D2X_ARCH_SUBDIRS=dos
|
2001-11-14 04:16:19 +00:00
|
|
|
else
|
|
|
|
|
2002-08-06 09:28:14 +00:00
|
|
|
CFLAGS="-pipe $CFLAGS"
|
2001-11-14 04:16:19 +00:00
|
|
|
|
2002-08-06 09:28:14 +00:00
|
|
|
dnl Check for SDL
|
|
|
|
AM_PATH_SDL(1.1.0,
|
|
|
|
:,
|
|
|
|
AC_MSG_ERROR(SDL not found. Make sure sdl-config is in your PATH, or specify with --with-sdl-prefix)
|
|
|
|
)
|
|
|
|
CFLAGS="$SDL_CFLAGS $CFLAGS"
|
|
|
|
LIBS="$SDL_LIBS $LIBS"
|
2001-11-14 04:16:19 +00:00
|
|
|
|
2002-08-06 09:28:14 +00:00
|
|
|
TARGETS=d2x-sdl
|
|
|
|
D2X_ARCH_SUBDIRS=sdl
|
2001-11-14 04:16:19 +00:00
|
|
|
|
2002-08-06 09:28:14 +00:00
|
|
|
AC_CHECK_HEADERS(netipx/ipx.h)
|
2001-11-14 04:16:19 +00:00
|
|
|
|
2003-03-28 09:27:07 +00:00
|
|
|
# Check for SDL_image
|
|
|
|
AC_CHECK_LIB(SDL_image, IMG_ReadXPMFromArray,
|
|
|
|
LIBS="-lSDL_image $LIBS"
|
|
|
|
AC_DEFINE(SDL_IMAGE,,[Define if you have the SDL_image library]))
|
|
|
|
|
2001-11-14 04:16:19 +00:00
|
|
|
# Check for OpenGL
|
2002-08-06 09:28:14 +00:00
|
|
|
AC_ARG_WITH(opengl,
|
|
|
|
[ --with-opengl Build OpenGL support ],,)
|
|
|
|
if test x$with_opengl = xyes; then
|
|
|
|
for lib in $GL_LIBS; do
|
|
|
|
AC_CHECK_LIB($lib, main,
|
|
|
|
OGL_LIBS="${OGL_LIBS} -l$lib",
|
|
|
|
[AC_MSG_ERROR([$lib not found, --with-opengl cannot be used])
|
|
|
|
opengl=false],
|
|
|
|
${OGL_LIBS}
|
|
|
|
)
|
|
|
|
done
|
|
|
|
AC_DEFINE(OGL,,[Define if you want an OpenGL build])
|
|
|
|
TARGETS=d2x-gl
|
|
|
|
D2X_ARCH_SUBDIRS="ogl ${D2X_ARCH_SUBDIRS}"
|
|
|
|
fi
|
2002-07-22 01:47:42 +00:00
|
|
|
AC_SUBST(OGL_LIBS)
|
|
|
|
AM_CONDITIONAL(USE_OPENGL, test x$with_opengl = xyes)
|
2001-11-14 04:16:19 +00:00
|
|
|
|
|
|
|
# Check for GGI
|
2002-08-06 09:28:14 +00:00
|
|
|
AC_ARG_WITH(ggi,
|
|
|
|
[ --with-ggi Build GGI support ],,)
|
|
|
|
if test x$with_ggi = xyes; then
|
|
|
|
AC_CHECK_LIB(ggi, ggiInit,
|
|
|
|
GGI_LIBS="-lggi",
|
|
|
|
[AC_MSG_ERROR([GGI not found, GGI version cannot be built]); ggi=false])
|
|
|
|
AC_CHECK_LIB(gii, giiInit,
|
|
|
|
GGI_LIBS="${GGI_LIBS} -lgii",
|
|
|
|
[AC_MSG_ERROR([GII not found, GGI version cannot be built]); ggi=false])
|
|
|
|
AC_DEFINE(GGI,,[Define if you want a GGI build])
|
|
|
|
TARGETS=d2x-ggi
|
|
|
|
D2X_ARCH_SUBDIRS="ggi ${D2X_ARCH_SUBDIRS}"
|
|
|
|
fi
|
|
|
|
AC_SUBST(GGI_LIBS)
|
|
|
|
AM_CONDITIONAL(USE_GGI, test x$with_ggi = xyes)
|
2001-11-14 04:16:19 +00:00
|
|
|
|
|
|
|
# Check for SVGALib
|
2002-08-06 09:28:14 +00:00
|
|
|
AC_ARG_WITH(svga,
|
|
|
|
[ --with-svga Build SVGALib support ],,)
|
|
|
|
if test x$with_svga = xyes; then
|
|
|
|
AC_CHECK_LIB(vga,vga_getmousetype,
|
|
|
|
SVGA_LIBS="-lvga",
|
|
|
|
[AC_MSG_ERROR([vga not found, SVGALib cannot be built])
|
|
|
|
svga=false],
|
|
|
|
)
|
|
|
|
AC_CHECK_LIB(vgagl,gl_getcontext,
|
|
|
|
SVGA_LIBS="${SVGA_LIBS} -lvgagl",
|
|
|
|
[AC_MSG_ERROR([vgagl not found, SVGALib cannot be built])
|
|
|
|
svga=false],
|
|
|
|
-lvga)
|
|
|
|
AC_DEFINE(SVGA,,[Define if you want an SVGALib build])
|
|
|
|
TARGETS=d2x-svga
|
|
|
|
D2X_ARCH_SUBDIRS="svgalib ${D2X_ARCH_SUBDIRS}"
|
|
|
|
fi
|
|
|
|
AC_SUBST(SVGA_LIBS)
|
|
|
|
AM_CONDITIONAL(USE_SVGALIB, test x$with_svga = xyes)
|
|
|
|
|
|
|
|
if test x$MINGW32 = xyes; then
|
|
|
|
D2X_ARCH_SUBDIRS="win32 ${D2X_ARCH_SUBDIRS}"
|
|
|
|
else
|
|
|
|
CFLAGS="-I \$(top_srcdir)/arch/linux/include $CFLAGS"
|
|
|
|
D2X_ARCH_SUBDIRS="linux ${D2X_ARCH_SUBDIRS}"
|
|
|
|
fi
|
2001-11-14 04:16:19 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
dnl Check for network
|
|
|
|
AC_ARG_ENABLE(network,
|
2002-08-06 09:28:14 +00:00
|
|
|
[ --disable-network Do not build network/serial support ],,)
|
2003-02-14 03:44:05 +00:00
|
|
|
if test x$enable_network != xno; then
|
2003-10-03 07:58:15 +00:00
|
|
|
case $host_os in
|
|
|
|
cygwin* | mingw* | msdos* | linux*)
|
|
|
|
enable_native_ipx="yes";
|
|
|
|
;;
|
|
|
|
*)
|
2003-11-18 01:08:07 +00:00
|
|
|
AC_MSG_WARN([d2x does not support native ipx on this host. disabling native ipx])
|
2003-10-03 07:58:15 +00:00
|
|
|
enable_native_ipx="no";
|
|
|
|
;;
|
|
|
|
esac
|
2003-11-27 00:21:04 +00:00
|
|
|
case $host_os in
|
|
|
|
cygwin* | mingw* | msdos*)
|
|
|
|
enable_kalinix="no";
|
|
|
|
;;
|
|
|
|
esac
|
2003-10-03 07:58:15 +00:00
|
|
|
case $host_os in
|
|
|
|
*solaris*)
|
|
|
|
AC_CHECK_LIB(socket, socket, LIBS="${LIBS} -lsocket",
|
|
|
|
[AC_MSG_ERROR(socket lib required for net support on solaris not found)])
|
|
|
|
AC_CHECK_LIB(nsl, inet_addr, LIBS="${LIBS} -lnsl",
|
|
|
|
[AC_MSG_ERROR(nsl lib required for net support on solaris not found)])
|
|
|
|
;;
|
|
|
|
esac
|
2003-02-14 03:44:05 +00:00
|
|
|
fi
|
2003-11-18 01:08:07 +00:00
|
|
|
AC_ARG_ENABLE(kalinix,
|
|
|
|
[ --disable-kalinix Disable the KaliNix driver (unix-only)],,)
|
2001-11-14 04:16:19 +00:00
|
|
|
if test x$enable_network != xno; then
|
2003-10-03 07:58:15 +00:00
|
|
|
if test x$enable_native_ipx != xno; then
|
|
|
|
D2X_FEATURES="ipx ${D2X_FEATURES}"
|
|
|
|
AC_DEFINE(NATIVE_IPX,,[Define to use the IPX support of the OS])
|
|
|
|
fi
|
2003-11-18 01:08:07 +00:00
|
|
|
if test x$enable_kalinix != xno; then
|
|
|
|
D2X_FEATURES="kalinix ${D2X_FEATURES}"
|
|
|
|
AC_DEFINE(KALINIX,,[Define to enable use of the KaliNix driver])
|
|
|
|
fi
|
2002-07-16 08:11:34 +00:00
|
|
|
AC_DEFINE(NETWORK,,[Define if you want a network build])
|
2002-01-29 00:15:27 +00:00
|
|
|
D2X_FEATURES="network ${D2X_FEATURES}"
|
2001-11-14 04:16:19 +00:00
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(USE_NETWORK, test x$enable_network != xno)
|
2003-10-03 07:58:15 +00:00
|
|
|
AM_CONDITIONAL(USE_NATIVE_IPX, test x$enable_native_ipx != xno)
|
2003-11-18 01:08:07 +00:00
|
|
|
AM_CONDITIONAL(USE_KALINIX, test x$enable_kalinix != xno)
|
2001-11-14 04:16:19 +00:00
|
|
|
|
|
|
|
dnl Check for assembler
|
|
|
|
AC_ARG_ENABLE(assembler,
|
2002-08-06 09:28:14 +00:00
|
|
|
[ --disable-assembler Do not use assembler optimization ],,)
|
2002-07-22 01:47:42 +00:00
|
|
|
if test x$enable_assembler != xno; then
|
2001-11-14 04:16:19 +00:00
|
|
|
if test x$NASM = xno; then
|
2002-08-06 09:28:14 +00:00
|
|
|
AC_MSG_WARN([nasm not found. disabling assembler])
|
|
|
|
enable_assembler="no"
|
2001-11-14 04:16:19 +00:00
|
|
|
else
|
|
|
|
NASMFLAGS="-i\$(srcdir)/ $NASMFLAGS"
|
|
|
|
case $host_os in
|
2003-02-22 06:49:46 +00:00
|
|
|
cygwin* | mingw*)
|
2002-08-06 09:28:14 +00:00
|
|
|
NASMFLAGS="-f win32 $NASMFLAGS"
|
|
|
|
;;
|
|
|
|
msdos*)
|
|
|
|
NASMFLAGS="-f coff $NASMFLAGS"
|
|
|
|
;;
|
2003-12-08 21:21:16 +00:00
|
|
|
linux* | freebsd*)
|
|
|
|
NASMFLAGS="-f elf -d__ELF__ $NASMFLAGS"
|
2002-08-06 09:28:14 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
AC_MSG_WARN([nasm not supported for this OS. disabling assembler])
|
|
|
|
enable_assembler="no"
|
|
|
|
;;
|
2001-11-14 04:16:19 +00:00
|
|
|
esac
|
|
|
|
fi
|
|
|
|
fi
|
2002-07-22 01:47:42 +00:00
|
|
|
if test x$enable_assembler = xno; then
|
|
|
|
AC_DEFINE(NO_ASM,,[Define if you want an assembler free build])
|
|
|
|
D2X_FEATURES="no_asm ${D2X_FEATURES}"
|
|
|
|
fi
|
2001-11-14 04:16:19 +00:00
|
|
|
AM_CONDITIONAL(USE_ASM, test x$enable_assembler != xno)
|
|
|
|
|
2002-07-16 08:11:34 +00:00
|
|
|
AH_BOTTOM([
|
2002-08-06 09:28:14 +00:00
|
|
|
/* General defines */
|
2003-04-29 08:05:41 +00:00
|
|
|
#ifndef PACKAGE_STRING
|
|
|
|
#define PACKAGE_STRING PACKAGE " " VERSION
|
|
|
|
#endif
|
2003-02-26 11:11:14 +00:00
|
|
|
#define VERSION_NAME PACKAGE_STRING
|
2002-07-16 08:11:34 +00:00
|
|
|
#define NMONO 1
|
|
|
|
#define PIGGY_USE_PAGING 1
|
|
|
|
#define NEWDEMO 1
|
|
|
|
|
2003-04-11 23:53:15 +00:00
|
|
|
#if defined(__APPLE__) && defined(__MACH__)
|
2002-07-22 01:47:42 +00:00
|
|
|
#define __unix__
|
|
|
|
#endif
|
|
|
|
|
2002-07-16 22:47:38 +00:00
|
|
|
#ifdef __unix__
|
|
|
|
# ifdef GGI
|
|
|
|
# define GII_INPUT 1
|
|
|
|
# define GGI_VIDEO 1
|
2002-07-16 08:11:34 +00:00
|
|
|
# else
|
2002-07-16 22:47:38 +00:00
|
|
|
# ifdef SVGA
|
|
|
|
# define SVGALIB_INPUT 1
|
|
|
|
# define SVGALIB_VIDEO 1
|
2002-07-16 08:11:34 +00:00
|
|
|
# else
|
2002-07-16 22:47:38 +00:00
|
|
|
# define SDL_INPUT 1
|
|
|
|
# ifdef OGL
|
|
|
|
# define SDL_GL_VIDEO 1
|
2002-07-16 08:11:34 +00:00
|
|
|
# else
|
|
|
|
# define SDL_VIDEO 1
|
|
|
|
# endif
|
|
|
|
# endif
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __MINGW32__
|
|
|
|
# define SDL_INPUT 1
|
|
|
|
# ifdef OGL
|
|
|
|
# define SDL_GL_VIDEO 1
|
|
|
|
# else
|
|
|
|
# define SDL_VIDEO 1
|
|
|
|
# endif
|
|
|
|
#endif
|
2002-08-06 09:28:14 +00:00
|
|
|
])
|
2002-07-16 08:11:34 +00:00
|
|
|
|
2003-11-07 19:49:43 +00:00
|
|
|
TARGETS="$TARGETS$ac_cv_exeext"
|
|
|
|
|
2001-11-14 04:16:19 +00:00
|
|
|
AM_PROG_AS
|
|
|
|
|
2003-06-02 05:56:37 +00:00
|
|
|
AC_SUBST(D2X_SUBDIRS)
|
|
|
|
|
2001-11-14 04:16:19 +00:00
|
|
|
AC_SUBST(D2X_ARCH_SUBDIRS)
|
|
|
|
|
|
|
|
AC_SUBST(D2X_MAIN_SUBDIRS)
|
|
|
|
|
|
|
|
AC_SUBST(TARGETS)
|
|
|
|
|
|
|
|
AC_SUBST(NASMFLAGS)
|
|
|
|
|
|
|
|
AC_SUBST(CFLAGS)
|
|
|
|
|
|
|
|
AC_OUTPUT(
|
2002-08-06 09:28:14 +00:00
|
|
|
Makefile
|
|
|
|
2d/Makefile
|
|
|
|
3d/Makefile
|
|
|
|
arch/Makefile
|
|
|
|
arch/dos/Makefile
|
|
|
|
arch/ggi/Makefile
|
|
|
|
arch/linux/Makefile
|
|
|
|
arch/ogl/Makefile
|
|
|
|
arch/sdl/Makefile
|
|
|
|
arch/svgalib/Makefile
|
|
|
|
arch/win32/Makefile
|
|
|
|
cfile/Makefile
|
2003-06-02 01:55:03 +00:00
|
|
|
console/Makefile
|
2002-08-06 09:28:14 +00:00
|
|
|
iff/Makefile
|
2003-02-18 07:37:19 +00:00
|
|
|
libmve/Makefile
|
2002-08-06 09:28:14 +00:00
|
|
|
main/Makefile
|
|
|
|
main/editor/Makefile
|
|
|
|
maths/Makefile
|
|
|
|
mem/Makefile
|
|
|
|
misc/Makefile
|
|
|
|
texmap/Makefile
|
2002-08-13 21:40:05 +00:00
|
|
|
utilities/Makefile
|
2002-08-06 09:28:14 +00:00
|
|
|
debian/changelog
|
|
|
|
rpm/d2x.spec
|
2003-05-29 06:26:27 +00:00
|
|
|
Info.plist
|
2002-01-29 00:15:27 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
AC_MSG_RESULT([
|
2002-08-06 09:28:14 +00:00
|
|
|
d2x has been configured successfully.
|
2002-01-29 00:15:27 +00:00
|
|
|
|
2002-08-06 09:28:14 +00:00
|
|
|
Platform(s): $D2X_ARCH_SUBDIRS
|
2003-06-02 05:56:37 +00:00
|
|
|
Features : $D2X_FEATURES $D2X_SUBDIRS $D2X_MAIN_SUBDIRS
|
2002-01-29 00:15:27 +00:00
|
|
|
|
2002-08-06 09:28:14 +00:00
|
|
|
Shared game data directory (unix only): $sharepath
|
|
|
|
])
|