1 dnl This file is an input file used by the GNU "autoconf" program to
2 dnl generate the file "configure", which is run during Tk installation
3 dnl to configure the system for the local environment.
5 # $OpenLDAP: pkg/ldap/contrib/ldaptcl/configure.in,v 1.8.2.1 2007/08/31 23:13:51 quanah Exp $
10 VERSION=${NEO_VERSION}
12 if test "${prefix}" = "NONE"; then
15 if test "${exec_prefix}" = "NONE"; then
19 AC_ARG_ENABLE(gcc, [ --enable-gcc allow use of gcc if available],
20 [neo_ok=$enableval], [neo_ok=no])
21 if test "$neo_ok" = "yes"; then
28 AC_PROG_INSTALL(install-sh)
31 if test ! -f $exec_prefix/lib/tclConfig.sh
33 AC_MSG_ERROR(Tcl must be installed first)
36 . $exec_prefix/lib/tclConfig.sh
38 if test ! -f $exec_prefix/lib/tclxConfig.sh
40 AC_MSG_ERROR(Extended Tcl must be installed first)
42 . $exec_prefix/lib/tclxConfig.sh
45 #--------------------------------------------------------------------
46 # See if there was a command-line option for where Tk is; if
47 # not, assume that its top-level directory is a sibling of ours.
48 #--------------------------------------------------------------------
50 AC_ARG_WITH(tk, [ --with-tk=DIR use Tk 8.0 binaries from DIR],
55 if test -f $exec_prefix/lib/tkConfig.sh &&
56 test -f $exec_prefix/lib/tkxConfig.sh
60 AC_MSG_ERROR(Tk does not appear to be installed at $exec_prefix)
64 *) AC_MSG_ERROR(Tk cannot be specified and must be in $exec_prefix)
68 AC_ARG_WITH(x, [ --without-x do not build/install ldapwish])
69 if test "$with_x" = "no"
74 if test "$with_tk" != "no"
77 . $exec_prefix/lib/tkConfig.sh
78 . $exec_prefix/lib/tkxConfig.sh
82 AC_SUBST(TK_XINCLUDES)
84 AC_SUBST(TKX_LIB_SPEC)
87 #--------------------------------------------------------------------
88 # Read in configuration information generated by Tcl for shared
89 # libraries, and arrange for it to be substituted into our
91 #--------------------------------------------------------------------
94 SHLIB_CFLAGS=$TCL_SHLIB_CFLAGS
95 SHLIB_LD=$TCL_SHLIB_LD
96 SHLIB_LD_LIBS=$TCL_SHLIB_LD_LIBS
97 SHLIB_SUFFIX=$TCL_SHLIB_SUFFIX
98 SHLIB_VERSION=$TCL_SHLIB_VERSION
100 LD_FLAGS=$TCL_LD_FLAGS
101 NEO_LD_SEARCH_FLAGS=$TCL_LD_SEARCH_FLAGS
103 eval "NEO_SHARED_LIB_FILE=libldaptcl${TCL_SHARED_LIB_SUFFIX}"
104 eval "NEO_UNSHARED_LIB_FILE=libldaptcl${TCL_UNSHARED_LIB_SUFFIX}"
106 #--------------------------------------------------------------------
107 # The statements below define a collection of symbols related to
108 # building libldap as a shared library instead of a static library.
109 #--------------------------------------------------------------------
111 # Warning: in order to use the following code for libldap and libdb versions,
112 # the VERSION shell variable is modified, and then is restored after.
114 AC_ARG_ENABLE(shared,
115 [ --enable-shared build libldaptcl as a shared library],
116 [ok=$enableval], [ok=no])
117 if test "$ok" = "yes" && test "${SHLIB_SUFFIX}" != ""; then
118 NEO_SHLIB_CFLAGS="${SHLIB_CFLAGS}"
119 eval "NEO_LIB_FILE=libldaptcl${TCL_SHARED_LIB_SUFFIX}"
120 MAKE_LIB="\${SHLIB_LD} $TCL_LIB_HNAME -o ${NEO_LIB_FILE} \${OBJS} \${LDAP_LIBFLAGS}"
124 eval "NEO_LIB_FILE=libldaptcl${TCL_UNSHARED_LIB_SUFFIX}"
125 MAKE_LIB="ar cr ${NEO_LIB_FILE} \${OBJS}"
128 AC_ARG_WITH(ldap, [ --with-ldap=<dir> common parent of ldap include and lib dirs],
131 yes) ldapdir=/usr/local
143 ldapincdir=$ldapdir/include
144 AC_ARG_WITH(ldap-incdir, [ --with-ldap-incdir=<dir> path to ldap.h],
145 [ldapincdir=$withval])
147 ldaplibdir=$ldapdir/lib
148 AC_ARG_WITH(ldap-libdir, [ --with-ldap-libdir=<dir> path to ldap and lber libs],
149 [ldaplibdir=$withval])
151 AC_ARG_WITH(ldap-libraries, [ --with-ldap-libflags=<libnames> -l flags for ldap libraries],
152 [ldaplibflags="-L$ldaplibdir $withval"],
153 [ldaplibflags="-L$ldaplibdir -lldap -llber"])
155 ldapinclude="-I$ldapincdir"
159 AC_SUBST(ldaplibflags)
160 AC_SUBST(ldapinclude)
166 VERSION=${NEO_VERSION}
167 # Note: in the following variable, it's important to use the absolute
168 # path name of the Tcl directory rather than "..": this is because
169 # AIX remembers this path and will attempt to use it at run-time to look
170 # up the Tcl library.
172 if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
173 NEO_BUILD_LIB_SPEC="-L`pwd` -lldaptcl${VERSION}"
174 NEO_LIB_SPEC="-L${exec_prefix}/lib -lldaptcl${VERSION}"
176 NEO_BUILD_LIB_SPEC="-L`pwd` -lldaptcl`echo ${VERSION} | tr -d .`"
177 NEO_LIB_SPEC="-L${exec_prefix}/lib -lldaptcl`echo ${VERSION} | tr -d .`"
186 AC_SUBST(SHLIB_CFLAGS)
188 AC_SUBST(SHLIB_LD_LIBS)
189 AC_SUBST(SHLIB_SUFFIX)
190 AC_SUBST(SHLIB_VERSION)
191 AC_SUBST(TCLX_TOP_DIR)
192 AC_SUBST(TCLX_TCL_DIR)
193 AC_SUBST(TCLX_LIB_SPEC)
194 AC_SUBST(ITCL_LIB_SPEC)
196 AC_SUBST(TCL_SRC_DIR)
197 AC_SUBST(TCL_BIN_DIR)
198 AC_SUBST(TCL_LIB_SPEC)
199 AC_SUBST(TCL_LD_SEARCH_FLAGS)
200 AC_SUBST(TCL_LIB_HNAME)
201 AC_SUBST(TCL_SRC_DIR)
202 AC_SUBST(TCL_VERSION)
203 AC_SUBST(NEO_BUILD_LIB_SPEC)
204 AC_SUBST(NEO_LD_SEARCH_FLAGS)
205 AC_SUBST(NEO_SHARED_LIB_FILE)
206 AC_SUBST(NEO_UNSHARED_LIB_FILE)
207 AC_SUBST(NEO_LIB_FILE)
208 AC_SUBST(NEO_LIB_SPEC)
209 AC_SUBST(NEO_MAJOR_VERSION)
210 AC_SUBST(NEO_MINOR_VERSION)
211 AC_SUBST(NEO_SHLIB_CFLAGS)
212 AC_SUBST(NEO_VERSION)
213 dnl AC_SUBST(XINCLUDES)
216 AC_OUTPUT(Makefile pkgIndex.tcl)