2002-08-27 05:31:48 -05:00
|
|
|
#!@PERL@ -w
|
|
|
|
#
|
2003-01-20 08:00:18 -06:00
|
|
|
# Program: set_soenv.in
|
2007-08-03 07:09:48 -05:00
|
|
|
# Version: $Revision: 1.156 $
|
|
|
|
# Date: $Date: 2007-08-03 13:09:48 $
|
2002-08-27 05:31:48 -05:00
|
|
|
# Author: Willem van Dorp, Ross Nicholson, Oisin Boydell - Sun Microsystems, Ireland.
|
|
|
|
#
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
# Description:
|
|
|
|
# set_soenv generates a file that contains all necessary
|
2003-03-19 09:03:25 -06:00
|
|
|
# environment variables for the build proces of OpenOffice
|
|
|
|
# on Linux, NetBSD, Solaris, Windows NT and Mac OS X/Darwin.
|
2002-08-27 05:31:48 -05:00
|
|
|
#
|
|
|
|
# Program steps.
|
|
|
|
#
|
|
|
|
# I. Checking the command-line arguments.
|
|
|
|
# IIa. Declaring variables for the system commands, etc.
|
|
|
|
# IIb. Declaring the environment variables.
|
|
|
|
# III. Initialising the variables for the system commands, etc.
|
|
|
|
# IV. Print out some important messages etc.
|
|
|
|
# V. Initialising the environment variables.
|
|
|
|
# VI. Open the output file.
|
|
|
|
# VII. Writing the data to the output file.
|
|
|
|
# VIII. Closing output file.
|
|
|
|
# IX. Sourcing the output file.
|
|
|
|
# X. Set up the build environment.
|
|
|
|
# XI. Moving the output file to the build home directory.
|
|
|
|
#
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
use strict; # pragma
|
|
|
|
use File::Basename;
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
#--------------------------------------------------------
|
|
|
|
# IIa. Declaring variables for the system commands, etc.
|
|
|
|
#--------------------------------------------------------
|
|
|
|
#
|
2007-06-26 11:48:53 -05:00
|
|
|
my ( $outfile, $outfile_sh, $outfile_bat, $bootfile, $newline, $comment, $comment4nt, $compiler, $unsetenv, $setenv, $unset, $set, $ds, $ps, $cur_dir,
|
2007-03-27 04:20:09 -05:00
|
|
|
$par_dir, $I, $L, $D, $buildenv, $answer, $tmp, $MINGW, $USE_MINGW, $platform,
|
2005-07-14 07:45:49 -05:00
|
|
|
$cygwinver, $empty, $no_ant, $no_stl, $no_gcc_include,
|
2007-06-26 11:48:53 -05:00
|
|
|
$no_gxx_include, $warnfile, $Warning, $result, $unsetvars, $unsetvarssh, $unsetvarsbat, $exportvars, $win_format_var, $perl_os, @mingw_lib_include_paths, $mingw_lib_include_path);
|
2002-08-27 05:31:48 -05:00
|
|
|
#
|
|
|
|
#-------------------------------------------------
|
|
|
|
# IIb. Declaring environment values (constants).
|
|
|
|
#-------------------------------------------------
|
|
|
|
#
|
|
|
|
# Platform independent constant values.
|
2006-02-10 04:32:58 -06:00
|
|
|
my @DICTIONARIES = ("DADK", "DEDE", "ENGB", "ENUS", "HUHU", "ITIT", "RURU", "THTH", "SWTZ" );
|
2006-06-02 06:34:16 -05:00
|
|
|
my ( $CALL_CDECL, $COMMON_OUTDIR, $BMP_WRITES_FLAG,
|
2006-07-05 16:32:39 -05:00
|
|
|
$common_build, $NO_REC_RES, $SO3, $SOLAR_JAVA,
|
2006-06-02 06:34:16 -05:00
|
|
|
$SOLAR_PLUGIN, $TF_PACKAGES, $TF_SDBAPI, $TF_FILEURL, $UPDATER, $BUILD_DELIVER, $VCL,
|
2007-06-26 11:48:53 -05:00
|
|
|
$TF_CFGDATA, $TF_SVDATA, $CC, $CXX,
|
2006-06-02 06:34:16 -05:00
|
|
|
$BUILD_SOSL, $ENABLEUNICODE, $NEW_JAR_PACK, $NO_BSYMBOLIC,
|
2002-10-22 07:24:17 -05:00
|
|
|
$BUILD_SOSL_RELEASE, $RSC_ONCE );
|
2002-08-27 05:31:48 -05:00
|
|
|
#
|
|
|
|
# Platform dependent constant values.
|
2006-03-08 07:02:40 -06:00
|
|
|
my ( $BIG_SVX, $COM, $CPU, $CPUNAME, $CVER, $GLIBC, $GUI, $GUIBASE, $GUIENV,
|
2006-06-02 06:34:16 -05:00
|
|
|
$GVER, $GVERDIR, $OS, $OSVERSION, $OUTPATH, $INPATH, $PATH_SEPERATOR, $XPVERSION,
|
|
|
|
$DYNAMIC_CRT, $SET_EXCEPTIONS, $use_shl_versions, $CDPATHx, $JRELIBDIR,
|
2005-10-25 05:24:20 -05:00
|
|
|
$JREEXTRALIBDIR, $JRETOOLKITDIR, $JRETHREADDIR, $EXCEPTIONS, $WRAPCMD );
|
2002-08-27 05:31:48 -05:00
|
|
|
#
|
|
|
|
#-------------------------------------------
|
|
|
|
# IIc. Declaring the environment variables.
|
|
|
|
#-------------------------------------------
|
|
|
|
#
|
|
|
|
# Help variables.
|
2004-02-04 08:08:23 -06:00
|
|
|
my ( $USR, $ETC, $BIN, $LIB, $LIB64, $INC, $INCLUDE, $DEV, $OPT, $LOCAL, $SOLENV, $SOLVER, $CONFIG,
|
2002-08-27 05:31:48 -05:00
|
|
|
$USR_BIN, $USR_LIB, $USR_LOCAL, $USR_CCS, $JAVA_BIN, $JAVA_LIB, $JAVA_INCLUDE,
|
2006-07-05 16:32:39 -05:00
|
|
|
$SOLARENVINC, $USR_DT, $USR_OPENWIN, $SHELL_PATH, $XLIB, $XINC,
|
2004-06-16 04:48:31 -05:00
|
|
|
$CYGWIN_PATH, $language, $dict, $ASM_PATH, $ps_STLPORT_LIB, $L_STLPORT_LIB,
|
2002-08-27 05:31:48 -05:00
|
|
|
$STLPORT_stlport, $STLPORT_inc_stlport, $PERL_PATH );
|
|
|
|
|
|
|
|
# Environment variables.
|
2005-01-25 09:55:07 -06:00
|
|
|
my ( $oldPATH, $SRC_ROOT, $SO_HOME, $JAVA_HOME, $JDK, $SHELL,
|
2006-04-07 02:02:29 -05:00
|
|
|
$UPD, $SOLARUPD, $WORK_STAMP, $TF_UCB,
|
2007-06-27 11:52:06 -05:00
|
|
|
$SOLARSRC, $DEVROOT, $SOLARVER, $SOLARVERSION, $SOLARENV,
|
2002-08-27 05:31:48 -05:00
|
|
|
$STAR_INIROOT, $STAR_INIROOTOLD, $STAR_STANDLST, $STAR_SSCOMMON, $STAR_SSOLARINI,
|
2006-07-05 15:12:45 -05:00
|
|
|
$STAR_REGISTRY, $STAR_RESOURCEPATH, $DMAKEROOT, $CLASSPATH, $XCLASSPATH, $COMPATH,
|
2006-09-25 07:33:27 -05:00
|
|
|
$MSPDB_PATH, $MIDL_PATH, $CSC_PATH,
|
2007-01-25 06:07:59 -06:00
|
|
|
$LD_LIBRARY_PATH, $PATH, $SOLAREXTRAINC, $SOLAREXTRALIB, $SOLARLIB,
|
2007-03-09 02:26:07 -06:00
|
|
|
$SOLARINC, $LOCALINI, $PATHEXTRA, $FRAMEWORKSHOME, $COMEX, $PERL,
|
2007-03-27 04:20:09 -05:00
|
|
|
$COMP_ENV, $ILIB, $JAVAHOME, $PSDK_HOME, $DIRECTXSDK_LIB, $USE_NEW_SDK, $FRAME_HOME,
|
2006-09-25 07:33:27 -05:00
|
|
|
$ATL_LIB, $ATL_INCLUDE, $MFC_LIB, $MFC_INCLUDE, $NO_HIDS, $TEMP, $COMMON_BUILD_TOOLS, $WIN_GREP, $WIN_FIND, $WIN_LS,
|
2005-05-10 01:52:29 -05:00
|
|
|
$WIN_GNUCOPY, $WIN_TOUCH, $STLPORT4, $MOZILLA_VERSION, $MOZILLA_TOOLKIT, $PREBUILD_MOZAB,
|
2004-09-08 09:24:19 -05:00
|
|
|
$PROEXT,
|
2007-06-26 11:48:53 -05:00
|
|
|
$SYSTEM_PYTHON, $PYTHONPATH, $PYTHONHOME, $SYSTEM_MOZILLA);
|
2002-08-27 05:31:48 -05:00
|
|
|
#
|
|
|
|
#-------------------------------------------
|
|
|
|
# IId. Declaring the aliases.
|
|
|
|
#-------------------------------------------
|
|
|
|
#
|
2007-05-09 07:27:09 -05:00
|
|
|
my ( $dmake, $build, $build_client, $nmake, $mkout, $deliver, $zipdep );
|
2002-08-27 05:31:48 -05:00
|
|
|
#
|
|
|
|
|
|
|
|
#-------------------------------------------------------------
|
|
|
|
# IIIa. Initialising constants.
|
|
|
|
#-------------------------------------------------------------
|
|
|
|
#
|
|
|
|
$UPD = '@UPD@'; # the project's UPD
|
|
|
|
$newline = "\n"; # Perl newline character
|
|
|
|
$unsetenv = "unsetenv"; # c-shell command
|
|
|
|
$setenv = "setenv"; # c-shell command
|
|
|
|
$unset = "unset"; # msdos batch file command
|
|
|
|
$set = "set"; # msdos batch file command
|
|
|
|
$ds = "/"; # directory separator
|
|
|
|
$ps = ":"; # path separator
|
|
|
|
$cur_dir = "."; # current directory
|
|
|
|
$par_dir = ".."; # parrent directory
|
|
|
|
$I = " -I"; # include search path
|
|
|
|
$L = " -L"; # library search path
|
|
|
|
$D = " -D"; # define search path
|
|
|
|
$empty = ""; # used as argument
|
2003-08-18 08:54:11 -05:00
|
|
|
$no_stl = "NO_STLPORT4"; # possible argument
|
2002-08-27 05:31:48 -05:00
|
|
|
$warnfile = "warn"; # logfile configure warnings.
|
|
|
|
$Warning = ""; # container for warning messages
|
2003-08-18 08:54:11 -05:00
|
|
|
$STLPORT4 = '@STLPORT4@'; # Location of STLport4
|
2004-09-08 09:24:19 -05:00
|
|
|
$SYSTEM_PYTHON = '@SYSTEM_PYTHON@';
|
2005-03-30 04:38:22 -06:00
|
|
|
$SYSTEM_MOZILLA = '@SYSTEM_MOZILLA@';
|
2005-01-25 09:55:07 -06:00
|
|
|
$JDK = '@JDK@';
|
2003-08-18 08:54:11 -05:00
|
|
|
$MINGW = '@WITH_MINGWIN@'; # use MinGW for Windows build
|
2007-03-27 04:20:09 -05:00
|
|
|
$USE_MINGW = '@USE_MINGW@'; # use MinGW in cygwin or pure-mingw
|
2003-08-18 08:54:11 -05:00
|
|
|
$CC = '@CC@'; # C compiler
|
|
|
|
$CXX = '@CXX@'; # C++ compiler
|
|
|
|
$EXCEPTIONS = '@EXCEPTIONS@'; # Exception handling type
|
2005-03-01 10:17:28 -06:00
|
|
|
$MOZILLA_VERSION = '@MOZILLA_VERSION@'; # mozilla version to use to build mozilla
|
|
|
|
$MOZILLA_TOOLKIT = '@MOZILLA_TOOLKIT@'; # GUI toolkit to use to build mozilla
|
2003-08-18 08:54:11 -05:00
|
|
|
$WRAPCMD = ""; # Wrapper (only for winnt)
|
2004-09-08 09:24:19 -05:00
|
|
|
$GLIBC = ""; # Whether the platform uses glibc
|
|
|
|
$PROEXT = "@PROEXT@";
|
2002-08-27 05:31:48 -05:00
|
|
|
|
|
|
|
#
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# IV. Initialise the warning container and print a note to the user.
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# Add the configure (pre-requisite) warnings to the warning container
|
|
|
|
# , $Warning.
|
|
|
|
AddWarning( "configure", "" );
|
|
|
|
#
|
2003-01-20 08:00:18 -06:00
|
|
|
print ("Setting up the environment for building OpenOffice.org $newline");
|
2002-08-27 05:31:48 -05:00
|
|
|
#
|
|
|
|
#--------------------------------------------------
|
|
|
|
# V. Setting the environment variables/values.
|
|
|
|
#--------------------------------------------------
|
|
|
|
#
|
|
|
|
# A. Checking the platform first.
|
|
|
|
#
|
2005-03-07 10:28:47 -06:00
|
|
|
if ('@LOCAL_SOLENV@' eq "DEFAULT")
|
|
|
|
{ $platform = `../solenv/bin/config.guess`;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{ $platform = `PosixFormat('@LOCAL_SOLENV@')/bin/config.guess`;
|
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
chomp( $platform );
|
|
|
|
|
|
|
|
# get perls idea for OS
|
|
|
|
# needed to differentiate cygwin/native perl on windows
|
|
|
|
$perl_os = $^O;
|
|
|
|
|
|
|
|
#
|
|
|
|
# B. Gathering information from the system.
|
|
|
|
#
|
|
|
|
# 1. Path
|
|
|
|
$oldPATH = $ENV{"PATH"};
|
|
|
|
chomp( $oldPATH ); # cut off new line
|
|
|
|
#
|
|
|
|
# C. Setting the constant values.
|
|
|
|
#
|
|
|
|
# Setting platform independent constant values.
|
|
|
|
print "Setting platform independent values... ";
|
|
|
|
# NB: Language options now set at 'ToFile' stage.
|
|
|
|
$BMP_WRITES_FLAG = "TRUE";
|
|
|
|
$BUILD_SOSL_RELEASE = "TRUE";
|
|
|
|
$RSC_ONCE = "TRUE";
|
|
|
|
$CALL_CDECL = "TRUE";
|
|
|
|
$COMMON_OUTDIR = "";
|
|
|
|
$common_build = "";
|
|
|
|
$NO_REC_RES = "TRUE";
|
2005-06-24 09:49:13 -05:00
|
|
|
$NO_HIDS = "TRUE";
|
2002-08-27 05:31:48 -05:00
|
|
|
$SO3 = "TRUE";
|
2003-08-18 08:54:11 -05:00
|
|
|
$SOLAR_JAVA = "@SOLAR_JAVA@";
|
2002-08-27 05:31:48 -05:00
|
|
|
$SOLAR_PLUGIN = "TRUE";
|
|
|
|
$TF_PACKAGES = "TRUE";
|
|
|
|
$TF_FILEURL = "TRUE";
|
|
|
|
$TF_CFGDATA = "TRUE";
|
|
|
|
$TF_SVDATA = "TRUE";
|
|
|
|
$TF_SDBAPI = "ist_da";
|
|
|
|
$TF_UCB = "ist_da";
|
|
|
|
$UPDATER = "YES";
|
|
|
|
$BUILD_DELIVER = "true";
|
|
|
|
$VCL = "TRUE";
|
|
|
|
$BUILD_SOSL = "true";
|
|
|
|
$ENABLEUNICODE = "TRUE";
|
|
|
|
$NEW_JAR_PACK = "TRUE";
|
|
|
|
$NO_BSYMBOLIC = "TRUE";
|
2003-06-12 04:16:12 -05:00
|
|
|
$comment = "#"; # UNIX script comment character
|
|
|
|
$comment4nt = "rem"; # Windows 4nt script comment character
|
2002-10-22 07:24:17 -05:00
|
|
|
|
2005-10-25 05:24:20 -05:00
|
|
|
# Some JREs do not need the following variable.
|
|
|
|
$JREEXTRALIBDIR = "";
|
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
# Setting platform dependent constant values.
|
2005-03-07 10:28:47 -06:00
|
|
|
if ( $platform =~ m/solaris/ )
|
2002-08-27 05:31:48 -05:00
|
|
|
{ print "Setting Solaris specific values... ";
|
2005-03-07 10:28:47 -06:00
|
|
|
if ($platform =~ m/^i[3456]86/)
|
2005-01-18 07:55:37 -06:00
|
|
|
{
|
|
|
|
if ( $CC =~ "gcc") {
|
2007-01-03 04:33:57 -06:00
|
|
|
$outfile = "SolarisX86GccEnv.Set";
|
2005-01-18 07:55:37 -06:00
|
|
|
$OUTPATH = "unxsogi";
|
|
|
|
} else {
|
2007-01-03 04:33:57 -06:00
|
|
|
$outfile = "SolarisX86Env.Set";
|
2005-01-18 07:55:37 -06:00
|
|
|
$OUTPATH = "unxsoli4";
|
|
|
|
}
|
2002-08-27 05:31:48 -05:00
|
|
|
$CPU = "I";
|
|
|
|
$CPUNAME = "INTEL";
|
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."motif21";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."native_threads";
|
|
|
|
|
2003-08-18 08:54:11 -05:00
|
|
|
}
|
|
|
|
else
|
2005-01-18 07:55:37 -06:00
|
|
|
{
|
|
|
|
if ( $CC =~ "gcc") {
|
|
|
|
$outfile = "SolarisSparcGccEnv.Set";
|
|
|
|
$OUTPATH = "unxsogs";
|
|
|
|
} else {
|
|
|
|
$outfile = "SolarisSparcEnv.Set";
|
|
|
|
$OUTPATH = "unxsols4";
|
|
|
|
}
|
2002-08-27 05:31:48 -05:00
|
|
|
$CPU = "S";
|
|
|
|
$CPUNAME = "SPARC";
|
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."sparc";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."sparc".$ds."motif21";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."sparc".$ds."native_threads";
|
2003-08-18 08:54:11 -05:00
|
|
|
}
|
2005-01-18 07:55:37 -06:00
|
|
|
|
|
|
|
if ( $CC =~ "gcc") {
|
|
|
|
$COM = "GCC";
|
|
|
|
$CVER = "C300";
|
|
|
|
} else {
|
|
|
|
$COM = "C52";
|
|
|
|
$CVER = "C52";
|
|
|
|
$COMEX = 4;
|
|
|
|
}
|
2003-08-18 08:54:11 -05:00
|
|
|
$BIG_SVX = "TRUE";
|
|
|
|
$COMPATH = '@COMPATH@';
|
|
|
|
$GUI = "UNX";
|
|
|
|
$GUIBASE = "unx";
|
|
|
|
$GUIENV = "sal";
|
|
|
|
$GVER = "VCL";
|
|
|
|
$INPATH = $OUTPATH.$PROEXT;
|
|
|
|
$GVERDIR = $INPATH;
|
|
|
|
$OS = "SOLARIS";
|
|
|
|
$PATH_SEPERATOR = $ps;
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
elsif ( $platform =~ m/netbsd/ )
|
2004-02-25 06:50:35 -06:00
|
|
|
{
|
2005-07-14 07:45:49 -05:00
|
|
|
#Set platform specific values:
|
2005-03-07 10:28:47 -06:00
|
|
|
if ($platform =~ m/^i[3456]86/)
|
2007-01-03 04:33:57 -06:00
|
|
|
{ print "Setting NetBSD x86 specific values... ";
|
|
|
|
$outfile = "NetBSDX86Env.Set";
|
2004-02-25 06:50:35 -06:00
|
|
|
$CPU = "I";
|
|
|
|
$CPUNAME = "INTEL";
|
|
|
|
$OUTPATH = "unxbsdi";
|
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."client";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."native_threads";
|
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
elsif ($platform =~ m/^sparc/)
|
2004-02-25 06:50:35 -06:00
|
|
|
{ print "Setting NetBSD Sparc specific values... ";
|
|
|
|
$outfile = "NetBSDSparcEnv.Set";
|
|
|
|
$CPU = "S";
|
|
|
|
$CPUNAME = "SPARC";
|
|
|
|
$OUTPATH = "unxbsds";
|
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."sparc";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."sparc".$ds."client";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."sparc".$ds."native_threads";
|
|
|
|
}
|
2005-07-14 07:45:49 -05:00
|
|
|
elsif ($platform =~ m/powerpc/)
|
2004-02-25 06:50:35 -06:00
|
|
|
{ print "Setting NetBSD PPC specific values... ";
|
|
|
|
$outfile = "NetBSDPPCEnv.Set";
|
|
|
|
$CPU = "P";
|
|
|
|
$CPUNAME = "POWERPC";
|
|
|
|
$OUTPATH = "unxbsdppc";
|
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."ppc";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."ppc".$ds."classic";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."ppc".$ds."native_threads";
|
|
|
|
}
|
|
|
|
else
|
2005-03-07 10:28:47 -06:00
|
|
|
{ print "Unsupported NetBSD architecture: $platform \n";
|
2004-02-25 06:50:35 -06:00
|
|
|
exit 1;
|
|
|
|
}
|
|
|
|
#Conditional setting depending on gcc3:
|
|
|
|
$CVER = "C300";
|
2004-09-08 09:24:19 -05:00
|
|
|
$OUTPATH = $OUTPATH."2";
|
2004-02-25 06:50:35 -06:00
|
|
|
# General NetBSD settings:
|
|
|
|
$BIG_SVX = "TRUE";
|
|
|
|
$COM = "GCC";
|
|
|
|
$COMPATH = '@COMPATH@';
|
|
|
|
$GUI = "UNX";
|
|
|
|
$GUIBASE = "unx";
|
|
|
|
$GUIENV = "sal";
|
|
|
|
$GVER = "VCL";
|
|
|
|
$INPATH = $OUTPATH.$PROEXT;
|
|
|
|
$GVERDIR = $INPATH;
|
|
|
|
$OS = "NETBSD";
|
|
|
|
$PATH_SEPERATOR = $ps;
|
|
|
|
$XPVERSION = "3";
|
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
elsif ( $platform =~ m/freebsd/ )
|
2006-07-19 03:36:28 -05:00
|
|
|
{ $BIG_SVX = "TRUE";
|
2002-08-27 05:31:48 -05:00
|
|
|
$COM = "GCC";
|
|
|
|
$COMPATH = '@COMPATH@';
|
2004-09-08 09:24:19 -05:00
|
|
|
$CVER = "C300";
|
2002-08-27 05:31:48 -05:00
|
|
|
$GUI = "UNX";
|
|
|
|
$GUIBASE = "unx";
|
|
|
|
$GUIENV = "sal";
|
|
|
|
$GVER = "VCL";
|
|
|
|
$OS = "FREEBSD";
|
|
|
|
$PATH_SEPERATOR = $ps;
|
|
|
|
$XPVERSION = "3";
|
|
|
|
$OSVERSION = '@OSVERSION@';
|
2006-07-19 03:36:28 -05:00
|
|
|
if ($platform =~ m/^amd64/)
|
|
|
|
{ my ( $JAVA_OS );
|
|
|
|
print "Setting FreeBSD AMD64 specific values... ";
|
|
|
|
$outfile = "FreeBSDAMDEnv.Set";
|
|
|
|
$CPU = "X";
|
|
|
|
$CPUNAME = "X86_64";
|
|
|
|
$OUTPATH = "unxfbsdx";
|
|
|
|
$JAVA_OS = '@JAVA_HOME@';
|
|
|
|
$JAVA_OS =~ s/.*\///;
|
|
|
|
if ($JAVA_OS =~ m/^linux/)
|
|
|
|
{ $JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."client";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."native_threads";
|
|
|
|
$JREEXTRALIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."xawt";
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{ $JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."amd64";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."amd64".$ds."server";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."amd64".$ds."native_threads";
|
|
|
|
$JREEXTRALIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."amd64".$ds."xawt";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
elsif ($platform =~ m/^i386/)
|
2007-01-03 04:33:57 -06:00
|
|
|
{ print "Setting FreeBSD x86 specific values... ";
|
|
|
|
$outfile = "FreeBSDX86Env.Set";
|
2006-07-19 03:36:28 -05:00
|
|
|
$CPU = "I";
|
|
|
|
$CPUNAME = "INTEL";
|
|
|
|
$OUTPATH = "unxfbsdi";
|
2002-08-27 05:31:48 -05:00
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."client";
|
2003-06-12 04:16:12 -05:00
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."native_threads";
|
2006-04-27 01:47:03 -05:00
|
|
|
$JREEXTRALIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."xawt";
|
2006-07-19 03:36:28 -05:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{ print "Unsupported FreeBSD architecture: $platform \n";
|
|
|
|
exit 1;
|
|
|
|
}
|
|
|
|
if( @GCCVER@ >= 30401 ) {
|
|
|
|
$CVER = "C341";
|
|
|
|
}
|
|
|
|
$INPATH = $OUTPATH.$PROEXT;
|
|
|
|
$GVERDIR = $INPATH;
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
elsif ( $platform =~ m/linux-gnu/ )
|
2002-08-27 05:31:48 -05:00
|
|
|
{
|
2005-02-24 07:44:57 -06:00
|
|
|
# General Linux settings:
|
|
|
|
$CVER = "C300";
|
|
|
|
$BIG_SVX = "TRUE";
|
|
|
|
$COM = "GCC";
|
|
|
|
$COMPATH = '@COMPATH@';
|
|
|
|
$GLIBC = "2REDHAT60";
|
|
|
|
$GUI = "UNX";
|
|
|
|
$GUIBASE = "unx";
|
|
|
|
$GUIENV = "sal";
|
|
|
|
$GVER = "VCL";
|
|
|
|
$OS = "LINUX";
|
|
|
|
$PATH_SEPERATOR = $ps;
|
|
|
|
$XPVERSION = "3";
|
|
|
|
|
2005-07-14 07:45:49 -05:00
|
|
|
#Set platform specific values:
|
2005-03-07 10:28:47 -06:00
|
|
|
if ($platform =~ m/^i[3456]86/)
|
2007-01-03 04:33:57 -06:00
|
|
|
{ print "Setting Linux x86 specific values... ";
|
|
|
|
$outfile = "LinuxX86Env.Set";
|
2002-08-27 05:31:48 -05:00
|
|
|
$CPU = "I";
|
|
|
|
$CPUNAME = "INTEL";
|
2005-08-18 02:21:30 -05:00
|
|
|
|
|
|
|
if ($JDK =~ m/^[Ii][Bb][Mm]/)
|
|
|
|
{ $JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."bin";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."bin".$ds."classic";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."bin"; }
|
|
|
|
|
2005-10-25 05:24:20 -05:00
|
|
|
elsif ($JDK =~ m/^[Bb][Ee][Aa]/)
|
|
|
|
{ $JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386";
|
|
|
|
$JREEXTRALIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."xawt";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."jrockit";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."native_threads"; }
|
|
|
|
|
2005-08-18 02:21:30 -05:00
|
|
|
else {
|
2002-08-27 05:31:48 -05:00
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386";
|
2005-10-25 05:24:20 -05:00
|
|
|
$JREEXTRALIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."xawt";
|
2002-08-27 05:31:48 -05:00
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."client";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."i386".$ds."native_threads";
|
2005-08-18 02:21:30 -05:00
|
|
|
}
|
|
|
|
|
2005-02-24 07:44:57 -06:00
|
|
|
if( @GCCVER@ >= 30401 ) {
|
|
|
|
$OUTPATH = "unxlngi6";
|
|
|
|
$CVER = "C341";
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$OUTPATH = "unxlngi4";
|
|
|
|
}
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
elsif ($platform =~ m/^x86_64/)
|
2004-02-04 08:08:23 -06:00
|
|
|
{ print "Setting Linux x86-64 specific values... ";
|
2006-05-04 02:44:18 -05:00
|
|
|
$outfile = "LinuxX86-64Env.Set";
|
2004-02-04 08:08:23 -06:00
|
|
|
$CPU = "X";
|
|
|
|
$CPUNAME = "X86_64";
|
2005-10-05 05:37:08 -05:00
|
|
|
$CVER = "C341";
|
|
|
|
$OUTPATH = "unxlngx6";
|
2004-02-04 08:08:23 -06:00
|
|
|
# Blackdown.org JDK porting project uses `amd64' and `server' in JDK 1.4.2 RC1
|
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."amd64";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."amd64".$ds."server";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."amd64".$ds."native_threads";
|
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
elsif ($platform =~ m/^sparc/)
|
2003-06-12 04:16:12 -05:00
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
{ print "Setting Linux Sparc specific values... ";
|
|
|
|
$outfile = "LinuxSparcEnv.Set";
|
|
|
|
$CPU = "S";
|
|
|
|
$CPUNAME = "SPARC";
|
|
|
|
$OUTPATH = "unxlngs";
|
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."sparc";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."sparc".$ds."client";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."sparc".$ds."native_threads";
|
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
elsif ($platform =~ m/^powerpc/)
|
2007-06-18 10:36:33 -05:00
|
|
|
{
|
|
|
|
if (($platform =~ m/^powerpc64/) && ('@SIZEOF_LONG@' eq '8')) {
|
|
|
|
print "Setting Linux PPC64 specific values... ";
|
|
|
|
$outfile = "LinuxPPC64Env.Set";
|
|
|
|
$OUTPATH = "unxlngppc64";
|
|
|
|
$CPUNAME = "POWERPC64";
|
|
|
|
|
|
|
|
if ( $JDK eq "gcj" ) {
|
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."ppc64";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."ppc64".$ds."client";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."ppc64".$ds."native_threads";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
print "Setting Linux PPC specific values... ";
|
|
|
|
$outfile = "LinuxPPCEnv.Set";
|
|
|
|
$OUTPATH = "unxlngppc";
|
|
|
|
$CPUNAME = "POWERPC";
|
|
|
|
|
|
|
|
if ( $JDK eq "gcj" ) {
|
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."ppc";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."ppc".$ds."client";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."ppc".$ds."native_threads";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
$CPU = "P";
|
2007-06-18 10:36:33 -05:00
|
|
|
|
|
|
|
# the "standard" ppc j2sdk is IBMJava2-ppc-142
|
2006-08-11 10:19:16 -05:00
|
|
|
if ( $JDK ne "gcj" ) {
|
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."bin";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."bin".$ds."classic";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."bin";
|
|
|
|
}
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
elsif ($platform =~ m/^s390/)
|
2003-01-20 08:00:18 -06:00
|
|
|
{ print "Setting Linux S/390 specific values... ";
|
|
|
|
$outfile = "LinuxS390Env.Set";
|
|
|
|
$CPU = "3";
|
|
|
|
$CPUNAME = "S390";
|
|
|
|
$OUTPATH = "unxlngs390";
|
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."s390";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."s390".$ds."client";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."s390".$ds."native_threads";
|
|
|
|
}
|
2005-07-14 07:45:49 -05:00
|
|
|
elsif ($platform =~ m/^alpha/)
|
2002-08-27 05:31:48 -05:00
|
|
|
{ print "Setting Linux Alpha specific values... ";
|
|
|
|
$outfile = "LinuxAlphaEnv.Set";
|
|
|
|
$CPU = "A";
|
2003-04-28 11:02:16 -05:00
|
|
|
$CPUNAME = "ALPHA_";
|
2002-08-27 05:31:48 -05:00
|
|
|
$OUTPATH = "unxlnga";
|
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."alpha";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."alpha".$ds."client";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."alpha".$ds."native_threads";
|
|
|
|
}
|
2005-07-14 07:45:49 -05:00
|
|
|
elsif ($platform =~ m/^arm[45]l/)
|
2002-08-27 05:31:48 -05:00
|
|
|
{ print "Setting Linux ARM specific values... ";
|
|
|
|
$outfile = "LinuxARMEnv.Set";
|
|
|
|
$CPU = "R";
|
|
|
|
$CPUNAME = "ARM";
|
|
|
|
$OUTPATH = "unxlngr";
|
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."arm";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."arm".$ds."client";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."arm".$ds."native_threads";
|
|
|
|
}
|
|
|
|
|
2005-02-24 07:44:57 -06:00
|
|
|
$INPATH = $OUTPATH.$PROEXT;
|
|
|
|
$GVERDIR = $INPATH;
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
elsif ( $platform =~ m/osf1/ )
|
2002-08-27 05:31:48 -05:00
|
|
|
{ print "Setting Tru64 specific values... ";
|
|
|
|
$outfile = "Tru64AlphaEnv.Set";
|
|
|
|
$BIG_SVX = "TRUE";
|
|
|
|
$COM = "CXX";
|
|
|
|
$COMPATH = '@COMPATH@';
|
|
|
|
$CPU = "A";
|
2003-04-28 11:02:16 -05:00
|
|
|
$CPUNAME = "ALPHA_";
|
2002-08-27 05:31:48 -05:00
|
|
|
$CVER = "C62";
|
|
|
|
$GUI = "UNX";
|
|
|
|
$GUIBASE = "unx";
|
|
|
|
$GUIENV = "sal";
|
|
|
|
$GVER = "VCL";
|
|
|
|
$OUTPATH = "unxt64";
|
|
|
|
$INPATH = $OUTPATH.$PROEXT;
|
|
|
|
$GVERDIR = $INPATH;
|
|
|
|
$OS = "TRU64";
|
|
|
|
$PATH_SEPERATOR = $ps;
|
|
|
|
$XPVERSION = "3";
|
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."alpha";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."alpha".$ds."client";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."alpha".$ds."native_threads";
|
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
elsif ( $platform =~ m/irix/ )
|
2002-08-27 05:31:48 -05:00
|
|
|
{ print "Setting Irix specific values... ";
|
|
|
|
$outfile = "IrixMipsEnv.Set";
|
|
|
|
$BIG_SVX = "TRUE";
|
2003-01-20 08:00:18 -06:00
|
|
|
if ($CC =~ "gcc" ) {
|
|
|
|
$COM = "GCC";
|
|
|
|
$OUTPATH = "unxirgm";
|
2004-09-08 09:24:19 -05:00
|
|
|
$CVER = "C300";
|
2003-08-18 08:54:11 -05:00
|
|
|
}
|
|
|
|
else {
|
2002-08-27 05:31:48 -05:00
|
|
|
$COM = "C730";
|
|
|
|
$CVER = "C730";
|
|
|
|
$OUTPATH = "unxirxm3";
|
|
|
|
}
|
|
|
|
$COMPATH = '@COMPATH@';
|
|
|
|
$CPU = "M";
|
|
|
|
$CPUNAME = "MIPS";
|
|
|
|
$GUI = "UNX";
|
|
|
|
$GUIBASE = "unx";
|
|
|
|
$GUIENV = "sal";
|
|
|
|
$GVER = "VCL";
|
|
|
|
$INPATH = $OUTPATH.$PROEXT;
|
|
|
|
$GVERDIR = $INPATH;
|
|
|
|
$OS = "IRIX";
|
|
|
|
$PATH_SEPERATOR = $ps;
|
|
|
|
$XPVERSION = "3";
|
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."mips";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."mips".$ds."client";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."mips".$ds."native_threads";
|
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
elsif ( $platform =~ m/cygwin/ )
|
2002-08-27 05:31:48 -05:00
|
|
|
{
|
|
|
|
$COMPATH = PosixFormat('@COMPATH@');
|
2003-08-18 08:54:11 -05:00
|
|
|
$MSPDB_PATH = PosixFormat('@MSPDB_PATH@');
|
|
|
|
$MIDL_PATH = PosixFormat('@MIDL_PATH@');
|
2003-12-01 10:39:16 -06:00
|
|
|
$CSC_PATH = PosixFormat('@CSC_PATH@');
|
2002-10-22 07:24:17 -05:00
|
|
|
$PSDK_HOME = PosixFormat('@PSDK_HOME@');
|
2007-03-27 04:20:09 -05:00
|
|
|
$DIRECTXSDK_LIB = PosixFormat('@DIRECTXSDK_LIB@');
|
2003-12-01 10:39:16 -06:00
|
|
|
$FRAME_HOME = PosixFormat('@FRAME_HOME@');
|
2003-03-19 09:03:25 -06:00
|
|
|
$USE_NEW_SDK = "TRUE";
|
2002-08-27 05:31:48 -05:00
|
|
|
$CPUNAME = "INTEL";
|
|
|
|
$CPU = "I";
|
|
|
|
$GUI = "WNT";
|
|
|
|
$GUIBASE = "WIN";
|
|
|
|
$GUIENV = "WNT";
|
|
|
|
$GVER = "NT351";
|
|
|
|
$OS = "WNT";
|
|
|
|
$DYNAMIC_CRT = "TRUE";
|
|
|
|
$SET_EXCEPTIONS = "TRUE";
|
|
|
|
$use_shl_versions = "TRUE";
|
2003-06-12 04:16:12 -05:00
|
|
|
if ( $MINGW eq "yes" )
|
|
|
|
{ # At the moment this implies the use of tcsh
|
|
|
|
print "Setting Windows NT cygwin MinGW specific values... ";
|
2006-09-15 05:19:23 -05:00
|
|
|
$WRAPCMD = "guw.exe";
|
2003-03-19 09:03:25 -06:00
|
|
|
$outfile = "winmingw.set";
|
2002-08-27 05:31:48 -05:00
|
|
|
$COM = "GCC";
|
2007-03-27 04:20:09 -05:00
|
|
|
$COMPATH =~ s/\/bin$//i;
|
|
|
|
if ( $USE_MINGW ne "cygwin" )
|
|
|
|
{ $CC = $WRAPCMD." ".$CC;
|
|
|
|
$CXX = $WRAPCMD." ".$CXX;
|
|
|
|
}
|
|
|
|
$CVER = "C341";
|
2002-08-27 05:31:48 -05:00
|
|
|
$OUTPATH = "wntgcci";
|
|
|
|
$INPATH = $OUTPATH.$PROEXT;
|
|
|
|
$GVERDIR = $INPATH;
|
|
|
|
$PATH_SEPERATOR = ':';
|
2007-05-25 05:10:05 -05:00
|
|
|
$ATL_INCLUDE = '$SOLARVER'.$ds.'$INPATH'.$ds."inc".$ds."external".$ds."mingw".$ds."include".$ds."atl". " ".'$PSDK_HOME'.$ds."include".$ds."atl";
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2003-06-12 04:16:12 -05:00
|
|
|
else # The MSVC section starts here
|
|
|
|
{ $outfile = "winenv.set";
|
2002-08-27 05:31:48 -05:00
|
|
|
$COM = "MSC";
|
2003-06-12 04:16:12 -05:00
|
|
|
# COMPATH for MSC is differently used
|
|
|
|
$COMPATH =~ s/\/bin$//i;
|
|
|
|
$OUTPATH = "wntmsci@COMEX@";
|
2002-08-27 05:31:48 -05:00
|
|
|
$INPATH = $OUTPATH.$PROEXT;
|
|
|
|
$GVERDIR = $INPATH;
|
2003-06-12 04:16:12 -05:00
|
|
|
$COMEX = '@COMEX@';
|
2004-03-09 05:31:38 -06:00
|
|
|
if ( "@COMEX@" eq "10" ) { # .NET 2003 needs M1310
|
|
|
|
$CVER = "M1310";
|
2006-09-25 07:33:27 -05:00
|
|
|
$ATL_LIB = $COMPATH.$ds."atlmfc".$ds."lib";
|
|
|
|
$ATL_INCLUDE = $COMPATH.$ds."atlmfc".$ds."include";
|
|
|
|
$MFC_LIB = "";
|
|
|
|
$MFC_INCLUDE = "";
|
|
|
|
} elsif ( "@COMEX@" eq "11" ) { # .NET 2005 needs M1400
|
|
|
|
$CVER = "M1400";
|
2006-10-24 09:34:49 -05:00
|
|
|
if ( "@DISABLE_ACTIVEX@" ) {
|
2006-09-25 07:33:27 -05:00
|
|
|
$ATL_LIB = $PSDK_HOME.$ds."lib"; # Doesn't exist for VSE
|
|
|
|
$ATL_INCLUDE = $PSDK_HOME.$ds."include".$ds."atl";
|
|
|
|
$MFC_LIB = $PSDK_HOME.$ds."lib"; # Doesn't exist for VSE
|
|
|
|
$MFC_INCLUDE = $PSDK_HOME.$ds."include".$ds."mfc";
|
|
|
|
} else {
|
|
|
|
$ATL_LIB = $COMPATH.$ds."atlmfc".$ds."lib";
|
|
|
|
$ATL_INCLUDE = $COMPATH.$ds."atlmfc".$ds."include";
|
|
|
|
$MFC_LIB = $COMPATH.$ds."atlmfc".$ds."lib";
|
|
|
|
$MFC_INCLUDE = $PSDK_HOME.$ds."include".$ds."mfc";
|
|
|
|
}
|
2004-03-09 05:31:38 -06:00
|
|
|
} else { # Unsupported
|
|
|
|
die "Unsupported value for COMEX variable.\n";
|
2003-06-12 04:16:12 -05:00
|
|
|
}
|
2007-06-26 11:48:53 -05:00
|
|
|
if ( "@USE_SHELL@" ne "4nt" )
|
2003-06-12 04:16:12 -05:00
|
|
|
{ print "Setting Windows NT cygwin without 4NT specific values... ";
|
2006-09-15 05:19:23 -05:00
|
|
|
$WRAPCMD = "guw.exe";
|
2003-06-12 04:16:12 -05:00
|
|
|
$CC = $WRAPCMD." ".$CC;
|
|
|
|
$CXX = $WRAPCMD." ".$CXX;
|
2002-08-27 05:31:48 -05:00
|
|
|
$PATH_SEPERATOR = ':';
|
|
|
|
}
|
2003-06-12 04:16:12 -05:00
|
|
|
else # "@USE_SHELL@" ne "4nt"
|
|
|
|
{ print "Setting Windows NT with 4NT specific values... ";
|
2002-08-27 05:31:48 -05:00
|
|
|
# Change path to lower case.
|
|
|
|
$COMPATH = lc $COMPATH;
|
|
|
|
$PATH_SEPERATOR = ';';
|
2003-06-12 04:16:12 -05:00
|
|
|
}
|
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
elsif ( $platform =~ m/darwin/ )
|
2003-03-19 09:03:25 -06:00
|
|
|
{ print "Setting Mac OS X/Darwin specific values... ";
|
2002-08-27 05:31:48 -05:00
|
|
|
$BIG_SVX = "TRUE";
|
|
|
|
$COM = "GCC";
|
|
|
|
$COMPATH = '@COMPATH@';
|
2006-02-03 10:36:16 -06:00
|
|
|
if ($platform =~ m/^i[3456]86/)
|
|
|
|
{
|
2007-01-03 04:33:57 -06:00
|
|
|
print "Setting values for Mac OS X/Darwin on x86... ";
|
|
|
|
$outfile = "MacOSXX86Env.Set";
|
2006-02-03 10:36:16 -06:00
|
|
|
$CPU = "I";
|
|
|
|
$CPUNAME = "INTEL";
|
|
|
|
$OUTPATH = "unxmacxi";
|
|
|
|
}
|
|
|
|
elsif ($platform =~ m/^powerpc/)
|
|
|
|
{
|
|
|
|
print "Setting values for Mac OS X/Darwin on PowerPC... ";
|
|
|
|
$outfile = "MacOSXPPCEnv.Set";
|
|
|
|
$CPU = "P";
|
|
|
|
$CPUNAME = "POWERPC";
|
|
|
|
$OUTPATH = "unxmacxp";
|
|
|
|
}
|
2007-05-10 10:40:35 -05:00
|
|
|
if (@GCCVER@ >= 30401) {
|
|
|
|
$CVER = "C341";
|
|
|
|
} else {
|
|
|
|
$CVER = "C300";
|
|
|
|
}
|
2002-08-27 05:31:48 -05:00
|
|
|
$GUI = "UNX";
|
|
|
|
$GUIENV = "sal";
|
|
|
|
$GVER = "VCL";
|
|
|
|
$INPATH = $OUTPATH.$PROEXT;
|
|
|
|
$GVERDIR = $INPATH;
|
|
|
|
$OS = "MACOSX";
|
|
|
|
$PATH_SEPERATOR = $ps;
|
|
|
|
# GUIBASE is set below; may be "aqua" or "unx".
|
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
elsif ( $platform =~ m/aix/ )
|
2003-08-18 08:54:11 -05:00
|
|
|
{
|
2005-07-14 07:45:49 -05:00
|
|
|
if( $platform !~ m/^powerpc/ )
|
2003-08-18 08:54:11 -05:00
|
|
|
{
|
|
|
|
print "\nAIX has only been ported and tested on powerpc\n";
|
2005-07-14 07:45:49 -05:00
|
|
|
AddWarning( "set_soenv", "Platform $platform has not been tested");
|
2003-08-18 08:54:11 -05:00
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
print "Setting AIX PPC specific values... ";
|
2003-08-18 08:54:11 -05:00
|
|
|
$outfile = "aixPPCEnv.Set";
|
|
|
|
$CPU = "P";
|
|
|
|
$CPUNAME = "POWERPC";
|
|
|
|
$OUTPATH = "unxlngppc";
|
|
|
|
$JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."ppc";
|
|
|
|
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."ppc".$ds."classic";
|
|
|
|
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."ppc".$ds."native_threads";
|
|
|
|
$BIG_SVX = "TRUE";
|
|
|
|
$COM = "GCC";
|
|
|
|
$CVER = "C300";
|
|
|
|
$COMPATH = '@COMPATH@';
|
|
|
|
$GUI = "UNX";
|
|
|
|
$GUIBASE = "unx";
|
|
|
|
$GUIENV = "sal";
|
|
|
|
$GVER = "VCL";
|
|
|
|
$INPATH = $OUTPATH.$PROEXT;
|
|
|
|
$GVERDIR = $INPATH;
|
|
|
|
$OS = "AIX";
|
|
|
|
$PATH_SEPERATOR = $ps;
|
|
|
|
$XPVERSION = "3";
|
|
|
|
}
|
2003-06-12 04:16:12 -05:00
|
|
|
else {
|
2003-08-18 08:54:11 -05:00
|
|
|
print "\nset_soenv: Cannot figure out what platform you are running\n";
|
2005-07-14 07:45:49 -05:00
|
|
|
print "For $platform.\n";
|
2003-06-12 04:16:12 -05:00
|
|
|
exit 1;
|
|
|
|
}
|
2002-08-27 05:31:48 -05:00
|
|
|
print "done\n";
|
|
|
|
|
|
|
|
#
|
|
|
|
# D. Gathering directory information from the user.
|
|
|
|
#
|
2005-03-08 09:35:34 -06:00
|
|
|
# If the directory does not exist something is strange.
|
2003-01-20 08:00:18 -06:00
|
|
|
# 1. OpenOffice.org build home directory.
|
2002-08-27 05:31:48 -05:00
|
|
|
$SRC_ROOT = `pwd`;
|
|
|
|
$SRC_ROOT =~ s/\/config_office//;
|
|
|
|
chomp($SRC_ROOT);
|
|
|
|
CheckPathExist( $SRC_ROOT );
|
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------------------------------
|
|
|
|
# Copy top level makefile from config_office/ to $SRC_ROOT
|
|
|
|
#-----------------------------------------------------------------------------------------------------
|
|
|
|
if (! -e "makefile.rc")
|
|
|
|
{ AddWarning( "set_soenv", "makefile.rc not found in config_office/. Could not copy to SRC_ROOT." );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{ `cp -f makefile.rc $SRC_ROOT/makefile.mk`;
|
|
|
|
}
|
|
|
|
|
|
|
|
# 2. Java home directory.
|
2003-04-28 11:02:16 -05:00
|
|
|
# JAVA_HOME as argument from autoconf.
|
|
|
|
$JAVA_HOME = PosixFormat('@JAVA_HOME@') ;
|
2002-10-22 07:24:17 -05:00
|
|
|
|
2005-03-07 10:28:47 -06:00
|
|
|
if ( $platform =~ m/cygwin/ ) {
|
2002-08-27 05:31:48 -05:00
|
|
|
$JAVA_HOME =~ s/[\s\/]+$//; # remove trailing \n or \/ if there is any.
|
|
|
|
}
|
2006-07-05 16:32:39 -05:00
|
|
|
# 3. shell path.
|
|
|
|
# Check whether autoconf found a valid shell path.
|
|
|
|
if ("@USE_SHELL@" eq "tcsh")
|
2002-08-27 05:31:48 -05:00
|
|
|
{ # SHELL as argument from autoconf.
|
2006-07-05 16:32:39 -05:00
|
|
|
$SHELL_PATH = '@SHELLPATH@';
|
|
|
|
$SHELL = '@SHELLPATH@'."\/tcsh";
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2006-07-05 16:32:39 -05:00
|
|
|
elsif ("@USE_SHELL@" eq "bash")
|
|
|
|
{
|
|
|
|
$SHELL_PATH = '@SHELLPATH@';
|
|
|
|
$SHELL = '@SHELLPATH@'."\/bash";
|
|
|
|
}
|
|
|
|
elsif ("@USE_SHELL@" eq "4nt")
|
|
|
|
{ # @SHELLPATH@ is NO_SHELLPATH_NEEDED for 4nt -
|
|
|
|
$SHELL_PATH = '';
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
die "Not a recognized shell: @USE_SHELL@ !";
|
|
|
|
}
|
|
|
|
|
2003-04-28 11:02:16 -05:00
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
if ( '@STLPORT4@' eq $no_stl )
|
2003-04-28 11:02:16 -05:00
|
|
|
{
|
2002-08-27 05:31:48 -05:00
|
|
|
$STLPORT4 = "$no_stl";
|
|
|
|
}
|
|
|
|
|
|
|
|
# ml.exe assembler path for Windows users.
|
2005-03-07 10:28:47 -06:00
|
|
|
if ($platform =~ m/cygwin/)
|
2003-04-28 11:02:16 -05:00
|
|
|
{ $ASM_PATH = PosixFormat('@ASM_HOME@');
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2005-03-30 04:38:22 -06:00
|
|
|
|
|
|
|
# Check for prebuild mozab libraries if we don't build them # ourselves
|
|
|
|
# and we're also not using the external system mozilla installation.
|
|
|
|
#
|
|
|
|
# FIXME! This check should be done in configure and not here, but
|
|
|
|
# the $OS, $COM, $CPU variables are not yet present there.
|
|
|
|
#
|
|
|
|
if ( "@WITH_MOZILLA@" eq "YES" and "@BUILD_MOZAB@" ne "TRUE" and "@SYSTEM_MOZILLA@" ne "YES" )
|
|
|
|
{ print("\nChecking for prebuilt Mozilla libraries ...");
|
|
|
|
my $mozbinfile = $SRC_ROOT."/moz/zipped/";
|
|
|
|
if ( $^O eq 'MSWin32' ) {
|
|
|
|
chomp( $mozbinfile = qx{cygpath -d "$mozbinfile"} );
|
|
|
|
}
|
|
|
|
$mozbinfile .= $OS.$COM.$CPU;
|
|
|
|
if ( -e $mozbinfile."inc.zip"
|
|
|
|
and -e $mozbinfile."lib.zip"
|
|
|
|
and -e $mozbinfile."runtime.zip" )
|
|
|
|
{ print " found.\n";
|
2005-05-10 01:52:29 -05:00
|
|
|
$PREBUILD_MOZAB = "YES";
|
2005-03-30 04:38:22 -06:00
|
|
|
}
|
|
|
|
else
|
2005-06-20 09:18:00 -05:00
|
|
|
{ print " not found!\n\n";
|
|
|
|
print "If you don\'t use the system mozilla and also not build the needed\n";
|
2005-03-30 04:38:22 -06:00
|
|
|
print "mozilla libraries yourself you have to provide the needed files\n";
|
|
|
|
print "$OS$COM$CPU\{inc,lib,runtime\}.zip in moz/zipped/ .\n";
|
2005-06-20 09:18:00 -05:00
|
|
|
print "These files can be found here:\n";
|
|
|
|
print " <http://tools.openoffice.org/moz_prebuild/680/>.\n\n";
|
2005-03-30 04:38:22 -06:00
|
|
|
die;
|
|
|
|
}
|
|
|
|
}
|
2005-05-10 01:52:29 -05:00
|
|
|
else
|
|
|
|
{
|
|
|
|
$PREBUILD_MOZAB = "";
|
|
|
|
}
|
2005-03-30 04:38:22 -06:00
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
#
|
|
|
|
# E. Determining the envionment values based on the information
|
|
|
|
# that was gathered earlier on.
|
|
|
|
#
|
|
|
|
print "Setting the environment variables... ";
|
|
|
|
$USR = $ds."usr";
|
|
|
|
$ETC = $ds."etc";
|
|
|
|
$BIN = $ds."bin";
|
|
|
|
$LIB = $ds."lib";
|
2004-02-04 08:08:23 -06:00
|
|
|
$LIB64 = $ds."lib";
|
|
|
|
$LIB64 .= "64"
|
2005-03-07 10:28:47 -06:00
|
|
|
if ($platform =~ m/x86_64-.*-linux-gnu/);
|
2007-06-18 10:36:33 -05:00
|
|
|
$LIB64 .= "64"
|
|
|
|
if (($platform =~ m/powerpc64-.*-linux-gnu/) && ('@SIZEOF_LONG@' eq '8'));
|
2002-08-27 05:31:48 -05:00
|
|
|
$INC = $ds."inc";
|
|
|
|
$INCLUDE = $ds."include";
|
|
|
|
$DEV = $ds."dev";
|
|
|
|
$OPT = $ds."opt";
|
|
|
|
$LOCAL = $ds."local";
|
|
|
|
$SOLENV = $ds."solenv";
|
|
|
|
$SOLVER = $ds."solver";
|
|
|
|
$CONFIG = $ds."config";
|
|
|
|
$USR_BIN = $USR.$BIN;
|
2004-02-04 08:08:23 -06:00
|
|
|
$USR_LIB = $USR.$LIB64;
|
2002-08-27 05:31:48 -05:00
|
|
|
$USR_LOCAL = $USR.$ds."local";
|
|
|
|
$USR_CCS = $USR.$ds."ccs";
|
|
|
|
$USR_OPENWIN = $USR.$ds."openwin";
|
|
|
|
$USR_DT = $USR.$ds."dt";
|
|
|
|
$COMMON_BUILD_TOOLS = '$SRC_ROOT'.$ds."external".$ds."common";
|
|
|
|
|
2002-10-22 07:24:17 -05:00
|
|
|
# Generate alternate output file for sh?
|
2006-05-04 03:25:34 -05:00
|
|
|
$outfile_sh = $outfile.".sh";
|
|
|
|
if ("@USE_SHELL@" eq "4nt") {
|
|
|
|
# Generate output file for 4nt?
|
|
|
|
$outfile_bat = $outfile;
|
|
|
|
$outfile_bat =~ s/set$/bat/i;
|
|
|
|
} else {
|
|
|
|
undef $outfile_bat;
|
2003-03-19 09:03:25 -06:00
|
|
|
}
|
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
if ($STLPORT4 ne $no_stl) {
|
2004-02-04 08:08:23 -06:00
|
|
|
$ps_STLPORT_LIB = $ps.'$STLPORT4'.$LIB64;
|
|
|
|
$L_STLPORT_LIB = $L.'$STLPORT4'.$LIB64;
|
2002-08-27 05:31:48 -05:00
|
|
|
$STLPORT_stlport = $I.'$STLPORT4'.$ds.'stlport';
|
|
|
|
$STLPORT_inc_stlport = $I.'$STLPORT4'.$ds.'include'.$ds.'stlport';
|
|
|
|
} else {
|
|
|
|
$ps_STLPORT_LIB = "";
|
|
|
|
$L_STLPORT_LIB = "";
|
|
|
|
$STLPORT_stlport = $I.$SRC_ROOT.$SOLVER.$ds.$UPD.$ds.$INPATH.$INC.$ds."stl";
|
|
|
|
$STLPORT_inc_stlport = "";
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# Windows NT only variables
|
2005-03-07 10:28:47 -06:00
|
|
|
if ($platform =~ m/cygwin/)
|
2002-08-27 05:31:48 -05:00
|
|
|
{
|
|
|
|
if ( $JAVA_HOME ne "" )
|
|
|
|
{
|
|
|
|
$JAVA_LIB = $JAVA_HOME.$LIB;
|
|
|
|
}
|
|
|
|
# Import SystemDrive enviroment variable
|
|
|
|
use Env qw(SYSTEMDRIVE);
|
|
|
|
# Change $SYSTEMDRIVE to lower case.
|
|
|
|
$SYSTEMDRIVE = lc $SYSTEMDRIVE;
|
|
|
|
use Env qw(SYSTEMROOT);
|
2004-06-16 04:48:31 -05:00
|
|
|
$CYGWIN_PATH = PosixFormat('@CYGWIN_PATH@'); # Windows bash path
|
|
|
|
$WIN_GREP = '$CYGWIN_PATH'.$ds."grep.exe";
|
|
|
|
$WIN_FIND = '$CYGWIN_PATH'.$ds."find.exe";
|
|
|
|
$WIN_LS = '$CYGWIN_PATH'.$ds."ls.exe";
|
|
|
|
$WIN_GNUCOPY = '$CYGWIN_PATH'.$ds."cp.exe";
|
|
|
|
$WIN_TOUCH = '$CYGWIN_PATH'.$ds."touch.exe";
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
if ( $JAVA_HOME ne "" )
|
|
|
|
{
|
|
|
|
$JAVA_BIN = $JAVA_HOME.$BIN;
|
|
|
|
$JAVA_INCLUDE = $JAVA_HOME.$ds."include";
|
|
|
|
}
|
2003-08-18 08:54:11 -05:00
|
|
|
|
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
$PERL = PosixFormat('@PERL@'); # Perl program
|
|
|
|
$PERL_PATH = dirname('@PERL@'); # Perl Path
|
|
|
|
$XLIB = PosixFormat('@XLIB@'); # X11 libraries
|
|
|
|
$XINC = PosixFormat('@XINC@'); # X11 includes
|
|
|
|
|
|
|
|
|
2003-03-19 09:03:25 -06:00
|
|
|
# Mac OS X/Darwin only variables.
|
2005-03-07 10:28:47 -06:00
|
|
|
if ( $platform =~ m/darwin/ )
|
2002-08-27 05:31:48 -05:00
|
|
|
{ $FRAMEWORKSHOME = $ds."System".$ds."Library".$ds."Frameworks";
|
|
|
|
if ( $XLIB eq "no_x_libraries" ) {
|
|
|
|
$GUIBASE = "aqua";
|
|
|
|
} else {
|
|
|
|
$GUIBASE = "unx";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
# Same as UPD, used in the buildproces.
|
|
|
|
$SOLARUPD = $UPD;
|
|
|
|
# The project's workstamp.
|
2003-12-17 08:01:33 -06:00
|
|
|
$WORK_STAMP = "@SOURCEVERSION@";
|
2002-08-27 05:31:48 -05:00
|
|
|
# Location of the source.
|
|
|
|
$SOLARSRC = '$SRC_ROOT';
|
|
|
|
#
|
|
|
|
$DEVROOT = '$SRC_ROOT';
|
|
|
|
# Set solenv and solver to given or default values.
|
|
|
|
# Location of the solenv tree.
|
|
|
|
if ('@LOCAL_SOLENV@' eq "DEFAULT")
|
|
|
|
{ $SOLARENV = $SRC_ROOT.$SOLENV;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{ $SOLARENV = PosixFormat('@LOCAL_SOLENV@');
|
|
|
|
}
|
|
|
|
# Location of the solver tree.
|
|
|
|
if ('@LOCAL_SOLVER@' eq "DEFAULT")
|
2006-11-21 08:13:02 -06:00
|
|
|
{ $SOLARVER = $SRC_ROOT.$SOLVER.$ds.$UPD;
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
|
|
|
else
|
2006-11-21 08:13:02 -06:00
|
|
|
{ $SOLARVER = PosixFormat('@LOCAL_SOLVER@').$ds.$UPD;
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
|
|
|
#Location of Solar version.
|
2006-11-21 08:13:02 -06:00
|
|
|
$SOLARVERSION = '$SOLARVER';
|
2002-08-27 05:31:48 -05:00
|
|
|
|
|
|
|
$SOLARENVINC = '$SOLARENV'.$INC;
|
|
|
|
# Location of
|
|
|
|
$LOCALINI = '$SOLARENV'.$CONFIG;
|
|
|
|
# Location of
|
|
|
|
$STAR_INIROOT = '$SOLARENV'.$CONFIG;
|
|
|
|
# Location of
|
|
|
|
$STAR_INIROOTOLD = '$SOLARENV'.$CONFIG;
|
|
|
|
# Location of
|
|
|
|
$STAR_STANDLST = '$SOLARENV'.$CONFIG.$ds."stand.lst";
|
|
|
|
# Location of
|
|
|
|
$STAR_SSCOMMON = '$SOLARENV'.$CONFIG.$ds."ssolar.cmn";
|
|
|
|
# Location of
|
|
|
|
$STAR_SSOLARINI = '$SOLARENV'.$CONFIG.$ds."ssolar.ini";
|
2003-01-20 08:00:18 -06:00
|
|
|
# Path to the OpenOffice.org recourses.
|
2006-11-21 08:13:02 -06:00
|
|
|
$STAR_RESOURCEPATH = '$SOLARVER'.$ds.'$INPATH'.$BIN;
|
2002-08-27 05:31:48 -05:00
|
|
|
# Location of the registry file.
|
|
|
|
$STAR_REGISTRY = '$STAR_RESOURCEPATH'.$ds."applicat.rdb";
|
|
|
|
# Location of dmake resource.
|
|
|
|
$DMAKEROOT = '$SOLARENVINC'.$ds."startup";
|
|
|
|
# Location of JDK classes .zip file.
|
|
|
|
# but in jdk 1.2 it is called rt.jar and it lives in jre/lib
|
2003-03-19 09:03:25 -06:00
|
|
|
$CLASSPATH = '$JAVA_HOME'.$ds.'jre'.$LIB.$ds."rt.jar".$ps.'.';
|
2002-08-27 05:31:48 -05:00
|
|
|
# Location of the JDK supported standard classes.zip file.
|
|
|
|
# see above for why the change
|
2003-03-19 09:03:25 -06:00
|
|
|
$XCLASSPATH = '$JAVA_HOME'.$ds.'jre'.$LIB.$ds."rt.jar".$ps.'.';
|
2003-08-18 08:54:11 -05:00
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
# Paths to run time shared libraries.
|
2005-03-07 10:28:47 -06:00
|
|
|
if ($platform =~ m/solaris/)
|
2002-08-27 05:31:48 -05:00
|
|
|
{ $LD_LIBRARY_PATH = $cur_dir.
|
|
|
|
$ps.$USR_DT.$LIB.
|
|
|
|
$ps.$USR_OPENWIN.$LIB.
|
|
|
|
$ps.$USR_LOCAL.$LIB.
|
|
|
|
$ps.$par_dir.$LIB.
|
|
|
|
$ps_STLPORT_LIB.
|
|
|
|
$ps.$JRELIBDIR.
|
2005-10-25 05:24:20 -05:00
|
|
|
$ps.$JREEXTRALIBDIR.
|
2002-08-27 05:31:48 -05:00
|
|
|
$ps.$JRETOOLKITDIR.
|
|
|
|
$ps.$JRETHREADDIR.
|
2006-11-21 08:13:02 -06:00
|
|
|
$ps.'$SOLARVER'.$ds.'$INPATH'.$LIB;
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
elsif ($platform =~ m/linux-gnu|netbsd|osf1|freebsd|aix/)
|
2002-08-27 05:31:48 -05:00
|
|
|
{ $LD_LIBRARY_PATH = $cur_dir.
|
|
|
|
$ps.'$SOLARENV'.$ds.'$INPATH'.$LIB.
|
|
|
|
$ps.$JRELIBDIR.
|
2005-10-25 05:24:20 -05:00
|
|
|
$ps.$JREEXTRALIBDIR.
|
2002-08-27 05:31:48 -05:00
|
|
|
$ps.$JRETOOLKITDIR.
|
|
|
|
$ps.$JRETHREADDIR.
|
2004-02-04 08:08:23 -06:00
|
|
|
$ps.$par_dir.$LIB64.
|
2002-08-27 05:31:48 -05:00
|
|
|
$ps_STLPORT_LIB.
|
2006-11-21 08:13:02 -06:00
|
|
|
$ps.'$SOLARVER'.$ds.'$INPATH'.$LIB.
|
2002-10-22 07:24:17 -05:00
|
|
|
$ps.$ENV{'LD_LIBRARY_PATH'};
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
elsif ($platform =~ m/irix/)
|
2002-08-27 05:31:48 -05:00
|
|
|
{ $LD_LIBRARY_PATH = $cur_dir.
|
|
|
|
$ps.'$SOLARENV'.$ds.'$INPATH'.$LIB.
|
|
|
|
$ps.$JRELIBDIR.
|
2005-10-25 05:24:20 -05:00
|
|
|
$ps.$JREEXTRALIBDIR.
|
2002-08-27 05:31:48 -05:00
|
|
|
$ps.$JRETOOLKITDIR.
|
|
|
|
$ps.$JRETHREADDIR.
|
|
|
|
$ps.$USR_LOCAL.$LIB.
|
|
|
|
$ps.$par_dir.$LIB.
|
2006-11-21 08:13:02 -06:00
|
|
|
$ps.'$SOLARVER'.$ds.'$INPATH'.$LIB;
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
elsif ($platform =~ m/darwin/)
|
2005-02-24 07:07:05 -06:00
|
|
|
{ $LD_LIBRARY_PATH = $cur_dir.
|
2006-11-21 08:13:02 -06:00
|
|
|
$ps.'$SOLARVER'.$ds.'$INPATH'.$LIB.
|
2003-03-19 09:03:25 -06:00
|
|
|
$ps_STLPORT_LIB;
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
elsif ($platform !~ m/cygwin/)
|
2003-08-18 08:54:11 -05:00
|
|
|
{ AddWarning( "set_soenv", "$platform not configured for runtime shared libraries" );
|
|
|
|
}
|
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
# Location used by the linker to create libraries.
|
2005-03-07 10:28:47 -06:00
|
|
|
if ($platform =~ m/solaris/)
|
2002-08-27 05:31:48 -05:00
|
|
|
{ $SOLAREXTRALIB = $L.$par_dir.$LIB.
|
|
|
|
$L.'$SOLARENV'.$ds.'$OUTPATH'.$ds."lib.solaris.2.6".
|
|
|
|
$L.$LIB.
|
|
|
|
$L.$USR.$LIB.
|
|
|
|
$L.$USR.$LOCAL.$LIB.
|
|
|
|
$L.$USR_DT.$LIB.
|
|
|
|
$L.$USR_OPENWIN.$LIB;
|
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
elsif ($platform =~ m/linux-gnu|netbsd|osf1|irix|freebsd|aix/)
|
2002-10-22 07:24:17 -05:00
|
|
|
{
|
2004-02-04 08:08:23 -06:00
|
|
|
$SOLAREXTRALIB = $L.$par_dir.$LIB64;
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
elsif ($platform =~ m/darwin/)
|
2002-08-27 05:31:48 -05:00
|
|
|
{ $SOLAREXTRALIB = $L.$LIB.
|
|
|
|
$L.$USR.$LIB;
|
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
elsif ($platform !~ m/cygwin/ )
|
2003-08-18 08:54:11 -05:00
|
|
|
{ AddWarning( "set_soenv", "$platform not configured for linkage create libraries" );
|
|
|
|
}
|
2002-08-27 05:31:48 -05:00
|
|
|
|
|
|
|
# Windows NT only variables
|
2005-03-07 10:28:47 -06:00
|
|
|
if ($platform =~ m/cygwin/)
|
2002-08-27 05:31:48 -05:00
|
|
|
{ $COMP_ENV = $OUTPATH;
|
|
|
|
|
|
|
|
$JAVAHOME = '$JAVA_HOME';
|
|
|
|
|
2007-03-27 04:20:09 -05:00
|
|
|
$ILIB = $cur_dir.$ps_STLPORT_LIB;
|
2003-06-12 04:16:12 -05:00
|
|
|
# Mingw is different
|
|
|
|
if ( $COM eq "MSC" )
|
2007-03-27 04:20:09 -05:00
|
|
|
{ $ILIB .= $ps.$SOLARVER.$ds.$INPATH.$LIB.
|
|
|
|
$ps.$JAVA_HOME.$LIB.
|
|
|
|
$ps.'$PSDK_HOME'.$LIB.
|
|
|
|
$ps.'$FRAME_HOME'.$LIB.
|
|
|
|
$ps.'$COMPATH'.$LIB;
|
2005-04-11 02:52:38 -05:00
|
|
|
if ( '@ENABLE_DIRECTX@' ne "" ) {
|
2007-03-27 04:20:09 -05:00
|
|
|
$ILIB .= $ps.$DIRECTXSDK_LIB;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
elsif ( $COM eq "GCC" )
|
2007-05-25 05:10:05 -05:00
|
|
|
{ $ILIB .= $ps.$SOLARVER.$ds.$INPATH.$LIB.
|
|
|
|
$ps.$SOLARVER.$ds.$INPATH.$BIN.
|
2007-03-27 04:20:09 -05:00
|
|
|
$ps.$JAVA_HOME.$LIB;
|
|
|
|
if ( $USE_MINGW eq "cygwin" )
|
|
|
|
{ $ILIB .= $ps.'$COMPATH'.$LIB.$ds."mingw".
|
|
|
|
$ps.'$COMPATH'.$LIB.$ds."w32api";
|
|
|
|
}
|
|
|
|
$ILIB .= $ps.'$COMPATH'.$LIB.
|
|
|
|
$ps.'$PSDK_HOME'.$LIB;
|
|
|
|
if ( '@ENABLE_DIRETX@' )
|
|
|
|
{ $ILIB .= $ps.'@DIRECTXSDK_LIB@';
|
2004-10-11 07:48:47 -05:00
|
|
|
}
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
$JAVAHOME = '$JAVA_HOME';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
# The general environment path.
|
2005-03-07 10:28:47 -06:00
|
|
|
if ($platform =~ m/linux-gnu|netbsd|odf1|irix|freebsd|aix|solaris/)
|
2002-08-27 05:31:48 -05:00
|
|
|
{ $PATH = $cur_dir.
|
2006-11-21 08:13:02 -06:00
|
|
|
$ps.'$SOLARVER'.$ds.'$INPATH'.$BIN.
|
2002-08-27 05:31:48 -05:00
|
|
|
$ps.'$SOLARENV'.$ds.'$OUTPATH'.$BIN.
|
2002-10-22 07:24:17 -05:00
|
|
|
$ps.'$SOLARENV'.$BIN;
|
2004-02-02 11:17:15 -06:00
|
|
|
|
2005-03-07 10:28:47 -06:00
|
|
|
if ($platform =~ m/solaris/) {
|
2004-02-02 11:17:15 -06:00
|
|
|
$PATH .= $ps.$USR_CCS.$BIN;
|
2003-03-19 09:03:25 -06:00
|
|
|
}
|
2003-04-28 11:02:16 -05:00
|
|
|
|
2004-02-02 11:17:15 -06:00
|
|
|
$PATH .= $ps.$oldPATH;
|
2003-01-20 08:00:18 -06:00
|
|
|
|
2004-02-02 11:17:15 -06:00
|
|
|
my @javaBits;
|
2005-01-25 09:55:07 -06:00
|
|
|
if (( $JAVA_HOME ne "" ) && ( $JDK ne "gcj" )) {
|
2004-02-02 11:17:15 -06:00
|
|
|
@javaBits = ( '$JAVA_HOME'.$BIN, 'javac' );
|
|
|
|
} else {
|
|
|
|
@javaBits = ();
|
|
|
|
}
|
2006-07-05 16:32:39 -05:00
|
|
|
$PATH = GetCorrectPath ($PATH,
|
|
|
|
$COMPATH, $CC,
|
2004-02-02 11:17:15 -06:00
|
|
|
$PERL_PATH, 'perl',
|
2006-07-05 16:32:39 -05:00
|
|
|
$SHELL_PATH, '@USE_SHELL@',
|
2004-02-02 11:17:15 -06:00
|
|
|
@javaBits);
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
|
|
|
|
2005-03-07 10:28:47 -06:00
|
|
|
elsif ($platform =~ m/cygwin/)
|
2005-02-11 07:37:00 -06:00
|
|
|
{ # The PATH variable is completely created from scratch. Everything that is not
|
|
|
|
# needed is appended to the end.
|
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
my ( $noldPATH );
|
|
|
|
$noldPATH = $oldPATH;
|
|
|
|
# convert path to posix if using native NT perl
|
|
|
|
$noldPATH = PosixFormat($noldPATH);
|
|
|
|
|
|
|
|
$PATH = $cur_dir.
|
2006-11-21 08:13:02 -06:00
|
|
|
$ps.'$SOLARVER'.$ds.'$INPATH'.$BIN.
|
2002-08-27 05:31:48 -05:00
|
|
|
$ps.'$SOLARENV'.$ds."bin".
|
|
|
|
$ps.'$SOLARENV'.$ds.'$OUTPATH'.$BIN;
|
|
|
|
|
|
|
|
if ( $JAVA_HOME ne "" )
|
|
|
|
{
|
|
|
|
# hack either "hotspot" or "client" should be used, depending on the jdk version:
|
|
|
|
# 1.2.x - no such directory, unsupported
|
|
|
|
# 1.3.x - hotspot, client missing
|
|
|
|
# 1.4.x - client, hotspot missing
|
|
|
|
|
2003-06-12 04:16:12 -05:00
|
|
|
$PATH .= $ps.$JAVA_HOME.$BIN;
|
|
|
|
if ( -d $JAVA_HOME.$ds."jre".$ds."bin".$ds."hotspot" ) {
|
|
|
|
$PATH .= $ps.$JAVA_HOME.$ds."jre".$ds."bin".$ds."hotspot";
|
|
|
|
}
|
|
|
|
if ( -d $JAVA_HOME.$ds."jre".$ds."bin".$ds."client" ) {
|
|
|
|
$PATH .= $ps.$JAVA_HOME.$ds."jre".$ds."bin".$ds."client";
|
|
|
|
}
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2005-02-11 07:37:00 -06:00
|
|
|
|
|
|
|
# Add path to compiler
|
|
|
|
if ( $COM eq "MSC" ) {
|
|
|
|
$PATH .= $ps.'$COMPATH'.$BIN;
|
|
|
|
} else { # Mingw is different
|
2007-03-27 04:20:09 -05:00
|
|
|
$PATH .= $ps.$COMPATH.$BIN;
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2003-08-18 08:54:11 -05:00
|
|
|
if ( $COM eq "MSC" ) {
|
2005-01-05 03:42:09 -06:00
|
|
|
# for .NET to find mspdb71.dll (needed by CL.EXE C/C++ Compiler)
|
2005-02-11 07:37:00 -06:00
|
|
|
if ( $PATH !~ /(?:[:]|\A)(?:$MSPDB_PATH)(?:[:]|\Z)/ ) {
|
2003-08-18 08:54:11 -05:00
|
|
|
$PATH .= $ps.$MSPDB_PATH;
|
|
|
|
}
|
2006-09-25 07:33:27 -05:00
|
|
|
if ( ( $COMEX eq "10" ) || ( $COMEX eq "11" ) ) {
|
2003-08-18 08:54:11 -05:00
|
|
|
# .NET needs midl.exe
|
2005-02-11 07:37:00 -06:00
|
|
|
if ( $PATH !~ /(?:[:]|\A)(?:$MIDL_PATH)(?:[:]|\Z)/ ) {
|
2003-08-18 08:54:11 -05:00
|
|
|
$PATH .= $ps.$MIDL_PATH;
|
|
|
|
}
|
2003-12-01 10:39:16 -06:00
|
|
|
# .NET needs csc.exe
|
2005-02-11 07:37:00 -06:00
|
|
|
if ( $PATH !~ /(?:[:]|\A)(?:$CSC_PATH)(?:[:]|\Z)/ ) {
|
2003-12-01 10:39:16 -06:00
|
|
|
$PATH .= $ps.$CSC_PATH;
|
|
|
|
}
|
2004-12-03 07:20:01 -06:00
|
|
|
# Native installer needs some files if the Windows Installer SDK
|
2005-02-11 07:37:00 -06:00
|
|
|
if ( $PATH !~ /(?:[:]|\A)(?:$PSDK_HOME\/bin)(?:[:]|\Z)/i ) {
|
2004-12-03 07:20:01 -06:00
|
|
|
$PATH .= $ps.$PSDK_HOME.$BIN;
|
|
|
|
}
|
2003-08-18 08:54:11 -05:00
|
|
|
}
|
2007-03-27 04:20:09 -05:00
|
|
|
} else { # Mingw is different
|
|
|
|
# Native installer needs some files if the Windows Installer SDK
|
|
|
|
if ( $PATH !~ /(?:[:]|\A)(?:$PSDK_HOME\/bin)(?:[:]|\Z)/i ) {
|
|
|
|
$PATH .= $ps.$PSDK_HOME.$BIN;
|
|
|
|
}
|
2003-07-02 08:37:32 -05:00
|
|
|
}
|
2002-08-27 05:31:48 -05:00
|
|
|
|
2007-03-27 04:20:09 -05:00
|
|
|
if ( $ASM_PATH ne "ASM_IN_PATH" )
|
2005-02-11 07:37:00 -06:00
|
|
|
{ $PATH .= $ps.$ASM_PATH;
|
|
|
|
}
|
|
|
|
# zip.exe / unzip.exe path for Windows users.
|
|
|
|
my $zip_home_path = PosixFormat('@ZIP_HOME@');
|
2006-04-20 07:34:17 -05:00
|
|
|
if ( $PATH !~ /(?:[:]|\A)(?:$zip_home_path)(?:[:]|\Z)/ ) {
|
2005-02-11 07:37:00 -06:00
|
|
|
$PATH .= $ps.$zip_home_path;
|
|
|
|
}
|
|
|
|
|
|
|
|
# Possible cygwin paths must follow behind the OOo and MS paths
|
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
# Check if $PERL_PATH is already set in PATH
|
2005-02-11 07:37:00 -06:00
|
|
|
if ( ! ( $PATH =~ /(?:[:]|\A)(?:$PERL_PATH)(?:[:]|\Z)/ ) )
|
2002-08-27 05:31:48 -05:00
|
|
|
{
|
2005-02-11 07:37:00 -06:00
|
|
|
$PATH .= $ps.$PERL_PATH;
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2006-07-05 16:32:39 -05:00
|
|
|
# Check if $SHELL_PATH is already set in PATH
|
|
|
|
if ( ( "@USE_SHELL@" ne "4nt" ) && ( $PATH !~ /(?:[:]|\A)(?:$SHELL_PATH)(?:[:]|\Z)/ ) )
|
|
|
|
{ $PATH .= $ps.$SHELL_PATH;
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2004-06-16 04:48:31 -05:00
|
|
|
# Check if $CYGWIN_PATH is already set in PATH
|
2006-04-20 07:34:17 -05:00
|
|
|
if ( $PATH !~ /(?:[:]|\A)(?:$CYGWIN_PATH)(?:[:]|\Z)/ ) {
|
2005-02-11 07:37:00 -06:00
|
|
|
$PATH .= $ps.$CYGWIN_PATH;
|
|
|
|
}
|
|
|
|
$PATH .= $ps_STLPORT_LIB;
|
2007-04-19 14:42:58 -05:00
|
|
|
# nsis path for Windows users.
|
2007-03-27 04:20:09 -05:00
|
|
|
my $nsis_path = PosixFormat('@NSIS_PATH@');
|
2007-04-19 14:42:58 -05:00
|
|
|
if ( $PATH !~ /(?:[:]|\A)(?:$nsis_path)(?:[:]|\Z)/ ) {
|
2007-03-27 04:20:09 -05:00
|
|
|
$PATH .= $ps.$nsis_path;
|
|
|
|
}
|
2007-04-19 14:42:58 -05:00
|
|
|
# path to sn.exe (signing) for Windows users.
|
|
|
|
my $sn_path = PosixFormat('@FRAME_HOME@/bin');
|
|
|
|
if ( $PATH !~ /(?:[:]|\A)(?:$sn_path)(?:[:]|\Z)/ ) {
|
|
|
|
$PATH .= $ps.$sn_path;
|
|
|
|
}
|
2007-03-27 04:20:09 -05:00
|
|
|
|
2005-02-11 07:37:00 -06:00
|
|
|
|
|
|
|
# Add the rest of the original path if it is still missing.
|
|
|
|
if ($^O eq "cygwin") { # Not for ActiveState perl
|
2005-03-08 09:35:34 -06:00
|
|
|
my $expandedPATH = $PATH;
|
|
|
|
$expandedPATH =~ s/(\$\w+)/$1/eeg;
|
2005-02-11 07:37:00 -06:00
|
|
|
foreach my $pathentry (split($ps,$noldPATH)) {
|
2005-03-08 09:35:34 -06:00
|
|
|
if ( ! ( $expandedPATH =~ /(?:$ps|\A)(?:$pathentry)(?:$ps|\Z)/ ) ) {
|
2005-02-11 07:37:00 -06:00
|
|
|
$PATH .= $ps.$pathentry;
|
2005-03-08 09:35:34 -06:00
|
|
|
$expandedPATH .= $ps.$pathentry;
|
2005-02-11 07:37:00 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
$PATH .= $ps.$noldPATH;
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-03-07 10:28:47 -06:00
|
|
|
elsif ($platform =~ m/darwin/)
|
2002-08-27 05:31:48 -05:00
|
|
|
{ $PATH = $cur_dir.
|
2006-11-21 08:13:02 -06:00
|
|
|
$ps.'$SOLARVER'.$ds.'$INPATH'.$BIN.
|
2002-08-27 05:31:48 -05:00
|
|
|
$ps.'$SOLARENV'.$ds.'$OUTPATH'.$BIN.
|
2007-08-03 07:09:48 -05:00
|
|
|
$ps.'$SOLARENV'.$BIN;
|
2005-02-24 07:07:05 -06:00
|
|
|
|
|
|
|
# Append old PATH
|
|
|
|
$PATH .= $ps.$oldPATH;
|
2007-01-03 03:13:32 -06:00
|
|
|
|
|
|
|
# append PATHEXTRA
|
|
|
|
$PATHEXTRA = "@PATHEXTRA@";
|
|
|
|
$PATH .= $PATHEXTRA;
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2003-08-18 08:54:11 -05:00
|
|
|
else
|
|
|
|
{ AddWarning( "set_soenv", "$platform not configured for general environment paths" );
|
|
|
|
}
|
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
# Linker library search directory paths.
|
2005-03-07 10:28:47 -06:00
|
|
|
if ($platform =~ m/solaris/)
|
2002-08-27 05:31:48 -05:00
|
|
|
{ $SOLARLIB = $L.$par_dir.$LIB.
|
|
|
|
$L.'$SOLARENV'.$ds.'$OUTPATH'.$LIB.
|
2006-11-21 08:13:02 -06:00
|
|
|
$L.'$SOLARVER'.$ds.'$INPATH'.$LIB.
|
2002-08-27 05:31:48 -05:00
|
|
|
$L.'$SOLARENV'.$ds.'$OUTPATH'.$LIB.
|
|
|
|
$L.'$SOLARENV'.$ds.'$OUTPATH'.$LIB."solaris.2.6".
|
|
|
|
$L.$LIB.
|
2005-01-18 07:55:37 -06:00
|
|
|
$L.$USR_LIB;
|
|
|
|
if ( $CC =~ "gcc" ) {
|
|
|
|
my $temp = $COMPATH;
|
|
|
|
$temp =~ s:/bin$::;
|
|
|
|
$SOLARLIB .= $L.$temp.$LIB;
|
|
|
|
}
|
|
|
|
$SOLARLIB .= $L.$USR_LOCAL.$LIB.
|
2002-08-27 05:31:48 -05:00
|
|
|
$L.$USR_DT.$LIB.
|
|
|
|
$L.$USR_OPENWIN.$LIB.
|
|
|
|
$L.'$JAVA_HOME'.$LIB.
|
|
|
|
$L.$JRELIBDIR.
|
|
|
|
$L.$JRETOOLKITDIR.
|
|
|
|
$L.$JRETHREADDIR.
|
|
|
|
$L_STLPORT_LIB.
|
|
|
|
$L.$XLIB;
|
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
elsif ($platform =~ m/linux-gnu|netbasd|osf1|irix|aix|freebsd/)
|
2002-08-27 05:31:48 -05:00
|
|
|
{ $SOLARLIB = $L.$par_dir.$LIB.
|
2003-08-18 08:54:11 -05:00
|
|
|
$L.'$SOLARENV'.$ds.'$OUTPATH'.$LIB.
|
2006-11-21 08:13:02 -06:00
|
|
|
$L.'$SOLARVER'.$ds.'$INPATH'.$LIB.
|
2002-08-27 05:31:48 -05:00
|
|
|
$L.'$SOLARENV'.$ds.'$OUTPATH'.$LIB.
|
2006-04-19 08:02:40 -05:00
|
|
|
$L.'$JAVA_HOME'.$LIB64.
|
2002-08-27 05:31:48 -05:00
|
|
|
$L.$JRELIBDIR.
|
|
|
|
$L.$JRETOOLKITDIR.
|
|
|
|
$L.$JRETHREADDIR.
|
|
|
|
$L_STLPORT_LIB.
|
|
|
|
$L.$XLIB;
|
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
elsif ($platform =~ m/cygwin/)
|
2006-11-21 08:13:02 -06:00
|
|
|
{ $SOLARLIB = $L.'$SOLARVER'.$ds.'$INPATH'.$LIB.
|
2002-08-27 05:31:48 -05:00
|
|
|
$L.$par_dir.$LIB.
|
|
|
|
$L_STLPORT_LIB.
|
|
|
|
$L.'$SOLARENV'.$ds.'$OUTPATH'.$LIB;
|
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
elsif ($platform =~ m/darwin/)
|
2006-11-21 08:13:02 -06:00
|
|
|
{ $SOLARLIB = $L.'$SOLARVER'.$ds.'$INPATH'.$LIB.
|
2002-08-27 05:31:48 -05:00
|
|
|
$L_STLPORT_LIB.
|
|
|
|
$L.$USR_LIB;
|
2003-08-18 08:54:11 -05:00
|
|
|
# [ed] 6/15/02 Add in X11 libraries onto the library path
|
2002-10-22 07:24:17 -05:00
|
|
|
if ($GUIBASE eq "unx") {
|
|
|
|
$SOLARLIB .= $L.$XLIB;
|
|
|
|
}
|
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2005-03-30 04:38:22 -06:00
|
|
|
|
|
|
|
if ($SYSTEM_MOZILLA eq "YES")
|
|
|
|
{
|
|
|
|
$SOLARLIB .= $L."@MOZ_LIB@"
|
|
|
|
}
|
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
# Location of the compiler include search directory paths.
|
|
|
|
$SOLARINC = $I.$cur_dir.
|
2006-11-21 08:13:02 -06:00
|
|
|
$I.'$SOLARVER'.$ds.'$INPATH'.$INC.$ds."stl".
|
|
|
|
$I.'$SOLARVER'.$ds.'$INPATH'.$INC.$ds."external".
|
|
|
|
$I.'$SOLARVER'.$ds.'$INPATH'.$INC.
|
2002-08-27 05:31:48 -05:00
|
|
|
$I.'$SOLARENV'.$ds.'$OUTPATH'.$INC.
|
|
|
|
$I.'$SOLARENV'.$INC.
|
|
|
|
$I.'$SRC_ROOT'.$ds."res";
|
|
|
|
|
2005-03-07 10:28:47 -06:00
|
|
|
if ($platform =~ m/solaris|linux-gnu|osf1|freebsd|netbsd|irix/)
|
2002-08-27 05:31:48 -05:00
|
|
|
{
|
|
|
|
$SOLARINC .= $STLPORT_stlport;
|
2005-03-07 10:28:47 -06:00
|
|
|
if ($platform =~ m/linux|freebsd|netbsd/)
|
2002-08-27 05:31:48 -05:00
|
|
|
{
|
|
|
|
# This simply adds an include path, so even cases that break the FHS work
|
|
|
|
$SOLARINC .= $STLPORT_inc_stlport;
|
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
if ($platform =~ m/solaris/ && $CC !=~ "gcc")
|
2002-08-27 05:31:48 -05:00
|
|
|
{
|
|
|
|
$SOLARINC .= '/SC5 ';
|
|
|
|
}
|
|
|
|
# Platform dependent include path at the top of this list of include paths
|
2005-03-07 10:28:47 -06:00
|
|
|
if ($platform =~ m/solaris/)
|
2003-08-18 08:54:11 -05:00
|
|
|
{ my $temp;
|
|
|
|
$temp =~ s:$COMPATH:/bin\$:;
|
|
|
|
$SOLARINC .= $I.$temp.$ds."include";
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
if ($platform =~ m/linux-gnu/)
|
2002-10-22 07:24:17 -05:00
|
|
|
{
|
|
|
|
# This simply adds an include path, so even cases that break the FHS work
|
|
|
|
$SOLARINC .= $STLPORT_inc_stlport;
|
|
|
|
}
|
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
|
2005-01-25 09:55:07 -06:00
|
|
|
$SOLARINC .= $I.'$SOLARENV'.$INC.$ds."Xp31".
|
2003-08-18 08:54:11 -05:00
|
|
|
$I.'$JAVA_HOME'.$INCLUDE;
|
2002-08-27 05:31:48 -05:00
|
|
|
|
2005-01-25 09:55:07 -06:00
|
|
|
#include system dependent Java include directory
|
|
|
|
if (!($JDK eq "gcj"))
|
|
|
|
{
|
2005-03-07 10:28:47 -06:00
|
|
|
if ($platform =~ m/solaris/)
|
2005-01-25 09:55:07 -06:00
|
|
|
{ $SOLARINC .=$I.'$JAVA_HOME'.$INCLUDE.$ds."solaris";
|
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
elsif ($platform =~ m/linux-gnu|osf1/)
|
2005-01-25 09:55:07 -06:00
|
|
|
{ $SOLARINC .=$I.'$JAVA_HOME'.$INCLUDE.$ds."linux";
|
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
elsif ($platform =~ m/freebsd/)
|
2005-01-25 09:55:07 -06:00
|
|
|
{
|
|
|
|
$SOLARINC .=$I.'$JAVA_HOME'.$INCLUDE.$ds."freebsd";
|
|
|
|
$SOLARINC .=$I.'$JAVA_HOME'.$INCLUDE.$ds."bsd";
|
2006-07-19 03:36:28 -05:00
|
|
|
$SOLARINC .=$I.'$JAVA_HOME'.$INCLUDE.$ds."linux";
|
2005-01-25 09:55:07 -06:00
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
elsif ($platform =~ m/netbsd/)
|
2005-01-25 09:55:07 -06:00
|
|
|
{ $SOLARINC .=$I.'$JAVA_HOME'.$INCLUDE.$ds."netbsd";
|
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
elsif ($platform =~ m/irix/)
|
2005-01-25 09:55:07 -06:00
|
|
|
{ $SOLARINC .=$I.'$JAVA_HOME'.$INCLUDE.$ds."irix";
|
|
|
|
}
|
|
|
|
|
|
|
|
#java threads include path
|
|
|
|
|
|
|
|
$SOLARINC .=$I.'$JAVA_HOME'.$INCLUDE.$ds."native_threads".$ds."include";
|
|
|
|
}
|
2003-08-18 08:54:11 -05:00
|
|
|
#The tail, if needed
|
2005-03-07 10:28:47 -06:00
|
|
|
if ($platform =~ m/linux-gnu|freebsd|netbsd/)
|
2003-08-18 08:54:11 -05:00
|
|
|
{ $SOLARINC .= $I.$XINC;
|
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
elsif ($platform =~ m/osf1/)
|
2003-08-18 08:54:11 -05:00
|
|
|
{ $SOLARINC .= $I.$XINC.
|
|
|
|
$I.$USR.$INCLUDE;
|
|
|
|
}
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
elsif ($platform =~ m/cygwin/)
|
2002-08-27 05:31:48 -05:00
|
|
|
{ $SOLARINC .= $STLPORT_stlport.
|
|
|
|
$I.'$JAVA_HOME'.$ds."include".$ds."win32".
|
2007-03-27 04:20:09 -05:00
|
|
|
$I.'$JAVA_HOME'.$ds."include";
|
2003-06-12 04:16:12 -05:00
|
|
|
# Mingw is different
|
|
|
|
if ( $COM eq "MSC" )
|
2007-03-27 04:20:09 -05:00
|
|
|
{ $SOLARINC .= $I.'$PSDK_HOME'.$INCLUDE.
|
|
|
|
$I.'$COMPATH'.$ds."include";
|
2005-04-11 02:52:38 -05:00
|
|
|
if ( '@ENABLE_DIRECTX@' ne "" ) {
|
2004-10-11 07:48:47 -05:00
|
|
|
$SOLARINC .= $I.PosixFormat('@DIRECTXSDK_HOME@').$INCLUDE;
|
|
|
|
}
|
2003-06-12 04:16:12 -05:00
|
|
|
}
|
2007-03-27 04:20:09 -05:00
|
|
|
elsif ( $COM eq "GCC" )
|
2007-05-25 05:10:05 -05:00
|
|
|
{ $SOLARINC .= $I.'$SOLARVER'.$ds.'$INPATH'.$INC.$ds."external".$ds."mingw".$ds."include";
|
2007-03-27 04:20:09 -05:00
|
|
|
if ( $USE_MINGW eq "cygwin" )
|
|
|
|
{ $SOLARINC .= $I.'$COMPATH'.$ds."include".$ds."mingw".$ds."include".
|
|
|
|
$I.'$COMPATH'.$ds."include".$ds."w32api"; }
|
|
|
|
$SOLARINC .= $I.'$COMPATH'.$ds."include";
|
2007-05-25 05:10:05 -05:00
|
|
|
@mingw_lib_include_paths = split( / /, "@MINGW_LIB_INCLUDE_PATH@" );
|
|
|
|
foreach $mingw_lib_include_path (@mingw_lib_include_paths)
|
|
|
|
{ chomp $mingw_lib_include_path;
|
|
|
|
if ( $mingw_lib_include_path ne $COMPATH.$ds."include" && $mingw_lib_include_path ne "" )
|
2007-03-27 04:20:09 -05:00
|
|
|
{
|
2007-05-25 05:10:05 -05:00
|
|
|
$SOLARINC .= $I.$mingw_lib_include_path;
|
2007-03-27 04:20:09 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
$SOLARINC .= $I."@GXX_INCLUDE_PATH@".$I."@GXX_INCLUDE_PATH@".$ds."mingw32".
|
|
|
|
$I.'$PSDK_HOME'.$INCLUDE;
|
|
|
|
}
|
|
|
|
if ( '@ENABLE_DIRECTX@' ne "" ) {
|
|
|
|
$SOLARINC .= $I.PosixFormat('@DIRECTXSDK_HOME@').$INCLUDE;
|
|
|
|
}
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
elsif ($platform =~ m/darwin/)
|
2002-08-27 05:31:48 -05:00
|
|
|
{ $SOLARINC .= $STLPORT_stlport.
|
2003-08-18 08:54:11 -05:00
|
|
|
$I.$FRAMEWORKSHOME.$ds."JavaVM.framework".$ds."Versions".$ds."Current".$ds."Headers".
|
2002-08-27 05:31:48 -05:00
|
|
|
$I.$FRAMEWORKSHOME.$ds."JavaVM.framework".$ds."Headers";
|
2003-08-18 08:54:11 -05:00
|
|
|
# [ed] 6/15/02 Add in X11 headers as appropriate for the build
|
2002-10-22 07:24:17 -05:00
|
|
|
if ($GUIBASE eq "unx") {
|
2003-01-20 08:00:18 -06:00
|
|
|
$SOLARINC .= $I.$XINC.
|
|
|
|
$I.$XINC.$ds."freetype2";
|
2002-10-22 07:24:17 -05:00
|
|
|
}
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2003-08-18 08:54:11 -05:00
|
|
|
else
|
|
|
|
{ AddWarning( "set_soenv", "$platform not configured for system dependant include dir" );
|
|
|
|
}
|
2003-07-02 08:37:32 -05:00
|
|
|
|
2004-09-08 09:24:19 -05:00
|
|
|
if ($SYSTEM_PYTHON eq "NO")
|
|
|
|
{
|
2006-11-21 08:13:02 -06:00
|
|
|
$PYTHONPATH = '.'.$ps.'$SOLARVER'.$ds.'$INPATH'.$ds.'lib'.$ps.'$SOLARVER'.$ds.'$INPATH'.$ds.'lib'.$ds.'python'.$ps.'$SOLARVER'.$ds.'$INPATH'.$ds.'lib'.$ds.'python'.$ds.'lib-dynload'.$ps.'$SOLARVER'.$ds.'$INPATH'.$ds.'lib'.$ds.'pyuno'.$ps.'$SOLARVER'.$ds.'$INPATH'.$ds.'bin'.$ds.'pyuno';
|
|
|
|
$PYTHONHOME = '$SOLARVER'.$ds.'$INPATH';
|
2004-09-08 09:24:19 -05:00
|
|
|
}
|
2002-08-27 05:31:48 -05:00
|
|
|
|
|
|
|
#
|
|
|
|
print "done\n";
|
2003-08-18 08:54:11 -05:00
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
#
|
|
|
|
# F. Setting the different aliases.
|
|
|
|
#
|
|
|
|
print "Setting the aliases... ";
|
|
|
|
# 1. alias for a full product make.
|
2003-03-19 09:03:25 -06:00
|
|
|
# ToFile will take care for the right 4nt format
|
2002-08-27 05:31:48 -05:00
|
|
|
$mkout = '"perl $SOLARENV/bin/mkout.pl"';
|
|
|
|
$deliver = '"perl $SOLARENV/bin/deliver.pl"';
|
2002-10-22 07:24:17 -05:00
|
|
|
$build = '"perl $SOLARENV/bin/build.pl"';
|
2007-05-09 07:27:09 -05:00
|
|
|
$build_client = '"perl $SOLARENV/bin/build_client.pl"';
|
2002-08-27 05:31:48 -05:00
|
|
|
$zipdep = '"perl $SOLARENV/bin/zipdep.pl"';
|
|
|
|
# 3. alias for a full product make
|
2002-10-22 07:24:17 -05:00
|
|
|
$nmake = '"dmake"';
|
2002-08-27 05:31:48 -05:00
|
|
|
print "done\n";
|
|
|
|
#
|
|
|
|
#--------------------------
|
|
|
|
# VI. Open the output file.
|
|
|
|
#--------------------------
|
|
|
|
#
|
|
|
|
open( OUT, ">$outfile" ) ||
|
|
|
|
die "Cannot open $outfile: $!\n";
|
2002-10-22 07:24:17 -05:00
|
|
|
|
2006-05-04 03:25:34 -05:00
|
|
|
# Create sh environment file
|
|
|
|
open( OUT_SH, ">$outfile_sh" ) ||
|
|
|
|
die "Cannot open $outfile_sh: $!\n";
|
2002-10-22 07:24:17 -05:00
|
|
|
|
2003-03-19 09:03:25 -06:00
|
|
|
if(defined($outfile_bat))
|
|
|
|
{ # Create bat environment file
|
|
|
|
open( OUT_BAT, ">$outfile_bat" ) ||
|
|
|
|
die "Cannot open $outfile_bat: $!\n";
|
|
|
|
}
|
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
#
|
|
|
|
#------------------------------------------
|
|
|
|
# VII. Writing the data to the output file.
|
|
|
|
#------------------------------------------
|
|
|
|
#
|
|
|
|
# Write file header.
|
2003-03-19 09:03:25 -06:00
|
|
|
CreateFileHeader( *OUT, $UPD, $platform, "(t)csh", "#" );
|
2006-05-04 03:25:34 -05:00
|
|
|
CreateFileHeader( *OUT_SH, $UPD, $platform, "sh/bash/ksh", "#" );
|
2003-03-19 09:03:25 -06:00
|
|
|
CreateFileHeader( *OUT_BAT, $UPD, $platform, "4nt", "rem" ) if defined($outfile_bat);
|
2006-01-06 04:17:44 -06:00
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
ToFile( "SRC_ROOT", $SRC_ROOT, "e" );
|
|
|
|
ToFile( "SHELL", $SHELL, "e" );
|
|
|
|
ToFile( "JAVA_HOME", $JAVA_HOME, "e" );
|
2003-04-28 11:02:16 -05:00
|
|
|
ToFile( "ANT_HOME", "@ANT_HOME@", "e" );
|
2004-02-04 08:08:23 -06:00
|
|
|
ToFile( "ANT_LIB", "@ANT_LIB@", "e" );
|
2004-12-10 10:49:56 -06:00
|
|
|
ToFile( "ANT", "@ANT@", "e" );
|
2002-08-27 05:31:48 -05:00
|
|
|
ToFile( "JDKLIB", $JAVA_LIB, "e" );
|
|
|
|
ToFile( "STLPORT4", $STLPORT4, "e" );
|
|
|
|
ToFile( "ASM_PATH", $ASM_PATH, "e" );
|
|
|
|
ToFile( "BUILD_SOSL", $BUILD_SOSL, "e" );
|
|
|
|
ToFile( "FRAMEWORKSHOME", $FRAMEWORKSHOME, "e" );
|
|
|
|
ToFile( "Empty", $empty, "n" );
|
2006-01-06 04:17:44 -06:00
|
|
|
|
|
|
|
#
|
|
|
|
# Writing the platform independent constant values to file.
|
|
|
|
# (c = comment, e = environment variable, a = alias )
|
2002-08-27 05:31:48 -05:00
|
|
|
ToFile( "Platform independent constant values.", $empty, "c" );
|
2003-06-12 04:16:12 -05:00
|
|
|
# dictionaries
|
|
|
|
if ('@WITH_DICT@' =~ m/ALL,/s)
|
|
|
|
{
|
|
|
|
foreach $dict (@DICTIONARIES)
|
|
|
|
{
|
|
|
|
ToFile( "DIC_$dict", "TRUE", "e" );
|
|
|
|
}
|
2005-09-26 07:24:57 -05:00
|
|
|
ToFile( "DIC_ALL", "TRUE", "e" );
|
2003-06-12 04:16:12 -05:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
foreach $dict (@DICTIONARIES)
|
|
|
|
{ if ('@WITH_DICT@' =~ m/$dict,/s)
|
|
|
|
{ my $val="TRUE";
|
|
|
|
ToFile( "DIC_$dict", $val, "e" );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{ my $val;
|
|
|
|
undef $val;
|
|
|
|
ToFile( "DIC_$dict", $val, "e" );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2002-08-27 05:31:48 -05:00
|
|
|
# Languages
|
2004-10-27 09:23:18 -05:00
|
|
|
ToFile( "WITH_LANG", "@WITH_LANG@", "e" );
|
2007-06-11 08:00:39 -05:00
|
|
|
ToFile( "INTRO_BITMAPS", "@INTRO_BITMAPS@", "e" );
|
|
|
|
ToFile( "ABOUT_BITMAPS", "@ABOUT_BITMAPS@", "e" );
|
|
|
|
ToFile( "OOO_VENDOR", "@OOO_VENDOR@", "e" );
|
2006-11-01 06:49:54 -06:00
|
|
|
ToFile( "WITH_POOR_HELP_LOCALIZATIONS", "@WITH_POOR_HELP_LOCALIZATIONS@", "e" );
|
2004-10-27 09:23:18 -05:00
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
ToFile( "CALL_CDECL", $CALL_CDECL, "e" );
|
|
|
|
ToFile( "COMMON_OUTDIR", $COMMON_OUTDIR, "e" );
|
|
|
|
ToFile( "common_build", $common_build, "e" );
|
|
|
|
ToFile( "BMP_WRITES_FLAG", $BMP_WRITES_FLAG, "e" );
|
|
|
|
ToFile( "BUILD_SOSL_RELEASE", $BUILD_SOSL_RELEASE, "e" );
|
|
|
|
ToFile( "NO_REC_RES", $NO_REC_RES, "e" );
|
2005-06-24 09:49:13 -05:00
|
|
|
ToFile( "NO_HIDS", $NO_HIDS, "e" );
|
2002-08-27 05:31:48 -05:00
|
|
|
ToFile( "SO3", $SO3, "e" );
|
|
|
|
ToFile( "SOLAR_PLUGIN", $SOLAR_PLUGIN, "e" );
|
|
|
|
ToFile( "TF_PACKAGES", $TF_PACKAGES, "e" );
|
|
|
|
ToFile( "TF_FILEURL", $TF_FILEURL, "e" );
|
|
|
|
ToFile( "TF_CFGDATA", $TF_CFGDATA, "e" );
|
|
|
|
ToFile( "TF_SVDATA", $TF_SVDATA, "e" );
|
|
|
|
ToFile( "TF_SDBAPI", $TF_SDBAPI, "e" );
|
|
|
|
ToFile( "TF_UCB", $TF_UCB, "e" );
|
|
|
|
ToFile( "UPDATER", $UPDATER, "e" );
|
|
|
|
ToFile( "build_deliver", $BUILD_DELIVER, "e" );
|
|
|
|
ToFile( "VCL", $VCL, "e" );
|
|
|
|
ToFile( "ENABLEUNICODE", $ENABLEUNICODE, "e" );
|
|
|
|
ToFile( "NEW_JAR_PACK", $NEW_JAR_PACK, "e" );
|
|
|
|
ToFile( "NO_BSYMBOLIC", $NO_BSYMBOLIC, "e" );
|
|
|
|
ToFile( "TF_FILTER", "TRUE", "e" );
|
2005-01-05 03:42:09 -06:00
|
|
|
if ("@ENABLE_DEBUG@" eq "TRUE") {
|
2002-08-27 05:31:48 -05:00
|
|
|
ToFile( "debug", "true", "e" );
|
|
|
|
}
|
2006-08-28 06:35:32 -05:00
|
|
|
if ("@ENABLE_WERROR@" eq "FALSE") {
|
|
|
|
ToFile( "EXTERNAL_WARNINGS_NOT_ERRORS", "TRUE", "e" );
|
|
|
|
}
|
2004-09-08 09:24:19 -05:00
|
|
|
ToFile( "PRODUCT", "@PRODUCT@", "e" );
|
|
|
|
ToFile( "PROFULLSWITCH", "@PROFULLSWITCH@", "e" );
|
|
|
|
ToFile( "PROEXT", $PROEXT, "e" );
|
2007-06-27 07:59:25 -05:00
|
|
|
ToFile( "UNIXWRAPPERNAME", "@UNIXWRAPPERNAME@","e" );
|
2005-03-01 10:17:28 -06:00
|
|
|
ToFile( "BUILD_MOZAB", "@BUILD_MOZAB@", "e" );
|
2005-05-10 01:52:29 -05:00
|
|
|
ToFile( "PREBUILD_MOZAB", $PREBUILD_MOZAB, "e" );
|
|
|
|
ToFile( "MOZILLA_VERSION", $MOZILLA_VERSION, "e" );
|
2005-03-01 10:17:28 -06:00
|
|
|
ToFile( "DEFAULT_MOZILLA_TOOLKIT", $MOZILLA_TOOLKIT, "e" );
|
2005-03-11 04:31:40 -06:00
|
|
|
ToFile( "BUILD_VER_STRING", "@BUILD_VER_STRING@", "e" );
|
2007-04-25 09:54:09 -05:00
|
|
|
ToFile( "ENABLE_VBA", "@ENABLE_VBA@", "e" );
|
|
|
|
ToFile( "VBA_EXTENSION", "@VBA_EXTENSION@", "e" );
|
2005-07-14 07:45:49 -05:00
|
|
|
if ($platform =~ m/linux-gnu/ && $platform =~ m/powerpc/) {
|
|
|
|
ToFile( "JITC_PROCESSOR_TYPE","6", "e" );
|
|
|
|
}
|
2005-05-18 06:49:00 -05:00
|
|
|
ToFile( "DEFAULT_TO_ENGLISH_FOR_PACKING", "yes", "e" );
|
2004-10-27 10:17:53 -05:00
|
|
|
ToFile( "ENABLE_GTK", "@ENABLE_GTK@", "e" );
|
|
|
|
ToFile( "GTK_CFLAGS", "@GTK_CFLAGS@", "e" );
|
|
|
|
ToFile( "GTK_LIBS", "@GTK_LIBS@", "e" );
|
2006-11-07 08:29:19 -06:00
|
|
|
ToFile( "ENABLE_SYSTRAY_GTK", "@ENABLE_SYSTRAY_GTK@", "e" );
|
2004-10-27 10:17:53 -05:00
|
|
|
ToFile( "ENABLE_STATIC_GTK", "@ENABLE_STATIC_GTK@", "e" );
|
2006-02-28 03:41:43 -06:00
|
|
|
ToFile( "ENABLE_CAIRO", "@ENABLE_CAIRO@", "e" );
|
2007-08-02 08:59:11 -05:00
|
|
|
ToFile( "ENABLE_DBUS", "@ENABLE_DBUS@", "e" );
|
2005-02-11 10:59:05 -06:00
|
|
|
ToFile( "ENABLE_GNOMEVFS", "@ENABLE_GNOMEVFS@", "e" );
|
2004-10-27 10:17:53 -05:00
|
|
|
ToFile( "ENABLE_KDE", "@ENABLE_KDE@", "e" );
|
|
|
|
ToFile( "KDE_CFLAGS", "@KDE_CFLAGS@", "e" );
|
|
|
|
ToFile( "KDE_LIBS", "@KDE_LIBS@", "e" );
|
2006-01-10 07:33:19 -06:00
|
|
|
ToFile( "ENABLE_KAB", "@ENABLE_KAB@", "e" );
|
2005-04-11 02:52:38 -05:00
|
|
|
ToFile( "MOC", "@MOC@", "e" );
|
2002-10-22 07:24:17 -05:00
|
|
|
ToFile( "PSPRINT", "TRUE", "e" );
|
|
|
|
# [ed] 5/14/02 If we're building Aqua graphics, insert a C macro to indicate this.
|
|
|
|
# There may be a better way to do this, like splitting unxmacxp into two, but
|
|
|
|
# hopefully this hack will work for now...
|
|
|
|
|
2005-03-07 10:28:47 -06:00
|
|
|
if ($platform =~ m/darwin/)
|
2002-10-22 07:24:17 -05:00
|
|
|
{
|
2003-01-20 08:00:18 -06:00
|
|
|
my $macosxCdefs="";
|
2002-10-22 07:24:17 -05:00
|
|
|
|
2005-03-07 10:28:47 -06:00
|
|
|
if( ! -x "/usr/bin/sw_vers" ) {
|
2002-10-22 07:24:17 -05:00
|
|
|
|
2004-02-02 11:17:15 -06:00
|
|
|
ToFile( "BUILD_OS_DARWIN", "TRUE", "e");
|
|
|
|
|
2002-10-22 07:24:17 -05:00
|
|
|
$macosxCdefs.=" -DBUILD_OS_DARWIN";
|
|
|
|
open DARVER, "/usr/bin/uname -v |";
|
|
|
|
my $s=<DARVER>;
|
|
|
|
chomp $s;
|
|
|
|
if ( $s =~ /(\d+?)\.(\d+?)(.*?)/)
|
|
|
|
{
|
2004-02-02 11:17:15 -06:00
|
|
|
ToFile("BUILD_OS_MAJOR", $1, "e");
|
2002-10-22 07:24:17 -05:00
|
|
|
$macosxCdefs.=" -DBUILD_OS_MAJOR=" . $1;
|
2004-02-02 11:17:15 -06:00
|
|
|
|
|
|
|
ToFile("BUILD_OS_MINOR", $2, "e");
|
2002-10-22 07:24:17 -05:00
|
|
|
$macosxCdefs.=" -DBUILD_OS_MINOR=" . $2;
|
|
|
|
|
|
|
|
$s=$3;
|
|
|
|
if ( $s =~ /(\d+?)/) {
|
2004-02-02 11:17:15 -06:00
|
|
|
ToFile("BUILD_OS_REV", $1, "e");
|
2002-10-22 07:24:17 -05:00
|
|
|
$macosxCdefs.=" -DBUILD_OS_REV=" . $1;
|
|
|
|
} else {
|
2004-02-02 11:17:15 -06:00
|
|
|
ToFile("BUILD_OS_REV", "0", "e");
|
2002-10-22 07:24:17 -05:00
|
|
|
$macosxCdefs.=" -DBUILD_OS_REV=0";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
close DARVER;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$macosxCdefs.=" -DBUILD_OS_APPLEOSX";
|
2004-02-02 11:17:15 -06:00
|
|
|
ToFile("BUILD_OS_APPLEOSX", "TRUE", "e");
|
2002-10-22 07:24:17 -05:00
|
|
|
|
2005-03-07 10:28:47 -06:00
|
|
|
open OSXVER, "/usr/bin/sw_vers -productVersion |";
|
|
|
|
while (<OSXVER>) {
|
2005-05-31 11:03:33 -05:00
|
|
|
if (/^\s*(\d+?)\.(\d+?)(\.(\d+?))*\s*$/) {
|
2005-03-07 10:28:47 -06:00
|
|
|
ToFile("BUILD_OS_MAJOR", $1, "e");
|
|
|
|
$macosxCdefs.=" -DBUILD_OS_MAJOR=" . $1;
|
|
|
|
|
|
|
|
ToFile("BUILD_OS_MINOR", $2, "e");
|
|
|
|
$macosxCdefs.=" -DBUILD_OS_MINOR=" . $2;
|
|
|
|
|
2005-05-31 11:03:33 -05:00
|
|
|
if($3 ne "") {
|
|
|
|
ToFile("BUILD_OS_REV", $4, "e");
|
|
|
|
$macosxCdefs.=" -DBUILD_OS_REV=" . $4;
|
|
|
|
} else {
|
|
|
|
ToFile("BUILD_OS_REV", 0, "e");
|
|
|
|
$macosxCdefs.=" -DBUILD_OS_REV=0";
|
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
last;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
close(OSXVER);
|
2002-10-22 07:24:17 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
if ( $GUIBASE eq "aqua" ) {
|
|
|
|
$macosxCdefs.=" -DQUARTZ";
|
|
|
|
}
|
|
|
|
|
|
|
|
ToFile( "ENVCDEFS", $macosxCdefs, "e");
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2003-01-20 08:00:18 -06:00
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
ToFile( "MKDEPENDSOLVER", "TRUE", "e" );
|
|
|
|
#
|
|
|
|
# Writing the platform dependent constant values to file.
|
|
|
|
# (c = comment, e = environment variable, a = alias )
|
|
|
|
ToFile( "Platform dependent constant values.", $empty, "c" );
|
|
|
|
ToFile( "SOLAR_JAVA", $SOLAR_JAVA, "e" );
|
|
|
|
ToFile( "BIG_SVX", $BIG_SVX, "e" );
|
|
|
|
ToFile( "COM", $COM, "e" );
|
|
|
|
ToFile( "COMPATH", $COMPATH, "e" );
|
|
|
|
ToFile( "CPU", $CPU, "e" );
|
|
|
|
ToFile( "CPUNAME", $CPUNAME, "e" );
|
|
|
|
ToFile( "CVER", $CVER, "e" );
|
|
|
|
ToFile( "GUI", $GUI, "e" );
|
|
|
|
ToFile( "GLIBC", $GLIBC, "e" );
|
|
|
|
ToFile( "GUIBASE", $GUIBASE, "e" );
|
|
|
|
ToFile( "GUIENV", $GUIENV, "e" );
|
|
|
|
ToFile( "GVER", $GVER, "e" );
|
|
|
|
ToFile( "OS", $OS, "e" );
|
|
|
|
ToFile( "EXCEPTIONS", $EXCEPTIONS, "e" );
|
|
|
|
ToFile( "OSVERSION", $OSVERSION, "e" );
|
2003-08-18 08:54:11 -05:00
|
|
|
ToFile( "PTHREAD_CFLAGS", "@PTHREAD_CFLAGS@", "e" );
|
|
|
|
ToFile( "PTHREAD_LIBS", "@PTHREAD_LIBS@", "e" );
|
2002-08-27 05:31:48 -05:00
|
|
|
ToFile( "OUTPATH", $OUTPATH, "e" );
|
|
|
|
ToFile( "INPATH", $INPATH, "e" );
|
|
|
|
ToFile( "GVERDIR", $GVERDIR, "e" );
|
|
|
|
ToFile( "PATH_SEPERATOR", $PATH_SEPERATOR, "e" );
|
|
|
|
ToFile( "XPVERSION", $XPVERSION, "e" );
|
|
|
|
ToFile( "COMEX", $COMEX, "e" );
|
|
|
|
ToFile( "CDPATHx", $CDPATHx, "e" );
|
|
|
|
ToFile( "DYNAMIC_CRT", $DYNAMIC_CRT, "e" );
|
|
|
|
ToFile( "SET_EXCEPTIONS", $SET_EXCEPTIONS, "e" );
|
|
|
|
ToFile( "use_shl_versions", $use_shl_versions, "e" );
|
2003-01-20 08:00:18 -06:00
|
|
|
ToFile( "WRAPCMD", $WRAPCMD, "e" );
|
2002-08-27 05:31:48 -05:00
|
|
|
#
|
|
|
|
# Writing the variables to file.
|
|
|
|
# (c = comment, e = environment variable, a = alias, n = newline )
|
|
|
|
ToFile( "Variable values.", $empty, "c" );
|
2005-03-07 10:28:47 -06:00
|
|
|
if ( $platform =~ m/cygwin/ )
|
2004-06-16 04:48:31 -05:00
|
|
|
{ ToFile( "CYGWIN_PATH", $CYGWIN_PATH, "e" );
|
2002-10-22 07:24:17 -05:00
|
|
|
ToFile( "PSDK_HOME", $PSDK_HOME, "e" );
|
2007-03-27 04:20:09 -05:00
|
|
|
ToFile( "DIRECTXSDK_LIB", $DIRECTXSDK_LIB, "e" );
|
2004-10-11 07:48:47 -05:00
|
|
|
ToFile( "ATL_LIB", $ATL_LIB, "e" );
|
2007-03-27 04:20:09 -05:00
|
|
|
if ( $MINGW ne "yes" )
|
|
|
|
{ ToFile( "ATL_INCLUDE", $ATL_INCLUDE, "e" );
|
|
|
|
}
|
2006-09-25 07:33:27 -05:00
|
|
|
ToFile( "MFC_LIB", $MFC_LIB, "e" );
|
|
|
|
ToFile( "MFC_INCLUDE", $MFC_INCLUDE, "e" );
|
2005-05-13 06:13:43 -05:00
|
|
|
ToFile( "NSIS_PATH", "@NSIS_PATH@", "e" );
|
2006-10-24 09:34:49 -05:00
|
|
|
ToFile( "DISABLE_ACTIVEX", "@DISABLE_ACTIVEX@","e" );
|
2003-03-19 09:03:25 -06:00
|
|
|
ToFile( "USE_NEW_SDK", $USE_NEW_SDK, "e" );
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
|
|
|
ToFile( "PERL", $PERL, "e" );
|
2005-01-25 05:43:16 -06:00
|
|
|
ToFile( "RPM", "@RPM@", "e" );
|
2005-08-30 03:12:51 -05:00
|
|
|
ToFile( "DPKG", "@DPKG@", "e" );
|
|
|
|
ToFile( "PKGMK", "@PKGMK@", "e" );
|
2002-10-22 07:24:17 -05:00
|
|
|
ToFile( "GNUMAKE", "@GNUMAKE@", "e" );
|
2002-08-27 05:31:48 -05:00
|
|
|
ToFile( "UPD", $UPD, "e" );
|
|
|
|
ToFile( "SOLARUPD", $SOLARUPD, "e" );
|
|
|
|
ToFile( "WORK_STAMP", $WORK_STAMP, "e" );
|
|
|
|
ToFile( "SOLARVER", $SOLARVER, "e" );
|
|
|
|
ToFile( "SOLARVERSION", $SOLARVERSION, "e" );
|
|
|
|
ToFile( "SOLARENV", $SOLARENV, "e" );
|
|
|
|
ToFile( "SOLARENVINC", $SOLARENVINC, "e" );
|
|
|
|
ToFile( "LOCALINI", $LOCALINI, "e" );
|
|
|
|
ToFile( "STAR_INIROOT", $STAR_INIROOT, "e" );
|
|
|
|
ToFile( "STAR_INIROOTOLD", $STAR_INIROOTOLD, "e" );
|
|
|
|
ToFile( "STAR_STANDLST", $STAR_STANDLST, "e" );
|
|
|
|
ToFile( "STAR_SSCOMMON", $STAR_SSCOMMON, "e" );
|
|
|
|
ToFile( "STAR_SSOLARINI", $STAR_SSOLARINI, "e" );
|
|
|
|
ToFile( "STAR_RESOURCEPATH", $STAR_RESOURCEPATH, "e" );
|
|
|
|
ToFile( "STAR_REGISTRY", $STAR_REGISTRY, "e" );
|
|
|
|
ToFile( "DMAKEROOT", $DMAKEROOT, "e" );
|
2005-01-25 09:55:07 -06:00
|
|
|
if ( $JDK ne "gcj" ) {
|
|
|
|
ToFile( "CLASSPATH", $CLASSPATH, "e" );
|
|
|
|
ToFile( "XCLASSPATH", $XCLASSPATH, "e" );
|
|
|
|
}
|
2005-04-06 04:53:34 -05:00
|
|
|
else {
|
2006-07-05 15:12:45 -05:00
|
|
|
ToFile( "JAVACISGCJ", '@JAVACISGCJ@', "e" );
|
2005-06-16 08:38:18 -05:00
|
|
|
ToFile( "AWTLIB", '@AWTLIB@', "e" );
|
2005-04-06 04:53:34 -05:00
|
|
|
}
|
2006-01-13 09:37:16 -06:00
|
|
|
if ( '@JDK@' ne '' )
|
|
|
|
{
|
|
|
|
ToFile( "JDK", "@JDK@", "e" );
|
|
|
|
ToFile( "JAVAINTERPRETER", "@JAVAINTERPRETER@","e" );
|
|
|
|
ToFile( "JAVACOMPILER", "@JAVACOMPILER@", "e" );
|
2006-07-05 15:12:45 -05:00
|
|
|
ToFile( "JAVAAOTCOMPILER", "@JAVAAOTCOMPILER@","e" );
|
2006-01-13 09:37:16 -06:00
|
|
|
ToFile( "JAVADOC", "@JAVADOC@", "e" );
|
|
|
|
}
|
2005-03-07 10:28:47 -06:00
|
|
|
if ( $platform =~ m/darwin/ )
|
2002-08-27 05:31:48 -05:00
|
|
|
{ ToFile( "DYLD_LIBRARY_PATH", $LD_LIBRARY_PATH, "e" );
|
|
|
|
}
|
2003-01-20 08:00:18 -06:00
|
|
|
else {
|
2005-03-07 10:28:47 -06:00
|
|
|
if ( $platform =~ m/irix/ ) {
|
2003-01-20 08:00:18 -06:00
|
|
|
ToFile( "LD_LIBRARYN32_PATH", $LD_LIBRARY_PATH, "e" );
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
ToFile( "LD_LIBRARY_PATH", $LD_LIBRARY_PATH, "e" );
|
|
|
|
}
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2003-12-17 08:01:33 -06:00
|
|
|
ToFile( "SCPDEFS", '@SCPDEFS@', "e" );
|
2002-08-27 05:31:48 -05:00
|
|
|
ToFile( "SOLAREXTRAINC", $SOLAREXTRAINC, "e" );
|
|
|
|
ToFile( "SOLAREXTRALIB", $SOLAREXTRALIB, "e" );
|
|
|
|
ToFile( "PATH", $PATH, "e" );
|
|
|
|
ToFile( "PATHEXTRA", $PATHEXTRA, "e" );
|
|
|
|
ToFile( "SOLARLIB", $SOLARLIB, "e" );
|
|
|
|
ToFile( "SOLARINC", $SOLARINC, "e" );
|
|
|
|
ToFile( "COMP_ENV", $COMP_ENV, "e" );
|
|
|
|
ToFile( "JAVAHOME", $JAVAHOME, "e" );
|
|
|
|
ToFile( "CC", $CC, "e" );
|
2005-01-25 05:43:16 -06:00
|
|
|
ToFile( "HAVE_GCC_VISIBILITY_FEATURE",
|
|
|
|
"@HAVE_GCC_VISIBILITY_FEATURE@", "e" );
|
2007-07-31 07:09:45 -05:00
|
|
|
ToFile( "HAVE_LD_HASH_STYLE","@HAVE_LD_HASH_STYLE@","e" );
|
2002-08-27 05:31:48 -05:00
|
|
|
ToFile( "CXX", $CXX, "e" );
|
2006-08-03 09:10:40 -05:00
|
|
|
ToFile( "MINGWCXX", "@MINGWCXX@", "e" );
|
|
|
|
ToFile( "MINGWSTRIP", "@MINGWSTRIP@", "e" );
|
2004-09-08 09:24:19 -05:00
|
|
|
ToFile( "USE_SYSTEM_STL", "@USE_SYSTEM_STL@", "e" );
|
2006-01-31 11:28:58 -06:00
|
|
|
ToFile( "ALLOC", "@ALLOC@", "e" );
|
2004-06-16 04:48:31 -05:00
|
|
|
ToFile( "ENABLE_SYMBOLS", "@ENABLE_SYMBOLS@", "e" );
|
2006-10-24 09:34:49 -05:00
|
|
|
ToFile( "DISABLE_STRIP", "@DISABLE_STRIP@", "e" );
|
2007-01-16 09:09:14 -06:00
|
|
|
ToFile( "LFS_CFLAGS", "@LFS_CFLAGS@", "e" );
|
2004-06-16 04:48:31 -05:00
|
|
|
ToFile( "ENABLE_CRASHDUMP", "@ENABLE_CRASHDUMP@", "e" );
|
|
|
|
ToFile( "ENABLE_CUPS", "@ENABLE_CUPS@", "e" );
|
|
|
|
ToFile( "ENABLE_FONTCONFIG", "@ENABLE_FONTCONFIG@", "e" );
|
2004-09-08 06:26:43 -05:00
|
|
|
ToFile( "ENABLE_DIRECTX", "@ENABLE_DIRECTX@", "e" );
|
2006-10-30 02:18:48 -06:00
|
|
|
ToFile( "ENABLE_PCH", "@ENABLE_PCH@", "e" );
|
2003-12-01 10:39:16 -06:00
|
|
|
ToFile( "VC_STANDARD", "@VC_STANDARD@", "e" );
|
2003-07-16 11:25:06 -05:00
|
|
|
ToFile( "WITH_GPC", "@WITH_GPC@", "e" );
|
2005-02-11 08:50:36 -06:00
|
|
|
ToFile( "WITH_MYSPELL_DICTS","@WITH_MYSPELL_DICTS@","e");
|
2006-03-22 02:25:39 -06:00
|
|
|
ToFile( "ENABLE_LOCKDOWN", "@ENABLE_LOCKDOWN@", "e" );
|
2003-08-18 08:54:11 -05:00
|
|
|
ToFile( "WITH_LIBSN", "@WITH_LIBSN@", "e" );
|
|
|
|
ToFile( "LIBSN_CFLAGS", "@LIBSN_CFLAGS@", "e" );
|
|
|
|
ToFile( "LIBSN_LIBS", "@LIBSN_LIBS@", "e" );
|
2006-04-20 07:34:17 -05:00
|
|
|
ToFile( "WITH_LDAP", "@WITH_LDAP@", "e" );
|
2004-11-15 07:11:32 -06:00
|
|
|
ToFile( "WITH_OPENLDAP", "@WITH_OPENLDAP@", "e" );
|
2005-03-30 04:38:22 -06:00
|
|
|
ToFile( "WITH_MOZILLA", "@WITH_MOZILLA@", "e" );
|
|
|
|
ToFile( "SYSTEM_MOZILLA", "@SYSTEM_MOZILLA@", "e" );
|
2006-07-19 03:52:27 -05:00
|
|
|
ToFile( "MOZ_FLAVOUR", "@MOZ_FLAVOUR@", "e" );
|
|
|
|
ToFile( "NSPR_LIB", "@NSPR_LIB@", "e" );
|
|
|
|
ToFile( "NSS_LIB", "@NSS_LIB@", "e" );
|
2005-03-30 04:38:22 -06:00
|
|
|
ToFile( "MOZ_INC", "@MOZ_INC@", "e" );
|
|
|
|
ToFile( "MOZ_LIB", "@MOZ_LIB@", "e" );
|
|
|
|
ToFile( "MOZ_LIB_XPCOM", "@MOZ_LIB_XPCOM@", "e" );
|
2005-12-21 04:09:50 -06:00
|
|
|
ToFile( "MOZ_NSPR_CFLAGS", "@MOZ_NSPR_CFLAGS@", "e" );
|
2005-03-30 04:38:22 -06:00
|
|
|
ToFile( "MOZ_NSS_CFLAGS", "@MOZ_NSS_CFLAGS@", "e" );
|
|
|
|
ToFile( "MOZ_LDAP_CFLAGS", "@MOZ_LDAP_CFLAGS@", "e" );
|
2003-12-17 08:01:33 -06:00
|
|
|
ToFile( "WITH_FONTS", "@WITH_FONTS@", "e" );
|
2006-02-10 04:18:06 -06:00
|
|
|
ToFile( "WITHOUT_AFMS", "@WITHOUT_AFMS@", "e" );
|
|
|
|
ToFile( "WITHOUT_PPDS", "@WITHOUT_PPDS@", "e" );
|
2005-02-11 08:50:36 -06:00
|
|
|
ToFile( "WITH_BINFILTER", "@WITH_BINFILTER@", "e" );
|
|
|
|
ToFile( "BUILD_TYPE", "@BUILD_TYPE@", "e" );
|
2005-01-05 05:10:00 -06:00
|
|
|
ToFile( "WITH_FONTOOO", "@WITH_FONTOOO@", "e" );
|
2005-06-09 08:14:52 -05:00
|
|
|
ToFile( "ENABLE_EVOAB2", "@ENABLE_EVOAB2@", "e" );
|
|
|
|
ToFile( "GOBJECT_CFLAGS", "@GOBJECT_CFLAGS@", "e" );
|
|
|
|
ToFile( "GOBJECT_LIBS", "@GOBJECT_LIBS@", "e" );
|
2005-01-05 05:10:00 -06:00
|
|
|
ToFile( "SYSTEM_MSPACK", "@SYSTEM_MSPACK@", "e" );
|
2003-12-17 08:01:33 -06:00
|
|
|
if ( '@ENABLE_RPATH@' eq "no" ) {
|
|
|
|
ToFile( "LINKFLAGSRUNPATH",'', "e" );
|
|
|
|
}
|
2005-01-25 05:43:16 -06:00
|
|
|
ToFile( "EPM", "@EPM@", "e" );
|
2005-03-08 09:35:34 -06:00
|
|
|
ToFile( "BUILD_EPM", "@BUILD_EPM@", "e" );
|
2005-03-15 02:46:44 -06:00
|
|
|
ToFile( "PKGFORMAT", "@PKGFORMAT@", "e" );
|
2005-02-21 08:16:50 -06:00
|
|
|
ToFile( "SYSTEM_STDLIBS", "@SYSTEM_STDLIBS@", "e" );
|
2003-12-17 08:01:33 -06:00
|
|
|
ToFile( "SYSTEM_ZLIB", "@SYSTEM_ZLIB@", "e" );
|
2004-09-08 09:24:19 -05:00
|
|
|
ToFile( "SYSTEM_PYTHON", "@SYSTEM_PYTHON@", "e" );
|
|
|
|
ToFile( "PYTHON_CFLAGS", "@PYTHON_CFLAGS@", "e" );
|
|
|
|
ToFile( "PYTHON_LIBS", "@PYTHON_LIBS@", "e" );
|
2007-01-03 04:33:57 -06:00
|
|
|
if ($SYSTEM_PYTHON eq "NO") {
|
|
|
|
ToFile( "HOME", "@HOME@", "e" );
|
|
|
|
}
|
2006-12-12 09:05:54 -06:00
|
|
|
ToFile( "SYSTEM_ICU", "@SYSTEM_ICU@", "e" );
|
|
|
|
ToFile( "SYSTEM_GENBRK", "@SYSTEM_GENBRK@", "e" );
|
|
|
|
ToFile( "SYSTEM_GENCCODE", "@SYSTEM_GENCCODE@", "e" );
|
2007-01-10 04:27:32 -06:00
|
|
|
ToFile( "SYSTEM_GENCMN", "@SYSTEM_GENCMN@", "e" );
|
2004-09-08 09:24:19 -05:00
|
|
|
ToFile( "SYSTEM_JPEG", "@SYSTEM_JPEG@", "e" );
|
|
|
|
ToFile( "SYSTEM_FREETYPE", "@SYSTEM_FREETYPE@", "e" );
|
|
|
|
ToFile( "FREETYPE_CFLAGS", "@FREETYPE_CFLAGS@", "e" );
|
|
|
|
ToFile( "FREETYPE_LIBS", "@FREETYPE_LIBS@", "e" );
|
2006-02-28 03:41:43 -06:00
|
|
|
ToFile( "SYSTEM_CAIRO", "@SYSTEM_CAIRO@", "e" );
|
|
|
|
ToFile( "CAIRO_CFLAGS", "@CAIRO_CFLAGS@", "e" );
|
|
|
|
ToFile( "CAIRO_LIBS", "@CAIRO_LIBS@", "e" );
|
2005-03-01 09:58:10 -06:00
|
|
|
ToFile( "SYSTEM_LIBWPD", "@SYSTEM_LIBWPD@", "e" );
|
|
|
|
ToFile( "LIBWPD_CFLAGS", "@LIBWPD_CFLAGS@", "e" );
|
|
|
|
ToFile( "LIBWPD_LIBS", "@LIBWPD_LIBS@", "e" );
|
2004-09-08 09:24:19 -05:00
|
|
|
ToFile( "SYSTEM_LIBXML", "@SYSTEM_LIBXML@", "e" );
|
2006-10-24 08:23:25 -05:00
|
|
|
ToFile( "USE_FT_EMBOLDEN", "@USE_FT_EMBOLDEN@", "e" );
|
2004-09-08 09:24:19 -05:00
|
|
|
ToFile( "LIBXML_CFLAGS", "@LIBXML_CFLAGS@", "e" );
|
|
|
|
ToFile( "LIBXML_LIBS", "@LIBXML_LIBS@", "e" );
|
|
|
|
ToFile( "SYSTEM_EXPAT", "@SYSTEM_EXPAT@", "e" );
|
2005-04-11 03:31:27 -05:00
|
|
|
ToFile( "SYSTEM_DB", "@SYSTEM_DB@", "e" );
|
|
|
|
ToFile( "DB_VERSION", "@DB_VERSION@", "e" );
|
|
|
|
ToFile( "DB_INCLUDES", "@DB_INCLUDES@", "e" );
|
|
|
|
ToFile( "DB_JAR", "@DB_JAR@", "e" );
|
2006-04-19 09:10:10 -05:00
|
|
|
ToFile( "SYSTEM_HSQLDB", "@SYSTEM_HSQLDB@", "e" );
|
|
|
|
ToFile( "HSQLDB_JAR", "@HSQLDB_JAR@", "e" );
|
|
|
|
ToFile( "SYSTEM_BSH", "@SYSTEM_BSH@", "e" );
|
|
|
|
ToFile( "BSH_JAR", "@BSH_JAR@", "e" );
|
|
|
|
ToFile( "SYSTEM_XML_APIS", "@SYSTEM_XML_APIS@", "e" );
|
|
|
|
ToFile( "XML_APIS_JAR", "@XML_APIS_JAR@", "e" );
|
|
|
|
ToFile( "SYSTEM_XERCES", "@SYSTEM_XERCES@", "e" );
|
|
|
|
ToFile( "XERCES_JAR", "@XERCES_JAR@", "e" );
|
|
|
|
ToFile( "SYSTEM_XALAN", "@SYSTEM_XALAN@", "e" );
|
|
|
|
ToFile( "XALAN_JAR", "@XALAN_JAR@", "e" );
|
2006-10-11 03:26:20 -05:00
|
|
|
ToFile( "SERIALIZER_JAR", "@SERIALIZER_JAR@", "e" );
|
2004-09-08 09:24:19 -05:00
|
|
|
ToFile( "SYSTEM_ODBC_HEADERS","@SYSTEM_ODBC_HEADERS@","e" );
|
2007-05-10 07:15:24 -05:00
|
|
|
ToFile( "SYSTEM_LIBXSLT", "@SYSTEM_LIBXSLT@", "e" );
|
|
|
|
ToFile( "LIBXSLT_CFLAGS", "@LIBXSLT_CFLAGS@", "e" );
|
|
|
|
ToFile( "LIBXSLT_LIBS", "@LIBXSLT_LIBS@", "e" );
|
2005-02-21 08:16:50 -06:00
|
|
|
ToFile( "SYSTEM_SANE_HEADER","@SYSTEM_SANE_HEADER@","e" );
|
|
|
|
ToFile( "SYSTEM_XRENDER_HEADERS","@SYSTEM_XRENDER_HEADERS@","e" );
|
2004-09-08 09:24:19 -05:00
|
|
|
ToFile( "SYSTEM_CURL", "@SYSTEM_CURL@", "e" );
|
|
|
|
ToFile( "CURL_CFLAGS", "@CURL_CFLAGS@", "e" );
|
|
|
|
ToFile( "CURL_LIBS", "@CURL_LIBS@", "e" );
|
2005-01-18 09:13:37 -06:00
|
|
|
ToFile( "SYSTEM_BOOST", "@SYSTEM_BOOST@", "e" );
|
2007-08-02 09:55:40 -05:00
|
|
|
ToFile( "SYSTEM_VIGRA", "@SYSTEM_VIGRA@", "e" );
|
2004-09-08 09:24:19 -05:00
|
|
|
ToFile( "SYSTEM_NAS", "@SYSTEM_NAS@", "e" );
|
|
|
|
ToFile( "NAS_INCLUDES", "@NAS_INCLUDES@", "e" );
|
2005-08-25 10:11:37 -05:00
|
|
|
ToFile( "ENABLE_NAS", "@ENABLE_NAS@", "e" );
|
2005-02-16 09:46:56 -06:00
|
|
|
ToFile( "ENABLE_PASF", "@ENABLE_PASF@", "e" );
|
|
|
|
ToFile( "SYSTEM_SNDFILE", "@SYSTEM_SNDFILE@", "e" );
|
2007-07-31 07:09:45 -05:00
|
|
|
ToFile( "SNDFILE_CFLAGS", "@SNDFILE_CFLAGS@", "e" );
|
|
|
|
ToFile( "SNDFILE_LIBS", "@SNDFILE_LIBS@", "e" );
|
2005-02-16 09:46:56 -06:00
|
|
|
ToFile( "SYSTEM_PORTAUDIO", "@SYSTEM_PORTAUDIO@", "e" );
|
2007-07-31 07:09:45 -05:00
|
|
|
ToFile( "PA_VER", "@PA_VER@", "e" );
|
2004-09-08 09:24:19 -05:00
|
|
|
ToFile( "SYSTEM_NEON", "@SYSTEM_NEON@", "e" );
|
2006-07-19 03:52:27 -05:00
|
|
|
ToFile( "NEON_VERSION", "@NEON_VERSION@", "e" );
|
2004-09-08 09:24:19 -05:00
|
|
|
ToFile( "NEON_LIBS", "@NEON_LIBS@", "e" );
|
|
|
|
ToFile( "NEON_CFLAGS", "@NEON_CFLAGS@", "e" );
|
2006-04-20 07:34:17 -05:00
|
|
|
ToFile( "DISABLE_NEON", "@DISABLE_NEON@", "e" );
|
2006-12-01 07:17:17 -06:00
|
|
|
ToFile( "DISABLE_XAW", "@DISABLE_XAW@", "e" );
|
2006-08-04 07:32:25 -05:00
|
|
|
ToFile( "ENABLE_AGG", "@ENABLE_AGG@", "e" );
|
2005-12-14 07:42:40 -06:00
|
|
|
ToFile( "SYSTEM_AGG", "@SYSTEM_AGG@", "e" );
|
2006-08-04 07:32:25 -05:00
|
|
|
ToFile( "AGG_VERSION", "@AGG_VERSION@", "e" );
|
2003-12-17 08:01:33 -06:00
|
|
|
ToFile( "BUILD_DMAKE", "@BUILD_DMAKE@", "e" );
|
2006-08-03 09:10:40 -05:00
|
|
|
ToFile( "BUILD_UNOWINREG", "@BUILD_UNOWINREG@", "e" );
|
2004-09-09 05:22:23 -05:00
|
|
|
ToFile( "USE_XINERAMA", "@USE_XINERAMA@", "e" );
|
|
|
|
ToFile( "XINERAMA_LINK", "@XINERAMA_LINK@", "e" );
|
2006-01-06 06:14:28 -06:00
|
|
|
ToFile( "SYSTEM_HUNSPELL", "@SYSTEM_HUNSPELL@", "e" );
|
2006-01-31 11:28:58 -06:00
|
|
|
ToFile( "HUNSPELL_CFLAGS", "@HUNSPELL_CFLAGS@", "e" );
|
2007-07-31 07:09:45 -05:00
|
|
|
ToFile( "HUNSPELL_LIBS", "@HUNSPELL_LIBS@", "e" );
|
2005-06-17 03:24:42 -05:00
|
|
|
ToFile( "SYSTEM_HYPH", "@SYSTEM_HYPH@", "e" );
|
|
|
|
ToFile( "SYSTEM_MYTHES", "@SYSTEM_MYTHES@", "e" );
|
2006-07-19 03:52:27 -05:00
|
|
|
ToFile( "PAM", "@PAM@", "e" );
|
|
|
|
ToFile( "NEW_SHADOW_API", "@NEW_SHADOW_API@", "e" );
|
2005-06-17 03:24:42 -05:00
|
|
|
ToFile( "PAM_LINK", "@PAM_LINK@", "e" );
|
|
|
|
ToFile( "CRYPT_LINK", "@CRYPT_LINK@", "e" );
|
2007-01-22 23:35:28 -06:00
|
|
|
ToFile( "XAU_LIBS", "@XAU_LIBS@", "e" );
|
2003-07-16 11:25:06 -05:00
|
|
|
ToFile( "GXX_INCLUDE_PATH", "@GXX_INCLUDE_PATH@", "e" );
|
|
|
|
ToFile( "COMMON_BUILD_TOOLS",$COMMON_BUILD_TOOLS, "e" );
|
2005-03-07 10:28:47 -06:00
|
|
|
if ($platform !~ m/cygwin/)
|
2002-08-27 05:31:48 -05:00
|
|
|
{ ToFile( "TEMP", $TEMP, "e" );
|
|
|
|
ToFile( "TMP", $TEMP, "e" );
|
|
|
|
}
|
2004-07-13 09:43:01 -05:00
|
|
|
ToFile( "SOLARSRC", $SOLARSRC, "e" );
|
2005-03-07 10:28:47 -06:00
|
|
|
if ( $platform =~ m/cygwin/ )
|
2002-08-27 05:31:48 -05:00
|
|
|
{
|
|
|
|
# these variables marked with "j" are used with cygwin only
|
2007-03-27 04:20:09 -05:00
|
|
|
if ( $MINGW eq "yes" )
|
|
|
|
{ my ($tempstring);
|
|
|
|
$tempstring = $ILIB;
|
|
|
|
$tempstring =~ s/:/;/g;
|
|
|
|
ToFile( "ILIB", $tempstring, "e" );
|
|
|
|
ToFile( "ATL_INCLUDE", $ATL_INCLUDE, "e" );
|
2007-05-25 05:10:05 -05:00
|
|
|
ToFile( "DIRECTXSDK_HOME", "@DIRECTXSDK_HOME@", "e" );
|
2007-03-27 04:20:09 -05:00
|
|
|
ToFile( "USE_MINGW", $USE_MINGW, "e" ); }
|
|
|
|
else
|
|
|
|
{ ToFile( "ILIB", $ILIB, "j" ); }
|
2006-05-04 03:25:34 -05:00
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
ToFile( "GREP", $WIN_GREP, "e" );
|
|
|
|
ToFile( "FIND", $WIN_FIND, "e" );
|
|
|
|
ToFile( "LS", $WIN_LS, "e" );
|
|
|
|
ToFile( "GNUCOPY", $WIN_GNUCOPY, "e" );
|
|
|
|
ToFile( "TOUCH", $WIN_TOUCH, "e" );
|
|
|
|
}
|
2006-05-04 03:25:34 -05:00
|
|
|
# $perlpre is only used for the following three variables
|
|
|
|
# and only set for 4nt.
|
|
|
|
my $perlpre = "";
|
2005-03-07 10:28:47 -06:00
|
|
|
if (( $platform =~ m/cygwin/ ) and ( '@USE_SHELL@' eq "4nt" )) {
|
2006-05-04 03:25:34 -05:00
|
|
|
ToFile( "HOME", " ", "e" );
|
|
|
|
$perlpre = "perl ".${SOLARENV}.${BIN}.${ds};
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2006-05-04 03:25:34 -05:00
|
|
|
ToFile( "DELIVER", $perlpre."deliver.pl", "e" );
|
|
|
|
ToFile( "MKOUT", $perlpre."mkout.pl", "e" );
|
|
|
|
ToFile( "ZIPDEP", $perlpre."zipdep.pl", "e" );
|
|
|
|
|
|
|
|
ToFile( "USE_SHELL", '@USE_SHELL@', "e" );
|
2004-09-08 09:24:19 -05:00
|
|
|
if ($SYSTEM_PYTHON eq "NO")
|
|
|
|
{
|
2005-03-07 10:28:47 -06:00
|
|
|
if ( $platform =~ m/cygwin/ ) {
|
2004-09-08 09:24:19 -05:00
|
|
|
ToFile( "PYTHONPATH", $PYTHONPATH, "j" );
|
|
|
|
ToFile( "PYTHONHOME", $PYTHONHOME, "j" );
|
|
|
|
} else {
|
|
|
|
ToFile( "PYTHONPATH", $PYTHONPATH, "e" );
|
|
|
|
ToFile( "PYTHONHOME", $PYTHONHOME, "e" );
|
|
|
|
}
|
2003-12-01 10:39:16 -06:00
|
|
|
}
|
2006-07-19 03:36:45 -05:00
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
#
|
|
|
|
# Writing the aliases to file.
|
|
|
|
ToFile( "Aliases.", $empty, "c" );
|
2006-07-19 03:36:45 -05:00
|
|
|
ToFile( "Don't set aliases when bootstrapping", $empty, "c" );
|
|
|
|
ToFile( 'if ( ! ${?_ISBOOTSTRAP_} ) then', $empty, "y");
|
|
|
|
ToFile( "if test -z \"\$_ISBOOTSTRAP_\"; then", $empty, "z");
|
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
ToFile( "alias mkout", $mkout, "a" );
|
|
|
|
ToFile( "alias deliver", $deliver, "a" );
|
|
|
|
ToFile( "alias build", $build, "a" );
|
2007-05-09 07:27:09 -05:00
|
|
|
ToFile( "alias build_client",$build_client, "a" );
|
2002-08-27 05:31:48 -05:00
|
|
|
ToFile( "alias zipdep", $zipdep, "a" );
|
2005-03-07 10:28:47 -06:00
|
|
|
if ( $platform !~ m/cygwin/ )
|
2002-08-27 05:31:48 -05:00
|
|
|
{ ToFile( "alias nmake", $nmake, "a" );
|
|
|
|
}
|
|
|
|
|
2006-07-19 03:36:45 -05:00
|
|
|
ToFile( "endif", $empty, "y");
|
|
|
|
ToFile( "fi", $empty, "z");
|
|
|
|
|
|
|
|
# write make command for dmake for W32-4nt
|
2005-03-07 10:28:47 -06:00
|
|
|
if ( $platform =~ m/cygwin/ and '@USE_SHELL@' eq "4nt" )
|
2002-08-27 05:31:48 -05:00
|
|
|
{
|
|
|
|
ToFile( "build the dmake executable.", $empty, "c");
|
2005-10-28 05:59:53 -05:00
|
|
|
ToFile( "if not exist \%SOLARENV\\\%OUTPATH\\bin\\dmake.exe (cd \%SRC_ROOT\\dmake \^ set INCLUDE=\%COMPATH\\include;\%PSDK_HOME\\include \^ set LIB=\%COMPATH\\lib;\%PSDK_HOME\\lib \^ call make.bat win95-vpp40 \^ cd \%SRC_ROOT)", $empty, "x");
|
2003-08-18 08:54:11 -05:00
|
|
|
ToFile( "if not exist \%SOLARENV\\\%OUTPATH\\bin\\dmake.exe ( mkdir /S \%SOLARENV\\\%OUTPATH\\bin \^ copy dmake\\dmake.exe \%SOLARENV\\\%OUTPATH\\bin\\dmake.exe )", $empty, "x");
|
2006-01-06 04:17:44 -06:00
|
|
|
ToFile( "\@echo Warning! LIB and INCLUDE will be cleared!", $empty, "x");
|
|
|
|
ToFile( "\@unset INCLUDE LIB", $empty, "x");
|
|
|
|
ToFile( "check for correct dmake.", $empty, "c");
|
|
|
|
ToFile( '@if "%@SEARCH[dmake]" == "" ( @echo dmake not build or missing! Invalid build environment! ^ unset SOLARENV ^ cancel )', $empty, "x");
|
2006-05-04 03:25:34 -05:00
|
|
|
ToFile( '@dmake -V > dmakecheck.out', $empty, "x");
|
|
|
|
ToFile( '@ffind /Tcygwin /C /B dmakecheck.out && ( @echo Found cygwin build dmake! Invalid! ^ unset SOLARENV ^ cancel )', $empty, "x");
|
2002-08-27 05:31:48 -05:00
|
|
|
ToFile( " ", $empty, "x");
|
|
|
|
}
|
2006-01-06 04:17:44 -06:00
|
|
|
|
|
|
|
# Check if the right dmake version is used. (W32-tcsh only)
|
|
|
|
if ( $platform =~ m/cygwin/ and '@USE_SHELL@' ne "4nt" ) {
|
|
|
|
ToFile( "Check if the right dmake version is used.", $empty, "c" );
|
|
|
|
# Invalidate build environment.
|
|
|
|
ToFile( "WORK_STAMP", "_invalid_", "e" );
|
|
|
|
# Don't test the dmake version if this file is sourced by bootstrap
|
2006-05-04 03:25:34 -05:00
|
|
|
ToFile( "bash -c 'if test -n \"\$_ISBOOTSTRAP_\" || (dmake.exe -V | grep -e \"-cygwin\\|OS := cygwin\" > /dev/null ); then true; else echo -e \"\\n\\nERROR: Not a cygwin build dmake or dmake missing, please check!\\n\\n\" ; sleep 5; false ; fi' || exit 1", $empty, "y");
|
2006-01-06 04:17:44 -06:00
|
|
|
# Restore valid environment if test was successful.
|
|
|
|
ToFile( "WORK_STAMP", $WORK_STAMP, "e" );
|
|
|
|
ToFile( "", $empty, "n");
|
|
|
|
}
|
|
|
|
|
2005-05-31 11:03:33 -05:00
|
|
|
# on Solaris, MacOSX and FreeBSD, set GNUCOPY and GNUPATCH
|
|
|
|
if ($platform =~ m/solaris|darwin|freebsd/)
|
2003-07-16 11:25:06 -05:00
|
|
|
{
|
|
|
|
ToFile( "GNUPATCH", "@GNUPATCH@", "e");
|
|
|
|
ToFile( "GNUCOPY", "@GNUCP@", "e");
|
|
|
|
}
|
2005-05-13 01:30:21 -05:00
|
|
|
ToFile( "SAL_ENABLE_FILE_LOCKING", "1", "e");
|
2002-08-27 05:31:48 -05:00
|
|
|
#
|
|
|
|
# Writing unset variables you might not need to file.
|
|
|
|
#
|
|
|
|
print OUT $unsetvars;
|
2006-05-04 03:25:34 -05:00
|
|
|
|
|
|
|
print OUT_SH "export $exportvars$newline";
|
|
|
|
print OUT_SH "unset $unsetvarssh$newline";
|
|
|
|
|
2003-03-19 09:03:25 -06:00
|
|
|
if(defined($outfile_bat))
|
|
|
|
{ print OUT_BAT $unsetvarsbat;
|
|
|
|
}
|
2002-08-27 05:31:48 -05:00
|
|
|
|
|
|
|
#
|
|
|
|
#---------------------------
|
|
|
|
# VIII. Closing output file.
|
|
|
|
#---------------------------
|
|
|
|
#
|
|
|
|
close( OUT ) || print "Can't close $outfile: $!";
|
2006-05-04 03:25:34 -05:00
|
|
|
|
|
|
|
close( OUT_SH ) || print "Can't close $outfile_sh: $!";
|
|
|
|
|
2003-03-19 09:03:25 -06:00
|
|
|
if( defined($outfile_bat))
|
|
|
|
{ close( OUT_BAT ) || print "Can't close $outfile_bat: $!";
|
|
|
|
}
|
2006-09-27 03:43:23 -05:00
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
#
|
|
|
|
#------------------------------
|
|
|
|
# IX. Sourcing the output file.
|
|
|
|
#------------------------------
|
|
|
|
#
|
|
|
|
#---------------------------------
|
|
|
|
# X. Set up the build environment.
|
|
|
|
#---------------------------------
|
|
|
|
#
|
|
|
|
#--------------------------------------------------------
|
|
|
|
# XI. Moving the output file to the build home directory.
|
|
|
|
#--------------------------------------------------------
|
|
|
|
#
|
|
|
|
$tmp = $SRC_ROOT.$ds.$outfile;
|
|
|
|
if (rename( $outfile, $tmp ) ne 1)
|
|
|
|
{ `mv -f $outfile $tmp`;
|
|
|
|
}
|
2006-05-04 03:25:34 -05:00
|
|
|
|
|
|
|
$tmp = $SRC_ROOT.$ds.$outfile_sh;
|
|
|
|
if (rename( $outfile_sh, $tmp ) ne 1)
|
|
|
|
{ `mv -f $outfile_sh $tmp`;
|
2002-10-22 07:24:17 -05:00
|
|
|
}
|
2006-05-04 03:25:34 -05:00
|
|
|
|
2003-03-19 09:03:25 -06:00
|
|
|
if(defined($outfile_bat))
|
|
|
|
{
|
|
|
|
$tmp = $SRC_ROOT.$ds.$outfile_bat;
|
|
|
|
if (rename( $outfile_bat, $tmp ) ne 1)
|
|
|
|
{ `mv -f $outfile_bat $tmp`;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
#
|
|
|
|
#--------------------------------------------------------
|
|
|
|
# XII. Message at the end.
|
|
|
|
#--------------------------------------------------------
|
|
|
|
#
|
|
|
|
#
|
|
|
|
print "*********************************************************".
|
|
|
|
"******************* $newline"."*"."$newline";
|
2003-01-20 08:00:18 -06:00
|
|
|
print "* OpenOffice.org $UPD configuration. $newline";
|
2002-08-27 05:31:48 -05:00
|
|
|
for ( $tmp = 0; $tmp < 2; $tmp++ )
|
|
|
|
{ print "* $newline";
|
|
|
|
}
|
2003-01-20 08:00:18 -06:00
|
|
|
print "* Configuration part of OpenOffice.org $UPD build is finished. $newline* $newline";
|
|
|
|
print "* NB! Be aware that you might not be able to build OpenOffice.org if you $newline".
|
2002-08-27 05:31:48 -05:00
|
|
|
"* ignore any warning message that were generated during this configuration $newline".
|
2005-01-25 05:43:16 -06:00
|
|
|
"* process. $newline* $newline";
|
2002-08-27 05:31:48 -05:00
|
|
|
|
|
|
|
if ( $Warning ne "" )
|
|
|
|
{ print "$Warning*";
|
|
|
|
print "$newline";
|
|
|
|
}
|
|
|
|
|
2005-01-25 05:43:16 -06:00
|
|
|
print "*$newline* USAGE: $newline";
|
2003-01-20 08:00:18 -06:00
|
|
|
print "* Source $outfile (in tcsh)";
|
2006-05-04 03:25:34 -05:00
|
|
|
print " or $outfile.sh (in sh)";
|
2003-01-20 08:00:18 -06:00
|
|
|
print "$newline";
|
|
|
|
print "* in order to set up the build-environment variables.$newline";
|
2002-08-27 05:31:48 -05:00
|
|
|
for ( $tmp = 0; $tmp < 2; $tmp++ )
|
|
|
|
{ print "* $newline";
|
|
|
|
}
|
|
|
|
print "*********************************************************".
|
|
|
|
"******************* $newline";
|
|
|
|
|
|
|
|
$bootfile = "bootstrap";
|
|
|
|
open( OUT, ">$bootfile" ) ||
|
|
|
|
die "Cannot open $bootfile: $!\n";
|
2006-07-05 16:32:39 -05:00
|
|
|
print OUT "#!/bin/sh\n";
|
2006-07-19 03:36:45 -05:00
|
|
|
print OUT "_ISBOOTSTRAP_=TRUE ; export _ISBOOTSTRAP_ ; . $SRC_ROOT/$outfile.sh\n";
|
2007-02-06 07:26:11 -06:00
|
|
|
print OUT "unset _ISBOOTSTRAP_; export _ISBOOTSTRAP_\n";
|
2007-03-27 04:20:09 -05:00
|
|
|
if ( $MINGW eq "yes" )
|
|
|
|
{ print OUT 'PATH="/usr/bin:$PATH" : export PATH'."\n"; }
|
2002-08-27 05:31:48 -05:00
|
|
|
close( OUT ) || print "Can't close $bootfile: $!";
|
|
|
|
system(`cat bootstrap.1 >> bootstrap`);
|
|
|
|
system(`chmod +x bootstrap`);
|
|
|
|
#
|
|
|
|
#--------------------------------------------------------
|
|
|
|
# Moving the bootstrap file to the build home directory.
|
|
|
|
#--------------------------------------------------------
|
|
|
|
#
|
|
|
|
$tmp = $SRC_ROOT.$ds.$bootfile;
|
|
|
|
if (rename( $bootfile, $tmp ) ne 1)
|
|
|
|
{ `mv -f $bootfile $tmp`;
|
|
|
|
}
|
2002-10-22 07:24:17 -05:00
|
|
|
|
|
|
|
print "Configure completed\n";
|
2006-07-05 16:32:39 -05:00
|
|
|
if ( "@USE_SHELL@" ne "4nt" ) {
|
|
|
|
print "You may now run ./bootstrap in $SRC_ROOT\n";
|
2003-03-19 09:03:25 -06:00
|
|
|
}
|
2003-06-12 04:16:12 -05:00
|
|
|
if ( $Warning ne "" ) {
|
2006-12-01 07:53:16 -06:00
|
|
|
print "***** WARNINGS ISSUED *****\n";
|
2003-06-12 04:16:12 -05:00
|
|
|
}
|
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
#
|
|
|
|
#-----------------
|
|
|
|
# XII. Functions.
|
|
|
|
#-----------------
|
|
|
|
#
|
|
|
|
#-------------------------------------------------------------
|
|
|
|
# Function name: CheckPathName
|
|
|
|
# Description: chops off the '/' character if it's the last
|
|
|
|
# character in a pathname. also adds the '/'
|
|
|
|
# character if it's not the first character
|
|
|
|
# in a path.
|
|
|
|
# Arguments: 1. Path (string)
|
|
|
|
# Return value: Path (string)
|
|
|
|
#-------------------------------------------------------------
|
|
|
|
sub CheckPathName
|
|
|
|
{ my $retrn = $_[ 0 ];
|
2005-03-07 10:28:47 -06:00
|
|
|
if (($platform =~ m/cygwin/) or ( '@USE_SHELL@' ne "4nt" ))
|
2002-08-27 05:31:48 -05:00
|
|
|
{ # Check if the first character is not a '/'.
|
|
|
|
if ( !( $_[ 0 ] =~ /^\// ) )
|
|
|
|
{ $retrn = $ds.$_[ 0 ];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
# kill the last '/','\','\n' if they exists.
|
|
|
|
$retrn =~ s![\s/\\]+$!!;
|
|
|
|
# Done!
|
|
|
|
return( $retrn );
|
|
|
|
}
|
|
|
|
#-------------------------------------------------------------
|
|
|
|
# Function name: CheckPathExist
|
|
|
|
# Description: Checks whether the directory that is given
|
2005-03-08 09:35:34 -06:00
|
|
|
# as an argument exists. If not abort.
|
2002-08-27 05:31:48 -05:00
|
|
|
# Arguments: 1. Path (string)
|
|
|
|
# Return value: void
|
|
|
|
#-------------------------------------------------------------
|
|
|
|
sub CheckPathExist
|
|
|
|
{ my $dir = $_[ 0 ];
|
2005-03-08 09:35:34 -06:00
|
|
|
if ( !( -d $dir ) and $^O ne 'MSWin32' )
|
|
|
|
{ print ( "The directory $_[ 0 ] does not exist. Please create first.\n" );
|
|
|
|
exit 1;
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
|
|
|
else
|
2005-03-08 09:35:34 -06:00
|
|
|
{ # Don't check under ActiveState Perl (Windows). The path is possibly
|
|
|
|
# posix and it cannot handle it.
|
|
|
|
return "true";
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
#------------------------------------------------------------
|
|
|
|
# Function name: CreateFileHeader
|
|
|
|
# Description: Creates a header for the outfile.
|
2002-10-22 07:24:17 -05:00
|
|
|
# Arguments: 1. File to write to
|
|
|
|
# 2. UPD (string)
|
|
|
|
# 3. Platform (string)
|
|
|
|
# 4. name of shell for this file
|
2003-03-19 09:03:25 -06:00
|
|
|
# 5. comment to use for this file
|
2002-08-27 05:31:48 -05:00
|
|
|
# Return value: void
|
|
|
|
#------------------------------------------------------------
|
|
|
|
sub CreateFileHeader
|
|
|
|
{ my $timestamp = `date`;
|
|
|
|
chomp( $timestamp );
|
2002-10-22 07:24:17 -05:00
|
|
|
my $filehandle = $_[0];
|
2003-03-19 09:03:25 -06:00
|
|
|
my $comment = $_[4];
|
2002-10-22 07:24:17 -05:00
|
|
|
print { $filehandle } "$comment #################################################################";
|
|
|
|
print { $filehandle } $newline;
|
2003-01-20 08:00:18 -06:00
|
|
|
print { $filehandle } "$comment OpenOffice.org $_[ 1 ] build environment file for: $_[ 2 ]. $newline";
|
2002-10-22 07:24:17 -05:00
|
|
|
print { $filehandle } "$comment Generated on: $timestamp $newline";
|
|
|
|
print { $filehandle } "$comment Source this file to set up the build environment. $newline";
|
|
|
|
print { $filehandle } "$comment 1. exec $_[3] $newline";
|
|
|
|
print { $filehandle } "$comment 2. source $outfile $newline";
|
|
|
|
print { $filehandle } "$comment #################################################################";
|
|
|
|
print { $filehandle } $newline;
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
|
|
|
#---------------------------------------------------------
|
2006-05-04 03:25:34 -05:00
|
|
|
# Function name: ToFile
|
2002-08-27 05:31:48 -05:00
|
|
|
# Description: Writes the environment variable in the
|
2006-05-04 03:25:34 -05:00
|
|
|
# output file.
|
2002-08-27 05:31:48 -05:00
|
|
|
# Arguments: 1. Name of environment variable (string)
|
|
|
|
# 2. Value of environment variable (string)
|
2006-05-04 03:25:34 -05:00
|
|
|
# 3. e - env. var
|
|
|
|
# a - alias
|
|
|
|
# c - comment
|
|
|
|
# n - newline
|
2003-12-01 10:39:16 -06:00
|
|
|
# j - env. var in DOS style (WINNT only)
|
2006-05-04 03:25:34 -05:00
|
|
|
# x - raw, write as is to OUT_BAT
|
2006-07-19 03:36:45 -05:00
|
|
|
# y - raw, write as is to OUT
|
|
|
|
# z - raw, write as is to OUT_SH
|
2002-08-27 05:31:48 -05:00
|
|
|
# Return value: void
|
|
|
|
#---------------------------------------------------------
|
2006-05-04 03:25:34 -05:00
|
|
|
sub ToFile {
|
|
|
|
if ( $_[ 2 ] eq "e" ) {
|
|
|
|
# Write an environment variable to file.
|
|
|
|
if (defined $_[ 1 ] && $_[ 1 ] ne "" ) {
|
|
|
|
my $envvar = $_[ 1 ];
|
|
|
|
my $envvarbash = $envvar;
|
|
|
|
if ("@USE_SHELL@" eq "4nt" ) {
|
|
|
|
# expand the variables
|
|
|
|
$envvar =~ s/(\$\{?\w+\}?)/$1/eeg ;
|
|
|
|
# Some variables need to be translated
|
|
|
|
$win_format_var = WinFormat( $envvar );
|
|
|
|
# The excluded variables are translated by cygwin
|
|
|
|
if ( $_[ 0 ] !~ /^PATH$|^TMP$|^TEMP$|^TMPDIR$|^HOME$/i ) {
|
|
|
|
$envvar = $win_format_var;
|
|
|
|
}
|
2006-09-25 07:33:27 -05:00
|
|
|
# Tcsh/bash needs backslashes quoted
|
2006-05-04 03:25:34 -05:00
|
|
|
$envvar =~ s/\\/\\\\/g;
|
|
|
|
$envvarbash = $envvar;
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2006-05-04 03:25:34 -05:00
|
|
|
printf("%-12s %-17s %-10s %s\n", "The variable", $_[ 0 ], "is set to:", $envvar);
|
|
|
|
print OUT "$setenv $_[ 0 ] \"$envvar\"$newline"; # to tcsh file
|
|
|
|
print OUT_SH "$_[ 0 ]=\"$envvarbash\"$newline"; # to sh file
|
|
|
|
$exportvars .= " $_[ 0 ]"; # add to export list for sh file
|
|
|
|
if(defined($outfile_bat)) {
|
|
|
|
print OUT_BAT "IF DEFINED $_[ 0 ] $unset $_[ 0 ]$newline";
|
|
|
|
print OUT_BAT "$set $_[ 0 ]=$win_format_var$newline";
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2006-05-04 03:25:34 -05:00
|
|
|
} else {
|
|
|
|
printf("%-12s %-17s %-10s %s\n", "The variable", $_[ 0 ], "is set to:", "unset") ; # to stdout
|
2003-04-28 11:02:16 -05:00
|
|
|
$unsetvars .= "$unsetenv $_[ 0 ] >& /dev/null$newline"; # for tcsh file
|
|
|
|
$unsetvarssh .= " $_[ 0 ]"; # for sh file
|
2006-05-04 03:25:34 -05:00
|
|
|
if(defined($outfile_bat)) {
|
|
|
|
$unsetvarsbat .= "$unset $_[ 0 ] >& NUL$newline";
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
elsif ( $_[ 2 ] eq "a" )
|
|
|
|
{ # Write an alias to file.
|
2006-05-04 03:25:34 -05:00
|
|
|
print "The $_[ 0 ] is set to: $_[ 1 ]\n"; # to stdout
|
|
|
|
print OUT "$_[ 0 ] $_[ 1 ]$newline"; # to tcsh file
|
|
|
|
print OUT_SH "$_[ 0 ]=$_[ 1 ]$newline"; # to sh file
|
2003-03-19 09:03:25 -06:00
|
|
|
if(defined($outfile_bat)) # create the correct 4nt alias format
|
|
|
|
{ my $aliastmp = $_[ 1 ];
|
|
|
|
$aliastmp =~ s/\$/\%/g;
|
|
|
|
$aliastmp =~ s!/!\\!g;
|
|
|
|
$aliastmp =~ s!"!!g;
|
|
|
|
print OUT_BAT "$_[ 0 ]=".'`'.$aliastmp.'`'.$newline;
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
elsif ( $_[ 2 ] eq "c" )
|
|
|
|
{ # Write a comment to file.
|
|
|
|
print "$newline";
|
2006-05-04 03:25:34 -05:00
|
|
|
print "$comment$newline";
|
|
|
|
print "$comment $_[ 0 ]$newline";
|
|
|
|
print "$comment$newline";
|
2002-08-27 05:31:48 -05:00
|
|
|
print OUT "$newline";
|
2006-05-04 03:25:34 -05:00
|
|
|
print OUT "$comment$newline";
|
|
|
|
print OUT "$comment $_[ 0 ]$newline";
|
|
|
|
print OUT "$comment$newline";
|
|
|
|
print OUT_SH "$newline";
|
|
|
|
print OUT_SH "$comment$newline";
|
|
|
|
print OUT_SH "$comment $_[ 0 ]$newline";
|
|
|
|
print OUT_SH "$comment$newline";
|
|
|
|
if(defined($outfile_bat)) {
|
2003-03-19 09:03:25 -06:00
|
|
|
print OUT_BAT "$newline";
|
2006-05-04 03:25:34 -05:00
|
|
|
print OUT_BAT "$comment4nt$newline";
|
|
|
|
print OUT_BAT "$comment4nt $_[ 0 ]$newline";
|
|
|
|
print OUT_BAT "$comment4nt$newline";
|
2003-03-19 09:03:25 -06:00
|
|
|
}
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2006-05-04 03:25:34 -05:00
|
|
|
elsif ( $_[ 2 ] eq "n" )
|
2002-08-27 05:31:48 -05:00
|
|
|
{ #Write a newline to a file
|
|
|
|
print OUT "$newline";
|
2006-05-04 03:25:34 -05:00
|
|
|
print OUT_SH "$newline";
|
2003-03-19 09:03:25 -06:00
|
|
|
print OUT_BAT "$newline" if defined($outfile_bat);
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
|
|
|
elsif ( $_[ 2 ] eq "x" )
|
|
|
|
{
|
|
|
|
#Write first argument as is, and nothing else
|
2006-05-04 03:25:34 -05:00
|
|
|
print OUT_BAT "$_[ 0 ]$newline" if defined($outfile_bat);
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2006-05-04 03:25:34 -05:00
|
|
|
elsif ( $_[ 2 ] eq "y" )
|
2002-08-27 05:31:48 -05:00
|
|
|
{
|
2006-05-04 03:25:34 -05:00
|
|
|
#Write first argument as is, and nothing else
|
|
|
|
print OUT "$_[ 0 ]$newline";
|
2006-07-19 03:36:45 -05:00
|
|
|
}
|
|
|
|
elsif ( $_[ 2 ] eq "z" )
|
|
|
|
{
|
|
|
|
#Write first argument as is, and nothing else
|
2006-05-04 03:25:34 -05:00
|
|
|
print OUT_SH "$_[ 0 ]$newline";
|
|
|
|
}
|
|
|
|
elsif ( $_[ 2 ] eq "j" ) {
|
|
|
|
if ((defined $_[ 1 ]) and ( $platform =~ m/cygwin/ )) {
|
|
|
|
printf("%-12s %-17s %-10s %-39s\n", "The variable", $_[ 0 ], "is set to:", $_[ 1 ]) ; # to stdout
|
2003-03-19 09:03:25 -06:00
|
|
|
$win_format_var = WinFormat( $_[ 1 ] ); #Filter for Windows
|
|
|
|
$win_format_var =~ s/\\/\\\\/g;
|
2006-05-04 03:25:34 -05:00
|
|
|
print OUT "$setenv $_[ 0 ] \"$win_format_var\"$newline";
|
|
|
|
|
|
|
|
print OUT_SH "$_[ 0 ]=\"$win_format_var\"$newline"; # to sh file
|
|
|
|
$exportvars .= " $_[ 0 ]"; # add to export list for sh file
|
|
|
|
|
|
|
|
if (defined($outfile_bat)) {
|
2002-08-27 05:31:48 -05:00
|
|
|
$win_format_var = WinFormat( $_[ 1 ] ); #Filter for Windows
|
2006-05-04 03:25:34 -05:00
|
|
|
print OUT_BAT "IF DEFINED $_[ 0 ] $unset $_[ 0 ]$newline";
|
|
|
|
print OUT_BAT "$set $_[ 0 ]=$win_format_var$newline";
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2006-05-04 03:25:34 -05:00
|
|
|
print "Type \"j\" only intended for Windows!$newline";
|
|
|
|
print "use \"e\" to set and unset variables.$newline";
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
2006-05-04 03:25:34 -05:00
|
|
|
{ print "Unknown type!$newline";
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
#----------------------------------------------------------
|
|
|
|
# Function name: PosixFormat
|
|
|
|
# Description: Format variables to Posix Style Format. Should only be used
|
2006-05-08 09:55:43 -05:00
|
|
|
# with DOS-style path variables.
|
2002-08-27 05:31:48 -05:00
|
|
|
# Arguments: 1. Variable (string)
|
|
|
|
# Return value: Reformatted String
|
|
|
|
#----------------------------------------------------------
|
|
|
|
sub PosixFormat
|
2004-06-16 04:48:31 -05:00
|
|
|
{ my ( $variable, $d1, $d2 );
|
2002-08-27 05:31:48 -05:00
|
|
|
$variable = $_[ 0 ];
|
2005-03-07 10:28:47 -06:00
|
|
|
# ToDo: Do the replacement only if Windows and var contains "\" and ":"
|
|
|
|
if ( $platform =~ m/cygwin/ )
|
2002-10-22 07:24:17 -05:00
|
|
|
{ $variable =~ s/(\$\{?\w+\}?)/$1/eeg ; # expand the variables
|
|
|
|
$variable =~ s/(\$\{?\w+\}?)/$1/eeg ; # expand the variables twice!
|
2002-08-27 05:31:48 -05:00
|
|
|
if ( ( $variable =~ /\\/ ) and ( $variable =~ /:/ ) )
|
|
|
|
{ $variable =~ s{([c-z]):}{/cygdrive/$1}gi;
|
|
|
|
# Map drives to /cgydrive/drive
|
|
|
|
# We do this also for old cygwins, back
|
|
|
|
# replacement in winformat.
|
|
|
|
}
|
|
|
|
$variable =~ s!\\!/!g;
|
|
|
|
$variable =~ s/;/:/g;
|
2004-06-16 04:48:31 -05:00
|
|
|
|
|
|
|
# Search for posix path :path with space: and replace with short dos path
|
|
|
|
while ( $variable =~ /(?::|\A)[\'\"]?([^:]+ [^:]+)[\'\"]?(?::|\Z)/ ) {
|
2006-05-08 09:55:43 -05:00
|
|
|
$d1 = $1 ;
|
|
|
|
if ( $d1 =~ m/"$/ ) { die( "A part of $variable is enclosed in quotes, fix this!"); }
|
|
|
|
chomp( $d2 = qx{cygpath -d "$d1"} ) || die( "Path with space: $1 propably doesn't exist!" );
|
|
|
|
# Be arefull with \s
|
|
|
|
$d2 =~ s/\\/\\\\/g;
|
|
|
|
chomp( $d2 = qx{cygpath -u "$d2"} ) ;
|
|
|
|
$variable =~ s/\Q$d1\E/$d2/ ;
|
2004-06-16 04:48:31 -05:00
|
|
|
}
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
|
|
|
return $variable;
|
|
|
|
}
|
|
|
|
#----------------------------------------------------------
|
|
|
|
# Function name: WinFormat
|
|
|
|
# Description: Format variables to Windows Format.
|
|
|
|
# Arguments: 1. Variable (string)
|
|
|
|
# Return value: Reformatted String
|
|
|
|
#----------------------------------------------------------
|
|
|
|
sub WinFormat
|
2003-01-20 08:00:18 -06:00
|
|
|
{ my ( $variable, $d1, $d1_prefix, $d1_fname, @split_var );
|
2002-08-27 05:31:48 -05:00
|
|
|
$variable = $_[ 0 ];
|
2002-10-22 07:24:17 -05:00
|
|
|
$variable =~ s/^\s+//g ; #remove leading spaces
|
|
|
|
$variable =~ s/\s+$//g ; #remove trailing spaces
|
2002-08-27 05:31:48 -05:00
|
|
|
# Here should be NO "\"! If yes, PosixFormat() was forgotten before !
|
|
|
|
if ( $variable =~ /\\/ )
|
|
|
|
{
|
|
|
|
die("Error! Variable contains \"\\\" : $variable PosixFormat() missing?");
|
|
|
|
}
|
|
|
|
$variable =~ s/\$\{PATH\}/%PATH/g ; # explicit replace ${PATH}
|
2002-10-22 07:24:17 -05:00
|
|
|
$variable =~ s/(\$\{?\w+\}?)/$1/eeg ; # expand the variables
|
|
|
|
$variable =~ s/(\$\{?\w+\}?)/$1/eeg ; # expand the variables twice!
|
2002-08-27 05:31:48 -05:00
|
|
|
$variable =~ s/:+/:/g ; # remove multiple ;
|
|
|
|
|
|
|
|
$variable =~ s/:/;/g;
|
2002-10-22 07:24:17 -05:00
|
|
|
# Search for posix path entry and replace with cygpath -w entry ( -d if filename contains space )
|
|
|
|
if ( $variable =~ /^\s*-\w/ )
|
2002-08-27 05:31:48 -05:00
|
|
|
{
|
|
|
|
# Include paths
|
2002-10-22 07:24:17 -05:00
|
|
|
@split_var = split(/\s+-/,$variable);
|
|
|
|
$split_var[0] =~ s/^-//; # split deletes the "-" from all but the first element
|
2002-08-27 05:31:48 -05:00
|
|
|
foreach $d1 ( @split_var )
|
|
|
|
{
|
2006-05-04 03:25:34 -05:00
|
|
|
$d1 = "-".$d1;
|
2003-01-20 08:00:18 -06:00
|
|
|
if ( $d1 =~ /^(-\w)[\'\"]?((?:\/[\w\.~ ]+)+)[\'\"]?/ )
|
2006-05-04 03:25:34 -05:00
|
|
|
# This regex: option -> $1, filename without quotes -> $2
|
2002-08-27 05:31:48 -05:00
|
|
|
{
|
|
|
|
$d1_prefix = $1;
|
2006-05-04 03:25:34 -05:00
|
|
|
$d1_fname = $2;
|
|
|
|
if ( $d1_fname =~ / / ) {
|
|
|
|
# Use DOS 8.3 style to avoid quoting
|
|
|
|
chomp( $d1_fname = qx{cygpath -d "$d1_fname"} );
|
|
|
|
} # ! This fails when $d1 doesn't exist!
|
|
|
|
else {
|
|
|
|
chomp( $d1_fname = qx{cygpath -w "$d1_fname"} ); # Use "normal" filenames
|
|
|
|
}
|
2003-01-20 08:00:18 -06:00
|
|
|
$d1 = $d1_prefix.$d1_fname;
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2006-05-04 03:25:34 -05:00
|
|
|
else
|
|
|
|
{ # relative paths here
|
|
|
|
# Do nothing.
|
|
|
|
}
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
|
|
|
$variable = join(' ',@split_var);
|
|
|
|
}
|
|
|
|
elsif ( $variable eq ";" ) {}
|
2006-05-04 03:25:34 -05:00
|
|
|
else {
|
2002-08-27 05:31:48 -05:00
|
|
|
# Normal paths
|
2006-05-04 03:25:34 -05:00
|
|
|
|
|
|
|
# One special case is if "perl " is prepended.
|
|
|
|
$variable =~ /^(perl\s+)?(.*)$/;
|
|
|
|
my $perlpre = $1;
|
|
|
|
if ( !defined($perlpre) ) { $perlpre = ""; }
|
|
|
|
$variable = $2;
|
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
@split_var = split(/;/,$variable);
|
2006-05-04 03:25:34 -05:00
|
|
|
foreach $d1 ( @split_var ) {
|
|
|
|
if ( $d1 =~ /(?:^\/[\w\.~ ]+)+/ ) {
|
|
|
|
if ( $d1 =~ / / ) {
|
|
|
|
chomp( $d1 = qx{cygpath -d "$d1"} ); # Use DOS 8.3 style to avoid quoting
|
|
|
|
} # ! This fails when $d1 doesn't exist!
|
|
|
|
else {
|
|
|
|
chomp( $d1 = qx{cygpath -w "$d1"} ); # Use "normal" filenames
|
|
|
|
}
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2006-05-04 03:25:34 -05:00
|
|
|
else {
|
|
|
|
# relative paths here
|
|
|
|
# Do nothing.
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$variable = $perlpre.join(';',@split_var);
|
|
|
|
if ( ($perlpre ne "") && ($^O eq "cygwin")) {
|
|
|
|
# Cygwin's perl needs quoted backslashes
|
|
|
|
$variable =~ s#\\#\\\\#g;
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
$variable =~ s/\//\\/g; # Remaining \ come from e.g.: ../foo/baa
|
|
|
|
return $variable;
|
|
|
|
}
|
2004-02-02 11:17:15 -06:00
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
#--------------------------------------------------------
|
|
|
|
# Function name: GetCorrectPath
|
|
|
|
# Description: Creates the build environment.
|
2004-02-02 11:17:15 -06:00
|
|
|
# Arguments: 1. existing / original path
|
|
|
|
# 2... pairs of <path, executable>
|
2002-08-27 05:31:48 -05:00
|
|
|
# Return value: String - Correct Path
|
|
|
|
#--------------------------------------------------------
|
2004-02-02 11:17:15 -06:00
|
|
|
sub GetCorrectPath
|
|
|
|
{
|
|
|
|
sub PathLookup
|
|
|
|
{
|
|
|
|
my $cmd = shift;
|
|
|
|
while (@_) {
|
|
|
|
my $elem = shift;
|
|
|
|
|
|
|
|
-x "$elem/$cmd" && return $elem;
|
|
|
|
}
|
|
|
|
return '';
|
|
|
|
}
|
|
|
|
|
|
|
|
sub SaneGrep
|
|
|
|
{
|
|
|
|
# Perl grep is unbelievably strange.
|
|
|
|
my $needle = shift;
|
2004-02-25 06:50:35 -06:00
|
|
|
while (@_) {
|
|
|
|
my $haystack = shift;
|
2004-02-02 11:17:15 -06:00
|
|
|
if ($needle eq $haystack) {
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
sub CleanupPath
|
|
|
|
{
|
|
|
|
my @elements = @_;
|
|
|
|
my @cleanName = ();
|
|
|
|
|
2004-02-25 06:50:35 -06:00
|
|
|
while (@elements) {
|
|
|
|
my $elem = shift @elements;
|
2004-02-02 11:17:15 -06:00
|
|
|
if (!SaneGrep ($elem, @cleanName)) {
|
|
|
|
push @cleanName, $elem;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return @cleanName;
|
|
|
|
}
|
|
|
|
|
|
|
|
my $oldPath = shift;
|
|
|
|
my @originalPairs = @_;
|
|
|
|
my @pairs = @originalPairs;
|
|
|
|
my @Path = split /$ps/, $oldPath;
|
|
|
|
|
|
|
|
while (@pairs) {
|
|
|
|
my $path = shift @pairs;
|
|
|
|
my $cmd = shift @pairs;
|
|
|
|
my $to_append = 1;
|
|
|
|
my $elem;
|
|
|
|
|
|
|
|
if (! -x "$path/$cmd") {
|
|
|
|
AddWarning ("Missing executable $path/$cmd\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
for $elem (@Path) {
|
|
|
|
if ($elem eq $path) {
|
|
|
|
# print "Hit duplicate path in path; break\n";
|
|
|
|
$to_append = 0;
|
|
|
|
last;
|
|
|
|
}
|
|
|
|
if (-f "$elem/$cmd") {
|
|
|
|
# print "Element already in path ...\n";
|
|
|
|
unshift @Path, $path;
|
|
|
|
$to_append = 0;
|
|
|
|
last;
|
|
|
|
} else {
|
|
|
|
# print "No file $elem/$cmd\n";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ($to_append) {
|
|
|
|
push @Path, $path;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@pairs = @originalPairs;
|
|
|
|
while (@pairs) {
|
|
|
|
my $path = shift @pairs;
|
|
|
|
my $cmd = shift @pairs;
|
|
|
|
my $realpath;
|
|
|
|
|
|
|
|
$realpath = PathLookup ($cmd, @Path);
|
|
|
|
if (!($realpath eq $path)) {
|
|
|
|
AddWarning ("Path conflict for executables " .
|
|
|
|
"$path/$cmd against $realpath");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return join $ps, CleanupPath (@Path);
|
2002-08-27 05:31:48 -05:00
|
|
|
}
|
2004-02-02 11:17:15 -06:00
|
|
|
|
2002-08-27 05:31:48 -05:00
|
|
|
#------------------------------------------------------------
|
|
|
|
# Function name: AddWarning
|
|
|
|
# Description: Adds any kind of warning for the user.
|
|
|
|
# The warning will be shown at the end
|
|
|
|
# of this script.
|
|
|
|
# Arguments: 1. Add the configure warnings or the set_soenv
|
|
|
|
# warning (string).
|
|
|
|
# 2. Warning (string).
|
|
|
|
# Return value: void
|
|
|
|
#------------------------------------------------------------
|
|
|
|
sub AddWarning
|
|
|
|
{ if ( $_[ 0 ] eq "configure" )
|
|
|
|
{ open( IN, $warnfile );
|
|
|
|
while ( <IN> )
|
|
|
|
{ $Warning = $Warning."* - ".$_;
|
|
|
|
}
|
|
|
|
close( IN );
|
|
|
|
# Remove the temporary warning file.
|
|
|
|
# unlink ( $warnfile );
|
|
|
|
}
|
|
|
|
elsif ( $_[ 0 ] eq "set_soenv" )
|
|
|
|
{ my ( $arg1 );
|
|
|
|
$arg1 = $_[ 1 ];
|
|
|
|
chomp( $arg1 ); # cut off new line
|
|
|
|
$Warning = $Warning."* - set_soenv: warning: $arg1 $newline"; # add the warning
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#-------------------
|
|
|
|
# That's all folks!
|
|
|
|
#-------------------
|