Index: configure
===================================================================
RCS file: /cvsroot/pgsql-server/configure,v
retrieving revision 1.266
diff -c -c -r1.266 configure
*** configure	9 Jun 2003 03:41:47 -0000	1.266
--- configure	11 Jun 2003 06:31:31 -0000
***************
*** 866,871 ****
--- 866,872 ----
    --with-krb5[=DIR]       build with Kerberos 5 support [/usr/athena]
    --with-krb-srvnam=NAME  name of the service principal in Kerberos postgres
    --with-pam              build with PAM support
+   --with-rendezvous       build with Rendezvous support
    --with-openssl[=DIR]    build with OpenSSL support [/usr/local/ssl]
    --without-readline      do not use Readline
    --without-zlib          do not use Zlib
***************
*** 3361,3366 ****
--- 3362,3407 ----
  
  
  #
+ # Rendezvous
+ #
+ echo "$as_me:$LINENO: checking whether to build with Rendezvous support" >&5
+ echo $ECHO_N "checking whether to build with Rendezvous support... $ECHO_C" >&6
+ 
+ 
+ 
+ # Check whether --with-rendezvous or --without-rendezvous was given.
+ if test "${with_rendezvous+set}" = set; then
+   withval="$with_rendezvous"
+ 
+   case $withval in
+     yes)
+ 
+ cat >>confdefs.h <<\_ACEOF
+ #define USE_RENDEZVOUS 1
+ _ACEOF
+ 
+       ;;
+     no)
+       :
+       ;;
+     *)
+       { { echo "$as_me:$LINENO: error: no argument expected for --with-rendezvous option" >&5
+ echo "$as_me: error: no argument expected for --with-rendezvous option" >&2;}
+    { (exit 1); exit 1; }; }
+       ;;
+   esac
+ 
+ else
+   with_rendezvous=no
+ 
+ fi;
+ 
+ echo "$as_me:$LINENO: result: $with_rendezvous" >&5
+ echo "${ECHO_T}$with_rendezvous" >&6
+ 
+ 
+ 
+ #
  # OpenSSL
  #
  
***************
*** 9040,9045 ****
--- 9081,9199 ----
  
  fi
  
+ if test "$with_rendezvous" = yes ; then
+   if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
+   echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
+ echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6
+ if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
+ echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6
+ else
+   # Is the header compilable?
+ echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h usability" >&5
+ echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h usability... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+ #line $LINENO "configure"
+ #include "confdefs.h"
+ $ac_includes_default
+ #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+   (eval $ac_compile) 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest.$ac_objext'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   ac_header_compiler=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_header_compiler=no
+ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+ echo "${ECHO_T}$ac_header_compiler" >&6
+ 
+ # Is the header present?
+ echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h presence" >&5
+ echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h presence... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+ #line $LINENO "configure"
+ #include "confdefs.h"
+ #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
+ _ACEOF
+ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+   ac_status=$?
+   egrep -v '^ *\+' conftest.er1 >conftest.err
+   rm -f conftest.er1
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } >/dev/null; then
+   if test -s conftest.err; then
+     ac_cpp_err=$ac_c_preproc_warn_flag
+   else
+     ac_cpp_err=
+   fi
+ else
+   ac_cpp_err=yes
+ fi
+ if test -z "$ac_cpp_err"; then
+   ac_header_preproc=yes
+ else
+   echo "$as_me: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   ac_header_preproc=no
+ fi
+ rm -f conftest.err conftest.$ac_ext
+ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+ echo "${ECHO_T}$ac_header_preproc" >&6
+ 
+ # So?  What about this header?
+ case $ac_header_compiler:$ac_header_preproc in
+   yes:no )
+     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&5
+ echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&5
+ echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&2;};;
+   no:yes )
+     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&5
+ echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&2;}
+     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: check for missing prerequisite headers?" >&5
+ echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: check for missing prerequisite headers?" >&2;}
+     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&5
+ echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&2;};;
+ esac
+ echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
+ echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6
+ if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h=$ac_header_preproc
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
+ echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6
+ 
+ fi
+ if test $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h = yes; then
+   :
+ else
+   { { echo "$as_me:$LINENO: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Rendezvous" >&5
+ echo "$as_me: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Rendezvous" >&2;}
+    { (exit 1); exit 1; }; }
+ fi
+ 
+ 
+ fi
+ 
  
  ##
  ## Types, structures, compiler characteristics
***************
*** 17327,17332 ****
--- 17481,17487 ----
  s,@with_krb5@,$with_krb5,;t t
  s,@krb_srvtab@,$krb_srvtab,;t t
  s,@with_pam@,$with_pam,;t t
+ s,@with_rendezvous@,$with_rendezvous,;t t
  s,@with_openssl@,$with_openssl,;t t
  s,@ELF_SYS@,$ELF_SYS,;t t
  s,@THREAD_LIBS@,$THREAD_LIBS,;t t
Index: configure.in
===================================================================
RCS file: /cvsroot/pgsql-server/configure.in,v
retrieving revision 1.257
diff -c -c -r1.257 configure.in
*** configure.in	9 Jun 2003 03:41:46 -0000	1.257
--- configure.in	11 Jun 2003 06:31:33 -0000
***************
*** 472,477 ****
--- 472,488 ----
  
  
  #
