--- a/usr/src/cmd/tor/Makefile.sfw Sat Apr 23 12:09:15 2011 -0700
+++ b/usr/src/cmd/tor/Makefile.sfw Sat Apr 23 14:19:34 2011 -0700
@@ -18,10 +18,11 @@
#
# CDDL HEADER END
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+
#
-#ident "@(#)Makefile.sfw 1.2 09/06/05 SMI"
+# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
+#
+# ident "@(#)Makefile.sfw 1.3 11/04/07 SMI"
#
include ../Makefile.cmd
@@ -45,10 +46,17 @@
install: all
$(SHELL) VER=$(VER) ./install-sfw
+# Tor's configure script builds a small program linked against OpenSSL and tries
+# to execute it. And given that Tor is built against headers and libraries in
+# the proto area we need to pass LD_LIBRARY_PATH variable to the configure
+# script so that those OpenSSL libraries in the proto/usr/lib can be found by
+# the dynamic linker when executing that sample program.
$(VER)/config.status: $(VER)/configure
(cd $(VER); \
CC=$(CC) \
CFLAGS="$(CFLAGS) -DSOLARIS" \
+ CPPFLAGS="$(CPPFLAGS)" \
+ LD_LIBRARY_PATH="$(ROOTLIB)" \
LDFLAGS="$(LDFLAGS)" \
LIBS="$(LIBS)" \
INSTALL="$(INSTALL_PROTO) -m 755 " \