From: Michael Wallner Date: Thu, 20 Oct 2016 06:45:12 +0000 (+0200) Subject: configure: add -lgdbm if needed for ndbm support X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=5ed7e51eb19a16f6f4e280abc33a2a4281b45166;p=m6w6%2Fext-psi configure: add -lgdbm if needed for ndbm support --- 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