1
0
Fork 0
dosbox-staging/configure.in
Sjoerd van der Berg 8de6c90eb3 Enable/Disable support for debugger and screenshots
Bettter checks for libpng and libcurses
Removal of settings.h file


Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@733
2003-03-10 14:30:27 +00:00

92 lines
2.2 KiB
Text

dnl Init.
AC_INIT(dosbox,0.57)
AC_CONFIG_SRCDIR(README)
dnl Detect the canonical host and target build environment
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
dnl Setup for automake
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(config.h)
dnl Checks for programs.
AC_PROG_MAKE_SET
AC_PROG_CC
AC_PROG_CPP
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_RANLIB
dnl Check for SDL
SDL_VERSION=1.2.0
AM_PATH_SDL($SDL_VERSION,
:,
AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
)
LIBS="$LIBS $SDL_LIBS"
CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
dnl Checks for header files.
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
AC_STRUCT_TM
dnl Checks for libraries.
#Check if the compiler support attributes
AC_MSG_CHECKING(if compiler allows __attribute__)
AC_TRY_COMPILE([], [typedef struct { } __attribute__ ((packed)) junk;],
[ AC_MSG_RESULT(yes);AC_DEFINE(C_HAS_ATTRIBUTE)],AC_MSG_RESULT(no))
#Check for big endian machine, should #define WORD_BIGENDIAN if so
AC_C_BIGENDIAN
#Features to enable/disable
AH_TEMPLATE(C_DEBUG,[Define to 1 to enable internal debugger, requires libcurses])
AC_ARG_ENABLE(debug,[ --enable-debug Enable debug mode],[
AC_CHECK_HEADER(curses.h,have_curses_h=yes,)
AC_CHECK_LIB(curses, initscr, have_curses_lib=yes, , )
if test x$have_curses_lib = xyes -a x$have_curses_h = xyes ; then
AC_DEFINE(C_DEBUG,1)
else
AC_MSG_WARN([Can't enable debug mode without libcurses])
fi
],)
AH_TEMPLATE(C_SSHOTS,[Define to 1 to enable screenshots, requires libpng])
AC_ARG_ENABLE(shots,[ --enable-shots Enable screenshot support],[
AC_CHECK_HEADER(png.h,have_png_h=yes,)
AC_CHECK_LIB(png, png_check_sig, have_png_lib=yes, , -lz)
if test x$have_curses_lib = xyes -a x$have_curses_h = xyes ; then
AC_DEFINE(C_SSHOTS,1)
else
AC_MSG_WARN([Can't enable screenshots without libpng])
fi
],)
AC_OUTPUT([
Makefile
src/Makefile
src/cpu/Makefile
src/cpu/core_16/Makefile
src/debug/Makefile
src/dos/Makefile
src/fpu/Makefile
src/gui/Makefile
src/hardware/Makefile
src/ints/Makefile
src/misc/Makefile
src/shell/Makefile
src/platform/Makefile
src/platform/visualc/Makefile
visualc/Makefile
include/Makefile
])