Skip to content

Commit

Permalink
autotools: use log4net binary bundling if macOS (Darwin)
Browse files Browse the repository at this point in the history
  • Loading branch information
knocte committed Apr 11, 2020
1 parent ea02c16 commit bdbfb26
Show file tree
Hide file tree
Showing 12 changed files with 94 additions and 25 deletions.
7 changes: 6 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,12 @@ fi
AC_SUBST(XBUILD_FLAGS)

# Required Libraries
PKG_CHECK_MODULES([LOG4NET], [log4net])
if test "x$(uname)" != "xDarwin"; then
PKG_CHECK_MODULES([LOG4NET], [log4net])
AM_CONDITIONAL([BUNDLE_LOG4NET], false)
else
AM_CONDITIONAL([BUNDLE_LOG4NET], true)
fi
PKG_CHECK_MODULES([NUNIT], [nunit])

PKG_CHECK_EXISTS([nini-1.1], FOUND_NINI=yes, FOUND_NINI=no)
Expand Down
12 changes: 8 additions & 4 deletions src/Common/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ COMPILE_TARGET = library
PROJECT_REFERENCES =
BUILD_DIR = ../../bin/release

LOG4NET_DLL_SOURCE=../../lib/log4net.dll

endif

if ENABLE_DEBUG
Expand All @@ -31,10 +29,16 @@ SMUXI_COMMON_DLL=$(ASSEMBLY)
SMUXI_COMMON_DLL_SOURCE=$(ASSEMBLY)
SMUXI_COMMON_DLL_MDB=$(ASSEMBLY_MDB)
SMUXI_COMMON_DLL_MDB_SOURCE=$(ASSEMBLY_MDB)
LOG4NET_DLL_SOURCE=../../lib/log4net.dll

endif

if BUNDLE_LOG4NET
LOG4NET_DLL_SOURCE=../../lib/log4net.dll
LOG4NET_REF_LIBS=-r:$(LOG4NET_DLL_SOURCE)
else
LOG4NET_REF_LIBS=$(LOG4NET_LIBS)
endif

AL=al2
SATELLITE_ASSEMBLY_NAME=.resources.dll

Expand Down Expand Up @@ -104,7 +108,7 @@ $(build_resx_resources) : %.resources: %.resx

$(ASSEMBLY) $(ASSEMBLY_MDB): $(build_sources) $(build_resources) $(build_datafiles) $(DLL_REFERENCES) $(PROJECT_REFERENCES) $(build_xamlg_list) $(build_satellite_assembly_list)
mkdir -p $(dir $(ASSEMBLY))
$(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref) $(LOG4NET_LIBS)
$(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref) $(LOG4NET_REF_LIBS)

generate-emojione:
wget -O $(top_srcdir)/lib/emoji_raw.json https://raw.githubusercontent.com/emojione/emojione/2.2.7/emoji.json
Expand Down
11 changes: 8 additions & 3 deletions src/Engine-IRC/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ PROJECT_REFERENCES = \
BUILD_DIR = ../../bin/release

SMUXI_ENGINE_DLL_MDB=
LOG4NET_DLL_SOURCE=../../lib/log4net.dll
NINI_DLL_SOURCE=../../lib/Nini.dll
SMUXI_ENGINE_DLL_SOURCE=../../bin/release/smuxi-engine.dll
SMUXI_COMMON_DLL_SOURCE=../../bin/release/smuxi-common.dll
Expand All @@ -35,13 +34,19 @@ BUILD_DIR = ../../bin/debug

SMUXI_ENGINE_DLL_MDB_SOURCE=../../bin/debug/smuxi-engine.dll.mdb
SMUXI_ENGINE_DLL_MDB=$(BUILD_DIR)/smuxi-engine.dll.mdb
LOG4NET_DLL_SOURCE=../../lib/log4net.dll
NINI_DLL_SOURCE=../../lib/Nini.dll
SMUXI_ENGINE_DLL_SOURCE=../../bin/debug/smuxi-engine.dll
SMUXI_COMMON_DLL_SOURCE=../../bin/debug/smuxi-common.dll

endif

if BUNDLE_LOG4NET
LOG4NET_DLL_SOURCE=../../lib/log4net.dll
LOG4NET_REF_LIBS=-r:$(LOG4NET_DLL_SOURCE)
else
LOG4NET_REF_LIBS=$(LOG4NET_LIBS)
endif

AL=al2
SATELLITE_ASSEMBLY_NAME=.resources.dll

