[Date Prev][Date Next] [Chronological] [Thread] [Top]

the Configure script and a patch for the shell backend



Hello,

    I just downloaded the openldap-devel-981024.tgz, and when I try to
run the configure script, I get a syntax error near line 2471.  I've
included the output from 'script' at the bottom of this message  (The
machine in question is running Caldera's OpenLinux 1.1).  I've done very
little with configure scripts, so I'm not sure what needs to be done to fix
this one...  (The problem appears to be caused by the absence of commands
between the 'then' on line 2470 and the 'elif' on line 2741.)

    Also:  I have a patch for the 'unbind.c' file for the shell backend.
Currently, then the unbind routine is called, it's only passed three
parameters, but the subroutine is expecting six parameters (if I'm reading
the code correctly).  Most of the extra parameters were ignored anyway, but
one of them wasn't, and it's a pointer (char *dn).

   Is anyone using the shell backend?  Since the default in 'configure'
is to not include/compile the shell backend, and I've found at least two
problems (that look fairly obvious to me) that haven't been fixed before
now, are there plans to drop the shell backend from OpenLDAP at some point?

	- Dan (Daniel Carroll - dan@mesastate.edu)

    Here's my patch to fix unbind.c in the shell backend:

*** OpenLDAP-981024/servers/slapd/back-shell/unbind.c	Sat Oct 24 17:42:03 1998
--- ldap-patched/servers/slapd/back-shell/unbind.c	Tue Nov  3 08:37:23 1998
***************
*** 15,23 ****
      Backend		*be,
      Connection		*conn,
      Operation		*op,
-     char		*dn,
-     int			method,
-     struct berval	*cred
  )
  {
  	struct shellinfo	*si = (struct shellinfo *) be->be_private;
--- 15,20 ----
***************
*** 40,46 ****
  	fprintf( wfp, "UNBIND\n" );
  	fprintf( wfp, "msgid: %d\n", op->o_msgid );
  	print_suffixes( wfp, be );
! 	fprintf( wfp, "dn: %s\n", dn );
  	fclose( wfp );
  
  	/* no response to unbind */
--- 37,43 ----
  	fprintf( wfp, "UNBIND\n" );
  	fprintf( wfp, "msgid: %d\n", op->o_msgid );
  	print_suffixes( wfp, be );
! 	fprintf( wfp, "dn: %s\n", conn->c_dn );
  	fclose( wfp );
  
  	/* no response to unbind */

-----------------------------------------------------------------------------

   Output from the configure script:

defiant ~/ldap$ ./configure --prefix=/usr/local/ldap --enable-shell
creating cache ./config.cache
checking configure arguments... done
checking whether ln -s works... yes
checking for a BSD compatible install... /usr/bin/install -c
checking for ranlib... ranlib
checking whether make sets ${MAKE}... yes
checking for sendmail... /usr/sbin/sendmail
checking for vi... /bin/vi
checking for finger... /usr/bin/finger
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking whether gcc needs -traditional... no
checking for AIX... no
checking for POSIXized ISC... no
checking for minix/config.h... no
checking for socket... yes
checking for sigset in -lV3... no
checking for kerberosIV/krb.h... no
checking for kerberosIV/des.h... no
checking for krb.h... no
checking for des.h... yes
./configure: syntax error near unexpected token `elif'
./configure: ./configure: line 2471: `					elif test $ol_cv_pthread_version = draft4 ; then'
defiant ~/ldap$ exit

---------------------------------------------------------------------------

     Output from config.log

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

configure:591: checking configure arguments
configure:1203: checking whether ln -s works
configure:1234: checking for a BSD compatible install
configure:1286: checking for ranlib
configure:1313: checking whether make sets ${MAKE}
configure:1343: checking for sendmail
configure:1375: checking for vi
configure:1407: checking for finger
configure:1440: checking for gcc
configure:1517: checking whether the C compiler (gcc  ) works
configure:1531: gcc -o conftest    conftest.c  1>&5
configure:1551: checking whether the C compiler (gcc  ) is a cross-compiler
configure:1556: checking whether we are using GNU C
configure:1565: gcc -E conftest.c
configure:1580: checking whether gcc accepts -g
configure:1608: checking how to run the C preprocessor
configure:1629: gcc -E  conftest.c >/dev/null 2>conftest.out
configure:1670: checking whether gcc needs -traditional
configure:1677: sgtty.h: No such file or directory
configure:1717: checking for AIX
configure:1741: checking for POSIXized ISC
configure:1763: checking for minix/config.h
configure:1773: gcc -E  conftest.c >/dev/null 2>conftest.out
configure:1769: minix/config.h: No such file or directory
configure: failed program was:
#line 1768 "configure"
#include "confdefs.h"
#include <minix/config.h>
configure:1814: checking for socket
configure:1842: gcc -o conftest -g -O2   conftest.c  1>&5
configure:2127: checking for sigset in -lV3
configure:2146: gcc -o conftest -g -O2   conftest.c -lV3   1>&5
/usr/bin/ld: cannot open -lV3: No such file or directory
collect2: ld returned 1 exit status
configure: failed program was:
#line 2135 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char sigset();

int main() {
sigset()
; return 0; }
configure:2179: checking for kerberosIV/krb.h
configure:2189: gcc -E  conftest.c >/dev/null 2>conftest.out
configure:2185: kerberosIV/krb.h: No such file or directory
configure: failed program was:
#line 2184 "configure"
#include "confdefs.h"
#include <kerberosIV/krb.h>
configure:2179: checking for kerberosIV/des.h
configure:2189: gcc -E  conftest.c >/dev/null 2>conftest.out
configure:2185: kerberosIV/des.h: No such file or directory
configure: failed program was:
#line 2184 "configure"
#include "confdefs.h"
#include <kerberosIV/des.h>
configure:2273: checking for krb.h
configure:2283: gcc -E  conftest.c >/dev/null 2>conftest.out
configure:2279: krb.h: No such file or directory
configure: failed program was:
#line 2278 "configure"
#include "confdefs.h"
#include <krb.h>
configure:2273: checking for des.h
configure:2283: gcc -E  conftest.c >/dev/null 2>conftest.out