aboutsummaryrefslogtreecommitdiffstats
path: root/langs/th/index.po
blob: 0b9caa23e00659899d18c3f2d5c1c9db086f3dc7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
# gettext catalog for index web page(s)
# Copyright (C) 2014 - 2015 Mageia
# This file is distributed under the same license as
# the content of the corresponding web page(s).
#
# Generated by extract2gettext.php
# Domain: index
#
# include translation strings from:
# en/index.php
#
# Translators:
# Rockers <sumorock@hotmail.com>, 2015
msgid ""
msgstr ""
"Project-Id-Version: Mageia\n"
"Report-Msgid-Bugs-To: mageia-i18n@mageia.org\n"
"POT-Creation-Date: 2019-07-16 19:18:35+0200\n"
"PO-Revision-Date: 2015-07-21 17:25+0000\n"
"Last-Translator: Rockers <sumorock@hotmail.com>\n"
"Language-Team: Thai (http://www.transifex.com/projects/p/mageia/language/th/)\n"
"Language: th\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"

#: "/web/en/index.php +14"
msgid "Home of the Mageia project"
msgstr "บ้านของโครงการ Mageia"

#: "/web/en/index.php +15"
msgid "Mageia is a community-based Linux distribution, for desktop & server."
msgstr "Mageia เป็นดิสทริบิวชันของ Linux จากชุมชนสำหรับเดสก์ท็อปและเซิร์ฟเวอร์"

#: "/web/en/index.php +16"
msgid "linux, mageia, free software, operating system, computer, laptop, desktop, server, headless, device, mobile, mandriva, mandrake"
msgstr ""

#: "/web/en/index.php +23"
msgid "Mageia Blog (English)"
msgstr "บล็อก Mageia (ภาษาอังกฤษ)"

#: "/web/en/index.php +23"
msgid "https://blog.mageia.org/en/?feed=rss"
msgstr "https://blog.mageia.org/en/?feed=rss"

#: "/web/en/index.php +225"
msgid "Mageia, a free, community-based Linux distribution for desktop & server."
msgstr "Mageia เป็นดิสทริบิวชันของ Linux ฟรีจากชุมชนสำหรับเดสก์ท็อปและเซิร์ฟเวอร์"

#: "/web/en/index.php +233"
msgid "https://planet.mageia.org/en/"
msgstr "https://planet.mageia.org/en/"

#: "/web/en/index.php +234"
msgid "https://blog.mageia.org/en/"
msgstr "https://blog.mageia.org/en/"

#: "/web/en/index.php +246"
#, fuzzy
msgid "Latest news from our <a href=\"%s\">localized planet</a>:"
msgstr "ข่าวล่าสุดจาก <a href=\"%s\">บล็อก</a> ของเรา:"

#: "/web/en/index.php +248"
#, fuzzy
msgid "Latest news from our <a href=\"%s\">localized blog</a>:"
msgstr "ข่าวล่าสุดจาก <a href=\"%s\">บล็อก</a> ของเรา:"

#: "/web/en/index.php +250"
#, fuzzy
msgid "Latest news from our <a href=\"%s\">English planet</a>:"
msgstr "ข่าวล่าสุดจาก <a href=\"%s\">บล็อก</a> ของเรา:"

#: "/web/en/index.php +252"
#, fuzzy
msgid "Latest news from our <a href=\"%s\">English blog</a>:"
msgstr "ข่าวล่าสุดจาก <a href=\"%s\">บล็อก</a> ของเรา:"

#: "/web/en/index.php +267"
msgid "Change your perspective"
msgstr ""

#: "/web/en/index.php +269"
msgid "Stable, secure operating system for desktop &amp; server"
msgstr "ระบบปฏิบัติการที่ปลอดภัยและเสถียรสำหรับเดสก์ท็อปและเซิร์ฟเวอร์"

#: "/web/en/index.php +270"
msgid "Free Software, coproduced by hundreds of people"
msgstr ""

