|
|
|
@ -248,31 +248,56 @@ if test "$compile_pgsql_plugin" = "yes"; then
|
|
|
|
|
AC_LANG_SAVE
|
|
|
|
|
AC_LANG_CPLUSPLUS
|
|
|
|
|
SAVED_CXXFLAGS="$CXXFLAGS"
|
|
|
|
|
for CXX_STD_TEST in "" 11 14 17; do
|
|
|
|
|
CXXFLAGS="$SAVED_CXXFLAGS"
|
|
|
|
|
if test "x$CXX_STD_TEST" = "x"; then
|
|
|
|
|
AC_MSG_CHECKING([PostgreSQL build with default C++ standard])
|
|
|
|
|
else
|
|
|
|
|
AC_MSG_CHECKING([PostgreSQL build with C++$CXX_STD_TEST])
|
|
|
|
|
CXXFLAGS=-std=c++$CXX_STD_TEST
|
|
|
|
|
fi
|
|
|
|
|
AC_MSG_CHECKING([PostgreSQL build with default flags])
|
|
|
|
|
PQXX_CXXFLAGS=""
|
|
|
|
|
CXXFLAGS="$SAVED_CXXFLAGS $PQXX_CXXFLAGS"
|
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
|
#include <$PQXX_INCDIR/pqxx/pqxx>
|
|
|
|
|
],[ ],
|
|
|
|
|
pqxx_flags=yes,
|
|
|
|
|
pqxx_flags=no
|
|
|
|
|
)
|
|
|
|
|
if test "x$pqxx_flags" = "xno"; then
|
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
|
AC_MSG_CHECKING([PostgreSQL build with enabled exceptions])
|
|
|
|
|
PQXX_CXXFLAGS+=" $USE_EXCEPTIONS"
|
|
|
|
|
CXXFLAGS="$SAVED_CXXFLAGS $PQXX_CXXFLAGS"
|
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
|
#include <$PQXX_INCDIR/pqxx/pqxx>
|
|
|
|
|
],[ ],
|
|
|
|
|
pqxx_cxx_std=yes,
|
|
|
|
|
pqxx_cxx_std=no
|
|
|
|
|
pqxx_exceptions=yes,
|
|
|
|
|
pqxx_exceptions=no
|
|
|
|
|
)
|
|
|
|
|
if test "x$pqxx_cxx_std" = "xyes"; then
|
|
|
|
|
PQXX_CXXFLAGS=$CXXFLAGS
|
|
|
|
|
compile_pgsql_plugin="yes"
|
|
|
|
|
AC_SUBST(PQXX_CXXFLAGS)
|
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
|
break
|
|
|
|
|
else
|
|
|
|
|
compile_pgsql_plugin="no"
|
|
|
|
|
if test "x$pqxx_exceptions" = "xno"; then
|
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
|
for CXX_STD_TEST in 11 14 17; do
|
|
|
|
|
AC_MSG_CHECKING([PostgreSQL build with C++$CXX_STD_TEST])
|
|
|
|
|
CXXFLAGS="$SAVED_CXXFLAGS $PQXX_CXXFLAGS -std=c++$CXX_STD_TEST"
|
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
|
#include <$PQXX_INCDIR/pqxx/pqxx>
|
|
|
|
|
],[ ],
|
|
|
|
|
pqxx_cxx_std=yes,
|
|
|
|
|
pqxx_cxx_std=no
|
|
|
|
|
)
|
|
|
|
|
if test "x$pqxx_cxx_std" = "xyes"; then
|
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
|
compile_pgsql_plugin="yes"
|
|
|
|
|
PQXX_CXXFLAGS+=" -std=c++$CXX_STD_TEST"
|
|
|
|
|
AC_SUBST(PQXX_CXXFLAGS)
|
|
|
|
|
break
|
|
|
|
|
else
|
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
|
compile_pgsql_plugin="no"
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
else
|
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
|
AC_SUBST(PQXX_CXXFLAGS)
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
else
|
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
|
AC_SUBST(PQXX_CXXFLAGS)
|
|
|
|
|
fi
|
|
|
|
|
CXXFLAGS="$SAVED_CXXFLAGS"
|
|
|
|
|
AC_LANG_RESTORE
|
|
|
|
|
fi
|
|
|
|
|