diff options
author | Hans Ulrich Niedermann <hun@n-dimensional.de> | 2007-12-03 19:15:44 +0100 |
---|---|---|
committer | Luc Verhaegen <libv@skynet.be> | 2007-12-11 17:03:36 +0100 |
commit | 7325dc4623431ac1ef1cab43ad7e2c4280231ce0 (patch) | |
tree | 24dd77b5b9202df673a0fb388a3657cd442d17d0 /configure.ac | |
parent | fa59270757b7ee579b2c5727b8c4f94df49bb8e3 (diff) |
[PATCH] Avoid double -l when linking rhd_conntest
If libpci is found via pkg-config, PCIUTILS_LIBS will contain
something like "-L/path/to/lib -lpci -lz". So we get rid of the
explicit -lpci and -lz in this case.
In case pkg-config does not find libpci, though, we just revert
to the previous behaviour of assuming that "-lpci -lz" will work.
In any case, we make sure linking works before actually using it.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index d2ea67f..be420e5 100644 --- a/configure.ac +++ b/configure.ac @@ -49,7 +49,9 @@ sdkdir=$(pkg-config --variable=sdkdir xorg-server) AC_HEADER_STDC PKG_CHECK_MODULES(PCIUTILS, libpci,, - [AC_MSG_WARN([libpci not registered in pkgconfig])]) + [AC_MSG_WARN([libpci not registered in pkgconfig, will guess instead]) + test "x$PCIUTILS_CFLAGS$PCIUTILS_LIBS" = "x" && PCIUTILS_LIBS="-lpci -lz" +]) SAVED_CPPFLAGS="$CPPFLAGS" SAVED_CFLAGS="$CFLAGS" |