--- /var/lib/gems/3.1.0/gems/tk-0.5.0/ext/tk/extconf.rb 2023-12-19 00:08:20.699947884 -0500 +++ ./extconf.rb 2023-12-19 04:26:03.475074114 -0500 @@ -47,7 +47,7 @@ old_config_list_file = config_list_file end -current_configs = {'with'=>{}, 'enable'=>{}} +current_configs = {'with'=>{}, 'without'=>{}, 'enable'=>{}, 'disable'=>{}} # setup keys by config_list.in IO.foreach(config_list_file_source){|line| @@ -73,15 +73,27 @@ update_flag = false current_configs['with'].each_key{|key| - if (value = with_config(key).to_s) != current_configs['with'][key] + if with_config(key).nil? update_flag = true - current_configs['with'][key] = value + $configure_args["--with-"+key] = current_configs['with'][key] || true + end +} +current_configs['without'].each_key{|key| + if with_config(key).nil? + update_flag = true + $configure_args["--without-"+key] = current_configs['without'][key] || true + end +} +current_configs['disable'].each_key{|key| + if enable_config(key).nil? + update_flag = true + $configure_args["--disable-"+key] = current_configs['disable'][key] || true end } current_configs['enable'].each_key{|key| - if (value = enable_config(key).to_s) != current_configs['enable'][key] + if enable_config(key).nil? update_flag = true - current_configs['enable'][key] = value + $configure_args["--enable-"+key] = current_configs['enable'][key] || true end } @@ -89,7 +101,7 @@ if update_flag || !File.exist?(config_list_file) open(config_list_file, 'w'){|fobj| fobj.print("# values of current configure options (generated by extconf.rb)\n"); - ['with', 'enable'].each{|mode| + ['with','without','enable','disable'].each{|mode| current_configs[mode].each_key{|key| fobj.print("#{mode} #{key} #{current_configs[mode][key]}\n") }