#: "/web/en/index.php +271"
msgid "Elected governance, nonprofit organization"
msgstr ""

#: "/web/en/index.php +272"
msgid "You can be part of it"
msgstr "คุณสามารถเป็นส่วนหนึ่งของมันได้"

#: "/web/en/index.php +281"
#, fuzzy
msgid "Mageia 7.1"
msgstr "Mageia 5"

#: "/web/en/index.php +281"
#, fuzzy
msgid "Mageia 7.2"
msgstr "Mageia 5"

#: "/web/en/index.php +282"
#, fuzzy
msgid "released in July 2019"
msgstr "ออกเมื่อเดือนมิถุนายน 2015"

#: "/web/en/index.php +286"
msgid "<a href=\"%s\" hreflang=\"en\">Release notes</a>"
msgstr "<a href=\"%s\" hreflang=\"en\">บันทึกประจำรุ่น</a>"

#: "/web/en/index.php +286"
#, fuzzy
msgid "https://wiki.mageia.org/en/Mageia_7_Release_Notes"
msgstr "https://wiki.mageia.org/en/Mageia_5_Release_Notes"

#: "/web/en/index.php +287"
msgid "<a href=\"%s\" hreflang=\"en\">errata</a>"
msgstr ""

#: "/web/en/index.php +287"
#, fuzzy
msgid "https://wiki.mageia.org/en/Mageia_7_Errata"
msgstr "https://wiki.mageia.org/en/Mageia_5_Errata"

#: "/web/en/index.php +292"
msgid "<strong>Get involved</strong> in the next version"
msgstr ""

#: "/web/en/index.php +294"
msgid "Test"
msgstr "ทดสอบ"

#, fuzzy
#~ msgid "Mageia 7"
#~ msgstr "Mageia 5"

#~ msgid "Support"
#~ msgstr "สนับสนุน"

#~ msgid "Community"
#~ msgstr "ชุมชน"

#~ msgid "About&nbsp;Mageia.Org"
#~ msgstr "เกี่ยวกับ%nbsp;Mageia.Org"

#~ msgid "Privacy policy"
#~ msgstr "นโยบายส่วนบุคคล"
n497'>497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397
package Xconfigurator; # $Id$

use diagnostics;
use strict;
use vars qw($in $install @window_managers @depths @monitorSize2resolution @hsyncranges %min_hsync4wres @vsyncranges %depths @resolutions %serversdriver @svgaservers @accelservers @allbutfbservers @allservers %vgamodes %videomemory @ramdac_name @ramdac_id @clockchip_name @clockchip_id %keymap_translate %standard_monitors $XF86firstchunk_text $keyboardsection_start $keyboardsection_start_v4 $keyboardsection_part2 $keyboardsection_part3 $keyboardsection_part3_v4 $keyboardsection_end $pointersection_text $monitorsection_text1 $monitorsection_text2 $monitorsection_text3 $monitorsection_text4 $modelines_text_Trident_TG_96xx $modelines_text $devicesection_text $devicesection_text_v4 $screensection_text1 %lines @options %xkb_options $good_default_monitor $low_default_monitor $layoutsection_v4);

use common qw(:common :file :functional :system);
use log;
use detect_devices;
use run_program;
use Xconfigurator_consts;
use any;
use modules;
use my_gtk qw(:helpers :wrappers);

my $tmpconfig = "/tmp/Xconfig";

my ($prefix, %monitors, %standard_monitors_);


sub xtest {
    my ($display) = @_;
    $::isStandalone ? 
      system("DISPLAY=$display /usr/X11R6/bin/xtest") == 0 : 
      c::Xtest($display);    
}

sub getVGAMode($) { $_[0]->{card}{vga_mode} || $vgamodes{"640x480x16"}; }

