OS: AIX 5.3 gcc 4.0.0 I wanted to use the OpenLDAP & MIT krb5 include files in /opt/pware/include & corresponding libraries in /opt/pware/lib which were part of the install of Samba 3.0.25a from http://us2.samba.org/samba/ftp/Binary_Packages/AIX/ (now http://pware.hvcc.edu/) but there is no configure option that I could find to do this. I tried setting configure arg --includedir but that didn't work. I eventually got configure to recognize ldap was available by: 1) creating symlinks to ldap & lber files in /opt/pware/include in /usr/include 2) setting LDFLAGS=-L/opt/pware/lib before running configure so it could find libldap*
Also, to fix error: Compiling libsmb/clikrb5.c libsmb/clikrb5.c: In function 'handle_krberror_packet': libsmb/clikrb5.c:1518: error: 'ERROR_TABLE_BASE_krb5' undeclared (first use in t his function) libsmb/clikrb5.c:1518: error: (Each undeclared identifier is reported only once libsmb/clikrb5.c:1518: error: for each function it appears in.) The following command failed: gcc -I. -I/usr/local/samba-3.2.4/source -O -D_SAMBA_BUILD_=3 -I/usr/local/samb a-3.2.4/source/iniparser/src -Iinclude -I./include -I. -I. -I./lib/replace -I./ lib/talloc -I./lib/tdb/include -I./libaddns -I./librpc -DHAVE_CONFIG_H -Iinclud e -I./include -I. -I. -I./lib/replace -I./lib/talloc -I./lib/tdb/include -I./lib addns -I./librpc -I./popt -DLDAP_DEPRECATED -I/include -I/usr/local/samba-3.2. 4/source/lib -D_SAMBA_BUILD_=3 -O2 -c libsmb/clikrb5.c -o libsmb/clikrb5.o I had to add -I/opt/pware/include to CPPFLAGS in Makefile.
this is not a samba bug but a matter of the special setup that samba cannot figure all out on its own.