This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Ask about use64bitall regardless of whether use64bitint is defined.
[metaconfig.git] / U / perl / use64bits.U
1 ?RCS: $Id$
2 ?RCS:
3 ?RCS: Copyright (c) 1998 Andy Dougherty
4 ?RCS:
5 ?RCS: You may distribute under the terms of either the GNU General Public
6 ?RCS: License or the Artistic License, as specified in the README file.
7 ?RCS:
8 ?MAKE:use64bitint use64bitall archname64: Myread Oldconfig Setvar test \
9         uselargefiles usemorebits longsize ccflags
10 ?MAKE:  -pick add $@ %<
11 ?Y:TOP
12 ?S:use64bitint:
13 ?S:     This variable conditionally defines the USE_64_BIT_INT symbol,
14 ?S:     and indicates that 64-bit integer types should be used
15 ?S:     when available.  The minimal possible 64-bitness
16 ?S:     is employed, just enough to get 64-bit integers into Perl.
17 ?S:     This may mean using for example "long longs", while your memory
18 ?S:     may still be limited to 2 gigabytes.
19 ?S:.
20 ?S:use64bitall:
21 ?S:     This variable conditionally defines the USE_64_BIT_ALL symbol,
22 ?S:     and indicates that 64-bit integer types should be used
23 ?S:     when available.  The maximal possible
24 ?S:     64-bitness is employed: LP64 or ILP64, meaning that you will
25 ?S:     be able to use more than 2 gigabytes of memory.  This mode is
26 ?S:     even more binary incompatible than USE_64_BIT_INT. You may not
27 ?S:     be able to run the resulting executable in a 32-bit CPU at all or
28 ?S:     you may need at least to reboot your OS to 64-bit mode.
29 ?S:.
30 ?S:archname64:
31 ?S:     This variable is used for the 64-bitness part of $archname.
32 ?S:.
33 ?C:USE_64_BIT_INT:
34 ?C:     This symbol, if defined, indicates that 64-bit integers should
35 ?C:     be used when available.  If not defined, the native integers
36 ?C:     will be employed (be they 32 or 64 bits).  The minimal possible
37 ?C:     64-bitness is used, just enough to get 64-bit integers into Perl.
38 ?C:     This may mean using for example "long longs", while your memory
39 ?C:     may still be limited to 2 gigabytes.
40 ?C:.
41 ?C:USE_64_BIT_ALL:
42 ?C:     This symbol, if defined, indicates that 64-bit integers should
43 ?C:     be used when available.  If not defined, the native integers
44 ?C:     will be used (be they 32 or 64 bits).  The maximal possible
45 ?C:     64-bitness is employed: LP64 or ILP64, meaning that you will
46 ?C:     be able to use more than 2 gigabytes of memory.  This mode is
47 ?C:     even more binary incompatible than USE_64_BIT_INT. You may not
48 ?C:     be able to run the resulting executable in a 32-bit CPU at all or
49 ?C:     you may need at least to reboot your OS to 64-bit mode.
50 ?C:.
51 ?H:?%<:#ifndef USE_64_BIT_INT
52 ?H:?%<:#$use64bitint    USE_64_BIT_INT          /**/
53 ?H:?%<:#endif
54 ?H:.
55 ?H:?%<:#ifndef USE_64_BIT_ALL
56 ?H:?%<:#$use64bitall    USE_64_BIT_ALL          /**/
57 ?H:?%<:#endif
58 ?H:.
59 ?LINT:set use64bitint
60 ?LINT:extern ccflags
61 ?LINT:change ccflags
62 ?LINT:use uselargefiles
63 ?LINT:use usemorebits
64 ?LINT:extern uselonglong
65 ?LINT:use uselonglong
66 ?LINT:set use64bitall
67 ?F:!use64bitint.cbu
68 ?F:!use64bitall.cbu
69
70 # Backward compatibility (uselonglong is deprecated).
71 case "$uselonglong" in
72 "$define"|true|[yY]*)
73         cat <<EOM >&4
74
75 *** Configure -Duselonglong is deprecated, using -Duse64bitint instead.
76
77 EOM
78         use64bitint="$define"
79         ;;
80 esac                          
81 # Backward compatibility (use64bits is deprecated).
82 case "$use64bits" in
83 "$define"|true|[yY]*)
84         cat <<EOM >&4
85
86 *** Configure -Duse64bits is deprecated, using -Duse64bitint instead.
87
88 EOM
89         use64bitint="$define"
90         ;;
91 esac                          
92 # Thinko compatibility
93 case "$use64bitints" in
94 "$define"|true|[yY]*)
95         cat <<EOM >&4
96
97 *** There is no Configure -Duse64bitints, using -Duse64bitint instead.
98
99 EOM
100         use64bitint="$define"
101         ;;
102 esac                          
103
104 case "$ccflags" in
105 *-DUSE_LONG_LONG*|*-DUSE_64_BIT_INT*|*-DUSE_64_BIT_ALL*) use64bitint="$define";;
106 esac
107 case "$use64bitall" in
108 "$define"|true|[yY]*) use64bitint="$define" ;;
109 esac
110
111 case "$longsize" in
112 8) cat <<EOM
113
114 You have natively 64-bit long integers.
115 EOM
116    val="$define"
117    ;;
118 *) case "$use64bitint" in
119    "$define"|true|[yY]*) dflt='y';;
120    *) dflt='n';;
121    esac
122    cat <<EOM
123
124 Perl can be built to take advantage of 64-bit integer types
125 on some systems.  To do so, Configure can be run with -Duse64bitint.
126 Choosing this option will most probably introduce binary incompatibilities.
127
128 If this doesn't make any sense to you, just accept the default '$dflt'.
129 EOM
130    rp='Try to use 64-bit integers, if available?'
131    . ./myread
132    case "$ans" in
133    [yY]*) val="$define" ;;
134    *)     val="$undef"  ;;
135    esac
136    ;;
137 esac
138 set use64bitint
139 eval $setvar
140
141 case "$use64bitint" in
142 "$define")      case "$longsize" in
143                 4)      dflt='n'
144                         cat <<EOM
145
146 Since you have chosen 64-bitness you may want to try maximal 64-bitness.
147 What you have chosen is minimal 64-bitness which means just enough
148 to get 64-bit integers.  The maximal means using as much 64-bitness
149 as is possible on the platform.  This in turn means even more binary
150 incompatibilities.  On the other hand, your platform may not have
151 any more maximal 64-bitness available than what you already have chosen.
152
153 If this doesn't make any sense to you, just accept the default '$dflt'.
154 EOM
155                         rp='Try to use full 64-bit support, if available?'
156                         . ./myread
157                         case "$ans" in
158                         [yY]*) val="$define" ;;
159                         *)     val="$undef"  ;;
160                         esac
161                         ;;
162                 8) val="$define" ;;
163                 *) val="$undef" ;;
164                 esac
165                 ;;
166 *)      case "$use64bitall" in
167         "$define"|true|[yY]*) val="$define" ;;
168         *) val="$undef" ;;
169         esac
170         ;;
171 esac 
172 set use64bitall
173 eval $setvar
174
175 case "$use64bitint" in
176 "$define"|true|[yY]*)
177 : Look for a hint-file generated 'call-back-unit'.  If the
178 : user has specified that a 64-bit perl is to be built,
179 : we may need to set or change some other defaults.
180         if $test -f use64bitint.cbu; then
181                 echo "Your platform has some specific hints for 64-bit integers, using them..."
182                 . ./use64bitint.cbu
183         fi
184         case "$longsize" in
185         4) case "$ccflags" in
186            *-DUSE_64_BIT_INT*) ;;
187            *) ccflags="$ccflags -DUSE_64_BIT_INT";;
188            esac
189            case "$archname64" in
190            '') archname64=64int ;;
191            esac
192            ;;
193         esac
194         ;;
195 esac
196
197 case "$use64bitall" in
198 "$define"|true|[yY]*)
199 : Look for a hint-file generated 'call-back-unit'.  If the
200 : user has specified that a full 64-bit perl is to be built,
201 : we may need to set or change some other defaults.
202         if $test -f use64bitall.cbu; then
203                 echo "Your platform has some specific hints for full 64-bit builds, using them..."
204                 . ./use64bitall.cbu
205         fi
206         case "$longsize" in
207         4) case "$ccflags" in
208            *-DUSE_64_BIT_ALL*) ;;
209            *) ccflags="$ccflags -DUSE_64_BIT_ALL";;
210            esac
211            case "$archname64" in
212            ''|64) archname64=64all ;;
213            esac
214            ;;
215         esac
216         ;;
217 esac
218