--- set_soenv.1.orig Wed Apr 17 22:41:31 2002 +++ set_soenv.1 Thu Jun 6 15:58:56 2002 @@ -40,7 +40,7 @@ # # Set this value equal to the corresponding amount of # command line arguments. -my $numArgs = 20; +my $numArgs = 27; # Determining the amount of arguments in the call. my $numEnter = $#ARGV + 1; if ( $numEnter != $numArgs ) @@ -66,14 +66,15 @@ my ( $CALL_CDECL, $COMMON_OUTDIR, $NO_SRS_PATCH, $PROFULLSWITCH, $BIG_GOODIES, $BMP_WRITES_FLAG, $common_build, $MK_UNROLL, $NO_REC_RES, $PROEXT, $SO3, $SOLAR_JAVA, $SOLAR_PLUGIN, $TF_PACKAGES, $TF_SDBAPI, $TF_FILEURL, $UPDATER, $BUILD_DELIVER, $USE_NEWCHARSET, $USE_NEW_RSC, $VCL, - $TF_CFGDATA, $TF_SVDATA, + $TF_CFGDATA, $TF_SVDATA, $CC, $CXX, $USE_NAMESPACE, $BUILD_SOSL, $LOCAL_SOLENV, $ENABLEUNICODE, $NEW_JAR_PACK, $NO_BSYMBOLIC, $USE_XPRINT, $BUILD_SOSL_RELEASE ); # # Platform dependent constant values. my ( $BIG_SVX, $COM, $CPU, $CPUNAME, $CVER, $DLLSUFFIX, $GLIBC, $GUI, $GUIBASE, $GUIENV, - $GVER, $GVERDIR, $OS, $OUTPATH, $INPATH, $PATH_SEPERATOR, $PROSWITCH, $XPVERSION, $BOTH, - $DEMO_ENV, $DYNAMIC_CRT, $SET_EXCEPTIONS, $emergency, $use_shl_versions, $CDPATHx ); + $GVER, $GVERDIR, $OSVERSION, $OS, $OUTPATH, $INPATH, $PATH_SEPERATOR, $PROSWITCH, $XPVERSION, $BOTH, + $DEMO_ENV, $DYNAMIC_CRT, $SET_EXCEPTIONS, $emergency, $use_shl_versions, $CDPATHx, $PTHREAD_CFLAGS, + $PTHREAD_LIBS, $EXCEPTIONS ); # #------------------------------------------- # IIc. Declaring the environment variables. @@ -96,7 +97,7 @@ $SOLARINC, $LOCALINI, $MAC_LIB, $PATHEXTRA, $FRAMEWORKSHOME, $COMEX, $MULTITHREAD_OBJ, $PERL, $COMP_ENV, $IENV, $ILIB, $WIN_INCLUDE, $JAVAHOME, $WIN_LIB, $WIN_HOME, $BISON_HAIRY, $BISON_SIMPLE, $TEMP, $COMMON_BUILD_TOOLS, $WIN_GREP, $WIN_FIND, $WIN_LS, - $WIN_GNUCOPY, $WIN_TOUCH, $STLPORT4, $USE_GCC3 ); + $WIN_GNUCOPY, $WIN_TOUCH, $STLPORT4, $USE_GCC3, $ENABLE_DEBUG); # #------------------------------------------- # IId. Declaring the aliases. @@ -145,7 +146,11 @@ $STLPORT4 = $ARGV [ 12 ]; # Location of STLport4 $MINGWIN32 = $ARGV [ 17 ]; # use MINGWIN32 $use_shell = $ARGV [ 18 ]; # preferred shell -$USE_GCC3 = $ARGV [ 19 ]; # use gcc3 (only for unxlngi4 at the moment) +$USE_GCC3 = $ARGV [ 19 ]; # use gcc3 (only for unxlngi4 and unxfbsd5i at the moment) +$CC = $ARGV [ 23 ]; # get cc from environment +$CXX = $ARGV [ 24 ]; # use c++ from environment +$EXCEPTIONS = $ARGV [ 25 ]; # Exception handling type +$ENABLE_DEBUG = $ARGV [ 26 ]; # Enable a debug build # #--------------------------------------------------------------- # IIIb. Initialising the variables for the system commands, etc. @@ -316,7 +321,7 @@ $PROSWITCH = "-DPRODUCT"; $XPVERSION = "3"; $SOLAR_JAVA = "TRUE"; - $XPVERSION = "3"; + $XPVERSION = "3"; } elsif ( $platform eq "$FreeBSD" ) { print "Setting FreeBSD specific values... "; @@ -326,7 +331,14 @@ $COMPATH = $ARGV[ 0 ]; $CPU = "I"; $CPUNAME = "INTEL"; +if ($USE_GCC3 eq "TRUE") + { + $CVER = "C300"; + } +else + { $CVER = "C295"; +} $DLLSUFFIX = "fi"; $GUI = "UNX"; $GUIBASE = "unx"; @@ -339,6 +351,9 @@ $PATH_SEPERATOR = $ps; $PROSWITCH = "-DPRODUCT"; $XPVERSION = "3"; + $OSVERSION = $ARGV[ 20 ]; + $PTHREAD_CFLAGS = $ARGV[ 21 ]; + $PTHREAD_LIBS = $ARGV[ 22 ]; } elsif ( $platform eq "$Linux" ) { @@ -891,7 +906,7 @@ $ps_STLPORT_LIB. $ps.'$SOLARVER'.$ds.'$UPD'.$ds.'$INPATH'.$LIB; } -elsif (($platform eq "$Linux") || ($platform eq "$FreeBSD") || ($platform eq "$NetBSD") || ($platform eq "$Tru64")) +elsif (($platform eq "$Linux") || ($platform eq "$NetBSD") || ($platform eq "$Tru64")) { $LD_LIBRARY_PATH = $cur_dir. $ps.'$SOLARENV'.$ds.'$INPATH'.$LIB. $ps.$USR_LOCAL.$LIB. @@ -899,6 +914,13 @@ $ps_STLPORT_LIB. $ps.'$SOLARVER'.$ds.'$UPD'.$ds.'$INPATH'.$LIB; } +elsif ($platform eq "$FreeBSD") +{ $LD_LIBRARY_PATH = $cur_dir. + $ps.'$SOLARENV'.$ds.'$INPATH'.$LIB. + $ps.$par_dir.$LIB. + $ps_STLPORT_LIB. + $ps.'$SOLARVER'.$ds.'$UPD'.$ds.'$INPATH'.$LIB; +} elsif ($platform eq "$Irix" || $platform eq "$Irix64") { $LD_LIBRARY_PATH = $cur_dir. $ps.'$SOLARENV'.$ds.'$INPATH'.$LIB. @@ -934,15 +956,16 @@ $D.$COM. $D.$CVER. $D.$GVER. - $D."_PTHREADS". $D.$OS. $D.$CPUNAME; if ($platform eq "$FreeBSD") -{ $SOLARDEF .= $D."X86"; +{ $SOLARDEF .= $D."X86". + $D."OSVERSION=$OSVERSION". + " ".$PTHREAD_CFLAGS; } $SOLARDEF .= $D."_REENTRANT". $D."_POSIX_PTHREAD_SEMANTICS"; -if (($platform ne "$Tru64") && ( $platform ne "$Irix") && ( $platform ne "$Irix64")) +if (($platform ne "$Tru64") && ( $platform ne "$Irix") && ( $platform ne "$Irix64") && ( $platform ne "FreeBSD" ) && ( $platform ne "NetBSD" )) { $SOLARDEF .= $D."GLIBC=".$GLIBC; } $SOLARDEF .= $D."SUPD=$UPD". @@ -959,7 +982,7 @@ $L.$USR_DT.$LIB. $L.$USR_OPENWIN.$LIB.'"'; } -elsif (($platform eq "$Linux") || ($platform eq "$FreeBSD") || ($platform eq "$NetBSD") || ($platform eq "$Tru64") || ($platform eq "$Irix") || ($platform eq "$Irix64")) +elsif (($platform eq "$Linux") || ($platform eq "$NetBSD") || ($platform eq "$Tru64") || ($platform eq "$Irix") || ($platform eq "$Irix64")) { $SOLAREXTRALIB = '"'.$L.$par_dir.$LIB. $L.$LIB. $L.$USR.$LIB. @@ -969,6 +992,11 @@ { $SOLAREXTRALIB = '"'.$L.$LIB. $L.$USR.$LIB.'"'; } +elsif ($platform eq "$FreeBSD") +{ + $SOLAREXTRALIB = '"'.$L.$par_dir.$LIB.'"'; +} + # Compiler include search directory paths. if (($platform eq "$Solaris") || ($platform eq "$Linux") || ($platform eq "$FreeBSD") || ($platform eq "$NetBSD") || ($platform eq "$Tru64") || ($platform eq "$Irix") || ($platform eq "$Irix64")) { $SOLARINCLUDES = '"'.$I.'$SOLARENV'.$INC.'"'; @@ -1039,7 +1067,7 @@ $ps.$USR.$LIB. $ps.$USR_LOCAL.$BIN; } -elsif (($platform eq "$Linux") or ($platform eq "$FreeBSD") or ($platform eq "$NetBSD") or ($platform eq "$Tru64") or ($platform eq "$Irix") or ($platform eq "$Irix64")) +elsif (($platform eq "$Linux") or ($platform eq "$NetBSD") or ($platform eq "$Tru64") or ($platform eq "$Irix") or ($platform eq "$Irix64")) { $PATH = $cur_dir. $ps.'$SOLARVER'.$ds.'$UPD'.$ds.'$INPATH'.$BIN. $ps.'$SOLARENV'.$ds.'$OUTPATH'.$BIN. @@ -1058,6 +1086,22 @@ $ps.$USR.$ds."X11".$BIN. $ps.$USR.$LIB; } +elsif ($platform eq "$FreeBSD") +{ $PATH = $cur_dir. + $ps.'$SOLARVER'.$ds.'$UPD'.$ds.'$INPATH'.$BIN. + $ps.'$SOLARENV'.$ds.'$OUTPATH'.$BIN. + $ps.'$SOLARENV'.$BIN. + $ps.'$JAVA_HOME'.$BIN. + $ps.$USR_LOCAL.$BIN. + $ps.$USR_LOCAL.$ds."sbin"; + + $PATH .= GetCorrectPath($COMPATH, $PERL_PATH, $TCSH_PATH, $compiler); + + $PATH .= $ps.$USR.$ds."sbin". + $ps.$USR.$ds."X11R6".$ds."bin". + $ps.$USR.$LIB; +} + elsif ($platform eq "$Winnt") { my ( $noldPATH ); @@ -1155,7 +1199,7 @@ $L_STLPORT_LIB. $L.$XLIB.'"'; } -elsif (($platform eq "$Linux") || ($platform eq "$FreeBSD") || ($platform eq "$NetBSD") || ($platform eq "$Tru64") || ($platform eq "$Irix") || ($platform eq "$Irix64")) +elsif (($platform eq "$Linux") || ($platform eq "$NetBSD") || ($platform eq "$Tru64") || ($platform eq "$Irix") || ($platform eq "$Irix64")) { $SOLARLIB = '"'.$L.$par_dir.$LIB. $L.'$SOLARENV'.$ds.'$OUTPATH'.$LIB. $L.'$SOLARVER'.$ds.'$UPD'.$ds.'$INPATH'.$LIB. @@ -1167,6 +1211,15 @@ $L_STLPORT_LIB. $L.$XLIB.'"'; } +elsif ($platform eq "$FreeBSD") +{ $SOLARLIB = '"'.$L.$par_dir.$LIB. + $L.'$SOLARENV'.$ds.'$OUTPATH'.$LIB. + $L.'$SOLARVER'.$ds.'$UPD'.$ds.'$INPATH'.$LIB. + $L.'$SOLARENV'.$ds.'$OUTPATH'.$LIB. + $L.'$JAVA_HOME'.$LIB. + $L_STLPORT_LIB. + $L.$XLIB.'"'; +} elsif ($platform eq "$Winnt") { $SOLARLIB = '"'.$L.'$SOLARVER'.$ds.'$UPD'.$ds.'$INPATH'.$LIB. $L.$par_dir.$LIB. @@ -1196,7 +1249,7 @@ $SOLARINC .= $I.$USR.$INCLUDE; } $SOLARINC .= $STLPORT_stlport; -if ($platform eq "$Linux") +if ($platform eq "$Linux" || $platform eq "$FreeBSD") { # This simply adds an include path, so even cases that break the FHS work $SOLARINC .= $STLPORT_inc_stlport; @@ -1210,11 +1263,6 @@ { $SOLARINC .= $I.'$COMPATH'.$ds."include"; } -if ($platform eq "$Linux") -{ -# This simply adds an include path, so even cases that break the FHS work -$SOLARINC .= $STLPORT_inc_stlport; -} $SOLARINC .= $I.'$SOLARENV'.$INC.$ds."Xp31". $I.'$JAVA_HOME'.$INCLUDE; @@ -1382,6 +1430,9 @@ ToFile( "NEW_JAR_PACK", $NEW_JAR_PACK, "e" ); ToFile( "NO_BSYMBOLIC", $NO_BSYMBOLIC, "e" ); ToFile( "TF_FILTER", "TRUE", "e" ); +if ($ENABLE_DEBUG eq "TRUE") { +ToFile( "debug", "true", "e" ); +} if ( $platform ne "$Macosx" ) { ToFile( "PSPRINT", "TRUE", "e" ); } elsif ( $GUIBASE eq "unx" ) { @@ -1407,6 +1458,12 @@ ToFile( "GUIENV", $GUIENV, "e" ); ToFile( "GVER", $GVER, "e" ); ToFile( "OS", $OS, "e" ); +ToFile( "CC", $CC, "e" ); +ToFile( "CXX", $CXX, "e" ); +ToFile( "EXCEPTIONS", $EXCEPTIONS, "e" ); +ToFile( "OSVERSION", $OSVERSION, "e" ); +ToFile( "PTHREAD_CFLAGS", $PTHREAD_CFLAGS, "e" ); +ToFile( "PTHREAD_LIBS", $PTHREAD_LIBS, "e" ); ToFile( "OUTPATH", $OUTPATH, "e" ); ToFile( "INPATH", $INPATH, "e" ); ToFile( "GVERDIR", $GVERDIR, "e" );