d160f08298d14be9aeb5309ea5ff2a404ebcba0b
[samba.git] / lib / talloc / configure.ac
1 AC_PREREQ(2.50)
2 AC_INIT(talloc, 2.0.2)
3 AC_CONFIG_SRCDIR([talloc.c])
4 AC_SUBST(datarootdir)
5 AC_CONFIG_HEADER(config.h)
6
7 TALLOC_VERSION=${PACKAGE_VERSION}
8 TALLOC_VERSION_MAJOR=`echo ${PACKAGE_VERSION} | cut -d '.' -f1`
9 TALLOC_VERSION_MINOR=`echo ${PACKAGE_VERSION} | cut -d '.' -f2`
10 TALLOC_VERSION_RELEASE=`echo ${PACKAGE_VERSION} | cut -d '.' -f3`
11
12 AC_SUBST(TALLOC_VERSION)
13 AC_SUBST(TALLOC_VERSION_MAJOR)
14 AC_SUBST(TALLOC_VERSION_MINOR)
15 AC_SUBST(TALLOC_VERSION_RELEASE)
16
17 AC_DEFINE_UNQUOTED(TALLOC_BUILD_VERSION_MAJOR,
18         [${TALLOC_VERSION_MAJOR}],
19         [talloc major version])
20 AC_DEFINE_UNQUOTED(TALLOC_BUILD_VERSION_MINOR,
21         [${TALLOC_VERSION_MINOR}],
22         [talloc minor version])
23 AC_DEFINE_UNQUOTED(TALLOC_BUILD_VERSION_RELEASE,
24         [${TALLOC_VERSION_RELEASE}],
25         [talloc release version])
26
27 AC_LIBREPLACE_ALL_CHECKS
28
29 AC_LD_PICFLAG
30 AC_LD_SHLIBEXT
31 AC_LD_SONAMEFLAG
32 AC_LD_VERSIONSCRIPT
33 AC_LIBREPLACE_SHLD
34 AC_LIBREPLACE_SHLD_FLAGS
35
36 m4_include(libtalloc.m4)
37 m4_include(compat/talloc_compat1.m4)
38
39 AC_PATH_PROG(XSLTPROC,xsltproc)
40 DOC_TARGET=""
41 if test -n "$XSLTPROC"; then
42         DOC_TARGET=doc
43 fi
44 AC_SUBST(DOC_TARGET)
45
46 m4_include(build_macros.m4)
47 BUILD_WITH_SHARED_BUILD_DIR
48
49 AC_OUTPUT(Makefile talloc.pc)