[SCM] Samba Shared Repository - branch master updated -
e42caab6f91369a981619d0b711071cd1c724d5d
Simo Sorce
idra at samba.org
Fri Sep 19 22:25:02 GMT 2008
The branch, master has been updated
via e42caab6f91369a981619d0b711071cd1c724d5d (commit)
via 474de0f2172ebe55e6cafb4ad7e81fe662eacadc (commit)
via 3235e25425dddb9ba6d0f8d7cfff94ea9d7c5bdd (commit)
via e07400525fd955b9fb9524edda3f8e6bc7567847 (commit)
via 49b89633f175b81d7415f835009b6d14f6e10933 (commit)
from 258cec7756952f552ca2c4213a6724af546a3eab (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit e42caab6f91369a981619d0b711071cd1c724d5d
Author: Simo Sorce <idra at samba.org>
Date: Fri Sep 19 15:49:39 2008 -0400
Fix ldb standalone build.
Add shared-build target to the ldb library, and make it possible to build
it against libtalloc, libevents, libtdb as shared libraries.
commit 474de0f2172ebe55e6cafb4ad7e81fe662eacadc
Author: Simo Sorce <idra at samba.org>
Date: Fri Sep 19 15:20:47 2008 -0400
Fix libevents standalone build
Make sure to build against libtalloc.a and not individual talloc objects,
so that the library can be also built against libtalloc.so and use it as
a shared library instead of statically compiling talloc.
Also add shared-build target to the events library.
Useful to build multiple standalone libraries that depend on each other
without having to install them to the final install dir during the build.
commit 3235e25425dddb9ba6d0f8d7cfff94ea9d7c5bdd
Author: Simo Sorce <idra at samba.org>
Date: Fri Sep 19 15:15:46 2008 -0400
Add shared-build target to tdb.
Useful to build multiple standalone libraries that depend on each other
without having to install them to the final install dir during the build.
commit e07400525fd955b9fb9524edda3f8e6bc7567847
Author: Simo Sorce <idra at samba.org>
Date: Fri Sep 19 15:15:21 2008 -0400
Add shared-build target to talloc.
Useful to build multiple standalone libraries that depend on each other
without having to install them to the final install dir during the build.
commit 49b89633f175b81d7415f835009b6d14f6e10933
Author: Simo Sorce <idra at samba.org>
Date: Fri Sep 19 15:12:28 2008 -0400
Fix standalone builds adjusting to new relative path.
Add shared-build target to libreplace.
Useful to build multiple standalone libraries that depend on each other
without having to install them to the final install dir during the build.
-----------------------------------------------------------------------
Summary of changes:
lib/replace/Makefile.in | 13 ++-
lib/replace/build_macros.m4 | 14 +++
lib/replace/configure.ac | 3 +
lib/replace/libreplace.m4 | 4 +-
lib/replace/test/testsuite.c | 3 +-
lib/talloc/Makefile.in | 10 ++
lib/talloc/build_macros.m4 | 14 +++
lib/talloc/configure.ac | 3 +
lib/talloc/talloc.mk | 4 +-
lib/tdb/Makefile.in | 11 +++
lib/tdb/build_macros.m4 | 14 +++
lib/tdb/configure.ac | 4 +
lib/tdb/include/tdb.h | 1 +
source4/lib/events/Makefile.in | 35 +++++--
source4/lib/events/autogen.sh | 3 +-
source4/lib/events/build_macros.m4 | 14 +++
source4/lib/events/configure.ac | 9 ++-
source4/lib/events/events.mk | 4 +-
source4/lib/events/libevents.m4 | 2 +-
source4/lib/events/libtalloc.m4 | 7 ++
source4/lib/events/pkg.m4 | 156 +++++++++++++++++++++++++++++++++
source4/lib/ldb/Makefile.in | 42 ++++++---
source4/lib/ldb/autogen.sh | 9 +--
source4/lib/ldb/build_macros.m4 | 14 +++
source4/lib/ldb/configure.ac | 4 +
source4/lib/ldb/external/libevents.m4 | 9 ++-
source4/lib/ldb/external/libtalloc.m4 | 9 ++-
source4/lib/ldb/external/libtdb.m4 | 9 ++-
source4/lib/ldb/ldb.mk | 29 +++----
29 files changed, 381 insertions(+), 72 deletions(-)
create mode 100644 lib/replace/build_macros.m4
create mode 100644 lib/talloc/build_macros.m4
create mode 100644 lib/tdb/build_macros.m4
create mode 100644 source4/lib/events/build_macros.m4
create mode 100644 source4/lib/events/libtalloc.m4
create mode 100644 source4/lib/events/pkg.m4
create mode 100644 source4/lib/ldb/build_macros.m4
Changeset truncated at 500 lines:
diff --git a/lib/replace/Makefile.in b/lib/replace/Makefile.in
index c989835..c889a0e 100644
--- a/lib/replace/Makefile.in
+++ b/lib/replace/Makefile.in
@@ -9,7 +9,8 @@ libdir = @libdir@
VPATH = @libreplacedir@
srcdir = @srcdir@
builddir = @builddir@
-INSTALL = @INSTALL@
+sharedbuilddir = @sharedbuilddir@
+INSTALLCMD = @INSTALL@
LIBS = @LIBS@
.PHONY: test all showflags install installcheck clean distclean realdistclean
@@ -29,8 +30,14 @@ showflags:
@echo ' LIBS = $(LIBS)'
install: all
- mkdir -p $(libdir)
- $(INSTALL) libreplace.a $(libdir)
+ ${INSTALLCMD} -d $(libdir)
+ ${INSTALLCMD} -m 644 libreplace.a $(libdir)
+
+shared-build: all
+ ${INSTALLCMD} -d $(sharedbuilddir)/include
+ ${INSTALLCMD} -m 644 replace.h $(sharedbuilddir)/include
+ ${INSTALLCMD} -d $(sharedbuilddir)/lib
+ ${INSTALLCMD} -m 644 libreplace.a $(sharedbuilddir)/lib
libreplace.a: $(OBJS)
ar -rcsv $@ $(OBJS)
diff --git a/lib/replace/build_macros.m4 b/lib/replace/build_macros.m4
new file mode 100644
index 0000000..c036668
--- /dev/null
+++ b/lib/replace/build_macros.m4
@@ -0,0 +1,14 @@
+AC_DEFUN(BUILD_WITH_SHARED_BUILD_DIR,
+ [ AC_ARG_WITH([shared-build-dir],
+ [AC_HELP_STRING([--with-shared-build-dir=DIR],
+ [temporary build directory where libraries are installed [$srcdir/sharedbuild]])])
+
+ sharedbuilddir="$srcdir/sharedbuild"
+ if test x"$with_shared_build_dir" != x; then
+ sharedbuilddir=$with_shared_build_dir
+ CFLAGS="$CFLAGS -I$with_shared_build_dir/include"
+ LDFLAGS="$LDFLAGS -L$with_shared_build_dir/lib"
+ fi
+ AC_SUBST(sharedbuilddir)
+ ])
+
diff --git a/lib/replace/configure.ac b/lib/replace/configure.ac
index 81997e0..0361825 100644
--- a/lib/replace/configure.ac
+++ b/lib/replace/configure.ac
@@ -22,6 +22,9 @@ if test "$ac_cv_prog_gcc" = yes; then
CFLAGS="$CFLAGS -Wno-format-y2k"
fi
+m4_include(build_macros.m4)
+BUILD_WITH_SHARED_BUILD_DIR
+
LIBS="${LIBREPLACE_NETWORK_LIBS}"
AC_SUBST(LIBS)
diff --git a/lib/replace/libreplace.m4 b/lib/replace/libreplace.m4
index dc7d88e..e563acf 100644
--- a/lib/replace/libreplace.m4
+++ b/lib/replace/libreplace.m4
@@ -5,7 +5,7 @@ echo "LIBREPLACE_LOCATION_CHECKS: START"
dnl find the libreplace sources. This is meant to work both for
dnl libreplace standalone builds, and builds of packages using libreplace
libreplacedir=""
-libreplacepaths="$srcdir $srcdir/lib/replace $srcdir/libreplace $srcdir/../libreplace $srcdir/../replace $srcdir/../lib/replace"
+libreplacepaths="$srcdir $srcdir/lib/replace $srcdir/libreplace $srcdir/../libreplace $srcdir/../replace $srcdir/../lib/replace $srcdir/../../../lib/replace"
for d in $libreplacepaths; do
if test -f "$d/replace.c"; then
libreplacedir="$d"
@@ -34,7 +34,7 @@ echo "LIBREPLACE_BROKEN_CHECKS: START"
dnl find the libreplace sources. This is meant to work both for
dnl libreplace standalone builds, and builds of packages using libreplace
libreplacedir=""
-libreplacepaths="$srcdir $srcdir/lib/replace $srcdir/libreplace $srcdir/../libreplace $srcdir/../replace $srcdir/../lib/replace"
+libreplacepaths="$srcdir $srcdir/lib/replace $srcdir/libreplace $srcdir/../libreplace $srcdir/../replace $srcdir/../lib/replace $srcdir/../../../lib/replace"
for d in $libreplacepaths; do
if test -f "$d/replace.c"; then
libreplacedir="$d"
diff --git a/lib/replace/test/testsuite.c b/lib/replace/test/testsuite.c
index 1e82909..dcb05fb 100644
--- a/lib/replace/test/testsuite.c
+++ b/lib/replace/test/testsuite.c
@@ -1069,7 +1069,8 @@ bool torture_local_replace(struct torture_context *ctx)
return ret;
}
-#if _SAMBA_BUILD_<4
+#if _SAMBA_BUILD_>3
+#else
int main(void)
{
bool ret = torture_local_replace(NULL);
diff --git a/lib/talloc/Makefile.in b/lib/talloc/Makefile.in
index 07b8fd4..c28693e 100644
--- a/lib/talloc/Makefile.in
+++ b/lib/talloc/Makefile.in
@@ -9,6 +9,7 @@ mandir = @mandir@
VPATH = @srcdir@:@libreplacedir@
srcdir = @srcdir@
builddir = @builddir@
+sharedbuilddir = @sharedbuilddir@
XSLTPROC = @XSLTPROC@
INSTALLCMD = @INSTALL@
CC = @CC@
@@ -31,6 +32,15 @@ include $(tallocdir)/talloc.mk
$(TALLOC_SOLIB): $(LIBOBJ)
$(SHLD) $(SHLD_FLAGS) -o $@ $(LIBOBJ) @SONAMEFLAG@$(TALLOC_SONAME)
+shared-build: all
+ ${INSTALLCMD} -d $(sharedbuilddir)/lib
+ ${INSTALLCMD} -m 644 libtalloc.a $(sharedbuilddir)/lib
+ ${INSTALLCMD} -m 755 $(TALLOC_SOLIB) $(sharedbuilddir)/lib
+ ln -sf $(TALLOC_SOLIB) $(sharedbuilddir)/lib/$(TALLOC_SONAME)
+ ln -sf $(TALLOC_SOLIB) $(sharedbuilddir)/lib/libtalloc.so
+ ${INSTALLCMD} -d $(sharedbuilddir)/include
+ ${INSTALLCMD} -m 644 $(srcdir)/talloc.h $(sharedbuilddir)/include
+
check: test
installcheck:: test install
diff --git a/lib/talloc/build_macros.m4 b/lib/talloc/build_macros.m4
new file mode 100644
index 0000000..c036668
--- /dev/null
+++ b/lib/talloc/build_macros.m4
@@ -0,0 +1,14 @@
+AC_DEFUN(BUILD_WITH_SHARED_BUILD_DIR,
+ [ AC_ARG_WITH([shared-build-dir],
+ [AC_HELP_STRING([--with-shared-build-dir=DIR],
+ [temporary build directory where libraries are installed [$srcdir/sharedbuild]])])
+
+ sharedbuilddir="$srcdir/sharedbuild"
+ if test x"$with_shared_build_dir" != x; then
+ sharedbuilddir=$with_shared_build_dir
+ CFLAGS="$CFLAGS -I$with_shared_build_dir/include"
+ LDFLAGS="$LDFLAGS -L$with_shared_build_dir/lib"
+ fi
+ AC_SUBST(sharedbuilddir)
+ ])
+
diff --git a/lib/talloc/configure.ac b/lib/talloc/configure.ac
index 4719aa0..d2538f9 100644
--- a/lib/talloc/configure.ac
+++ b/lib/talloc/configure.ac
@@ -21,4 +21,7 @@ AC_LD_SONAMEFLAG
AC_LIBREPLACE_SHLD
AC_LIBREPLACE_SHLD_FLAGS
+m4_include(build_macros.m4)
+BUILD_WITH_SHARED_BUILD_DIR
+
AC_OUTPUT(Makefile talloc.pc)
diff --git a/lib/talloc/talloc.mk b/lib/talloc/talloc.mk
index e1fe88c..23331b6 100644
--- a/lib/talloc/talloc.mk
+++ b/lib/talloc/talloc.mk
@@ -22,8 +22,8 @@ install:: all
${INSTALLCMD} -m 644 talloc.pc $(DESTDIR)$(libdir)/pkgconfig
if [ -f talloc.3 ];then ${INSTALLCMD} -d $(DESTDIR)$(mandir)/man3; fi
if [ -f talloc.3 ];then ${INSTALLCMD} -m 644 talloc.3 $(DESTDIR)$(mandir)/man3; fi
- which swig >/dev/null 2>&1 && ${INSTALLCMD} -d $(DESTDIR)`swig -swiglib` || true
- which swig >/dev/null 2>&1 && ${INSTALLCMD} -m 644 talloc.i $(DESTDIR)`swig -swiglib` || true
+ which swig >/dev/null 2>&1 && ${INSTALLCMD} -d $(DESTDIR)$(prefix)`swig -swiglib` || true
+ which swig >/dev/null 2>&1 && ${INSTALLCMD} -m 644 talloc.i $(DESTDIR)$(prefix)`swig -swiglib` || true
doc:: talloc.3 talloc.3.html
diff --git a/lib/tdb/Makefile.in b/lib/tdb/Makefile.in
index 090bb6e..9915d88 100644
--- a/lib/tdb/Makefile.in
+++ b/lib/tdb/Makefile.in
@@ -12,6 +12,8 @@ libdir = @libdir@
VPATH = @srcdir@:@libreplacedir@
srcdir = @srcdir@
builddir = @builddir@
+sharedbuilddir = @sharedbuilddir@
+INSTALLCMD = @INSTALL@
CPPFLAGS = @CPPFLAGS@ -I$(srcdir)/include -Iinclude
CFLAGS = $(CPPFLAGS) @CFLAGS@
LDFLAGS = @LDFLAGS@
@@ -43,6 +45,15 @@ install:: all
$(TDB_SOLIB): $(TDB_OBJ)
$(SHLD) $(SHLD_FLAGS) -o $@ $(TDB_OBJ) @SONAMEFLAG@$(TDB_SONAME)
+shared-build: all
+ ${INSTALLCMD} -d $(sharedbuilddir)/lib
+ ${INSTALLCMD} -m 644 libtdb.a $(sharedbuilddir)/lib
+ ${INSTALLCMD} -m 755 $(TDB_SOLIB) $(sharedbuilddir)/lib
+ ln -sf $(TDB_SOLIB) $(sharedbuilddir)/lib/$(TDB_SONAME)
+ ln -sf $(TDB_SOLIB) $(sharedbuilddir)/lib/libtdb.so
+ ${INSTALLCMD} -d $(sharedbuilddir)/include
+ ${INSTALLCMD} -m 644 $(srcdir)/include/tdb.h $(sharedbuilddir)/include
+
check: test
test:: $(PYTHON_CHECK_TARGET)
diff --git a/lib/tdb/build_macros.m4 b/lib/tdb/build_macros.m4
new file mode 100644
index 0000000..c036668
--- /dev/null
+++ b/lib/tdb/build_macros.m4
@@ -0,0 +1,14 @@
+AC_DEFUN(BUILD_WITH_SHARED_BUILD_DIR,
+ [ AC_ARG_WITH([shared-build-dir],
+ [AC_HELP_STRING([--with-shared-build-dir=DIR],
+ [temporary build directory where libraries are installed [$srcdir/sharedbuild]])])
+
+ sharedbuilddir="$srcdir/sharedbuild"
+ if test x"$with_shared_build_dir" != x; then
+ sharedbuilddir=$with_shared_build_dir
+ CFLAGS="$CFLAGS -I$with_shared_build_dir/include"
+ LDFLAGS="$LDFLAGS -L$with_shared_build_dir/lib"
+ fi
+ AC_SUBST(sharedbuilddir)
+ ])
+
diff --git a/lib/tdb/configure.ac b/lib/tdb/configure.ac
index eaf70d3..4bf2e98 100644
--- a/lib/tdb/configure.ac
+++ b/lib/tdb/configure.ac
@@ -27,4 +27,8 @@ if test -z "$PYTHON_CONFIG"; then
PYTHON_INSTALL_TARGET=""
PYTHON_CHECK_TARGET=""
fi
+
+m4_include(build_macros.m4)
+BUILD_WITH_SHARED_BUILD_DIR
+
AC_OUTPUT(Makefile tdb.pc)
diff --git a/lib/tdb/include/tdb.h b/lib/tdb/include/tdb.h
index 0008085..c41c994 100644
--- a/lib/tdb/include/tdb.h
+++ b/lib/tdb/include/tdb.h
@@ -30,6 +30,7 @@
extern "C" {
#endif
+#include "signal.h"
/* flags to tdb_store() */
#define TDB_REPLACE 1 /* Unused */
diff --git a/source4/lib/events/Makefile.in b/source4/lib/events/Makefile.in
index 0a0df9b..4257119 100644
--- a/source4/lib/events/Makefile.in
+++ b/source4/lib/events/Makefile.in
@@ -9,9 +9,11 @@ exec_prefix = @exec_prefix@
bindir = @bindir@
includedir = @includedir@
libdir = @libdir@
-VPATH = @srcdir@:@tallocdir@:@libreplacedir@
+VPATH = @srcdir@:@libreplacedir@
srcdir = @srcdir@
builddir = @builddir@
+sharedbuilddir = @sharedbuilddir@
+INSTALLCMD = @INSTALL@
CPPFLAGS = @CPPFLAGS@ -I$(srcdir)/include -Iinclude -I.
LDFLAGS = @LDFLAGS@
EXEEXT = @EXEEXT@
@@ -28,26 +30,40 @@ PYTHON_INSTALL_TARGET = @PYTHON_INSTALL_TARGET@
PYTHON_CHECK_TARGET = @PYTHON_CHECK_TARGET@
LIB_PATH_VAR = @LIB_PATH_VAR@
eventsdir = @eventsdir@
-tallocdir = @tallocdir@
-TALLOC_LIBS = @TALLOC_LIBS@
TALLOC_CFLAGS = @TALLOC_CFLAGS@
-TALLOC_OBJ = @TALLOC_OBJ@
+TALLOC_LDFLAGS = @TALLOC_CFLAGS@
+TALLOC_LIBS = @TALLOC_LIBS@
-CFLAGS = $(CPPFLAGS) $(TALLOC_CFLAGS) @CFLAGS@
+EVENTS_CFLAGS = @EVENTS_CFLAGS@
+EVENTS_LDFLAGS = @EVENTS_CFLAGS@
+EVENTS_LIBS = @EVENTS_LIBS@
-EVENTS_OBJ = @EVENTS_OBJ@ $(TALLOC_OBJ) @LIBREPLACEOBJ@
+CFLAGS = $(CPPFLAGS) $(TALLOC_CFLAGS) $(EVENTS_CFLAGS) @CFLAGS@
+LDFLAGS = $(TALLOC_LDFLAGS) $(EVENTS_LDFLAGS) @LDFLAGS@
+LIBS = $(TALLOC_LIBS) $(EVENTS_LIBS) @LIBS@
+
+EVENTS_OBJ = @EVENTS_OBJ@ @LIBREPLACEOBJ@
default: all
include $(eventsdir)/events.mk
include $(eventsdir)/rules.mk
-all:: showflags dirs $(PROGS) $(LIBEVENTS_SOLIB) libevents.a $(PYTHON_BUILD_TARGET)
+all:: showflags dirs $(PROGS) $(EVENTS_SOLIB) libevents.a $(PYTHON_BUILD_TARGET)
install:: all
-$(LIBEVENTS_SOLIB): $(EVENTS_OBJ)
- $(SHLD) $(SHLD_FLAGS) -o $@ $(EVENTS_OBJ) $(TALLOC_LIBS) @SONAMEFLAG@$(LIBEVENTS_SONAME)
+$(EVENTS_SOLIB): $(EVENTS_OBJ)
+ $(SHLD) $(SHLD_FLAGS) $(LDFLAGS) $(LIBS) -o $@ $(EVENTS_OBJ) @SONAMEFLAG@$(EVENTS_SONAME)
+
+shared-build: all
+ ${INSTALLCMD} -d $(sharedbuilddir)/lib
+ ${INSTALLCMD} -m 644 libevents.a $(sharedbuilddir)/lib
+ ${INSTALLCMD} -m 755 $(EVENTS_SOLIB) $(sharedbuilddir)/lib
+ ln -sf $(EVENTS_SOLIB) $(sharedbuilddir)/lib/$(EVENTS_SONAME)
+ ln -sf $(EVENTS_SOLIB) $(sharedbuilddir)/lib/libevents.so
+ ${INSTALLCMD} -d $(sharedbuilddir)/include
+ ${INSTALLCMD} -m 644 $(srcdir)/events.h $(sharedbuilddir)/include
check: test
@@ -56,7 +72,6 @@ installcheck:: test install
clean::
rm -f *.o *.a */*.o
- rm -f $(TALLOC_OBJ)
distclean:: clean
rm -f config.log config.status include/config.h config.cache
diff --git a/source4/lib/events/autogen.sh b/source4/lib/events/autogen.sh
index b13a4b6..fec05f5 100755
--- a/source4/lib/events/autogen.sh
+++ b/source4/lib/events/autogen.sh
@@ -3,8 +3,7 @@
rm -rf autom4te.cache
rm -f configure config.h.in
-IPATHS="-I libreplace -I lib/replace -I ../libreplace -I ../replace"
-IPATHS="$IPATHS -I lib/talloc -I talloc -I ../talloc"
+IPATHS="-I libreplace -I lib/replace -I ../libreplace -I ../replace -I ../../../lib/replace"
autoconf $IPATHS || exit 1
autoheader $IPATHS || exit 1
diff --git a/source4/lib/events/build_macros.m4 b/source4/lib/events/build_macros.m4
new file mode 100644
index 0000000..c036668
--- /dev/null
+++ b/source4/lib/events/build_macros.m4
@@ -0,0 +1,14 @@
+AC_DEFUN(BUILD_WITH_SHARED_BUILD_DIR,
+ [ AC_ARG_WITH([shared-build-dir],
+ [AC_HELP_STRING([--with-shared-build-dir=DIR],
+ [temporary build directory where libraries are installed [$srcdir/sharedbuild]])])
+
+ sharedbuilddir="$srcdir/sharedbuild"
+ if test x"$with_shared_build_dir" != x; then
+ sharedbuilddir=$with_shared_build_dir
+ CFLAGS="$CFLAGS -I$with_shared_build_dir/include"
+ LDFLAGS="$LDFLAGS -L$with_shared_build_dir/lib"
+ fi
+ AC_SUBST(sharedbuilddir)
+ ])
+
diff --git a/source4/lib/events/configure.ac b/source4/lib/events/configure.ac
index fbd23b1..895f2a1 100644
--- a/source4/lib/events/configure.ac
+++ b/source4/lib/events/configure.ac
@@ -8,8 +8,6 @@ AC_CONFIG_SRCDIR([events.c])
AC_CONFIG_HEADER(config.h)
AC_LIBREPLACE_ALL_CHECKS
-m4_include(libtalloc.m4)
-
AC_LD_EXPORT_DYNAMIC
AC_LD_SONAMEFLAG
AC_LD_PICFLAG
@@ -17,6 +15,13 @@ AC_LD_SHLIBEXT
AC_LIBREPLACE_SHLD
AC_LIBREPLACE_SHLD_FLAGS
AC_LIBREPLACE_RUNTIME_LIB_PATH_VAR
+
+m4_include(build_macros.m4)
+BUILD_WITH_SHARED_BUILD_DIR
+
+m4_include(pkg.m4)
+m4_include(libtalloc.m4)
+
m4_include(libevents.m4)
AC_PATH_PROGS([PYTHON_CONFIG], [python2.6-config python2.5-config python2.4-config python-config])
AC_PATH_PROGS([PYTHON], [python2.6 python2.5 python2.4 python])
diff --git a/source4/lib/events/events.mk b/source4/lib/events/events.mk
index f4b02ea..2bc6221 100644
--- a/source4/lib/events/events.mk
+++ b/source4/lib/events/events.mk
@@ -5,7 +5,7 @@ EVENTS_SOLIB = libevents.$(SHLIBEXT).$(PACKAGE_VERSION)
libevents.a: $(EVENTS_OBJ)
ar -rv libevents.a $(EVENTS_OBJ)
-libevents.$(SHLIBEXT): $(LIBEVENTS_SOLIB)
+libevents.$(SHLIBEXT): $(EVENTS_SOLIB)
ln -fs $< $@
$(EVENTS_SONAME): $(EVENTS_SOLIB)
@@ -24,7 +24,7 @@ installheaders:: installdirs
installlibs:: installdirs
cp events.pc $(DESTDIR)$(libdir)/pkgconfig
- cp libevents.a $(LIBEVENTS_SOLIB) $(DESTDIR)$(libdir)
+ cp libevents.a $(EVENTS_SOLIB) $(DESTDIR)$(libdir)
install:: all installdirs installheaders installlibs $(PYTHON_INSTALL_TARGET)
diff --git a/source4/lib/events/libevents.m4 b/source4/lib/events/libevents.m4
index d17da64..ed76b03 100644
--- a/source4/lib/events/libevents.m4
+++ b/source4/lib/events/libevents.m4
@@ -43,7 +43,7 @@ SMB_EXT_LIB(LIBAIO_LINUX, $AIO_LIBS)
EVENTS_CFLAGS="-I$eventsdir"
AC_SUBST(EVENTS_CFLAGS)
-EVENTS_LIBS=""
+EVENTS_LIBS="$AIO_LIBS"
AC_SUBST(EVENTS_LIBS)
diff --git a/source4/lib/events/libtalloc.m4 b/source4/lib/events/libtalloc.m4
new file mode 100644
index 0000000..a4c5b8a
--- /dev/null
+++ b/source4/lib/events/libtalloc.m4
@@ -0,0 +1,7 @@
+AC_SUBST(TALLOC_OBJ)
+AC_SUBST(TALLOC_CFLAGS)
+AC_SUBST(TALLOC_LIBS)
+
+AC_CHECK_HEADER(talloc.h,
+ [AC_CHECK_LIB(talloc, talloc_init, [TALLOC_LIBS="-ltalloc"]) ],
+ [PKG_CHECK_MODULES(TALLOC, talloc)])
diff --git a/source4/lib/events/pkg.m4 b/source4/lib/events/pkg.m4
new file mode 100644
index 0000000..a8b3d06
--- /dev/null
+++ b/source4/lib/events/pkg.m4
@@ -0,0 +1,156 @@
+# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
+#
+# Copyright © 2004 Scott James Remnant <scott at netsplit.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=m4_default([$1], [0.9.0])
+ AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ PKG_CONFIG=""
+ fi
+
+fi[]dnl
+])# PKG_PROG_PKG_CONFIG
+
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+#
+# Check to see whether a particular set of modules exists. Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
+#
+# Similar to PKG_CHECK_MODULES, make sure that the first instance of
+# this or PKG_CHECK_MODULES is called, or make sure to call
+# PKG_CHECK_EXISTS manually
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+ m4_ifval([$2], [$2], [:])
+m4_ifvaln([$3], [else
+ $3])dnl
--
Samba Shared Repository
More information about the samba-cvs
mailing list