+Sat Nov 9 01:54:04 1996 David J MacKenzie <djm@catapult.va.pubnix.com>
+
+ * acspecific.m4 (AC_PATH_X_DIRECT): Try /lib/usr/lib/X11 for A/UX.
+ From Guillermo Gomez <gomez@mi.uni-erlangen.de>.
+ (AC_PATH_XTRA): Replace -R with LD_RUN_PATH in the
+ Solaris kludge. From Paul Eggert <eggert@twinsun.com>.
+
Fri Nov 8 16:02:08 1996 David J MacKenzie <djm@catapult.va.pubnix.com>
* acspecific.m4 (AC_PATH_X_DIRECT): Search for /usr/X11 before
ac_cv_func_fnmatch=yes, ac_cv_func_fnmatch=no, ac_cv_func_fnmatch=no)])
if test $ac_cv_func_fnmatch = yes; then
AC_DEFINE(HAVE_FNMATCH)
-else
- LIBOBJS="$LIBOBJS fnmatch.o"
fi
-AC_SUBST(LIBOBJS)dnl
])
AC_DEFUN(AC_FUNC_MMAP,
ac_im_usrlibdir=$ac_im_libdir; break
fi
done
- # Screen out bogus values from the imake configuration.
+ # Screen out bogus values from the imake configuration. They are
+ # 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) ;;
*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
[# We can compile using X headers with no special include directory.
ac_x_includes=],
[# Look for the header file in a standard set of common directories.
+# Check X11 before X11Rn because it is often a symlink to the current release.
for ac_dir in \
/usr/X11/include \
/usr/X11R6/include \
ac_x_libraries=],
[LIBS="$ac_save_LIBS"
# First see if replacing the include by lib works.
+# Check X11 before X11Rn because it is often a symlink to the current release.
for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
/usr/X11/lib \
/usr/X11R6/lib \
/usr/athena/lib \
/usr/local/x11r5/lib \
/usr/lpp/Xamples/lib \
+ /lib/usr/lib/X11 \
\
/usr/openwin/lib \
/usr/openwin/share/lib \
; \
do
-dnl XXX Shouldn't this really use AC_TRY_LINK to be portable & robust??
+dnl 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/lib${x_direct_test_library}.$ac_extension; then
ac_x_libraries=$ac_dir
X_CFLAGS="$X_CFLAGS -I$x_includes"
fi
- # It would be nice to have a more robust check for the -R ld option than
- # just checking for Solaris.
# It would also be nice to do this for all -L options, not just this one.
if test -n "$x_libraries"; then
X_LIBS="$X_LIBS -L$x_libraries"
- if test "`(uname) 2>/dev/null`" = SunOS &&
- uname -r | grep '^5' >/dev/null; then
- X_LIBS="$X_LIBS -R $x_libraries"
- fi
+ # For Solaris; some versions of Sun CC require a space after -R and
+ # others require no space, so we take a different approach.
+ LD_RUN_PATH="$x_libraries"; export LD_RUN_PATH
fi
# Check for libraries that X11R6 Xt/Xaw programs need.
@defmac AC_FUNC_FNMATCH
@maindex FUNC_FNMATCH
@ovindex LIBOBJS
-If the @code{fnmatch} function is not available, or does not work (like
-the one on SunOS 5.4), add @samp{fnmatch.o} to output variable
-@code{LIBOBJS}. If a working @code{fnmatch} is found, define
-@code{HAVE_FNMATCH}.
+If the @code{fnmatch} function is available and works (unlike the one on
+SunOS 5.4), define @code{HAVE_FNMATCH}.
@end defmac
@defmac AC_FUNC_GETLOADAVG
@defmac AC_FUNC_FNMATCH
@maindex FUNC_FNMATCH
@ovindex LIBOBJS
-If the @code{fnmatch} function is not available, or does not work (like
-the one on SunOS 5.4), add @samp{fnmatch.o} to output variable
-@code{LIBOBJS}. If a working @code{fnmatch} is found, define
-@code{HAVE_FNMATCH}.
+If the @code{fnmatch} function is available and works (unlike the one on
+SunOS 5.4), define @code{HAVE_FNMATCH}.
@end defmac
@defmac AC_FUNC_GETLOADAVG
ac_cv_func_fnmatch=yes, ac_cv_func_fnmatch=no, ac_cv_func_fnmatch=no)])
if test $ac_cv_func_fnmatch = yes; then
AC_DEFINE(HAVE_FNMATCH)
-else
- LIBOBJS="$LIBOBJS fnmatch.o"
fi
-AC_SUBST(LIBOBJS)dnl
])
AC_DEFUN(AC_FUNC_MMAP,
ac_im_usrlibdir=$ac_im_libdir; break
fi
done
- # Screen out bogus values from the imake configuration.
+ # Screen out bogus values from the imake configuration. They are
+ # 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) ;;
*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
[# We can compile using X headers with no special include directory.
ac_x_includes=],
[# Look for the header file in a standard set of common directories.
+# Check X11 before X11Rn because it is often a symlink to the current release.
for ac_dir in \
/usr/X11/include \
/usr/X11R6/include \
ac_x_libraries=],
[LIBS="$ac_save_LIBS"
# First see if replacing the include by lib works.
+# Check X11 before X11Rn because it is often a symlink to the current release.
for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
/usr/X11/lib \
/usr/X11R6/lib \
/usr/athena/lib \
/usr/local/x11r5/lib \
/usr/lpp/Xamples/lib \
+ /lib/usr/lib/X11 \
\
/usr/openwin/lib \
/usr/openwin/share/lib \
; \
do
-dnl XXX Shouldn't this really use AC_TRY_LINK to be portable & robust??
+dnl 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/lib${x_direct_test_library}.$ac_extension; then
ac_x_libraries=$ac_dir
X_CFLAGS="$X_CFLAGS -I$x_includes"
fi
- # It would be nice to have a more robust check for the -R ld option than
- # just checking for Solaris.
# It would also be nice to do this for all -L options, not just this one.
if test -n "$x_libraries"; then
X_LIBS="$X_LIBS -L$x_libraries"
- if test "`(uname) 2>/dev/null`" = SunOS &&
- uname -r | grep '^5' >/dev/null; then
- X_LIBS="$X_LIBS -R $x_libraries"
- fi
+ # For Solaris; some versions of Sun CC require a space after -R and
+ # others require no space, so we take a different approach.
+ LD_RUN_PATH="$x_libraries"; export LD_RUN_PATH
fi
# Check for libraries that X11R6 Xt/Xaw programs need.