Re: [PATCH] default source



Marco Pesenti Gritti <marco it gnome org> writes:
> - I added a -DGCONF_ETCDIR in gconf/gconf/Makefile.am because I need to
> get the $sysconfdir/gconf path. If there is a better way to get it, I'd
> be happy to change this.

I think this is correct.

> - I'm using gconf_load_source_path to parse the
> $sysconfdir/gconf/schema-install-source file, it print out a "Adding
> ..." line, so the gconftool output is not very clear in this case and we
> need an additional tail command in gconf.m4 to parse it correctly.

As mentioned on IRC, I think schema-install-source should just contain
a single line with the install source, so you could just parse it 
with fopen()/fgets().

  Index: gconf.m4.in
  ===================================================================
  RCS file: /cvs/gnome/gconf/Attic/gconf.m4.in,v
  retrieving revision 1.1
  diff -u -r1.1 gconf.m4.in
  --- gconf.m4.in	2000/07/19 03:40:23	1.1
  +++ gconf.m4.in	2001/07/31 16:57:33
  @@ -64,3 +64,21 @@
     AC_SUBST(GCONF_LIBS)
     rm -f conf.gconftest
   ])
  +
  +dnl AM_PATH_GCONF
  +dnl Define INSTALL_GCONF_CONFIG_SOURCE

For namespace reasons, we should have this start with GCONF, 
so GCONF_SCHEMA_CONFIG_SOURCE perhaps

  +dnl
  +AC_DEFUN(AM_GCONF_SOURCE,
  +[
  +if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
  +  INSTALL_GCONF_CONFIG_SOURCE=`gconftool --get-default-source | tail -n1`
  +else
  +  INSTALL_GCONF_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE
  +fi
  +
  +AC_ARG_ENABLE(gconf-source, 
  +[  --enable-gconf-source=sourceaddress      Where to install schema
  files.],INSTALL_GCONF_CONFIG_SOURCE=$enable_gconf_source,)

I think AC_ARG_WITH or whatever might be better (for --with-gconf-source)

Looks good otherwise. Can you send along a revised version of the
patch?

Thanks!

Havoc






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]