diff --git a/src/configure.in b/src/configure.in
index ad75ddd142272bb0bd02f52e3f09359d343d0fc1..5f1350159026445e29dcb27c9a81aeb7923139b6 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -801,7 +801,7 @@ else
     echo Using $SMARTBUILDCC to compile smartlink.
   elif test "x$ac_cv_prog_cc_cross" = "xyes"; then
     PIKE_MSG_WARN([Crosscompiler detected.])
-    AC_PATH_PROGS(SMARTBUILDCC, gcc cc egcs, gcc, /usr/bin:/bin/:/usr/ccs/bin:/usr/local/bin:/usr/sfw/bin:/opt/sfw/bin:/opt/csw/bin:$PATH:$EXTRA_PATH)
+    AC_PATH_PROGS(SMARTBUILDCC, gcc cc egcs, gcc, /usr/bin:/bin/:/usr/ccs/bin:/usr/local/bin:/opt/local/bin:/usr/pkg/bin:/opt/pkg/bin:/usr/sfw/bin:/opt/sfw/bin:/opt/csw/bin:$PATH:$EXTRA_PATH)
     echo Using $SMARTBUILDCC to compile smartlink.
   fi
 
@@ -2576,6 +2576,7 @@ if test $ldflags_is_set = yes -a $cppflags_is_set = yes ; then :; else
     $with_root/usr/freeware $with_root/usr/pkg \
     `echo $with_root/opt/gnome* | sort -r` \
     `echo $with_root/usr/X* | sort -r` \
+    $with_root/opt/local $with_root/usr/pkg $with_root/opt/pkg \ 
     $with_root/usr/sfw $with_root/opt/sfw $with_root/opt/csw \
     $with_root/usr/ccs
   do