diff options
Diffstat (limited to 'dev-db/pgpool2/files/pgpool-4.2.0-configure-memcached.patch')
-rw-r--r-- | dev-db/pgpool2/files/pgpool-4.2.0-configure-memcached.patch | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/dev-db/pgpool2/files/pgpool-4.2.0-configure-memcached.patch b/dev-db/pgpool2/files/pgpool-4.2.0-configure-memcached.patch new file mode 100644 index 000000000000..9854e45e3a22 --- /dev/null +++ b/dev-db/pgpool2/files/pgpool-4.2.0-configure-memcached.patch @@ -0,0 +1,60 @@ +diff -Naruw pgpool-II-4.2.0.orig/configure.ac pgpool-II-4.2.0/configure.ac +--- pgpool-II-4.2.0.orig/configure.ac 2020-11-25 20:25:42.000000000 -0500 ++++ pgpool-II-4.2.0/configure.ac 2020-12-16 06:36:26.051076452 -0500 +@@ -392,37 +392,24 @@ + fi + + +-AC_ARG_WITH(memcached, +- [ --with-memcached=DIR site header files for libmemcached in DIR], +- [ +- case "$withval" in +- "" | y | ye | yes | n | no) +- AC_MSG_ERROR([*** You must supply an argument to the --with-memcached option.]) +- ;; +- *) +- +- MEMCACHED_INCLUDE_DIR="$withval"/include +- MEMCACHED_LIB_DIR="$withval"/lib +- OLD_CFLAGS="$CFLAGS" +- CFLAGS="$CFLAGS -I$MEMCACHED_INCLUDE_DIR" ++AC_ARG_WITH([memcached], ++ AS_HELP_STRING([--with-memcached], [Build with memcached support])) ++AS_IF([test "x$with_memcached" = "xyes"], [ ++ PKG_CHECK_MODULES([MEMCACHED], [libmemcached]) ++ CFLAGS="$CFLAGS $MEMCACHED_CFLAGS" ++ LIBS="$LIBS $MEMCACHED_LIBS" ++ + AC_CHECK_HEADERS( + [libmemcached/memcached.h], + [AC_DEFINE([USE_MEMCACHED], 1, [Define to 1 to build with memcached support])], +- [AC_MSG_ERROR([header file <libmemcached/memcached.h> is required for memcached support])]) +- CFLAGS=$OLD_CFLAGS +- AC_CHECK_LIB(memcached, memcached_create, [], [AC_MSG_ERROR(libmemcached is not installed)]) +- MEMCACHED_INCLUDE_OPT="-I $MEMCACHED_INCLUDE_DIR" +- MEMCACHED_LINK_OPT="-L$MEMCACHED_LIB_DIR" +- MEMCACHED_RPATH_OPT="-rpath $MEMCACHED_LIB_DIR" +- ;; +- esac ++ [AC_MSG_ERROR([Couldn't find <libmemcached/memcached.h>])]) ++ ++ AC_SEARCH_LIBS(memcached_create, [], [], ++ [AC_MSG_ERROR(libmemcached is not installed)]) + ]) + + CFLAGS="$CFLAGS -fno-strict-aliasing" + +-AC_SUBST(MEMCACHED_INCLUDE_OPT) +-AC_SUBST(MEMCACHED_LINK_OPT) +-AC_SUBST(MEMCACHED_RPATH_OPT) + + OLD_LDFLAGS="$LDFLAGS" + LDFLAGS="-L$PGSQL_LIB_DIR $LDFLAGS" +@@ -435,7 +422,6 @@ + AC_SUBST(PGSQL_INCLUDE_DIR) + AC_SUBST(PGSQL_LIB_DIR) + AC_SUBST(PGSQL_BIN_DIR) +-AC_SUBST(MEMCACHED_DIR) + + # --enable(disable)-rpath option + AC_ARG_ENABLE(rpath, |