[PATCH] Correct make distchek using the same solution used in other packages.
Paulo Cesar Pereira de Andrade
pcpa at mandriva.com.br
Wed Feb 4 11:13:53 PST 2009
The problem is that the "pattern" substitutions used by automake
don't work very well with "pkg-config --variable" when running
make distcheck.
Every single driver and several applications already uses a similar
solution, sometimes not even using a pkg-config variable, see for
example --with-xorg-module-dir.
---
Makefile.am | 1 +
configure.ac | 7 +++++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 3a59a65..201c284 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -19,6 +19,7 @@
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
AUTOMAKE_OPTIONS = foreign
+DISTCHECK_CONFIGURE_FLAGS = --with-sdkdir=\$${includedir}/xorg
if BUILD_TEST
test_dir=test
diff --git a/configure.ac b/configure.ac
index 809799f..c54129c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -74,8 +74,11 @@ XORG_DRIVER_CHECK_EXT(XINPUT, inputproto)
# Checks for pkg-config packages
PKG_CHECK_MODULES(XORG, xorg-server xproto $REQUIRED_MODULES)
XORG_CFLAGS="$CWARNFLAGS $XORG_CFLAGS"
-sdkdir=$(pkg-config --variable=sdkdir xorg-server |
- sed -e 's@/usr/include@$(includedir)@')
+xorg_sdkdir=$(pkg-config --variable=sdkdir xorg-server)
+AC_ARG_WITH(sdkdir,
+ AC_HELP_STRING([--with-sdkdir=<path>],
+ [Xorg X Server sdk headers (default is autodetected)]),
+ [sdkdir="$withval"], [sdkdir="${xorg_sdkdir}"])
AC_SUBST(sdkdir)
# Checks for libraries.
--
1.6.1
------=_20090204174801_45665--
More information about the xorg
mailing list