=head2 Extensions
+Perl ships with a number of standard extensions. These are contained
+in the ext/ subdirectory.
+
By default, Configure will offer to build every extension which appears
to be supported. For example, Configure will offer to build GDBM_File
only if it is able to find the gdbm library. (See examples below.)
-B, DynaLoader, Fcntl, IO, and attrs are always built by default.
Configure does not contain code to test for POSIX compliance, so POSIX
is always built by default as well. If you wish to skip POSIX, you can
set the Configure variable useposix=false either in a hint file or from
-the Configure command line. Similarly, the Opcode extension is always
-built by default, but you can skip it by setting the Configure variable
-useopcode=false either in a hint file for from the command line.
+the Configure command line.
If you unpack any additional extensions in the ext/ directory before
running Configure, then Configure will offer to build those additional
version. (Configure will suggest this as the default.)
In summary, here are the Configure command-line variables you can set
-to turn off each extension:
+to turn off various extensions. All others are included by default.
- B (Always included by default)
DB_File i_db
DynaLoader (Must always be included as a static extension)
- Fcntl (Always included by default)
GDBM_File i_gdbm
- IO (Always included by default)
NDBM_File i_ndbm
ODBM_File i_dbm
POSIX useposix
- SDBM_File (Always included by default)
Opcode useopcode
Socket d_socket
Threads use5005threads
- attrs (Always included by default)
Thus to skip the NDBM_File extension, you can use
for the default answer, but it will also point out the discrepancy to
you.
-Finally, if you have dynamic loading (most modern Unix systems do)
+Finally, if you have dynamic loading (most modern systems do)
remember that these extensions do not increase the size of your perl
executable, nor do they impact start-up time, so you probably might as
well build all the ones that will work on your system.
=head1 suidperl
-suiperl is an optional component, which is built or installed by default.
+suidperl is an optional component, which is built or installed by default.
From perlfaq1:
On some systems, setuid and setgid scripts (scripts written
=back
+=head2 Cross-compilation
+
+Starting from Perl 5.8 Perl has the beginnings of cross-compilation
+support. What is known to work is running Configure in a
+cross-compilation environment and building the miniperl executable.
+What is known not work work is building the perl executable because
+that would require building extensions: Dynaloader statically and
+File::Glob dynamically, for extensions one needs MakeMaker and
+MakeMaker is not yet cross-compilation aware, and neither is
+the main Makefile.
+
+Since the functionality is so lacking, it must be considered
+highly experimental. It is so experimental that it is not even
+mentioned during an interactive Configure session, a direct command
+line invocation (detailed shortly) is required to access the
+functionality.
+
+ NOTE: Perl is routinely built using cross-compilation
+ in the EPOC environment but the solutions from there
+ can't directly be used elsewhere.
+
+The one environment where cross-compilation has successfully been used
+as of this writing is the Compaq iPAQ running ARM Linux. The build
+host was Intel Linux, the networking setup was PPP + SSH. The exact
+setup details are beyond the scope of this document, see
+http://www.handhelds.org/ for more information.
+
+To run Configure in cross-compilation mode the basic switch is
+C<-Dusecrosscompile>.
+
+ sh ./Configure -des -Dusecrosscompile -D...
+
+This will make the cpp symbol USE_CROSS_COMPILE and the %Config
+symbol C<usecrosscompile> available.
+
+During the Configure and build, certain helper scripts will be created
+into the Cross/ subdirectory. The scripts are used to execute a
+cross-compiled executable, and to transfer files to and from the
+target host. The execution scripts are named F<run-*> and the
+transfer scripts F<to-*> and F<from-*>. The part after the dash is
+the method to use for remote execution and transfer: by default the
+methods are B<ssh> and B<scp>, thus making the scripts F<run-ssh>,
+F<to-scp>, and F<from-scp>.
+
+To configure the scripts for a target host and a directory (in which
+the execution will happen and which is to and from where the transfer
+happens), supply Configure with
+
+ -Dtargethost=so.me.ho.st -Dtargetdir=/tar/get/dir
+
+The targethost is what e.g. ssh will use as the hostname, the targetdir
+must exist (the scripts won't create it), the targetdir defaults to /tmp.
+You can also specify a username to use for ssh/rsh logins
+
+ -Dtargetuser=luser
+
+but in case you don't, "root" will be used.
+
+Because this is a cross-compilation effort, you will also need to specify
+which target environment and which compilation environment to use.
+This includes the compiler, the header files, and the libraries.
+In the below we use the usual settings for the iPAQ cross-compilation
+environment:
+
+ -Dtargetarch=arm-linux
+ -Dcc=arm-linux-gcc
+ -Dusrinc=/skiff/local/arm-linux/include
+ -Dincpth=/skiff/local/arm-linux/include
+ -Dlibpth=/skiff/local/arm-linux/lib
+
+If the name of the C<cc> has the usual GNU C semantics for cross
+compilers, that is, CPU-OS-gcc, the names of the C<ar>, C<nm>, and
+C<ranlib> will also be automatically chosen to be CPU-OS-ar and so on.
+(The C<ld> requires more thought and will be chosen later by Configure
+as appropriate.) Also, in this case the incpth, libpth, and usrinc
+will be guessed by Configure (unless explicitly set to something else,
+in which case Configure's guesses with be appended).
+
+In addition to the default execution/transfer methods you can also
+choose B<rsh> for execution, and B<rcp> or B<cp> for transfer,
+for example:
+
+ -Dtargetrun=rsh -Dtargetto=rcp -Dtargetfrom=cp
+
+Putting it all together:
+
+ sh ./Configure -des -Dusecrosscompile \
+ -Dtargethost=so.me.ho.st \
+ -Dtargetdir=/tar/get/dir \
+ -Dtargetuser=root \
+ -Dtargetarch=arm-linux \
+ -Dcc=arm-linux-gcc \
+ -Dusrinc=/skiff/local/arm-linux/include \
+ -Dincpth=/skiff/local/arm-linux/include \
+ -Dlibpth=/skiff/local/arm-linux/lib \
+ -D...
+
+or if you are happy with the defaults
+
+ sh ./Configure -des -Dusecrosscompile \
+ -Dtargethost=so.me.ho.st \
+ -Dcc=arm-linux-gcc \
+ -D...
+
=head1 make test
This will run the regression tests on the perl you just made. If
If you are distributing a modified version of perl (perhaps as part of
a larger package) please B<do> modify these installation instructions
and the contact information to match your distribution.
-
-=head1 LAST MODIFIED
-
-$Id: INSTALL,v 1.58 1999/07/23 14:43:00 doughera Exp $