| skipped 24 lines |
25 | 25 | | |
26 | 26 | | ############################################################################### |
27 | 27 | | # Add any user options here |
28 | | - | options { |
| 28 | + | set valid_options { |
29 | 29 | | # Curses |
30 | 30 | | with-ncurses:path => "Location of ncurses" |
31 | 31 | | # Features w/o 3rd party dependencies |
| skipped 98 lines |
130 | 130 | | debug-parse-test=0 => "DEBUG: Enable 'neomutt -T' for config testing" |
131 | 131 | | debug-queue=0 => "DEBUG: Enable TAILQ debugging" |
132 | 132 | | debug-window=0 => "DEBUG: Enable windows dump" |
133 | | - | # Deprecated stuff |
134 | | - | pkgconf:=deprecated => "Deprecated" |
135 | | - | with-slang:deprecated => "Deprecated" |
136 | | - | with-ui:=deprecated => "Deprecated" |
137 | | - | with-gpgme:deprecated => "Deprecated" |
| 133 | + | } |
| 134 | + | |
| 135 | + | set deprecated_options { |
| 136 | + | pkgconf:= |
| 137 | + | with-slang: |
| 138 | + | with-ui:= |
| 139 | + | with-gpgme: |
| 140 | + | } |
| 141 | + | |
| 142 | + | foreach dep $deprecated_options { |
| 143 | + | append valid_options "${dep}deprecated => Deprecated\n" |
138 | 144 | | } |
| 145 | + | |
| 146 | + | options $valid_options |
139 | 147 | | ############################################################################### |
140 | 148 | | |
141 | 149 | | ############################################################################### |
142 | | - | # Deprecated config options |
143 | | - | foreach dep {with-ui with-slang pkgconf with-gpgme} { |
144 | | - | if {[opt-bool -nodefault $dep] != -1} { |
145 | | - | user-notice "\nThe configure option \"--$dep\" is not used anymore\n" |
| 150 | + | # Issue a warning for deprecated options on the command line |
| 151 | + | set notices {} |
| 152 | + | foreach dep $deprecated_options { |
| 153 | + | lassign [split $dep :] name |
| 154 | + | if {[opt-bool -nodefault $name] != -1} { |
| 155 | + | lappend notices --$name |
146 | 156 | | } |
| 157 | + | } |
| 158 | + | if {[llength $notices]} { |
| 159 | + | user-notice "\nThe following options are deprecated: [join $notices {, }]\n" |
147 | 160 | | } |
148 | 161 | | ############################################################################### |
149 | 162 | | |
| skipped 1072 lines |