[PATCH libXt 1/2] Install ErrorDB into a $datarootdir-path, not $libdir.

Gaetan Nadon memsize at videotron.ca
Thu Sep 8 15:03:17 PDT 2011


On Thu, 2011-09-08 at 16:44 +0200, Egbert Eich wrote:

> This lets Xt search for it's ErrorDB in the same location
> as Xlib. These error databases are architecture independent
> data files.
> 
> The XtErrorDB file neither exists in libXt nor has it ever
> been supplied by any '3rd party' (at least Google didn't
> turn up any results).
> Therefore changing the location of this file (again) should
> have no side effects on backward compatibility.
> 
> Signed-off-by: Egbert Eich <eich at freedesktop.org>
> ---
>  configure.ac    |    4 ++++
>  src/Makefile.am |    2 +-
>  2 files changed, 5 insertions(+), 1 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 84a9f4f..35c43a2 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -154,6 +154,10 @@ case $host_os in
>  esac
>  AC_SUBST(STRINGSABIOPTIONS)
>  
> +ERRORDBDIR=${datadir}/X11
> +AX_DEFINE_DIR(ERRORDBDIR, ERRORDBDIR, [Location of Xt errordb])

Not that it does not work, but it introduces extra stuff. I also
realized appdefaultdir does the same. Explaining it will be a bit of a
challenge.
You probably don't want this iIn config.h:

        /* Location of Xt errordb */
        #define ERRORDBDIR "/home/nadon/xorg/src/inst/share/X11"


Makefile looks ok:

        ERRORDBDIR = /home/nadon/xorg/src/inst/share/X11
        ERRORDB_DEFINES = -DERRORDB=\"$(ERRORDBDIR)/XtErrorDB\"



> +AC_SUBST(ERRORDBDIR)

If you use AX_DEFINE_DIR, you don't need this as it does it for you.

Bottom line: I would remove AX_DEFINE_DIR and add a couple of lines in
the pc file to get the same results minus the unneeded #define.


> +
>  case $host_os in
>      darwin*)
>          OS_CFLAGS="-Wl,-flat_namespace"
> diff --git a/src/Makefile.am b/src/Makefile.am
> index 2b39ec5..a689b47 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -4,7 +4,7 @@ BUILT_SOURCES = $(BUILT_FILES)
>  CLEANFILES = $(BUILT_SOURCES)
>  
>  SRCH_DEFINES = -DXFILESEARCHPATHDEFAULT=\"$(XFILESEARCHPATHDEFAULT)\"
> -ERRORDB_DEFINES = -DERRORDB=\"$(libdir)/X11/XtErrorDB\"
> +ERRORDB_DEFINES = -DERRORDB=\"$(ERRORDBDIR)/XtErrorDB\"
>  
>  AM_CFLAGS = $(CWARNFLAGS) $(XT_CFLAGS) $(SRCH_DEFINES) $(ERRORDB_DEFINES) \
>  	$(XTMALLOC_ZERO_CFLAGS)


You may also leave it as is and I can clean it later with appdefaultdir

Reviewed-by: Gaetan Nadon <memsize at videotron.ca>



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20110908/f3932192/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg-devel/attachments/20110908/f3932192/attachment.pgp>


More information about the xorg-devel mailing list