+ # Rendezvous
+ #
+ AC_MSG_CHECKING([whether to build with Rendezvous support])
+ PGAC_ARG_BOOL(with, rendezvous, no,
+               [  --with-rendezvous       build with Rendezvous support],
+               [AC_DEFINE([USE_RENDEZVOUS], 1, [Define to 1 to build with Rendezvous support. (--with-rendezvous)])])
+ AC_MSG_RESULT([$with_rendezvous])
+ AC_SUBST(with_rendezvous)
+ 
+ 
+ #
  # OpenSSL
  #
  PGAC_ARG_OPTARG(with, openssl,
***************
*** 757,762 ****
--- 768,777 ----
    AC_CHECK_HEADERS(security/pam_appl.h, [],
                     [AC_CHECK_HEADERS(pam/pam_appl.h, [],
                                       [AC_MSG_ERROR([header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM.])])])
+ fi
+ 
+ if test "$with_rendezvous" = yes ; then
+   AC_CHECK_HEADER(DNSServiceDiscovery/DNSServiceDiscovery.h, [], [AC_MSG_ERROR([header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Rendezvous])])
  fi
  
  
Index: doc/src/sgml/installation.sgml
===================================================================
RCS file: /cvsroot/pgsql-server/doc/src/sgml/installation.sgml,v
retrieving revision 1.132
diff -c -c -r1.132 installation.sgml
*** doc/src/sgml/installation.sgml	25 Mar 2003 16:15:36 -0000	1.132
--- doc/src/sgml/installation.sgml	11 Jun 2003 06:31:37 -0000
***************
*** 270,277 ****
      <listitem>
       <para>
        <application>Kerberos</>, <application>OpenSSL</>, or <application>PAM</>,
!       if you want to support
!       authentication using these services.
       </para>
      </listitem>
     </itemizedlist>
--- 270,276 ----
      <listitem>
       <para>
        <application>Kerberos</>, <application>OpenSSL</>, or <application>PAM</>,
!       if you want to support authentication using these services.
       </para>
      </listitem>
     </itemizedlist>
***************
*** 902,907 ****
--- 901,915 ----
           Prevents the use of the <application>Readline</> library.  This disables
           command-line editing and history in
           <application>psql</application>, so it is not recommended.
+         </para>
+        </listitem>
+       </varlistentry>
+ 
+       <varlistentry>
+        <term><option>--with-rendezvous</option></term>
+        <listitem>
+         <para>
+ 	 Build with Rendezvous support.
          </para>
         </listitem>
        </varlistentry>
Index: src/backend/postmaster/postmaster.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/backend/postmaster/postmaster.c,v
retrieving revision 1.331
diff -c -c -r1.331 postmaster.c
*** src/backend/postmaster/postmaster.c	28 May 2003 19:36:28 -0000	1.331
--- src/backend/postmaster/postmaster.c	11 Jun 2003 06:31:47 -0000
***************
*** 85,90 ****
--- 85,94 ----
  #include <getopt.h>
  #endif
  
+ #ifdef USE_RENDEZVOUS
+ #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
+ #endif
+ 
  #include "catalog/pg_database.h"
  #include "commands/async.h"
  #include "lib/dllist.h"
***************
*** 366,371 ****
--- 370,386 ----
  }
  
  
+ #ifdef USE_RENDEZVOUS
+ 
+ /* reg_reply -- empty callback function for DNSServiceRegistrationCreate() */
+ static void
+ reg_reply(DNSServiceRegistrationReplyErrorType errorCode, void *context)
+ {
+ 
+ }
+ 
+ #endif
+ 
  int
  PostmasterMain(int argc, char *argv[])
  {
***************
*** 723,728 ****
--- 738,755 ----
  			else
  				elog(LOG, "IPv4 socket created");
  		}
+ #endif
+ #ifdef USE_RENDEZVOUS                    
+                 if (service_name != NULL)
+                 {
+                         DNSServiceRegistrationCreate(NULL,	/* default to hostname */
+                                                      "_postgresql._tcp.",
+                                                      "",
+                                                      htonl(PostPortNumber),
+                                                      "",
+                                                      (DNSServiceRegistrationReply)reg_reply,
+                                                      NULL);
+                 }
  #endif
  	}
  
Index: src/include/pg_config.h.in
===================================================================
RCS file: /cvsroot/pgsql-server/src/include/pg_config.h.in,v
retrieving revision 1.48
diff -c -c -r1.48 pg_config.h.in
*** src/include/pg_config.h.in	27 May 2003 16:36:50 -0000	1.48
--- src/include/pg_config.h.in	11 Jun 2003 06:31:49 -0000
***************
*** 564,569 ****
--- 564,572 ----
  /* Define to 1 to build with PAM support. (--with-pam) */
  #undef USE_PAM
  
+ /* Define to 1 to build with Rendezvous support. (--with-rendezvous) */
+ #undef USE_RENDEZVOUS
+ 
  /* Define to build with (Open)SSL support. (--with-openssl) */
  #undef USE_SSL
  
