From: Hugo Villeneuve Date: Tue, 29 Apr 2008 04:57:08 +0000 (+0000) Subject: Upgrade to gtk+-2 X-Git-Tag: v1.1.0~7 X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=82756d98187cfc312892b0330b1bc888ffbde3ad;p=emu8051.git Upgrade to gtk+-2 Remove gtk+-1.0 support. --- diff --git a/Makefile.am b/Makefile.am index 609c9c0..83b08f2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,9 +6,8 @@ SUBDIRS = src doc EXTRA_DIST = autogen.sh \ $(ac_aux_dir)/debug.m4 \ - $(ac_aux_dir)/gtk2.m4 \ pixmaps \ - test_files + test-files ACLOCAL = aclocal -I $(ac_aux_dir) diff --git a/NEWS b/NEWS index 225badf..224f49e 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,7 @@ +2008-04-28: emu8051-1.0.0 has been released. + Removed gtk+-1.0 support, now requires gtk+-2 + 2005-05-07: emu8051-0.1.0 has been released. Fixed bug with CJNE instruction and autoconf files cleanup. See the file 'ChangeLog' for further details. diff --git a/config/gtk2.m4 b/config/gtk2.m4 deleted file mode 100644 index 46f02a7..0000000 --- a/config/gtk2.m4 +++ /dev/null @@ -1,17 +0,0 @@ -dnl -dnl Macro for adding an option to 'configure' for choosing GTK+-2 instead of the -dnl GTK+-1 default -dnl -AC_DEFUN([HV_CHECK_FOR_GTK2],[dnl -AC_ARG_WITH(gtk2, AC_HELP_STRING([--with-gtk2], [use GTK2 (default is GTK1)]),[dnl - if test x"${withval}" = xyes; then - use_gtk2=1 - AC_DEFINE([USE_GTK2],1,[Set to 1 to use the Gtk+-2 library.]) - elif test x"${withval}" = xno; then - use_gtk2=0 - else - AC_MSG_ERROR(bad value for --with-gtk2 option) - fi -], use_gtk2=0 ) -]) - diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..9cc79a8 --- /dev/null +++ b/configure.ac @@ -0,0 +1,67 @@ +# configure.ac -- Process this file with autoconf to produce configure + +dnl Initialization stuff. +AC_INIT(emu8051, 1.0.0) +AC_CONFIG_AUX_DIR(config) +AC_CONFIG_SRCDIR(src/cpu8051.c) +AM_CONFIG_HEADER(config.h:config-h.in) +dnl Checking if the NEWS file has been updated to reflect the current version. +AM_INIT_AUTOMAKE(check-news) + +dnl Tests the C compiler +AC_PROG_CC +AC_LANG_C + +dnl Checking for header files. +AC_HEADER_STDC +AC_HEADER_SYS_WAIT +AC_CHECK_HEADERS(strings.h unistd.h) + +dnl Checking for typedefs, structures, and compiler characteristics. +AC_C_CONST +AC_TYPE_PID_T +AC_TYPE_SIZE_T + +dnl Basic CFLAGS values +CFLAGS="-Wall" + +dnl Checks for '--enable-debug' option +HV_CHECK_FOR_DEBUG + +if test x"${debug_messages}" = x1; then +dnl -g is for GDB debugging + CFLAGS="${CFLAGS} -g -gdwarf-2 -g3" +fi + +dnl Checks for Gtk+-2.0 +PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.0.5) +AC_SUBST(GTK_CFLAGS) +AC_SUBST(GTK_LIBS) + +AC_SUBST(CFLAGS) +AC_SUBST(LIBS) +AC_SUBST(ac_aux_dir) + +dnl Creating output file(s) +AC_OUTPUT(Makefile src/Makefile doc/Makefile) + +echo \ +"--------------------------------------------------------------------------- +Configuration: + + Install path: ${prefix} + Compiler: ${CC} + Compiler flags: ${CFLAGS} + Linker flags: ${LIBS}" + +echo -n " Debugging messages: " +if test x"${debug_messages}" = x1; then + echo "yes" +else + echo "no" +fi + +echo \ +" + See config.h for further configuration information. +---------------------------------------------------------------------------" diff --git a/configure.in b/configure.in deleted file mode 100644 index 7fea444..0000000 --- a/configure.in +++ /dev/null @@ -1,82 +0,0 @@ -# configure.in -- Process this file with autoconf to produce configure - -dnl Initialization stuff. -AC_INIT(emu8051, 0.2.0) -AC_CONFIG_AUX_DIR(config) -AC_CONFIG_SRCDIR(src/cpu8051.c) -AM_CONFIG_HEADER(config.h:config-h.in) -dnl Checking if the NEWS file has been updated to reflect the current version. -AM_INIT_AUTOMAKE(check-news) - -dnl Tests the C compiler -AC_PROG_CC -AC_LANG_C - -dnl Checking for header files. -AC_HEADER_STDC -AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS(strings.h unistd.h) - -dnl Checking for typedefs, structures, and compiler characteristics. -AC_C_CONST -AC_TYPE_PID_T -AC_TYPE_SIZE_T - -dnl Basic CFLAGS values -CFLAGS="-Wall" - -dnl Checks for '--enable-debug' option -HV_CHECK_FOR_DEBUG - -if test x"${debug_messages}" = x1; then -dnl -g is for GDB debugging - CFLAGS="${CFLAGS} -g -gdwarf-2 -g3" -fi - -dnl Checks for '--with-gtk2' option -HV_CHECK_FOR_GTK2 - -if test x"${use_gtk2}" = x0; then - dnl Checks for Gtk+-1.2.0 - AM_PATH_GTK(1.2.0, CFLAGS="${CFLAGS} ${GTK_CFLAGS}" LIBS="${LIBS} ${GTK_LIBS}", - AC_MSG_ERROR(GTK+ not found!))dnl -else - dnl Checks for Gtk+-2.0 - PKG_CHECK_MODULES(GTK,gtk+-2.0 >= 2.0.5, CFLAGS="${CFLAGS} ${GTK_CFLAGS}" \ - LIBS="${LIBS} ${GTK_LIBS}",AC_MSG_ERROR(GTK+-2.0 not found!))dnl -fi - -AC_SUBST(CFLAGS) -AC_SUBST(LIBS) -AC_SUBST(ac_aux_dir) - -dnl Creating output file(s) -AC_OUTPUT(Makefile src/Makefile doc/Makefile) - -echo \ -"--------------------------------------------------------------------------- -Configuration: - - Install path: ${prefix} - Compiler: ${CC} - Compiler flags: ${CFLAGS} - Linker flags: ${LIBS}" - -echo -n " GTK base version: " -if test x"${use_gtk2}" = x1; then - echo "2" -else - echo "1" -fi - -echo -n " Debugging messages: " -if test x"${debug_messages}" = x1; then - echo "yes" -else - echo "no" -fi - -echo \ -" - See config.h for further configuration information. ----------------------------------------------------------------------------" diff --git a/src/Makefile.am b/src/Makefile.am index 629cea7..e97fce0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,6 +1,9 @@ # This file is processed by GNU automake to generate Makefile.in -INCLUDES = -I$(top_srcdir)/pixmaps +INCLUDES = \ + -I$(top_srcdir) \ + -I$(top_srcdir)/pixmaps \ + $(GTK_CFLAGS) bin_PROGRAMS = emu8051 # emu8051_console @@ -11,11 +14,11 @@ bin_PROGRAMS = emu8051 emu8051_SOURCES = instructions_8051.c emugtk.c memwin.c pgmwin.c regwin.c filemenu.c \ viewmenu.c helpmenu.c messagebox.c options.c hexfile.c cpu8051.c memory.c -#emu8051_console_SOURCES = EmuConsole.cpp cpu8051.c memory.c options.c file.c EmuConsole.hpp Keyboard.hpp +emu8051_LDADD = $(GTK_LIBS) # These headers will be included in the distribution tarball, but will not be # installed by 'make install' -noinst_HEADERS = emugtk.h memwin.h pgmwin.h regwin.h filemenu.h viewmenu.h helpmenu.h \ +noinst_HEADERS = common.h emugtk.h memwin.h pgmwin.h regwin.h filemenu.h viewmenu.h helpmenu.h \ messagebox.h options.h hexfile.h cpu8051.h memory.h reg8051.h gtksizes.h # These files are generated automatically by a perl script.