diff --git a/config/acx_libpq.m4 b/config/acx_libpq.m4 index 47d4b67..0769579 100644 --- a/config/acx_libpq.m4 +++ b/config/acx_libpq.m4 @@ -559,12 +559,14 @@ if test "$with_pgport" = "yes"; then LIBS=$OLD_LIBS AC_DEFINE(HAVE_PGPORT) if test $HAVE_PGCOMMON = 1 ; then - EXTRALIBS=" -lpgcommon" + LIBS="$LIBS -lpgcommon -lpgport -lpgcommon -lpgport" + else + LIBS="$LIBS -lpgport" fi - LIBS="$LIBS -lpgport $EXTRALIBS" AC_TRY_LINK_FUNC(find_my_exec,[HAVE_PGPORT=1 AC_MSG_RESULT(yes)], AC_MSG_ERROR("pgport was not found. build without --with-pgport=yes to disable")) + LIBS=$OLD_LIBS fi