summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/Makefile.in5
-rwxr-xr-xsource3/autogen.sh2
-rw-r--r--source3/configure.in21
-rw-r--r--source3/samba4.m48
4 files changed, 31 insertions, 5 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 6b0a1516d0..f69c39b6e4 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -88,12 +88,11 @@ UNINSTALLLIBCMD_A=@UNINSTALLLIBCMD_A@
VPATH=@srcdir@
srcdir=@abs_srcdir@
builddir=@abs_builddir@
-SHELL=/bin/sh
-DESTDIR=/
-
# XXX: Perhaps this should be @SHELL@ instead -- apparently autoconf
# will search for a POSIX-compliant shell, and that might not be
# /bin/sh on some platforms. I guess it's not a big problem -- mbp
+SHELL=/bin/sh
+DESTDIR=/
# See the autoconf manual "Installation Directory Variables" for a
# discussion of the subtle use of these variables.
diff --git a/source3/autogen.sh b/source3/autogen.sh
index 1a33eb22cc..9ade370cd4 100755
--- a/source3/autogen.sh
+++ b/source3/autogen.sh
@@ -65,7 +65,7 @@ echo "$0: running script/mkversion.sh"
rm -rf autom4te*.cache
rm -f configure include/config.h*
-IPATHS="-Im4 -I../lib/replace -I../source4"
+IPATHS="-Im4 -I../m4 -I../lib/replace -I../source4"
echo "$0: running $AUTOHEADER $IPATHS"
$AUTOHEADER $IPATHS || exit 1
diff --git a/source3/configure.in b/source3/configure.in
index ab5e81fb3c..98f41d61e5 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -20,10 +20,29 @@ AC_SUBST(builddir)
m4_include(m4/samba_version.m4)
m4_include(m4/check_path.m4)
+m4_include(pkg.m4)
AC_LIBREPLACE_CC_CHECKS
-m4_include(../lib/talloc/libtalloc.m4)
+AC_ARG_ENABLE(external_libtalloc, [AS_HELP_STRING([--enable-external-libtalloc], [Enable external talloc [default=auto]])],
+[ enable_external_libtalloc=$enableval ], [ enable_external_libtalloc=auto ])
+
+if test "x$enable_external_libtalloc" != xno
+then
+ PKG_CHECK_MODULES(TALLOC, talloc >= 1.3.0,
+ [ enable_external_libtalloc=yes ],
+ [ if x$enable_external_libtalloc = xyes; then
+ AC_MSG_ERROR([Unable to find libtalloc])
+ else
+ enable_external_libtalloc=no
+ fi
+ ])
+fi
+
+if test "x$enable_external_libtalloc" = xno
+then
+ m4_include(../lib/talloc/libtalloc.m4)
+fi
LIBTALLOC_OBJ0=""
for obj in ${TALLOC_OBJ}; do
diff --git a/source3/samba4.m4 b/source3/samba4.m4
index 97a1a3ba19..cfb7c1c75e 100644
--- a/source3/samba4.m4
+++ b/source3/samba4.m4
@@ -152,6 +152,14 @@ fi
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])
oldbuilddir="$builddir"