Due to the recent changes in the way xorg gets installed directly into /usr instead of /usr/X11R6, gaim's configure script and I'm sure others fail. Part of gaim's detection of Session Management includes a check which uses -I$x_includes. Because the X libs are in /usr/lib the $x_includes variable is empty so the gcc command includes an empty -I: configure:31161: gcc -c -g -O2 -Wall -g3 -I conftest.c >&5 This fails so gaim disables Session Management as well as XScreenSaver support. A proposed solution would be to put an if statement on line 382 in the configure.ac to check if the $x_includes is not empty before appending to CPPFLAGS, Reproducible: Always Steps to Reproduce: 1. Install the xorg snapshots that put X libs in /usr/lib 2. Compile gaim Actual Results: Session Management and XScreenSaver support gets disabled. Expected Results: They should be enabled.
Also a simliar if statement would be needed on line 354.
Actually, after looking through the configure script, the 2 lines should jsut be changed to be CPPFLAGS="$CPPFLAGS $x_incpath_add" instead of CPPFLAGS="$CPPFLAGS -I$x_includes". Early on in the configure script $x_incpath_add gets set to either "" or -I$x_includes based on if $x_includes is empty or not.
Created attachment 50689 [details, diff] Fixes gaim's configure when X libs are in /usr/lib
This patch causes the build to fail for me on xorg-x11-6.8.1.902. We need to make sure whatever patches we apply will work for all versions. I don't think we support xfree anymore so just xorg-x11 is of concern.
Ok, thats weird that it fails, but I found a much better solution. Just pass --x-includes=/usr/X11R6/include to econf and it will properly detect the headers being in /usr/X11R6/include and the variable won't be empty and the test won't fail.
(14:25:36) ajax: if they're pulling in the X headers by their short names then the app is busted
/usr/include/X11 is a symlink to /usr/X11R6/include/X11, so it should be found. Do you not have that symlink in .904?
.904 totally got rid of /usr/X11R6 and it is just a symlink to ../usr. So my /usr/include/X11 is a real directory. According to the comments in the ./configure script... # We can't assume that $x_libraries will be set, because autoconf does not # set it in the case when the X libraries are in a standard place. # Ditto for $x_includes So autoconf picks up that the includes are in /usr/include and doesn't set the variable.
The comment is explaining the workaround that follows it. Unfortunately later on the gaim developers completely ignore the issue: CPPFLAGS="$CPPFLAGS -I$x_includes" It should be: CPPFLAGS="$CPPFLAGS $x_incpath_add" in order to make use of the workaround. The same line is in there twice, both for xss and xsm support.
My original patch did exactly that. But as per comment #4, aparently it didn't work.
Ah sorry, I didn't see that. I was just helping a friend who was hit by the bug and wanted to figure out why the --x-includes=/usr/X11R6/include solution worked. The reason your patch doesn't work is because you need to regenerate the configure script from configure.ac with the GNU autotools. Unfortunately gaim doesn't distribute their autogen.sh (it's only in cvs), so that's not really a clean solution. imho, it would be better for Gentoo to patch configure directly, and send the configure.ac patch upstream for inclusion.
When I was testing it on my computer with .904 it worked fine, I put a call to autoconf in my ebuild. But I didn't understand why it caused gaim on .902 to fail. I assume he also ran autoconf to regenerate the configure, but it should have worked just the same w/o the patch. The --x-includes works because when autoconf detects that the X includes are in /usr/include and not /usr/X11R6 it doesn't set the variable and the test fails. Forcing it to /usr/X11R6/includes make it think it's out of the standard path so it sets the variable. I think thats the easiest solution instead of directionly patching configure which is not right.
I'm going to let this go in 1.1.2 and wait for the fix in 1.1.3, which should be out tonight. --- (11:38:47) nosnilmot: rizzo: Gaim 1.1.3 should correctly detect X screensaver and X session management support for you bleeding edge gentooers