Skip to content

Commit 581594d

Browse files
committed
fix(native_comp): add support for new --with-native-compilation flag
1 parent bdad382 commit 581594d

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

build-emacs-for-macos

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,12 +180,18 @@ class Build
180180
@configure_help
181181
end
182182

183+
def supports_xwidgets?
184+
@supports_xwidgets ||= !!configure_help.match(/\s+--with-xwidgets\s+/)
185+
end
186+
183187
def supports_native_comp?
184-
@supports_native_comp ||= !!configure_help.match(/\s+--with-nativecomp\s+/)
188+
@supports_native_comp ||= !native_comp_configure_flag.nil?
185189
end
186190

187-
def supports_xwidgets?
188-
@supports_xwidgets ||= !!configure_help.match(/\s+--with-xwidgets\s+/)
191+
def native_comp_configure_flag
192+
@native_comp_configure_flag ||= configure_help.match(
193+
/\s+(--with-native(?:comp|-compilation))\s+/
194+
)&.[](1)
189195
end
190196

191197
def detect_native_comp
@@ -292,7 +298,7 @@ class Build
292298
if options[:xwidgets] && supports_xwidgets?
293299
configure_flags << '--with-xwidgets'
294300
end
295-
configure_flags << '--with-nativecomp' if options[:native_comp]
301+
configure_flags << native_comp_configure_flag if options[:native_comp]
296302
configure_flags << '--without-rsvg' unless options[:rsvg]
297303

298304
run_cmd './configure', *configure_flags

0 commit comments

Comments
 (0)