Index: configure.in =================================================================== RCS file: /cvs/tools/config_office/configure.in,v retrieving revision 1.49.2.3.2.1 diff -u -b -B -r1.49.2.3.2.1 configure.in --- configure.in 28 Mar 2003 11:58:43 -0000 1.49.2.3.2.1 +++ configure.in 28 Mar 2003 12:04:09 -0000 @@ -19,10 +19,16 @@ AC_ARG_ENABLE(gcc3, [ --enable-gcc3 Deprecated: Now has no effect, checks compiler version. ],,) -AC_ARG_ENABLE(debug, -[ --enable-debug if you like to build with debug symbols +AC_ARG_ENABLE(symbols, +[ --enable-symbols Include debugging symbols in output. Warning - + a complete build needs 8 Gb of space and takes + much longer. (enables -g compiler flag) - Usage: --enable-debug +],,) +AC_ARG_ENABLE(debug, +[ --enable-debug: Include debugging symbols from --enable-symbols + plus extra debugging code. Extra large build! + (enables -g compiler flag and dmake debug=true) ],,) AC_ARG_WITH(stlport4-home, [ --with-stlport4-home The location that STLport4 is installed in. The STL @@ -226,6 +232,14 @@ AC_MSG_RESULT([checked ($_os)]) +dnl =================================================================== +dnl First setting is whether to include symbols into final build. +dnl =================================================================== +if test "$enable_symbols" = "yes"; then + ENVCFLAGSCXX="-g" +else + ENVCFLAGSCXX="" +fi dnl =================================================================== dnl WINNT uses either 4nt or tcsh, all other O/S use tcsh. @@ -321,36 +335,22 @@ AC_MSG_CHECKING([the GNU gcc compiler version]) _gcc_version=`$CC -dumpversion` _gcc_major=`echo $_gcc_version | $AWK -F. '{ print \$1 }'` - if test "$_gcc_major" = "3"; then + _gcc_longver=`echo $_gcc_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` + if test "$_gcc_major" = "3"; then USE_GCC3="TRUE" - else USE_GCC3="FALSE" - - if test "$_gcc_major" != "2"; then - AC_MSG_WARN([found version "$_gcc_version", use version 2.95.2+ of the gcc compiler]) - AC_MSG_WARN([found version "$_gcc_version", use version 2.95.2+ of the gcc compiler]) >> warn - COMPATH="NO_GCC" - else - _gcc_middle=`$CC -dumpversion | $AWK -F. '{ if ($2 != 95) print "false"; else print "true" }'` - if test "$_gcc_middle" = "false"; then - AC_MSG_WARN([found version "$_gcc_version", use version 2.95.2+ of the gcc compiler]) - AC_MSG_WARN([found version "$_gcc_version", use version 2.95.2+ of the gcc compiler]) >> warn - COMPATH="NO_GCC" + if test "$_gcc_longver" -lt "029502"; then + AC_MSG_ERROR([found version "$_gcc_version", use version 2.95.2+ of the gcc compiler]) else - _gcc_minor=`$CC -dumpversion | $AWK -F. '{ if ($3 < 2) print "false"; else print "true" }'` - if test "$_gcc_minor" = "false"; then - AC_MSG_WARN([found version "$_gcc_version", use version 2.95.2+ of the gcc compiler]) - AC_MSG_WARN([found version "$_gcc_version", use version 2.95.2+ of the gcc compiler]) >> warn - COMPATH="NO_GCC" + if test "$_gcc_longver" -gt "029599"; then + AC_MSG_ERROR([found version "$_gcc_version", Not supported. Upgrade to gcc 3]) fi fi + echo "gcc 2.95 support is not perfect, suggest upgrade to gcc 3" >>warn fi - fi - if test "$COMPATH" != "NO_GCC"; then AC_MSG_RESULT([checked (gcc $_gcc_version)]) - fi dnl Set the include paths _gcc_include_path=`$CC -print-search-dirs | grep instal |$AWK '{ print \$2 }'`/include @@ -373,7 +373,8 @@ dnl Change empty GNUMAKE from warning to error, pending testing. if test -z "$GNUMAKE"; then - AC_MSG_WARN([not found build may fail]) >> warn + AC_MSG_WARN([not found build may fail]) + echo "gnu make not found build may fail" >> warn else _make_version=`$GNUMAKE --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`; _make_major=`echo $_make_version | $AWK -F. '{print $1;}'` @@ -390,6 +391,7 @@ else if test "$_os" = "Darwin"; then AC_MSG_WARN([failed ($GNUMAKE $_make_version need 3.79.1+)]) + echo "$GNUMAKE $_make_version may cause problems need 3.79.1+" >> warn else AC_MSG_ERROR([failed ($GNUMAKE $_make_version need 3.79.1+)]) fi @@ -414,13 +416,13 @@ _workshop_major=`echo $_workshop_version | $AWK -F. '{ print $1 }'` if test "$_workshop_major" != "5"; then AC_MSG_WARN([found version "$_workshop_version", use version 5.0 or 5.2 of the Sun Workshop C compiler]) - AC_MSG_WARN([found version "$_workshop_version", use version 5.0 or 5.2 of the Sun Workshop C compiler]) >> warn + echo "found version "$_workshop_version", use version 5.0 or 5.2 of the Sun Workshop C compiler" >> warn COMPATH="NO_COMPATH" else _workshop_minor=`echo $_workshop_version | $AWK -F. '{ if ($2 == 0) print "true"; else if ($2 == 2) print "true"; else print "false" }'` if test "$_workshop_minor" = "false"; then AC_MSG_WARN([found version "$_workshop_version", use version 5.0 or 5.2 of the Sun Workshop C compiler]) - AC_MSG_WARN([found version "$_workshop_version", use version 5.0 or 5.2 of the Sun Workshop C compiler]) >> warn + echo "found version "$_workshop_version", use version 5.0 or 5.2 of the Sun Workshop C compiler" >> warn COMPATH="NO_COMPATH" else dnl compiler will do @@ -443,13 +445,13 @@ _mipspro_major=`echo $_mipspro_version | $AWK -F. '{ print $1 }'` if test "$_mipspro_major" != "7"; then AC_MSG_WARN([found version "$_mipspro_version", use version 7.2+ of the SGI MIPSpro C compiler]) - AC_MSG_WARN([found version "$_mipspro_version", use version 7.2+ of the SGI MIPSpro C compiler]) >> warn + echo "found version $_mipspro_version, use version 7.2+ of the SGI MIPSpro C compiler" >> warn COMPATH="NO_COMPATH" else _mipspro_minor=`echo $_mipspro_version | $AWK -F. '{ if ($2 <= 1) print "false"; else print "true" }'` if test "$_mipspro_minor" = "false"; then AC_MSG_WARN([found version "$_mipspro_version", use version 7.2+ of the SGI MIPSpro C compiler]) - AC_MSG_WARN([found version "$_mipspro_version", use version 7.2+ of the SGI MIPSpro C compiler]) >> warn + echo "found version $_mipspro_version, use version 7.2+ of the SGI MIPSpro C compiler" >> warn COMPATH="NO_COMPATH" else dnl compiler will do @@ -473,7 +475,7 @@ _compaqc_major=`echo $_compaqc_version | $AWK -F. '{ print $1 }'` if test "$_compaqc_major" != "T6"; then AC_MSG_WARN([found version "$_compaqc_version", use version 6 of the Compaq C compiler]) - AC_MSG_WARN([found version "$_compaqc_version", use version 6 of the Compaq C compiler]) >> warn + echo "found version "$_compaqc_version", use version 6 of the Compaq C compiler" >> warn COMPATH="NO_COMPATH" else dnl compiler will do @@ -530,7 +532,7 @@ AC_MSG_RESULT([yes]) else AC_MSG_WARN([pam_appl.h could not be found in /usr/include/security]) - AC_MSG_WARN([pam_appl.h could not be found in /usr/include/security]) >> warn + echo "pam_appl.h could not be found in /usr/include/security" >> warn fi fi @@ -576,7 +578,7 @@ AC_MSG_CHECKING([Sun Workshop C++ Compiler]) if test "$CXX" != "CC"; then AC_MSG_WARN([Sun Workshop C++ was not found]) - AC_MSG_WARN([Sun Worlshop C++ was not found]) >> warn + echo "Sun Workshop C++ was not found" >> warn else AC_MSG_RESULT([checked]) fi @@ -591,7 +593,7 @@ AC_MSG_CHECKING([Macosx c++ Compiler]) if test "$CXX" != "c++"; then AC_MSG_WARN([Macosx C++ was not found]) - AC_MSG_WARN([Macosx C++ was not found]) >> warn + echo "Macosx C++ was not found" >> warn else AC_MSG_RESULT([checked]) fi @@ -606,7 +608,7 @@ AC_MSG_CHECKING([SGI MIPSpro C++ Compiler]) if test "$CXX" != "CC"; then AC_MSG_WARN([SGI MIPSpro C++ was not found]) - AC_MSG_WARN([SGI MIPSpro C++ was not found]) >> warn + echo "SGI MIPSpro C++ was not found" >> warn else AC_MSG_RESULT([checked]) fi @@ -622,7 +624,7 @@ _compaqcxx_major=`echo $_compaqcxx_version | $AWK -F. '{ print $1 }'` if test "$_compaqcxx_major" != "V6"; then AC_MSG_WARN([found version "$_compaqc_version", use version 6 of the Compaq C++ compiler]) - AC_MSG_WARN([found version "$_compaqc_version", use version 6 of the Compaq C++ compiler]) >> warn + echo "found version $_compaqc_version, use version 6 of the Compaq C++ compiler" >> warn else dnl compiler will do AC_MSG_RESULT([checked]) @@ -676,7 +678,7 @@ AC_MSG_RESULT([found]) else AC_MSG_WARN([patch 106327-06 not found, please install compiler patch 106327-06 or greater]) - AC_MSG_WARN([patch 106327-06 not found, please install compiler patch 106327-06 or greater]) >> warn + echo "patch 106327-06 not found, please install compiler patch 106327-06 or greater" >> warn fi dnl *************** dnl patch 106950-11 @@ -698,7 +700,7 @@ AC_MSG_RESULT([found]) else AC_MSG_WARN([patch 106950-11 not found, please install linker patch 106950-11 or greater]) - AC_MSG_WARN([patch 106950-11 not found, please install linker patch 106950-11 or greater]) >> warn + echo "patch 106950-11 not found, please install linker patch 106950-11 or greater" >> warn fi else if test "$_os_release" = "6"; then @@ -722,7 +724,7 @@ AC_MSG_RESULT([found]) else AC_MSG_WARN([patch 105591-09 not found, please install compiler patch 105591-09 or greater]) - AC_MSG_WARN([patch 105591-09 not found, please install compiler patch 105591-09 or greater]) >> warn + echo "patch 105591-09 not found, please install compiler patch 105591-09 or greater" >> warn fi dnl *************** dnl patch 107733-08 @@ -744,7 +746,7 @@ AC_MSG_RESULT([found]) else AC_MSG_WARN([patch 107733-06 not found, please install linker patch 107733-08 or greater]) - AC_MSG_WARN([patch 107733-06 not found, please install linker patch 107733-08 or greater]) >> warn + echo "patch 107733-06 not found, please install linker patch 107733-08 or greater" >> warn fi fi fi @@ -847,32 +849,23 @@ fi AC_MSG_CHECKING([the installed JDK]) if test "$JAVA"; then - _correct_jdk_exists="false" dnl java -version sends output to stderr! _jdk=`$JAVA -J-version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[-A-Za-z]*//` _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'` if test "$_jdk_ver" -lt 10300; then - AC_MSG_WARN([You need at least jdk-1.3]) - _correct_jdk_exists="false" + AC_MSG_ERROR([You need at least jdk-1.3]) else - _correct_jdk_exists="true" JAVA_HOME=`echo $JAVA | $SED -n "s/\/bin\/javac//p"` AC_MSG_RESULT([checked (JDK $_jdk)]) fi else - _correct_jdk_exists="false" -fi -if test "$_correct_jdk_exists" = "false"; then - JAVA_HOME="NO_JAVA_HOME" - AC_MSG_WARN([Correct jdk not found]) - AC_MSG_WARN([Correct jdk not found]) >> warn + AC_MSG_ERROR([JAVA not found. You need at least jdk-1.3]) fi dnl =================================================================== dnl Checks for specific files. dnl =================================================================== -dnl AC_CHECK_FILE(set_soenv.1) dnl =================================================================== dnl Checks for programs. dnl =================================================================== @@ -1033,18 +1026,18 @@ dnl *************************************** AC_PATH_PROG(BISON, bison) if test -z "$BISON"; then - AC_MSG_WARN([no bison found in \$PATH, install bison]) >> warn + AC_MSG_ERROR([no bison found in \$PATH, install bison]) fi AC_PATH_PROG(FLEX, flex) if test -z "$FLEX"; then - AC_MSG_WARN([no flex found in \$PATH, install flex]) >> warn + AC_MSG_ERROR([no flex found in \$PATH, install flex]) fi dnl *************************************** dnl testing that patch exists dnl *************************************** AC_PATH_PROG(PATCH, patch) if test -z "$PATCH"; then - AC_MSG_WARN([\"patch\" not found in \$PATH, install the development tool named\"patch"\]) >> warn + AC_MSG_ERROR([\"patch\" not found in \$PATH, install the development tool named\"patch"\]) fi dnl *************************************** dnl testing bash tools path on Windows @@ -1131,7 +1124,8 @@ if test -z "$ANT"; then - AC_MSG_RESULT([Ant not found - Some Java projects will not build]) + AC_MSG_WARN([Ant not found - Some Java projects will not build]) + echo "Ant not found - Some Java projects will not build" >>warn else AC_MSG_CHECKING([if $ANT works]) cat > conftest.java << EOF @@ -1161,6 +1155,7 @@ cat conftest.java >&5 cat conftest.xml >&5 AC_MSG_WARN([Ant does not work - Some Java projects will not build!]) + echo "Ant does not work - Some Java projects will not build!" >>warn fi rm -f conftest* core core.* *.core @@ -1277,6 +1272,7 @@ AC_SUBST(PTHREAD_CFLAGS) AC_SUBST(PTHREAD_LIBS) AC_SUBST(ENABLE_DEBUG) +AC_SUBST(ENVCFLAGSCXX) AC_OUTPUT([set_soenv]) Index: set_soenv.in =================================================================== RCS file: /cvs/tools/config_office/set_soenv.in,v retrieving revision 1.4.2.3.2.1 diff -u -b -B -r1.4.2.3.2.1 set_soenv.in --- set_soenv.in 28 Mar 2003 12:02:25 -0000 1.4.2.3.2.1 +++ set_soenv.in 28 Mar 2003 12:04:13 -0000 @@ -79,7 +79,7 @@ $STLPORT_stlport, $STLPORT_inc_stlport, $PERL_PATH ); # Environment variables. -my ( $oldPATH, $SRC_ROOT, $SO_HOME, $JAVA_HOME, $ANT_HOME, $SHELL, $GCC_HOME, +my ( $oldPATH, $SRC_ROOT, $SO_HOME, $JAVA_HOME, $SHELL, $GCC_HOME, $UPD, $SOLARUPD, $WORK_STAMP, $TF_ONE51, $TF_UCB, $URD_ONLY, $SOLARROOT, $SOLARSRC, $RSCRES, $DEVROOT, $SOLARVER, $SOLARVERSION, $SOLARENV, $STAR_INIROOT, $STAR_INIROOTOLD, $STAR_STANDLST, $STAR_SSCOMMON, $STAR_SSOLARINI, @@ -87,7 +87,7 @@ $LD_LIBRARY_PATH, $PATH, $SOLARDEF, $SOLAREXTRAINC, $SOLAREXTRALIB, $SOLARINCLUDES, $SOLARLIB, $SOLARINC, $LOCALINI, $MAC_LIB, $PATHEXTRA, $FRAMEWORKSHOME, $COMEX, $MULTITHREAD_OBJ, $PERL, $COMP_ENV, $IENV, $ILIB, $WIN_INCLUDE, $JAVAHOME, $WIN_LIB, $WIN_HOME, $PSDK_HOME, $USE_NEW_SDK, $NO_HIDS, - $BISON_HAIRY, $BISON_SIMPLE, $TEMP, $COMMON_BUILD_TOOLS, $WIN_GREP, $WIN_FIND, $WIN_LS, + $TEMP, $COMMON_BUILD_TOOLS, $WIN_GREP, $WIN_FIND, $WIN_LS, $WIN_GNUCOPY, $WIN_TOUCH, $STLPORT4, $USE_GCC3, $ENABLE_DEBUG ); # #------------------------------------------- @@ -125,7 +125,6 @@ $Macosx = "Darwin"; # return of uname command on Mac OS X/Darwin $empty = ""; # used as argument $no_jdk = "NO_JAVA_HOME"; # possible argument -$no_ant = "NO_ANT_HOME"; # possible argument $no_stl = "NO_STLPORT4"; # possible argument $no_tcsh = "NO_TCSH"; # possible argument $no_cl = "NO_CL"; @@ -390,7 +389,7 @@ { print "Setting Linux Alpha specific values... "; $outfile = "LinuxAlphaEnv.Set"; $CPU = "A"; - $CPUNAME = "ALPHA"; + $CPUNAME = "ALPHA_"; $DLLSUFFIX = "la"; $OUTPATH = "unxlnga"; $JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."alpha"; @@ -449,7 +448,7 @@ $COM = "CXX"; $COMPATH = '@COMPATH@'; $CPU = "A"; - $CPUNAME = "ALPHA"; + $CPUNAME = "ALPHA_"; $CVER = "C62"; $DLLSUFFIX = "t64"; $GUI = "UNX"; @@ -654,7 +653,7 @@ } } if ( '@STLPORT4@' eq $no_stl ) -{ AddWarning( "set_soenv", "No path to STLport was given with the --with-stlport4-home option. The one provided with OOo will be build." ); +{ $STLPORT4 = "$no_stl"; } @@ -710,16 +709,6 @@ } } -# Ant Home directory -if ( '@ANT_HOME@' eq $no_ant ) -{ AddWarning( "set_soenv", "Ant was not found in the path. Some Java projects will not build." ); - $ANT_HOME = "$no_ant"; -} -else -{ # ANT_HOME as argument from autoconf. - $ANT_HOME = '@ANT_HOME@'; -} - # # E. Determining the envionment values based on the information # that was gathered earlier on. @@ -1362,7 +1351,7 @@ ToFile( "SRC_ROOT", $SRC_ROOT, "e" ); ToFile( "SHELL", $SHELL, "e" ); ToFile( "JAVA_HOME", $JAVA_HOME, "e" ); -ToFile( "ANT_HOME", $ANT_HOME, "e" ); +ToFile( "ANT_HOME", "@ANT_HOME@", "e" ); ToFile( "JDKLIB", $JAVA_LIB, "e" ); ToFile( "STLPORT4", $STLPORT4, "e" ); ToFile( "ASM_PATH", $ASM_PATH, "e" ); @@ -1685,9 +1674,8 @@ if ( $COM ne "MSC" ) { ToFile( "LINK", $CC, "e" ); } +ToFile( "ENVCFLAGSCXX", "@ENVCFLAGSCXX@", "e" ); ToFile( "GXX_INCLUDE_PATH", "@GXX_INCLUDE_PATH@","e" ); -ToFile( "BISON_HAIRY", $BISON_HAIRY, "e" ); -ToFile( "BISON_SIMPLE", $BISON_SIMPLE, "e" ); ToFile( "COMMON_BUILD_TOOLS",$COMMON_BUILD_TOOLS, "e" ); if ($platform ne "$Winnt") { ToFile( "TEMP", $TEMP, "e" ); @@ -2009,12 +1997,15 @@ { if ( $_[ 2 ] eq "e" ) { # Write an environment variable to file. if (defined $_[ 1 ]) - { printf("%-12s %-17s %-10s %-39s\n", "The variable", $_[ 0 ], "is set to:", $_[ 1 ]) ; # to stdout + { printf("%-12s %-17s %-10s %s\n", "The variable", $_[ 0 ], "is set to:", $_[ 1 ]) ; # to stdout + if (( $platform ne "$Winnt" ) or ( $USE_SHELL ne "4nt" )) + { print OUT "$setenv $_[ 0 ] \"$_[ 1 ]\"$newline"; # to tcsh file if(defined($outfile_sh)) { print OUT_SH "$_[ 0 ]=\"$_[ 1 ]\"$newline"; # to sh file $exportvars .= " $_[ 0 ]"; # add to export list for sh file } + } if(defined($outfile_bat)) { $win_format_var = WinFormat( $_[ 1 ] ); #Filter for Windows print OUT_BAT "IF DEFINED $_[ 0 ] $unset $_[ 0 ] $newline"; @@ -2022,11 +2013,14 @@ } } else - { printf("%-12s %-17s %-10s %-39s\n", "The variable", $_[ 0 ], "is set to:", "unset") ; # to stdout + { printf("%-12s %-17s %-10s %s\n", "The variable", $_[ 0 ], "is set to:", "unset") ; # to stdout + if (( $platform ne "$Winnt" ) or ( $USE_SHELL ne "4nt" )) + { $unsetvars .= "$unsetenv $_[ 0 ] >& /dev/null$newline"; # for tcsh file $unsetvarssh .= " $_[ 0 ]"; # for sh file - if(defined($outfile_bat)) - { $unsetvarsbat .= "$unset $_[ 0 ] >& NUL$newline"; + } + else + { $unsetvars .= "$unset $_[ 0 ] >& NUL$newline"; } } }