Expand Down Expand Up @@ -80,7 +85,7 @@ REFERENCES = \
System \
System.Core \
Mono.Posix \
$(LOG4NET_LIBS)
$(LOG4NET_REF_LIBS)

DLL_REFERENCES = \
$(BUILD_DIR)/Meebey.SmartIrc4net.dll
Expand Down
9 changes: 8 additions & 1 deletion src/Engine-JabbR/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
if BUNDLE_LOG4NET
LOG4NET_DLL_SOURCE=../../lib/log4net.dll
LOG4NET_REF_LIBS=-r:$(LOG4NET_DLL_SOURCE)
else
LOG4NET_REF_LIBS=$(LOG4NET_LIBS)
endif

TARGET_DIR = $(top_builddir)/bin/$(PROFILE)
ASSEMBLY_NAME = smuxi-engine-jabbr
ASSEMBLY_FILENAME = $(ASSEMBLY_NAME).dll
Expand All @@ -13,7 +20,7 @@ REFERENCES = \
System \
System.Web \
Mono.Posix \
$(LOG4NET_LIBS)
$(LOG4NET_REF_LIBS)

DLL_REFERENCES = \
$(TARGET_DIR)/smuxi-common.dll \
Expand Down
9 changes: 8 additions & 1 deletion src/Engine-MessageBuffer/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
if BUNDLE_LOG4NET
LOG4NET_DLL_SOURCE=../../lib/log4net.dll
LOG4NET_REF_LIBS=-r:$(LOG4NET_DLL_SOURCE)
else
LOG4NET_REF_LIBS=$(LOG4NET_LIBS)
endif

TARGET_DIR = $(top_builddir)/bin/$(PROFILE)
BIN_WRAPPER = smuxi-message-buffer
ASSEMBLY_NAME = smuxi-message-buffer
Expand All @@ -15,7 +22,7 @@ REFERENCES = \
System \
System.Core \
Mono.Posix \
$(LOG4NET_LIBS)
$(LOG4NET_REF_LIBS)

DLL_REFERENCES = \
$(TARGET_DIR)/smuxi-common.dll \
Expand Down
9 changes: 8 additions & 1 deletion src/Engine-Twitter/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
if BUNDLE_LOG4NET
LOG4NET_DLL_SOURCE=../../lib/log4net.dll
LOG4NET_REF_LIBS=-r:$(LOG4NET_DLL_SOURCE)
else
LOG4NET_REF_LIBS=$(LOG4NET_LIBS)
endif

TARGET_DIR = $(top_builddir)/bin/$(PROFILE)
ASSEMBLY_NAME = smuxi-engine-twitter
ASSEMBLY_FILENAME = $(ASSEMBLY_NAME).dll
Expand All @@ -11,7 +18,7 @@ SOURCES = \
Protocols/Twitter/TwitterMessageBuilder.cs \
Protocols/Twitter/TwitterSearchStream.cs

REFERENCES = $(LOG4NET_LIBS) \
REFERENCES = $(LOG4NET_REF_LIBS) \
$(SMARTIRC4NET_LIBS) \
System.Web \
System.Core
Expand Down
9 changes: 8 additions & 1 deletion src/Engine-XMPP/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
if BUNDLE_LOG4NET
LOG4NET_DLL_SOURCE=../../lib/log4net.dll
LOG4NET_REF_LIBS=-r:$(LOG4NET_DLL_SOURCE)
else
LOG4NET_REF_LIBS=$(LOG4NET_LIBS)
endif

TARGET_DIR = $(top_builddir)/bin/$(PROFILE)
ASSEMBLY_NAME = smuxi-engine-xmpp
ASSEMBLY_FILENAME = $(ASSEMBLY_NAME).dll
Expand All @@ -15,7 +22,7 @@ REFERENCES = \
System \
System.Core \
Mono.Posix \
$(LOG4NET_LIBS)
$(LOG4NET_REF_LIBS)

DLL_REFERENCES = \
$(TARGET_DIR)/smuxi-common.dll \
Expand Down
11 changes: 8 additions & 3 deletions src/Engine/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ PROJECT_REFERENCES = \
../../bin/release/smuxi-common.dll
BUILD_DIR = ../../bin/release

LOG4NET_DLL_SOURCE=../../lib/log4net.dll
SMUXI_COMMON_DLL_SOURCE=../../bin/release/smuxi-common.dll

