summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--media-libs/urt/files/gentoo-config9
1 files changed, 9 insertions, 0 deletions
diff --git a/media-libs/urt/files/gentoo-config b/media-libs/urt/files/gentoo-config
index 1680f11fcc25..a2d9ec3faf2f 100644
--- a/media-libs/urt/files/gentoo-config
+++ b/media-libs/urt/files/gentoo-config
@@ -41,3 +41,12 @@ INCTIFF =
LIBTIFF = -ltiff
INCX11 =
LIBX11 = -lX11
+
+# Most people have migrated X11 to /usr/lib, but just in case ...
+check_x11=$(shell \
+ echo 'int main(){}' > test.c ; \
+ if ! $(CC) test.c -lX11 -o .urt-x11-test 2>/dev/null ; then \
+ echo "-L/usr/X11R6/lib" ; \
+ fi ; \
+ rm -f .urt-x11-test test.c)
+LIBX11 += $(call check_x11)