summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--project/config/cfgdefs.sh18
-rw-r--r--project/depends.mk4
-rw-r--r--project/pyexts.c4
-rw-r--r--project/pyexts.mk4
4 files changed, 19 insertions, 11 deletions
diff --git a/project/config/cfgdefs.sh b/project/config/cfgdefs.sh
index 8e304fd..eb58356 100644
--- a/project/config/cfgdefs.sh
+++ b/project/config/cfgdefs.sh
@@ -187,11 +187,6 @@ cfgdefs_perform_target_tests()
mb_cfgtest_makevar='LDFLAGS_NCURSES_STATIC'
cfgtest_makevar_append '$(LDFLAGS_NCURSES)'
- # ndbm
- cfgtest_newline
- cfgtest_comment 'ndbm'
- cfgtest_header_presence 'ndbm.h'
-
# openssl
cfgtest_newline
cfgtest_comment 'openssl/libressl'
@@ -244,6 +239,19 @@ cfgdefs_perform_target_tests()
mb_cfgtest_makevar='LDFLAGS_EXPAT_STATIC'
cfgtest_makevar_append '$(LDFLAGS_EXPAT)'
+ # ndbm
+ cfgtest_newline
+ cfgtest_comment 'ndbm'
+
+ mb_cfgtest_makevar='CFLAGS_DBM'
+ cfgtest_unit_header_presence 'ndbm.h'
+
+ mb_cfgtest_makevar='LDFLAGS_DBM'
+ cfgtest_makevar_append '-lgdbm_compat'
+
+ mb_cfgtest_makevar='LDFLAGS_DBM_STATIC'
+ cfgtest_makevar_append '$(LDFLAGS_DBM)'
+
# pretty cfgdefs.mk
cfgtest_newline
}
diff --git a/project/depends.mk b/project/depends.mk
index c96e4c2..4b0e3d1 100644
--- a/project/depends.mk
+++ b/project/depends.mk
@@ -1,12 +1,8 @@
# shared extensions: dependency switches
-CFLAGS_DBM +=
-LDFLAGS_DBM += -lgdbm_compat
-
CFLAGS_TCLTK += -DWITH_APPINIT
LDFLAGS_TCLTK += $(LDFLAGS_TCLTK_LIBS)
# static extensions: dependency switch
LDFLAGS_PYEXT_STATIC += -lssl -lcrypto -lgdbm -lreadline
LDFLAGS_PYEXT_STATIC += -lbz2 -lffi -lintl -llzma -lz
-LDFLAGS_DBM_STATIC += $(LDFLAGS_DBM)
LDFLAGS_TCLTK_STATIC += $(LDFLAGS_TCLTK)
diff --git a/project/pyexts.c b/project/pyexts.c
index 3a6197e..3456b4e 100644
--- a/project/pyexts.c
+++ b/project/pyexts.c
@@ -144,7 +144,9 @@ static const struct pyext_meta pyexts[] = {
"_decimal/libmpdec/sixstep",
"_decimal/libmpdec/transpose"),
- PYEXT_COMMON("_dbm",0,"-lgdbm_compat",
+ PYEXT_COMMON("_dbm",
+ "$(CFLAGS_DBM)",
+ "$(LDFLAGS_DBM)",
"_dbmmodule"),
PYEXT_COMMON("_gdbm",0,"-lgdbm",
diff --git a/project/pyexts.mk b/project/pyexts.mk
index d2ee7a9..753ef69 100644
--- a/project/pyexts.mk
+++ b/project/pyexts.mk
@@ -1583,11 +1583,13 @@ PYEXT_DBM_SRCS += pyext/obj/_dbmmodule.c
PYEXT_DBM_LOBJS = $(PYEXT_DBM_SRCS:.c=.lo)
PYEXT_DBM_OBJS = $(PYEXT_DBM_SRCS:.c=.o)
+$(PYEXT_DBM_LOBJS): CFLAGS_CONFIG += $(CFLAGS_DBM)
+$(PYEXT_DBM_OBJS): CFLAGS_CONFIG += $(CFLAGS_DBM)
PYEXT_DBM_SHARED = pyext/_dbm$(PYTHON_SOEXT)
PYEXT_DBM_STATIC = pyext/_dbm$(OS_ARCHIVE_EXT)
-$(PYEXT_DBM_SHARED): LDFLAGS_DYNEXT += -lgdbm_compat
+$(PYEXT_DBM_SHARED): LDFLAGS_DYNEXT += $(LDFLAGS_DBM)
$(PYEXT_DBM_SHARED): $(PYEXT_DBM_LOBJS)
$(PYEXT_DBM_STATIC): $(PYEXT_DBM_OBJS)