endif
Expand All @@ -30,11 +29,17 @@ PROJECT_REFERENCES = \
../../bin/debug/smuxi-common.dll
BUILD_DIR = ../../bin/debug

LOG4NET_DLL_SOURCE=../../lib/log4net.dll
SMUXI_COMMON_DLL_SOURCE=../../bin/debug/smuxi-common.dll

endif

if BUNDLE_LOG4NET
LOG4NET_DLL_SOURCE=../../lib/log4net.dll
LOG4NET_REF_LIBS=-r:$(LOG4NET_DLL_SOURCE)
else
LOG4NET_REF_LIBS=$(LOG4NET_LIBS)
endif

AL=al2
SATELLITE_ASSEMBLY_NAME=.resources.dll

Expand Down Expand Up @@ -135,7 +140,7 @@ REFERENCES = \
Mono.Posix \
Mono.Data.Sqlite \
$(NINI_LIBS) \
$(LOG4NET_LIBS) \
$(LOG4NET_REF_LIBS) \
$(DB4O_LIBS) \
$(DB4O_INCLUDED_LIBS)

Expand Down
11 changes: 8 additions & 3 deletions src/Frontend-GNOME-IRC/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ SMUXI_ENGINE_DLL_MDB=
SMUXI_FRONTEND_DLL_MDB=
SMUXI_FRONTEND_GNOME_EXE_SOURCE=../../bin/release/smuxi-frontend-gnome.exe
NINI_DLL_SOURCE=../../lib/Nini.dll
LOG4NET_DLL_SOURCE=../../lib/log4net.dll
SMUXI_ENGINE_DLL_SOURCE=../../bin/release/smuxi-engine.dll

endif
Expand Down Expand Up @@ -60,11 +59,17 @@ SMUXI_FRONTEND_DLL_MDB_SOURCE=../../bin/debug/smuxi-frontend.dll.mdb
SMUXI_FRONTEND_DLL_MDB=$(BUILD_DIR)/smuxi-frontend.dll.mdb
SMUXI_FRONTEND_GNOME_EXE_SOURCE=../../bin/debug/smuxi-frontend-gnome.exe
NINI_DLL_SOURCE=../../lib/Nini.dll
LOG4NET_DLL_SOURCE=../../lib/log4net.dll
SMUXI_ENGINE_DLL_SOURCE=../../bin/debug/smuxi-engine.dll

endif

if BUNDLE_LOG4NET
LOG4NET_DLL_SOURCE=../../lib/log4net.dll
LOG4NET_REF_LIBS=-r:$(LOG4NET_DLL_SOURCE)
else
LOG4NET_REF_LIBS=$(LOG4NET_LIBS)
endif

AL=al2
SATELLITE_ASSEMBLY_NAME=.resources.dll

Expand Down Expand Up @@ -138,4 +143,4 @@ $(build_resx_resources) : %.resources: %.resx

$(ASSEMBLY) $(ASSEMBLY_MDB): $(build_sources) $(build_resources) $(build_datafiles) $(DLL_REFERENCES) $(PROJECT_REFERENCES) $(build_xamlg_list) $(build_satellite_assembly_list)
mkdir -p $(dir $(ASSEMBLY))
$(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref) $(LOG4NET_LIBS)
$(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref) $(LOG4NET_REF_LIBS)
9 changes: 8 additions & 1 deletion src/Frontend-GNOME/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ PROJECT_REFERENCES = \
BUILD_DIR = ../../bin/debug

LOG4NET_DLL_SOURCE=../../lib/log4net.dll

if BUNDLE_LOG4NET
LOG4NET_REF_LIBS=-r:$(LOG4NET_DLL_SOURCE)
else
LOG4NET_REF_LIBS=$(LOG4NET_LIBS)
endif

SMUXI_ENGINE_DLL_MDB_SOURCE=../../bin/debug/smuxi-engine.dll.mdb
SMUXI_ENGINE_DLL_MDB=$(BUILD_DIR)/smuxi-engine.dll.mdb
NINI_DLL_SOURCE=../../lib/Nini.dll
Expand Down Expand Up @@ -242,7 +249,7 @@ REFERENCES = \
$(GLADE_SHARP_20_LIBS) \
$(GTK_SHARP_20_LIBS) \
$(GIO_SHARP_LIBS) \
$(LOG4NET_LIBS) \
$(LOG4NET_REF_LIBS) \
$(INDICATE_SHARP_LIBS) \
$(MESSAGINGMENU_SHARP_LIBS) \
$(MESSAGINGMENU_SHARP_INCLUDED_LIBS) \
Expand Down
11 changes: 8 additions & 3 deletions src/Frontend/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ PROJECT_REFERENCES = \
../../bin/release/smuxi-common.dll
BUILD_DIR = ../../bin/release

