Check for libpq in core before building mod_cdr_pg_csv
This commit is contained in:
parent
ce5d21106e
commit
bb84b0534c
|
@ -601,6 +601,7 @@ if test x"$enable_core_pgsql_support" = x"yes" ; then
|
|||
AC_MSG_RESULT([$POSTGRESQL_LIBDIR])
|
||||
|
||||
AC_DEFINE([SWITCH_HAVE_PGSQL], [1], [Define to 1 if PostgreSQL libraries are available])
|
||||
AM_CONDITIONAL([HAVE_PGSQL],[true])
|
||||
AC_DEFINE_UNQUOTED([POSTGRESQL_VERSION], "${POSTGRESQL_VERSION}", [Specifies the version of PostgreSQL we are linking against])
|
||||
AC_DEFINE_UNQUOTED([POSTGRESQL_MAJOR_VERSION], ${POSTGRESQL_MAJOR_VERSION}, [Specifies the version of PostgreSQL we are linking against])
|
||||
AC_DEFINE_UNQUOTED([POSTGRESQL_MINOR_VERSION], ${POSTGRESQL_MINOR_VERSION}, [Specifies the version of PostgreSQL we are linking against])
|
||||
|
@ -612,6 +613,8 @@ if test x"$enable_core_pgsql_support" = x"yes" ; then
|
|||
SWITCH_AM_LDFLAGS="$POSTGRESQL_LDFLAGS $SWITCH_AM_LDFLAGS"
|
||||
|
||||
LIBS="$save_LIBS"
|
||||
else
|
||||
AM_CONDITIONAL([HAVE_PGSQL],[false])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(deprecated-core-db-events,
|
||||
|
|
|
@ -1,8 +1,17 @@
|
|||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_cdr_pg_csv
|
||||
|
||||
if HAVE_PGSQL
|
||||
|
||||
mod_LTLIBRARIES = mod_cdr_pg_csv.la
|
||||
mod_cdr_pg_csv_la_SOURCES = mod_cdr_pg_csv.c
|
||||
mod_cdr_pg_csv_la_CFLAGS = $(AM_CFLAGS) $(SWITCH_AM_CXXFLAGS)
|
||||
mod_cdr_pg_csv_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_cdr_pg_csv_la_LDFLAGS = -avoid-version -module -no-undefined -shared -lpq $(SWITCH_AM_LDFLAGS)
|
||||
|
||||
else
|
||||
install: error
|
||||
all: error
|
||||
error:
|
||||
$(error You must configure --enable-core-pgsql-support to build this module)
|
||||
endif
|
||||
|
|
Loading…
Reference in New Issue