Skip to content

Commit

Permalink
auth: don't build .so for non-dyn modules
Browse files Browse the repository at this point in the history
  • Loading branch information
Habbie committed Sep 17, 2024
1 parent e12f877 commit 201e036
Show file tree
Hide file tree
Showing 13 changed files with 61 additions and 0 deletions.
13 changes: 13 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,19 @@ AS_IF([test "x$PACKAGEVERSION" != "x"],

export moduledirs moduleobjects modulelibs

AM_CONDITIONAL([BINDBACKEND_DYNMODULE], [echo $dynmodules | grep -w bind])
AM_CONDITIONAL([GEOIPBACKEND_DYNMODULE], [echo $dynmodules | grep -w geoip])
AM_CONDITIONAL([GMYSQLBACKEND_DYNMODULE], [echo $dynmodules | grep -w gmysql])
AM_CONDITIONAL([GODBCBACKEND_DYNMODULE], [echo $dynmodules | grep -w godbc])
AM_CONDITIONAL([GPGSQLBACKEND_DYNMODULE], [echo $dynmodules | grep -w gpgsql])
AM_CONDITIONAL([GSQLITE3BACKEND_DYNMODULE], [echo $dynmodules | grep -w gsqlite3])
AM_CONDITIONAL([LDAPBACKEND_DYNMODULE], [echo $dynmodules | grep -w ldap])
AM_CONDITIONAL([LMDBBACKEND_DYNMODULE], [echo $dynmodules | grep -w lmdb])
AM_CONDITIONAL([LUA2BACKEND_DYNMODULE], [echo $dynmodules | grep -w lua2])
AM_CONDITIONAL([PIPEBACKEND_DYNMODULE], [echo $dynmodules | grep -w pipe])
AM_CONDITIONAL([REMOTEBACKEND_DYNMODULE], [echo $dynmodules | grep -w remote])
AM_CONDITIONAL([TINYDNSBACKEND_DYNMODULE], [echo $dynmodules | grep -w tinydns])

AC_CONFIG_FILES([
Makefile
modules/Makefile
Expand Down
4 changes: 4 additions & 0 deletions modules/bindbackend/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,8 @@ libbindbackend_la_SOURCES = \
bindbackend2.cc bindbackend2.hh \
binddnssec.cc

if BINDBACKEND_DYNMODULE
libbindbackend_la_LDFLAGS = -module -avoid-version
else
libbindbackend_la_LDFLAGS = -static -avoid-version
endif
4 changes: 4 additions & 0 deletions modules/geoipbackend/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,9 @@ libgeoipbackend_la_SOURCES = \
geoipinterface-mmdb.cc \
geoipinterface.cc geoipinterface.hh

if GEOIPBACKEND_DYNMODULE
libgeoipbackend_la_LDFLAGS = -module -avoid-version
else
libgeoipbackend_la_LDFLAGS = -static -avoid-version
endif
libgeoipbackend_la_LIBADD = $(YAML_LIBS) $(GEOIP_LIBS) $(MMDB_LIBS) $(CXXFS_LIBS)
4 changes: 4 additions & 0 deletions modules/gmysqlbackend/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,9 @@ libgmysqlbackend_la_SOURCES = \
gmysqlbackend.cc gmysqlbackend.hh \
smysql.cc smysql.hh

if GMYSQLBACKEND_DYNMODULE
libgmysqlbackend_la_LDFLAGS = -module -avoid-version $(LIBCRYPTO_LDFLAGS) $(LIBSSL_LDFLAGS)
else
libgmysqlbackend_la_LDFLAGS = -static -avoid-version $(LIBCRYPTO_LDFLAGS) $(LIBSSL_LDFLAGS)
endif
libgmysqlbackend_la_LIBADD = $(MYSQL_LIBS)
4 changes: 4 additions & 0 deletions modules/godbcbackend/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,9 @@ libgodbcbackend_la_SOURCES = \
godbcbackend.cc godbcbackend.hh \
sodbc.cc sodbc.hh

if GODBCBACKEND_DYNMODULE
libgodbcbackend_la_LDFLAGS = -module -avoid-version
else
libgodbcbackend_la_LDFLAGS = -static -avoid-version
endif
libgodbcbackend_la_LIBADD = $(UNIXODBC_LIBS)
4 changes: 4 additions & 0 deletions modules/gpgsqlbackend/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,9 @@ libgpgsqlbackend_la_SOURCES = \
gpgsqlbackend.cc gpgsqlbackend.hh \
spgsql.cc spgsql.hh

if GPGSQLBACKEND_DYNMODULE
libgpgsqlbackend_la_LDFLAGS = -module -avoid-version
else
libgpgsqlbackend_la_LDFLAGS = -static -avoid-version
endif
libgpgsqlbackend_la_LIBADD = $(PGSQL_LIBS)
4 changes: 4 additions & 0 deletions modules/gsqlite3backend/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,8 @@ dist_doc_DATA = \

libgsqlite3backend_la_SOURCES = gsqlite3backend.cc gsqlite3backend.hh

if GSQLITE3BACKEND_DYNMODULE
libgsqlite3backend_la_LDFLAGS = -module -avoid-version
else
libgsqlite3backend_la_LDFLAGS = -static -avoid-version
endif
4 changes: 4 additions & 0 deletions modules/ldapbackend/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,9 @@ libldapbackend_la_SOURCES = \
primary.cc \
utils.hh

if LDAPBACKEND_DYNMODULE
libldapbackend_la_LDFLAGS = -module -avoid-version
else
libldapbackend_la_LDFLAGS = -static -avoid-version
endif
libldapbackend_la_LIBADD = $(LDAP_LIBS) $(KRB5_LIBS)
4 changes: 4 additions & 0 deletions modules/lmdbbackend/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@ liblmdbbackend_la_SOURCES = \
../../ext/lmdb-safe/lmdb-safe.hh ../../ext/lmdb-safe/lmdb-safe.cc \
../../ext/lmdb-safe/lmdb-typed.hh ../../ext/lmdb-safe/lmdb-typed.cc \
lmdbbackend.cc lmdbbackend.hh
if LMDBBACKEND_DYNMODULE
liblmdbbackend_la_LDFLAGS = -module -avoid-version $(BOOST_SERIALIZATION_LDFLAGS)
else
liblmdbbackend_la_LDFLAGS = -static -avoid-version $(BOOST_SERIALIZATION_LDFLAGS)
endif
liblmdbbackend_la_LIBADD = $(LMDB_LIBS) $(BOOST_SERIALIZATION_LIBS) $(SYSTEMD_LIBS)
4 changes: 4 additions & 0 deletions modules/lua2backend/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,9 @@ liblua2backend_la_SOURCES = \
lua2api2.hh lua2api2.cc \
lua2backend.cc lua2backend.hh

if LUA2BACKEND_DYNMODULE
liblua2backend_la_LDFLAGS = -module -avoid-version
else
liblua2backend_la_LDFLAGS = -static -avoid-version
endif
liblua2backend_la_LIBADD = $(LUA_LIBS)
4 changes: 4 additions & 0 deletions modules/pipebackend/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,9 @@ libpipebackend_la_SOURCES = \
coprocess.cc coprocess.hh \
pipebackend.cc pipebackend.hh

if PIPEBACKEND_DYNMODULE
libpipebackend_la_LDFLAGS = -module -avoid-version
else
libpipebackend_la_LDFLAGS = -static -avoid-version
endif

4 changes: 4 additions & 0 deletions modules/remotebackend/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ libremotebackend_la_SOURCES = \
unixconnector.cc \
zmqconnector.cc

if REMOTEBACKEND_DYNMODULE
libremotebackend_la_LDFLAGS = -module -avoid-version
else
libremotebackend_la_LDFLAGS = -static -avoid-version
endif

libremotebackend_la_LIBADD = $(YAHTTP_LIBS) $(JSON11_LIBS)

Expand Down
4 changes: 4 additions & 0 deletions modules/tinydnsbackend/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@ libtinydnsbackend_la_SOURCES = \
../../pdns/cdb.cc ../../pdns/cdb.hh \
tinydnsbackend.cc tinydnsbackend.hh

if TINYDNSBACKEND_DYNMODULE
libtinydnsbackend_la_LDFLAGS = -module -avoid-version $(LIBCRYPTO_LDFLAGS) $(LIBSSL_LDFLAGS)
else
libtinydnsbackend_la_LDFLAGS = -static -avoid-version $(LIBCRYPTO_LDFLAGS) $(LIBSSL_LDFLAGS)
endif
libtinydnsbackend_la_LIBADD = $(CDB_LIBS)

0 comments on commit 201e036

Please sign in to comment.