[Xlibs] [PATCH] Further configure.ac tweaks

Luciano Montanaro mikelima@virgilio.it
Tue, 11 Nov 2003 10:46:45 +0100


--Boundary-00=_FALs/q1mltAL50v
Content-Type: text/plain;
  charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

After I submitted the patch, I investigated the issue a bit more.
I have not used the pkg-config program before, so I checked the=20
(scarce) documentation.

There is a README that says that when using pkg-config,
the=20

AC_SUBST(packagename_CFLAGS)
AC_SUBST(packagename_LIBS)

lines should be supplied in the configure.in (thus in configure.ac, in this=
=20
case)

I did so for the packages at hand.=20
=46rom the Makefile.am and configure scripts, not all are strictly needed,=
=20
but they may be, sometime, so I think it is better to be on the safe side.

As a side note, the AC_SUBST(X11_DATADIR) in the configure.ac is not needed=
=20
according to the doc (it is always used as @X11_DATADIR@)

The patch fixes the X11 directory only, but similar changes should be done =
to=20
the other modules as well.

Luciano
=2D-=20
=2D I want a  Software  Patents  Free  Europe  too!  And  you? -
=2D-------------------------------------------------------------
 EuropeSwPatentFree - http://EuropeSwPatentFree.internautas.org=20
=2D-------------------------------------------------------------

--Boundary-00=_FALs/q1mltAL50v
Content-Type: text/x-diff;
  charset="us-ascii";
  name="configure.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="configure.patch"

Index: configure.ac
===================================================================
RCS file: /cvs/xlibs/X11/configure.ac,v
retrieving revision 1.19
diff -p -u -r1.19 configure.ac
--- configure.ac	10 Nov 2003 05:31:59 -0000	1.19
+++ configure.ac	11 Nov 2003 09:36:50 -0000
@@ -21,8 +21,16 @@ AC_PROG_CC
 
 # Checks for pkg-config packages
 PKG_CHECK_MODULES(XPROTO, xproto)
+AC_SUBST(XPROTO_CFLAGS)
+AC_SUBST(XPROTO_LIBS)
+
 PKG_CHECK_MODULES(X11, xextensions xtrans xau)
+AC_SUBST(X11_CFLAGS)
+AC_SUBST(X11_LIBS)
+
 PKG_CHECK_MODULES(XDMCP, xdmcp, [xdmauth="yes"], [xdmauth="no"])
+AC_SUBST(XDMCP_CFLAGS)
+AC_SUBST(XDMCP_LIBS)
 
 # Check for dlopen
 AC_SEARCH_LIBS(dlopen,[dl svld])
@@ -168,7 +176,6 @@ fi
 X11_DATADIR='${datadir}/X11'
 
 AC_SUBST(X11_DATADIR)
-AC_SUBST(X11_CFLAGS)
 
 AC_OUTPUT([Makefile
            include/Makefile

--Boundary-00=_FALs/q1mltAL50v--