]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
more X kludgery
authorDavid MacKenzie <djm@djmnet.org>
Sat, 9 Nov 1996 07:15:16 +0000 (07:15 +0000)
committerDavid MacKenzie <djm@djmnet.org>
Sat, 9 Nov 1996 07:15:16 +0000 (07:15 +0000)
ChangeLog
acspecific.m4
autoconf.texi
doc/autoconf.texi
lib/autoconf/specific.m4

index ae705c682492d0c4ac3439cd102ff94de7355426..dc495d7de88c71d1ab4a5090890f34fd04d42175 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+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
index f5922ef470138b76ecb48a79b5138cdcea2486b5..17104c229d3be43f770a7a4f4d812d4094aa01d4 100644 (file)
@@ -787,10 +787,7 @@ AC_DEFUN(AC_FUNC_FNMATCH,
 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,
@@ -1746,7 +1743,9 @@ EOF
         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" ;;
@@ -1773,6 +1772,7 @@ AC_TRY_CPP([#include <$x_direct_test_include>],
 [# 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        \
@@ -1832,6 +1832,7 @@ AC_TRY_LINK(, [${x_direct_test_function}()],
 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        \
@@ -1863,12 +1864,13 @@ for ac_dir in `echo "$ac_x_includes" | sed s/include/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
@@ -1891,15 +1893,12 @@ else
     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.
index 4027350973297fb12c077e46f1255e1cfbeeb862..7e7ba68020b013e038f49264fe724163e2828a27 100644 (file)
@@ -1830,10 +1830,8 @@ return value for an error indicator.
 @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
index 4027350973297fb12c077e46f1255e1cfbeeb862..7e7ba68020b013e038f49264fe724163e2828a27 100644 (file)
@@ -1830,10 +1830,8 @@ return value for an error indicator.
 @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
index f5922ef470138b76ecb48a79b5138cdcea2486b5..17104c229d3be43f770a7a4f4d812d4094aa01d4 100644 (file)
@@ -787,10 +787,7 @@ AC_DEFUN(AC_FUNC_FNMATCH,
 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,
@@ -1746,7 +1743,9 @@ EOF
         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" ;;
@@ -1773,6 +1772,7 @@ AC_TRY_CPP([#include <$x_direct_test_include>],
 [# 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        \
@@ -1832,6 +1832,7 @@ AC_TRY_LINK(, [${x_direct_test_function}()],
 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        \
@@ -1863,12 +1864,13 @@ for ac_dir in `echo "$ac_x_includes" | sed s/include/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
@@ -1891,15 +1893,12 @@ else
     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.