After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 590174 - evince-2.27.4 fails to compile with --with-smclient=xsmp
evince-2.27.4 fails to compile with --with-smclient=xsmp
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: general
2.27.x
Other All
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-07-29 18:17 UTC by Romain Perier
Modified: 2009-11-01 11:38 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
Patch which solves the problem (1.95 KB, patch)
2009-07-29 18:18 UTC, Romain Perier
reviewed Details | Review

Description Romain Perier 2009-07-29 18:17:28 UTC
Please describe the problem:
Hey,

related to gentoo bug https://bugs.gentoo.org/show_bug.cgi?id=279591, evince fails to build if --with-smclient=xsmp is given to the configure script.

Prototype of AC_ARG_WITH is the following :
AC_ARG_WITH (package, help-string, [action-if-given], [action-if-not-given])

action-if-given is executed only if a option --{with,without}-smclient is
given to the configure script, is nothing is given action-if-not-given is
executed.

The problem was SMCLIENT_PKGS="sm >= 1.0.0" was assigned ONLY IF nothing was
given to the configure (default behaviour) so in action-if-not-given.
If the user gave --with-smclient=stuff "[]" was executed, and then
SMCLIENT_PKGS was empty, then the PKG_CHECK_MODULES into the if statement
didn't check it, and necesseraly libSM's cflags and libs wasn't found (so didn't set respectively into SMCLIENT_CFLAGS and SMCLIENT_LIBS)

You will find in attachment a patch which normally solves the problem.
Regards,
Romain.



Steps to reproduce:
1. start ./configure --with-smclient=xsmp
2. make
3. compilation fails


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Romain Perier 2009-07-29 18:18:26 UTC
Created attachment 139494 [details] [review]
Patch which solves the problem
Comment 2 Christian Persch 2009-07-29 21:45:07 UTC
This is wrong. Just remove the SMCLIENT_PKGS assignment from the action-if-not-given case, and add an extra case check outside the AC_ARG_WITH where you set it.
Comment 3 Romain Perier 2009-07-30 05:48:29 UTC
Yeah but if some checks was done in action-if-not-given (before the patch), ie when the support was activated as default, This implies that these checks was needed when the support was activated nop ? that's why I moved it into the if outside the AC_ARG_WITH. 
Comment 4 Christian Persch 2009-07-30 08:02:02 UTC
Your patch is wrong; it overwrites a --with-smclient value with the default.

Just delete SMCLIENT_PKGS="sm >= 1.0.0" from the action-if-not-given code, then do

case "$with_smclient" in
  xsmp) SMCLIENT_PKGS="sm >= 1.0.0" ;;
  *) ;;
esac

outside the AC_ARG_WITH, before the 'if test "$with_smclient" != "no"; then ' line.
Comment 5 Christian Persch 2009-11-01 11:38:23 UTC
Fixed on master.