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
This commit is contained in:
parent
359aca11f3
commit
8de6c90eb3
3 changed files with 44 additions and 7 deletions
17
acinclude.m4
17
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
|
||||
])
|
||||
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
28
configure.in
28
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue