I attach suggested patch. I add libssl and libkrb5 tests, but maybe it is not good place put them directly into PostgreSQL test. Please, feel free to move it to correct place.

                Zdenek

Zdenek Kotala wrote:
I'm trying to compile pgAdmin on solaris and I was caught in the same trap as many times before. I got following error:

error: you must specify a valid PostgreSQL installation with --with-pgsql=DIR

But it is not correct. I specified it correctly. However main problem there is libssl. Default libssl installation on Solaris is in /usr/sfw/lib which is not usually in library path.

Special lines are added for solaris to add -lssl in configure (see acinclude.m4 line 412), but there is no check that ssl is really installed or not. This check should be there.

    Comments?

        Zdenek

*** acinclude.m4.orig	Fri Feb  1 12:04:47 2008
--- acinclude.m4	Fri Feb  1 12:27:04 2008
***************
*** 406,415 ****
  		PGSQL_OLD_LDFLAGS="$LDFLAGS"
  		PGSQL_OLD_CPPFLAGS="$CPPFLAGS"
  
  		# Solaris needs -lssl for this test
  		case "${host}" in
  			*solaris*)
! 				LDFLAGS="$LDFLAGS -L${PG_LIB} -lssl"
  				;;
  			*)
  				LDFLAGS="$LDFLAGS -L${PG_LIB}"
--- 406,431 ----
  		PGSQL_OLD_LDFLAGS="$LDFLAGS"
  		PGSQL_OLD_CPPFLAGS="$CPPFLAGS"
  
+ 		AC_LANG_SAVE    
+ 		AC_LANG_C               
+ 		AC_CHECK_LIB(ssl, SSL_library_init, [LIB_SSL=yes], [LIB_SSL=no])
+ 		AC_LANG_RESTORE         
+ 
+ 		AC_LANG_SAVE    
+ 		AC_LANG_C               
+ 		AC_CHECK_LIB(krb5, krb5_sendauth, [LIB_KRB5=yes], [LIB_KRB5=no])
+ 		AC_LANG_RESTORE         
+ 
+ 
  		# Solaris needs -lssl for this test
  		case "${host}" in
  			*solaris*)
!                 if test "$LIB_SSL" = "yes"
! 				then
! 					LDFLAGS="$LDFLAGS -L${PG_LIB} -lssl"
! 				else
! 					LDFLAGS="$LDFLAGS -L${PG_LIB}"
! 				fi
  				;;
  			*)
  				LDFLAGS="$LDFLAGS -L${PG_LIB}"
***************
*** 440,445 ****
--- 456,463 ----
  		AC_LANG_SAVE
  		AC_LANG_C
  
+ 		if test "$LIB_SSL" = "yes"
+ 		then
                  # Check for SSL support
                  if test "$BUILD_STATIC" = "yes"
                  then
***************
*** 468,475 ****
--- 486,501 ----
  	        		AC_CHECK_LIB(pq, SSL_connect, [PG_SSL=yes], [PG_SSL=no])
  	        	fi
                  fi
+ 		else
+ 			PG_SSL="no"
+ 		fi
  
+ 		if test "$LIB_KRB5" = "yes"
+ 		then
                  # Check for Kerberos support
+ 
+ 				LDFLAGS="$LDFLAGS -lkrb5"
+ 
                  if test "$BUILD_STATIC" = "yes"
                  then
                          AC_MSG_CHECKING(for krb5_free_principal in libpq.a)
***************
*** 497,502 ****
--- 523,531 ----
  			        AC_CHECK_LIB(pq, krb5_free_principal, [PG_KRB5=yes], [PG_KRB5=no])
  		        fi
                  fi
+ 		else
+ 			PG_KRB5="no"
+ 		fi
  
  		AC_LANG_RESTORE
  
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to