SUBDIRS = . tests
AM_CFLAGS = $(DEF_CFLAGS) -DOSRF_LOG_PARAMS -I@top_srcdir@/include/
-AM_LDFLAGS = $(DEF_LDFLAGS) -L$(DBI_LIBS) -lopensrf
+AM_LDFLAGS = $(DEF_LDFLAGS) $(DBI_LIBS) -lopensrf
bin_PROGRAMS = oils_dataloader dump_idl idlval test_json_query test_qstore
oils_dataloader_SOURCES = oils_dataloader.c
liboils_utils_la_LDFLAGS = -loils_idl -version-info 2:0:0
liboils_cstore_la_SOURCES = oils_cstore.c oils_sql.c
-liboils_cstore_la_LDFLAGS = $(AM_LDFLAGS) -ldbi -ldbdpgsql -loils_utils -module -version-info 2:0:0
+liboils_cstore_la_LDFLAGS = $(AM_LDFLAGS) -loils_utils -module -version-info 2:0:0
liboils_cstore_la_DEPENDENCIES = liboils_utils.la
liboils_qstore_la_SOURCES = oils_qstore.c oils_sql.c oils_storedq.c oils_buildq.c buildSQL.c oils_execsql.c
-liboils_qstore_la_LDFLAGS = $(AM_LDFLAGS) -ldbi -ldbdpgsql -loils_utils -module -version-info 2:0:0
+liboils_qstore_la_LDFLAGS = $(AM_LDFLAGS) -loils_utils -module -version-info 2:0:0
liboils_qstore_la_DEPENDENCIES = liboils_utils.la
liboils_rstore_la_SOURCES = oils_rstore.c oils_sql.c
-liboils_rstore_la_LDFLAGS = $(AM_LDFLAGS) -ldbi -ldbdpgsql -loils_utils -module -version-info 2:0:0
+liboils_rstore_la_LDFLAGS = $(AM_LDFLAGS) -loils_utils -module -version-info 2:0:0
liboils_rstore_la_DEPENDENCIES = liboils_utils.la
liboils_pcrud_la_SOURCES = oils_pcrud.c oils_sql.c
-liboils_pcrud_la_LDFLAGS = $(AM_LDFLAGS) -ldbi -ldbdpgsql -loils_utils -module -version-info 2:0:0
+liboils_pcrud_la_LDFLAGS = $(AM_LDFLAGS) -loils_utils -module -version-info 2:0:0
liboils_pcrud_la_DEPENDENCIES = liboils_utils.la
liboils_auth_la_SOURCES = oils_auth.c
COMMON = testsuite.c
AM_CFLAGS = $(DEF_CFLAGS) -DOSRF_LOG_PARAMS
-AM_LDFLAGS = $(DEF_LDFLAGS) $(DEF_LDLIBS) -L$(DBI_LIBS)
+AM_LDFLAGS = $(DEF_LDFLAGS) $(DEF_LDLIBS) $(DBI_LIBS)
TESTS = check_util check_idl
check_PROGRAMS = check_util check_idl
[LIBXML2_HEADERS=/usr/include/libxml2/])
AC_SUBST([LIBXML2_HEADERS])
-AC_ARG_WITH([dbi],
-[ --with-dbi=path location of the libdbi driver libraries (default is /usr/lib/x86_64-linux-gnu/dbd/)],
-[DBI_LIBS=${withval}],
-[DBI_LIBS=/usr/lib/x86_64-linux-gnu/dbd/])
+PKG_CHECK_MODULES([DBI], [dbi])
AC_ARG_WITH([perlbase],
[ --with-perlbase=path base location to install Perl modules (default based on Config.pm)],
[PERL_BASE=x])
AC_SUBST([PERL_BASE])
-# If the passed in value doesn't work, fall back to reasonable defaults
-# Distributions are starting to package a good version of libdbi / libdbd
-if ! test -d "$DBI_LIBS"; then
- for i in /usr/lib/dbd/ /usr/lib64/dbd /usr/local/lib/dbd/ ; do
- if test -d "$i"; then
- DBI_LIBS="$i"
- break
- fi
- done
-fi
-AC_SUBST([DBI_LIBS])
-
AM_CONDITIONAL(CHECK_TESTS, test x$enable_tests = xyes)
if test "x$openils_core" = "xtrue"; then