GNOME Bugzilla – Bug 549182
checks for xrandr not enough
Last modified: 2008-09-01 21:48:04 UTC
The checks for libxrandr detect if the library is missing but configuration doesn't halt, which causes compilation breakage: checking for X... libraries , headers checking for XLIB... no checking for gethostbyname... yes ... config.log: Package xrandr was not found in the pkg-config search path. Perhaps you should add the directory containing `xrandr.pc' to the PKG_CONFIG_PATH environment variable No package 'xrandr' found configure:22515: $? = 1 configure:22528: $PKG_CONFIG --exists --print-errors "x11 xrandr >= 1.2" Package xrandr was not found in the pkg-config search path. Perhaps you should add the directory containing `xrandr.pc' to the PKG_CONFIG_PATH environment variable No package 'xrandr' found configure:22531: $? = 1 No package 'xrandr' found configure:22558: result: no make after configure: gnome-rr.c:30:35: error: X11/extensions/Xrandr.h: No such file or directory gnome-rr.c:46: error: expected specifier-qualifier-list before ‘XRRScreenResources’ gnome-rr.c:73: error: expected specifier-qualifier-list before ‘RROutput’ gnome-rr.c:89: error: expected specifier-qualifier-list before ‘RROutput’ gnome-rr.c:95: error: expected specifier-qualifier-list before ‘RRCrtc’ gnome-rr.c:110: error: expected specifier-qualifier-list before ‘RRMode’ gnome-rr.c:119: error: expected declaration specifiers or ‘...’ before ‘RRCrtc’ gnome-rr.c:122: error: expected declaration specifiers or ‘...’ before ‘XRRScreenResources’ gnome-rr.c:126: error: expected declaration specifiers or ‘...’ before ‘RROutput’ gnome-rr.c:128: error: expected declaration specifiers or ‘...’ before ‘XRRScreenResources’ gnome-rr.c:133: error: expected declaration specifiers or ‘...’ before ‘RRMode’ gnome-rr.c:135: error: expected declaration specifiers or ‘...’ before ‘XRRModeInfo’ gnome-rr.c:141: error: expected declaration specifiers or ‘...’ before ‘RROutput’ ...
configure.in section for X libraries is buggy: > PKG_CHECK_MODULES(XLIB, x11 xrandr >= 1.2, > X11_PACKAGE=x11, > [X11_PACKAGE= > AC_PATH_XTRA > if test x"$no_x" = xyes; then > AC_MSG_ERROR("no (requires X development libraries)") > else > XLIB_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS" > XLIB_CFLAGS=$X_CFLAGS > fi]) If $no_x is yes, then it makes no sense to complain about missing X libraries. I think those if/else blocks are swapped.
This gives proper warnings and makes more sense to me: Index: configure.in =================================================================== --- configure.in (revision 5197) +++ configure.in (working copy) @@ -105,11 +105,11 @@ X11_PACKAGE=x11, [X11_PACKAGE= AC_PATH_XTRA - if test "x$no_x" = xyes; then - AC_MSG_ERROR("no (requires X development libraries)") - else + if test x"$no_x" = xyes; then XLIB_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS" XLIB_CFLAGS=$X_CFLAGS + else + AC_MSG_ERROR("no (requires X development libraries)") fi]) AC_SUBST(X11_PACKAGE) AC_SUBST(XLIB_CFLAGS)
This is actually wrong: if you don't have X, you want to fail in configure. The fix was to add -lXrandr