Eliminate DBLIBOBJS, DBLIBSRCS. Add AM_CONDITIONAL SQLITE3.
This commit is contained in:
parent
218e5804fb
commit
fc0a01b5a7
13
configure.ac
13
configure.ac
|
@ -518,35 +518,28 @@ AC_SUBST(WITH_POPT_LIB)
|
|||
dnl ------------------ with internal db
|
||||
AC_DEFINE(HAVE_DB3_DB_H, 1, [Define if you have the <db3/db.h> header file])
|
||||
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, otherwise none.
|
||||
WITH_SQLITE3_INCLUDE=
|
||||
WITH_SQLITE3_LIB=
|
||||
|
||||
WITH_SQLITE3=no
|
||||
AC_CHECK_HEADERS([sqlite3.h], [
|
||||
AC_CHECK_LIB(sqlite3, sqlite3_open, [
|
||||
WITH_SQLITE3_INCLUDE=
|
||||
WITH_SQLITE3_LIB="-lsqlite3"
|
||||
DBLIBSRCS="$DBLIBSRCS sqlite.c"
|
||||
WITH_SQLITE3=yes
|
||||
])
|
||||
])
|
||||
|
||||
AC_SUBST(WITH_SQLITE3_INCLUDE)
|
||||
AC_SUBST(WITH_SQLITE3_LIB)
|
||||
AM_CONDITIONAL([SQLITE3],[test "$WITH_SQLITE3" = yes])
|
||||
|
||||
#=================
|
||||
|
||||
DBLIBOBJS=`echo $DBLIBSRCS | sed -e "s/\.c/\.lo/g"`
|
||||
|
||||
AC_SUBST(DBLIBSRCS)
|
||||
AC_SUBST(DBLIBOBJS)
|
||||
|
||||
dnl AmigaOS and IXEmul have a fork() dummy
|
||||
case "$host" in
|
||||
m68k-*-amigaos )
|
||||
|
|
|
@ -49,16 +49,20 @@ librpmdb_la_SOURCES = \
|
|||
hdrNVR.c header.c header_internal.c legacy.c merge.c \
|
||||
poptDB.c rpmhash.c rpmdb.c \
|
||||
tagname.c tagtbl.c
|
||||
librpmdb_la_SOURCES += db3.c
|
||||
if SQLITE3
|
||||
librpmdb_la_SOURCES += sqlite.c
|
||||
endif
|
||||
librpmdb_la_LDFLAGS = -release 4.4 \
|
||||
$(top_builddir)/rpmio/librpmio.la \
|
||||
@WITH_POPT_LIB@ \
|
||||
@WITH_SQLITE3_LIB@ \
|
||||
@WITH_LIBELF_LIB@
|
||||
librpmdb_la_LIBADD = $(DBLIBOBJS) $(libdb_la)
|
||||
librpmdb_la_DEPENDENCIES = $(DBLIBOBJS) $(libdb_la)
|
||||
librpmdb_la_LIBADD = $(libdb_la)
|
||||
librpmdb_la_DEPENDENCIES = $(libdb_la)
|
||||
|
||||
# XXX make sure that db.h symlink is generated
|
||||
dbconfig.c $(DBLIBSRCS): db.h
|
||||
dbconfig.c: db.h
|
||||
|
||||
tagtbl.c: Makefile.am $(top_srcdir)/lib/rpmlib.h
|
||||
@echo '/*@-bounds@*/' > $@
|
||||
|
@ -186,7 +190,7 @@ sources:
|
|||
|
||||
.PHONY: lint
|
||||
lint:
|
||||
$(LINT) $(DEFS) $(AM_CPPFLAGS) $(librpmdb_la_SOURCES) $(DBLIBSRCS)
|
||||
$(LINT) $(DEFS) $(AM_CPPFLAGS) $(librpmdb_la_SOURCES)
|
||||
|
||||
EXTRA_PROGRAMS += tdbi
|
||||
tdbi_SOURCES = tdbi.c
|
||||
|
|
Loading…
Reference in New Issue