X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=m4%2Fposix%2Fndbm.m4;h=9cbd6484333a0edf8262c04f175d287c72dd609f;hb=8d1d1243a8a42b0046ac670808913b3bb06c994b;hp=bd2617b60e9cffc0ae8bcf7531ebbe6ed87f7930;hpb=a78817d6e2da0be5942dd8e1d334789e9e88ffa3;p=m6w6%2Fext-psi diff --git a/m4/posix/ndbm.m4 b/m4/posix/ndbm.m4 index bd2617b..9cbd648 100644 --- a/m4/posix/ndbm.m4 +++ b/m4/posix/ndbm.m4 @@ -1,7 +1,4 @@ PSI_CHECK_NDBM() { - PSI_CONFIG_POSIX(ndbm, ndbm.h gdbm-ndbm.h) - - PHP_CHECK_FUNC(dbm_open, gdbm_compat) PSI_STRUCT(datum, [ void *dptr, @@ -13,13 +10,18 @@ PSI_CHECK_NDBM() { PSI_CONST(DBM_INSERT, int) PSI_CONST(DBM_REPLACE, int) - PSI_DECL(void dbm_clearerr, [(DBM *db)]) - PSI_DECL(void dbm_close, [(DBM *db)]) - PSI_DECL(int dbm_delete, [(DBM *db, datum key)]) - PSI_DECL(int dbm_error, [(DBM *db)]) - PSI_DECL(datum dbm_fetch, [(DBM *db, datum key)]) - PSI_DECL(datum dbm_firstkey, [(DBM *db)]) - PSI_DECL(datum dbm_nextkey, [(DBM *db)]) - PSI_DECL(DBM *dbm_open, [(char *file, int open_flags, mode_t file_mode)]) - PSI_DECL(int dbm_store, [(DBM *db, datum key, datum content, int store_mode)]) + PSI_DECL(void dbm_clearerr, [(DBM *db)], [], [-lqdbm -lgdbm_compat]) + PSI_DECL(void dbm_close, [(DBM *db)], [], [-lqdbm -lgdbm_compat]) + PSI_DECL(int dbm_delete, [(DBM *db, datum key)], [], [-lqdbm -lgdbm_compat]) + PSI_DECL(int dbm_error, [(DBM *db)], [], [-lqdbm -lgdbm_compat]) + PSI_DECL(datum dbm_fetch, [(DBM *db, datum key)], [], [-lqdbm -lgdbm_compat]) + PSI_DECL(datum dbm_firstkey, [(DBM *db)], [], [-lqdbm -lgdbm_compat]) + PSI_DECL(datum dbm_nextkey, [(DBM *db)], [], [-lqdbm -lgdbm_compat]) + PSI_DECL(DBM *dbm_open, [(char *file, int open_flags, mode_t file_mode)], [], [-lqdbm -lgdbm_compat]) + PSI_DECL(int dbm_store, [(DBM *db, datum key, datum content, int store_mode)], [], [-lqdbm -lgdbm_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 } \ No newline at end of file