summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/include/dynconfig.h2
-rw-r--r--source3/lib/replace/libreplace_ld.m44
-rw-r--r--source3/lib/talloc/Makefile.in60
-rw-r--r--source3/lib/talloc/config.mk11
-rw-r--r--source3/lib/talloc/configure.ac7
-rw-r--r--source3/lib/talloc/rules.mk18
-rw-r--r--source3/lib/talloc/talloc.i31
-rw-r--r--source3/lib/talloc/talloc.mk37
-rw-r--r--source3/lib/tdb/Makefile.in2
-rw-r--r--source3/lib/tdb/config.mk2
-rw-r--r--source3/lib/tdb/configure.ac2
11 files changed, 118 insertions, 58 deletions
diff --git a/source3/include/dynconfig.h b/source3/include/dynconfig.h
index fac027ccfe..57909bc614 100644
--- a/source3/include/dynconfig.h
+++ b/source3/include/dynconfig.h
@@ -61,7 +61,7 @@ bool is_default_dyn_LOGFILEBASE(void);
const char *get_dyn_LMHOSTSFILE(void);
const char *set_dyn_LMHOSTSFILE(const char *newpath);
-bool is_default_dyn_LOGFILEBASE(void);
+bool is_default_dyn_LMHOSTSFILE(void);
const char *get_dyn_CODEPAGEDIR(void);
const char *set_dyn_CODEPAGEDIR(const char *newpath);
diff --git a/source3/lib/replace/libreplace_ld.m4 b/source3/lib/replace/libreplace_ld.m4
index f0d10c1e3e..08defb091f 100644
--- a/source3/lib/replace/libreplace_ld.m4
+++ b/source3/lib/replace/libreplace_ld.m4
@@ -246,6 +246,10 @@ AC_DEFUN([AC_LD_SONAMEFLAG],
# Not supported
SONAMEFLAG="#"
;;
+ *aix*)
+ # Not supported
+ SONAMEFLAG="#"
+ ;;
esac
])
diff --git a/source3/lib/talloc/Makefile.in b/source3/lib/talloc/Makefile.in
index 18b48c3459..851dc81aea 100644
--- a/source3/lib/talloc/Makefile.in
+++ b/source3/lib/talloc/Makefile.in
@@ -14,59 +14,29 @@ INSTALLCMD = @INSTALL@
CC = @CC@
CFLAGS = @CFLAGS@ -DHAVE_CONFIG_H= -I. -I@srcdir@
EXTRA_TARGETS = @DOC_TARGET@
+PICFLAG = @PICFLAG@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+SHLIBEXT = @SHLIBEXT@
+SHLD_FLAGS = @SHLD_FLAGS@
+tallocdir = @tallocdir@
-.SUFFIXES: .c .o .3 .3.xml .xml .html
+LIBOBJ = $(TALLOC_OBJ) @LIBREPLACEOBJ@
-LIBOBJ = @TALLOC_OBJ@ @LIBREPLACEOBJ@
+all:: showflags $(EXTRA_TARGETS)
-all: showflags libtalloc.a testsuite $(EXTRA_TARGETS)
+include $(tallocdir)/rules.mk
+include $(tallocdir)/talloc.mk
-showflags:
- @echo 'talloc will be compiled with flags:'
- @echo ' CFLAGS = $(CFLAGS)'
- @echo ' LIBS = $(LIBS)'
+$(SOLIB): $(LIBOBJ)
+ $(CC) $(SHLD_FLAGS) -o $@ $(LIBOBJ) @SONAMEFLAG@$(SONAME)
-testsuite: $(LIBOBJ) testsuite.o
- $(CC) $(CFLAGS) -o testsuite testsuite.o $(LIBOBJ) $(LIBS)
+check: test
-libtalloc.a: $(LIBOBJ)
- ar -rv $@ $(LIBOBJ)
- @-ranlib $@
+installcheck:: test install
-install: all
- ${INSTALLCMD} -d $(DESTDIR)$(libdir)
- ${INSTALLCMD} -d $(DESTDIR)$(libdir)/pkgconfig
- ${INSTALLCMD} -m 755 libtalloc.a $(DESTDIR)$(libdir)
- ${INSTALLCMD} -d $(DESTDIR)${includedir}
- ${INSTALLCMD} -m 644 $(srcdir)/talloc.h $(DESTDIR)$(includedir)
- ${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
-
-doc: talloc.3 talloc.3.html
-
-.3.xml.3:
- -test -z "$(XSLTPROC)" || $(XSLTPROC) --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
-
-.xml.html:
- -test -z "$(XSLTPROC)" || $(XSLTPROC) --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $<
-
-clean:
- rm -f *~ $(LIBOBJ) libtalloc.a testsuite testsuite.o *.gc?? talloc.3 talloc.3.html
-
-test: testsuite
- ./testsuite
-
-gcov:
- gcov talloc.c
-
-installcheck:
- $(MAKE) test
-
-distclean: clean
- rm -f *~ */*~
+distclean:: clean
rm -f Makefile
rm -f config.log config.status config.h config.cache
-realdistclean: distclean
+realdistclean:: distclean
rm -f configure config.h.in
diff --git a/source3/lib/talloc/config.mk b/source3/lib/talloc/config.mk
index 714ad72d1c..540a05d100 100644
--- a/source3/lib/talloc/config.mk
+++ b/source3/lib/talloc/config.mk
@@ -1,13 +1,8 @@
-################################################
-# Start LIBRARY LIBTALLOC
[LIBRARY::LIBTALLOC]
-VERSION = 0.0.1
-SO_VERSION = 0
+VERSION = 1.2.0
+SO_VERSION = 1
OBJ_FILES = talloc.o
+PC_FILE = talloc.pc
MANPAGE = talloc.3
CFLAGS = -Ilib/talloc
PUBLIC_HEADERS = talloc.h
-DESCRIPTION = A hierarchical pool based memory system with destructors
-#
-# End LIBRARY LIBTALLOC
-################################################
diff --git a/source3/lib/talloc/configure.ac b/source3/lib/talloc/configure.ac
index afc2a944f0..3dcf74ba25 100644
--- a/source3/lib/talloc/configure.ac
+++ b/source3/lib/talloc/configure.ac
@@ -1,5 +1,5 @@
AC_PREREQ(2.50)
-AC_INIT(talloc, 1.1.0)
+AC_INIT(talloc, 1.2.0)
AC_CONFIG_SRCDIR([talloc.c])
AC_SUBST(datarootdir)
AC_CONFIG_HEADER(config.h)
@@ -15,4 +15,9 @@ if test -n "$XSLTPROC"; then
fi
AC_SUBST(DOC_TARGET)
+AC_LD_PICFLAG
+AC_LD_SHLIBEXT
+AC_LD_SONAMEFLAG
+AC_LIBREPLACE_SHLD_FLAGS
+
AC_OUTPUT(Makefile talloc.pc)
diff --git a/source3/lib/talloc/rules.mk b/source3/lib/talloc/rules.mk
new file mode 100644
index 0000000000..6cee126529
--- /dev/null
+++ b/source3/lib/talloc/rules.mk
@@ -0,0 +1,18 @@
+.SUFFIXES: .c .o .3 .3.xml .xml .html
+
+showflags::
+ @echo 'talloc will be compiled with flags:'
+ @echo ' CFLAGS = $(CFLAGS)'
+ @echo ' LIBS = $(LIBS)'
+
+.c.o:
+ $(CC) $(PICFLAG) -o $@ -c $< $(CFLAGS)
+
+.3.xml.3:
+ -test -z "$(XSLTPROC)" || $(XSLTPROC) --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
+
+.xml.html:
+ -test -z "$(XSLTPROC)" || $(XSLTPROC) --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $<
+
+distclean::
+ rm -f *~ */*~
diff --git a/source3/lib/talloc/talloc.i b/source3/lib/talloc/talloc.i
new file mode 100644
index 0000000000..a9afb97ed7
--- /dev/null
+++ b/source3/lib/talloc/talloc.i
@@ -0,0 +1,31 @@
+/*
+ Unix SMB/CIFS implementation.
+ Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2007
+
+ 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/>.
+*/
+
+/* Don't expose talloc contexts in Python code. Python does reference
+ counting for us, so just create a new top-level talloc context.
+ */
+%typemap(in, numinputs=0, noblock=1) TALLOC_CTX * {
+ $1 = NULL;
+}
+
+%define %talloctype(TYPE)
+%nodefaultctor TYPE;
+%extend TYPE {
+ ~TYPE() { talloc_free($self); }
+}
+%enddef
diff --git a/source3/lib/talloc/talloc.mk b/source3/lib/talloc/talloc.mk
new file mode 100644
index 0000000000..590adc74f2
--- /dev/null
+++ b/source3/lib/talloc/talloc.mk
@@ -0,0 +1,37 @@
+TALLOC_OBJ = $(tallocdir)/talloc.o
+
+SOLIB = libtalloc.$(SHLIBEXT).$(PACKAGE_VERSION)
+SONAME = libtalloc.$(SHLIBEXT).1
+
+all:: libtalloc.a $(SOLIB) testsuite
+
+testsuite:: $(LIBOBJ) testsuite.o
+ $(CC) $(CFLAGS) -o testsuite testsuite.o $(LIBOBJ) $(LIBS)
+
+libtalloc.a: $(LIBOBJ)
+ ar -rv $@ $(LIBOBJ)
+ @-ranlib $@
+
+install:: all
+ ${INSTALLCMD} -d $(DESTDIR)$(libdir)
+ ${INSTALLCMD} -d $(DESTDIR)$(libdir)/pkgconfig
+ ${INSTALLCMD} -m 755 libtalloc.a $(DESTDIR)$(libdir)
+ ${INSTALLCMD} -m 755 $(SOLIB) $(DESTDIR)$(libdir)
+ ${INSTALLCMD} -d $(DESTDIR)${includedir}
+ ${INSTALLCMD} -m 644 $(srcdir)/talloc.h $(DESTDIR)$(includedir)
+ ${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
+
+doc:: talloc.3 talloc.3.html
+
+clean::
+ rm -f *~ $(LIBOBJ) $(SOLIB) libtalloc.a testsuite testsuite.o *.gc?? talloc.3 talloc.3.html
+
+test:: testsuite
+ ./testsuite
+
+gcov::
+ gcov talloc.c
diff --git a/source3/lib/tdb/Makefile.in b/source3/lib/tdb/Makefile.in
index e1ecbb30ec..fd36ed078e 100644
--- a/source3/lib/tdb/Makefile.in
+++ b/source3/lib/tdb/Makefile.in
@@ -74,7 +74,7 @@ $(SONAME): $(SOLIB)
ln -s $< $@
$(SOLIB): $(TDB_OBJ)
- $(CC) $(SHLD_FLAGS) $(SONAMEFLAG)$(SONAME) -o $@ $^
+ $(CC) $(SHLD_FLAGS) -o $@ $(TDB_OBJ) $(SONAMEFLAG)$(SONAME)
TDB_LIB = libtdb.a
diff --git a/source3/lib/tdb/config.mk b/source3/lib/tdb/config.mk
index ab90ed728d..01a23f00de 100644
--- a/source3/lib/tdb/config.mk
+++ b/source3/lib/tdb/config.mk
@@ -3,7 +3,7 @@
[LIBRARY::LIBTDB]
VERSION = 0.0.1
SO_VERSION = 0
-DESCRIPTION = Trivial Database Library
+PC_FILE = tdb.pc
OBJ_FILES = \
common/tdb.o common/dump.o common/io.o common/lock.o \
common/open.o common/traverse.o common/freelist.o \
diff --git a/source3/lib/tdb/configure.ac b/source3/lib/tdb/configure.ac
index 1085055bc9..14761bcc1a 100644
--- a/source3/lib/tdb/configure.ac
+++ b/source3/lib/tdb/configure.ac
@@ -8,7 +8,7 @@ AC_CONFIG_HEADER(include/config.h)
AC_LIBREPLACE_ALL_CHECKS
AC_LD_SONAMEFLAG
AC_LD_PICFLAG
-AC_LD_SHLDFLAGS
AC_LD_SHLIBEXT
+AC_LIBREPLACE_SHLD_FLAGS
m4_include(libtdb.m4)
AC_OUTPUT(Makefile tdb.pc)