summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2005-02-17 02:36:37 +0000
committerjbj <devnull@localhost>2005-02-17 02:36:37 +0000
commit094e57ce7127374375533093b8b60764de8359a0 (patch)
tree25a3a03dd41e2d8d25f598c3c09755e03887d682
parentba7be476a7db37d1051aa7cb13da98b57f4fceab (diff)
downloadlibrpm-tizen-094e57ce7127374375533093b8b60764de8359a0.tar.gz
librpm-tizen-094e57ce7127374375533093b8b60764de8359a0.tar.bz2
librpm-tizen-094e57ce7127374375533093b8b60764de8359a0.zip
- rework configure.ac et al to lose internal library baggage flexibly.
CVS patchset: 7775 CVS date: 2005/02/17 02:36:37
-rw-r--r--CHANGES1
-rw-r--r--Makefile.am6
-rw-r--r--configure.ac308
-rw-r--r--lib/Makefile.am4
-rw-r--r--python/Makefile.am8
-rw-r--r--rpm.spec.in5
-rw-r--r--rpmdb/Makefile.am4
-rw-r--r--rpmio/Makefile.am8
-rw-r--r--rpmio/rpmdav.c50
-rw-r--r--rpmio/rpmurl.h20
-rw-r--r--sqlite/.cvsignore23
-rw-r--r--tools/Makefile.am7
12 files changed, 283 insertions, 161 deletions
diff --git a/CHANGES b/CHANGES
index 63239f434..d4f583d77 100644
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,7 @@
- add --xml popt alias for query modes.
- remove _rpmdb now that python2.[34] are commonly available.
- remove remnant -I/opt/local hacks, --prefix=/usr is recommended.
+ - rework configure.ac et al to lose internal library baggage flexibly.
4.4 -> 4.4.1:
- force *.py->*.pyo byte code compilation with brp-python-bytecompile.
diff --git a/Makefile.am b/Makefile.am
index 095ed6955..99c87310c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -15,7 +15,7 @@ EXTRA_DIST = CHANGES CREDITS Doxyheader GROUPS README.amiga INSTALL \
po/*.in po/*.po po/rpm.pot \
rpm.magic rpmpopt-$(VERSION) rpmqv.c rpm.c
-SUBDIRS = intl po @WITH_ZLIB_SUBDIR@ @WITH_ELFUTILS_SUBDIR@ file @WITH_DB_SUBDIR@ popt @WITH_BEECRYPT_SUBDIR@ lua rpmio rpmdb lib build misc @WITH_PYTHON_SUBDIR@ tools scripts tests doc .
+SUBDIRS = intl po misc @WITH_ZLIB_SUBDIR@ @WITH_ELFUTILS_SUBDIR@ @WITH_MAGIC_SUBDIR@ @WITH_DB_SUBDIR@ @WITH_SQLITE3_SUBDIR@ @WITH_POPT_SUBDIR@ @WITH_BEECRYPT_SUBDIR@ @WITH_NEON_SUBDIR@ lua rpmio rpmdb lib build @WITH_PYTHON_SUBDIR@ tools scripts tests doc .
INCLUDES = \
-I$(top_srcdir)/build \
@@ -23,7 +23,7 @@ INCLUDES = \
-I$(top_srcdir)/rpmdb \
-I$(top_srcdir)/rpmio \
@WITH_BEECRYPT_INCLUDE@ \
- -I$(top_srcdir)/popt \
+ @WITH_POPT_INCLUDE@ \
-I$(top_srcdir)/misc \
@WITH_LIBELF_INCLUDE@ \
@INCPATH@
@@ -36,7 +36,7 @@ myLDADD = \
$(top_builddir)/lib/librpm.la \
$(top_builddir)/rpmdb/librpmdb.la \
$(top_builddir)/rpmio/librpmio.la \
- $(top_builddir)/popt/libpopt.la \
+ @WITH_POPT_LIB@ \
@WITH_ZLIB_LIB@ \
@LIBMISC@
diff --git a/configure.ac b/configure.ac
index a4d178d9e..a44c18f04 100644
--- a/configure.ac
+++ b/configure.ac
@@ -209,7 +209,7 @@ dnl substitute this into config.h, so the C source picks it up.
dnl
AC_DEFINE_UNQUOTED(MKDIR_P, "${MKDIR_P}",
[A full path to a program, possibly with arguments, that will create a
- directory and all necessary parent directories, ala `mkdir -p'])
+ directory and all necessary parent directories, ala 'mkdir -p'])
AC_SUBST(MKDIR_P)
AC_ISC_POSIX
@@ -302,6 +302,9 @@ addlib() {
esac
}
+#=================
+# Check for zlib library. Prefer internal, otherwise external.
+
WITH_ZLIB_SUBDIR=
WITH_ZLIB_INCLUDE=
WITH_ZLIB_LIB=
@@ -317,6 +320,33 @@ AC_SUBST(WITH_ZLIB_SUBDIR)
AC_SUBST(WITH_ZLIB_INCLUDE)
AC_SUBST(WITH_ZLIB_LIB)
+if test -z "${WITH_ZLIB_LIB}" ; then
+ for zlib in z gz ; do
+ AC_CHECK_LIB(${zlib}, gzread,
+ [LIBS="$LIBS -l${zlib}"; break],
+ [if test ${zlib} = gz; then
+ AC_MSG_ERROR([sorry rpm requires libz.a or libgz.a (from the zlib package)])
+ fi]
+ )
+ done
+
+dnl zlib-1.0.4 has not gzseek
+ AC_CHECK_LIB(${zlib}, gzseek, [AC_DEFINE(HAVE_GZSEEK, 1, [Define as 1 if your zlib has gzseek()])])
+fi
+
+#=================
+# Check for bzip2 library. Prefer external, otherwise none.
+
+AC_CHECK_LIB(bz2, bzread, [LIBS="$LIBS -lbz2"],
+ AC_CHECK_LIB(bz2, BZ2_bzread, [
+ WITH_BZIP2=1
+ LIBS="$LIBS -lbz2"
+ AC_DEFINE(HAVE_BZ2_1_0, 1, [Define as 1 if you bzip2 1.0]) ],
+ WITH_BZIP2=0))
+AC_SUBST(WITH_BZIP2)
+
+#=================
+
localdone=
dirs=$prefix
@@ -371,8 +401,52 @@ dnl
dnl Checks for libraries.
+AC_CHECK_FUNC(setreuid, [], [
+ AC_CHECK_LIB(ucb, setreuid, [if echo $LIBS | grep -- -lucb >/dev/null ;then :; else LIBS="$LIBS -lc -lucb" USEUCB=y;fi])
+])
+
+AC_CHECK_FUNC(rand, [], [
+ AC_CHECK_LIB(rand, rand, [])
+])
+
+AC_CHECK_FUNC(getdomainname, [], [
+ AC_CHECK_LIB(nsl, getdomainname)
+])
+AC_CHECK_FUNC(socket, [], [
+ AC_CHECK_LIB(socket, socket)
+])
+
+AC_CHECK_HEADERS(error.h)
+AC_CHECK_FUNCS(error)
+
+AC_CHECK_HEADERS(poll.h)
+
+AC_CHECK_HEADERS(thread.h pthread.h synch.h semaphore.h)
+
+AC_CHECK_LIB(pthread, pthread_mutex_trylock, [], [
+ dnl OSF 5.0 has the the symbols prefixed with __ in libpthread.
+ AC_CHECK_LIB(pthread, __pthread_mutex_trylock, [], [
+ AC_CHECK_LIB(thread, mutex_lock)
+ ])
+])
+
+AC_CHECK_HEADERS(aio.h)
+AC_SEARCH_LIBS(aio_read, [c rt aio posix4])
+
+dnl Better not use fchmod at all.
+AC_CHECK_FUNC(fchmod)
+
+AC_CHECK_FUNCS(vsnprintf snprintf)
+
+dnl Temporary hack for MiNT. Some functions (writev, snprintf) are
+dnl not in the libc but in libport (for political reasons). This check
+dnl can hopefully be removed soon. Please use the default action
+dnl for this macro (not LIBS=...), otherwise the check for dbopen
+dnl will fail.
+AC_CHECK_LIB(port, writev)
+
#=================
-# Check for libelf library. Prefer external, otherwise internal.
+# Check for libelf library. Prefer external, then internal, otherwise none.
WITH_ELFUTILS_SUBDIR=
WITH_LIBELF_INCLUDE=
WITH_LIBELF_LIB=
@@ -380,13 +454,13 @@ AC_CHECK_HEADER([libelf.h])
AC_CHECK_HEADER([gelf.h], [
AC_DEFINE(HAVE_GELF_H, 1, [Define to 1 if you have the <gelf.h> header file.])
AC_CHECK_LIB(elf, gelf_getvernaux, [
- AC_DEFINE(HAVE_LIBELF, 1, [Define to 1 if you have the `elf' library (-lelf).])
+ AC_DEFINE(HAVE_LIBELF, 1, [Define to 1 if you have the 'elf' library (-lelf).])
WITH_LIBELF_LIB="-lelf"
])
], [
if test -d elfutils/libelf ; then
AC_DEFINE(HAVE_GELF_H, 1, [Define to 1 if you have the <gelf.h> header file.])
- AC_DEFINE(HAVE_LIBELF, 1, [Define to 1 if you have the `elf' library (-lelf).])
+ AC_DEFINE(HAVE_LIBELF, 1, [Define to 1 if you have the 'elf' library (-lelf).])
WITH_ELFUTILS_SUBDIR=elfutils
WITH_LIBELF_INCLUDE="-I\${top_srcdir}/${WITH_ELFUTILS_SUBDIR}/libelf"
WITH_LIBELF_LIB="\${top_builddir}/${WITH_ELFUTILS_SUBDIR}/libelf/libelf.a"
@@ -399,14 +473,14 @@ AC_SUBST(WITH_LIBELF_LIB)
WITH_LIBDWARF_INCLUDE=
WITH_LIBDWARF_DEBUGEDIT=
AC_CHECK_HEADER([dwarf.h], [
- AC_DEFINE(HAVE_DWARF_H, 1, [Define to 1 if you have the <dwarf.h> header file.])
- WITH_LIBDWARF_DEBUGEDIT="debugedit"
- ], [
- if test -d elfutils/libdwarf ; then
- AC_DEFINE(HAVE_DWARF_H, 1, [Define to 1 if you have the <dwarf.h> header file.])
- WITH_LIBDWARF_INCLUDE="-I\${top_srcdir}/${WITH_ELFUTILS_SUBDIR}/libdwarf"
- WITH_LIBDWARF_DEBUGEDIT="debugedit"
- fi
+ AC_DEFINE(HAVE_DWARF_H, 1, [Define to 1 if you have the <dwarf.h> header file.])
+ WITH_LIBDWARF_DEBUGEDIT="debugedit"
+],[
+ if test -d elfutils/libdwarf ; then
+ AC_DEFINE(HAVE_DWARF_H, 1, [Define to 1 if you have the <dwarf.h> header file.])
+ WITH_LIBDWARF_INCLUDE="-I\${top_srcdir}/${WITH_ELFUTILS_SUBDIR}/libdwarf"
+ WITH_LIBDWARF_DEBUGEDIT="debugedit"
+ fi
])
AC_SUBST(WITH_LIBDWARF_INCLUDE)
AC_SUBST(WITH_LIBDWARF_DEBUGEDIT)
@@ -417,21 +491,21 @@ WITH_BEECRYPT_SUBDIR=
WITH_BEECRYPT_INCLUDE=
WITH_BEECRYPT_LIB=
AC_CHECK_HEADER([beecrypt/beecrypt.h], [
- AC_CHECK_LIB(beecrypt, mpfprintln, [
- AC_DEFINE(HAVE_LIBBEECRYPT, 1, [Define to 1 if you have the `beecrypt' library (-lbeecrypt).])
- AC_CHECK_HEADER([beecrypt/api.h], [
- AC_DEFINE(HAVE_BEECRYPT_API_H, 1, [Define to 1 if you have the <beecrypt/api.h> header file.])
- ])
- WITH_BEECRYPT_INCLUDE="-I${includedir}/beecrypt"
- WITH_BEECRYPT_LIB="-lbeecrypt"
- ])
- ], [
- if test -d beecrypt ; then
- AC_DEFINE(HAVE_LIBBEECRYPT, 1, [Define to 1 if you have the `beecrypt' library (-lbeecrypt).])
- WITH_BEECRYPT_SUBDIR=beecrypt
- WITH_BEECRYPT_INCLUDE="-I\${top_srcdir}/${WITH_BEECRYPT_SUBDIR}"
- WITH_BEECRYPT_LIB="\${top_builddir}/${WITH_BEECRYPT_SUBDIR}/libbeecrypt.la"
- fi
+ AC_CHECK_LIB(beecrypt, mpfprintln, [
+ AC_DEFINE(HAVE_LIBBEECRYPT, 1, [Define to 1 if you have the 'beecrypt' library (-lbeecrypt).])
+ AC_CHECK_HEADER([beecrypt/api.h], [
+ AC_DEFINE(HAVE_BEECRYPT_API_H, 1, [Define to 1 if you have the <beecrypt/api.h> header file.])
+ ])
+ WITH_BEECRYPT_INCLUDE="-I${includedir}/beecrypt"
+ WITH_BEECRYPT_LIB="-lbeecrypt"
+ ])
+],[
+ if test -d beecrypt ; then
+ AC_DEFINE(HAVE_LIBBEECRYPT, 1, [Define to 1 if you have the 'beecrypt' library (-lbeecrypt).])
+ WITH_BEECRYPT_SUBDIR=beecrypt
+ WITH_BEECRYPT_INCLUDE="-I\${top_srcdir}/${WITH_BEECRYPT_SUBDIR}"
+ WITH_BEECRYPT_LIB="\${top_builddir}/${WITH_BEECRYPT_SUBDIR}/libbeecrypt.la"
+ fi
])
AC_SUBST(WITH_BEECRYPT_SUBDIR)
AC_SUBST(WITH_BEECRYPT_INCLUDE)
@@ -443,72 +517,80 @@ WITH_NEON_SUBDIR=
WITH_NEON_INCLUDE=
WITH_NEON_LIB=
AC_CHECK_HEADER([neon/ne_session.h], [
- AC_CHECK_LIB(neon, ne_session_create, [
- AC_DEFINE(HAVE_LIBNEON, 1, [Define to 1 if you have the `neon' library (-lneon).])
- AC_CHECK_LIB(neon, ne_get_response_header, [
- AC_DEFINE(HAVE_NEON_NE_GET_RESPONSE_HEADER, 1, [Define to 1 if you have ne_get_response_header() in libneon.])
- ])
- AC_CHECK_LIB(neon, ne_send_request_chunk, [
- AC_DEFINE(HAVE_NEON_NE_SEND_REQUEST_CHUNK, 1, [Define to 1 if you have ne_send_request_chunk() in libneon.])
- ])
- WITH_NEON_INCLUDE="-I${includedir}/neon"
- WITH_NEON_LIB="-lneon"
- ])
- ], [
- if test -d neon ; then
- AC_DEFINE(HAVE_LIBNEON, 1, [Define to 1 if you have the `neon' library (-lneon).])
- WITH_NEON_SUBDIR=neon
- WITH_NEON_INCLUDE="-I\${top_srcdir}/${WITH_NEON_SUBDIR}/src"
- WITH_NEON_LIB="\${top_builddir}/${WITH_NEON_SUBDIR}/src/libneon.la"
- fi
+ AC_CHECK_LIB(neon, ne_session_create, [
+ AC_DEFINE(HAVE_LIBNEON, 1, [Define to 1 if you have the 'neon' library (-lneon).])
+ AC_CHECK_LIB(neon, ne_get_response_header, [
+ AC_DEFINE(HAVE_NEON_NE_GET_RESPONSE_HEADER, 1, [Define to 1 if you have ne_get_response_header() in libneon.])
+ ])
+ AC_CHECK_LIB(neon, ne_send_request_chunk, [
+ AC_DEFINE(HAVE_NEON_NE_SEND_REQUEST_CHUNK, 1, [Define to 1 if you have ne_send_request_chunk() in libneon.])
+ ])
+ WITH_NEON_INCLUDE="-I${includedir}/neon"
+ WITH_NEON_LIB="-lneon"
+ ])
+],[
+ if test -d neon ; then
+ AC_DEFINE(HAVE_LIBNEON, 1, [Define to 1 if you have the 'neon' library (-lneon).])
+# XXX HAVE_NEON_NE_GET_RESPONSE_HEADER assumes libneon-0.25 devel internal
+ AC_DEFINE(HAVE_NEON_NE_GET_RESPONSE_HEADER, 1, [Define to 1 if you have ne_get_response_header() in libneon.])
+ WITH_NEON_SUBDIR=neon
+ WITH_NEON_INCLUDE="-I\${top_srcdir}/${WITH_NEON_SUBDIR}/src"
+ WITH_NEON_LIB="\${top_builddir}/${WITH_NEON_SUBDIR}/src/libneon.la"
+ fi
])
AC_SUBST(WITH_NEON_SUBDIR)
AC_SUBST(WITH_NEON_INCLUDE)
AC_SUBST(WITH_NEON_LIB)
-AC_CHECK_FUNC(setreuid, [], [
- AC_CHECK_LIB(ucb, setreuid, [if echo $LIBS | grep -- -lucb >/dev/null ;then :; else LIBS="$LIBS -lc -lucb" USEUCB=y;fi])
-])
-
-AC_CHECK_FUNC(rand, [], [
- AC_CHECK_LIB(rand, rand, [])
-])
-
-AC_CHECK_FUNC(getdomainname, [], [
- AC_CHECK_LIB(nsl, getdomainname)
-])
-AC_CHECK_FUNC(socket, [], [
- AC_CHECK_LIB(socket, socket)
-])
-
-AC_CHECK_HEADERS(error.h)
-AC_CHECK_FUNCS(error)
-
-AC_CHECK_HEADERS(poll.h)
-
-AC_CHECK_HEADERS(thread.h pthread.h synch.h semaphore.h)
-
-AC_CHECK_LIB(pthread, pthread_mutex_trylock, [], [
- dnl OSF 5.0 has the the symbols prefixed with __ in libpthread.
- AC_CHECK_LIB(pthread, __pthread_mutex_trylock, [], [
- AC_CHECK_LIB(thread, mutex_lock)
+#=================
+# Check for magic library. Prefer internal, otherwise external.
+WITH_MAGIC_SUBDIR=
+WITH_MAGIC_INCLUDE=
+WITH_MAGIC_LIB=
+
+if test -d file ; then
+ WITH_MAGIC_SUBDIR=file
+ WITH_MAGIC_INCLUDE="-I\${top_srcdir}/${WITH_MAGIC_SUBDIR}/src"
+ WITH_MAGIC_LIB="\${top_builddir}/${WITH_MAGIC_SUBDIR}/src/libmagic.la"
+else
+ AC_CHECK_HEADER([magic.h], [
+ AC_CHECK_LIB(magic, magic_open, [
+ WITH_MAGIC_SUBDIR=
+ WITH_MAGIC_INCLUDE=
+ WITH_MAGIC_LIB="-lmagic"
+ ])
])
-])
+fi
-AC_CHECK_HEADERS(aio.h)
-AC_SEARCH_LIBS(aio_read, [c rt aio posix4])
+AC_SUBST(WITH_MAGIC_SUBDIR)
+AC_SUBST(WITH_MAGIC_INCLUDE)
+AC_SUBST(WITH_MAGIC_LIB)
-dnl Better not use fchmod at all.
-AC_CHECK_FUNC(fchmod)
+#=================
+# Check for popt library. Prefer internal, otherwise external.
+WITH_POPT_SUBDIR=
+WITH_POPT_INCLUDE=
+WITH_POPT_LIB=
+
+if test -d popt ; then
+ WITH_POPT_SUBDIR=popt
+ WITH_POPT_INCLUDE="-I\${top_srcdir}/${WITH_POPT_SUBDIR}"
+ WITH_POPT_LIB="\${top_builddir}/${WITH_POPT_SUBDIR}/libpopt.la"
+else
+ AC_CHECK_HEADER([popt.h], [
+ AC_CHECK_LIB(popt, poptGetContext, [
+ WITH_POPT_SUBDIR=
+ WITH_POPT_INCLUDE=
+ WITH_POPT_LIB="-lpopt"
+ ])
+ ])
+fi
-AC_CHECK_FUNCS(vsnprintf snprintf)
+AC_SUBST(WITH_POPT_SUBDIR)
+AC_SUBST(WITH_POPT_INCLUDE)
+AC_SUBST(WITH_POPT_LIB)
-dnl Temporary hack for MiNT. Some functions (writev, snprintf) are
-dnl not in the libc but in libport (for political reasons). This check
-dnl can hopefully be removed soon. Please use the default action
-dnl for this macro (not LIBS=...), otherwise the check for dbopen
-dnl will fail.
-AC_CHECK_LIB(port, writev)
+#=================
dnl ------------------ with internal db
AC_DEFINE(HAVE_DB3_DB_H, 1, [Define if you have the <db3/db.h> header file])
@@ -516,24 +598,39 @@ WITH_DB_SUBDIR=db3
WITH_INTERNAL_DB=1
DBLIBSRCS="db3.c"
+AC_SUBST(WITH_DB_SUBDIR)
+AC_SUBST(WITH_INTERNAL_DB)
+
+#=================
+# Check for sqlite3 library. Prefer external, then internal, otherwise none.
+WITH_SQLITE3_SUBDIR=
+WITH_SQLITE3_INCLUDE=
+WITH_SQLITE3_LIB=
+
AC_CHECK_HEADER([sqlite3.h], [
- AC_DEFINE(HAVE_SQLITE3_H, 1, [Define if you have the <sqlite3.h> header file])
- WITH_SQLITE3=1
- WITH_SQLITE3_INCLUDE=
- WITH_SQLITE3_LIB=-lsqlite3
- DBLIBSRCS="$DBLIBSRCS sqlite.c"
+ AC_CHECK_LIB(sqlite3, sqlite3_open, [
+ AC_DEFINE(HAVE_SQLITE3_H, 1, [Define if you have the <sqlite3.h> header file])
+ WITH_SQLITE3_SUBDIR=
+ WITH_SQLITE3_INCLUDE=
+ WITH_SQLITE3_LIB="-lsqlite3"
+ DBLIBSRCS="$DBLIBSRCS sqlite.c"
+ ])
],[
- WITH_SQLITE3=0
- WITH_SQLITE3_INCLUDE=
- WITH_SQLITE3_LIB=
+ if test -d sqlite ; then
+ AC_DEFINE(HAVE_SQLITE3_H, 1, [Define if you have the <sqlite3.h> header file])
+ WITH_SQLITE3_SUBDIR=sqlite
+ WITH_SQLITE3_INCLUDE="-I\${top_srcdir}/${WITH_SQLITE3_SUBDIR}/src"
+ WITH_SQLITE3_LIB="\${top_builddir}/${WITH_SQLITE3_SUBDIR}/libsqlite3.la"
+ DBLIBSRCS="$DBLIBSRCS sqlite.c"
+ fi
])
-AC_SUBST(WITH_DB_SUBDIR)
-AC_SUBST(WITH_INTERNAL_DB)
-AC_SUBST(WITH_SQLITE3)
+AC_SUBST(WITH_SQLITE3_SUBDIR)
AC_SUBST(WITH_SQLITE3_INCLUDE)
AC_SUBST(WITH_SQLITE3_LIB)
+#=================
+
DBLIBOBJS=`echo $DBLIBSRCS | sed -e "s/\.c/\.lo/g"`
AC_SUBST(DBLIBSRCS)
@@ -547,28 +644,6 @@ dnl AmigaOS and IXEmul have a fork() dummy
;;
esac
-if test -z "${WITH_ZLIB_LIB}" ; then
-for zlib in z gz ; do
- AC_CHECK_LIB(${zlib}, gzread,
- [LIBS="$LIBS -l${zlib}"; break],
- [if test ${zlib} = gz; then
- AC_MSG_ERROR([sorry rpm requires libz.a or libgz.a (from the zlib package)])
- fi]
- )
-done
-
-dnl zlib-1.0.4 has not gzseek
-AC_CHECK_LIB(${zlib}, gzseek, [AC_DEFINE(HAVE_GZSEEK, 1, [Define as 1 if your zlib has gzseek()])])
-fi
-
-AC_CHECK_LIB(bz2, bzread, [LIBS="$LIBS -lbz2"],
- AC_CHECK_LIB(bz2, BZ2_bzread, [
- WITH_BZIP2=1
- LIBS="$LIBS -lbz2"
- AC_DEFINE(HAVE_BZ2_1_0, 1, [Define as 1 if you bzip2 1.0]) ],
- WITH_BZIP2=0))
-AC_SUBST(WITH_BZIP2)
-
AM_GNU_GETTEXT
dnl TVM:
dnl horrible *temporary* hack to make sure that if we found gettext() in
@@ -609,6 +684,7 @@ dnl We should really emulate/steal sections of the statfs and struct statfs
dnl checks from GNU fileutils.
dnl
AC_MSG_CHECKING(for struct statfs)
+
dnl
dnl this is easier than nesting AC_TRY_COMPILEs...
dnl
diff --git a/lib/Makefile.am b/lib/Makefile.am
index abe3a6403..d433b75ee 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -10,7 +10,7 @@ INCLUDES = -I. \
-I$(top_srcdir)/rpmdb \
-I$(top_srcdir)/rpmio \
@WITH_BEECRYPT_INCLUDE@ \
- -I$(top_srcdir)/popt \
+ @WITH_POPT_INCLUDE@ \
-I$(top_srcdir)/misc \
@INCPATH@
@@ -44,7 +44,7 @@ librpm_la_SOURCES = \
librpm_la_LDFLAGS = -release 4.4 $(LDFLAGS) \
$(top_builddir)/rpmdb/librpmdb.la \
$(top_builddir)/rpmio/librpmio.la \
- $(top_builddir)/popt/libpopt.la \
+ @WITH_POPT_LIB@ \
@WITH_SELINUX_LIB@ \
@INTLLIBS@
diff --git a/python/Makefile.am b/python/Makefile.am
index b79ed016b..1b8c83ae2 100644
--- a/python/Makefile.am
+++ b/python/Makefile.am
@@ -16,11 +16,11 @@ INCLUDES = -I. \
-I$(top_srcdir)/lib \
-I$(top_srcdir)/rpmdb \
-I$(top_srcdir)/rpmio \
+ @WITH_LIBELF_INCLUDE@ \
@WITH_BEECRYPT_INCLUDE@ \
- -I$(top_srcdir)/popt \
+ @WITH_POPT_INCLUDE@ \
-I$(top_srcdir)/misc \
-I$(pyincdir) \
- @WITH_LIBELF_INCLUDE@ \
@INCPATH@
noinst_HEADERS = header-py.h \
@@ -29,11 +29,11 @@ noinst_HEADERS = header-py.h \
spec-py.h
mylibs= \
+ $(top_builddir)/build/librpmbuild.la \
$(top_builddir)/lib/librpm.la \
$(top_builddir)/rpmdb/librpmdb.la \
$(top_builddir)/rpmio/librpmio.la \
- $(top_builddir)/popt/libpopt.la \
- $(top_builddir)/build/librpmbuild.la \
+ @WITH_POPT_LIB@ \
@WITH_LIBELF_LIB@
LDADD =
diff --git a/rpm.spec.in b/rpm.spec.in
index 96932de8d..48457a2ad 100644
--- a/rpm.spec.in
+++ b/rpm.spec.in
@@ -20,7 +20,7 @@ Name: rpm
%define version @VERSION@
Version: %{version}
%{expand: %%define rpm_version %{version}}
-Release: 0.3
+Release: 0.4
Group: System Environment/Base
Source: ftp://jbj.org/pub/rpm-devel/rpm-%{rpm_version}.tar.gz
License: GPL
@@ -498,13 +498,14 @@ exit 0
%{__includedir}/popt.h
%changelog
-* Wed Feb 16 2005 Jeff Johnson <jbj@jbj.org> 4.4.2-0.3
+* Wed Feb 16 2005 Jeff Johnson <jbj@jbj.org> 4.4.2-0.4
- sqlite3: revert cClose scoping, data is freed in cClose unlike db4.
- build against sqlite3-3.1.2.
- sqlite3: update encode/decode from sqlite-2.8.16.
- add --xml popt alias for query modes.
- remove _rpmdb now that python2.[34] are commonly available.
- remove remnant -I/opt/local hacks, --prefix=/usr is recommended.
+- rework configure.ac et al to lose internal library baggage flexibly.
* Sun Feb 13 2005 Jeff Johnson <jbj@jbj.org> 4.4.2-0.1
- start 4.4.2 devel.
diff --git a/rpmdb/Makefile.am b/rpmdb/Makefile.am
index c9582195d..fc8d21d1d 100644
--- a/rpmdb/Makefile.am
+++ b/rpmdb/Makefile.am
@@ -10,7 +10,7 @@ INCLUDES = -I. \
-I$(top_srcdir)/lib \
-I$(top_srcdir)/rpmio \
@WITH_BEECRYPT_INCLUDE@ \
- -I$(top_srcdir)/popt \
+ @WITH_POPT_INCLUDE@ \
-I$(top_srcdir)/misc \
@WITH_SQLITE3_INCLUDE@ \
@WITH_LIBELF_INCLUDE@ \
@@ -53,7 +53,7 @@ librpmdb_la_SOURCES = \
tagname.c tagtbl.c
librpmdb_la_LDFLAGS = -release 4.4 \
$(top_builddir)/rpmio/librpmio.la \
- $(top_builddir)/popt/libpopt.la \
+ @WITH_POPT_LIB@ \
@WITH_SQLITE3_LIB@ \
@WITH_LIBELF_LIB@
librpmdb_la_LIBADD = $(DBLIBOBJS) $(libdb_la)
diff --git a/rpmio/Makefile.am b/rpmio/Makefile.am
index 8a6a723a1..b3c221411 100644
--- a/rpmio/Makefile.am
+++ b/rpmio/Makefile.am
@@ -11,8 +11,9 @@ EXTRA_PROGRAMS = tax tdigest tdir tfts tget thkp tput tglob tinv tkey tring trpm
INCLUDES = -I. \
-I$(top_srcdir) \
@WITH_BEECRYPT_INCLUDE@ \
+ @WITH_NEON_INCLUDE@ \
@WITH_LUA_INCLUDE@ \
- -I$(top_srcdir)/popt \
+ @WITH_POPT_INCLUDE@ \
-I$(top_srcdir)/misc \
@INCPATH@
@@ -35,10 +36,11 @@ librpmio_la_SOURCES = \
rpmpgp.c rpmrpc.c rpmsq.c rpmsw.c strcasecmp.c stubs.c url.c ugid.c
librpmio_la_LDFLAGS = -release 4.4 $(LDFLAGS) \
@WITH_BEECRYPT_LIB@ \
+ @WITH_NEON_LIB@ \
@WITH_LUA_LIB@ \
- $(top_builddir)/file/src/libmagic.la \
+ @WITH_MAGIC_LIB@ \
@WITH_ZLIB_LIB@ \
- -lneon -lpthread
+ -lpthread
librpmio_la_LIBADD = # $(BEECRYPTLOBJS)
librpmio_la_DEPENDENCIES = # .created
diff --git a/rpmio/rpmdav.c b/rpmio/rpmdav.c
index d990fc670..876239230 100644
--- a/rpmio/rpmdav.c
+++ b/rpmio/rpmdav.c
@@ -9,16 +9,23 @@
#include <pthread.h>
#endif
-#include <neon/ne_alloc.h>
-#include <neon/ne_auth.h>
-#include <neon/ne_basic.h>
-#include <neon/ne_dates.h>
-#include <neon/ne_locks.h>
-#include <neon/ne_props.h>
-#include <neon/ne_request.h>
-#include <neon/ne_socket.h>
-#include <neon/ne_string.h>
-#include <neon/ne_utils.h>
+#include "ne_alloc.h"
+#include "ne_auth.h"
+#include "ne_basic.h"
+#include "ne_dates.h"
+#include "ne_locks.h"
+
+#define NEONBLOWSCHUNKS
+#ifndef NEONBLOWSCHUNKS
+/* HACK: include ne_private.h to access sess->socket for now. */
+#include "../neon/src/ne_private.h"
+#endif
+
+#include "ne_props.h"
+#include "ne_request.h"
+#include "ne_socket.h"
+#include "ne_string.h"
+#include "ne_utils.h"
#include <rpmio_internal.h>
@@ -936,7 +943,7 @@ assert(ctrl->req != NULL);
#endif
if (!strcmp(httpCmd, "PUT")) {
-#ifdef NOTYET /* XXX HACK no wr_chunked until libneon supports */
+#if defined(HAVE_NEON_NE_SEND_REQUEST_CHUNK)
ctrl->wr_chunked = 1;
ne_add_request_header(ctrl->req, "Transfer-Encoding", "chunked");
ne_set_request_chunked(ctrl->req, 1);
@@ -1065,13 +1072,28 @@ hexdump(buf, rc);
ssize_t davWrite(void * cookie, const char * buf, size_t count)
{
-#ifdef NOTYET /* XXX HACK no wr_chunked until libneon supports */
FD_t fd = cookie;
ssize_t rc;
int xx;
+#ifndef NEONBLOWSCHUNKS
+ ne_session * sess;
+
+assert(fd->req != NULL);
+ sess = ne_get_session(fd->req);
+assert(sess != NULL);
+
+ /* HACK: include ne_private.h to access sess->socket for now. */
+ xx = ne_sock_fullwrite(sess->socket, buf, count);
+#else
+#if defined(HAVE_NEON_NE_SEND_REQUEST_CHUNK)
assert(fd->req != NULL);
xx = ne_send_request_chunk(fd->req, buf, count);
+#else
+ errno = EIO; /* HACK */
+ return -1;
+#endif
+#endif
/* HACK: stupid error impedence matching. */
rc = (xx == 0 ? count : -1);
@@ -1084,10 +1106,6 @@ hexdump(buf, count);
#endif
return rc;
-#else
- errno = EIO; /* HACK */
- return -1;
-#endif
}
int davSeek(void * cookie, /*@unused@*/ _libio_pos_t pos, int whence)
diff --git a/rpmio/rpmurl.h b/rpmio/rpmurl.h
index a254fb5cf..4b02a21f4 100644
--- a/rpmio/rpmurl.h
+++ b/rpmio/rpmurl.h
@@ -53,20 +53,20 @@ struct urlinfo_s {
FD_t data; /*!< per-xfer data channel */
/*@relnull@*/
- void * capabilities; /*!< neon ne_server_capabilities ptr */
+ void * capabilities; /*!< neon: ne_server_capabilities ptr */
/*@relnull@*/
- void * lockstore; /*!< neon ne_lock_store ptr */
+ void * lockstore; /*!< neon: ne_lock_store ptr */
/*@relnull@*/
- void * sess; /*!< neon ne_session ptr */
- off_t current; /*!< neon current body offset. */
- off_t total; /*!< neon total body length. */
- int connstatus; /*!< neon connection status. */
+ void * sess; /*!< neon: ne_session ptr */
+ off_t current; /*!< neon: current body offset. */
+ off_t total; /*!< neon: total body length. */
+ int connstatus; /*!< neon: connection status. */
#ifdef REFERENCE
typedef enum {
- ne_conn_namelookup, /* lookup up hostname (info = hostname) */
- ne_conn_connecting, /* connecting to host (info = hostname) */
- ne_conn_connected, /* connected to host (info = hostname) */
- ne_conn_secure /* connection now secure (info = crypto level) */
+ ne_conn_namelookup, /* lookup up hostname (info = hostname) */
+ ne_conn_connecting, /* connecting to host (info = hostname) */
+ ne_conn_connected, /* connected to host (info = hostname) */
+ ne_conn_secure /* connection now secure (info = crypto level) */
} ne_conn_status;
#endif
diff --git a/sqlite/.cvsignore b/sqlite/.cvsignore
new file mode 100644
index 000000000..a858fba38
--- /dev/null
+++ b/sqlite/.cvsignore
@@ -0,0 +1,23 @@
+.libs
+Makefile
+Makefile.in
+config.h
+config.log
+config.status
+keywordhash.h
+lemon
+lempar.c
+libtool
+mkkeywordhash
+opcodes.c
+opcodes.h
+parse.c
+parse.h
+parse.out
+parse.y
+sqlite3
+sqlite3.h
+sqlite3.pc
+*.la
+*.lo
+*.swp
diff --git a/tools/Makefile.am b/tools/Makefile.am
index b29dbf1ca..023b92f1e 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -9,7 +9,7 @@ INCLUDES = -I. \
-I$(top_srcdir)/rpmdb \
-I$(top_srcdir)/rpmio \
@WITH_BEECRYPT_INCLUDE@ \
- -I$(top_srcdir)/popt \
+ @WITH_POPT_INCLUDE@ \
@WITH_LIBELF_INCLUDE@ \
@WITH_LIBDWARF_INCLUDE@ \
-I$(top_srcdir)/file/src \
@@ -36,8 +36,9 @@ bin_PROGRAMS = rpmgraph
convertdb1_SOURCES = convertdb1.c
debugedit_SOURCES = debugedit.c hashtab.c
-debugedit_LDADD = @LDFLAGS_STATIC@ @WITH_LIBELF_LIB@ \
- $(top_builddir)/popt/libpopt.la
+debugedit_LDADD = @LDFLAGS_STATIC@ \
+ @WITH_LIBELF_LIB@ \
+ @WITH_POPT_LIB@
javadeps_SOURCES = javadeps.c