From 5ed7e51eb19a16f6f4e280abc33a2a4281b45166 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Thu, 20 Oct 2016 08:45:12 +0200 Subject: [PATCH] configure: add -lgdbm if needed for ndbm support --- m4/posix/ndbm.m4 | 4 ++++ m4/psi/psi.m4 | 6 ------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/m4/posix/ndbm.m4 b/m4/posix/ndbm.m4 index bd2617b..7b04504 100644 --- a/m4/posix/ndbm.m4 +++ b/m4/posix/ndbm.m4 @@ -2,6 +2,10 @@ PSI_CHECK_NDBM() { PSI_CONFIG_POSIX(ndbm, ndbm.h gdbm-ndbm.h) PHP_CHECK_FUNC(dbm_open, gdbm_compat) + # See http://www.gnu.org.ua/software/gdbm/manual/html_section/gdbm_19.html + if expr X"$LIBS" : "X.*-lgdbm_compat" >/dev/null; then + LIBS="-lgdbm $LIBS" + fi PSI_STRUCT(datum, [ void *dptr, diff --git a/m4/psi/psi.m4 b/m4/psi/psi.m4 index dbe3def..6b3668e 100644 --- a/m4/psi/psi.m4 +++ b/m4/psi/psi.m4 @@ -110,12 +110,6 @@ AC_DEFUN(PSI_CONFIG_DONE, [ /* generated by configure */ #ifndef _PSI_STDINC # define _PSI_STDINC -#ifndef _GNU_SOURCE -# define _GNU_SOURCE -#endif -#ifndef _XOPEN_SOURCE -# define _XOPEN_SOURCE -#endif PSI_INCLUDES #endif EOF -- 2.30.2