bug-autoconf
[Top][All Lists]
Advanced

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

Re: Cope without xmkmf


From: Dan Nicholson
Subject: Re: Cope without xmkmf
Date: Wed, 16 Jul 2008 07:12:21 -0700

On Wed, Jul 16, 2008 at 3:04 AM, Stepan Kasal <address@hidden> wrote:
>
> I'm not sure how the code should look like, though.
>
> The Xorg project uses pkg-config, so their hint is:
>  PKG_CHECK_EXISTS([x11],
>    [PKG_CHECK_MODULES([X], [x11])],
>    [AC_PATH_XTRA])
> (see http://permalink.gmane.org/gmane.comp.freedesktop.xorg/30087)

Later I realized this was a bit insufficient since it excludes running
AC_PATH_XTRA in the case where you have pkg-config. Then you miss out
on $X_EXTRA_LIBS, which hurts when trying to compile X11 apps. In mesa
there's a special case for solaris to pull in -lsocket -lnsl when
compiling the demos.

Now I'm trying to figure out the right way to gather enough
information so that I can unconditionally run AC_PATH_XTRA without it
running AC_PATH_X. That's a bit of an aside, but it does speak to the
desire to find the X directories without xmkmf.

> I personally do not like pkg-config much, so I do not wish to be the
> one who brings PKG_* macros to Autoconf proper.
>
> Are we able to make AC_PATH_XTRA ready for xmkmf-less Xorg before the
> end of summer?

The thing about xmkmf is that it works well because it's knowledgeable
about X specifics, and it should definitely be kept as a fallback case
for non-Xorg implementations. I can think of two ways to attack this
cleanly, and both require upstream support:

1. Override AC_PATH_X in xorg-macros.m4, adding a preferred method
where pkg-config is used.

2. Have Xorg install a non-pkg-config/xmkmf method to determine the
installation directories and change autoconf AC_PATH_X to check this
first. Something like $bindir/x-config. This could ship in the same
util-macros package that xorg-macros.m4 comes in.

I'd be willing to help code up either of those cases (or any other
ideas people have) and get things committed upstream.

--
Dan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]