1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218
|
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: 16b135293616700c63077e9a1a601681d4442fdd $])
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=<dir> common parent of ldap include and lib dirs],
[neo_ldap=$withval
case $withval in
yes) ldapdir=/usr/local
;;
no) ;;
*) ldapdir=$withval
neo_ldap=yes
;;
esac
], [
neo_ldap=yes
ldapdir=/usr/local
])
ldapincdir=$ldapdir/include
AC_ARG_WITH(ldap-incdir, [ --with-ldap-incdir=<dir> path to ldap.h],
[ldapincdir=$withval])
ldaplibdir=$ldapdir/lib
AC_ARG_WITH(ldap-libdir, [ --with-ldap-libdir=<dir> path to ldap and lber libs],
[ldaplibdir=$withval])
AC_ARG_WITH(ldap-libraries, [ --with-ldap-libflags=<libnames> -l flags for ldap libraries],
[ldaplibflags="-L$ldaplibdir $withval"],
[ldaplibflags="-L$ldaplibdir -lldap -llber"])
ldapinclude="-I$ldapincdir"
ldapbuild=yes
AC_SUBST(ldaplibflags)
AC_SUBST(ldapinclude)
AC_SUBST(ldapbuild)
AC_SUBST(ldapdir)
AC_SUBST(ldapincdir)
VERSION=${NEO_VERSION}
# Note: in the following variable, it's important to use the absolute
# path name of the Tcl directory rather than "..": this is because
# AIX remembers this path and will attempt to use it at run-time to look
# up the Tcl library.
if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
NEO_BUILD_LIB_SPEC="-L`pwd` -lldaptcl${VERSION}"
NEO_LIB_SPEC="-L${exec_prefix}/lib -lldaptcl${VERSION}"
else
NEO_BUILD_LIB_SPEC="-L`pwd` -lldaptcl`echo ${VERSION} | tr -d .`"
NEO_LIB_SPEC="-L${exec_prefix}/lib -lldaptcl`echo ${VERSION} | tr -d .`"
fi
AC_SUBST(CC)
AC_SUBST(LIBS)
AC_SUBST(DL_LIBS)
AC_SUBST(LD_FLAGS)
AC_SUBST(MATH_LIBS)
AC_SUBST(MAKE_LIB)
AC_SUBST(SHLIB_CFLAGS)
AC_SUBST(SHLIB_LD)
AC_SUBST(SHLIB_LD_LIBS)
AC_SUBST(SHLIB_SUFFIX)
AC_SUBST(SHLIB_VERSION)
AC_SUBST(TCLX_TOP_DIR)
AC_SUBST(TCLX_TCL_DIR)
AC_SUBST(TCLX_LIB_SPEC)
AC_SUBST(ITCL_LIB_SPEC)
AC_SUBST(TCL_LIBS)
AC_SUBST(TCL_SRC_DIR)
AC_SUBST(TCL_BIN_DIR)
AC_SUBST(TCL_LIB_SPEC)
AC_SUBST(TCL_LD_SEARCH_FLAGS)
AC_SUBST(TCL_LIB_HNAME)
AC_SUBST(TCL_SRC_DIR)
AC_SUBST(TCL_VERSION)
AC_SUBST(NEO_BUILD_LIB_SPEC)
AC_SUBST(NEO_LD_SEARCH_FLAGS)
AC_SUBST(NEO_SHARED_LIB_FILE)
AC_SUBST(NEO_UNSHARED_LIB_FILE)
AC_SUBST(NEO_LIB_FILE)
AC_SUBST(NEO_LIB_SPEC)
AC_SUBST(NEO_MAJOR_VERSION)
AC_SUBST(NEO_MINOR_VERSION)
AC_SUBST(NEO_SHLIB_CFLAGS)
AC_SUBST(NEO_VERSION)
dnl AC_SUBST(XINCLUDES)
dnl AC_SUBST(XLIBSW)
AC_OUTPUT(Makefile pkgIndex.tcl)
|