GNOME Bugzilla – Bug 328210
configure --enable-sm doesn't work if -lSM is outside METACITY_LIBS
Last modified: 2009-03-06 15:58:32 UTC
Please describe the problem: If -lSM is not specified in METACITY_LIBS before running configure script, and it is not required by X libraries (X.org 7.0 seems to be the case), configure --enable-sm fails saying that -lSM is not found. I observe this bug on Metacity 2.13.34. Steps to reproduce: 1. Ensure that METACITY_LIBS variable does not contain -lSM, neither do X11 libraries' requirements (X.org 7.0 seems to be the case). Also make libSM.* libraries are installed. 2. Invoke 'configure --enable-sm'. Actual results: configure script fails, reporting that -lSM is not found. Expected results: configure script passes, finding -lSM at its usual place. Does this happen every time? Yes. Other information: The problem seems to be concerned with this part of configure.in: found_sm=no case "$METACITY_LIBS" in *-lSM*) found_sm=yes ;; *) AC_CHECK_LIB(SM, SmcSaveYourselfDone, [AC_CHECK_HEADERS(X11/SM/SMlib.h, METACITY_LIBS="-lSM -lICE $METACITY_LIBS" found_sm=no)], , $METACITY_LIBS) ;; esac In the second branch, found_sm is set to no, while it should be set to yes, if I understand things correctly.
I'm always a little wary of messing with autotools, but after reading over the code a few times and double-checking the manual, I'm sure you must be right. Fixed. http://svn.gnome.org/viewvc/metacity?rev=3579&view=rev
Thanks! :)