--- configure.orig	2003-10-21 12:32:25.000000000 +1000
+++ configure	2019-02-17 01:53:23.000000000 +1100
@@ -59,8 +59,8 @@
 # work okay, usually.
 
 # Set some defaults
-XINCPATH="/usr/X11R6/include /usr/X11/include /usr/include /usr/include/X11 /usr/local/X11/include /usr/openwin/include"
-XLIBPATH="/lib /usr/lib /usr/X11/lib /usr/local/X11/lib /usr/openwin/lib /usr/X11R6/lib /usr/ucblib /usr/ccs/lib /usr/local/lib "`echo "$LD_LIBRARY_PATH" | tr ':' ' '`
+XINCPATH="/usr/X11R6/include /usr/X11/include @@SDKROOT@@/usr/include /usr/include/X11 /usr/local/X11/include /usr/openwin/include"
+XLIBPATH="/lib @@SDKROOT@@/usr/lib /usr/X11/lib /usr/local/X11/lib /usr/openwin/lib /usr/X11R6/lib /usr/ucblib /usr/ccs/lib /usr/local/lib "`echo "$LD_LIBRARY_PATH" | tr ':' ' '`
 GNUPATH=`echo "$PATH" | tr ':' ' '`
 PREFIX=/usr
 BINDIR='$(PREFIX)/bin'
@@ -488,49 +488,49 @@
 
 
 # Check for some known system quirks
-if [ -f /usr/include/sys/ptem.h ]
+if [ -f @@SDKROOT@@/usr/include/sys/ptem.h ]
 then
 	why "This system has a <sys/ptem.h> file so I assume elvis needs it" 
 	NEED_WINSIZE=define
 else
 	why "This system has no <sys/ptem.h> file so I assume elvis doesn't need it"
 fi
-if [ -f /usr/include/termcap.h ]
+if [ -f @@SDKROOT@@/usr/include/termcap.h ]
 then
 	why "This system has a <termcap.h> file so I assume elvis needs it" 
 	NEED_SPEED_T=define
 else
 	why "This system has no <termcap.h> file so I assume elvis doesn't need it"
 fi
-if [ -f /usr/include/sys/wait.h ]
+if [ -f @@SDKROOT@@/usr/include/sys/wait.h ]
 then
 	why "This system has a <sys/wait.h> file so I assume elvis needs it" 
 	NEED_WAIT_H=define
 else
 	why "This system has no <sys/wait.h> file so I assume elvis doesn't need it"
 fi
-if [ -f /usr/include/sys/select.h ]
+if [ -f @@SDKROOT@@/usr/include/sys/select.h ]
 then
 	why "This system has a <sys/select.h> file so I assume elvis needs it" 
 	NEED_SELECT_H=define
 else
 	why "This system has no <sys/select.h> file so I assume elvis doesn't need it"
 fi
-if [ -f /usr/include/sys/ioctl.h ]
+if [ -f @@SDKROOT@@/usr/include/sys/ioctl.h ]
 then
 	why "This system has a <sys/ioctl.h> file so I assume elvis needs it" 
 	NEED_IOCTL_H=define
 else
 	why "This system has no <sys/ioctl.h> file so I assume elvis doesn't need it"
 fi
-if [ -f /usr/include/netinet/in.h ]
+if [ -f @@SDKROOT@@/usr/include/netinet/in.h ]
 then
 	why "This system has a <netinet/in.h> file so I assume elvis needs it" 
 	NEED_IN_H=define
 else
 	why "This system has no <netinet/in.h> file so I assume elvis doesn't need it"
 fi
-if [ -f /usr/include/sys/socket.h ]
+if [ -f @@SDKROOT@@/usr/include/sys/socket.h ]
 then
 	why "This system has a <sys/socket.h> file so I assume elvis needs it" 
 	NEED_SOCKET_H=define
@@ -548,7 +548,7 @@
 	fi
 fi
 why "Does this system support setpgid()?"
-if fgrep setpgid /usr/include/unistd.h >/dev/null 2>/dev/null
+if fgrep setpgid @@SDKROOT@@/usr/include/unistd.h >/dev/null 2>/dev/null
 then
 	why "   Assuming yes, because it is declared in <unistd.h>"
 	NEED_SETPGID=undef
@@ -557,7 +557,7 @@
 	NEED_SETPGID=define
 fi
 why "Does this system support freopen()?"
-if fgrep freopen /usr/include/stdio.h >/dev/null 2>/dev/null
+if fgrep freopen @@SDKROOT@@/usr/include/stdio.h >/dev/null 2>/dev/null
 then
 	why "   Assuming yes, because it is declared in <stdio.h>"
 	NEED_FREOPEN=undef
@@ -584,7 +584,7 @@
 	then
 		why "   Assuming no, because this is a Sun system."
 		NEED_INET_ATON=define
-	elif fgrep inet_aton /usr/include/arpa/inet.h </dev/null >/dev/null
+	elif fgrep inet_aton @@SDKROOT@@/usr/include/arpa/inet.h </dev/null >/dev/null
 	then
 		why "   Assuming yes, because it is declared in <arpa/inet.h>"
 		NEED_INET_ATON=undef
@@ -605,7 +605,7 @@
 	fi
 fi
 why "Does this system support memmove()?"
-if fgrep memmove /usr/include/string*.h </dev/null >/dev/null
+if fgrep memmove @@SDKROOT@@/usr/include/string*.h </dev/null >/dev/null
 then
 	why "   Assuming yes, because it is declared in <string.h> or <strings.h>"
 	NEED_MEMMOVE=undef
@@ -619,13 +619,13 @@
   sgtty)	USE=" -DUSE_SGTTY"	;;
   *)
 	why "Choosing a type of ioctl() calls, since no --ioctl=... argument was given"
-	if [ -f /usr/include/termios.h ]
+	if [ -f @@SDKROOT@@/usr/include/termios.h ]
 	then
 		USE=
 		args="$args --ioctl=termios"
 		why "   Assuming --ioctl=termios because <termios.h> exists"
 	else
-		if [ -f /usr/include/termio.h ]
+		if [ -f @@SDKROOT@@/usr/include/termio.h ]
 		then
 			USE=" -DUSE_TERMIO"
 			args="$args --ioctl=termio"
