diff options
author | Sander Vesik <svesik@openoffice.org> | 2002-08-27 09:31:11 +0000 |
---|---|---|
committer | Sander Vesik <svesik@openoffice.org> | 2002-08-27 09:31:11 +0000 |
commit | aeddfb61372b22cff733c795d4a0259abf8f0096 (patch) | |
tree | 4f855e45d884537b60af90c95480fa614373468d /config_office | |
parent | 5edde8811e6b36a2f0f8a1b6553e6ace90cc44e2 (diff) |
Merge changes from OO642C (1.44 -> 1.44.2.5)
Diffstat (limited to 'config_office')
-rw-r--r-- | config_office/configure.in | 657 |
1 files changed, 361 insertions, 296 deletions
diff --git a/config_office/configure.in b/config_office/configure.in index eed2f3409f2d..58b7b1e16c28 100644 --- a/config_office/configure.in +++ b/config_office/configure.in @@ -1,4 +1,5 @@ dnl /****************************************************************** +dnl * vi:set sw=3 ts=3 et: dnl * dnl * Name: configure.in dnl * Auth: Willem van Dorp, Ross Nicholson, Oisin Boydell - Sun Microsystems Ireland @@ -11,8 +12,9 @@ dnl * necessary to build OpenOffice. dnl * dnl * dnl ******************************************************************/ +AC_REVISION( $Revision: 1.46 $ ) clear; -AC_PREREQ(2.12) +AC_PREREQ(2.52) AC_INIT() AC_ARG_WITH(gcc-home, [ --with-gcc-home if you built gcc from source to a specific @@ -28,6 +30,11 @@ AC_ARG_ENABLE(gcc3, Usage: --enable-gcc3 ],,) +AC_ARG_ENABLE(debug, +[ --enable-debug if you like to build with debug symbols + + Usage: --enable-debug +],,) AC_ARG_WITH(stlport4-home, [ --with-stlport4-home The location that STLport4 is installed in. The STL header files are assumed to be in stlport4-home/stlport @@ -43,6 +50,14 @@ AC_ARG_WITH(jdk-home, Usage: --with-jdk-home=<absolute path to JDK 1.2.2 home> ],,) +AC_ARG_WITH(ant-home, +[ --with-ant-home if you have installed Jakarta Ant on your system, + please supply the path here. + Note that this is not the location of the Ant binary but the + location of the entire distribution. + + Usage: --with-ant-home=<absolute path to Ant home> +],,) AC_ARG_WITH(perl-home, [ --with-perl-home if you have installed the Perl 5 Distribution, on your system, please supply the path here. @@ -103,6 +118,12 @@ AC_ARG_WITH(asm-home, Usage: --with-asm-home=<path to ml.exe directory> ],,) +AC_ARG_WITH(os-version, +[ --with-os-version For FreeBSD users, use this option option to build OpenOffice + with the correct OSVERSION. + + Usage: --with-os-version=<OSVERSION> +],,) AC_ARG_WITH(unzip-home, [ --with-unzip-home For Windows users, please supply the path for unzip.exe. @@ -158,10 +179,12 @@ AC_PATH_PROGS(AWK, awk gawk ) if test -z "$AWK"; then AC_MSG_ERROR([install awk to run this script]) fi + AC_PATH_PROGS(SED, sed ) if test -z "$SED"; then AC_MSG_ERROR([install sed to run this script]) fi + dnl =================================================================== dnl Checks for the operating system and processor. dnl =================================================================== @@ -170,7 +193,52 @@ AC_MSG_CHECKING([the operating system]) _os=`uname` if test `echo $_os | $AWK -F_ '{ print $1 }'` = "CYGWIN"; then _os="WINNT" - if test $with_use_shell = "0"; then + CygwinVer="true" +else + CygwinVer="false" +fi + + +dnl =================================================================== +dnl The following is a list of supported systems. +dnl Sequential to keep the logic very simple +dnl These values may be checked and reset later. +dnl =================================================================== +case "$_os" in + "SunOS") + ;; + "Linux") + ;; + "WINNT") + ;; + "Darwin") + ;; + "FreeBSD") + ;; + "OSF1") + ;; + "NetBSD") + ;; + "IRIX") + ;; + "IRIX64") + ;; + "WINNT") + ;; + *) + AC_MSG_ERROR([$_os operating system is not suitable to build OpenOffice!]) + ;; +esac + +AC_MSG_RESULT([checked ($_os)]) + + +dnl =================================================================== +dnl WINNT uses either 4nt or tcsh, all other O/S use tcsh. +dnl The following sets the with_use_shell variable. +dnl =================================================================== +if test $_os = "WINNT" -a $CygwinVer = "true"; then + if test "$with_use_shell" = "0"; then with_use_shell="4nt" fi if test `uname -r | $AWK -F. '{ print $1"."$2 }'` = "1.3"; then @@ -182,40 +250,39 @@ if test `echo $_os | $AWK -F_ '{ print $1 }'` = "CYGWIN"; then AC_MSG_ERROR([install Cygwin V1.3.x and tcsh if you don't use 4NT]) fi dnl =================================================================== - dnl IF using Mingwin32 then don't use 4NT + dnl If using Mingwin32 then don't use 4NT dnl =================================================================== if test $WITH_MINGWIN = "yes"; then with_use_shell="tcsh" fi else - CygwinVer="false" if test "$_os" = "WINNT"; then with_use_shell="4nt" + else + dnl =================================================================== + dnl All other operating systems use tcsh. + dnl =================================================================== + if test "$with_use_shell" = "0"; then + with_use_shell="tcsh" + fi fi fi -if test "$_os" = "SunOS" -o "$_os" = "Linux" -o "$_os" = "WINNT" -o "$_os" = "Darwin" -o "$_os" = "FreeBSD" -o "$_os" = "OSF1" -o "$_os" = "NetBSD" -o "$_os" = "IRIX" -o "$_os" = "IRIX64"; then - AC_MSG_RESULT([checked ($_os)]) - # delault to "tcsh" for all but win32 - if test $with_use_shell = "0"; then - with_use_shell="tcsh" - fi -else - AC_MSG_ERROR([$_os operating system is not suitable to build OpenOffice!]) -fi + _machine_type=`uname -m` -dnl check whether we're using solaris 7 + +dnl =================================================================== +dnl check whether we're using solaris 6,7,8 - sparc or intel. +dnl =================================================================== if test "$_os" = "SunOS"; then AC_MSG_CHECKING([the solaris operating system release]) _os_release=`uname -r | $AWK -F. '{ print $2 }'` - if test "$_os_release" != "8" -a "$_os_release" != "7" -a "$_os_release" != "6"; then - AC_MSG_ERROR([use solaris 6, 7 or 8 to build OpenOffice]) + if test "$_os_release" != "9" -a "$_os_release" != "8" -a "$_os_release" != "7" -a "$_os_release" != "6"; then + AC_MSG_ERROR([use solaris 6, 7, 8 or 9 to build OpenOffice]) else AC_MSG_RESULT([ok ($_os_release)]) fi -fi -dnl check whether we're using a sparc or i386 processor -if test "$_os" = "SunOS" -then + + dnl check whether we're using a sparc or i386 processor AC_MSG_CHECKING([the processor type]) _processor=`uname -p` if test "$_processor" = "sparc" -o "$_processor" = "i386" @@ -225,161 +292,75 @@ then AC_MSG_ERROR([only sparc and i386 processors are supported]) fi fi + dnl =================================================================== -dnl Checks for compilers. +dnl Checks for c compiler, +dnl The check for the c++ compiler is later on. dnl =================================================================== -if test "$_os" = "SunOS" -o "$_os" = "IRIX" -o "$_os" = "IRIX64" -o "$_os" = "OSF1"; then - if test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then - if test "$CC" != "gcc"; then - CC=cc; export CC; - CXX=CC; export CXX; - fi - else - CC=cc; export CC; +if test -n "$with_gcc_home"; then + if test -z "$CC"; then + CC="$with_gcc_home/bin/gcc" fi -fi +fi + +dnl The following checks for gcc, cc and then (cl if win32) if test "$_os" != "WINNT" && test -z "$with_gcc_home"; then AC_PROG_CC -fi -if test "$_os" = "Linux" -o "$_os" = "FreeBSD" -o "$_os" = "NetBSD" -o \( \( "$_os" = "IRIX" -o "$_os" = "IRIX64" \) -a "$CC" = "gcc" \) ; then - dnl ****************************************** - dnl Testing for GNU compiler and version... - dnl ****************************************** - dnl Check whether the gnu gcc compiler is used. - if test -z "$with_gcc_home"; then - if test "$CC" = "gcc"; then - AC_PATH_PROG(GCC, gcc) - COMPATH=`echo $GCC | $SED -n "s/\/gcc//p"` - _gcc_include_start=/usr/lib/gcc-lib - _gxx_include_start=/usr/include - fi - else - dnl Compiler has been installed to its own directory and it's home is arg with_gcc_home - _gcc_path="$with_gcc_home/bin/gcc" - if test -x $_gcc_path; then - CC=gcc; export CC; - GCC=$_gcc_path - COMPATH="$with_gcc_home/bin" - PATH=$COMPATH:$PATH; export PATH; - _gcc_include_start=$with_gcc_home - _gxx_include_start=$with_gcc_home - fi - fi -dnl parametrise the various gcc pathnames so we can reuse for gcc2.95 and gcc3 -if test -n "$enable_gcc3"; then - _gccincname1="g++-v3" -else - _gccincname1="g++-3" + set -x + AC_PATH_PROGS(COMPATH, $CC) +dnl double square bracket to get single because of M4 quote... +dnl COMPATH=`echo $COMPATH | $SED "s/\/[[A-Za-z0-9\-]]+//"`; + COMPATH=`echo $COMPATH | $SED "s/\/gcc.*$//"`; + set +x fi -dnl and here is the real horror... +dnl =================================================================== +dnl Test the gcc version, 3 is OK, 2.96 invalid, 2.95+ is OK +dnl =================================================================== +if test $GCC = "yes"; then + 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 + + USE_GCC3="TRUE" + + else + USE_GCC3="FALSE" - if test $GCC; then - AC_MSG_CHECKING([the GNU gcc compiler version]) - _gcc_releasetype=`$GCC --version | $AWK -F"-" '{ print \$1 }'` - if test "$_gcc_releasetype" = "egcs"; then - AC_MSG_WARN([found egcs- version, use (stable=gcc-) version of the compiler]) - AC_MSG_WARN([found egcs- version, use (stable=gcc-) version of the compiler]) >> warn - _gcc_version=`$GCC --version | $AWK -F"-" '{ print \$2 }'` + 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_version=`$GCC --version` - fi - _gcc_major=`echo $_gcc_version | $AWK -F. '{ print \$1 }'` - if test -n "$enable_gcc3"; then - if test "$_gcc_major" != "3"; then - AC_MSG_ERROR([found version "$_gcc_version", but use of gcc 3.x requested]) + _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" + 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" + fi fi - else - 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=`$GCC --version | $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" - else - _gcc_minor=`$GCC --version | $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" - fi - fi - fi - fi - if test "$COMPATH" != "NO_GCC"; then - dnl compiler will do - AC_MSG_RESULT([checked (gcc $_gcc_version)]) - dnl find include paths now - AC_MSG_CHECKING([the GNU gcc include paths]) - _gcc_include_path=`find $_gcc_include_start -name $_gcc_version -print 2> /dev/null` - if test "$_gcc_include_path"; then - _multiple=`echo $_gcc_include_path | $AWK '{ if ($2) print "true"; else print "false" }'` - if test "$_multiple" = "false"; then - _gcc_include_path="$_gcc_include_path/include" - - _gxx_include_path=`find $_gxx_include_start -name "$_gccincname1" -print | grep include 2> /dev/null` - if test "$_gxx_include_path"; then - _multiple=`echo $_gxx_include_path | $AWK '{ if ($2) print "true"; else print "false" }'` - if test "$_multiple" = "false"; then - AC_MSG_RESULT([checked]) - else - AC_MSG_WARN([found multiple g++-3 directories, please rename so you have one distinct]) - AC_MSG_WARN([found multiple g++-3 directories, please rename so you have one distinct]) >> warn - fi - else - _gxx_include_path2=`find $_gxx_include_start -name "g++-2" -print | grep include 2> /dev/null` - if test "$_gxx_include_path2"; then - _multiple=`echo $_gxx_include_path2 | $AWK '{ if ($2) print "true"; else print "false" }'` - if test "$_multiple" = "false"; then - AC_MSG_RESULT([checked]) - _gxx_include_path="$_gxx_include_path2" - else - AC_MSG_WARN([found multiple g++-2 directories, please rename so you have one distinct]) - AC_MSG_WARN([found multiple g++-2 directories, please rename so you have one distinct]) >> warn - fi - else - _gxx_include_path3=`find $_gxx_include_start -name "g++" -print | grep include 2> /dev/null` - if test "$_gxx_include_path3"; then - _multiple=`echo $_gxx_include_path3 | $AWK '{ if ($2) print "true"; else print "false" }'` - if test "$_multiple" = "false"; then - AC_MSG_RESULT([checked]) - _gxx_include_path="$_gxx_include_path3" - else - AC_MSG_WARN([found multiple g++ directories, please rename so you have one distinct]) - AC_MSG_WARN([found multiple g++ directories, please rename so you have one distinct]) >> warn - _gxx_include_path="NO_GXX_INCLUDE" - fi - else - AC_MSG_WARN([could not find g++-3 or g++-2 or g++ directories, please use ./configure --help]) - AC_MSG_WARN([could not find g++-3 or g++-2 or g++ directories, please use ./configure --help]) >> warn - fi - fi - fi - else - AC_MSG_WARN([found multiple 2.95.2/include directories, please rename so you have one distinct]) - AC_MSG_WARN([found multiple 2.95.2/include directories, please rename so you have one distinct]) >> warn - _gcc_include_path="NO_GCC_INCLUDE" - fi - else - if test "$_os" = "FreeBSD" -o "$_os" = "NetBSD" ; then - _gcc_include_path="/usr/include/g++" - else - AC_MSG_WARN([could not find 2.95.2/include directory of the gcc compiler]) - AC_MSG_WARN([could not find 2.95.2/include directory of the gcc compiler]) >> warn - _gcc_include_path="NO_GCC_INCLUDE" - fi - fi fi - else - AC_MSG_WARN([no gcc compiler found]) - AC_MSG_WARN([no gcc compiler found]) >> 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 + echo $_gcc_include_path +fi + +dnl =================================================================== +dnl Test the solaris compiler version +dnl =================================================================== if test "$_os" = "SunOS"; then if test "$CC" = "cc"; then AC_PATH_PROGS(_cc, cc) @@ -408,38 +389,10 @@ if test "$_os" = "SunOS"; then fi fi fi -if test "$_os" = "Darwin"; then - if test "$CC" = "cc"; then - AC_PATH_PROGS(_cc, cc) - COMPATH=`echo $_cc | $SED -n "s/\/cc//p"` - AC_MSG_CHECKING([the gcc compiler version]) - dnl cc -v outputs to standard error!!!! - cc_version=`$CC -v 2>&1 | $AWK '/Apple Computer/ { print $15 }'` - cc_major=`echo $cc_version | $AWK -F. '{ print $1 }'` - if test "$cc_major" != "2"; then - AC_MSG_WARN([found version "$cc_version", use version 2.95.2 of the gcc compiler]) - AC_MSG_WARN([found version "$cc_version", use version 2.95.2 of the gcc compiler]) >> warn - COMPATH="NO_COMPATH" - else - cc_middle=`echo $cc_version | $AWK -F. '{ if ($2 != 95) print "false"; else print "true" }'` - if test "$cc_middle" = "false"; then - AC_MSG_WARN([found version "$cc_version", use version 2.95.2 of the gcc compiler]) - AC_MSG_WARN([found version "$cc_version", use version 2.95.2 of the gcc compiler]) >> warn - COMPATH="NO_COMPATH" - else - cc_minor=`echo $cc_version | $AWK -F. '{ if ($3 != 2) print "false"; else print "true" }'` - if test "$cc_minor" = "false"; then - AC_MSG_WARN([found version "$cc_version", use version 2.95.2 of the gcc compiler]) - AC_MSG_WARN([found version "$cc_version", use version 2.95.2 of the gcc compiler]) >> warn - COMPATH="NO_COMPATH" - else - dnl compiler will do - AC_MSG_RESULT([checked]) - fi - fi - fi - fi -fi + +dnl =================================================================== +dnl Test the IRIX SGI Mips pro compiler +dnl =================================================================== if test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then if test "$CC" = "cc"; then AC_PATH_PROGS(_cc, cc) @@ -466,6 +419,9 @@ if test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then fi fi +dnl =================================================================== +dnl Test the Compaq compiler for OSF1 +dnl =================================================================== if test "$_os" = "OSF1"; then if test "$CC" = "cc"; then AC_PATH_PROGS(_cc, cc) @@ -486,11 +442,14 @@ if test "$_os" = "OSF1"; then fi fi +dnl =================================================================== dnl Check if there is a Microsoft C/C++ compiler. +dnl =================================================================== if test "$_os" = "WINNT"; then if test "$WITH_MINGWIN" != "yes"; then AC_MSG_CHECKING([the Microsoft C/C++ Compiler]) - if test -e $with_cl_home"/bin/cl.exe"; then + CC="$with_cl_home/bin/cl.exe" + if test -e "$CC"; then COMPATH=$with_cl_home AC_MSG_RESULT([found.]) else @@ -502,12 +461,14 @@ if test "$_os" = "WINNT"; then fi fi +dnl =================================================================== dnl Check if stdc headers are available excluding windows. -if test "$_os" != "WINNT"; then - AC_HEADER_STDC -fi +dnl =================================================================== +AC_HEADER_STDC -dnl Check if palm-appl.h is available on Linux or FreeBSD +dnl =================================================================== +dnl Check if pam-appl.h is available on Linux or FreeBSD +dnl =================================================================== if test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then AC_MSG_CHECKING([pam_appl.h]) if test -f "/usr/include/security/pam_appl.h"; then @@ -517,26 +478,36 @@ if test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then AC_MSG_WARN([pam_appl.h could not be found in /usr/include/security]) >> warn fi fi -dnl *************************************** + +dnl =================================================================== dnl Testing for c++ compiler and version... -dnl *************************************** +dnl =================================================================== +if test -n "$with_gcc_home"; then + if test -z "$CXX"; then + CXX="$with_gcc_home/bin/g++" + fi +fi +if test -n "$with_cl_home"; then + if test -z "$CXX"; then + CXX="$with_cl_home/bin/cl.exe" + fi +fi AC_PROG_CXX -if test "$_os" = "Linux" -o "$_os" = "FreeBSD" -o "$_os" = "NetBSD" -o "$_os" = "IRIX" -o "$_os" = "IRIX64" ; then - dnl Check whether the gnu gcc compiler is used. - if test "$CC" = "gcc"; then - AC_MSG_CHECKING([g++ Compiler]) - dnl Check whether the wrapper g++ exists. - if test -z "$GXX"; then - AC_MSG_WARN([GNU g++/c++ was not found]) - AC_MSG_WARN([GNU g++/c++ was not found]) >> warn - else - AC_MSG_RESULT([checked]) - fi - fi + +dnl =================================================================== +dnl Set the gxx include directories +dnl =================================================================== +if test "$GXX" = "yes"; then + _gxx_include_path=`$CXX -print-search-dirs | grep instal |$AWK '{ print \$2 }'`/include + echo GXX includes $_gxx_include_path fi + + +dnl =================================================================== +dnl Extra checking for the SUN OS compiler +dnl =================================================================== if test "$_os" = "SunOS"; then - CXX=CC; export CXX; dnl Workshop C++ compiler packaged with Workshop C compiler if test "$CC" = "cc"; then AC_MSG_CHECKING([Sun Workshop C++ Compiler]) @@ -548,8 +519,10 @@ if test "$_os" = "SunOS"; then fi fi fi +dnl =================================================================== +dnl Extra checking for the DARWIN compiler +dnl =================================================================== if test "$_os" = "Darwin"; then - CXX=c++; export CXX; dnl c++ packaged with cc (gcc) for Macosx if test "$CC" = "cc"; then AC_MSG_CHECKING([Macosx c++ Compiler]) @@ -561,10 +534,12 @@ if test "$_os" = "Darwin"; then fi fi fi +dnl =================================================================== +dnl Extra checking for the IRIX compiler +dnl =================================================================== if test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then dnl MIPSpro C++ compiler packaged with MIPSpro C compiler if test "$CC" = "cc"; then - CXX=CC; export CXX; AC_MSG_CHECKING([SGI MIPSpro C++ Compiler]) if test "$CXX" != "CC"; then AC_MSG_WARN([SGI MIPSpro C++ was not found]) @@ -574,8 +549,10 @@ if test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then fi fi fi +dnl =================================================================== +dnl Extra checking for the OSF compiler +dnl =================================================================== if test "$_os" = "OSF1"; then - CXX="cxx"; export CXX; AC_MSG_CHECKING([Compaq C++ compiler version]) dnl cxx -V outputs to standard error!!!! _compaqcxx_version=`$CXX -V 2>&1 | $AWK '{ print $3 }'` @@ -589,6 +566,26 @@ if test "$_os" = "OSF1"; then fi fi +dnl ************************************************************* +dnl Testing for exception handling - dwarf2 or sjlj exceptions... +dnl ************************************************************* +AC_MSG_CHECKING([try to compile exception code]) +AC_LANG_SAVE +AC_LANG_CPLUSPLUS +AC_CACHE_VAL(exceptions_type, [AC_TRY_LINK( + [#include <iostream> + +extern "C" void __sjthrow(void) __attribute__ ((__noreturn__)); + + ], + [__sjthrow() ], + [exceptions_type="sjlj"], + [exceptions_type="dwarf2"]) +]) + +AC_MSG_RESULT(Exceptions type: $exceptions_type) +AC_LANG_RESTORE + dnl ************************************************************** dnl Testing for required Solaris and workshop compiler patches... dnl ************************************************************** @@ -782,6 +779,8 @@ else dnl Check if there is a java compiler at all. if test -x "$_java_path"; then JAVA=$_java_path + else + AC_MSG_ERROR([$_java_path not found set with_jdk_home]) fi fi AC_MSG_CHECKING([the installed JDK]) @@ -803,13 +802,13 @@ if test "$JAVA"; then if test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then _jdk_middle=`echo $_jdk | $AWK -F. '{ if ($2 != 2) print "false"; else print "true" }'` _jdk_middle3=`echo $_jdk | $AWK -F. '{ if ($2 != 3) print "false"; else print "true" }'` - + if test "$_jdk_middle" = "false" -a "$_jdk_middle3" = "true"; then _jdk_minor="true" fi fi - if test "$_os" = "Linux" -a "$_machine_type" = "i686"; then + if test "$_os" = "Linux" -a "$_machine_type" = "i686" -o "$_os" = "FreeBSD"; then _jdk_middle=`echo $_jdk | $AWK -F. '{ if ($2 != 2) print "false"; else print "true" }'` _jdk_middle3=`echo $_jdk | $AWK -F. '{ if ($2 != 3) print "false"; else print "true" }'` _jdk_middle4=`echo $_jdk | $AWK -F. '{ if ($2 != 4) print "false"; else print "true" }'` @@ -821,14 +820,23 @@ if test "$JAVA"; then _jdk_minor="true" fi fi - if test "$_os" = "FreeBSD" -o "$_os" = "NetBSD"; then + if test "$_os" = "NetBSD"; then _jdk_middle=`echo $_jdk | $AWK -F. '{ if ($2 != 2) print "false"; else print "true" }'` + _jdk_middle3=`echo $_jdk | $AWK -F. '{ if ($2 != 3) print "false"; else print "true" }'` + if test "$_jdk_middle" = "false" -a "$_jdk_middle3" = "true"; then + _jdk_minor="true" + fi fi if test "$_os" = "Linux" -a "$_machine_type" = "sparc"; then _jdk_middle=`echo $_jdk | $AWK -F. '{ if ($2 != 2) print "false"; else print "true" }'` fi if test "$_os" = "Linux" -a "$_machine_type" = "ppc"; then _jdk_middle=`echo $_jdk | $AWK -F. '{ if ($2 != 2) print "false"; else print "true" }'` + _jdk_middle3=`echo $_jdk | $AWK -F. '{ if ($2 != 3) print "false"; else print "true" }'` + + if test "$_jdk_middle" = "false" -a "$_jdk_middle3" = "true"; then + _jdk_minor="true" + fi fi if test "$_os" = "Linux" -a "$_machine_type" = "armv4l"; then _jdk_middle=`echo $_jdk | $AWK -F. '{ if ($2 != 2) print "false"; else print "true" }'` @@ -916,43 +924,39 @@ dnl Check for a BSD compatible install program. dnl AC_PROG_INSTALL dnl Check whether ln -s works on the current file system. dnl AC_PROG_LN_S + +dnl =================================================================== dnl Check whether there's a Perl version available. +dnl =================================================================== if test -z "$with_perl_home"; then AC_PATH_PROG(PERL, perl) else _perl_path="$with_perl_home/bin/perl" if test -x "$_perl_path"; then PERL=$_perl_path + else + AC_MSG_ERROR([$_perl_path not found]) fi fi + +dnl =================================================================== +dnl Testing for Perl version 5 or greater. +dnl $] is the perl version variable, it is returned as an integer +dnl =================================================================== if test "$PERL"; then AC_MSG_CHECKING([the Perl version]) - dnl *************************************** - dnl Testing Perl version. - dnl *************************************** - _perl_temp=`$PERL -version 2> /dev/null | $AWK -F" " '/built for/ { print $4 }'` - if test "$_perl_temp" = "version"; then - _perl_version=`$PERL -version 2> /dev/null | $AWK -F" " '/built for/ { print $5 }'` - else - _perl_version=`echo $_perl_temp | $SED -n "s/v//p"` - fi - _perl_major=`echo $_perl_version | $AWK -F"." '{ if ($1 < 5) print "false"; else print "true" }'` - if test "$_perl_major" = "true"; then - PERL=`echo $PERL | $SED -n "s/\/perl$//p"` - AC_MSG_RESULT([checked (Perl $_perl_version)]) - else + ${PERL} -e "exit($]);" + _perl_version=$? + if test "$_perl_version" -lt 5; then AC_MSG_ERROR([found Perl version "$_perl_version", use version 5 of Perl]) fi else AC_MSG_ERROR([Perl not found, install version 5 of Perl]) fi -dnl Write the Perl compiler directive into the set_soenv script. -echo "#!$PERL/perl -w" > set_soenv -cat set_soenv.1 >> set_soenv -chmod +x set_soenv - +dnl =================================================================== dnl Check whether the tcsh can be used. +dnl =================================================================== if test "$_os" != "WINNT" -o "$CygwinVer" = "1" ; then AC_PATH_PROG(TCSH, tcsh) if test -z "$TCSH"; then @@ -996,6 +1000,7 @@ if test "$_os" = "Darwin" -a "x$x_includes" = "xno_x_includes"; then elif test "$_os" != "WINNT" ; then AC_PATH_X AC_PATH_XTRA + if test "x$x_includes" = "x"; then x_includes="/usr/include" fi @@ -1057,14 +1062,14 @@ dnl *************************************** dnl testing ml.exe assembler path dnl *************************************** if test "$_os" = "WINNT"; then -if test ! -x "$with_asm_home/ml.exe"; then - AC_PATH_PROG(ML_EXE, ml.exe) - if test -z "$ML_EXE"; then - with_asm_home="NO_ASM_HOME" - else - with_asm_home="ASM_IN_PATH" - fi -fi + if test ! -x "$with_asm_home/ml.exe"; then + AC_PATH_PROG(ML_EXE, ml.exe) + if test -z "$ML_EXE"; then + with_asm_home="NO_ASM_HOME" + else + with_asm_home="ASM_IN_PATH" + fi + fi else with_asm_home="NO_ASM_HOME" fi @@ -1107,6 +1112,55 @@ else fi dnl =================================================================== +dnl Test for the presence of Ant and that it works +dnl =================================================================== + +ANT_HOME=; export ANT_HOME +if test -z "$with_ant_home"; then + AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat]) +else + AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat],,$with_ant_home/bin) +fi + + +if test -z "$ANT"; then + AC_MSG_RESULT([Ant not found - Some Java projects will not build]) +else + AC_MSG_CHECKING([if $ANT works]) +cat > conftest.java << EOF + public class conftest { + int testmethod(int a, int b) { + return a + b; + } + } +EOF + +cat > conftest.xml << EOF + <project name="conftest" default="conftest"> + <target name="conftest"> + <javac srcdir="." includes="conftest.java"> + </javac> + </target> + </project> +EOF + + ant_cmd="$ANT -buildfile conftest.xml 1>&2" + AC_TRY_EVAL(ant_cmd) + if test $? = 0 && test -f ./conftest.class ; then + AC_MSG_RESULT([Ant works]) + ANT_HOME=`echo $ANT | $SED -n "s/\/bin\/ant.*\$//p"` + else + echo "configure: Ant test failed" >&5 + cat conftest.java >&5 + cat conftest.xml >&5 + AC_MSG_WARN([Ant does not work - Some Java projects will not build!]) + fi + + rm -f conftest* core core.* *.core +fi + + +dnl =================================================================== dnl Setting up the environment. dnl =================================================================== echo "********************************************************************" @@ -1130,6 +1184,9 @@ fi if test -z "$JAVA_HOME"; then JAVA_HOME="NO_JAVA_HOME" fi +if test -z "$ANT_HOME"; then + ANT_HOME="NO_ANT_HOME" +fi if test -z "$TCSH"; then TCSH="NO_TCSH" fi @@ -1146,14 +1203,14 @@ if test -z "$x_includes"; then x_includes="no_x_includes" fi if test -z "$with_local_solenv"; then - _LOCAL_SOLENV="DEFAULT" + LOCAL_SOLENV="DEFAULT" else - _LOCAL_SOLENV=$with_local_solenv + LOCAL_SOLENV=$with_local_solenv fi if test -z "$with_local_solver"; then - _LOCAL_SOLVER="DEFAULT" + LOCAL_SOLVER="DEFAULT" else - _LOCAL_SOLVER=$with_local_solver + LOCAL_SOLVER=$with_local_solver fi if test -z "$CYGWIN"; then CYGWIN="NO_CYGWIN" @@ -1168,55 +1225,63 @@ if test -z "$with_lang"; then else with_lang=","$with_lang"," fi -# Substituting blank spaces in windows pathnames with '#' -if test "$_os" = "WINNT"; then -# COMPATH=`echo $COMPATH | $SED "s/ /#/g"` - JAVA_HOME=`echo $JAVA_HOME | $SED "s/ /#/g"` - PERL=`echo $PERL | $SED "s/ /#/g"` - _LOCAL_SOLENV=`echo $_LOCAL_SOLENV | $SED "s/ /#/g"` - _LOCAL_SOLVER=`echo $_LOCAL_SOLVER | $SED "s/ /#/g"` - CYGWIN=`echo $CYGWIN | $SED "s/ /#/g"` -fi -if test -n "$enable_gcc3"; then - USE_GCC3="TRUE" +if test -n "$enable_debug"; then + ENABLE_DEBUG="TRUE" else - USE_GCC3="FALSE" + ENABLE_DEBUG="FALSE" fi -# Print args passed to set_soenv. -if test 1 = 1; then -echo -echo "\$COMPATH="$COMPATH -echo "\$_gcc_include_path="$_gcc_include_path -echo "\$_gxx_include_path="$_gxx_include_path -echo "\$JAVA_HOME="$JAVA_HOME -echo "\$TCSH="$TCSH -echo "\$PERL="$PERL -echo "\$x_libraries="$x_libraries -echo "\$x_includes="$x_includes -echo "\$_LOCAL_SOLENV="$_LOCAL_SOLENV -echo "\$_LOCAL_SOLVER="$_LOCAL_SOLVER -echo "\$upd="$upd -echo "\$CYGWIN="$CYGWIN -dnl if test -z "$STLPORT4" ; then -dnl STLPORT4=/usr/include/CC -dnl else - echo "\$STLPORT4="$STLPORT4 -dnl fi -echo "\$enable_xprint="$enable_xprint -echo "\$with_lang="$with_lang -echo "\$with_asm_home="$with_asm_home -echo "\$with_unzip_home="$with_unzip_home -echo "\$MINGWIN32="$WITH_MINGWIN -echo "\$with_use_shell="$with_use_shell -echo "\$USE_GCC3="$USE_GCC3 -echo -fi +dnl =================================================================== +dnl Bits to substitute into set_soenv.in +dnl =================================================================== +AC_SUBST(ANT_HOME) +AC_SUBST(COMPATH) +GCC_INCLUDE_PATH="$_gcc_include_path" +AC_SUBST(GCC_INCLUDE_PATH) +GXX_INCLUDE_PATH="$_gxx_include_path" +AC_SUBST(GXX_INCLUDE_PATH) +GCC_HOME="$with_gcc_home" +AC_SUBST(GCC_HOME) +AC_SUBST(JAVA_HOME) +AC_SUBST(TCSH) +AC_SUBST(PERL) +XLIB="$x_libraries" +AC_SUBST(XLIB) +XINC="$x_includes" +AC_SUBST(XINC) +AC_SUBST(LOCAL_SOLENV) +AC_SUBST(LOCAL_SOLVER) +UPD="$upd" +AC_SUBST(UPD) +AC_SUBST(CYGWIN) +AC_SUBST(STLPORT4) +USE_XPRINT="$enable_xprint" +AC_SUBST(USE_XPRINT) +WITH_LANG="$with_lang" +AC_SUBST(WITH_LANG) +ASM_HOME="$with_asm_home" +AC_SUBST(ASM_HOME) +UNZIP_HOME="$with_unzip_home" +AC_SUBST(UNZIP_HOME) +AC_SUBST(WITH_MINGWIN) +USE_SHELL="$with_use_shell" +AC_SUBST(USE_SHELL) +EXCEPTIONS="$exceptions_type" +AC_SUBST(EXCEPTIONS) +OSVERSION="$with_os_version" +AC_SUBST(OSVERSION) +AC_SUBST(USE_GCC3) +AC_SUBST(PTHREAD_CFLAGS) +AC_SUBST(PTHREAD_LIBS) +AC_SUBST(ENABLE_DEBUG) -# Executing the set_soenv script to setup the environment variables. +AC_OUTPUT([set_soenv]) + +dnl Executing the set_soenv script to setup the environment variables. +chmod a+x set_soenv if test -z "$enable_check_only"; then - './set_soenv' $COMPATH $_gcc_include_path $_gxx_include_path $JAVA_HOME $TCSH $PERL $x_libraries $x_includes $_LOCAL_SOLENV $_LOCAL_SOLVER $upd $CYGWIN $STLPORT4 $enable_xprint $with_lang $with_asm_home $with_unzip_home $WITH_MINGWIN $with_use_shell $USE_GCC3 + './set_soenv' else echo echo Test Complete @@ -1235,6 +1300,6 @@ else fi echo fi -AC_OUTPUT() - +dnl Removed this for the perl patches.... +dnl AC_OUTPUT() |