components/libpki/patches/01-configure.patch
author naoki.tanaka@oracle.com <naoki.tanaka@oracle.com>
Thu, 02 Jun 2016 17:04:38 -0700
changeset 6127 54565d218793
parent 5897 495a9e2444e4
child 6129 d11d29f2920a
permissions -rw-r--r--
23492228 libpki doesn't build (work?) on s12-100

Patch origin: in-house
Patch status: not Solaris-specific; suitable for upstream

Need to add architectures for Oracle build environments.
Need to disable rpath to avoid including 32-bit runpath in 64-bit binary.
Need to use an appropriate path for ldap.h.

--- libpki-0.8.9/configure	2015-11-10 13:50:26.446036204 -0800
+++ libpki-0.8.9/configure	2016-06-02 13:02:40.284473768 -0700
@@ -2529,11 +2529,20 @@
     mybits="64"
     mybits_install="64"
     ;;
+  *i86pc)
+    mybits="64"
+    mybits_install="64"
+    ;;
   *sparc*)
     mybits="64"
     mybits_install="64"
     is_sparc="yes"
     ;;
+  *sun4v*)
+    mybits="64"
+    mybits_install="64"
+    is_sparc="yes"
+    ;;
   *aix*)
     mybits="64"
     mybits_install="64"
@@ -2627,6 +2636,10 @@
 
 
 enable_rpath=yes
+if [ "$myarch" = "solaris" ] ; then
+	enable_rpath=no
+fi
+	
 
 # Export variables to prevent autoconf to use rpl_malloc instead
 # of malloc (it won't link properly otherwise!) - needed for iPhone
@@ -14891,26 +14904,37 @@
 $as_echo_n "checking checking for ldap vendor... " >&6; };
 
 if ! [ "$_prefix" = "" ] ; then
-	if $EGREP "Sun" "$_prefix/include/ldap.h" 2>&1 >/dev/null ; then
-	$as_echo "#define LDAP_VENDOR_SUN 1" >>confdefs.h
+	ldap_include_dir=$_prefix/include
+	if [ "$DIST_NAME" = "solaris" ] ; then
+		if [ "$DIST_VERSION" = "5.12" ] ; then
+			ldap_include_dir=$ldap_include_dir/openldap
+		else
+			if [ -d $ldap_include_dir/openldap ] ; then
+				ldap_include_dir=$ldap_include_dir/openldap
+			fi
+		fi
+	fi
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	ldap_vendor="SUN"
-   else
-   	if $EGREP "OpenLDAP" "$_prefix/include/ldap.h" 2>&1 >/dev/null ; then
-		$as_echo "#define LDAP_VENDOR_OPENLDAP 1" >>confdefs.h
+	if $EGREP "Sun" "$ldap_include_dir/ldap.h" 2>&1 >/dev/null ; then
+		$as_echo "#define LDAP_VENDOR_SUN 1" >>confdefs.h
 
-		ldap_vendor="OPENLDAP"
-		library_ldflags=-L$_prefix/lib
-		library_ldadd=-lldap_r
-	else
-		as_fn_error $? "*** LDAP::No supported vendors found in ($_prefix)***" "$LINENO" 5
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+		ldap_vendor="SUN"
+   	else
+   		if $EGREP "OpenLDAP" "$ldap_include_dir/ldap.h" 2>&1 >/dev/null ; then
+			$as_echo "#define LDAP_VENDOR_OPENLDAP 1" >>confdefs.h
+
+			ldap_vendor="OPENLDAP"
+			library_ldflags=-L$_prefix/lib
+			library_ldadd=-lldap_r
+		else
+			as_fn_error $? "*** LDAP::No supported vendors found in ($_prefix)***" "$LINENO" 5
+		fi
 	fi
-   fi
 
 	if [ "$ldap_vendor" = "SUN" ] ; then
-    	ldap_lib=`ls "${_prefix}/lib/libldap.${shlext}" | head -n 1`;
+    		ldap_lib=`ls "${_prefix}/lib/libldap.${shlext}" | head -n 1`;
 		if [ -z "$ldap_lib" ] ; then
 			as_fn_error $? "*** LDAP: missing $_prefix/lib/libldap.$shlext!" "$LINENO" 5
 		fi
@@ -14919,7 +14943,7 @@
 	fi
 
 	library_prefix=$_prefix;
-	library_cflags=-I${_prefix}/include
+	library_cflags=-I$ldap_include_dir
 
 old_cflags=$CFLAGS
 old_ldflags=$LDFLAGS