Skip to content
Snippets Groups Projects
configure.in 88 KiB
Newer Older
dnl $OpenLDAP$
dnl This work is part of OpenLDAP Software <http://www.openldap.org/>.
Kurt Zeilenga's avatar
Kurt Zeilenga committed
dnl Copyright 1998-2005 The OpenLDAP Foundation.
dnl All rights reserved.
dnl
dnl Redistribution and use in source and binary forms, with or without
dnl modification, are permitted only as authorized by the OpenLDAP
dnl Public License.
dnl
dnl A copy of this license is available in the file LICENSE in the
dnl top-level directory of the distribution or, alternatively, at
dnl <http://www.OpenLDAP.org/license.html>.
dnl ----------------------------------------------------------------
dnl Disable config.cache!
define([AC_CACHE_LOAD], )dnl
define([AC_CACHE_SAVE], )dnl
Kurt Zeilenga's avatar
Kurt Zeilenga committed
dnl ================================================================
dnl Configure.in for OpenLDAP
Kurt Zeilenga's avatar
Kurt Zeilenga committed
AC_COPYRIGHT([[Copyright 1998-2005 The OpenLDAP Foundation. All rights reserved.
Restrictions apply, see COPYRIGHT and LICENSE files.]])
AC_REVISION([$OpenLDAP$])
Kurt Zeilenga's avatar
Kurt Zeilenga committed
AC_INIT([OpenLDAP],,[http://www.openldap.org/its/])
AC_CONFIG_SRCDIR(build/version.sh)dnl
Kurt Zeilenga's avatar
Kurt Zeilenga committed
dnl ----------------------------------------------------------------
dnl OpenLDAP Autoconf Macros
builtin(include, build/openldap.m4)dnl
dnl ================================================================
# set unset (borrowed from autoconf 2.49c)
if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
  ol_unset=unset
else
  ol_unset=false
fi
# unset CDPATH
$ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }

AC_CONFIG_AUX_DIR(build)dnl
eval `$ac_aux_dir/version.sh`
if test -z "$OL_STRING"; then
	AC_MSG_ERROR([could not determine version])
fi

if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
	ac_cv_shtool="$ac_aux_dir/shtool"
else
	AC_MSG_ERROR([no shtool found in $ac_aux_dir])
fi

SHTOOL="$ac_cv_shtool"
dnl AC_SUBST(SHTOOL)dnl
Kurt Zeilenga's avatar
Kurt Zeilenga committed
TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
OPENLDAP_CVS=""
if test -d $ac_aux_dir/CVS; then
	OPENLDAP_CVS="(from CVS sources) "
fi

echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
dnl Determine host platform
dnl		we try not to use this for much
AC_CANONICAL_TARGET([])
AM_INIT_AUTOMAKE([$OL_PACKAGE],[$OL_VERSION], [no defines])dnl
AC_SUBST(PACKAGE)dnl
AC_SUBST(VERSION)dnl
AC_DEFINE_UNQUOTED(OPENLDAP_PACKAGE,"$PACKAGE",Package)
AC_DEFINE_UNQUOTED(OPENLDAP_VERSION,"$VERSION",Version)
AC_DEFINE_UNQUOTED(LDAP_VENDOR_VERSION,$OL_API_INC,Version)
AC_DEFINE_UNQUOTED(LDAP_VENDOR_VERSION_MAJOR,$OL_MAJOR,Major)
AC_DEFINE_UNQUOTED(LDAP_VENDOR_VERSION_MINOR,$OL_MINOR,Minor)
AC_DEFINE_UNQUOTED(LDAP_VENDOR_VERSION_PATCH,$OL_PATCH,Patch)
OPENLDAP_LIBRELEASE=$OL_API_LIB_RELEASE
AC_SUBST(OPENLDAP_LIBRELEASE)dnl

OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION
Kurt Zeilenga's avatar
Kurt Zeilenga committed
AC_SUBST(OPENLDAP_LIBVERSION)dnl
OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
AC_SUBST(OPENLDAP_RELEASE_DATE)dnl

dnl We use autoconf features new to 2.59.  Later versions like won't work.
dnl aclocal.m4 should be built using aclocal from automake 1.5
dnl libtool 1.5 should be installed.
AC_PREREQ(2.59)dnl Required Autoconf version
AH_TOP([
/* begin of portable.h.pre */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
 *
 * Copyright 1998-2005 The OpenLDAP Foundation
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted only as authorized by the OpenLDAP
 * Public License.
 *
 * A copy of this license is available in the file LICENSE in the
 * top-level directory of the distribution or, alternatively, at
 * <http://www.OpenLDAP.org/license.html>.
 */

#ifndef _LDAP_PORTABLE_H
#define _LDAP_PORTABLE_H

/* define this if needed to get reentrant functions */
#ifndef REENTRANT
#undef REENTRANT
#endif
#ifndef _REENTRANT
#undef _REENTRANT
#endif

/* define this if needed to get threadsafe functions */
#ifndef THREADSAFE
#undef THREADSAFE
#endif
#ifndef _THREADSAFE
#undef _THREADSAFE
#endif
#ifndef THREAD_SAFE
#undef THREAD_SAFE
#endif
#ifndef _THREAD_SAFE
#undef _THREAD_SAFE
#endif

#ifndef _SGI_MP_SOURCE
#undef _SGI_MP_SOURCE
#endif

/* end of portable.h.pre */
])
AH_BOTTOM([
/* begin of portable.h.post */

#ifdef _WIN32
	/* don't suck in all of the win32 api */
#	define WIN32_LEAN_AND_MEAN 1
#endif

#ifndef LDAP_NEEDS_PROTOTYPES
/* force LDAP_P to always include prototypes */
#define LDAP_NEEDS_PROTOTYPES 1
#endif

#ifndef LDAP_REL_ENG
#if (LDAP_VENDOR_VERSION == 000000) && !defined(LDAP_DEVEL)
#define LDAP_DEVEL
#endif
#if defined(LDAP_DEVEL) && !defined(LDAP_TEST)
#define LDAP_TEST
#endif
#endif

#ifdef HAVE_STDDEF_H
#	include <stddef.h>
#endif

#ifdef HAVE_EBCDIC 
/* ASCII/EBCDIC converting replacements for stdio funcs
 * vsnprintf and snprintf are used too, but they are already
 * checked by the configure script
 */
#define fputs ber_pvt_fputs
#define fgets ber_pvt_fgets
#define printf ber_pvt_printf
#define fprintf ber_pvt_fprintf
#define vfprintf ber_pvt_vfprintf
#define vsprintf ber_pvt_vsprintf
#endif

#include "ac/fdset.h"

#include "ldap_cdefs.h"
#include "ldap_features.h"

#include "ac/assert.h"
#include "ac/localize.h"

#endif /* _LDAP_PORTABLE_H */
/* end of portable.h.post */
])

AC_CONFIG_HEADERS([include/portable.h:include/portable.hin])
AC_CONFIG_HEADERS([include/ldap_features.h:include/ldap_features.hin])
AC_CONFIG_HEADERS([include/lber_types.h:include/lber_types.hin])
dnl ================================================================
dnl Start Args
AC_MSG_CHECKING(configure arguments)
AC_PREFIX_DEFAULT(/usr/local)
Loading
Loading full blame...