sub readCardsDB {
    my ($file) = @_;
    my ($card, %cards);

    my $F = common::openFileMaybeCompressed($file);

    my ($lineno, $cmd, $val) = 0;
    my $fs = {
        LINE => sub { push @{$card->{lines}}, $val unless $val eq "VideoRam" },
	NAME => sub {
	    $cards{$card->{type}} = $card if $card;
	    $card = { type => $val };
	},
	SEE => sub {
	    my $c = $cards{$val} or die "Error in database, invalid reference $val at line $lineno";

	    push @{$card->{lines}}, @{$c->{lines} || []};
	    add2hash($card->{flags}, $c->{flags});
	    add2hash($card, $c);
	},
	CHIPSET => sub {
	    $card->{chipset} = $val;
	    $card->{flags}{needChipset} = 1 if $val eq 'GeForce DDR';
	    $card->{flags}{needVideoRam} = 1 if member($val, qw(mgag10 mgag200 RIVA128 SiS6326));
	},
	SERVER => sub { $card->{server} = $val; },
	DRIVER => sub { $card->{driver} = $val; },
	RAMDAC => sub { $card->{ramdac} = $val; },
	DACSPEED => sub { $card->{dacspeed} = $val; },
	CLOCKCHIP => sub { $card->{clockchip} = $val; $card->{flags}{noclockprobe} = 1; },
	NOCLOCKPROBE => sub { $card->{flags}{noclockprobe} = 1 },
	UNSUPPORTED => sub { $card->{flags}{unsupported} = 1 },
	COMMENT => sub {},
    };

    local $_;
    while (<$F>) { $lineno++;
	s/\s+$//;
	/^#/ and next;
	/^$/ and next;
	/^END/ and last;

	($cmd, $val) = /(\S+)\s*(.*)/ or next; #log::l("bad line $lineno ($_)"), next;

	my $f = $fs->{$cmd};

	$f ? $f->() : log::l("unknown line $lineno ($_)");
    }
    \%cards;
}
sub readCardsNames {
    my $file = "$ENV{SHARE_PATH}/ldetect-lst/CardsNames";
    map { (split '=>')[0] } grep { !/^#/ } catMaybeCompressed($file);
}
sub cardName2RealName {
    my ($name) = @_;
    my $file = "$ENV{SHARE_PATH}/ldetect-lst/CardsNames";
    foreach (catMaybeCompressed($file)) {
	chop;
	next if /^#/;	  
	my ($name_, $real) = split '=>';
	return $real if $name eq $name_;
    }
    $name;
}
sub updateCardAccordingName {
    my ($card, $name) = @_;
    my $cards = readCardsDB("$ENV{SHARE_PATH}/ldetect-lst/Cards+");

    add2hash($card->{flags}, $cards->{$name}{flags});
    add2hash($card, $cards->{$name});
    $card;
}

sub readMonitorsDB {
    my ($file) = @_;

    %monitors and return;

    my $F = common::openFileMaybeCompressed($file);
    local $_;
    my $lineno = 0; while (<$F>) {
	$lineno++;
	s/\s+$//;
	/^#/ and next;
	/^$/ and next;

	my @fields = qw(vendor type eisa hsyncrange vsyncrange);
	my @l = split /\s*;\s*/;
	@l == @fields or log::l("bad line $lineno ($_)"), next;

	my %l; @l{@fields} = @l;
	if ($monitors{$l{type}}) {
	    my $i; for ($i = 0; $monitors{"$l{type} ($i)"}; $i++) {}
	    $l{type} = "$l{type} ($i)";
	}
	$monitors{"$l{vendor}|$l{type}"} = \%l;
    }
    while (my ($k, $v) = each %standard_monitors) {
	$monitors{'Generic|' . translate($k)} = $standard_monitors_{$k} = 
	  { hsyncrange => $v->[1], vsyncrange => $v->[2] };
    }
}

sub keepOnlyLegalModes {
    my ($card, $monitor) = @_;
    my $mem = 1024 * ($card->{memory} || ($card->{server} eq 'FBDev' ? 2048 : 99999));
    my $hsync = max(split(/[,-]/, $monitor->{hsyncrange}));

    while (my ($depth, $res) = each %{$card->{depth}}) {
	@$res = grep {
	    $mem >= product(@$_, $depth / 8) &&
	    $hsync >= ($min_hsync4wres{$_->[0]} || 0) &&
	    ($card->{server} ne 'FBDev' || $vgamodes{"$_->[0]x$_->[1]x$depth"})
	} @$res;
	delete $card->{depth}{$depth} if @$res == 0;
    }
}

sub cardConfigurationAuto() {
    my @cards;
    if (my @c = grep { $_->{driver} =~ /(Card|Server):/ } detect_devices::probeall(1)) {
	foreach my $i (0..$#c) {
	    local $_ = $c[$i]->{driver};
	    my $card = { identifier => ($c[$i]{description} . (@c > 1 && " $i")) };
	    $card->{type} = $1 if /Card:(.*)/;
	    $card->{server} = $1 if /Server:(.*)/;
	    $card->{flags}{needVideoRam} &&= /86c368/;
	    $card->{busid} = "PCI:$c[$i]{pci_bus}:$c[$i]{pci_device}:$c[$i]{pci_function}";
	    push @{$card->{lines}}, @{$lines{$card->{identifier}} || []};
	    push @cards, $card;
	}
    }
    #- take a default on sparc if nothing has been found.
    if (arch() =~ /^sparc/ && !@cards) {
        log::l("Using probe with /proc/fb as nothing has been found!");
	local $_ = cat_("/proc/fb");
	if (/Mach64/) { push @cards, { server => "Mach64" } }
	elsif (/Permedia2/) { push @cards, { server => "3DLabs" } }
	else { push @cards, { server => "Sun24" } }
    }
    #- special case for dual head card using only one busid.
    @cards = map { my $dup = $_->{identifier} =~ /MGA G450/ ? 2 : 1;
		   if ($dup > 1) {
		       my @result;
		       my $orig = $_;
		       foreach (1..$dup) {
			   my $card = {};
			   add2hash($card, $orig);
			   push @result, $card;
		       }
		       @result;
		   } else {
		       ($_);
		   }
	       } @cards;
    #- make sure no type are already used, duplicate both screen
    #- and rename type (because used as id).
    if (@cards > 1) {
	my $card = 1;
	foreach (@cards) {
	    updateCardAccordingName($_, $_->{type}) if $_->{type};
	    $_->{type} = "$_->{type} $card";
	    $card++;
	}
    }
    #- in case of only one cards, remove all busid reference, this will avoid
    #- need of change of it if the card is moved.
    @cards == 1 and delete $cards[0]{busid};
    @cards;
}

sub cardConfiguration(;$$$) {
    my ($card, $noauto, $allowFB) = @_;
    $card ||= {};

    updateCardAccordingName($card, $card->{type}) if $card->{type}; #- try to get info from given type
    undef $card->{type} unless $card->{server}; #- bad type as we can't find the server
    my @cards = cardConfigurationAuto();
    if (@cards > 1 && ($noauto || !$card->{server})) {#} && !$::isEmbedded) {
	my (%single_heads, @choices, $tc);
	my $configure_multi_head = sub {
	    add2hash($card, $cards[0]); #- assume good default.
	    delete $card->{cards} if $noauto;
	    $card->{cards} or $card->{cards} = \@cards;
	    $card->{force_xf4} = 1; #- force XF4 in such case.
	    $card->{Xinerama} = $_[0];
	};
	foreach (@cards) {
	    unless ($_->{driver} && !$_->{flags}{unsupported}) {
		log::l("found card \"$_->{identifier}\" not supported by XF4, disabling mutli-head support");
		$configure_multi_head = undef;
	    }
	    #- if more than one card use the same BusID, we have to use screen.
	    if ($single_heads{$_->{busid}}) {
		$single_heads{$_->{busid}}{screen} ||= 0;
		$_->{screen} = $single_heads{$_->{busid}}{screen} + 1;
	    }
	    $single_heads{$_->{busid}} = $_;
	}
	if ($configure_multi_head) {
	    push @choices, { text => _("Configure all heads independantly"), code => sub { $configure_multi_head->('') } };
	    push @choices, { text => _("Use Xinerama extension"), code => sub { $configure_multi_head->(1) } };
	}
	foreach (values %single_heads) {
	    push @choices, { text => _("Configure only card \"%s\" (%s)", $_->{identifier}, $_->{busid}),
			     code => sub { add2hash($card, $_); delete $card->{cards}; delete $card->{Xinerama} } };
	}
	$tc = $in->ask_from_listf(_("Multi-head configuration"),
_("Your system support multiple head configuration.
What do you want to do?"), sub { translate($_[0]{text}) }, \@choices) or return; #- no more die, CHECK with auto that return ''!
	$tc->{code} and $tc->{code}();
    } else {
	#- only one head found, configure it as before.
	add2hash($card, $cards[0]) unless $card->{server} || $noauto;
	delete $card->{cards}; delete $card->{Xinerama};
    }
    $card->{server} = 'FBDev' unless !$allowFB || $card->{server} || $card->{type} || $noauto;
    $card->{type} = cardName2RealName($in->ask_from_treelist(_("Graphic card"), _("Select a graphic card"), '|', ['Other|Unlisted', readCardsNames()])) unless $card->{type} || $card->{server};
    undef $card->{type}, $card->{server} = $in->ask_from_list(_("X server"), _("Choose a X server"), $allowFB ? \@allservers : \@allbutfbservers ) or return if $card->{type} eq 'Other|Unlisted';

    updateCardAccordingName($card, $card->{type}) if $card->{type};
    add2hash($card, { vendor => "Unknown", board => "Unknown" });

    foreach ($card, @{$card->{cards} || []}) {
	$_->{memory} = 4096,  delete $_->{depth} if $_->{driver} eq 'i810';
	$_->{memory} = 16384, delete $_->{depth} if $_->{chipset} =~ /PERMEDIA/ && $_->{memory} <= 1024;
    }

    #- 3D acceleration configuration for XFree 3.3 using Utah-GLX.
    $card->{Utah_glx} = ($card->{identifier} =~ /Matrox.* G[24][05]0/ || #- 8bpp does not work.
			 $card->{identifier} =~ /Riva.*128/ ||
			 $card->{identifier} =~ /Rage X[CL]/ ||
			 $card->{identifier} =~ /3D Rage (?:LT|Pro)/);
                         #- NOT WORKING $card->{type} =~ /Intel 810/);
    #- 3D acceleration configuration for XFree 3.3 using Utah-GLX but EXPERIMENTAL that may freeze the machine (FOR INFO NOT USED).
    $card->{Utah_glx_EXPERIMENTAL} = ($card->{type} =~ /RIVA TNT/ || #- all RIVA/GeForce comes from NVIDIA and may freeze (gltron).
				      #$card->{type} =~ /RIVA128/ ||
				      $card->{type} =~ /GeForce 256/ ||
				      $card->{type} =~ /S3 Savage3D/ || #- only this one is evoluting (expect a stable release ?)
				      #- $card->{type} =~ /S3 ViRGE/ || #- 15bits only
				      $card->{identifier} =~ /Rage Mobility (?:P\/M|L) / ||
				      $card->{type} =~ /SiS/);
    #- 3D acceleration configuration for XFree 4.0 using DRI.
    $card->{DRI_glx} = ($card->{identifier} =~ /Voodoo [35]/ || $card->{identifier} =~ /Voodoo Banshee/ || #- 16bit only
			$card->{identifier} =~ /Matrox.* G[24][05]0/ || #- prefer 16bit (24bit not well tested according to DRI)
			$card->{identifier} =~ /8281[05].* CGC/ || #- 16bits (Intel 810 & 815).
			#$card->{identifier} =~ /Radeon / || #- 16bits preferable ?
			$card->{identifier} =~ /Rage 128/); #- 16 and 32 bits, prefer 16bit as no DMA.
    #- 3D acceleration configuration for XFree 4.0 using DRI but EXPERIMENTAL that may freeze the machine (FOR INFO NOT USED).
    $card->{DRI_glx_EXPERIMENTAL} = ($card->{identifier} =~ /SiS.*6C?326/ || #- prefer 16bit, other ?
				     $card->{identifier} =~ /SiS.*6C?236/ ||
				     $card->{identifier} =~ /SiS.*630/ ||
				     $card->{identifier} =~ /Radeon /); #- 16bits preferable ?

    #- check to use XFree 4.0 or XFree 3.3.
    $card->{use_xf4} = $card->{driver} && !$card->{flags}{unsupported};
    $card->{force_xf4} = arch() =~ /ppc/; #- try to figure out ugly hack for PPC (recommend XF4 always so...)
    $card->{prefer_xf3} = !$card->{force_xf4} && ($card->{type} =~ /RIVA TNT/ ||
						  $card->{type} =~ /RIVA128/ ||
						  $card->{type} =~ /GeForce/ ||
						  $card->{type} =~ /SiS / && $card->{type} !~ /SiS 6326/ ||
						  $card->{type} =~ /NeoMagic /);
    #- take into account current environment in standalone to keep
    #- the XFree86 version.
    if ($::isStandalone) {
	readlink("$prefix/etc/X11/X") =~ /XFree86/ and $card->{prefer_xf3} = 0;
	readlink("$prefix/etc/X11/X") =~ /XF86_/ and $card->{prefer_xf3} = !$card->{force_xf4};
    }

    #- basic installation, use of XFree 4.0 or XFree 3.3.
    my ($xf4_ver, $xf3_ver) = ("4.0.3", "3.3.6");
    my $xf3_tc = { text => _("XFree %s", $xf3_ver),
		   code => sub { $card->{Utah_glx} = $card->{DRI_glx} = ''; $card->{use_xf4} = '';
				 log::l("Using XFree $xf3_ver") } };
    my $msg = _("Which configuration of XFree do you want to have?");
    my @choices = $card->{use_xf4} ? (if_($card->{prefer_xf3}, $xf3_tc),
				      #- hack for Matrox driver where there are undefined reference if no DRI!
				      if_($card->{identifier} !~ /Matrox.* G[24][05]0/ && (!$card->{prefer_xf3} || $::expert), 
					  { text => _("XFree %s", $xf4_ver),
					    code => sub { $card->{Utah_glx} = $card->{DRI_glx} = '';
							  log::l("Using XFree $xf4_ver") } }),
				      if_(!$card->{prefer_xf3} && $::expert, $xf3_tc)) : $xf3_tc;

    #- try to figure if 3D acceleration is supported
    #- by XFree 3.3 but not XFree 4.0 then ask user to keep XFree 3.3 ?
    if ($card->{Utah_glx}) {
	$msg = ($card->{use_xf4} && !$card->{DRI_glx} && !$card->{prefer_xf3} ?
_("Your card can have 3D hardware acceleration support but only with XFree %s.
Your card is supported by XFree %s which may have a better support in 2D.", $xf3_ver, $xf4_ver) :
_("Your card can have 3D hardware acceleration support with XFree %s.", $xf3_ver)) . "\n\n\n" . $msg;
	$::expert or @choices = (); #- keep it by default here as it is the only choice available.
	unshift @choices, { text => _("XFree %s with 3D hardware acceleration", $xf3_ver),
			    code => sub { $card->{use_xf4} = '';
					  log::l("Using XFree $xf3_ver with 3D hardware acceleration") } };
    }

    #- an expert user may want to try to use an EXPERIMENTAL 3D acceleration.
    if ($::expert && $card->{use_xf4} && $card->{DRI_glx_EXPERIMENTAL}) {
	$msg =
_("Your card can have 3D hardware acceleration support with XFree %s,
NOTE THIS IS EXPERIMENTAL SUPPORT AND MAY FREEZE YOUR COMPUTER.", $xf4_ver) . "\n\n\n" . $msg;
	push @choices, { text => _("XFree %s with EXPERIMENTAL 3D hardware acceleration", $xf4_ver),
			 code => sub { $card->{DRI_glx} = 'EXPERIMENTAL';
				       log::l("Using XFree $xf4_ver with EXPERIMENTAL 3D hardware acceleration") } };
    }

    #- an expert user may want to try to use an EXPERIMENTAL 3D acceleration, currenlty
    #- this is with Utah GLX and so, it can provide a way of testing.
    if ($::expert && $card->{Utah_glx_EXPERIMENTAL}) {
	$msg = ($card->{use_xf4} && !$card->{DRI_glx} && !$card->{prefer_xf3} ?
_("Your card can have 3D hardware acceleration support but only with XFree %s,
NOTE THIS IS EXPERIMENTAL SUPPORT AND MAY FREEZE YOUR COMPUTER.
Your card is supported by XFree %s which may have a better support in 2D.", $xf3_ver, $xf4_ver) :
_("Your card can have 3D hardware acceleration support with XFree %s,
NOTE THIS IS EXPERIMENTAL SUPPORT AND MAY FREEZE YOUR COMPUTER.", $xf3_ver)) . "\n\n\n" . $msg;
	push @choices, { text => _("XFree %s with EXPERIMENTAL 3D hardware acceleration", $xf3_ver),
			 code => sub { $card->{use_xf4} = ''; $card->{Utah_glx} = 'EXPERIMENTAL';
				       log::l("Using XFree $xf3_ver with EXPERIMENTAL 3D hardware acceleration") } };
    }

    #- ask the expert user to enable or not hardware acceleration support.
    if ($card->{use_xf4} && $card->{DRI_glx}) {
	$msg = _("Your card can have 3D hardware acceleration support with XFree %s.", $xf4_ver) . "\n\n\n" . $msg;
	$::expert or @choices = (); #- keep all user by default with XFree 4.0 including 3D acceleration.
	unshift @choices, { text => _("XFree %s with 3D hardware acceleration", $xf4_ver),
			    code => sub { log::l("Using XFree $xf4_ver with 3D hardware acceleration") } };
    }

    #- examine choice of user, beware the list MUST NOT BE REORDERED AS the first item should be the
    #- proposed one by DrakX.
    my $tc = $in->ask_from_listf(_("XFree configuration"), formatAlaTeX($msg), sub { translate($_[0]{text}) }, \@choices) or return;
    #- in case of class discarding, this can help ...
    $tc or $tc = $choices[0];
    $tc->{code} and $tc->{code}();
    
	
    $card->{prog} = "/usr/X11R6/bin/" . ($card->{use_xf4} ? 'XFree86' : $card->{server} =~ /Sun (.*)/x ?
					 "Xsun$1" : "XF86_$card->{server}");

    #- additional packages to install according available card.
    #- add XFree86-libs-DRI here if using DRI (future split of XFree86 TODO)
    my @l = ();
    if ($card->{DRI_glx}) {
	push @l, 'Glide_V5' if $card->{identifier} =~ /Voodoo 5/;
	push @l, 'Glide_V3-DRI' if $card->{identifier} =~ /Voodoo (3|Banshee)/;
	push @l, 'XFree86-glide-module' if $card->{identifier} =~ /Voodoo/;
    }
    if ($card->{Utah_glx}) {
	push @l, 'Mesa' if !$card->{use_xf4};
    }

    -x "$prefix$card->{prog}" or $install && $install->($card->{use_xf4} ? 'XFree86-server' : "XFree86-$card->{server}", @l);
    -x "$prefix$card->{prog}" or die "server $card->{server} is not available (should be in $prefix$card->{prog})";

    delete $card->{depth}{32} if $card->{type} =~ /S3 Trio3D|SiS/;
    $card->{options}{sw_cursor} = 1 if $card->{type} =~ /S3 Trio3D|SiS 6326/;
    unless ($card->{type}) {
	$card->{flags}{noclockprobe} = member($card->{server}, qw(I128 S3 S3V Mach64));
    }
    $card->{options_xf3}{power_saver} = 1;
    $card->{options_xf4}{DPMS} = 1;

    $card->{flags}{needVideoRam} and
      $card->{memory} ||= $videomemory{$in->ask_from_list_('', _("Select the memory size of your graphic card"),
							   [ sort { $videomemory{$a} <=> $videomemory{$b} }
							     keys %videomemory]) || return};

    #- hack for ATI Mach64 cards where two options should be used if using Utah-GLX.
    if ($card->{identifier} =~ /Rage X[CL]/ ||
	$card->{identifier} =~ /Rage Mobility (?:P\/M|L) / ||
	$card->{identifier} =~ /3D Rage (?:LT|Pro)/) {
	$card->{options_xf3}{no_font_cache} = $card->{Utah_glx};
	$card->{options_xf3}{no_pixmap_cache} = $card->{Utah_glx};
    }
    #- hack for SiS cards where an option should be used if using Utah-GLX.
    if ($card->{type} =~ /SiS /) {
	$card->{options_xf3}{no_pixmap_cache} = $card->{Utah_glx};
    }

    #- 3D acceleration configuration for XFree 4.0 using DRI, this is enabled by default
    #- but for some there is a need to specify VideoRam (else it won't run).
    if ($card->{DRI_glx}) {
	$card->{identifier} =~ /Matrox.* G[24]00/ and $card->{flags}{needVideoRam} = 'fakeVideoRam';
	$card->{identifier} =~ /8281[05].* CGC/ and ($card->{flags}{needVideoRam}, $card->{memory}) = ('fakeVideoRam', 16384);
    }

    if (!$::isStandalone && $card->{driver} eq 'i810') {
	require modules;
	eval { modules::load("agpgart"); };
    }
    $card;
}

sub optionsConfiguration($) {
    my ($o) = @_;
    my @l;
    my %l;

    foreach (@options) {
	if ($o->{card}{server} eq $_->[1] && $o->{card}{identifier} =~ /$_->[2]/) {
	    my $options = 'options_' . ($o->{card}{server} eq 'XFree86' ? 'xf4' : 'xf3');
	    $o->{card}{$options}{$_->[0]} ||= 0;
	    unless ($l{$_->[0]}) {
		push @l, { label => $_->[0], val => \$o->{card}{$options}{$_->[0]}, type => 'bool' };
		$l{$_->[0]} = 1;
	    }
	}
    }
    @l = @l[0..9] if @l > 9; #- reduce list size to 10 for display

    $in->ask_from_entries_refH('', _("Choose options for server"), \@l);
}

sub monitorConfiguration(;$$) {
    my $monitor = shift || {};
    my $useFB = shift || 0;

    if ($monitor->{hsyncrange} && $monitor->{vsyncrange}) {
	add2hash($monitor, { type => "monitor1", vendor => "Unknown", model => "Unknown" });
	return $monitor;
    }

    readMonitorsDB("$ENV{SHARE_PATH}/ldetect-lst/MonitorsDB");

    my $good_default = 'Generic|' . translate($good_default_monitor);
    $monitor->{type} ||=
      ($::auto_install ? $low_default_monitor :
       $in->ask_from_treelist(_("Monitor"), _("Choose a monitor"), '|', ['Custom', keys %monitors], $good_default));
    if ($monitor->{type} eq 'Custom') {
	$in->ask_from_entries_refH('',