$NetBSD: patch-aa,v 1.5 2012/09/03 11:13:29 marino Exp $ IF AC_PATH_X fails, also look for /usr/X11R7. Additionally, also specify run-path to the X libraries. Add DragonFly support. --- tclconfig/tcl.m4.orig 2007-02-21 22:09:05.000000000 +0000 +++ tclconfig/tcl.m4 @@ -1592,7 +1592,7 @@ dnl AC_CHECK_TOOL(AR, ar) UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' TCL_LIB_VERSIONS_OK=nodots ;; - FreeBSD-*) + FreeBSD-*|DragonFly-*) # FreeBSD 3.* and greater have ELF. SHLIB_CFLAGS="-fPIC" SHLIB_LD="ld -Bshareable -x" @@ -1610,7 +1610,7 @@ dnl AC_CHECK_TOOL(AR, ar) LDFLAGS="$LDFLAGS -pthread" fi case $system in - FreeBSD-3.*) + *) # FreeBSD-3 doesn't handle version numbers with dots. UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' @@ -2313,7 +2313,7 @@ AC_DEFUN([TEA_PATH_UNIX_X], [ found_xincludes="no" AC_TRY_CPP([#include ], found_xincludes="yes", found_xincludes="no") if test "$found_xincludes" = "no"; then - dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include" + dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R7/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include /usr/pkg/include" for i in $dirs ; do if test -r $i/X11/Intrinsic.h; then AC_MSG_RESULT([$i]) @@ -2336,7 +2336,7 @@ AC_DEFUN([TEA_PATH_UNIX_X], [ if test "$no_x" = yes; then AC_MSG_CHECKING([for X11 libraries]) XLIBSW=nope - dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib" + dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R7/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib /usr/pkg/lib" for i in $dirs ; do if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then AC_MSG_RESULT([$i]) @@ -2349,7 +2349,7 @@ AC_DEFUN([TEA_PATH_UNIX_X], [ if test "$x_libraries" = ""; then XLIBSW=-lX11 else - XLIBSW="-L$x_libraries -lX11" + XLIBSW="-L$x_libraries -Wl,-R,$x_libraries -lX11" fi fi if test "$XLIBSW" = nope ; then