fix libuuid detection
This commit is contained in:
parent
f30e40a80b
commit
f7fb54d0cd
|
@ -6,6 +6,7 @@ m4_include([build/config/ac_gcc_archflag.m4])
|
|||
m4_include([build/config/ac_gcc_x86_cpuid.m4])
|
||||
m4_include([build/config/ax_lib_mysql.m4])
|
||||
m4_include([build/config/ax_check_java.m4])
|
||||
m4_include([build/config/uuid.m4])
|
||||
m4_include([build/config/erlang.m4])
|
||||
m4_include([build/config/odbc.m4])
|
||||
m4_include([build/config/sched_setaffinity.m4])
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
AC_DEFUN([CHECK_LIBUUID],
|
||||
[
|
||||
PKG_CHECK_MODULES([LIBUUID], [uuid >= 1.41.2],
|
||||
[LIBUUID_FOUND=yes], [LIBUUID_FOUND=no])
|
||||
if test "$LIBUUID_FOUND" = "no" ; then
|
||||
PKG_CHECK_MODULES([LIBUUID], [uuid],
|
||||
[LIBUUID_FOUND=yes], [LIBUUID_FOUND=no])
|
||||
if test "$LIBUUID_FOUND" = "no" ; then
|
||||
AC_MSG_ERROR([libuuid development files required])
|
||||
else
|
||||
LIBUUID_INCLUDEDIR=$(pkg-config --variable=includedir uuid)
|
||||
LIBUUID_CFLAGS+=" -I$LIBUUID_INCLUDEDIR/uuid "
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([LIBUUID_CFLAGS])
|
||||
AC_SUBST([LIBUUID_LIBS])
|
||||
])
|
|
@ -405,6 +405,10 @@ if test "x$enable_core_odbc_support" != "xno"; then
|
|||
AC_CHECK_LIB([odbc], [SQLDisconnect],, AC_MSG_ERROR([no usable libodbc; please install unixodbc devel package or equivalent]))
|
||||
fi
|
||||
|
||||
CHECK_LIBUUID
|
||||
SWITCH_AM_LDFLAGS="$LIBUUID_LIBS $SWITCH_AM_LDFLAGS"
|
||||
SWITCH_AM_CFLAGS="$LIBUUID_CFLAGS $SWITCH_AM_CFLAGS"
|
||||
|
||||
AC_ARG_ENABLE(core-pgsql-support,
|
||||
[AS_HELP_STRING([--enable-core-pgsql-support], [Compile with PGSQL Support])],,[enable_core_pgsql_support="no"])
|
||||
|
||||
|
@ -414,7 +418,7 @@ AC_PATH_PROG([PG_CONFIG], [pg_config], [no])
|
|||
if test "$PG_CONFIG" != "no"; then
|
||||
AC_MSG_CHECKING([for PostgreSQL libraries])
|
||||
POSTGRESQL_CXXFLAGS="`$PG_CONFIG --cppflags` -I`$PG_CONFIG --includedir`"
|
||||
POSTGRESQL_LDFLAGS="`$PG_CONFIG --ldflags` -L`$PG_CONFIG --libdir` -lpq"
|
||||
POSTGRESQL_LDFLAGS="`$PG_CONFIG --ldflags|sed 's/ -Wl,--as-needed//g'` -L`$PG_CONFIG --libdir` -lpq"
|
||||
POSTGRESQL_VERSION=`$PG_CONFIG --version | sed -e 's#PostgreSQL ##'`
|
||||
POSTGRESQL_MAJOR_VERSION=`$PG_CONFIG --version | sed -re 's#PostgreSQL ([0-9]+).[0-9]+.[0-9]+#\1#'`
|
||||
POSTGRESQL_MINOR_VERSION=`$PG_CONFIG --version | sed -re 's#PostgreSQL [0-9]+.([0-9]+).[0-9]+#\1#'`
|
||||
|
|
Loading…
Reference in New Issue