1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
samba-mirror/source3/samba4.m4

203 lines
5.4 KiB
Plaintext
Raw Normal View History

2008-09-15 16:30:15 +04:00
AC_SUBST(BLDSHARED)
smbtorture4_path="bin/smbtorture4"
smbtorture4_option="-t bin/smbtorture4"
2008-09-15 16:30:15 +04:00
m4_include(build/m4/public.m4)
2009-01-21 20:54:20 +03:00
m4_include(../m4/check_python.m4)
2008-10-15 01:25:12 +04:00
AC_SAMBA_PYTHON_DEVEL([
SMB_EXT_LIB(EXT_LIB_PYTHON, [$PYTHON_LDFLAGS], [$PYTHON_CFLAGS])
SMB_ENABLE(EXT_LIB_PYTHON,YES)
SMB_ENABLE(LIBPYTHON,YES)
],[
AC_MSG_ERROR([Python not found. Please install Python 2.x and its development headers/libraries.])
])
AC_MSG_CHECKING(python library directory)
pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1, 0, '\\${prefix}')"`
AC_MSG_RESULT($pythondir)
AC_SUBST(pythondir)
SMB_EXT_LIB(LIBREPLACE_EXT, [${LIBDL} ${CRYPT_LIBS}])
SMB_ENABLE(LIBREPLACE_EXT)
SMB_EXT_LIB(LIBREPLACE_NETWORK, [${LIBREPLACE_NETWORK_LIBS}])
SMB_ENABLE(LIBREPLACE_NETWORK)
SMB_SUBSYSTEM(LIBREPLACE,
[${LIBREPLACE_OBJS}],
[LIBREPLACE_EXT LIBREPLACE_NETWORK],
[-I../lib/replace])
LIBREPLACE_HOSTCC_OBJS=`echo ${LIBREPLACE_OBJS} |sed -e 's/\.o/\.ho/g'`
SMB_SUBSYSTEM(LIBREPLACE_HOSTCC,
[${LIBREPLACE_HOSTCC_OBJS}],
[],
[-I../lib/replace])
2008-09-15 16:30:15 +04:00
m4_include(lib/smbreadline/readline.m4)
m4_include(heimdal_build/internal.m4)
2008-10-11 23:42:45 +04:00
m4_include(../lib/util/fault.m4)
m4_include(../lib/util/signal.m4)
m4_include(../lib/util/util.m4)
m4_include(../lib/util/fsusage.m4)
m4_include(../lib/util/xattr.m4)
m4_include(../lib/util/capability.m4)
m4_include(../lib/util/time.m4)
2008-09-17 16:20:56 +04:00
m4_include(../lib/popt/samba.m4)
2008-10-24 06:18:47 +04:00
m4_include(../lib/util/charset/config.m4)
2008-09-15 16:30:15 +04:00
m4_include(lib/socket/config.m4)
m4_include(../nsswitch/nsstest.m4)
m4_include(../pidl/config.m4)
2008-10-17 14:08:15 +04:00
AC_ZLIB([
SMB_EXT_LIB(ZLIB, [${ZLIB_LIBS}])
],[
SMB_INCLUDE_MK(lib/zlib.mk)
])
2008-09-15 16:30:15 +04:00
2008-09-15 16:32:58 +04:00
AC_CONFIG_FILES(../source4/lib/registry/registry.pc)
AC_CONFIG_FILES(../source4/librpc/dcerpc.pc)
2008-10-15 00:43:29 +04:00
AC_CONFIG_FILES(../librpc/ndr.pc)
2008-11-16 03:35:46 +03:00
AC_CONFIG_FILES(../lib/torture/torture.pc)
2008-09-15 16:32:58 +04:00
AC_CONFIG_FILES(../source4/auth/gensec/gensec.pc)
AC_CONFIG_FILES(../source4/param/samba-hostconfig.pc)
AC_CONFIG_FILES(../source4/librpc/dcerpc_samr.pc)
AC_CONFIG_FILES(../source4/librpc/dcerpc_atsvc.pc)
2008-09-15 16:30:15 +04:00
m4_include(../source4/min_versions.m4)
SMB_EXT_LIB_FROM_PKGCONFIG(LIBTALLOC, talloc >= TALLOC_MIN_VERSION,
2008-09-15 16:30:15 +04:00
[],
[
SMB_INCLUDE_MK(../lib/talloc/config.mk)
2008-09-15 16:30:15 +04:00
]
)
SMB_EXT_LIB_FROM_PKGCONFIG(LIBTDB, tdb >= TDB_MIN_VERSION,
2008-09-15 16:30:15 +04:00
[],
[
m4_include(../lib/tdb/libtdb.m4)
SMB_INCLUDE_MK(../lib/tdb/config.mk)
2008-09-15 16:30:15 +04:00
]
)
SMB_INCLUDE_MK(../lib/tdb/python.mk)
2008-09-15 16:30:15 +04:00
SMB_EXT_LIB_FROM_PKGCONFIG(LIBTEVENT, tevent = TEVENT_REQUIRED_VERSION,
[],[m4_include(../lib/tevent/samba.m4)]
)
SMB_EXT_LIB_FROM_PKGCONFIG(LIBLDB, ldb = LDB_REQUIRED_VERSION,
2008-09-15 16:30:15 +04:00
[
SMB_INCLUDE_MK(lib/ldb/ldb_ildap/config.mk)
SMB_INCLUDE_MK(lib/ldb/tools/config.mk)
define_ldb_modulesdir=no
],
[
# Here we need to do some tricks
# with AC_CONFIG_COMMANDS_PRE
# as that's the deferrs the commands
# to location after $prefix and $exec_prefix
# have usefull values and directly before
# creating config.status.
#
# The 'eval eval echo' trick is used to
# actually get the raw absolute directory
# path as this is needed in config.h
define_ldb_modulesdir=yes
AC_CONFIG_COMMANDS_PRE([
if test x"$define_ldb_modulesdir" = x"yes";then
LDB_MODULESDIR=`eval eval echo ${modulesdir}/ldb`
AC_DEFINE_UNQUOTED(LDB_MODULESDIR, "${LDB_MODULESDIR}" , [ldb Modules directory])
fi
])
2008-09-15 16:32:58 +04:00
ldbdir="\$(abspath \$(srcdir)/../source4/lib/ldb)"
2008-09-15 16:30:15 +04:00
AC_SUBST(ldbdir)
m4_include(lib/ldb/sqlite3.m4)
m4_include(lib/ldb/libldb.m4)
SMB_INCLUDE_MK(lib/ldb/config.mk)
2008-09-15 16:32:58 +04:00
AC_CONFIG_FILES(../source4/lib/ldb/ldb.pc)
2008-09-15 16:30:15 +04:00
]
)
SMB_INCLUDE_MK(lib/ldb/python.mk)
# Not sure why we need this..
SMB_ENABLE(swig_ldb,YES)
m4_include(lib/tls/config.m4)
dnl m4_include(auth/kerberos/config.m4)
m4_include(auth/gensec/config.m4)
m4_include(smbd/process_model.m4)
m4_include(ntvfs/posix/config.m4)
m4_include(ntvfs/unixuid/config.m4)
m4_include(auth/config.m4)
m4_include(kdc/config.m4)
m4_include(ntvfs/sysdep/config.m4)
m4_include(../nsswitch/config.m4)
2008-09-15 16:30:15 +04:00
AC_SUBST(INTERN_LDFLAGS)
AC_SUBST(INSTALL_LINK_FLAGS)
if test $USESHARED = "true";
then
INTERN_LDFLAGS="-L\$(shliboutputdir) -L\${builddir}/bin/static"
INSTALL_LINK_FLAGS="-Wl,-rpath-link,\$(shliboutputdir)";
else
INTERN_LDFLAGS="-L\${builddir}/bin/static -L\$(shliboutputdir)"
fi
2008-09-15 16:30:15 +04:00
dnl Samba 4 files
AC_SUBST(LD)
AC_LIBREPLACE_SHLD_FLAGS
dnl Remove -L/usr/lib/? from LDFLAGS and LIBS
LIB_REMOVE_USR_LIB(LDFLAGS)
LIB_REMOVE_USR_LIB(LIBS)
LIB_REMOVE_USR_LIB(KRB5_LIBS)
dnl Remove -I/usr/include/? from CFLAGS and CPPFLAGS
CFLAGS_REMOVE_USR_INCLUDE(CFLAGS)
CFLAGS_REMOVE_USR_INCLUDE(CPPFLAGS)
SMB_WRITE_MAKEVARS(samba4-config.mk, [prefix exec_prefix CPPFLAGS LDSHFLAGS POPT_OBJ CFLAGS TALLOC_OBJ POPT_LIBS srcdir builddir])
2008-09-15 16:30:15 +04:00
oldbuilddir="$builddir"
2008-09-15 16:32:58 +04:00
builddir="$builddir/../source4"
2008-10-21 18:45:09 +04:00
oldsrcdir="$srcdir"
srcdir="$srcdir/../source4"
AC_SUBST(srcdir)
AC_SUBST(builddir)
2008-09-15 16:32:58 +04:00
SMB_WRITE_PERLVARS(../source4/build/smb_build/config.pm)
2008-09-15 16:30:15 +04:00
builddir="$oldbuilddir"
2008-10-21 18:45:09 +04:00
srcdir="$oldsrcdir"
2008-09-15 16:30:15 +04:00
2008-09-15 16:32:58 +04:00
echo "configure: creating ../source4/config.mk"
cat >../source4/config.mk<<CEOF
2008-09-15 16:30:15 +04:00
# config.mk - Autogenerated by configure, DO NOT EDIT!
$SMB_INFO_EXT_LIBS
$SMB_INFO_SUBSYSTEMS
$SMB_INFO_LIBRARIES
CEOF
AC_OUTPUT_COMMANDS([
2008-09-15 16:32:58 +04:00
cd ${srcdir}/../source4
$PERL -I${builddir} -I${builddir}/build \
2008-09-15 16:30:15 +04:00
-I. -Ibuild \
2008-09-15 16:56:46 +04:00
build/smb_build/main.pl --output=../source3/samba4-data.mk main.mk || exit $?
cd ../source3
2008-09-15 16:30:15 +04:00
],[
srcdir="$srcdir"
builddir="$builddir"
PERL="$PERL"
export PERL
export srcdir
export builddir
])
AC_CONFIG_COMMANDS([Makefile-samba4], [
echo "include samba4.mk" >> ${builddir}/Makefile
])