dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tk installation dnl to configure the system for the local environment. AC_INIT(neoXldap.c) # $OpenLDAP$ AC_REVISION([$Id$]) NEO_VERSION=2.0 NEO_MAJOR_VERSION=2 NEO_MINOR_VERSION=0 VERSION=${NEO_VERSION} if test "${prefix}" = "NONE"; then prefix=/usr/local fi if test "${exec_prefix}" = "NONE"; then exec_prefix=$prefix fi AC_ARG_ENABLE(gcc, [ --enable-gcc allow use of gcc if available], [neo_ok=$enableval], [neo_ok=no]) if test "$neo_ok" = "yes"; then AC_PROG_CC else CC=${CC-cc} AC_SUBST(CC) fi AC_PROG_INSTALL(install-sh) AC_PROG_RANLIB if test ! -f $exec_prefix/lib/tclConfig.sh then AC_MSG_ERROR(Tcl must be installed first) fi . $exec_prefix/lib/tclConfig.sh if test ! -f $exec_prefix/lib/tclxConfig.sh then AC_MSG_ERROR(Extended Tcl must be installed first) fi . $exec_prefix/lib/tclxConfig.sh #-------------------------------------------------------------------- # See if there was a command-line option for where Tk is; if # not, assume that its top-level directory is a sibling of ours. #-------------------------------------------------------------------- AC_ARG_WITH(tk, [ --with-tk=DIR use Tk 8.0 binaries from DIR], , with_tk=yes) case "$with_tk" in yes) if test -f $exec_prefix/lib/tkConfig.sh && test -f $exec_prefix/lib/tkxConfig.sh then : else AC_MSG_ERROR(Tk does not appear to be installed at $exec_prefix) fi ;; no) ;; *) AC_MSG_ERROR(Tk cannot be specified and must be in $exec_prefix) ;; esac AC_ARG_WITH(x, [ --without-x do not build/install ldapwish]) if test "$with_x" = "no" then with_tk=no fi if test "$with_tk" != "no" then LDAPWISH=ldapwish . $exec_prefix/lib/tkConfig.sh . $exec_prefix/lib/tkxConfig.sh fi AC_SUBST(TK_LIBS) AC_SUBST(TK_LIB_SPEC) AC_SUBST(TK_XINCLUDES) AC_SUBST(TK_VERSION) AC_SUBST(TKX_LIB_SPEC) AC_SUBST(LDAPWISH) #-------------------------------------------------------------------- # Read in configuration information generated by Tcl for shared # libraries, and arrange for it to be substituted into our # Makefile. #-------------------------------------------------------------------- CC=$TCL_CC SHLIB_CFLAGS=$TCL_SHLIB_CFLAGS SHLIB_LD=$TCL_SHLIB_LD SHLIB_LD_LIBS=$TCL_SHLIB_LD_LIBS SHLIB_SUFFIX=$TCL_SHLIB_SUFFIX SHLIB_VERSION=$TCL_SHLIB_VERSION DL_LIBS=$TCL_DL_LIBS LD_FLAGS=$TCL_LD_FLAGS NEO_LD_SEARCH_FLAGS=$TCL_LD_SEARCH_FLAGS eval "NEO_SHARED_LIB_FILE=libldaptcl${TCL_SHARED_LIB_SUFFIX}" eval "NEO_UNSHARED_LIB_FILE=libldaptcl${TCL_UNSHARED_LIB_SUFFIX}" #-------------------------------------------------------------------- # The statements below define a collection of symbols related to # building libldap as a shared library instead of a static library. #-------------------------------------------------------------------- # Warning: in order to use the following code for libldap and libdb versions, # the VERSION shell variable is modified, and then is restored after. AC_ARG_ENABLE(shared, [ --enable-shared build libldaptcl as a shared library], [ok=$enableval], [ok=no]) if test "$ok" = "yes" && test "${SHLIB_SUFFIX}" != ""; then NEO_SHLIB_CFLAGS="${SHLIB_CFLAGS}" eval "NEO_LIB_FILE=libldaptcl${TCL_SHARED_LIB_SUFFIX}" MAKE_LIB="\${SHLIB_LD} $TCL_LIB_HNAME -o ${NEO_LIB_FILE} \${OBJS} \${LDAP_LIBFLAGS}" RANLIB=":" else NEO_SHLIB_CFLAGS="" eval "NEO_LIB_FILE=libldaptcl${TCL_UNSHARED_LIB_SUFFIX}" MAKE_LIB="ar cr ${NEO_LIB_FILE} \${OBJS}" fi AC_ARG_WITH(ldap, [ --with-ldap=