Lines 44-50
Link Here
|
44 |
# |
44 |
# |
45 |
my ( $outfile, $outfile_sh, $outfile_bat, $bootfile, $newline, $comment, $comment4nt, $compiler, $unsetenv, $setenv, $unset, $set, $ds, $ps, $cur_dir, |
45 |
my ( $outfile, $outfile_sh, $outfile_bat, $bootfile, $newline, $comment, $comment4nt, $compiler, $unsetenv, $setenv, $unset, $set, $ds, $ps, $cur_dir, |
46 |
$par_dir, $I, $L, $D, $buildenv, $answer, $tmp, $Solaris, $Linux, $FreeBSD, $NetBSD, $Tru64, $Irix, $Irix64, $Winnt, $Macosx, $MINGWIN32, $USE_SHELL, |
46 |
$par_dir, $I, $L, $D, $buildenv, $answer, $tmp, $Solaris, $Linux, $FreeBSD, $NetBSD, $Tru64, $Irix, $Irix64, $Winnt, $Macosx, $MINGWIN32, $USE_SHELL, |
47 |
$WScomp, $GNUcomp, $platform, $cygwinver, $machine_type, $empty, $no_jdk, $no_ant, $no_stl, $no_tcsh, $no_cl, $no_gcc, $no_gcc_home, $no_gcc_include, |
47 |
$WScomp, $GNUcomp, $platform, $cygwinver, $machine_type, $empty, $no_ant, $no_stl, $no_gcc_home, $no_gcc_include, |
48 |
$no_gxx_include, $warnfile, $Warning, $result, $unsetvars, $unsetvarssh, $unsetvarsbat, $exportvars, $win_format_var, $perl_os); |
48 |
$no_gxx_include, $warnfile, $Warning, $result, $unsetvars, $unsetvarssh, $unsetvarsbat, $exportvars, $win_format_var, $perl_os); |
49 |
# |
49 |
# |
50 |
#------------------------------------------------- |
50 |
#------------------------------------------------- |
Lines 124-135
Link Here
|
124 |
$Winnt = "WINNT"; # return of uname command on Windows NT |
124 |
$Winnt = "WINNT"; # return of uname command on Windows NT |
125 |
$Macosx = "Darwin"; # return of uname command on Mac OS X/Darwin |
125 |
$Macosx = "Darwin"; # return of uname command on Mac OS X/Darwin |
126 |
$empty = ""; # used as argument |
126 |
$empty = ""; # used as argument |
127 |
$no_jdk = "NO_JAVA_HOME"; # possible argument |
|
|
128 |
$no_ant = "NO_ANT_HOME"; # possible argument |
127 |
$no_ant = "NO_ANT_HOME"; # possible argument |
129 |
$no_stl = "NO_STLPORT4"; # possible argument |
128 |
$no_stl = "NO_STLPORT4"; # possible argument |
130 |
$no_tcsh = "NO_TCSH"; # possible argument |
|
|
131 |
$no_cl = "NO_CL"; |
132 |
$no_gcc = "NO_GCC"; |
133 |
$no_gcc_home = "NO_GCC_HOME"; |
129 |
$no_gcc_home = "NO_GCC_HOME"; |
134 |
$warnfile = "warn"; # logfile configure warnings. |
130 |
$warnfile = "warn"; # logfile configure warnings. |
135 |
$Warning = ""; # container for warning messages |
131 |
$Warning = ""; # container for warning messages |
Lines 613-658
Link Here
|
613 |
} |
609 |
} |
614 |
|
610 |
|
615 |
# 2. Java home directory. |
611 |
# 2. Java home directory. |
616 |
# Check whether autoconf found the JAVA_HOME directory. |
612 |
# JAVA_HOME as argument from autoconf. |
617 |
if ( '@JAVA_HOME@' eq $no_jdk ) |
613 |
$JAVA_HOME = PosixFormat('@JAVA_HOME@') ; |
618 |
{ AddWarning( "set_soenv", "Autoconf did not find correct JDK, prompted for value" ); |
|
|
619 |
$JAVA_HOME = GetValue( "Please enter the Java home directory: " ); |
620 |
CheckPathExist( $JAVA_HOME ); |
621 |
} |
622 |
else |
623 |
{ # JAVA_HOME as argument from autoconf. |
624 |
$JAVA_HOME = PosixFormat('@JAVA_HOME@') ; |
625 |
} |
626 |
|
614 |
|
627 |
if ( $platform eq "$Winnt" ) { |
615 |
if ( $platform eq "$Winnt" ) { |
628 |
$JAVA_HOME =~ s/[\s\/]+$//; # remove trailing \n or \/ if there is any. |
616 |
$JAVA_HOME =~ s/[\s\/]+$//; # remove trailing \n or \/ if there is any. |
629 |
} |
617 |
} |
630 |
# 3. Tcsh path. |
618 |
# 3. Tcsh path. |
631 |
# Check whether autoconf found the Tcsh path. |
619 |
# Check whether autoconf found the Tcsh path. |
632 |
if ( '@TCSH@' eq $no_tcsh and $USE_SHELL eq "tcsh" ) |
620 |
if ($USE_SHELL eq "tcsh") |
633 |
{ AddWarning( "set_soenv", "Autoconf did not find tcsh, prompted for value" ); |
|
|
634 |
$SHELL = GetValue( "Please enter the path where tcsh is located: " ); |
635 |
CheckPathExist( $SHELL ); |
636 |
$TCSH_PATH = $SHELL; |
637 |
$SHELL = $SHELL."\/tcsh"; |
638 |
} |
639 |
elsif ($USE_SHELL eq "tcsh") |
640 |
{ # SHELL as argument from autoconf. |
621 |
{ # SHELL as argument from autoconf. |
641 |
$SHELL = '@TCSH@'."\/tcsh"; |
622 |
$SHELL = '@TCSH@'."\/tcsh"; |
642 |
$TCSH_PATH = '@TCSH@'; |
623 |
$TCSH_PATH = '@TCSH@'; |
643 |
} |
624 |
} |
644 |
# Microsoft C/C++ compiler path for Windows NT users. |
625 |
|
645 |
if ($platform eq "$Winnt" and $MINGWIN32 ne "yes") |
|
|
646 |
{ if ( '@COMPATH@' eq $no_cl) |
647 |
{ AddWarning( "set_soenv", "Autoconf did not find Microsoft C/C++ compiler, prompted for value" ); |
648 |
$COMPATH = GetValue( "Please enter the MS-DOS format path for the Microsoft C/C++ compiler home directory: " ); |
649 |
until ((grep / /, $COMPATH) eq 0) |
650 |
{ printf "No spaces and names < 8 characters in MS-DOS format paths.\n"; |
651 |
$COMPATH = GetValue( "Please enter the MS-DOS format path for the Microsoft C/C++ compiler home directory: " ); |
652 |
} |
653 |
CheckPathExist( $COMPATH ); |
654 |
} |
655 |
} |
656 |
if ( '@STLPORT4@' eq $no_stl ) |
626 |
if ( '@STLPORT4@' eq $no_stl ) |
657 |
{ AddWarning( "set_soenv", "No path to STLport was given with the --with-stlport4-home option. The one provided with OOo will be build." ); |
627 |
{ AddWarning( "set_soenv", "No path to STLport was given with the --with-stlport4-home option. The one provided with OOo will be build." ); |
658 |
$STLPORT4 = "$no_stl"; |
628 |
$STLPORT4 = "$no_stl"; |
Lines 660-713
Link Here
|
660 |
|
630 |
|
661 |
# ml.exe assembler path for Windows users. |
631 |
# ml.exe assembler path for Windows users. |
662 |
if ($platform eq "$Winnt") |
632 |
if ($platform eq "$Winnt") |
663 |
{ if ( '@ASM_HOME@' eq "NO_ASM_HOME" ) |
633 |
{ $ASM_PATH = PosixFormat('@ASM_HOME@'); |
664 |
{ AddWarning( "set_soenv", "Autoconf did not find ml.exe assembler path, prompted for value" ); |
|
|
665 |
$ASM_PATH = GetValue( "Please enter the path where the ml.exe assembler is located: " ); |
666 |
CheckPathExist( $ASM_PATH ); |
667 |
} |
668 |
else |
669 |
{ $ASM_PATH = PosixFormat('@ASM_HOME@'); |
670 |
} |
671 |
} |
634 |
} |
672 |
# unzip.exe path for Windows users. |
635 |
# unzip.exe path for Windows users. |
673 |
if ($platform eq "$Winnt") |
636 |
if ($platform eq "$Winnt") |
674 |
{ if ( '@UNZIP_HOME@' eq "NO_UNZIP_HOME" ) |
637 |
{ $UNZIP_PATH = PosixFormat('@UNZIP_HOME@'); |
675 |
{ AddWarning( "set_soenv", "Autoconf did not find unzip.exe path, prompted for value" ); |
|
|
676 |
$UNZIP_PATH = GetValue( "Please enter the path where unzip.exe is located: " ); |
677 |
CheckPathExist( $UNZIP_PATH ); |
678 |
} |
679 |
else |
680 |
{ $UNZIP_PATH = PosixFormat('@UNZIP_HOME@'); |
681 |
} |
682 |
|
683 |
} |
638 |
} |
684 |
# 4. Gcc path. |
639 |
# 4. Gcc path. |
685 |
# Check whether autoconf found the compiler path. |
640 |
# Check whether autoconf found the compiler path. |
686 |
if (($platform eq $Linux) or ($platform eq $NetBSD) or ($platform eq $FreeBSD) or |
641 |
if (($platform eq $Linux) or ($platform eq $NetBSD) or ($platform eq $FreeBSD) or |
687 |
( ($platform eq $Irix ) or ($platform eq $Irix64) and ($compiler eq "gcc")) ) |
642 |
( ($platform eq $Irix ) or ($platform eq $Irix64) and ($compiler eq "gcc")) ) |
688 |
{ if ( '@COMPATH@' eq $no_gcc) |
643 |
{ # GCC_HOME is not needed. |
689 |
{ AddWarning( "set_soenv", "Autoconf did not find correct gcc compiler, prompted for value" ); |
|
|
690 |
printf "Did you build gcc 2.95.2 from source using the --prefix and --enable-shared flags (y/n)?: "; |
691 |
my $answer = <STDIN>; |
692 |
chomp( $answer ); |
693 |
if ( $answer eq "y" || $answer eq "Y" ) |
694 |
{ $GCC_HOME = GetValue( "Please enter the gcc 2.95.2 --prefix value: " ); |
695 |
$result = CheckPathExist( $GCC_HOME ); |
696 |
if ($result eq "false") |
697 |
{ AddWarning( "set_soenv", "The path $GCC_HOME does not exist on your system." ); |
698 |
} |
699 |
else |
700 |
{ $COMPATH = $GCC_HOME."/bin"; |
701 |
} |
702 |
} |
703 |
else |
704 |
{ AddWarning( "set_soenv", "gcc 2.95.2 does not exist on your system." ); |
705 |
} |
706 |
} |
707 |
else |
708 |
{ # GCC_HOME is not needed. |
709 |
$GCC_HOME = $no_gcc_home; |
644 |
$GCC_HOME = $no_gcc_home; |
710 |
} |
|
|
711 |
} |
645 |
} |
712 |
|
646 |
|
713 |
# Ant Home directory |
647 |
# Ant Home directory |
Lines 1904-1923
Link Here
|
1904 |
# XII. Functions. |
1838 |
# XII. Functions. |
1905 |
#----------------- |
1839 |
#----------------- |
1906 |
# |
1840 |
# |
1907 |
#------------------------------------------------------------ |
|
|
1908 |
# Function name: GetValue |
1909 |
# Description: Ask the user to enter certain information |
1910 |
# and stores that information in a variable. |
1911 |
# Arguments: 1. Path (string) |
1912 |
# Return value: Path (string) |
1913 |
#------------------------------------------------------------ |
1914 |
sub GetValue |
1915 |
{ my $value; |
1916 |
print "$_[ 0 ]"; |
1917 |
$value = <STDIN>; |
1918 |
chomp( $value ); # cut off new line |
1919 |
return( CheckPathName( $value ) ); |
1920 |
} |
1921 |
#------------------------------------------------------------- |
1841 |
#------------------------------------------------------------- |
1922 |
# Function name: CheckPathName |
1842 |
# Function name: CheckPathName |
1923 |
# Description: chops off the '/' character if it's the last |
1843 |
# Description: chops off the '/' character if it's the last |