diff options
Diffstat (limited to 'source4/configure.ac')
-rw-r--r-- | source4/configure.ac | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/source4/configure.ac b/source4/configure.ac index ed74bc1251..b609b4f52c 100644 --- a/source4/configure.ac +++ b/source4/configure.ac @@ -35,12 +35,11 @@ AC_CONFIG_FILES(auth/gensec/gensec.pc) AC_CONFIG_FILES(param/samba-config.pc) AC_CONFIG_FILES(librpc/dcerpc_samr.pc) -SMB_EXT_LIB_FROM_PKGCONFIG(LIBTALLOC, talloc >= 1.1.0, +SMB_EXT_LIB_FROM_PKGCONFIG(LIBTALLOC, talloc >= 1.2.0, [], [ m4_include(lib/talloc/libtalloc.m4) SMB_INCLUDE_MK(lib/talloc/config.mk) - AC_CONFIG_FILES(lib/talloc/talloc.pc) ] ) @@ -49,7 +48,6 @@ SMB_EXT_LIB_FROM_PKGCONFIG(LIBTDB, tdb >= 1.1.0, [ m4_include(lib/tdb/libtdb.m4) SMB_INCLUDE_MK(lib/tdb/config.mk) - AC_CONFIG_FILES(lib/tdb/tdb.pc) ] ) @@ -140,6 +138,25 @@ for d in build/smb_build bin include ; do test -d ${builddir}/$d || AS_MKDIR_P(${builddir}/$d) done +AC_SUBST(INTERN_LDFLAGS) +AC_SUBST(INSTALL_LINK_FLAGS) +if test $USESHARED = "true"; +then + INTERN_LDFLAGS="-L\${builddir}/bin/shared -L\${builddir}/bin/static" + INSTALL_LINK_FLAGS="-Wl,-rpath-link,\${builddir}/bin/shared"; +else + INTERN_LDFLAGS="-L\${builddir}/bin/static -L\${builddir}/bin/shared" +fi + +builddir_headers="" + +if test "x$ac_abs_srcdir" != "x$ac_abs_builddir" +then + builddir_headers="-I\$(builddir)/include -I\$(builddir) -I\$(builddir)/lib "; +fi + +CPPFLAGS="$builddir_headers-I\$(srcdir)/include -I\$(srcdir) -I\$(srcdir)/lib -I\$(srcdir)/lib/replace -I\$(srcdir)/lib/talloc -D_SAMBA_BUILD_=4 -DHAVE_CONFIG_H $CPPFLAGS" + echo "configure: creating build/smb_build/config.pm" cat >build/smb_build/config.pm<<CEOF # config.pm - Autogenerate by configure. DO NOT EDIT! @@ -201,3 +218,11 @@ CMP_RET=$? if test $CMP_RET != 0; then cp include/config_tmp.h include/config.h fi + +echo "configure: creating mkconfig.mk" +cat >mkconfig.mk<<CEOF +# mkconfig.mk - Autogenerated by configure, DO NOT EDIT! +AC_FOREACH([AC_Var], m4_defn([_AC_SUBST_VARS]), [ +AC_Var = $AC_Var]) +$MAKE_SETTINGS +CEOF |