From 213adb393897e808fd60097dc9882e448f877d9d Mon Sep 17 00:00:00 2001 From: bebopagogo Date: Mon, 1 Feb 2021 09:52:50 -0500 Subject: [PATCH] updated wf wscript to check for existence of ctx.options.enable_static_library attribute before trying access it --- wscript | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/wscript b/wscript index 9b86062..b80c936 100644 --- a/wscript +++ b/wscript @@ -223,10 +223,11 @@ def build(ctx): # Add additional static compilation dependencies based on the system. # libpcap is used by protolib on GNU/Hurd based systems. static_libs = '' - if ctx.options.enable_static_library: - static_libs += ' -lstdc++ -lprotokit' - if system == "gnu": - static_libs += ' -lpcap' + if hasattr(ctx.options, 'enable_static_library'): + if ctx.options.enable_static_library: + static_libs += ' -lstdc++ -lprotokit' + if system == "gnu": + static_libs += ' -lpcap' ctx(source='norm.pc.in', STATIC_LIBS = static_libs) def _make_simple_example(ctx, name, path='examples'):