Skip to content

Commit

Permalink
Version bump, check for GTK+3 and omit code using it (ui.c)
Browse files Browse the repository at this point in the history
In preparation for adding Linux memory check, add GTK+3 check and config.h
entry to exclude compilation of code depending on V3 (rather than V2) GTK+.

Version bump to 0.2.3.

	modified:   config.h.in
	modified:   configure.ac
	modified:   src/main.c
	modified:   src/ui.c
  • Loading branch information
tbowers7 committed Sep 11, 2017
1 parent 01041aa commit f64a9e3
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
3 changes: 3 additions & 0 deletions config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@
/* Define to 1 if you have the <getopt.h> header file. */
#undef HAVE_GETOPT_H

/* Use GTK3 */
#undef HAVE_GTK3

/* Define to 1 if you have the `inet_ntoa' function. */
#undef HAVE_INET_NTOA

Expand Down
7 changes: 4 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.69])
AC_INIT([scopedesign], [0.2.2], [[email protected]])
AC_INIT([scopedesign], [0.2.3], [[email protected]])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([src/main.c])
AC_CONFIG_HEADERS([config.h])
Expand All @@ -26,8 +26,9 @@ AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_RANLIB dnl Needed by ARGTABLE, XPA

PKG_CHECK_MODULES([GTK], [gtk+-3.0])

PKG_CHECK_MODULES([GTK], [gtk+-3.0],
[AC_DEFINE([HAVE_GTK3], [1], [Use GTK3])],
[AC_DEFINE([HAVE_GTK3], [0], [Use GTK3])] )


# Checks for header files.
Expand Down
2 changes: 2 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ int main(int argc, char *argv[])

/* Display a splash screen! */
display_splash(0);
#if HAVE_GTK3
ui_example_window();
#endif

/* Initialize N_RAYS */
init_set_nrays();
Expand Down
4 changes: 4 additions & 0 deletions src/ui.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
#include "sd_defs.h" // Main Package Header
#undef wombat

#if HAVE_GTK3

/* Include packages */
#include <gtk/gtk.h>

Expand Down Expand Up @@ -77,3 +79,5 @@ int ui_example_window (){

return status;
}

#endif

0 comments on commit f64a9e3

Please sign in to comment.