+if (defined $opt_portable) {
+ print_error '--portable and --system can not be used together!' if defined $opt_system;
+ $config{DESTDIR} = catfile $RealDir, 'run', '';
+ $config{BASE_DIR} = $opt_prefix // '';
+ $config{BINARY_DIR} = $opt_binary_dir // 'bin';
+ $config{CONFIG_DIR} = $opt_config_dir // 'conf';
+ $config{DATA_DIR} = $opt_data_dir // 'data';
+ $config{EXAMPLE_DIR} = $opt_example_dir // catdir $config{CONFIG_DIR}, 'examples';
+ $config{LOG_DIR} = $opt_log_dir // 'logs';
+ $config{MANUAL_DIR} = $opt_manual_dir // 'manuals';
+ $config{MODULE_DIR} = $opt_module_dir // 'modules';
+ $config{SCRIPT_DIR} = $opt_script_dir // $config{BASE_DIR};
+} elsif (defined $opt_system) {