LOG4NET_DLL_SOURCE=../../lib/log4net.dll
SMUXI_ENGINE_DLL_MDB=
NINI_DLL_SOURCE=../../lib/Nini.dll
SMUXI_ENGINE_DLL_SOURCE=../../bin/release/smuxi-engine.dll
Expand All @@ -34,7 +33,6 @@ PROJECT_REFERENCES = \
../../bin/debug/smuxi-common.dll
BUILD_DIR = ../../bin/debug

LOG4NET_DLL_SOURCE=../../lib/log4net.dll
SMUXI_ENGINE_DLL_MDB_SOURCE=../../bin/debug/smuxi-engine.dll.mdb
SMUXI_ENGINE_DLL_MDB=$(BUILD_DIR)/smuxi-engine.dll.mdb
NINI_DLL_SOURCE=../../lib/Nini.dll
Expand All @@ -43,6 +41,13 @@ SMUXI_COMMON_DLL_SOURCE=../../bin/debug/smuxi-common.dll

endif

if BUNDLE_LOG4NET
LOG4NET_DLL_SOURCE=../../lib/log4net.dll
LOG4NET_REF_LIBS=-r:$(LOG4NET_DLL_SOURCE)
else
LOG4NET_REF_LIBS=$(LOG4NET_LIBS)
endif

AL=al2
SATELLITE_ASSEMBLY_NAME=.resources.dll

Expand Down Expand Up @@ -112,4 +117,4 @@ $(build_resx_resources) : %.resources: %.resx

$(ASSEMBLY) $(ASSEMBLY_MDB): $(build_sources) $(build_resources) $(build_datafiles) $(DLL_REFERENCES) $(PROJECT_REFERENCES) $(build_xamlg_list) $(build_satellite_assembly_list)
mkdir -p $(dir $(ASSEMBLY))
$(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref) $(LOG4NET_LIBS)
$(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref) $(LOG4NET_REF_LIBS)
11 changes: 8 additions & 3 deletions src/Server/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ PROJECT_REFERENCES = \
../../bin/release/smuxi-engine.dll
BUILD_DIR = ../../bin/release

LOG4NET_DLL_SOURCE=../../lib/log4net.dll
SMUXI_ENGINE_DLL_MDB=
NINI_DLL_SOURCE=../../lib/Nini.dll
SMUXI_ENGINE_DLL_SOURCE=../../bin/release/smuxi-engine.dll
Expand All @@ -40,7 +39,6 @@ PROJECT_REFERENCES = \
../../bin/debug/smuxi-engine.dll
BUILD_DIR = ../../bin/debug

LOG4NET_DLL_SOURCE=../../lib/log4net.dll
SMUXI_ENGINE_DLL_MDB_SOURCE=../../bin/debug/smuxi-engine.dll.mdb
SMUXI_ENGINE_DLL_MDB=$(BUILD_DIR)/smuxi-engine.dll.mdb
NINI_DLL_SOURCE=../../lib/Nini.dll
Expand All @@ -50,6 +48,13 @@ SMUXI_COMMON_DLL_SOURCE=../../bin/debug/smuxi-common.dll

endif

if BUNDLE_LOG4NET
LOG4NET_DLL_SOURCE=../../lib/log4net.dll
LOG4NET_REF_LIBS=-r:$(LOG4NET_DLL_SOURCE)
else
LOG4NET_REF_LIBS=$(LOG4NET_LIBS)
endif

AL=al2
SATELLITE_ASSEMBLY_NAME=.resources.dll

Expand Down Expand Up @@ -112,4 +117,4 @@ $(build_resx_resources) : %.resources: %.resx

$(ASSEMBLY) $(ASSEMBLY_MDB): $(build_sources) $(build_resources) $(build_datafiles) $(DLL_REFERENCES) $(PROJECT_REFERENCES) $(build_xamlg_list) $(build_satellite_assembly_list)
mkdir -p $(dir $(ASSEMBLY))
$(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref) $(LOG4NET_LIBS)
$(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref) $(LOG4NET_REF_LIBS)

0 comments on commit bdbfb26

Please sign in to comment.