commit - 253e6ffee08e025a3a8a46ca74dace6b0b4a6e73
commit + f8d213f14aa104a11f8cb1dfd06f25088720d9f2
blob - 5d104f7d373b1f61bb09baa1be48f331cab3860e
blob + b1bf3836d1172f449ced8f2250d32345b052a912
--- configure
+++ configure
}
}
-# Automatically set flags for x11 on OpenBSD
-case $(uname) in
- OpenBSD)
- CFLAGS="${CFLAGS} -I/usr/X11R6/include"
- CFLAGS="${CFLAGS} -I/usr/X11R6/include/freetype2"
- LDFLAGS="-L/usr/X11R6/lib"
- ;;
-esac
+command -v pkg-config 2>/dev/null 1>&2 && {
+ if extra="$(pkg-config --cflags x11 xinerama xft || true)"; then
+ echo "Adding to CFLAGS: $extra (pkg-config)"
+ CFLAGS="$extra ${CFLAGS}"
+ fi
+ if extra="$(pkg-config --libs x11 xinerama xft || true)"; then
+ echo "Adding to LDFLAGS: $extra (pkg-config)"
+ LDFLAGS="$extra ${LDFLAGS}"
+ fi
+}
#----------------------------------------------------------------------
# Allow certain variables to be overriden on the command line.