… | |
… | |
4 | # configuration to fill in |
4 | # configuration to fill in |
5 | |
5 | |
6 | STATICPERL=~/.staticperl |
6 | STATICPERL=~/.staticperl |
7 | CPAN=http://mirror.netcologne.de/cpan # which mirror to use |
7 | CPAN=http://mirror.netcologne.de/cpan # which mirror to use |
8 | EMAIL="read the documentation <rtfm@example.org>" |
8 | EMAIL="read the documentation <rtfm@example.org>" |
9 | |
|
|
10 | |
9 | |
11 | # perl build variables |
10 | # perl build variables |
12 | PERL_VERSION=5.12.2 # 5.8.9 is also a good choice |
11 | PERL_VERSION=5.12.2 # 5.8.9 is also a good choice |
13 | PERL_CONFIGURE="" # additional Configure arguments |
12 | PERL_CONFIGURE="" # additional Configure arguments |
14 | PERL_CPPFLAGS="-DPERL_DISABLE_PMC -DPERL_ARENA_SIZE=65536 -D_GNU_SOURCE -DNDEBUG -USITELIB_EXP -USITEARCHEXP -UARCHLIB_EXP" |
13 | PERL_CPPFLAGS="-DPERL_DISABLE_PMC -DPERL_ARENA_SIZE=65536 -D_GNU_SOURCE -DNDEBUG -USITELIB_EXP -USITEARCHEXP -UARCHLIB_EXP" |
… | |
… | |
27 | ;; |
26 | ;; |
28 | esac |
27 | esac |
29 | |
28 | |
30 | # -Wl,--gc-sections makes it impossible to check for undefined references |
29 | # -Wl,--gc-sections makes it impossible to check for undefined references |
31 | # for some reason so we need to patch away the "-no" after Configure and before make :/ |
30 | # for some reason so we need to patch away the "-no" after Configure and before make :/ |
32 | # -z muldefs is to work around uclibc's pthread static linking bug |
31 | # --allow-multiple-definition exists to work around uclibc's pthread static linking bug |
33 | PERL_LDFLAGS="-Wl,--no-gc-sections -z muldefs" |
32 | PERL_LDFLAGS="-Wl,--no-gc-sections -Wl,--allow-multiple-definition" |
34 | PERL_LIBS="-lm -lcrypt" # perl loves to add lotsa crap itself |
33 | PERL_LIBS="-lm -lcrypt" # perl loves to add lotsa crap itself |
35 | |
34 | |
36 | # some configuration options for modules |
35 | # some configuration options for modules |
37 | export PERL_MM_USE_DEFAULT=1 |
36 | export PERL_MM_USE_DEFAULT=1 |
38 | #export CORO_INTERFACE=p # needed without nptl on x86, due to bugs in linuxthreads - very slow |
37 | #export CORO_INTERFACE=p # needed without nptl on x86, due to bugs in linuxthreads - very slow |
… | |
… | |
69 | unset PERL5OPT PERL5LIB PERLLIB PERL_UNICODE PERLIO_DEBUG |
68 | unset PERL5OPT PERL5LIB PERLLIB PERL_UNICODE PERLIO_DEBUG |
70 | export LC_ALL=C # just to be on the safe side |
69 | export LC_ALL=C # just to be on the safe side |
71 | |
70 | |
72 | # set version in a way that Makefile.PL can extract |
71 | # set version in a way that Makefile.PL can extract |
73 | VERSION=VERSION; eval \ |
72 | VERSION=VERSION; eval \ |
74 | $VERSION=0.9 |
73 | $VERSION=0.911 |
75 | |
74 | |
76 | BZ2=bz2 |
75 | BZ2=bz2 |
77 | BZIP2=bzip2 |
76 | BZIP2=bzip2 |
78 | |
77 | |
79 | fatal() { |
78 | fatal() { |
… | |
… | |
373 | ############################################################################# |
372 | ############################################################################# |
374 | # main |
373 | # main |
375 | |
374 | |
376 | podusage() { |
375 | podusage() { |
377 | echo |
376 | echo |
|
|
377 | |
378 | if [ -e "$PERL_PREFIX/bin/perl" ]; then |
378 | if [ -e "$PERL_PREFIX/bin/perl" ]; then |
379 | "$PERL_PREFIX/bin/perl" -MPod::Usage -e \ |
379 | "$PERL_PREFIX/bin/perl" -MPod::Usage -e \ |
380 | 'pod2usage -input => *STDIN, -output => *STDOUT, -verbose => '$1', -exitval => 0, -noperldoc => 1' <"$0" \ |
380 | 'pod2usage -input => *STDIN, -output => *STDOUT, -verbose => '$1', -exitval => 0, -noperldoc => 1' <"$0" \ |
381 | 2>/dev/null && exit |
381 | 2>/dev/null && exit |
382 | fi |
382 | fi |
|
|
383 | |
383 | # try whatever perl we can find |
384 | # try whatever perl we can find |
384 | perl -MPod::Usage -e \ |
385 | perl -MPod::Usage -e \ |
385 | 'pod2usage -input => *STDIN, -output => *STDOUT, -verbose => '$1', -exitval => 0, -noperldoc => 1' <"$0" \ |
386 | 'pod2usage -input => *STDIN, -output => *STDOUT, -verbose => '$1', -exitval => 0, -noperldoc => 1' <"$0" \ |
386 | 2>/dev/null && exit |
387 | 2>/dev/null && exit |
387 | |
388 | |
388 | fatal "displaying documentation requires a working perl - try '$0 install' first" |
389 | fatal "displaying documentation requires a working perl - try '$0 install' to build one in a safe location" |
389 | } |
390 | } |
390 | |
391 | |
391 | usage() { |
392 | usage() { |
392 | podusage 0 |
393 | podusage 0 |
393 | } |
394 | } |