]> git.pld-linux.org Git - packages/autoconf.git/commitdiff
- fix libX11 detection without xmkmf and libXt (based on changes from CVS and Fedora...
authorJakub Bogusz <qboosh@pld-linux.org>
Sat, 18 Feb 2006 16:08:21 +0000 (16:08 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    autoconf-x.patch -> 1.1

autoconf-x.patch [new file with mode: 0644]

diff --git a/autoconf-x.patch b/autoconf-x.patch
new file mode 100644 (file)
index 0000000..5fb56a6
--- /dev/null
@@ -0,0 +1,69 @@
+--- autoconf-2.59/lib/autoconf/libs.m4.orig    2003-05-22 14:05:13.000000000 +0200
++++ autoconf-2.59/lib/autoconf/libs.m4 2006-02-18 16:45:40.815890250 +0100
+@@ -180,7 +180,8 @@
+ # Internal subroutine of _AC_PATH_X.
+ # Set ac_x_includes and/or ac_x_libraries.
+ m4_define([_AC_PATH_X_XMKMF],
+-[rm -fr conftest.dir
++[AC_ARG_VAR(XMKMF, [Path to xmkmf, Makefile generator for X Window System])dnl
++rm -f -r conftest.dir
+ if mkdir conftest.dir; then
+   cd conftest.dir
+   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
+@@ -188,7 +189,7 @@
+ acfindx:
+       @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
+ _ACEOF
+-  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
++  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
+     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
+     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
+@@ -202,7 +203,7 @@
+     # bogus both because they are the default anyway, and because
+     # using them would break gcc on systems where it needs fixed includes.
+     case $ac_im_incroot in
+-      /usr/include) ;;
++      /usr/include) ac_x_includes= ;;
+       *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
+     esac
+     case $ac_im_usrlibdir in
+@@ -259,13 +260,13 @@
+ /usr/openwin/share/include'
+ if test "$ac_x_includes" = no; then
+-  # Guess where to find include files, by looking for Intrinsic.h.
++  # Guess where to find include files, by looking for Xlib.h.
+   # First, try using that file with no special directory specified.
+-  AC_PREPROC_IFELSE([AC_LANG_SOURCE([@%:@include <X11/Intrinsic.h>])],
++  AC_PREPROC_IFELSE([AC_LANG_SOURCE([@%:@include <X11/Xlib.h>])],
+ [# We can compile using X headers with no special include directory.
+ ac_x_includes=],
+ [for ac_dir in $ac_x_header_dirs; do
+-  if test -r "$ac_dir/X11/Intrinsic.h"; then
++  if test -r "$ac_dir/X11/Xlib.h"; then
+     ac_x_includes=$ac_dir
+     break
+   fi
+@@ -277,9 +278,9 @@
+   # See if we find them without any special options.
+   # Don't add to $LIBS permanently.
+   ac_save_LIBS=$LIBS
+-  LIBS="-lXt $LIBS"
+-  AC_LINK_IFELSE([AC_LANG_PROGRAM([@%:@include <X11/Intrinsic.h>],
+-                                [XtMalloc (0)])],
++  LIBS="-lX11 $LIBS"
++  AC_LINK_IFELSE([AC_LANG_PROGRAM([@%:@include <X11/Xlib.h>],
++                                [XrmInitialize ()])],
+                [LIBS=$ac_save_LIBS
+ # We can link X programs with no special library path.
+ ac_x_libraries=],
+@@ -288,7 +289,7 @@
+ do
+   # Don't even attempt the hair of trying to link an X program!
+   for ac_extension in a so sl; do
+-    if test -r $ac_dir/libXt.$ac_extension; then
++    if test -r $ac_dir/libX11.$ac_extension; then
+       ac_x_libraries=$ac_dir
+       break 2
+     fi
This page took 0.080327 seconds and 4 git commands to generate.