diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2009-02-21 18:21:20 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2009-02-21 18:21:20 +0100 |
commit | fb1c564b78032b61bba182e748cdbadf94d26e15 (patch) | |
tree | dcde234917e41aff62905afb836f8a0c9d725960 /source4 | |
parent | a3127ea9d7197af8ddde3f8e20a92794f389a992 (diff) | |
download | samba-fb1c564b78032b61bba182e748cdbadf94d26e15.tar.gz samba-fb1c564b78032b61bba182e748cdbadf94d26e15.tar.bz2 samba-fb1c564b78032b61bba182e748cdbadf94d26e15.zip |
Add --enable-external-* flags for libraries shipped with Samba, to allow
explicitly enabling or disabling the use of the version provided by the
system.
Diffstat (limited to 'source4')
-rw-r--r-- | source4/build/m4/public.m4 | 22 | ||||
-rw-r--r-- | source4/configure.ac | 9 |
2 files changed, 26 insertions, 5 deletions
diff --git a/source4/build/m4/public.m4 b/source4/build/m4/public.m4 index 1823f1ba97..a707a113cd 100644 --- a/source4/build/m4/public.m4 +++ b/source4/build/m4/public.m4 @@ -6,6 +6,8 @@ dnl Published under the GPL dnl dnl SMB_EXT_LIB_FROM_PKGCONFIG(name,pkg-config name,[ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND]) dnl +dnl SMB_INCLUDED_LIB_PKGCONFIG(name,pkg-config name,[ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND]) +dnl dnl SMB_EXT_LIB(name,libs,cflags,cppflags,ldflags) dnl dnl SMB_ENABLE(name,default_build) @@ -125,6 +127,26 @@ AC_DEFUN([SMB_EXT_LIB_FROM_PKGCONFIG], fi ]) +dnl SMB_INCLUDED_LIB_PKGCONFIG(name,pkg-config name,[ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND]) +AC_DEFUN([SMB_INCLUDED_LIB_PKGCONFIG], +[ + AC_ARG_ENABLE([external-]translit($1,`A-Z',`a-z'), + AS_HELP_STRING([--enable-external-]translit($1,`A-Z',`a-z'), [Use external $1 instead of built-in (default=auto)]), [], [enableval=auto]) + + if test $enableval = yes -o $enableval = auto; then + SMB_EXT_LIB_FROM_PKGCONFIG([$1], [$2], [$3], [ + if test $enableval = yes; then + AC_MSG_ERROR([Unable to find external $1]) + fi + ]) + else + ifelse([$4], [], [ + SMB_EXT_LIB($1) + SMB_ENABLE($1, NO) + ], [$4]) + fi +]) + dnl SMB_INCLUDE_MK(file) AC_DEFUN([SMB_INCLUDE_MK], [ diff --git a/source4/configure.ac b/source4/configure.ac index 85ea44f570..bc3c01173f 100644 --- a/source4/configure.ac +++ b/source4/configure.ac @@ -42,15 +42,14 @@ AC_CONFIG_FILES(param/samba-hostconfig.pc) AC_CONFIG_FILES(librpc/dcerpc_samr.pc) AC_CONFIG_FILES(librpc/dcerpc_atsvc.pc) -SMB_EXT_LIB_FROM_PKGCONFIG(LIBTALLOC, talloc >= 1.2.0, - [], +SMB_INCLUDED_LIB_PKGCONFIG(LIBTALLOC, talloc >= 1.2.0, [], [ m4_include(../lib/talloc/libtalloc.m4) SMB_INCLUDE_MK(../lib/talloc/config.mk) ] ) -SMB_EXT_LIB_FROM_PKGCONFIG(LIBTDB, tdb >= 1.1.3, +SMB_INCLUDED_LIB_PKGCONFIG(LIBTDB, tdb >= 1.1.3, [], [ m4_include(../lib/tdb/libtdb.m4) @@ -60,13 +59,13 @@ SMB_EXT_LIB_FROM_PKGCONFIG(LIBTDB, tdb >= 1.1.3, SMB_INCLUDE_MK(../lib/tdb/python.mk) -SMB_EXT_LIB_FROM_PKGCONFIG(LIBTEVENT, tevent = 0.9.3, +SMB_INCLUDED_LIB_PKGCONFIG(LIBTEVENT, tevent = 0.9.3, [],[m4_include(../lib/tevent/samba.m4)] ) SMB_INCLUDE_MK(../lib/tevent/python.mk) -SMB_EXT_LIB_FROM_PKGCONFIG(LIBLDB, ldb = 0.9.3, +SMB_INCLUDED_LIB_PKGCONFIG(LIBLDB, ldb = 0.9.3, [ SMB_INCLUDE_MK(lib/ldb/ldb_ildap/config.mk) SMB_INCLUDE_MK(lib/ldb/tools/config.mk) |