x11: Implemented dpi detection

depends on XRandR.
Had to dynamically load `XRRGetMonitors` as Ubuntu 12.04 doesn't have it.
Also removed libudev from travis install list.
This commit is contained in:
Andreas Haas
2016-06-09 18:54:06 +02:00
parent f8f30662d9
commit 18c941bbec
4 changed files with 85 additions and 2 deletions

View File

@ -45,6 +45,11 @@ def can_build():
print("xinerama not found.. x11 disabled.")
return False
x11_error=os.system("pkg-config xrandr --modversion > /dev/null ")
if (x11_error):
print("xrandr not found.. x11 disabled.")
return False
return True # X11 enabled
@ -132,6 +137,7 @@ def configure(env):
env.ParseConfig('pkg-config x11 --cflags --libs')
env.ParseConfig('pkg-config xinerama --cflags --libs')
env.ParseConfig('pkg-config xcursor --cflags --libs')
env.ParseConfig('pkg-config xrandr --cflags --libs')
if (env["openssl"]=="yes"):
env.ParseConfig('pkg-config openssl --cflags --libs')
@ -179,7 +185,7 @@ def configure(env):
print("PulseAudio development libraries not found, disabling driver")
env.Append(CPPFLAGS=['-DX11_ENABLED','-DUNIX_ENABLED','-DGLES2_ENABLED','-DGLES_OVER_GL'])
env.Append(LIBS=['GL', 'GLU', 'pthread', 'z'])
env.Append(LIBS=['GL', 'GLU', 'pthread', 'z', 'dl'])
#env.Append(CPPFLAGS=['-DMPC_FIXED_POINT'])
#host compiler is default..