From 8de6c90eb3544822e82ac7b672453cdccc78b6e5 Mon Sep 17 00:00:00 2001 From: Sjoerd van der Berg Date: Mon, 10 Mar 2003 14:30:27 +0000 Subject: [PATCH] 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 --- acinclude.m4 | 17 ++++++++++++++++- autogen.sh | 6 +----- configure.in | 28 +++++++++++++++++++++++++++- 3 files changed, 44 insertions(+), 7 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 2491c4e5..97aed8aa 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -180,7 +180,9 @@ AH_TOP([ */ ]) -AH_TEMPLATE([C_HAS_ATTRIBUTE],[Determines if the compilers supports attributes for structures]) +AH_TEMPLATE([C_HAS_ATTRIBUTE],[Determines if the compilers supports attributes for structures.]) +AH_TEMPLATE([C_DEBUG],[Enable the internal debugger.]) +AH_TEMPLATE([C_SSHOT],[Enable the screenshot support.]) AH_BOTTOM([#define INLINE inline]) @@ -190,5 +192,18 @@ AH_BOTTOM([#if C_HAS_ATTRIBUTE #define GCC_ATTRIBUTE(x) /* attribute not supported */ #endif]) +AH_BOTTOM([ +/* Enable some heavy debugging options */ +#define C_HEAVY_DEBUG 0 + +/* Enable some big compile-time increasing inlines */ +#define C_EXTRAINLINE 0 + +/* Enable the FPU module, still only for beta testing */ +#define C_FPU 0 + +/* Maximum memory address range in megabytes */ +#define C_MEM_MAX_SIZE 12 +]) diff --git a/autogen.sh b/autogen.sh index 8b08a7e8..9126bca9 100755 --- a/autogen.sh +++ b/autogen.sh @@ -10,8 +10,4 @@ autoheader automake --gnits --include-deps --add-missing --copy autoconf -#Copy settings.h.cvs to settings.h and that's it, - -directory=`dirname $0` -cp $directory/settings.h.cvs $directory/settings.h -echo "Now you are ready to run ./configure also check settings.h for extra build settings" +echo "Now you are ready to run ./configure, afterwards check config.h for extra build settings" diff --git a/configure.in b/configure.in index 22562502..2a03de91 100644 --- a/configure.in +++ b/configure.in @@ -36,7 +36,6 @@ AC_TYPE_SIZE_T AC_STRUCT_TM dnl Checks for libraries. -AC_CHECK_LIB(png, png_check_sig, , AC_MSG_ERROR([*** libpng not found!]), -lz) #Check if the compiler support attributes AC_MSG_CHECKING(if compiler allows __attribute__) @@ -46,6 +45,33 @@ AC_TRY_COMPILE([], [typedef struct { } __attribute__ ((packed)) junk;], #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