From c1c980a95d85bcaf8802524d6148783522b300d7 Mon Sep 17 00:00:00 2001
From: Yulong Pei <Yulong.pei@windriver.com>
Date: Wed, 21 Jul 2010 22:33:43 +0800
Subject: [PATCH] change finding path of nss and nspr

Upstream-Status: Pending

Signed-off-by: Yulong Pei <Yulong.pei@windriver.com>
Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
 configure.ac | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/configure.ac b/configure.ac
index 951b3eb..1fdeb0f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -866,10 +866,10 @@ MOZILLA_MIN_VERSION="1.4"
 NSS_CRYPTO_LIB="$XMLSEC_PACKAGE-nss"
 NSPR_PACKAGE=mozilla-nspr
 NSS_PACKAGE=mozilla-nss
-NSPR_INCLUDE_MARKER="nspr/nspr.h"
+NSPR_INCLUDE_MARKER="nspr.h"
 NSPR_LIB_MARKER="libnspr4$shrext"
 NSPR_LIBS_LIST="-lnspr4 -lplds4 -lplc4"
-NSS_INCLUDE_MARKER="nss/nss.h"
+NSS_INCLUDE_MARKER="nss3/nss.h"
 NSS_LIB_MARKER="libnss3$shrext"
 NSS_LIBS_LIST="-lnss3 -lsmime3"
 
@@ -898,24 +898,24 @@ fi
 dnl Priority 1: User specifies the path to installation
 if test "z$NSPR_FOUND" = "zno" -a "z$with_nspr" != "z" -a "z$with_nspr" != "zyes" ; then
     AC_MSG_CHECKING(for nspr library installation in "$with_nspr" folder)
-    if test -f "$with_nspr/include/$NSPR_INCLUDE_MARKER" -a -f "$with_nspr/lib/$NSPR_LIB_MARKER" ; then
-        NSPR_INCLUDE_PATH="$with_nspr/include"
-        NSPR_LIB_PATH="$with_nspr/lib"
+    if test -f "$with_nspr/usr/include/$NSPR_INCLUDE_MARKER" -a -f "$with_nspr/${libdir}/$NSPR_LIB_MARKER" ; then
+        NSPR_INCLUDE_PATH="$with_nspr/usr/include"
+        NSPR_LIB_PATH="$with_nspr/${libdir}"
         NSPR_FOUND="yes"
         AC_MSG_RESULT([yes])
     else
-        AC_MSG_ERROR([not found: "$with_nspr/include/$NSPR_INCLUDE_MARKER" and/or "$with_nspr/lib/$NSPR_LIB_MARKER" files don't exist), typo?])
+        AC_MSG_ERROR([not found: "$with_nspr/usr/include/$NSPR_INCLUDE_MARKER" and/or "$with_nspr/${libdir}/$NSPR_LIB_MARKER" files don't exist), typo?])
     fi
 fi
 if test "z$NSS_FOUND" = "zno" -a "z$with_nss" != "z" -a "z$with_nss" != "zyes" ; then
     AC_MSG_CHECKING(for nss library installation in "$with_nss" folder)
-    if test -f "$with_nss/include/$NSS_INCLUDE_MARKER" -a -f "$with_nss/lib/$NSS_LIB_MARKER" ; then
-        NSS_INCLUDE_PATH="$with_nss/include"
-        NSS_LIB_PATH="$with_nss/lib"
+    if test -f "$with_nss/usr/include/$NSS_INCLUDE_MARKER" -a -f "$with_nss/${libdir}/$NSS_LIB_MARKER" ; then
+        NSS_INCLUDE_PATH="$with_nss/usr/include/nss3"
+        NSS_LIB_PATH="$with_nss/${libdir}"
         NSS_FOUND="yes"
         AC_MSG_RESULT([yes])
     else
-        AC_MSG_ERROR([not found: "$with_nss/include/$NSS_INCLUDE_MARKER" and/or "$with_nss/lib/$NSS_LIB_MARKER" files don't exist), typo?])
+        AC_MSG_ERROR([not found: "$with_nss/usr/include/$NSS_INCLUDE_MARKER" and/or "$with_nss/${libdir}/$NSS_LIB_MARKER" files don't exist), typo?])
     fi
 fi
 
-- 
2.7.4

