From: Yann E. MORIN" Date: Wed, 18 Jan 2012 21:18:31 +0000 (+0100) Subject: frontends: add gconf X-Git-Tag: v3.3.0-0~46 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=645bc75e9344a405bcf79c393549f7b0be599d9a;p=kconfig-frontends frontends: add gconf Signed-off-by: "Yann E. MORIN" --- diff --git a/.hgignore b/.hgignore index d6774d6..696c0e3 100644 --- a/.hgignore +++ b/.hgignore @@ -5,6 +5,7 @@ syntax: glob *.a frontends/conf/conf +frontends/gconf/gconf frontends/mconf/mconf frontends/nconf/nconf diff --git a/configure.ac b/configure.ac index 6c8eb31..fd4563e 100644 --- a/configure.ac +++ b/configure.ac @@ -9,8 +9,8 @@ AC_CONFIG_HEADERS([config.h]) AC_CONFIG_AUX_DIR([scripts]) # Checks for programs. -AC_PROG_CXX AC_PROG_CC +AC_PROG_CXX AC_PROG_MAKE_SET # Checks for libraries. @@ -60,6 +60,12 @@ AC_ARG_ENABLE( [--enable-nconf], [nconf, the modern ncurses-based frontend (default=yes)])]) AC_SUBST([enable_nconf], [${enable_nconf:-yes}]) +AC_ARG_ENABLE( + [gconf], + [AS_HELP_STRING( + [--enable-gconf], + [gconf, the GTK-based frontend (default=yes)])]) +AC_SUBST([enable_gconf], [${enable_gconf:-yes}]) #---------------------------------------- # Some program checks @@ -108,6 +114,15 @@ AS_IF( [AC_MSG_ERROR([could not find curses library])]) #---------------------------------------- +# Check headers and libs for gconf +AS_IF( + [test "$enable_gconf" = yes ], + [PKG_PROG_PKG_CONFIG() + PKG_CHECK_MODULES( + [gtk], + [gtk+-2.0 gmodule-2.0 libglade-2.0])]) + +#--------------------------------------------------------------------------- # Prepare automake AM_INIT_AUTOMAKE AM_PROG_CC_C_O @@ -120,6 +135,9 @@ AM_CONDITIONAL( AM_CONDITIONAL( [COND_nconf], [test "$enable_nconf" = "yes"]) +AM_CONDITIONAL( + [COND_gconf], + [test "$enable_gconf" = "yes"]) #---------------------------------------- # Finalise @@ -131,5 +149,6 @@ AC_CONFIG_FILES([ frontends/conf/Makefile frontends/mconf/Makefile frontends/nconf/Makefile + frontends/gconf/Makefile ]) AC_OUTPUT diff --git a/frontends/Makefile.am b/frontends/Makefile.am index a1121fe..f8f24ab 100644 --- a/frontends/Makefile.am +++ b/frontends/Makefile.am @@ -7,4 +7,7 @@ endif if COND_nconf MAYBE_nconf = nconf endif -SUBDIRS = $(MAYBE_conf) $(MAYBE_mconf) $(MAYBE_nconf) +if COND_gconf + MAYBE_gconf = gconf +endif +SUBDIRS = $(MAYBE_conf) $(MAYBE_mconf) $(MAYBE_nconf) $(MAYBE_gconf) diff --git a/frontends/gconf/Makefile.am b/frontends/gconf/Makefile.am new file mode 100644 index 0000000..76fbf26 --- /dev/null +++ b/frontends/gconf/Makefile.am @@ -0,0 +1,14 @@ +bin_PROGRAMS = gconf + +gconf_SOURCES = gconf.c gconf.glade +dist_EXTRA_gconf_SOURCES = images.c +gconf_CPPFLAGS = $(AM_CPPFLAGS) \ + $(GETTEXT) \ + -I../../parser \ + -DGUI_PATH='"$(pkgdatadir)/gconf.glade"' +gconf_CFLAGS = $(AM_CFLAGS) \ + $(gtk_CFLAGS) +gconf_LDADD = $(gtk_LIBS) \ + ../../parser/libkconfigparser.a +gconfdir = $(pkgdatadir) +gconf_DATA = gconf.glade diff --git a/frontends/gconf/gconf.c b/frontends/gconf/gconf.c index adc2306..d8eb3dd 100644 --- a/frontends/gconf/gconf.c +++ b/frontends/gconf/gconf.c @@ -1469,7 +1469,7 @@ int main(int ac, char *av[]) { const char *name; char *env; - gchar *glade_file; + gchar *glade_file = GUI_PATH; bindtextdomain(PACKAGE, LOCALEDIR); bind_textdomain_codeset(PACKAGE, "UTF-8"); @@ -1483,6 +1483,7 @@ int main(int ac, char *av[]) //add_pixmap_directory (PACKAGE_DATA_DIR "/" PACKAGE "/pixmaps"); //add_pixmap_directory (PACKAGE_SOURCE_DIR "/pixmaps"); +#if 0 /* Determine GUI path */ env = getenv(SRCTREE); if (env) @@ -1491,6 +1492,7 @@ int main(int ac, char *av[]) glade_file = g_strconcat(av[0], ".glade", NULL); else glade_file = g_strconcat(g_get_current_dir(), "/", av[0], ".glade", NULL); +#endif /* Conf stuffs */ if (ac > 1 && av[1][0] == '-') {