Opened 11 years ago

Last modified 6 years ago

#1364 new defect

configure fails to detect X11 on OS X

Reported by: snorfalorpagus Owned by: grass-dev@…
Priority: normal Milestone: 6.4.6
Component: Compiling Version: svn-develbranch6
Keywords: configure.in, X11 Cc:
CPU: OSX/Intel Platform: MacOSX

Description

Configure was refusing to detect X11, despite specification of --with-x, --x-libraries and --x-includes. This is due to OS X using a different shared library suffix (*.dylib) to other OSs, which was missed out of the search path. Applies to 6.4, 6.5 and 7. Patch attached (for 6.5).

Attachments (1)

dylib.patch (841 bytes ) - added by snorfalorpagus 11 years ago.
cd grass6_devel; patch < dylib.patch

Download all attachments as: .zip

Change History (6)

by snorfalorpagus, 11 years ago

Attachment: dylib.patch added

cd grass6_devel; patch < dylib.patch

in reply to:  description comment:1 by glynn, 11 years ago

Replying to snorfalorpagus:

Patch attached (for 6.5).

There's no point patching the configure script; it's generated by autoconf from configure.in and aclocal.m4, so any changes will be lost the next time that the source files are updated (unless we remember to keep patching it, which is unlikely to happen).

The X stuff is handled by autoconf's AC_PATH_XTRA macro, which uses AC_PATH_X_XMKMF, which doesn't recognise the .dylib suffix. At least, the version from 2.13 doesn't. Updating to a later version of autoconf is probably worthwhile, but it's potentially a lot of work.

In the meantime, it might be possible to override AC_PATH_X_XMKMF with a fixed local version.

comment:2 by kyngchaos, 11 years ago

I don't have a problem detecting X11. I've always specified --with-x, --x-includes and --x-libraries. If you use --x-includes and --x-libraries, configure never gets to the parts to check for the existence of library files (where your patches apply), it just assumes you're right.

if test "x$with_x" = xno; then
  # The user explicitly disabled X.
  have_x=disabled
else
  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
    # Both variables are already set.
    have_x=yes
  else
# check for libs and includes...
  fi
fi

comment:3 by hamish, 9 years ago

Keywords: configure.in X11 added
Version: unspecifiedsvn-develbranch6

any update?

comment:4 by neteler, 9 years ago

Milestone: 6.4.4

comment:5 by neteler, 6 years ago

Milestone: 6.4.46.4.6
Note: See TracTickets for help on using tickets.