Bug 6797 - AC_PATH_XTRA always yields xorg-x11-devel-static
: AC_PATH_XTRA always yields xorg-x11-devel-static
Status: CLOSED FIXED
: Sisyphus
(All bugs in Sisyphus/autoconf_2.60)
: unstable
: all Linux
: P2 minor
Assigned To:
:
:
:
:
:
  Show dependency tree
 
Reported: 2005-05-08 10:38 by
Modified: 2008-07-20 23:16 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2005-05-08 10:38:50
AC_PATH_XTRA always yields xorg-x11-devel-static

$ cat configure.ac
AC_PREREQ(2.59)
AC_INIT
AC_PATH_XTRA
$ autoreconf
...
$ filereq /dev/stdout sh -x ./configure 2>&1 |grep libX11
+ test '!' -f /usr/X11R6/lib/libX11.so
+ test '!' -f /usr/X11R6/lib/libX11.sl
+ test -f /usr/X11R6/lib/X11/libX11.sl
+ test '!' -f /usr/X11R6/lib/libX11.a
/usr/X11R6/lib/libX11.a
/usr/X11R6/lib/libX11.so
$

The following piece of code is the culprit:

--- configure-	2005-05-08 05:27:46 +0000
+++ configure	2005-05-08 05:29:14 +0000
@@ -2457,8 +2457,8 @@ _ACEOF
     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
     for ac_extension in so sl a; do
-      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
-	 test -f $ac_im_libdir/libX11.$ac_extension; then
+      if test -f $ac_im_libdir/libX11.$ac_extension &&
+	 test ! -f $ac_im_usrlibdir/libX11.$ac_extension; then
 	ac_im_usrlibdir=$ac_im_libdir; break
       fi
     done

Here an attempt is made to replace /usr/X11R6/lib ($ac_im_usrlibdir) with
/usr/X11R6/lib/X11 ($ac_im_libdir), in case the latter contains libX11
libraries (which is unusual).  If you simply change the order of these two
tests so that /usr/X11R6/lib/X11/libX11.* are tested for (non-)existence first,
actual libraries won't be stat(2)ted because of short-circuit evaluation.

$ patch configure <patch
$ autoreconf
$ filereq /dev/stdout sh -x ./configure 2>&1 |grep libX11
+ test -f /usr/X11R6/lib/X11/libX11.so
+ test -f /usr/X11R6/lib/X11/libX11.sl
+ test -f /usr/X11R6/lib/X11/libX11.a
/usr/X11R6/lib/libX11.so
$

The above patch applies cleanly to autoconf-2.59/lib/autoconf/libs.m4
(with a huge offset, of course).  It is supposed to be incremental to
autoconf-2.57-alt-ac_extension.patch.
------- Comment #1 From 2005-05-08 10:43:38 -------
*** Bug 6796 has been marked as a duplicate of this bug. ***
------- Comment #2 From 2005-05-08 17:19:27 -------
Ok, I'll apply this change.
------- Comment #3 From 2008-01-08 03:22:43 -------
Что-то не сложилось за два года?
------- Comment #4 From 2008-01-08 03:38:11 -------
(In reply to comment #3)
> Что-то не сложилось за два года?

Наверное потерялось при смене мантейнера.
------- Comment #5 From 2008-02-18 02:33:18 -------
Нашлось в 2.61-alt3.
------- Comment #6 From 2008-07-20 23:16:14 -------
Жалоб нет -- закроем.