1*e670fd5cSchristosdnl $OpenLDAP$ 2*e670fd5cSchristos 3*e670fd5cSchristosdnl Copyright 2000-2021 The OpenLDAP Foundation. All Rights Reserved. 4*e670fd5cSchristosdnl COPYING RESTRICTIONS APPLY, see COPYRIGHT file 5*e670fd5cSchristos 6*e670fd5cSchristosdnl Process this file with autoconf to produce a configure script. 7*e670fd5cSchristos 8*e670fd5cSchristosAC_COPYRIGHT([[Copyright 2000-2021 The OpenLDAP Foundation. All rights reserved. 9*e670fd5cSchristosRestrictions apply, see COPYRIGHT and LICENSE files.]]) 10*e670fd5cSchristosAC_REVISION([Id: 9e53b7243116521c824456d5fb2d4d3c358c0d76 ]) 11*e670fd5cSchristosAC_INIT(ldapcpplib, [] , [http://www.openldap.org/its/] ) 12*e670fd5cSchristosAC_CONFIG_SRCDIR(src/LDAPConnection.h) 13*e670fd5cSchristosAM_INIT_AUTOMAKE(foreign) 14*e670fd5cSchristosAM_CONFIG_HEADER(src/config.h) 15*e670fd5cSchristos 16*e670fd5cSchristoseval `$ac_aux_dir/version.sh` 17*e670fd5cSchristosif test -z "$OL_CPP_API_RELEASE"; then 18*e670fd5cSchristos AC_MSG_ERROR([could not determine version]) 19*e670fd5cSchristosfi 20*e670fd5cSchristos 21*e670fd5cSchristosVERSION=$OL_CPP_API_RELEASE 22*e670fd5cSchristosOPENLDAP_CPP_API_VERSION=$OL_CPP_API_VERSION 23*e670fd5cSchristosAC_SUBST(VERSION) 24*e670fd5cSchristosAC_SUBST(OPENLDAP_CPP_API_VERSION) 25*e670fd5cSchristosdnl Checks for programs. 26*e670fd5cSchristosAC_PROG_INSTALL 27*e670fd5cSchristosdnl AC_PROG_CC 28*e670fd5cSchristosAC_PROG_CXX 29*e670fd5cSchristosdnl AC_PROG_RANLIB 30*e670fd5cSchristosdnl AM_DISABLE_SHARED 31*e670fd5cSchristosAC_PROG_LIBTOOL 32*e670fd5cSchristosdnl AC_PROG_MAKE_SET 33*e670fd5cSchristosAC_ARG_ENABLE(debug,[ --enable-debug],[ 34*e670fd5cSchristos CXXFLAGS="-g -O0 -Wall" 35*e670fd5cSchristos AC_DEFINE(WITH_DEBUG,[],[Define to 1 ot enable debug logging]) 36*e670fd5cSchristos ], 37*e670fd5cSchristos) 38*e670fd5cSchristos 39*e670fd5cSchristosAC_ARG_WITH(libldap,[ --with-libldap=DIR Path to the libldap library [/usr/local/lib]],[ 40*e670fd5cSchristos LIBS="-L$with_libldap $LIBS " 41*e670fd5cSchristos ],[ 42*e670fd5cSchristos LIBS="-L/usr/local/lib $LIBS " 43*e670fd5cSchristos ] 44*e670fd5cSchristos) 45*e670fd5cSchristos 46*e670fd5cSchristosAC_ARG_WITH(ldap-includes,[ --with-ldap-includes=DIR Path to the libldap include files [/usr/local/include]],[ 47*e670fd5cSchristos CPPFLAGS="-I$with_ldap_includes $CPPFLAGS " 48*e670fd5cSchristos ],[ 49*e670fd5cSchristos CPPFLAGS="-I/usr/local/include $CPPFLAGS " 50*e670fd5cSchristos ] 51*e670fd5cSchristos) 52*e670fd5cSchristosdnl Checks for libraries. 53*e670fd5cSchristosAC_CHECK_LIB(resolv,main) 54*e670fd5cSchristosAC_CHECK_LIB(lber,ber_strdup,[ 55*e670fd5cSchristosdnl NOOP 56*e670fd5cSchristos : 57*e670fd5cSchristos ],[ 58*e670fd5cSchristos echo " didn't find ber_strdup in liblber !"; 59*e670fd5cSchristos echo " Check for the right version (>= 2.0) of the OpenLDAP libraries"; 60*e670fd5cSchristos echo " or try the --with-libldap option."; 61*e670fd5cSchristos exit 62*e670fd5cSchristos ]) 63*e670fd5cSchristosAC_CHECK_LIB(ldap,ldap_add_ext,[ 64*e670fd5cSchristosdnl NOOP 65*e670fd5cSchristos : 66*e670fd5cSchristos ],[ 67*e670fd5cSchristos echo " didn't find ldap_add_ext in libldap !"; 68*e670fd5cSchristos echo " Check for the right version (>= 2.0) of the OpenLDAP libraries"; 69*e670fd5cSchristos echo " or try the --with-libldap option."; 70*e670fd5cSchristos exit 71*e670fd5cSchristos ],[ 72*e670fd5cSchristos -llber 73*e670fd5cSchristos ]) 74*e670fd5cSchristosdnl Checks for header files. 75*e670fd5cSchristosAC_HEADER_TIME 76*e670fd5cSchristosAC_CHECK_HEADERS(termios.h ldap.h) 77*e670fd5cSchristosAC_EGREP_HEADER(ldap_add_ext,ldap.h,[ 78*e670fd5cSchristosdnl NOOP 79*e670fd5cSchristos : 80*e670fd5cSchristos ],[ 81*e670fd5cSchristos echo " didn't find ldap_add_ext in ldap.h!"; 82*e670fd5cSchristos echo " Check for the right version (>= 2.0) of the OpenLDAP includes"; 83*e670fd5cSchristos echo " or try --with-ldap-includes option."; 84*e670fd5cSchristos exit 85*e670fd5cSchristos ]) 86*e670fd5cSchristosAC_CHECK_HEADER(lber.h) 87*e670fd5cSchristosAC_EGREP_HEADER(ber_strdup,lber.h,[ 88*e670fd5cSchristosdnl NOOP 89*e670fd5cSchristos : 90*e670fd5cSchristos ],[ 91*e670fd5cSchristos echo " didn't find ber_strdup in lber.h!"; 92*e670fd5cSchristos echo " Check for the right version (>= 2.0) of the OpenLDAP includes"; 93*e670fd5cSchristos echo " or try --with-ldap-includes option."; 94*e670fd5cSchristos exit 95*e670fd5cSchristos ]) 96*e670fd5cSchristos 97*e670fd5cSchristosdnl Checks for typedefs, structures, and compiler characteristics. 98*e670fd5cSchristos 99*e670fd5cSchristosdnl Checks for library functions. 100*e670fd5cSchristos 101*e670fd5cSchristosAC_OUTPUT(Makefile src/Makefile examples/Makefile) 102