Bug 6797 - AC_PATH_XTRA always yields xorg-x11-devel-static
Summary: AC_PATH_XTRA always yields xorg-x11-devel-static
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: autoconf_2.60 (show other bugs)
Version: unstable
Hardware: all Linux
: P2 minor
Assignee: placeholder@altlinux.org
QA Contact: qa-sisyphus
URL:
Keywords:
: 6796 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-05-08 10:38 MSD by at@altlinux.org
Modified: 2008-07-20 23:16 MSD (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description at@altlinux.org 2005-05-08 10:38:50 MSD
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 at@altlinux.org 2005-05-08 10:43:38 MSD
*** Bug 6796 has been marked as a duplicate of this bug. ***
Comment 2 Dmitry V. Levin 2005-05-08 17:19:27 MSD
Ok, I'll apply this change.
Comment 3 Vitaly Lipatov 2008-01-08 03:22:43 MSK
Что-то не сложилось за два года?
Comment 4 Dmitry V. Levin 2008-01-08 03:38:11 MSK
(In reply to comment #3)
> Что-то не сложилось за два года?

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