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 dnl * Date: $Date: 2005-06-20 15:17:47 $ dnl * dnl * Desc: This file serves as input for the GNU autoconf package dnl * in order to create a configure script. dnl * In this stage configure just checks the pre-requisites dnl * necessary to build OpenOffice.org dnl * dnl * dnl ******************************************************************/ AC_REVISION( $Revision: 1.124 $ ) AC_PREREQ(2.50) AC_INIT() echo "$@" >config.parms AC_ARG_WITH(gnu-patch, [ --with-gnu-patch Specify location of GNU patch on Solaris or FreeBSD ],,) AC_ARG_WITH(gnu-cp, [ --with-gnu-cp Specify location of GNU cp on Solaris or FreeBSD ],,) AC_ARG_WITH(gpc, [ --without-gpc Use the internal polygon clipping code instead of the external GPC polygon clipping library. ],,) AC_ARG_ENABLE(libart, [ --enable-libart Enables the use of libart, instead of GPC for polygon clipping. ],,) AC_ARG_ENABLE(openldap, [ --enable-openldap Enables the use of the OpenLDAP LDAP SDK instead of the Netscape/Mozilla one ],,) AC_ARG_ENABLE(libsn, [ --enable-libsn Enables the use of libstartup-notification ],,) AC_ARG_ENABLE(mozilla, [ --disable-mozilla OO.o usually includes a strangely hacked up mozilla binary for your platform, to build without this version, use this option. ],,enable_mozilla="yes") AC_ARG_WITH(fonts, [ --without-fonts Removes Bitstream Vera fonts from openoffice.org installation set, for people building for specific distributions where the fonts are known to be already available ],,) AC_ARG_ENABLE(epm, [ --disable-epm OO.o includes self-packaging code, that requires epm, however epm is useless for large scale package building. ],,enable_epm="yes") AC_ARG_ENABLE(fontooo, [ --disable-fontooo disable FontOOo (useful for distributions using fontconfig for OOo) ],,enable_fontooo="yes") AC_ARG_ENABLE(evolution2, [ --enable-evolution2 Allows the built-in evolution 2 addressbook connectivity build to be enabled. ],,) AC_ARG_WITH(system-stdlibs, [ --with-system-stdlibs use libstdc++/libgcc_s already on system ],,) AC_ARG_WITH(system-mspack, [ --with-system-mspack use libmspack already installed on system ],,) AC_ARG_ENABLE(cups, [ --disable-cups disable cups support in the psprint project ],,enable_cups=yes) AC_ARG_ENABLE(fontconfig, [ --disable-fontconfig disable support for the fontconfig library ],,enable_fontconfig=yes) AC_ARG_ENABLE(directx, [ --disable-directx Remove DirectX implementation for the new XCanvas interface. The DirectX support requires more stuff installed on Windows to compile. (DirectX SDK, GDI+ libs) ],,enable_directx=yes) AC_ARG_ENABLE(atlmfc, [ --disable-atlmfc Disable the use of ATL/MFC for windows build. ],,) AC_ARG_ENABLE(symbols, [ --enable-symbols Include debugging symbols in output. Implicitly activated by --enable-crashdump (see below) WARNING - a complete build needs 8 Gb of space and takes much longer. (enables -g compiler flag) --enable-symbols=SMALL sets the gcc -g1 setting which is smaller. ],,) 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_ENABLE(dbgutil, [ --enable-dbgutil: Include additional debugging utilities, such as assertions, object counting, etc. Larger build. Independent from --enable-debug ],,) AC_ARG_ENABLE(crashdump, [[ --enable-crashdump[=yes|TRUE|STATIC|no] Enable (disable) the crashdump feature code. [default=STATIC] When enabled, this option implicitly activates --enable-symbols (see above). ]],,enable_crashdump=STATIC) AC_ARG_ENABLE(cl-standard, [ --enable-cl-standard For Microsoft C/C++ compiler users, use non-optimizing standard compiler. ( This just disavles optimization options and therefore removes a lot of warnings when using the cheaper standard compiler. ) ],,) AC_ARG_ENABLE(vctk, [ --enable-vctk Tell configure to check for the MS VC Toolkit 2003. ( This is experimental! ) ],,) AC_ARG_ENABLE(gtk, [ --disable-gtk Determines whether to use Gtk+ vclplug on platforms where Gtk+ is available. ],,enable_gtk=yes) AC_ARG_ENABLE(gnome-vfs, [ --disable-gnome-vfs Determines whether to use the Gnome Virtual Filing System on platforms where that VFS is available ],,enable_gnome_vfs=yes) AC_ARG_ENABLE(static-gtk, [ --enable-static-gtk: Modules that are linked against gtk libraries use the static libraries instead of the dynamic ones. (enables -Bstatic linker flag for gtk libraries) ],,) AC_ARG_ENABLE(build-mozilla, [ --enable-build-mozilla Use this option if you want to build the mozilla components from the mozilla source code. ],,) AC_ARG_WITH(mozilla-version, [ --with-mozilla-version Choose which version of mozilla to use while building mozilla. Default: 1.7.5. Note that not all versions are supported. ],,) AC_ARG_WITH(mozilla-toolkit, [ --with-mozilla-toolkit Choose which GUI toolkit to use while building mozilla components. Default: gtk2 ],,) AC_ARG_ENABLE(kde, [ --enable-kde Determines whether to use Qt/KDE vclplug on platforms where Qt and KDE are available. ],,) AC_ARG_ENABLE(binfilter, [ --disable-binfilter: Disable legacy binary file formats filters ],,) AC_ARG_ENABLE(rpath, [ --disable-rpath: Disable the use of relative paths in shared libraries ],,) AC_ARG_ENABLE(pasf, [ --disable-pasf disable support for sound using portaudio/sndfile ],,enable_pasf=yes) AC_ARG_ENABLE(pam-link, [ --enable-pam-link link with libpam instead of dynamically open it ],,) AC_ARG_ENABLE(crypt-link, [ --disable-crypt-link disable linking with libcrypt instead of dynamically open it (needed for ancient GNU/Linux distributions without crypt()/libcrypt) ],,enable_crypt_link=yes) AC_ARG_ENABLE(xrender-link, [ --enable-xrender-link link with libXrender instead of dynamically open it ],,) AC_ARG_WITH(myspell-dicts, [ --without-myspell-dicts Removes myspell dictionaries from openoffice.org installation set, for people building for specific distributions where the myspell dictionaries are installed from other sources ],,) AC_ARG_WITH(system-libs, [ --with-system-libs Use libs already on system -- enables all --with-system-* flags except mozilla, python and odbc/sane/xrender-header(s) ],,) AC_ARG_WITH(system-zlib, [ --with-system-zlib Use zlib already on system ],,) AC_ARG_WITH(system-jpeg, [ --with-system-jpeg Use jpeg already on system ],,) AC_ARG_WITH(system-expat, [ --with-system-expat Use expat already on system ],,) AC_ARG_WITH(system-freetype, [ --with-system-freetype Use freetype already on system ],,) AC_ARG_WITH(system-libwpd, [ --with-system-libwpd Use libwpd already on system ],,) AC_ARG_WITH(system-libxml, [ --with-system-libxml Use libxml already on system ],,) AC_ARG_WITH(system-python, [ --with-system-python Use python already on system ],,) #AC_ARG_WITH(system-icu, #[ --with-system-icu Use icu already on system #],,) AC_ARG_WITH(system-db, [ --with-system-db Use berkeley db already on system ],,) AC_ARG_WITH(db-jar, [ --with-db-jar=JARFILE Specify path to jarfile manually ], [ DB_JAR="$withval" ]) AC_ARG_WITH(system-sablot, [ --with-system-sablot Use sablot already on system ],,) AC_ARG_WITH(system-odbc, [ --with-system-odbc-headers Use the odbc headers already on system ],,) AC_ARG_WITH(system-sane, [ --with-system-sane-header Use sane.h already on system ],,) AC_ARG_WITH(system-xrender, [ --with-system-xrender-headers Use XRender headers already on system ],,) AC_ARG_WITH(system-curl, [ --with-system-curl Use curl already on system ],,) AC_ARG_WITH(system-boost, [ --with-system-boost Use boost already on system ],,) AC_ARG_WITH(system-nas, [ --with-system-nas Use nas already on system ],,) AC_ARG_WITH(system-sndfile, [ --with-system-sndfile Use sndfile already on system ],,) AC_ARG_WITH(system-portaudio, [ --with-system-portaudio Use portaudio already on system ],,) AC_ARG_WITH(system-neon, [ --with-system-neon Use neon already on system ],,) AC_ARG_WITH(system-myspell, [ --with-system-myspell Use myspell already on system ],,) AC_ARG_WITH(system-mythes, [ --with-system-mythes Use mythes already on system ],,) AC_ARG_WITH(system-altlinuxhyph, [ --with-system-altlinuxhyph Use ALTLinuxhyph already on system ],,) AC_ARG_WITH(system-mozilla, [ --with-system-mozilla Use mozilla already on system. Note that some components cannot be built against a contemporary mozilla ],,) AC_ARG_WITH(stlport4, [ --with-stlport4 The location that STLport4 is installed in. The STL header files are assumed to be in stlport4-home/stlport and the STLPort4 library in stlport4-home/lib. Usage: --with-stlport4= Warning!!, --without-stlport4 is possible with gcc >= 3.3.3, but will break ABI compatability ], WITH_STLPORT=$withval , WITH_STLPORT=yes) AC_ARG_WITH(jdk-home, [ --with-jdk-home if you have installed JDK 1.3, on your system, please supply the path here. Note that this is not the location of the Java binary but the location of the entire distribution. Usage: --with-jdk-home= ],,) AC_ARG_WITH(gxx_include_path, [ --with-gxx-include-path if you want to override the autodetected g++ include path. Usage: --with-gxx-include-path= ],,) AC_ARG_WITH(java, [ --with-java Build with[[out]] Java support. If you use --without-java/--with-java=no then the build will have no support for Java components, applets, accessibility or XML filters. Use --with-java=gij to enable gij/gcj as java/javac replacements ], if test "$withval" = "yes"; then WITH_JAVA=java; else WITH_JAVA=$withval; fi, WITH_JAVA=java) 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= ],,) AC_ARG_WITH(perl-home, [ --with-perl-home If you have installed the Perl 5 Distribution, on your system, please supply the path here. Note that this is not the location of the Perl binary but the location of the entire distribution. Usage: --with-perl-home= ],,) AC_ARG_WITH(cl-home, [ --with-cl-home For Windows NT users, please supply the path for the Microsoft C/C++ compiler. Note that this is not the location of the compiler binary but the location of the entire distribution. Usage: --with-cl-home= ],,) AC_ARG_WITH(mspdb-path, [ --with-mspdb-path For Microsoft C/C++ compiler users, please supply the path pointing to the mspdb71.dll (.NET 2003). Usage: --with-mspdb-path= ],,) AC_ARG_WITH(midl-path, [ --with-midl-path For Microsoft C/C++ .NET compiler users, please supply the path pointing to the midl.exe. Usage: --with-midl-path= ],,) AC_ARG_WITH(csc-path, [ --with-csc-path For Microsoft C/C++ .NET compiler users, please supply the path pointing to the csc.exe. Usage: --with-csc-path= ],,) AC_ARG_WITH(nmake-path, [ --with-nmake-path For MS Visual Toolkit compiler users, please supply the path pointing to the nmake.exe. The Platform SDK provides one in the Win64 directory, usually something like: /cygdrive/c/Programme/Microsoft SDK/Bin/Win64" Usage: --with-nmake-path= ],,) AC_ARG_WITH(nsis-path, [ --with-nsis-path For Windows users, please supply the path to the "Nullsoft Scriptable Install System" (NSIS). If NSIS is found in the path or this option is supplied a self contained executable installer for OpenOffice.org will be created. Usage: --with-nsis-path= ],,) AC_ARG_WITH(frame-home, [ --with-frame-home For Microsoft C/C++ .NET compiler users, please supply the path pointing to lib/mscoree.lib, usually something like: "/cygdrive/c/Program Files/Microsoft Visual Studio .NET/FrameworkSDK" MS Visual Toolkit compiler users, please supply the path pointing to lib/msvcrt.lib, usually something like: "/cygdrive/c/Program Files/Microsoft Visual Studio .NET 2003/Vc7" Usage: --with-frame-home= ],,) AC_ARG_WITH(psdk-home, [ --with-psdk-home For Windows users, please supply the path to the Microsoft Platform SDK. Usage: --with-psdk-home= ],,) AC_ARG_WITH(directx-home, [ --with-directx-home For Windows users, please supply the path to the Microsoft DirectX SDK. Usage: --with-directx-home= ],,) AC_ARG_WITH(extra-dotnet-files, [ --with-extra-dotnet-files For MS Visual Toolkit compiler, please supply the path to additional library/include files that are otherwise missing. (This is a cludge until MS Visual Toolkit is usable without extra files.) Usage: --with-extra-dotnet-files= ],,) AC_ARG_WITH(local-solenv, [ --with-local-solenv If you have solenv in a location other than ../solenv, please supply the path here. Usage: --with-local-solenv= ],,) AC_ARG_WITH(local-solver, [ --with-local-solver if you have solver in a location other than ../solver, please supply the path here. Usage: --with-local-solver= ],,) AC_ARG_ENABLE(check-only, [ --enable-check-only Use this option option if you just want to check your environment. This option stops the generation of an ????env.set Usage: --enable-check-only=yes ],,) AC_ARG_ENABLE(macos9, [ --enable-macos9 Use this option option if you want to generate a macos9 environment on macosx. ],,) AC_ARG_WITH(images, [ --with-images Select different image sets to build & install in addition to the default set. Usage: --with-images="industrial crystal" ],with_images=$withval,with_images=) AC_ARG_WITH(lang, [ --with-lang Use this option to build OpenOffice.org with additional language support. English (US) is always included by default. Separate multiple languages with space. For all languages, use --with-lang=ALL. Usage: --with-lang="es sw tu cs sk" ],,) AC_ARG_WITH(dict, [ --with-dict Use this option to build OpenOffice.org with dictionary support. ALL dictionaries are always included by default unless overridden with this option. Separate multiple dictionaries with commas. For all dictionaries, use --with-dict=ALL. Usage: --with-dict=ENGB,ENUS,ITIT ],,) AC_ARG_WITH(asm-home, [ --with-asm-home For Windows users, please supply the path for the ml.exe assembler. Usage: --with-asm-home= ],,) AC_ARG_WITH(os-version, [ --with-os-version For FreeBSD users, use this option option to override the detected OSVERSION. Usage: --with-os-version= ],,) AC_ARG_WITH(unzip-home, [ --with-unzip-home Deprecated: use --with-zip-home instead],,) AC_ARG_WITH(zip-home, [ --with-zip-home If you use a non standard zip, for example windows please supply the path for zip Usage: --with-zip-home= ],,) AC_ARG_WITH(mingwin, [ --with-mingwin For Windows users, use the mingwin32 compiler within cygwin environment, this implies --with-use-shell=tcsh Usage: --with-mingwin=yes ],WITH_MINGWIN=$withval,WITH_MINGWIN=0) AC_ARG_WITH(use-shell, [ --with-use-shell For Windows users, use this option to override the default shell to be used for the build environment. Supported options: tcsh (default) and 4nt. Usage: --with-use-shell=tcsh|4nt ],with_use_shell=$withval,with_use_shell="tcsh") AC_ARG_WITH(build-version, [ --with-build-version Allows the builder to add a custom version tag that will appear in the Help/About box for QA purposes. Usage: --with-build-version="Built by Jim" ],with_build_version=$withval) AC_ARG_ENABLE(sgistl, [ --enable-sgistl for IRIX users, use this option option to build OpenOffice.org using SGI's STL. Usage: --enable-sgistl=yes ],,) BUILD_TYPE="OOo EXT" dnl =================================================================== dnl Message. dnl =================================================================== echo "********************************************************************" echo "* *" echo "* OpenOffice.org build configuration. *" echo "* *" echo "* The configure proces checks your platform to see whether *" echo "* you can build OpenOffice.org on it. *" echo "* This proces checks all pre-requisites and generates a file *" echo "* containing the necessary environment variables. *" echo "* Source this file after configure has ended successfully. *" echo "* *" echo "* Any warning that is generated during the configure process *" echo "* must be taken into account, since it can be a reason for *" echo "* an unsuccessful build of OpenOffice.org *" echo "* *" echo "********************************************************************" echo "" echo "********************************************************************" echo "* *" echo "* Checking the platform pre-requisites. *" echo "* *" echo "********************************************************************" echo "" dnl =================================================================== dnl Configure pre-requisites. dnl =================================================================== cat /dev/null > warn AC_PROG_AWK AC_PATH_PROG( AWK, $AWK) 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 AC_MSG_CHECKING([for solenv environment]) if test -z "$with_local_solenv"; then LOCAL_SOLENV="DEFAULT" AC_MSG_RESULT([default]) else LOCAL_SOLENV=$with_local_solenv AC_MSG_RESULT([$with_local_solenv]) fi AC_SUBST(LOCAL_SOLENV) if test "$LOCAL_SOLENV" = "DEFAULT"; then _solenv="../solenv" else _solenv="$LOCAL_SOLENV" fi if test -e $_solenv/inc/minor.mk; then # Get UPD number from ../solenv/inc/minor.mk UPD="`grep RSCVERSION= ../solenv/inc/minor.mk | $AWK -F"=" '{ print $2 }'`" AC_SUBST(UPD) SOURCEVERSION="`grep SOURCEVERSION= ../solenv/inc/minor.mk | $AWK -F"=" '{ print $2 }'`" AC_SUBST(SOURCEVERSION) else AC_MSG_ERROR([$_solenv/inc/minor.mk missing but needed for architecture/os detecion and proper environment script generation...]) fi dnl =================================================================== dnl Checks for the operating system and processor. dnl =================================================================== AC_CONFIG_AUX_DIRS([$_solenv/bin]) AC_CANONICAL_SYSTEM if test "$build" != "$host" -o "$build" != "$target" \ -o "$host" != "$target"; then AC_MSG_WARN([cross-compiling by any means is not supported (yet)!]) echo "cross-compiling by any means is not supported (yet)!" >> warn fi if echo "$build_os" | grep cygwin; then AC_MSG_CHECKING([Cygwin version]) CygwinVer=`uname -r` AC_MSG_RESULT([$CygwinVer]) if test "`echo $CygwinVer | $AWK -F . '{ print $1$2 }'`" -lt "15"; then AC_MSG_ERROR([You need at least Cygwin V1.5.x]) fi 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 "$build_os" in solaris*) test_x=yes test_gtk=yes test_kde=yes test_cups=yes _os=SunOS dnl =========================================================== dnl check whether we're using solaris 6,7,8 - sparc or intel. dnl =========================================================== AC_MSG_CHECKING([the Solaris operating system release]) _os_release=`echo $build_os | $SED -e s/solaris2\.//` if test "$_os_release" -lt "6"; then AC_MSG_ERROR([use solaris >= 6 to build OpenOffice.org]) else AC_MSG_RESULT([ok ($_os_release)]) fi dnl check whether we're using a sparc or i386 processor AC_MSG_CHECKING([the processor type]) if test "$build_cpu" = "sparc" -o "$build_cpu" = "i386"; then AC_MSG_RESULT([ok ($build_cpu)]) else AC_MSG_ERROR([only sparc and i386 processors are supported]) fi ;; linux-gnu) test_x=yes test_gtk=yes test_kde=yes test_cups=yes _os=Linux ;; gnu) test_x=yes test_cups=no _os=GNU ;; cygwin*) # Windows test_x=no test_cups=no _os=WINNT ;; darwin*) # Mac OS X test_x=no test_cups=no test_gtk=no _os=Darwin ;; freebsd*) test_x=yes test_gtk=yes test_kde=yes test_cups=yes AC_MSG_CHECKING([the FreeBSD operating system release]) if test -n "$with_os_version"; then OSVERSION="$with_os_version" else OSVERSION=`/sbin/sysctl -n kern.osreldate` fi AC_MSG_RESULT([found OSVERSION=$OSVERSION]) AC_MSG_CHECKING([which thread library to use]) if test "$OSVERSION" -lt "500016"; then PTHREAD_CFLAGS="-D_THREAD_SAFE" PTHREAD_LIBS="-pthread" elif test "$OSVERSION" -lt "502102"; then PTHREAD_CFLAGS="-D_THREAD_SAFE" PTHREAD_LIBS="-lc_r" else PTHREAD_CFLAGS="" PTHREAD_LIBS="-pthread" fi AC_MSG_RESULT([$PTHREAD_LIBS]) _os=FreeBSD ;; osf) test_x=dontknow test_cups=no _os=OSF1 ;; netbsd) test_x=yes test_gtk=yes test_kde=yes test_cups=no PTHREAD_CFLAGS="-pthread" PTHREAD_LIBS="-pthread -lpthread" _os=NetBSD ;; irix*) test_x=yes test_cups=no _os=IRIX ;; aix*) test_x=yes test_cups=no PTHREAD_LIBS=-pthread echo "AIX is an alpha port --- Use at own risk" >> warn _os=AIX ;; *) AC_MSG_ERROR([$_os operating system is not suitable to build OpenOffice.org!]) ;; esac AC_SUBST(OSVERSION) AC_SUBST(PTHREAD_CFLAGS) AC_SUBST(PTHREAD_LIBS) dnl =================================================================== dnl Set the ENABLE_CRASHDUMP variable. (Activate --enable-symbols) dnl =================================================================== AC_MSG_CHECKING([whether to enable crashdump feature]) if test "$enable_crashdump" = "yes" -o "$enable_crashdump" = "TRUE"; then ENABLE_CRASHDUMP="TRUE" if test -z "$enable_symbols"; then enable_symbols="yes" fi AC_MSG_RESULT([yes]) else if test "$enable_crashdump" = "STATIC"; then ENABLE_CRASHDUMP="STATIC" if test -z "$enable_symbols"; then enable_symbols="yes" fi AC_MSG_RESULT([yes, STATIC]) else if test "$enable_crashdump" = "" -o "$enable_crashdump" = "no"; then ENABLE_CRASHDUMP="" AC_MSG_RESULT([no]) else AC_MSG_ERROR([--enable-crashdump only accepts yes, no, TRUE or STATIC as parameter.]) fi fi fi AC_SUBST(ENABLE_CRASHDUMP) if test "$_os" = "WINNT"; then dnl =================================================================== dnl Set the ENABLE_VCTK variable. dnl =================================================================== AC_MSG_CHECKING([whether to check for the MS VC Toolkit 2003]) if test "$enable_vctk" = "" -o "$enable_vctk" = "no"; then ENABLE_VCTK="" AC_MSG_RESULT([no]) else ENABLE_VCTK="TRUE" AC_MSG_RESULT([yes]) fi AC_SUBST(ENABLE_VCTK) dnl =================================================================== dnl Set the VC_STANDARD variable. dnl =================================================================== AC_MSG_CHECKING([whether to use the standard non-optimizing compiler]) if test "$enable_cl_standard" = "" -o "$enable_cl_standard" = "no"; then VC_STANDARD="" AC_MSG_RESULT([no]) else VC_STANDARD="TRUE" AC_MSG_RESULT([yes]) fi AC_SUBST(VC_STANDARD) fi dnl =================================================================== dnl Set the ENABLE_DEBUG variable. (Activate --enable-symbols) dnl =================================================================== AC_MSG_CHECKING([whether to do a debug build]) if test -n "$enable_debug" && test "$enable_debug" != "no"; then ENABLE_DEBUG="TRUE" if test -z "$enable_symbols"; then enable_symbols="yes" fi AC_MSG_RESULT([yes]) else ENABLE_DEBUG="FALSE" AC_MSG_RESULT([no]) fi AC_SUBST(ENABLE_DEBUG) dnl =================================================================== dnl Set the ENABLE_DBGUTIL variable dnl =================================================================== AC_MSG_CHECKING([whether to build with additional debug utilities]) if test -n "$enable_dbgutil" && test "$enable_dbgutil" != "no"; then PROEXT="" PRODUCT="" PROFULLSWITCH="" AC_MSG_RESULT([yes]) else PRODUCT="full" PROFULLSWITCH="product=full" PROEXT=".pro" AC_MSG_RESULT([no, full product build]) fi AC_SUBST(PRODUCT) AC_SUBST(PROFULLSWITCH) AC_SUBST(PROEXT) dnl =================================================================== dnl First setting is whether to include symbols into final build. dnl =================================================================== AC_MSG_CHECKING([whether to include symbols into final build]) if test -n "$enable_symbols" && test "$enable_symbols" != "no"; then if test "$enable_symbols" = "yes" -o "$enable_symbols" = "TRUE"; then ENABLE_SYMBOLS="TRUE" AC_MSG_RESULT([yes]) else if test "$enable_symbols" = "SMALL" -o "$enable_symbols" = "small"; then ENABLE_SYMBOLS="SMALL" else if test "$enable_symbols" != "no" ; then echo enable symbols is: $enable_symbols AC_MSG_ERROR([--enable-symbols only accepts yes, TRUE or SMALL as parameter.]) else ENABLE_SYMBOLS= fi fi fi else ENABLE_SYMBOLS= AC_MSG_RESULT([no]) fi AC_SUBST(ENABLE_SYMBOLS) dnl =================================================================== dnl Build options dnl =================================================================== AC_MSG_CHECKING([whether to enable native CUPS support]) if test "$test_cups" = "yes" -a \( "$enable_cups" = "yes" -o "$enable_cups" = "TRUE" \) ; then ENABLE_CUPS="TRUE" AC_MSG_RESULT([yes]) else ENABLE_CUPS="" AC_MSG_RESULT([no]) fi AC_SUBST(ENABLE_CUPS) AC_MSG_CHECKING([whether to enable fontconfig support]) if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a \( "$enable_fontconfig" = "yes" -o "$enable_fontconfig" = "TRUE" \); then ENABLE_FONTCONFIG="TRUE" AC_MSG_RESULT([yes]) else ENABLE_FONTCONFIG="" AC_MSG_RESULT([no]) fi AC_SUBST(ENABLE_FONTCONFIG) dnl =================================================================== dnl Disable legacy binary file formats filters dnl =================================================================== AC_MSG_CHECKING([whether to enable filters for legacy binary file formats (StarOffice 5.2)]) if test "$enable_binfilter" = "no"; then WITH_BINFILTER="NO" AC_MSG_RESULT([no]) else WITH_BINFILTER="YES" BUILD_TYPE="$BUILD_TYPE BINFILTER" AC_MSG_RESULT([yes]) fi AC_SUBST(WITH_BINFILTER) if test "$_os" = "WINNT"; then AC_MSG_CHECKING([whether to use DirectX]) if test "$enable_directx" = "yes" -o "$enable_directx" = "TRUE" -o "$enable_directx" = ""; then ENABLE_DIRECTX="TRUE" AC_MSG_RESULT([yes]) else ENABLE_DIRECTX="" AC_MSG_RESULT([no]) fi AC_SUBST(ENABLE_DIRECTX) AC_MSG_CHECKING([whether to use ATL/MFC]) if test "$enable_atlmfc" = "yes" -o "$enable_atlmfc" = "TRUE" -o "$enable_atlmfc" = ""; then dnl This should be called DISABLE_ATLMFC, see iz32552 NETTOOLKIT="" AC_MSG_RESULT([yes]) else NETTOOLKIT="TRUE" AC_MSG_RESULT([no]) fi AC_SUBST(NETTOOLKIT) fi dnl =================================================================== dnl Disable rpath in shared libraries? dnl =================================================================== AC_MSG_CHECKING([whether to use RPATH in shared libraries]) if test "$enable_rpath" = "no"; then ENABLE_RPATH="no" else ENABLE_RPATH="yes" fi AC_MSG_RESULT([$ENABLE_RPATH]) AC_SUBST(ENABLE_RPATH) dnl Test whether to include MySpell dictionaries dnl =================================================================== AC_MSG_CHECKING([whether to include MySpell dictionaries]) if test -z "$with_myspell_dicts"; then AC_MSG_RESULT([yes]) WITH_MYSPELL_DICTS=YES BUILD_TYPE="$BUILD_TYPE DICTIONARIES" else AC_MSG_RESULT([no]) WITH_MYSPELL_DICTS=NO fi AC_SUBST(WITH_MYSPELL_DICTS) dnl =================================================================== dnl WINNT uses either 4nt or tcsh, all other O/S use tcsh. dnl The following sets the with_use_shell variable. dnl =================================================================== AC_MSG_CHECKING([which shell to use]) if test $_os = "WINNT"; then if test "$with_use_shell" != "tcsh" -a "$with_use_shell" != "4nt"; then AC_MSG_ERROR([only "tcsh" or "4nt" are supported options]) fi dnl =================================================================== dnl Sanity check! Native windows programs cannot use cygwin symlinks! dnl =================================================================== dnl As long as awk instead of $AWK is used somewhere in the sources, dnl check for $AWK and awk. $AWK is pointing to gawk in cygwin. if test -L $AWK -o -L `which awk` -o -L `which tar` -o -L `which gunzip` ; then AC_MSG_ERROR([$AWK, awk, tar or gunzip is a cygwin symlink! Native windows programs cannot use cygwin symlinks. Remove the symbolic link, and copy the program to the name of the link.]) fi dnl =================================================================== dnl Another sanity check! More a band-aid. winenv.* adds guw.pl to dnl CC and CXX but the configure checks here assume that guw.pl dnl (if needed at all) is not yet present. dnl =================================================================== CC=`echo $CC | $SED -n "s/^guw.pl //p"` CXX=`echo $CXX | $SED -n "s/^guw.pl //p"` dnl =================================================================== dnl If $CC is set to a MinGW compiler, e.g. "gcc -mno-cygwin" enable dnl $WITH_MINGWIN dnl =================================================================== if test -n "$CC";then if test "`$CC -dumpmachine 2>/dev/null | $AWK -F- '{ print $3 }'`" = "mingw32"; then WITH_MINGWIN="yes" fi fi dnl =================================================================== dnl If using Mingwin32 then don't use 4NT dnl =================================================================== if test "$WITH_MINGWIN" = "yes"; then with_use_shell="tcsh" if test -z "$CC"; then CC="gcc -mno-cygwin" CXX="g++ -mno-cygwin" fi fi else dnl =================================================================== dnl All other operating systems use tcsh. dnl =================================================================== with_use_shell="tcsh" fi USE_SHELL="$with_use_shell" AC_MSG_RESULT([$USE_SHELL]) AC_SUBST(USE_SHELL) AC_SUBST(WITH_MINGWIN) dnl =================================================================== dnl Check whether the tcsh can be used. dnl =================================================================== if test "$_os" != "WINNT" -o "$with_use_shell" != "4nt"; then AC_PATH_PROG(TCSH, tcsh) if test -z "$TCSH"; then AC_MSG_ERROR([tcsh not found in \$PATH]) else TCSH=`echo $TCSH | $SED -n "s/\/tcsh//p"` fi else AC_MSG_WARN([Windows 4NT builds don't need tcsh]) TCSH="NO_TCSH_NEEDED" fi AC_SUBST(TCSH) dnl =================================================================== dnl Checks for c compiler, dnl The check for the c++ compiler is later on. dnl =================================================================== AC_MSG_CHECKING([gcc home]) if test -z "$with_gcc_home"; then GCC_HOME=`which gcc | $SED -e s,/bin/gcc,,` else GCC_HOME="$with_gcc_home" fi AC_MSG_RESULT($GCC_HOME) AC_SUBST(GCC_HOME) if test -n "$with_gcc_home"; then if test -z "$CC"; then CC="$with_gcc_home/bin/gcc" fi fi dnl The following checks for gcc, cc and then cl (if it weren't guarded for win32) if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then AC_PROG_CC fi COMPATH=`dirname "$CC"` if test "$COMPATH" = "." ; then AC_PATH_PROGS(COMPATH, $CC) dnl double square bracket to get single because of M4 quote... COMPATH=`echo $COMPATH | $SED "s@/[[^/:]]*\\\$@@"`; fi dnl =================================================================== dnl Test the gcc version, 3 is OK dnl =================================================================== GCCVER=20995 if test \( "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes" \) -a "$GCC" = "yes"; then AC_MSG_CHECKING([the GNU gcc compiler version]) _gcc_version=`$CC -dumpversion` _gcc_major=`echo $_gcc_version | $AWK -F. '{ print \$1 }'` _gcc_longver=`echo $_gcc_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` GCCVER=`echo $_gcc_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` if test "$_gcc_major" -lt "3"; then AC_MSG_ERROR([found version "$_gcc_version", use version 3+ of the gcc compiler]) else if test "$GCCVER" -eq "030203"; then if test "$ENABLE_SYMBOLS" = "SMALL"; then AC_MSG_ERROR([version "$_gcc_version" gives internal error with small.]) fi fi fi AC_MSG_RESULT([checked (gcc $_gcc_version)]) if test "$_os" = "SunOS"; then AC_MSG_CHECKING([gcc linker]) if $CC -Wl,--version 2>&1 |head -n 1| grep -v GNU > /dev/null;then AC_MSG_ERROR([failed (not GNU ld). Use GNU ld instead of Sun ld on Solaris]) fi AC_MSG_RESULT([ok (GNU ld)]) fi fi AC_SUBST(GCCVER) if test "$GCC" = "yes"; then AC_MSG_CHECKING([whether $CC supports -fvisibility=hidden]) save_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -fvisibility=hidden" AC_TRY_LINK([], [ return 0; ], [ HAVE_GCC_VISIBILITY_FEATURE=TRUE ], []) CFLAGS=$save_CFLAGS if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi fi AC_SUBST(HAVE_GCC_VISIBILITY_FEATURE) dnl =================================================================== dnl Search all the common names for GNU make dnl =================================================================== AC_MSG_CHECKING([for GNU make]) for a in "$MAKE" $GNUMAKE make gmake gnumake; do $a --version 2> /dev/null | grep GNU 2>&1 > /dev/null if test $? -eq 0; then GNUMAKE=$a break fi done AC_MSG_RESULT($GNUMAKE) AC_MSG_CHECKING([the GNU make version]) dnl Change empty GNUMAKE from warning to error, pending testing. if test -z "$GNUMAKE"; then 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_longver=`echo $_make_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` if test "$_make_longver" -ge "037901" ; then AC_MSG_RESULT([$GNUMAKE $_make_version]) else if test "$_os" = "Darwin"; then if test "$_make_longver" -ge "037900" ; then AC_MSG_RESULT([$GNUMAKE $_make_version]) else AC_MSG_WARN([failed ($GNUMAKE $_make_version need 3.79.0+)]) fi else AC_MSG_ERROR([failed ($GNUMAKE $_make_version need 3.79.1+)]) fi fi fi AC_SUBST(GNUMAKE) dnl =================================================================== dnl Test the solaris compiler version dnl =================================================================== if test "$_os" = "SunOS"; then if test "$CC" = "cc"; then AC_PATH_PROGS(_cc, cc) COMPATH=`echo $_cc | $SED -n "s/\/cc//p"` AC_MSG_CHECKING([the SUN Workshop C compiler version]) dnl cc -V outputs to standard error!!!! _workshop_string=`$CC -V 2>&1 | grep '^cc' | sed -e 's/.* C //'` _workshop_version=`echo $_workshop_string | $AWK '{ print $1 }'` _workshop_major=`echo $_workshop_version | $AWK -F. '{ print $1 }'` if test "$_workshop_major" != "5"; then AC_MSG_ERROR([found version "$_workshop_version", use version 5.0, 5.2 or 5.5 of the Sun Workshop C compiler]) else _workshop_minor=`echo $_workshop_version | $AWK -F. '{ if ($2 == 0) print "true"; else if ($2 == 2) print "true"; else if ($2 == 5) print "true"; else print "false" }'` if test "$_workshop_minor" = "false"; then AC_MSG_ERROR([found version "$_workshop_version", use version 5.0, 5.2 or 5.5 of the Sun Workshop C compiler]) else dnl compiler will do AC_MSG_RESULT([checked]) 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) COMPATH=`echo $_cc | $SED -n "s/\/cc//p"` AC_MSG_CHECKING([the SGI MIPSpro C compiler version]) dnl cc -version outputs to standard error!!!! _mipspro_version=`$CC -version 2>&1 | $AWK '{ print $4 }'` _mipspro_major=`echo $_mipspro_version | $AWK -F. '{ print $1 }'` if test "$_mipspro_major" != "7"; then AC_MSG_ERROR([found version "$_mipspro_version", use version 7.2+ of the SGI MIPSpro C compiler]) else _mipspro_minor=`echo $_mipspro_version | $AWK -F. '{ if ($2 <= 1) print "false"; else print "true" }'` if test "$_mipspro_minor" = "false"; then AC_MSG_ERROR([found version "$_mipspro_version", use version 7.2+ of the SGI MIPSpro C compiler]) else dnl compiler will do AC_MSG_RESULT([checked]) fi fi 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) COMPATH=`echo $_cc | $SED -n "s/\/cc//p"` AC_MSG_WARN([******* $_cc , $COMPATH]) AC_MSG_CHECKING([the Compaq C compiler version]) dnl cc -V outputs to standard error!!!! _compaqc_version=`$CC -V 2>&1 | $AWK '{ print $3 }'` _compaqc_major=`echo $_compaqc_version | $AWK -F. '{ print $1 }'` if test "$_compaqc_major" != "T6"; then AC_MSG_ERROR([found version "$_compaqc_version", use version 6 of the Compaq C compiler]) else dnl compiler will do AC_MSG_RESULT([checked]) fi fi fi dnl =================================================================== dnl Check which Microsoft C/C++ or MinGW compiler is used for WINNT dnl =================================================================== if test "$_os" = "WINNT"; then if test "$WITH_MINGWIN" != "yes"; then AC_MSG_CHECKING([the Microsoft C/C++ Compiler]) dnl =========================================================== dnl Check for mspdb71.dll dnl =========================================================== dnl .NET 2003 Compiler AC_PATH_PROG(MSPDB_PATH, mspdb71.dll) if test -n "$MSPDB_PATH";then MSPDB_PATH=`dirname "$MSPDB_PATH"` fi if test -e "$with_mspdb_path/mspdb71.dll"; then MSPDB_PATH="$with_mspdb_path" fi dnl .NET case if test -z "$MSPDB_PATH" -a -e "$with_cl_home/../Common7/IDE/mspdb71.dll"; then MSPDB_PATH="$with_cl_home/../Common7/IDE" fi dnl VCTK case if test -z "$MSPDB_PATH" -a -e "$with_cl_home/bin/mspdb71.dll"; then MSPDB_PATH="$with_cl_home/bin" fi if test -z "$MSPDB_PATH"; then AC_MSG_ERROR([You need a mspdb71.dll, make sure it's in the path or use --with-mspdb-path]) fi MSPDB_PATH=`cygpath -d "$MSPDB_PATH"` MSPDB_PATH=`cygpath -u "$MSPDB_PATH"` PATH="$MSPDB_PATH:$PATH" if test -x "$with_cl_home/bin/cl.exe"; then CC="$with_cl_home/bin/cl.exe" else AC_PATH_PROG(CC, cl.exe) fi if test -e "$CC"; then # This gives us a posix path with 8.3 filename restrictions CC=`cygpath -d "$CC"` CC=`cygpath -u "$CC"` # Remove /cl.exe from CC case insensitive AC_MSG_RESULT([found ($CC)]) COMPATH=`echo $CC | $SED 's@/[[cC]][[lL]]\.[[eE]][[xX]][[eE]]@@'` export INCLUDE=`cygpath -d "$COMPATH/../Include"` dnl Check which Microsoft C/C++ compiler is found AC_MSG_CHECKING([the Version of Microsoft C/C++ Compiler]) dnl The following find microsoft, matches nn.nn.nnnn then pulls numbers out. CCNUMVER=`$CC 2>&1 | $AWK "/Microsoft/ && /..\\...\\...../ { x = match( \\\$0, /..\\...\\...../ ) CCversion = substr( \\\$0, RSTART, RLENGTH) tokencount = split (CCversion,vertoken,\".\") for ( i = 1 ; i <= tokencount ; i++ ) { printf (\"%04d\",vertoken[[i]] ) } }"` AC_MSG_RESULT([found Compiler version $CCNUMVER.]) if test "$CCNUMVER" -ge "001300100000"; then COMEX=10 else AC_MSG_ERROR([Compiler too old. Use Microsoft C/C++ .NET 2003 compiler.]) fi else AC_MSG_ERROR([Microsoft C/C++ Compiler not found. Use --with-cl-home or set path to cl.exe.]) fi else AC_MSG_CHECKING([the Mingwin32 C++ Compiler]) if test `$CC -dumpmachine | $AWK -F- '{ print $3 }'` = "mingw32"; then AC_MSG_RESULT([found.]) else AC_MSG_ERROR([Mingwin32 C++ Compiler not found.]) fi fi fi AC_SUBST(COMEX) AC_SUBST(MSPDB_PATH) dnl =================================================================== dnl .NET needs special treatment dnl =================================================================== if test "$COMEX" = "8" -o "$COMEX" = "10"; then dnl Check midl.exe AC_PATH_PROG(MIDL_PATH, midl.exe) if test -n "$MIDL_PATH";then MIDL_PATH=`dirname "$MIDL_PATH"` fi if test -x "$with_midl_path/midl.exe"; then MIDL_PATH="$with_midl_path" fi if test -z "$MIDL_PATH" -a -e "$with_cl_home/../Common7/Tools/Bin/midl.exe"; then MIDL_PATH="$with_cl_home/../Common7/Tools/Bin" fi if test ! -x "$MIDL_PATH/midl.exe"; then AC_MSG_ERROR([midl.exe not found. Make sure it's in the path or use --with-midl-path]) fi # Convert to posix path with 8.3 filename restrictions ( No spaces ) MIDL_PATH=`cygpath -d "$MIDL_PATH"` MIDL_PATH=`cygpath -u "$MIDL_PATH"` dnl Check csc.exe AC_PATH_PROG(CSC_PATH, csc.exe) if test -n "$CSC_PATH";then CSC_PATH=`dirname "$CSC_PATH"` fi if test -x "$with_csc_path/csc.exe"; then CSC_PATH="$with_csc_path" fi if test ! -x "$CSC_PATH/csc.exe"; then AC_MSG_ERROR([csc.exe not found. Make sure it's in the path or use --with-csc-path]) fi # Convert to posix path with 8.3 filename restrictions ( No spaces ) CSC_PATH=`cygpath -d "$CSC_PATH"` CSC_PATH=`cygpath -u "$CSC_PATH"` dnl Check nmake.exe for MS VC Toolkit if test -n "$ENABLE_VCTK"; then AC_PATH_PROG(NMAKE_PATH, nmake.exe) if test -n "$NMAKE_PATH"; then NMAKE_PATH=`dirname "$NMAKE_PATH"` fi if test -x "$with_nmake_path/nmake.exe"; then NMAKE_PATH="$with_nmake_path" fi if test ! -x "$NMAKE_PATH/nmake.exe"; then AC_MSG_ERROR([nmake.exe not found. Make sure it's in the path or use --with-nmake-path]) fi # Convert to posix path with 8.3 filename restrictions ( No spaces ) NMAKE_PATH=`cygpath -d "$NMAKE_PATH"` NMAKE_PATH=`cygpath -u "$NMAKE_PATH"` fi dnl Check mscoree.lib / .NET Frameworks dir dnl This now has two meanings, for .NET2003 it has to point to the dnl directory with lib/mscoree.lib and for VCTK to lib/msvcrt.lib. if test -z "$ENABLE_VCTK"; then if test -f "$with_frame_home/lib/mscoree.lib"; then FRAME_HOME="$with_frame_home" fi if test -z "$FRAME_HOME" -a -e "$with_cl_home/../SDK/v1.1/lib/mscoree.lib"; then FRAME_HOME="$with_cl_home/../SDK/v1.1" fi if test ! -f "$FRAME_HOME/lib/mscoree.lib"; then AC_MSG_ERROR([mscoree.lib (.NET Framework) not found. Make sure you use --with-frame-home]) fi else if test ! -f "$COMPATH/../lib/mscoree.lib"; then AC_MSG_ERROR([mscoree.lib not found. Unexpected, ask dev@tools.openoffice.org for help.]) fi if test -f "$with_frame_home/lib/msvcrt.lib"; then FRAME_HOME="$with_frame_home" fi if test -z "$FRAME_HOME" -a -e "$with_cl_home/../Microsoft Visual Studio .NET 2003/Vc7/lib/msvcrt.lib"; then FRAME_HOME="$with_cl_home/../Microsoft Visual Studio .NET 2003/Vc7" fi if test ! -f "$FRAME_HOME/lib/msvcrt.lib"; then AC_MSG_ERROR([msvcrt.lib (.NET Framework) not found. Make sure you use --with-frame-home]) fi fi # Convert to posix path with 8.3 filename restrictions ( No spaces ) FRAME_HOME=`cygpath -d "$FRAME_HOME"` FRAME_HOME=`cygpath -u "$FRAME_HOME"` fi AC_SUBST(MIDL_PATH) AC_SUBST(CSC_PATH) AC_SUBST(NMAKE_PATH) AC_SUBST(FRAME_HOME) dnl =================================================================== dnl Check if stdc headers are available excluding windows. dnl =================================================================== if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then AC_HEADER_STDC fi dnl =================================================================== dnl Check if cups/cups.h is available dnl =================================================================== if test "$test_cups" = "yes" -a "$ENABLE_CUPS" = "TRUE" ; then AC_CHECK_HEADER(cups/cups.h, [], [AC_MSG_ERROR([cups/cups.h could not be found. libcupsys2-dev or cups???-devel missing?])], []) fi dnl =================================================================== dnl Check if PAM/pam_appl.h is available on Linux or FreeBSD dnl =================================================================== if test "$_os" = "Linux" -o "$_os" = "FreeBSD" -o "$_os" = "GNU"; then AC_CHECK_HEADER(security/pam_appl.h, [], [AC_MSG_ERROR([pam_appl.h could not be found. libpam-dev or pam-devel missing?])], []) AC_MSG_CHECKING([whether to link to libpam]) if test -n "$enable_pam_link"; then AC_MSG_RESULT([yes]) PAM_LINK=YES AC_CHECK_LIB(pam, pam_start, [], [AC_MSG_ERROR(libpam not found or functional)], []) else AC_MSG_RESULT([no, dynamically open it]) PAM_LINK=NO fi fi AC_SUBST(PAM_LINK) if test "$_os" = "Linux"; then AC_MSG_CHECKING([whether to link to libcrypt]) if test -n "$enable_crypt_link"; then AC_MSG_RESULT([yes]) CRYPT_LINK=YES AC_CHECK_LIB(crypt, crypt, [], [AC_MSG_ERROR(libcrypt not found or functional)], []) else AC_MSG_RESULT([no, dynamically open it]) CRYPT_LINK=NO fi fi AC_SUBST(CRYPT_LINK) dnl =================================================================== dnl Testing for c++ compiler and version... dnl =================================================================== if test -n "$with_gcc_home"; then if test -z "$CXX"; then CXX="$with_gcc_home/bin/g++" fi fi if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then if test -e "$CC"; then CXX="$CC" fi fi dnl Autoconf 2.53 can do this test for cl.exe, 2.13 can't! if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then AC_PROG_CXX fi dnl check if we are using a buggy version of g++ (currently 3.4.0, 3.4.1 and trunk) if test "$GXX" = "yes"; then AC_MSG_CHECKING([the GNU C++ compiler version]) _gpp_version=`$CXX -dumpversion` _gpp_major=`echo $_gpp_version | $AWK -F. '{ print \$1 }'` _gpp_minor=`echo $_gpp_version | $AWK -F. '{ print \$2 }'` AC_MSG_RESULT([checked (g++ $_gpp_version)]) if test "$_gpp_major" = "3"; then if test "$_gpp_minor" = "4"; then AC_MSG_CHECKING([whether $CXX has the enum bug]) AC_TRY_RUN([ extern "C" void abort (void); extern "C" void exit (int status); enum E { E0, E1, E2, E3, E4, E5 }; void test (enum E e) { if (e == E2 || e == E3 || e == E1) exit (1); } int main (void) { test (E4); test (E5); test (E0); return 0; } ],[AC_MSG_ERROR([your version of the GNU C++ compile has a bug which prevents OpenOffice.org from being compiled correctly - please check http://gcc.gnu.org/ml/gcc-patches/2004-07/msg00968.html for details.])], [AC_MSG_RESULT([no])]) fi fi fi dnl =================================================================== dnl Set the gcc/gxx include directories dnl =================================================================== # Removed the special FreeBSD treatment. The problem was that with_gxx_include_path # often contains an i386 which is expanded as a macro. Solved in stlport. if test "$GXX" = "yes"; then AC_MSG_CHECKING([for g++ include path]) if test -z "$with_gxx_include_path"; then with_gxx_include_path=`echo "#include " | $CXX -E -xc++ - | $SED -n '/.*1*"\(.*\)\/cstring".*/s//\1/p' | head -n 1` if test "$with_gxx_include_path" = "/usr/libexec/(null)/include"; then with_gxx_include_path="/usr/include" fi fi fi dnl This is the original code... dnl with_gxx_include_path=`$CXX -print-search-dirs | grep instal |$AWK '{ print \$2 }'`/include if test -z "$with_gxx_include_path"; then with_gxx_include_path="NO_GXX_INCLUDE" AC_MSG_RESULT([no g++ includes]) else AC_MSG_RESULT([$with_gxx_include_path]) fi GXX_INCLUDE_PATH="$with_gxx_include_path" AC_SUBST(GXX_INCLUDE_PATH) dnl =================================================================== dnl Extra checking for the SUN OS compiler dnl =================================================================== if test "$_os" = "SunOS"; then dnl Workshop C++ compiler packaged with Workshop C compiler if test "$CC" = "cc"; then AC_MSG_CHECKING([Sun Workshop C++ Compiler]) if test "$CXX" != "CC"; then AC_MSG_WARN([Sun Workshop C++ was not found]) echo "Sun Workshop C++ was not found" >> warn else AC_MSG_RESULT([checked]) fi fi fi dnl =================================================================== dnl Extra checking for the DARWIN compiler dnl =================================================================== if test "$_os" = "Darwin"; then dnl c++ packaged with cc (gcc) for Macosx if test "$CC" = "cc"; then AC_MSG_CHECKING([Macosx c++ Compiler]) if test "$CXX" != "c++"; then AC_MSG_WARN([Macosx C++ was not found]) echo "Macosx C++ was not found" >> warn else AC_MSG_RESULT([checked]) 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 AC_MSG_CHECKING([SGI MIPSpro C++ Compiler]) if test "$CXX" != "CC"; then AC_MSG_WARN([SGI MIPSpro C++ was not found]) echo "SGI MIPSpro C++ was not found" >> warn else AC_MSG_RESULT([checked]) fi fi fi dnl =================================================================== dnl Extra checking for the OSF compiler dnl =================================================================== if test "$_os" = "OSF1"; then AC_MSG_CHECKING([Compaq C++ compiler version]) dnl cxx -V outputs to standard error!!!! _compaqcxx_version=`$CXX -V 2>&1 | $AWK '{ print $3 }'` _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]) echo "found version $_compaqc_version, use version 6 of the Compaq C++ compiler" >> warn else dnl compiler will do AC_MSG_RESULT([checked]) fi fi dnl ************************************************************* dnl Testing for exception handling - dwarf2 or sjlj exceptions... dnl ************************************************************* AC_MSG_CHECKING([exception type]) AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_CACHE_VAL(exceptions_type, [AC_TRY_LINK( [#include extern "C" void __sjthrow(void) __attribute__ ((__noreturn__)); ], [__sjthrow() ], [exceptions_type="sjlj"], [exceptions_type="dwarf2"]) ]) AC_MSG_RESULT($exceptions_type) AC_LANG_RESTORE EXCEPTIONS="$exceptions_type" AC_SUBST(EXCEPTIONS) dnl ************************************************************** dnl Testing for required Solaris and workshop compiler patches... dnl ************************************************************** dnl Check whether the OS is SunOS. if test "$_os" = "SunOS"; then _temp=`showrev -p | $AWK -F" " '{ print $2 }'` if test "$_os_release" = "7"; then dnl *************** dnl patch 106327-06 dnl *************** AC_MSG_CHECKING([for patch 106327-06 or greater]) _patch=`echo $_temp | $AWK '/106327-06/ { print "found" }'` _patch="false" for i in $_temp do _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'` if test "$_patch_major" = "106327"; then _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'` if test "$_patch_rev" -ge "6"; then _patch="found" fi fi done if test "$_patch" = "found"; then AC_MSG_RESULT([found]) else AC_MSG_WARN([patch 106327-06 not found, please install compiler patch 106327-06 or greater]) echo "patch 106327-06 not found, please install compiler patch 106327-06 or greater" >> warn fi dnl *************** dnl patch 106950-11 dnl *************** AC_MSG_CHECKING([for patch 106950-11 or greater]) _patch=`echo $_temp | $AWK '/106950-11/ { print "found" }'` _patch="false" for i in $_temp do _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'` if test "$_patch_major" = "106950"; then _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'` if test "$_patch_rev" -ge "11"; then _patch="found" fi fi done if test "$_patch" = "found"; then AC_MSG_RESULT([found]) else AC_MSG_WARN([patch 106950-11 not found, please install linker patch 106950-11 or greater]) echo "patch 106950-11 not found, please install linker patch 106950-11 or greater" >> warn fi else if test "$_os_release" = "6"; then dnl *************** dnl patch 105591-09 dnl *************** AC_MSG_CHECKING([for patch 105591-09 or greater]) _patch=`echo $_temp | $AWK '/105591-09/ { print "found" }'` _patch="false" for i in $_temp do _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'` if test "$_patch_major" = "105591"; then _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'` if test "$_patch_rev" -ge "9"; then _patch="found" fi fi done if test "$_patch" = "found"; then AC_MSG_RESULT([found]) else AC_MSG_WARN([patch 105591-09 not found, please install compiler patch 105591-09 or greater]) echo "patch 105591-09 not found, please install compiler patch 105591-09 or greater" >> warn fi dnl *************** dnl patch 107733-08 dnl *************** AC_MSG_CHECKING([for patch 107733-08 or greater]) _patch=`echo $_temp | $AWK '/107733-08/ { print "found" }'` _patch="false" for i in $_temp do _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'` if test "$_patch_major" = "107733"; then _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'` if test "$_patch_rev" -ge "8"; then _patch="found" fi fi done if test "$_patch" = "found"; then AC_MSG_RESULT([found]) else AC_MSG_WARN([patch 107733-06 not found, please install linker patch 107733-08 or greater]) echo "patch 107733-06 not found, please install linker patch 107733-08 or greater" >> warn fi fi fi fi dnl =================================================================== dnl When using Sun Workshop compiler, there is a bug with the cc dnl preprocessor, so use CC preprocessor for the following tests. dnl See Issuezilla #445. dnl =================================================================== if test "$_os" = "SunOS"; then AC_LANG_CPLUSPLUS AC_TRY_CPP("", , ) fi dnl =================================================================== dnl Checks for SGI STL dnl =================================================================== if test -n "$enable_sgistl" && "$enable_sgistl" != "no"; then if test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then AC_MSG_CHECKING([for SGI STL]) if test -d /usr/include/CC ; then AC_MSG_RESULT([yes.]) else AC_MSG_RESULT([not found.]) fi else AC_MSG_ERROR([Option --enable-sgistl is only valid for IRIX]) fi else dnl =================================================================== dnl Checks for STLPORT4 dnl =================================================================== AC_MSG_CHECKING([for STLport4 headers]) STLPORT4="" USE_SYSTEM_STL="" if test "$WITH_STLPORT" = "yes"; then AC_MSG_RESULT([using internal stlport.]) elif test "$WITH_STLPORT" = "no"; then AC_MSG_RESULT([use system STL instead, Warning breaks your ABI compatability!]) USE_SYSTEM_STL="YES" else STLPORT4=$WITH_STLPORT if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then AC_TRY_CPP($STLPORT4/stlport/hash_map, AC_MSG_RESULT([checked.]), AC_MSG_ERROR([STLport4 headers not found.])) else dnl AC_TRY_CPP doesn't work for MSVC because C++ preprocessor is not found by autoconf. if test -f "$STLPORT4/stlport/hash_map"; then AC_MSG_RESULT([checked.]) else AC_MSG_ERROR([STLport4 headers not found.]) fi fi if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then AC_MSG_CHECKING([for STLport4 libraries]) if test "$_os" = "SunOS"; then if test -f "$STLPORT4/lib/libstlport_sunpro.so"; then AC_MSG_RESULT([checked]) else AC_MSG_ERROR([STLport4 libraries not found]) fi elif test "$_os" = "Darwin"; then if test -f "$STLPORT4/lib/libstlport_gcc.dylib"; then AC_MSG_RESULT([checked]) else AC_MSG_ERROR([STLport4 libraries not found]) fi elif test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then if test -f "$STLPORT4/lib/libstlport_mipspro_41.so"; then AC_MSG_RESULT([checked]) else if test -f "$STLPORT4/lib/libstlport_gcc.so"; then AC_MSG_RESULT([checked]) else AC_MSG_ERROR([STLport4 libraries not found]) fi fi else if test -f "$STLPORT4/lib/libstlport_gcc.so"; then AC_MSG_RESULT([checked]) else AC_MSG_ERROR([STLport4 libraries not found]) fi fi fi fi fi if test -z "$STLPORT4"; then STLPORT4="NO_STLPORT4" fi AC_SUBST(STLPORT4) AC_SUBST(USE_SYSTEM_STL) dnl =================================================================== dnl hash_map hackery dnl =================================================================== if test "$USE_SYSTEM_STL" = "YES"; then AC_MSG_CHECKING([if hash_map will be in __gnu_cxx namespace]) AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([#include using namespace __gnu_cxx; ],[hash_map t; return 0;], ac_cv_cxx_have_ext_hash_map=yes, ac_cv_cxx_have_ext_hash_map=no) AC_LANG_RESTORE if test "$ac_cv_cxx_have_ext_hash_map" = "no"; then AC_MSG_ERROR([Can't find hash_map. Try with stlport enabled]) else AC_MSG_RESULT([$ac_cv_cxx_have_ext_hash_map]) fi fi dnl =================================================================== dnl Custom build version dnl =================================================================== AC_MSG_CHECKING([whether to add custom build version]) if test "z$with_build_version" != "z"; then BUILD_VER_STRING=$with_build_version AC_MSG_RESULT([yes, $BUILD_VER_STRING]) else BUILD_VER_STRING= AC_MSG_RESULT([no]) fi AC_SUBST(BUILD_VER_STRING) dnl =================================================================== dnl Java support enable dnl =================================================================== AC_MSG_CHECKING([whether to build with Java support]) if test "$WITH_JAVA" != "no"; then AC_MSG_RESULT([yes]) SOLAR_JAVA="TRUE" NEEDXSLTPROC="no" else AC_MSG_RESULT([no]) SOLAR_JAVA="" NEEDXSLTPROC="yes" AC_MSG_WARN([building without java will mean some features will not be available]) echo "building without java will mean some features will not be available" >>warn fi AC_SUBST(SOLAR_JAVA) dnl =================================================================== dnl Checks for java dnl =================================================================== if test "$SOLAR_JAVA" != ""; then JAVA_HOME=; export JAVA_HOME if test -z "$with_jdk_home"; then AC_PATH_PROG(JAVAINTERPRETER, $WITH_JAVA) else _java_path="$with_jdk_home/bin/$WITH_JAVA" dnl Check if there is a java interpreter at all. if test -x "$_java_path"; then JAVAINTERPRETER=$_java_path else AC_MSG_ERROR([$_java_path not found set with_jdk_home]) fi fi if test "$_os" = "WINNT"; then if test x`echo "$JAVAINTERPRETER" | grep -i '\.exe$'` = x; then JAVAINTERPRETER="${JAVAINTERPRETER}.exe" fi JAVAINTERPRETER=`cygpath -d "$JAVAINTERPRETER"` JAVAINTERPRETER=`cygpath -u "$JAVAINTERPRETER"` fi fi dnl =================================================================== dnl Checks for JDK. dnl =================================================================== if test "$SOLAR_JAVA" != ""; then AC_MSG_CHECKING([the installed JDK]) if test "$JAVAINTERPRETER"; then dnl java -version sends output to stderr! if test `$JAVAINTERPRETER -version 2>&1 | grep -c "Kaffe"` -gt 0; then dnl Kaffe specific tests KAFFE_VER=`$JAVAINTERPRETER -version 2>&1 | $EGREP " Version:" | $SED -r "s/.* Version: ([[0-9\.]]*).*/\1/"` if test -z "$KAFFE_VER"; then AC_MSG_ERROR([looks like Kaffe but version detection failed]) fi _kaffe_ver=`echo "$KAFFE_VER" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'` if test "$_kaffe_ver" -lt 10100; then AC_MSG_ERROR([Kaffe is too old ($KAFFE_VER - $_kaffe_ver), you need at least 1.1.0]) fi JDK=kaffe dnl TODO: define some project exclusion variables AC_MSG_RESULT([checked (Kaffe $KAFFE_VER)]) AC_MSG_WARN([EXPERIMENTAL: Kaffe is not a full JDK replacement - some projects will fail to compile]) echo "EXPERIMENTAL: Kaffe is not a full JDK replacement - some projects will fail to compile" >>warn JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"` elif test `$JAVAINTERPRETER --version 2>&1 | grep -c "GNU libgcj"` -gt 0; then JDK=gcj AC_MSG_RESULT([checked (gcj)]) AC_MSG_WARN([EXPERIMENTAL: gij/gcj is not a full JDK replacement - some projects will fail to compile]) echo "EXPERIMENTAL: gij/gcj is not a full JDK replacement - some projects will fail to compile" >>warn JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*$WITH_JAVA,,p"` else dnl SUN JDK specific tests _jdk=`$JAVAINTERPRETER -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_ERROR([JDK is too old, you need at least 1.3]) fi AC_MSG_RESULT([checked (JDK $_jdk)]) JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"` if test "$_os" = "WINNT"; then JAVA_HOME=`echo $JAVA_HOME | $SED "s,\.[[eE]][[xX]][[eE]]$,,"` fi fi else AC_MSG_ERROR([JAVA not found. You need at least jdk-1.3, Kaffee 1.01, or gcj-4]) fi else dnl Java disabled JAVA_HOME=NO_JAVA_HOME ; export JAVA_HOME fi dnl =================================================================== dnl Checks for javac dnl =================================================================== if test "$SOLAR_JAVA" != ""; then if test "$JDK" = "gcj"; then javacompiler=`echo $WITH_JAVA | $SED -e "s/gij/gcj/g" | $SED -e "s/java/javac/g"` else javacompiler="javac" fi if test -z "$with_jdk_home"; then AC_PATH_PROG(JAVACOMPILER, $javacompiler) else _javac_path="$with_jdk_home/bin/$javacompiler" dnl Check if there is a java compiler at all. if test -x "$_javac_path"; then JAVACOMPILER=$_javac_path fi fi if test -z "$JAVACOMPILER"; then AC_MSG_ERROR([$javacompiler not found set with_jdk_home]) fi if test "$_os" = "WINNT"; then if test x`echo "$JAVACOMPILER" | grep -i '\.exe$'` = x; then JAVACOMPILER="${JAVACOMPILER}.exe" fi JAVACOMPILER=`cygpath -d "$JAVACOMPILER"` JAVACOMPILER=`cygpath -u "$JAVACOMPILER"` fi fi dnl =================================================================== dnl Checks for javadoc dnl =================================================================== if test "$SOLAR_JAVA" != ""; then if test -z "$with_jdk_home"; then AC_PATH_PROG(JAVADOC, javadoc) else _javadoc_path="$with_jdk_home/bin/javadoc" dnl Check if there is a javadoc at all. if test -x "$_javadoc_path"; then JAVADOC=$_javadoc_path else AC_PATH_PROG(JAVADOC, javadoc) fi fi if test -z "$JAVADOC"; then AC_MSG_ERROR([$_javadoc_path not found set with_jdk_home]) fi if test "$_os" = "WINNT"; then if test x`echo "$JAVADOC" | grep -i '\.exe$'` = x; then JAVADOC="${JAVADOC}.exe" fi JAVADOC=`cygpath -d "$JAVADOC"` JAVADOC=`cygpath -u "$JAVADOC"` fi fi if test "$SOLAR_JAVA" != ""; then if test "$JDK" != "gcj"; then # check if JAVA_HOME was (maybe incorrectly?) set automatically to /usr if test "$JAVA_HOME" = "/usr" -a "x$with_jdk_home" = "x"; then if basename $(readlink $(readlink $JAVACOMPILER)) >/dev/null 2>/dev/null; then # try to recover first by looking whether we have a alternatives # system as in Debian or newer SuSEs where following /usr/bin/javac # over /etc/alternatives/javac leads to the right bindir where we # just need to strip a bit away to get a valid JAVA_HOME JAVA_HOME=$(readlink $(readlink $JAVACOMPILER) | $SED -e s,/bin/javac$,,) else # else warn AC_MSG_WARN([JAVA_HOME is set to /usr - this is very likely to be incorrect]) AC_MSG_WARN([if this is the case, please inform the correct JAVA_HOME with --with-jdk-home]) echo "JAVA_HOME is set to /usr - this is very likely to be incorrect" >> warn echo "if this is the case, please inform the correct JAVA_HOME with --with-jdk-home" >> warn fi fi # now check if $JAVA_HOME is really valid if test ! -d "$JAVA_HOME/jre" -a "x$with_jdk_home" = "x"; then AC_MSG_WARN([JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script]) AC_MSG_WARN([attempted to find JAVA_HOME automatically, but apparently it failed]) AC_MSG_WARN([in case JAVA_HOME is incorrectly set, some projects with not be built correctly]) echo "JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script" >> warn echo "attempted to find JAVA_HOME automatically, but apparently it failed" >> warn echo "in case JAVA_HOME is incorrectly set, some projects with not be built correctly" >> warn fi fi fi if test "$JDK" = "gcj"; then save_CFLAGS=$CFLAGS save_LDFLAGS=$LDFLAGS CFLAGS="$CFLAGS -I$JAVA_HOME/include" LDFLAGS="$LDFLAGS -L$JAVA_HOME/lib -lgcj" AC_CHECK_HEADER(jni.h, [], [AC_MSG_ERROR([jni.h could not be found. Mismatch between gcc and libgcj or libgcj-devel missing?])], []) AC_CHECK_LIB(gcjawt, JAWT_GetAWT, [ AWTLIB=-lgcjawt ] ) if test -z "$AWTLIB"; then AC_CHECK_LIB(jawt, JAWT_GetAWT, [ AWTLIB=-ljawt ] ) fi if test -z "$AWTLIB"; then AC_MSG_ERROR([either -lgcjawt or -ljawt with JAWT_GetAWT is required to build wih gcj]) fi AC_SUBST(AWTLIB) CFLAGS=$save_CFLAGS LDFLAGS=$save_LDFLAGS fi AC_SUBST(JAVA_HOME) AC_SUBST(JDK) AC_SUBST(JAVAINTERPRETER) AC_SUBST(JAVACOMPILER) AC_SUBST(JAVADOC) dnl =================================================================== dnl Check for optional gcj-dbtool dnl =================================================================== if test "$JDK" = "gcj"; then javacache=`echo $WITH_JAVA | $SED -e "s/gij/gcj-dbtool/g"` if test -z "$with_jdk_home"; then AC_PATH_PROG(JAVACACHE, $javacache) else _javac_path="$with_jdk_home/bin/$javacache" dnl Check if there is a gcj-dbtool at all. if test -x "$_javac_path"; then JAVACACHE=$_javac_path fi fi if test -z "$JAVACACHE"; then AC_MSG_WARN([$javacache not found set with_jdk_home]) fi fi AC_SUBST(JAVACACHE) if test "$NEEDXSLTPROC" = "no"; then XSLTPROC=NO_XSLTPROC else dnl Check for xsltproc AC_PATH_PROG(XSLTPROC, xsltproc, no) if test "$XSLTPROC" = "no"; then AC_MSG_ERROR([xsltproc is required]) fi fi AC_SUBST(XSLTPROC) dnl =================================================================== dnl Checks for specific files. dnl =================================================================== dnl =================================================================== dnl Checks for programs. dnl =================================================================== dnl Check whether there's a C pre-processor. if test "$_os" = "Linux" -o "$_os" = "FreeBSD" -o "$_os" = "NetBSD" ; then AC_PROG_CPP fi dnl Check whether there's a C++ pre-processor. if test "$_os" = "Linux" -o "$_os" = "FreeBSD" -o "$_os" = "NetBSD" ; then AC_PROG_CXXCPP fi dnl =================================================================== dnl Check whether xmkmf program can be used, x systems only dnl =================================================================== if test "$test_x" = "yes"; then AC_PATH_PROGS(XMKMF, xmkmf) if test -z "$XMKMF"; then AC_MSG_ERROR([install xmkmf to run this script, include openwin in path]) fi fi 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]) ${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 AC_MSG_RESULT([checked (perl $_perl_version)]) else AC_MSG_ERROR([Perl not found, install version 5 of Perl]) fi AC_SUBST(PERL) dnl =================================================================== dnl Testing for required Perl modules dnl =================================================================== AC_MSG_CHECKING([for required Perl modules]) if `$PERL -e 'use Archive::Zip;'`; then AC_MSG_RESULT([all modules found]) else AC_MSG_ERROR([Failed to find some modules]) fi dnl =================================================================== dnl Check whether we already have dmake dnl =================================================================== AC_PATH_PROG(DMAKE, dmake, no) if test "$DMAKE" = "no"; then BUILD_DMAKE=YES echo "dmake will be built on ./bootstrap" else AC_MSG_CHECKING([whether the found dmake is the right dmake]) # we need to find out whether that dmake we found is "our" dmake # or the dmake from Sun's Workshop Compiler which is something # different # This test _should_ work because the one accepts -V (ours) and one # (the other) not... $DMAKE -V 2>/dev/null | grep 'dmake .* Version .*' >/dev/null if test $? -eq 0; then BUILD_DMAKE=NO AC_MSG_RESULT([yes]) AC_MSG_CHECKING([the dmake version]) DMAKE_VERSION=`$DMAKE -V | $SED -n 's/.*Version \([[0-9.]]\+\).*/\1/p'` if test "$DMAKE_VERSION" = "4.10"; then AC_MSG_RESULT([too old. >= 4.3 is needed. (Your old 4.1 version identifies itself as 4.10, PL 0.)]) echo "A newer dmake will be built on ./bootstrap" BUILD_DMAKE=YES elif test "`echo $DMAKE_VERSION | cut -d'.' -f1`" -gt "4"; then AC_MSG_RESULT([OK, >= 4.3]) elif test "`echo $DMAKE_VERSION | cut -d'.' -f1`" = "4" && \ test "`echo $DMAKE_VERSION | cut -d'.' -f2`" -ge "3"; then AC_MSG_RESULT([OK, >= 4.3]) else AC_MSG_RESULT([too old. >= 4.3 is needed]) echo "A newer dmake will be built on ./bootstrap" BUILD_DMAKE=YES fi else AC_MSG_RESULT([no]) echo "dmake will be built on ./bootstrap" BUILD_DMAKE=YES fi fi AC_SUBST(BUILD_DMAKE) AC_MSG_CHECKING([whether to enable EPM for packing]) if test "$_os" != "WINNT" -a \( "z$enable_epm" = "z" -o "$enable_epm" != "no" \) ; then AC_MSG_RESULT([yes]) dnl =================================================================== dnl Check for epm - not needed for windows dnl =================================================================== if test "$_os" != "WINNT"; then if test -n "$with_epm"; then EPM=$with_epm else AC_PATH_PROG(EPM, epm, no) fi if test "$EPM" = "no" || test "$EPM" = "internal"; then echo "EPM will be built." BUILD_EPM=YES BUILD_TYPE="$BUILD_TYPE EPM" else # Gentoo has some epm which is something different... AC_MSG_CHECKING([whether the found epm is the right epm]) if $EPM | grep "ESP Package Manager" >/dev/null 2>/dev/null; then AC_MSG_RESULT([yes]) else AC_MSG_ERROR([no. Install ESP Package Manager (www.easysw.com/epm) and/or specify the path to the right epm]) fi AC_MSG_CHECKING([epm version]) EPM_VERSION=`$EPM | grep 'ESP Package Manager' | cut -d' ' -f4 | $SED -e s/v//` if test "`echo $EPM_VERSION | cut -d'.' -f1`" -gt "3" || \ test "`echo $EPM_VERSION | cut -d'.' -f1`" -eq "3" -a "`echo $EPM_VERSION | cut -d'.' -f2`" -ge "7"; then AC_MSG_RESULT([OK, >= 3.7]) BUILD_EPM=NO if test "$_os" = "Darwin"; then AC_MSG_CHECKING([which PackageMaker EPM thinks to use]) _pm=`strings $EPM | grep PackageMaker | cut -d" " -f1` if test "$_pm" = "/Developer/Applications/PackageMaker.app/Contents/MacOS/PackageMaker"; then AC_MSG_ERROR([$_pm; PackageMaker expected in wrong path. Either patch your epm with the right path (/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker) or use internal patched epm (--with-epm=internal)]) elif test "$_pm" = "Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker"; then AC_MSG_RESULT([$_pm, ok]) else # we never should get here, but go safe AC_MSG_ERROR([$_pm; PackageMaker expected in unknown path. Either patch your epm with the right path (/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker) or use internal patched epm (--with-epm=internal)]) fi fi else AC_MSG_RESULT([too old. epm >= 3.7 is required.]) echo "EPM will be built." BUILD_EPM=YES BUILD_TYPE="$BUILD_TYPE EPM" fi fi fi # test which package format to use AC_MSG_CHECKING([which package format to use]) # epm supports the following formats: # aix - AIX software distribution # bsd - FreeBSD, NetBSD, or OpenBSD software distribution # depot or swinstall - HP-UX software distribution # deb - Debian software distribution # inst or tardist - IRIX software distribution # osx - MacOS X software distribution # pkg - Solaris software distribution # rpm - RedHat software distribution # setld - Tru64 (setld) software distribution # native - "Native" software distribution for the platform # portable - Portable software distribution # defaults case "$_os" in Darwin) PKGFORMAT=osx ;; SunOS) PKGFORMAT=pkg ;; Linux) # if building on Debian, default should be deb... if test -e /etc/debian_version; then PKGFORMAT=deb else PKGFORMAT=rpm fi ;; AIX) PKGFORMAT=aix ;; *BSD) PKGFORMAT=bsd ;; OSF1) PKGFORMAT=setld ;; IRIX) PKGFORMAT=tardist ;; # we never should get here since we check the arciecture/os at the beginning, # but go sure... *) AC_MSG_ERROR([unknown system]) esac if test -n "$with_package_format"; then case "$with_package_format" in aix | bsd | deb | inst | tardist | osx | pkg | rpm | setld | native | portable) PKGFORMAT="$with_package_format" AC_MSG_RESULT([$PKGFORMAT]) ;; *) AC_MSG_ERROR([unsupported format $with_package_format. Supported by EPM are: aix - AIX software distribution bsd - FreeBSD, NetBSD, or OpenBSD software distribution depot or swinstall - HP-UX software distribution deb - Debian software distribution inst or tardist - IRIX software distribution osx - MacOS X software distribution pkg - Solaris software distribution rpm - RedHat software distribution setld - Tru64 (setld) software distribution native - "Native" software distribution for the platform portable - Portable software distribution ]) ;; esac else AC_MSG_RESULT([$PKGFORMAT]) fi case "$PKGFORMAT" in deb) AC_PATH_PROG(DPKG, dpkg, no) if test "$DPKG" = "no"; then AC_MSG_ERROR([dpkg needed for deb creation. Install dpkg.]) fi RPM= ;; osx) if test "$_os" = "Darwin"; then AC_MSG_CHECKING([for PackageMaker availability]) if ! test -x /Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker; then AC_MSG_ERROR([not installed. Please install Apples Dev Tools]) else AC_MSG_RESULT([ok]) fi else AC_MSG_ERROR([PackageMaker needed to build OSX packages and you are not on OSX...]) fi RPM= ;; rpm | pkg) if test "$EPM" != "no" && test "$EPM" != "internal"; then if test "`echo $EPM_VERSION | cut -d'.' -f1`" -lt "4"; then AC_MSG_CHECKING([whether epm is patched for OOos needs]) if grep "Patched for OpenOffice.org" $EPM >/dev/null 2>/dev/null; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) if test "$PKGTYPE" = "rpm"; then _pt="rpm" AC_MSG_WARN([the rpms will need to be installed with --nodeps]) echo "the rpms will need to be installed with --nodeps" >> warn else _pt="pkg" fi AC_MSG_WARN([the ${_pt}s will not be relocateable]) echo "the ${_pt}s will not be relocateable" >> warn AC_MSG_WARN([if you want to make sure installation without --nodeps and relocation will work, you need to patch your epm with the patch in epm/epm-3.7.patch or build with --with-epm=internal which will build a suitable epm]) fi fi fi if test "$PKGFORMAT" = "rpm"; then AC_MSG_CHECKING([for rpm]) for a in "$RPM" rpmbuild rpm; do $a --usage >/dev/null 2> /dev/null if test $? -eq 0; then RPM=$a break fi done if test -z "$RPM" ; then AC_MSG_ERROR([not found]) else AC_MSG_RESULT([$RPM]) fi fi if test "$PKGFORMAT" = "pkg"; then AC_PATH_PROG(PKGMK, pkgmk, no) if test "$PKGMK" = "no"; then AC_MSG_ERROR([pkgmk needed for Solaris pkg creation. Install it.]) fi RPM= fi ;; esac AC_SUBST(BUILD_EPM) AC_SUBST(PKGFORMAT) AC_SUBST(RPM) else AC_MSG_RESULT([no]) EPM=NO fi AC_SUBST(EPM) dnl =================================================================== dnl Check for system stdlibs dnl =================================================================== AC_MSG_CHECKING([whether to provide libstdc++/libgcc_s in the installset]) if test -n "$with_system_stdlibs" -o -n "$with_system_libs" && \ test "$with_system_stdlibs" != "no"; then AC_MSG_RESULT([no]) SYSTEM_STDLIBS=YES else AC_MSG_RESULT([yes]) SYSTEM_STDLIBS=NO fi AC_SUBST(SYSTEM_STDLIBS) dnl =================================================================== dnl Check for system zlib dnl =================================================================== AC_MSG_CHECKING([which zlib to use]) if test -n "$with_system_zlib" -o -n "$with_system_libs" && \ test "$with_system_zlib" != "no"; then AC_MSG_RESULT([external]) SYSTEM_ZLIB=YES AC_CHECK_HEADER(zlib.h, [], [AC_MSG_ERROR(zlib.h not found. install zlib)], []) AC_CHECK_LIB(z, deflate, [ ZLIB=-lz ], [AC_MSG_ERROR(zlib not found or functional)], []) else AC_MSG_RESULT([internal]) SYSTEM_ZLIB=NO BUILD_TYPE="$BUILD_TYPE ZLIB" fi AC_SUBST(SYSTEM_ZLIB) dnl =================================================================== dnl Check for system jpeg dnl =================================================================== AC_MSG_CHECKING([which jpeg to use]) if test -n "$with_system_jpeg" -o -n "$with_system_libs" && \ test "$with_system_jpeg" != "no"; then AC_MSG_RESULT([external]) SYSTEM_JPEG=YES AC_CHECK_HEADER(jpeglib.h, [], [AC_MSG_ERROR(jpeg.h not found. install libjpeg)], []) AC_CHECK_LIB(jpeg, jpeg_resync_to_restart, [ JPEG3RDLIB=-ljpeg ], [AC_MSG_CHECKING(jpeg library not found or fuctional)], []) else AC_MSG_RESULT([internal]) SYSTEM_JPEG=NO BUILD_TYPE="$BUILD_TYPE JPEG" fi AC_SUBST(SYSTEM_JPEG) dnl =================================================================== dnl Check for system expat dnl =================================================================== AC_MSG_CHECKING([which expat to use]) if test -n "$with_system_expat" -o -n "$with_system_libs" && \ test "$with_system_expat" != "no"; then AC_MSG_RESULT([external]) SYSTEM_EXPAT=YES AC_CHECK_HEADER(expat.h, [], [AC_MSG_ERROR(expat.h not found. install expat)], []) AC_CHECK_LIB(expat, XML_ParserCreate, [], [AC_MSG_RESULT(expat library not found or functional.)], []) else AC_MSG_RESULT([internal]) SYSTEM_EXPAT=NO BUILD_TYPE="$BUILD_TYPE EXPAT" fi AC_SUBST(SYSTEM_EXPAT) dnl =================================================================== dnl Check for system freetype dnl =================================================================== AC_MSG_CHECKING([which freetype to use]) if test -n "$with_system_freetype" -o -n "$with_system_libs" && \ test "$with_system_freetype" != "no"; then AC_MSG_RESULT([external]) SYSTEM_FREETYPE=YES PKG_CHECK_MODULES( FREETYPE, freetype2 >= 2.0 ) else AC_MSG_RESULT([internal]) SYSTEM_FREETYPE=NO BUILD_TYPE="$BUILD_TYPE FREETYPE" fi AC_SUBST(SYSTEM_FREETYPE) AC_SUBST(FREETYPE_CFLAGS) AC_SUBST(FREETYPE_LIBS) dnl =================================================================== dnl Check for system libwpd dnl =================================================================== AC_MSG_CHECKING([which libwpd to use]) if test -n "$with_system_libwpd" -o -n "$with_system_libs" && \ test "$with_system_libwpd" != "no"; then AC_MSG_RESULT([external]) SYSTEM_LIBWPD=YES PKG_CHECK_MODULES( LIBWPD, libwpd-0.8 ) else AC_MSG_RESULT([internal]) SYSTEM_LIBWPD=NO BUILD_TYPE="$BUILD_TYPE LIBWPD" fi AC_SUBST(SYSTEM_LIBWPD) AC_SUBST(LIBWPD_CFLAGS) AC_SUBST(LIBWPD_LIBS) dnl =================================================================== dnl Check for system libxml dnl =================================================================== AC_MSG_CHECKING([which libxml to use]) if test -n "$with_system_libxml" -o -n "$with_system_libs" && \ test "$with_system_libxml" != "no"; then AC_MSG_RESULT([external]) SYSTEM_LIBXML=YES PKG_CHECK_MODULES( LIBXML, libxml-2.0 >= 2.0 ) BUILD_TYPE="$BUILD_TYPE LIBXMLSEC" else AC_MSG_RESULT([internal]) SYSTEM_LIBXML=NO BUILD_TYPE="$BUILD_TYPE LIBXML2 LIBXMLSEC" fi AC_SUBST(SYSTEM_LIBXML) AC_SUBST(LIBXML_CFLAGS) AC_SUBST(LIBXML_LIBS) dnl =================================================================== dnl Check for system python dnl =================================================================== AC_MSG_CHECKING([which python to use]) if test -n "$with_system_python"; then SYSTEM_PYTHON=YES AC_MSG_RESULT([external]) AM_PATH_PYTHON([2.2]) python_include=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('INCLUDEPY');"` python_version=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('VERSION');"` PYTHON_CFLAGS="-I$python_include" PYTHON_LIBS="-lpython$python_version" dnl check if the headers really work: save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS" AC_TRY_CPP(Python.h, , AC_MSG_ERROR([Python headers not found.])) CPPFLAGS="$save_CPPFLAGS" else SYSTEM_PYTHON=NO BUILD_TYPE="$BUILD_TYPE PYTHON" AC_MSG_RESULT([internal]) fi AC_SUBST(SYSTEM_PYTHON) AC_SUBST(PYTHON_CFLAGS) AC_SUBST(PYTHON_LIBS) dnl =================================================================== dnl Check for system berkley db dnl =================================================================== AC_MSG_CHECKING([which db to use]) if test -n "$with_system_db" -o -n "$with_system_libs" && \ test "$with_system_db" != "no"; then SYSTEM_DB=YES AC_MSG_RESULT([external]) AC_CHECK_HEADER(db.h, [ DB_INCLUDES=/usr/include ], [ CFLAGS=-I/usr/include/db4 AC_CHECK_HEADER(db4/db.h, [ DB_INCLUDES=/usr/include/db4 ], [ AC_MSG_ERROR(no. install the db4 libraries) ], []+ ) ], [] ) AC_MSG_CHECKING([whether db is at least 4.1]) # FIXME: Will db 4.3 work? Can't test it since the 4.3 java bindings are not packaged :/ for v in 1 2; do AC_TRY_RUN([ #include int main(int argc, char **argv) { if(DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == $v) return 0; else return 1; } ], [DB_VERSION_MINOR=$v], []) done if test "$DB_VERSION_MINOR" -gt "1"; then AC_MSG_RESULT([OK]) DB_VERSION=4.$DB_VERSION_MINOR else AC_MSG_RESULT([no. you need at least db 4.1]) fi # does not work :/ #AC_CHECK_LIB(db, db_create, [], # [AC_MSG_ERROR([db library not installed or functional])], []) AC_HAVE_LIBRARY(db, [], [AC_MSG_ERROR([db not installed or functional])], []) if test "$SOLAR_JAVA" = "TRUE"; then if test -z $DB_JAR; then # three different naming methods *grumble* Are there even more? AC_CHECK_FILE(/usr/share/java/db.jar, [ JARVER=0 ], [ AC_CHECK_FILE(/usr/share/java/db-$DB_VERSION.jar, [ JARVER=1 ], [ AC_CHECK_FILE(/usr/share/java/libdb$DB_VERSION-java.jar, [ JARVER_LONGSTYLE=1 ], [ AC_MSG_ERROR(db$DB_VERSION_MAJOR Java bindings not found)] ) ] ) ] ) if test "$JARVER" = "1"; then DB_JAR=/usr/share/java/jar-$DB_VERSION.jar else DB_JAR=/usr/share/java/db.jar fi if test "$JARVER_LONGSTYLE" = "1"; then DB_JAR=/usr/share/java/libdb$DB_VERSION-java.jar fi if test -z "$DB_JAR"; then AC_MSG_ERROR([libdb $DB_VERSION jar not found. Install it or specify path with --with-db-jar=/path/to/jar]) fi fi fi SCPDEFS="$SCPDEFS -DSYSTEM_DB" else AC_MSG_RESULT([internal]) SYSTEM_DB=NO fi AC_SUBST(SYSTEM_DB) AC_SUBST(DB_VERSION) AC_SUBST(DB_INCLUDES) AC_SUBST(DB_JAR) dnl =================================================================== dnl Check for system sablot dnl =================================================================== AC_MSG_CHECKING([which sablot to use]) if test -n "$with_system_sablot" -o -n "$with_system_libs" && \ test "$with_system_sablot" != "no"; then AC_MSG_RESULT([external]) SYSTEM_SABLOT=YES AC_PATH_PROG( SABLOTCONFIG, sablot-config) if test -z "$SABLOTCONFIG"; then AC_MSG_ERROR([install sablot to run this script]) fi SABLOT_LIBS=`$SABLOTCONFIG --libs` SABLOT_LIBS="-lsablot $SABLOT_LIBS" else AC_MSG_RESULT([internal]) SYSTEM_SABLOT=NO fi AC_SUBST(SYSTEM_SABLOT) AC_SUBST(SABLOT_LIBS) dnl =================================================================== dnl Check for system curl dnl =================================================================== AC_MSG_CHECKING([which curl to use]) if test -n "$with_system_curl" -o -n "$with_system_libs" && \ test "$with_system_curl" != "no"; then AC_MSG_RESULT([external]) SYSTEM_CURL=YES AC_PATH_PROG( CURLCONFIG, curl-config) if test -z "$CURLCONFIG"; then AC_MSG_ERROR([install curl to run this script]) fi # check curl version AC_MSG_CHECKING([whether curl is >= 7.9.8]) if test "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $1 }'`" -gt "7" -a \ "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $2 }'`" -gt "9" -a \ "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $3 }'`" -gt "8"; then AC_MSG_ERROR([no, you need at least curl 7.9,8]) else AC_MSG_RESULT([yes]) fi CURL_LIBS=`$CURLCONFIG --libs` CURL_CFLAGS=`$CURLCONFIG --cflags` else AC_MSG_RESULT([internal]) SYSTEM_CURL=NO BUILD_TYPE="$BUILD_TYPE CURL" fi AC_SUBST(SYSTEM_CURL) AC_SUBST(CURL_CFLAGS) AC_SUBST(CURL_LIBS) dnl =================================================================== dnl Check for system boost dnl =================================================================== AC_MSG_CHECKING([which boost to use]) if test -n "$with_system_boost" && test "$with_system_boost" != "no"; then AC_MSG_RESULT([external]) SYSTEM_BOOST=YES AC_CHECK_HEADER(boost/shared_ptr.hpp, [], [AC_MSG_ERROR(boost/shared_ptr.hpp not found. install boost)], []) AC_CHECK_HEADER(boost/spirit/core.hpp, [], [AC_MSG_ERROR(boost/spirit/core.hpp not found. install boost)], []) else AC_MSG_RESULT([internal]) SYSTEM_BOOST=NO fi AC_SUBST(SYSTEM_BOOST) dnl =================================================================== dnl Check for system odbc dnl =================================================================== AC_MSG_CHECKING([which odbc headers to use]) if test -n "$with_system_odbc_headers" && test "$with_system_odbc_headers" != "no"; then AC_MSG_RESULT([external]) SYSTEM_ODBC_HEADERS=YES AC_CHECK_HEADER(sqlext.h, [], [AC_MSG_ERROR(odbc not found. install odbc)], []) else AC_MSG_RESULT([internal]) SYSTEM_ODBC_HEADERS=NO BUILD_TYPE="$BUILD_TYPE UNIXODBC" fi AC_SUBST(SYSTEM_ODBC_HEADERS) AC_MSG_CHECKING([whether to enable build of Mozilla/Mozilla NSS-using components]) if test "$enable_mozilla" = "no"; then AC_MSG_RESULT([no]) WITH_MOZILLA=NO else AC_MSG_RESULT([yes]) WITH_MOZILLA=YES fi AC_SUBST(WITH_MOZILLA) AC_MSG_CHECKING([whether to build Mozilla addressbook connectivity]) if test "$enable_mozilla" = "no"; then AC_MSG_RESULT([no]) elif test -n "$with_system_mozilla"; then AC_MSG_RESULT([no, not possible with system-mozilla]) else AC_MSG_RESULT([yes]) fi AC_MSG_CHECKING([whether to build XML Security support]) if test "$enable_mozilla" = "no"; then AC_MSG_RESULT([no, since Mozilla (NSS) disabled but needed]) elif test "$with_system_mozilla" = "yes"; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([yes]) fi AC_MSG_CHECKING([whether to build LDAP configuration backend]) if test "$enable_mozilla" = "no" && test "$enable_openldap" != "yes"; then AC_MSG_RESULT([no. Either Mozilla or OpenLDAP needed.]) WITH_LDAP=NO elif test "$with_system_mozilla" = "yes" || test "$enable_openldap" = "yes"; then AC_MSG_RESULT([yes]) WITH_LDAP=YES else AC_MSG_RESULT([yes]) WITH_LDAP=YES fi if test "$WITH_LDAP" = "YES"; then dnl =================================================================== dnl Test whether we want to use the Mozilla or the OpenLDAP LDAP SDK dnl =================================================================== AC_MSG_CHECKING([which LDAP SDK to use]) if test -n "$enable_openldap"; then AC_MSG_RESULT([OpenLDAP]) WITH_OPENLDAP=YES AC_CHECK_HEADERS(ldap.h, [], [AC_MSG_ERROR(ldap.h not found. install openldap libs)], []) AC_CHECK_LIB(ldap, ldap_simple_bind_s, [], [AC_MSG_ERROR(openldap lib not found or functional)], []) # rumours say that OpenLDAP doesn't have that function. I looked and # it has it. Test for it to be sure AC_CHECK_LIB(ldap, ldap_set_option, [], [AC_MSG_ERROR(openldap lib not found or functional)], []) else AC_MSG_RESULT([Netscape/Mozilla]) # TODO. Actually do a sanity check and check for # LDAP_OPT_SIZELIMIT and LDAP_X_OPT_CONNECT_TIMEOUT WITH_OPENLDAP=NO fi fi AC_SUBST(WITH_OPENLDAP) dnl =================================================================== dnl Check for system mozilla dnl =================================================================== AC_MSG_CHECKING([which mozilla to use]) if test -n "$with_system_mozilla"; then AC_MSG_RESULT([external]) SYSTEM_MOZILLA=YES PKG_CHECK_MODULES( MOZILLAXPCOM, mozilla-xpcom ) PKG_CHECK_MODULES( MOZ_NSS, mozilla-nss ) save_CPPFLAGS="$CPPFLAGS" save_LDFLAGS="$LDFLAGS" save_LIBS="$LIBS" CPPFLAGS="$CPPFLAGS $MOZ_NSS_CFLAGS" LDFLAGS="$LDFLAGS $MOZ_NSS_LIBS" AC_CHECK_LIB(nss3, PK11_GetCertFromPrivateKey, [], [AC_MSG_ERROR(PK11_GetCertFromPrivateKey missing but needed. See https://bugzilla.mozilla.org/show_bug.cgi?id=262274. Fixed since nss 3.9.3 (contained by e.g. mozilla >= 1.7.5))], []) LDFLAGS="$save_LDFLAGS" CPPFLAGS="$save_CPPFLAGS" LIBS="$save_LIBS" MOZ_INC=`$PKG_CONFIG --variable=includedir mozilla-xpcom` MOZ_LIB=`$PKG_CONFIG --variable=libdir mozilla-xpcom` MOZ_LIB_XPCOM=$MOZILLAXPCOM_LIBS if test "$WITH_OPENLDAP" != "YES"; then MOZ_LDAP_CFLAGS="-I$MOZ_INC" fi elif test "$enable_mozilla" = "no"; then AC_MSG_RESULT([none]) WITH_MOZILLA=NO else AC_MSG_RESULT([internal]) SYSTEM_MOZILLA=NO BUILD_TYPE="$BUILD_TYPE MOZ" if test -z "$with_mozilla_version"; then MOZILLA_VERSION= else AC_MSG_CHECKING([which mozilla version to build]) MOZILLA_VERSION=$with_mozilla_version enable_build_mozilla=1 AC_MSG_RESULT([$MOZILLA_VERSION]) fi AC_SUBST(MOZILLA_VERSION) if test -z "$with_mozilla_toolkit"; then AC_MSG_CHECKING([for toolkit which mozilla should use]) if test "$_os" != "WINNT"; then MOZILLA_TOOLKIT=gtk2 AC_MSG_RESULT([gtk2]) fi else MOZILLA_TOOLKIT=$with_mozilla_toolkit enable_build_mozilla=1 AC_MSG_RESULT([$MOZILLA_TOOLKIT]) fi AC_SUBST(MOZILLA_TOOLKIT) AC_MSG_CHECKING([whether to build Mozilla]) if test -n "$enable_build_mozilla"; then BUILD_MOZAB="TRUE" AC_MSG_RESULT([yes]) else BUILD_MOZAB="" AC_MSG_RESULT([no]) fi if test "$BUILD_MOZAB" = "TRUE"; then if test -z "$MOZILLA_VERSION"; then MOZILLA_VERSION=1.7.5 fi if test "$MOZILLA_VERSION" = "1.7b" ; then MOZILLA_SOURCE_VERSION="mozilla-source-1.7b-source.tar.gz" else MOZILLA_SOURCE_VERSION="mozilla-source-${MOZILLA_VERSION}.tar.gz" fi AC_MSG_CHECKING([for $MOZILLA_SOURCE_VERSION]) if test ! -e "../moz/download/$MOZILLA_SOURCE_VERSION"; then AC_MSG_ERROR([Mozilla source archive not found. Please copy $MOZILLA_SOURCE_VERSION to moz/download/. The archive can be found here: http://ftp.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla$MOZILLA_VERSION/source/]) else AC_MSG_RESULT([found]) fi if test "$_os" = "WINNT"; then AC_MSG_CHECKING([for glib and libIDL binaries]) if test ! -e "../moz/download/vc71-glib-1.2.10-bin.zip" \ -o ! -e "../moz/download/vc71-libIDL-0.6.8-bin.zip" \ -o ! -e "../moz/download/wintools.zip" ; then AC_MSG_ERROR([One or more of the following archives is missing in moz/download/ vc71-glib-1.2.10-bin.zip vc71-libIDL-0.6.8-bin.zip (from ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/) wintools.zip (from http://ftp.mozilla.org/pub/mozilla.org/mozilla/source/wintools.zip)]) else AC_MSG_RESULT([ok]) fi elif test "$_os" = "Darwin"; then AC_MSG_WARN([Mozilla build environment for MacOSX not checked. Do it yourself or supply patches.]) else # Generic Unix/Linux section if test "$MOZILLA_TOOLKIT" = "gtk2"; then PKG_CHECK_MODULES(MOZLIBREQ, gtk+-2.0, MOZGTK="TRUE", MOZGTK="") if test -z "$MOZGTK"; then AC_MSG_ERROR([GTK2 is needed to build mozilla.]) fi PKG_CHECK_MODULES(MOZLIBREQ, libIDL-2.0 >= 0.8.0, MOZIDL="TRUE", MOZIDL="") if test -z "$MOZIDL"; then AC_MSG_ERROR([libIDL >= 0.8.0 is needed when using GTK2 to build mozilla.]) fi else PKG_CHECK_MODULES(MOZLIBREQ, gtk+ >= 1.2.3, MOZGTK="TRUE", MOZGTK="") if test -z "$MOZGTK"; then AC_MSG_ERROR([gtk 1.2 is needed when not using GTK2 to build mozilla.]) fi PKG_CHECK_MODULES(MOZLIBREQ, libidl >= 0.6.3 libidl <= 0.6.8, MOZIDL="TRUE", MOZIDL="") if test -z "$MOZIDL"; then AC_MSG_ERROR([libIDL 0.6.3 - 0.6.8 is needed when not using GTK2 to build mozilla.]) fi fi fi fi AC_SUBST(BUILD_MOZAB) fi AC_SUBST(SYSTEM_MOZILLA) AC_SUBST(MOZ_INC) AC_SUBST(MOZ_LIB) AC_SUBST(MOZ_LIB_XPCOM) AC_SUBST(MOZ_NSS_CFLAGS) AC_SUBST(MOZ_LDAP_CFLAGS) dnl =================================================================== dnl Check for system sane dnl =================================================================== AC_MSG_CHECKING([which sane header to use]) if test -n "$with_system_sane_header" && test "$with_system_sane_header" != "no"; then AC_MSG_RESULT([external]) SYSTEM_SANE_HEADER=YES AC_CHECK_HEADER(sane/sane.h, [], [AC_MSG_ERROR(sane not found. install sane)], []) else AC_MSG_RESULT([internal]) SYSTEM_SANE_HEADER=NO BUILD_TYPE="$BUILD_TYPE SANE" fi AC_SUBST(SYSTEM_SANE_HEADER) # DISABLED; INCOMPLETE dnl =================================================================== dnl Check for system icu dnl =================================================================== #AC_MSG_CHECKING([which icu to use]) #if test -n "$with_system_icu" -o -n "$with_system_libs" && \ # test "$with_system_icu" != "no"; then # AC_MSG_RESULT([external]) # SYSTEM_ICU=YES # AC_MSG_CHECKING([for unicode/rbbi.h]) # AC_TRY_CPP(unicode/rbbi.h, AC_MSG_RESULT([checked.]), AC_MSG_ERROR([icu headers not found.])) # AC_PATH_PROG(SYSTEM_GENBRK, genbrk) # if test -z "$SYSTEM_GENBRK"; then # AC_MSG_ERROR([\"genbrk\" not found in \$PATH, install the icu development tool \"genbrk"\]) # fi # AC_PATH_PROG(SYSTEM_GENCCODE, genccode) # if test -z "$SYSTEM_GENCCODE"; then # AC_MSG_ERROR([\"genccode\" not found in \$PATH, install the icu development tool \"genccode"\]) # fi #else # AC_MSG_RESULT([internal]) # SYSTEM_ICU=NO #fi #AC_SUBST(SYSTEM_ICU) #AC_SUBST(SYSTEM_GENBRK) #AC_SUBST(SYSTEM_GENCCODE) dnl =================================================================== dnl Checks for libraries. dnl =================================================================== dnl Check for Mac OS X native GUI, which may be used instead of X11. dnl Check for a lack of --with-x option on Darwin. If it is missing, look to dnl see if we have the AppKit framework for building with Quartz graphics. if test "$_os" = "Darwin" -a "x$with_x" != "xyes" -a "x$x_includes" = "xNONE" -a "x$x_libraries" = "xNONE"; then dnl System is either Mac OS X or pure Darwin, and --with-x was not specified dnl Default to Aqua graphics if available. AC_MSG_CHECKING([for /System/Library/Frameworks/AppKit.framework]) if test -d "/System/Library/Frameworks/AppKit.framework/"; then AC_MSG_RESULT([yes]) x_includes="no_x_includes" x_libraries="no_x_libraries" else AC_MSG_RESULT([no]) dnl Probably a pure Darwin system. Check for X11 below. fi fi dnl *************************************** dnl testing for X libraries and includes... dnl *************************************** if test "$_os" = "Darwin" -a "x$x_includes" = "xno_x_includes"; then echo "Do Nothing for _os = Darwin and x_includes = no_x_includes" dnl Mac OS X using Aqua graphics. Don't check for X11. : elif test "$_os" != "WINNT" ; then AC_PATH_X AC_PATH_XTRA CPPFLAGS="$CPPFLAGS $X_CFLAGS" AC_CHECK_HEADERS(X11/Xaw/Label.h,[],[AC_MSG_ERROR([Xaw include headers not found])]) if test "x$x_includes" = "x"; then x_includes="/usr/include" fi if test "x$x_libraries" = "x"; then x_libraries="/usr/lib" fi dnl The variables $x_libraries and $x_includes are set. if test -z "$x_libraries"; then AC_MSG_ERROR([No X libraries found]) # Exit fi if test -z "$x_includes"; then AC_MSG_ERROR([No X includes found]) # Exit fi CFLAGS=$X_CFLAGS LDFLAGS="$X_LDFLAGS $X_LIBS" AC_CHECK_LIB(X11, XOpenDisplay, x_libs="-lX11 $X_EXTRA_LIBS", [AC_MSG_ERROR([X Development libraries not found])]) else x_includes="no_x_includes" x_libraries="no_x_libraries" fi if test -z "$x_includes"; then x_includes="no_x_includes" fi if test -z "$x_libraries"; then x_libraries="no_x_libraries" fi XINC="$x_includes" AC_SUBST(XINC) XLIB="$x_libraries" AC_SUBST(XLIB) dnl =================================================================== dnl Check if fontconfig/fontconfig.h is available dnl =================================================================== if test "$ENABLE_FONTCONFIG" = "TRUE" ; then AC_CHECK_HEADER(fontconfig/fontconfig.h, [], [AC_MSG_ERROR([fontconfig/fontconfig.h could not be found. libfontconfig1-dev or fontconfig???-devel missing?])], []) AC_MSG_CHECKING([whether fontconfig is >= 2.2.0]) AC_TRY_RUN([ #include int main(int argc, char **argv) { if(FC_MAJOR > 2 || (FC_MAJOR == 2 && FC_MINOR >= 2)) return 0; else return 1; } ], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([no, fontconfig >= 2.2.0 needed])]) fi dnl =================================================================== dnl Check for system Xrender dnl =================================================================== AC_MSG_CHECKING([whether to link to Xrender]) if test -n "$enable_xrender_link"; then AC_MSG_RESULT([yes]) XRENDER_LINK=YES with_system_xrender_headers=yes else AC_MSG_RESULT([no, dynamically open it]) XRENDER_LINK=NO fi AC_MSG_CHECKING([which Xrender headers to use]) if test -n "$with_system_xrender_headers" && test "$with_system_xrender_headers" != "no"; then AC_MSG_RESULT([external]) SYSTEM_XRENDER_HEADERS=YES AC_CHECK_HEADER(X11/extensions/Xrender.h, [], [AC_MSG_ERROR(Xrender not found. install X)], []) else AC_MSG_RESULT([internal]) SYSTEM_XRENDER_HEADERS=NO BUILD_TYPE="$BUILD_TYPE X11_EXTENSIONS" fi if test "$XRENDER_LINK" = "YES"; then AC_CHECK_LIB(Xrender, XRenderQueryVersion, [], [AC_MSG_ERROR(libXrender not found or functional)], []) fi AC_SUBST(SYSTEM_XRENDER_HEADERS) AC_SUBST(XRENDER_LINK) dnl =================================================================== dnl Check for system nas dnl =================================================================== AC_MSG_CHECKING([which nas to use]) if test -n "$with_system_nas" -o -n "$with_system_libs" && \ test "$with_system_nas" != "no"; then AC_MSG_RESULT([external]) SYSTEM_NAS=YES AC_CHECK_HEADER(audio/audiolib.h, [ NAS_INCLUDES=/usr/include ], [ CFLAGS=-I/usr/X11R6/include AC_CHECK_HEADER(audio/audiolib.h, [ NAS_INCLUDES=/usr/X11R6/include ], [ AC_MSG_ERROR(no. install nas) ], [] ) ], [] ) AC_CHECK_LIB(audio, AuOpenServer, [], [AC_MSG_ERROR(nas not found or functional)], [-L$XLIB -lXt]) else AC_MSG_RESULT([internal]) SYSTEM_NAS=NO BUILD_TYPE="$BUILD_TYPE NAS" fi AC_SUBST(SYSTEM_NAS) AC_SUBST(NAS_INCLUDES) AC_MSG_CHECKING([whether to enable portaudio/sndfile support]) if test "$_os" != "WINNT" && \ test -n "$enable_pasf" && test "$enable_pasf" != "no"; then AC_MSG_RESULT([yes]) ENABLE_PASF=YES AC_MSG_CHECKING([which sndfile to use]) if test -n "$with_system_sndfile" -o -n "$with_system_libs" && \ test "$with_system_sndfile" != "no"; then AC_MSG_RESULT([external]) AC_CHECK_HEADER(sndfile.h, [], [AC_MSG_ERROR(sndfile header not found. install sndfile)], []) AC_CHECK_LIB(sndfile, sf_open, [], [AC_MSG_ERROR(sndfile library not found or functional)], []) SYSTEM_SNDFILE=YES else AC_MSG_RESULT([internal]) SYSTEM_SNDFILE=NO BUILD_TYPE="$BUILD_TYPE SNDFILE" fi AC_MSG_CHECKING([which portaudio to use]) if test -n "$with_system_portaudio" -o -n "$with_system_libs" && \ test "$with_system_portaudio" != "no"; then AC_MSG_RESULT(external) AC_CHECK_HEADER(portaudio.h, [], [AC_MSG_ERROR(portaudio header not found. install portaudio)], []) AC_CHECK_LIB(portaudio, Pa_Initialize, [], [AC_MSG_ERROR(portaudio library not found or functional)], []) AC_MSG_CHECKING(portaudio version) AC_LANG(C) AC_TRY_LINK([#include ], [ void main(int argc, char **argv) { /* Pa_GetVersion() only exists in v19, so this fails to build with v18 */ int v = Pa_GetVersion(); } ], [AC_MSG_ERROR([portaudio too new. you need v18])], [AC_MSG_RESULT([OK, v18])]) else AC_MSG_RESULT([internal]) SYSTEM_PORTAUDIO=NO BUILD_TYPE="$BUILD_TYPE PORTAUDIO" fi else AC_MSG_RESULT([no]) fi AC_SUBST(ENABLE_PASF) AC_SUBST(SYSTEM_PORTAUDIO) AC_SUBST(SYSTEM_SNDFILE) AC_SUBST(BUILD_TYPE) dnl =================================================================== dnl Check for system neon dnl =================================================================== AC_MSG_CHECKING([which neon to use]) if test -n "$with_system_neon" -o -n "$with_system_libs" && \ test "$with_system_neon" != "no"; then AC_MSG_RESULT([external]) PKG_CHECK_MODULES(NEON, neon >= 0.24.0) NEON_CFLAGS="$NEON_CFLAGS -DSYSTEM_NEON -DUSE_DAV_LOCKS=1" SYSTEM_NEON=YES else AC_MSG_RESULT([internal]) SYSTEM_NEON=NO NEON_LIBS=-lneon NEON_CFLAGS= BUILD_TYPE="$BUILD_TYPE NEON" fi AC_SUBST(SYSTEM_NEON) AC_SUBST(NEON_LIBS) AC_SUBST(NEON_CFLAGS) dnl =================================================================== dnl Check for system myspell dnl =================================================================== AC_MSG_CHECKING([which myspell to use]) if test -n "$with_system_myspell" && test "$with_system_myspell" != "no"; then AC_MSG_RESULT([external]) SYSTEM_MYSPELL=YES PKG_CHECK_MODULES( MYSPELL, myspell, [ MYSPELL_PKGCONFIG=YES ], [ AC_CHECK_HEADER(myspell/myspell.hxx, [], [AC_MSG_ERROR(myspell headers not found.)], []) MYSPELL_CFLAGS=-I/usr/include/myspell AC_LANG(C++) AC_CHECK_LIB(myspell, main, [], [ AC_MSG_ERROR(myspell library not found.) ], []) MYSPELL_LIBS=-lmyspell ] ) else AC_MSG_RESULT([internal]) SYSTEM_MYSPELL=NO MYSPELL_LIBS=-lmyspell fi AC_SUBST(SYSTEM_MYSPELL) AC_SUBST(MYSPELL_CFLAGS) AC_SUBST(MYSPELL_LIBS) dnl =================================================================== dnl Checking for altlinuxhyph dnl =================================================================== AC_MSG_CHECKING([which altlinuxhyph to use]) if test -n "$with_system_altlinuxhyph" && test "$with_system_altlinuxyph" != "no"; then AC_MSG_RESULT([external]) SYSTEM_HYPH=YES AC_CHECK_HEADER(hyphen.h, [], [ AC_MSG_ERROR(altlinuxhyph headers not found.)], []) AC_CHECK_MEMBER(struct _HyphenDict.cset, [], [ AC_MSG_ERROR(no. You are sure you have altlinuyhyph headers?)], [#include ]) AC_CHECK_LIB(hyph, hnj_hyphen_hyphenate, [], [ AC_MSG_ERROR(altlinuxhyph library not found.)], []) else AC_MSG_RESULT([internal]) SYSTEM_HYPH=NO fi AC_SUBST(SYSTEM_HYPH) dnl =================================================================== dnl Checking for mythes dnl =================================================================== AC_MSG_CHECKING([which mythes to use]) if test -n "$with_system_mythes" && test "$with_system_mythes" != "no"; then AC_MSG_RESULT([external]) SYSTEM_MYTHES=YES AC_CHECK_HEADER(mythes.hxx, [], [ AC_MSG_ERROR(mythes.hxx headers not found.)], []) AC_CHECK_LIB(mythes, main, [], [ AC_MSG_ERROR(mythes library not found.)], []) else AC_MSG_RESULT([internal]) SYSTEM_MYTHES=NO fi AC_SUBST(SYSTEM_MYTHES) dnl *************************************** dnl testing libc version for Linux... dnl *************************************** if test "$_os" = "Linux"; then AC_MSG_CHECKING([whether libc is >= 2.1.1]) exec 6>/dev/null # no output AC_CHECK_LIB(c, gnu_get_libc_version, HAVE_LIBC=yes; export HAVE_LIBC) exec 6>&1 # output on again if test "$HAVE_LIBC"; then AC_MSG_RESULT([yes]) else AC_MSG_ERROR([no, upgrade libc]) fi fi dnl ========================================= dnl Check for the Microsoft Platform SDK. dnl ========================================= dnl FIXME: I don't know yet if PSDK works with MinGW, keep it until I know better, dnl and add "-a \( "$WITH_MINGWIN" != "yes" \)" then if test \( "$_os" = "WINNT" \) ; then AC_MSG_CHECKING([for PSDK files]) if test -z "$with_psdk_home"; then # This line will work with cygwin 1.3.? and newer, for older versions # cat will output nothing, therefore PSDK_HOME will be empty. PSDK_HOME=`cat "/proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/MicrosoftSDK/Directories/Install Dir"` else PSDK_HOME="$with_psdk_home" fi if test \( -f "$PSDK_HOME/Include/AdoCtint.h" \) \ -a \( -f "$PSDK_HOME/Include/SqlUcode.h" \) \ -a \( -f "$PSDK_HOME/Include/usp10.h" \); then HAVE_PSDK_H="yes" else HAVE_PSDK_H="no" fi if test -f "$PSDK_HOME/lib/unicows.lib"; then HAVE_PSDK_LIB="yes" else HAVE_PSDK_LIB="no" fi if test "$HAVE_PSDK_H" = "no" -o "$HAVE_PSDK_LIB" = "no"; then AC_MSG_ERROR([Some (all?) PSDK files not found, please check if all needed Platform SDKs are installed or use --with-psdk-home .]) fi if test ! -x "$PSDK_HOME/bin/msiinfo.exe" \ -o ! -x "$PSDK_HOME/bin/msidb.exe" \ -o ! -x "$PSDK_HOME/bin/uuidgen.exe" \ -o ! -x "$PSDK_HOME/bin/msitran.exe" ; then AC_MSG_ERROR([Some (all) files of the Windows Installer SDK are missing, please install.]) fi AC_MSG_RESULT([PSDK files found]) fi AC_SUBST(PSDK_HOME) dnl ========================================= dnl Check for the Microsoft DirectX SDK. dnl ========================================= if test \( "$_os" = "WINNT" \) ; then AC_MSG_CHECKING([for DirectX SDK files]) if test -z "$with_directx_home"; then dnl Lets hope MS keeps the habit of supplying this key even when doc is not installed DIRECTXSDK_HOME=`cat /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/DirectX\ SDK/*\ Doc\ Path` DIRECTXSDK_HOME=`echo "$DIRECTXSDK_HOME" | sed "s@\\\\\\\\[[^\\]]*\\\\\\\\[[^\\]]*\\\$@@"` DIRECTXSDK_HOME=`cygpath -d "$DIRECTXSDK_HOME"` DIRECTXSDK_HOME=`cygpath -u "$DIRECTXSDK_HOME"` else DIRECTXSDK_HOME="$with_directx_home" fi if test -f "$DIRECTXSDK_HOME/Include/strmif.h" ; then HAVE_DIRECTXSDK_H="yes" else HAVE_DIRECTXSDK_H="no" fi # MS changed the location of the libraries with dec 2004 directx sdk if test -d "$DIRECTXSDK_HOME/lib/x86" ; then DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib/x86" else DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib" fi if test -f "$DIRECTXSDK_LIB/strmiids.lib" ; then HAVE_DIRECTXSDK_LIB="yes" else HAVE_DIRECTXSDK_LIB="no" fi if test -n "$ENABLE_DIRECTX"; then if test "$HAVE_DIRECTXSDK_H" = "yes" -a "$HAVE_DIRECTXSDK_LIB" = "yes"; then AC_MSG_RESULT([found]) else AC_MSG_ERROR([DirectX SDK files not found, please use --with-directx-home or -disable-directx.]) fi else DIRECTXSDK_HOME="" AC_MSG_RESULT([disabled]) fi fi AC_SUBST(DIRECTXSDK_HOME) AC_SUBST(DIRECTXSDK_LIB) dnl ============================================ dnl Check for Nullsoft Scriptable Install System dnl ============================================ NSIS_PATH="" if test "$_os" = "WINNT" ; then AC_MSG_CHECKING([for NSIS]) AC_PATH_PROG(NSIS_PATH, nsis.exe) if test -n "$NSIS_PATH"; then NSIS_PATH=`dirname "$NSIS_PATH"` fi if test -e "$with_nsis_path/nsis.exe"; then NSIS_PATH="$with_nsis_path" fi if test -z "$NSIS_PATH"; then AC_MSG_WARN([NSIS not found, no self contained installer will be build.]) echo "NSIS not found, no self contained installer will be build." >> warn else NSIS_PATH=`cygpath -d "$NSIS_PATH"` NSIS_PATH=`cygpath -u "$NSIS_PATH"` AC_MSG_RESULT([found ($NSIS_PATH)]) fi fi AC_SUBST(NSIS_PATH) dnl ============================================ dnl Check for extra include/library files dnl needed for MS Visual Toolkit compiler build. dnl ============================================ if test "$_os" = "WINNT" -a -n "$with_extra_dotnet_files" ; then AC_MSG_CHECKING([extra .net include/library files]) if test -d "$with_extra_dotnet_files"; then AC_MSG_RESULT([directory found]) EXTRA_DOTNET_FILES="$with_extra_dotnet_files" else AC_MSG_ERROR([invalid directory, please check.]) fi else EXTRA_DOTNET_FILES="" fi AC_SUBST(EXTRA_DOTNET_FILES) dnl *************************************** dnl testing bison and flex exist dnl *************************************** AC_PATH_PROG(BISON, bison) if test -z "$BISON"; then AC_MSG_ERROR([no bison found in \$PATH, install bison]) else AC_MSG_CHECKING([the bison version]) _bison_version=`$BISON --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`; _bison_longver=`echo $_bison_version | $AWK -F. '{ print \$1*1000+\$2}'` # Accept newer than 1.875 or older(equal) than 1.75 if test "$_bison_longver" -ge 1875 -o "$_bison_longver" -le 1075; then if test "$_bison_version" = "1.875" ; then AC_MSG_WARN([suspect ($BISON $_bison_version)]) echo "Suspect ($BISON $_bison_version) suggest upgrade" >> warn else AC_MSG_RESULT([checked ($BISON $_bison_version)]) fi else AC_MSG_ERROR([failed ($BISON $_bison_version need 1.875+ (or 1.75 and older))]) fi fi AC_PATH_PROG(FLEX, flex) if test -z "$FLEX"; then 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_ERROR([\"patch\" not found in \$PATH, install the development tool named\"patch"\]) fi dnl On Solaris, FreeBSD or MacOS X, check if --with-gnu-patch was used if test "$_os" = "SunOS" -o "$_os" = "FreeBSD" -o "$_os" = "Darwin"; then if test -z "$with_gnu_patch"; then GNUPATCH=$PATCH else if test -x "$with_gnu_patch"; then GNUPATCH=$with_gnu_patch else AC_MSG_ERROR([--with-gnu-patch did not point to an executable]) fi fi AC_MSG_CHECKING([whether $GNUPATCH is GNU patch]) if $GNUPATCH --version | grep "Free Software Foundation" >/dev/null 2>/dev/null; then AC_MSG_RESULT([yes]) else AC_MSG_ERROR([no, GNU patch needed. install or specify with --with-gnu-patch=/path/to/it]) fi dnl We also need to check for --with-gnu-cp if test -z "$with_gnu_cp"; then GNUCP=gnucp else if test -x "$with_gnu_cp"; then GNUCP=$with_gnu_cp else AC_MSG_ERROR([--with-gnu-cp did not point to an executable]) fi fi AC_MSG_CHECKING([whether $GNUCP is GNU cp]) if $GNUCP --version | grep "Free Software Foundation" >/dev/null 2>/dev/null; then AC_MSG_RESULT([yes]) else AC_MSG_ERROR([no, GNU cp needed. install or specify with --with-gnu-cp=/path/to/it]) fi fi AC_SUBST(GNUPATCH) AC_SUBST(GNUCP) dnl *************************************** dnl testing bash tools path on Windows dnl *************************************** if test "$_os" = "WINNT"; then CYGWIN_PATH="" AC_PATH_PROG(CYGWIN_PATH, bash) CYGWIN_PATH=`dirname "$CYGWIN_PATH"` fi if test -z "$CYGWIN_PATH"; then CYGWIN_PATH="NO_CYGWIN" fi AC_SUBST(CYGWIN_PATH) dnl *************************************** dnl testing ml.exe assembler path dnl *************************************** if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then AC_MSG_CHECKING([ml.exe assembler path]) if test ! -x "$with_asm_home/ml.exe"; then AC_PATH_PROG(ML_EXE, ml.exe) if test -z "$ML_EXE"; then if test -x "$with_cl_home/bin/ml.exe"; then with_asm_home=$with_cl_home/bin else AC_MSG_ERROR([Configure did not find ml.exe assembler.]) fi else with_asm_home="ASM_IN_PATH" fi fi else with_asm_home="NO_ASM_HOME" fi ASM_HOME="$with_asm_home" if test -z "$ASM_HOME"; then AC_MSG_RESULT([$ASM_HOME]) fi AC_SUBST(ASM_HOME) dnl =================================================================== dnl testing handle deprecated unzip switch dnl =================================================================== if test -z "$with_zip_home"; then with_zip_home="$with_unzip_home" fi dnl =================================================================== dnl Zip will be found where you tell me to find it dnl =================================================================== if test -n "$with_zip_home" ; then ZIP="$with_zip_home/zip" ZIP_HOME="$with_zip_home" else AC_PATH_PROG(ZIP, zip) ZIP_HOME=`dirname "$ZIP"` fi dnl =================================================================== dnl Zip must be available or else it is an error, all platforms dnl =================================================================== if test -z "$ZIP"; then AC_MSG_ERROR([Zip is required to build, please install or use --with-zip-home],,) fi dnl =================================================================== dnl Zip must be a specific type for different build types. dnl =================================================================== if test "$_os" = "WINNT"; then if test "$with_use_shell" = "4nt" ; then if test -z "`$ZIP -h | grep -i WinNT`" ; then AC_MSG_ERROR([$ZIP found in the path is not the required native Windows Version 2.3 of Info-ZIPs zip.exe. Probably there is a cygwin version in the path.]) fi else if test -n "`$ZIP -h | grep -i WinNT`" ; then AC_MSG_ERROR([$ZIP found in the path is not the required cygwin version of Info-ZIPs zip.exe.]) fi fi fi AC_SUBST(ZIP_HOME) dnl =================================================================== dnl Windows builds need unicows.dll in external/unicows/ dnl =================================================================== if test "$_os" = "WINNT"; then AC_MSG_CHECKING([for unicows.dll]) if test -x ../external/unicows/unicows.dll; then AC_MSG_RESULT([found]) else AC_MSG_ERROR([The Microsoft Layer for Unicode (unicows.dll) is missing in external/unicows/. Get it from the Microsoft site and put it into external/unicows. (Note: Microsoft seems to enjoy changing the exact location of this file. You may have to search Microsoft's website.) Last time it was seen at: .]) fi fi dnl =================================================================== dnl Windows builds need dbghelp.dll in external/dbghelp/ dnl =================================================================== if test "$_os" = "WINNT"; then AC_MSG_CHECKING([for dbghelp.dll]) if test -x ../external/dbghelp/dbghelp.dll; then AC_MSG_RESULT([found]) else AC_MSG_ERROR([dbghelp.dll is missing in external/dbghelp/. Get it from the Microsoft site and put it into external/dbghelp. (Note: Microsoft seems to enjoy changing the exact location of this file. You may have to search Microsoft's website.) Last time it was seen at: .]) fi fi dnl =================================================================== dnl Windows builds with .NET need msvcp70.dll/msvcr70.dll in external/msvcp70/ dnl =================================================================== if test "$_os" = "WINNT" -a "$COMEX" = "8"; then AC_MSG_CHECKING([for msvcp70.dll/msvcr70.dll]) if test -x ../external/msvcp70/msvcp70.dll -a -x ../external/msvcp70/msvcr70.dll; then AC_MSG_RESULT([found]) else MSVCPPATH=`/bin/find "$COMPATH/../.." -iname msvcp70.dll | head -n 1` MSVCRPATH=`/bin/find "$COMPATH/../.." -iname msvcr70.dll | head -n 1` if test -n "$MSVCPPATH" -a -n "$MSVCRPATH"; then cp "$MSVCPPATH" ../external/msvcp70/ && chmod +x ../external/msvcp70/msvcp70.dll && MSVCPCOPY="OK" cp "$MSVCRPATH" ../external/msvcp70/ && chmod +x ../external/msvcp70/msvcr70.dll && MSVCRCOPY="OK" fi if test -z "$MSVCPCOPY" -o -z "$MSVCRCOPY"; then AC_MSG_ERROR([msvcp70.dll and/or msvcr70.dll are/is missing in the default location. These dlls are part of the .NET installation and should be found in a directory similar to: "c:\\Program Files\\Microsoft Visual Studio .NET\\Visual C++ .NET Professional - English\\" As the automatic detection fails please copy the files to external/msvcp70/.]) else AC_MSG_RESULT([found and copied]) fi fi fi dnl =================================================================== dnl Windows builds with .NET 2003 needs msvcp71.dll/msvcr71.dll in external/msvcp71 dnl =================================================================== if test "$_os" = "WINNT" -a "$COMEX" = "10"; then AC_MSG_CHECKING([for msvcp71.dll/msvcr71.dll]) if test -x ../external/msvcp71/msvcp71.dll -a -x ../external/msvcp71/msvcr71.dll; then AC_MSG_RESULT([found]) else MSVCPPATH=`/bin/find "$COMPATH/../.." -iname msvcp71.dll | head -n 1` MSVCRPATH=`/bin/find "$COMPATH/../.." -iname msvcr71.dll | head -n 1` if test -n "$MSVCPPATH" -a -n "$MSVCRPATH"; then cp "$MSVCPPATH" ../external/msvcp71/ && chmod +x ../external/msvcp71/msvcp71.dll && MSVCPCOPY="OK" cp "$MSVCRPATH" ../external/msvcp71/ && chmod +x ../external/msvcp71/msvcr71.dll && MSVCRCOPY="OK" fi if test -z "$MSVCPCOPY" -o -z "$MSVCRCOPY"; then AC_MSG_ERROR([msvcp71.dll and/or msvcr71.dll are/is missing in the default location. These dlls are part of the .NET installation and should be found in a directory similar to: "c:\\Program Files\\Microsoft Visual Studio .NET 2003\\Visual C++ .NET Professional - English\\" As the automatic detection fails please copy the files to external/msvcp71/.]) else AC_MSG_RESULT([found and copied]) fi fi fi dnl =================================================================== dnl Windows builds with .NET 2003 need instmsia.exe and instmsiw.exe in external/msi dnl =================================================================== if test "$_os" = "WINNT" -a "$COMEX" = "10"; then AC_MSG_CHECKING([for instmsia.exe/instmsiw.exe]) if test -x ../external/msi/instmsia.exe -a -x ../external/msi/instmsiw.exe; then AC_MSG_RESULT([found]) else MSIAPATH=`/bin/find "$COMPATH/../.." -iname instmsia.exe | head -n 1` MSIWPATH=`/bin/find "$COMPATH/../.." -iname instmsiw.exe | head -n 1` if test -n "$MSIAPATH" -a -n "$MSIWPATH"; then cp "$MSIAPATH" ../external/msi/ && chmod +x ../external/msi/instmsia.exe && MSIACOPY="OK" cp "$MSIWPATH" ../external/msi/ && chmod +x ../external/msi/instmsiw.exe && MSIWCOPY="OK" fi if test -z "$MSIACOPY" -o -z "$MSIWCOPY"; then AC_MSG_ERROR([instmsia.exe and/or instmsiw.exe are/is missing in the default location. These programs are part of the .NET installation and should be found in a directory similar to: "c:\\Program Files\\Microsoft Visual Studio .NET 2003\\Common7\\Tools\\Deployment\\MsiRedist\\" As the automatic detection fails please copy the files to external/msi/.]) else AC_MSG_RESULT([found and copied]) fi fi fi dnl =================================================================== dnl Test for the presence of the right polygon clipping code dnl =================================================================== AC_MSG_CHECKING([which polygon clipping code to use]) WITH_GPC=NO WITH_LIBART=NO if test -n "$enable_libart" && test "$enable_libart" != "no"; then AC_MSG_RESULT([libart]) PKG_CHECK_MODULES( LIBART, libart-2.0 >= 2.3.13 ) WITH_LIBART=YES elif test "$with_gpc" != "no" && test "$without_gpc" != "yes"; then WITH_GPC=YES AC_MSG_RESULT([GPC]) AC_MSG_CHECKING([for GPC files]) if test -f ../external/gpc/gpc.h; then HAVE_GPC_H="yes" else HAVE_GPC_H="no" fi if test -f ../external/gpc/gpc.c; then HAVE_GPC_C="yes" else HAVE_GPC_C="no" fi if test "$HAVE_GPC_H" = "yes" -a "$HAVE_GPC_C" = "yes"; then AC_MSG_RESULT([GPC files found]) else AC_MSG_ERROR([GPC files not found ftp://ftp.cs.man.ac.uk/pub/toby/gpc/gpc231.tar.Z and untar in external/gpc, or install libart and use --enable-libart]) fi else AC_MSG_RESULT([internal]) fi AC_SUBST(WITH_LIBART) AC_SUBST(LIBART_CFLAGS) AC_SUBST(LIBART_LIBS) AC_SUBST(WITH_GPC) dnl =================================================================== dnl Test which vclplugs have to be built. dnl =================================================================== AC_MSG_CHECKING([which VCLplugs shall be built]) ENABLE_GTK="" if test "x$enable_gtk" = "xyes"; then ENABLE_GTK="TRUE" R="gtk" fi AC_SUBST(ENABLE_GTK) ENABLE_KDE="" if test "x$enable_kde" = "xyes"; then ENABLE_KDE="TRUE" R="$R kde" fi AC_SUBST(ENABLE_KDE) if test -z "$R"; then AC_MSG_RESULT([none]) else AC_MSG_RESULT([$R]) fi dnl =================================================================== dnl Gnome VFS check dnl =================================================================== ENABLE_GNOMEVFS="" AC_MSG_CHECKING([whether to enable GNOME VFS support]) if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gnome_vfs" = "yes"; then ENABLE_GNOMEVFS="TRUE" AC_MSG_RESULT([yes]) PKG_CHECK_MODULES( GNOMEVFS, gnome-vfs-2.0 >= 2.6.0 ) PKG_CHECK_MODULES( GCONF, gconf-2.0 ) else AC_MSG_RESULT([no]) fi AC_SUBST(ENABLE_GNOMEVFS) dnl =================================================================== dnl Check whether the gtk 2.0 libraries are available. dnl =================================================================== GTK_CFLAGS="" GTK_LIBS="" if test "$test_gtk" = "yes"; then if test "$ENABLE_GTK" = "TRUE" ; then PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.2) PKG_CHECK_MODULES(GDKPIXBUF, gdk-pixbuf-xlib-2.0 >= 2.2) GTK_CFLAGS="$GTK_CFLAGS $GDKPIXBUF_CFLAGS" GTK_LIBS="$GTK_LIBS $GDKPIXBUF_LIBS" fi fi AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_LIBS) dnl =================================================================== dnl Check whether the Qt and KDE libraries are available. dnl =================================================================== KDE_CFLAGS="" KDE_LIBS="" MOC="moc" if test "$test_kde" = "yes" -a "$ENABLE_KDE" = "TRUE" ; then dnl Search paths for Qt and KDE qt_incdirs="$QTINC /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/lib/qt3/include /usr/lib/qt/include /usr/share/qt3/include $x_includes" qt_libdirs="$QTLIB /usr/local/qt/lib /usr/lib/qt /usr/lib /usr/X11R6/lib/X11/qt /usr/X11R6/lib/qt /usr/lib/qt3/lib /usr/lib/qt/lib /usr/share/qt3/lib $x_libraries" if test -n "$QTDIR" ; then qt_incdirs="$QTDIR/include $qt_incdirs" qt_libdirs="$QTDIR/lib $qt_libdirs" fi kde_incdirs="/usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes" kde_libdirs="/usr/lib/kde/lib /usr/local/kde/lib /usr/kde/lib /usr/lib/kde /usr/lib/kde3 /usr/lib /usr/X11R6/lib /usr/local/lib /opt/kde3/lib /opt/kde/lib /usr/X11R6/kde/lib $x_libraries" if test -n "$KDEDIR" ; then kde_incdirs="$KDEDIR/include $kde_incdirs" kde_libdirs="$KDEDIR/lib $kde_libdirs" fi dnl What to test qt_test_include="qstyle.h" qt_test_library="libqt-mt.so" kde_test_include="ksharedptr.h" kde_test_library="libkdeui.la" dnl Check for Qt headers AC_MSG_CHECKING([for Qt headers]) qt_incdir="no" for kde_check in $qt_incdirs ; do if test -r "$kde_check/$qt_test_include" ; then qt_incdir="$kde_check" break fi done AC_MSG_RESULT([$qt_incdir]) if test "x$qt_incdir" = "xno" ; then AC_MSG_ERROR([Qt headers not found. Please specify the root of your Qt installation by exporting QTDIR before running "configure".]) fi dnl Check for Qt libraries AC_MSG_CHECKING([for Qt libraries]) qt_libdir="no" for qt_check in $qt_libdirs ; do if test -r "$qt_check/$qt_test_library" ; then qt_libdir="$qt_check" break fi done AC_MSG_RESULT([$qt_libdir]) if test "x$qt_libdir" = "xno" ; then AC_MSG_ERROR([Qt libraries not found. Please specify the root of your Qt installation by exporting QTDIR before running "configure".]) fi AC_PATH_PROG( MOC, moc, no, [$QTDIR/bin:$PATH] ) if test "$MOC" = "no" ; then AC_MSG_ERROR([Qt Meta Object Compiler not found. Please specify the root of your Qt installation by exporting QTDIR before running "configure".]) fi dnl Check for KDE headers AC_MSG_CHECKING([for KDE headers]) kde_incdir="no" for kde_check in $kde_incdirs ; do if test -r "$kde_check/$kde_test_include" ; then kde_incdir="$kde_check" break fi done AC_MSG_RESULT([$kde_incdir]) if test "x$kde_incdir" = "xno" ; then AC_MSG_ERROR([KDE headers not found. Please specify the root of your KDE installation by exporting KDEDIR before running "configure".]) fi dnl Check for KDE libraries AC_MSG_CHECKING([for KDE libraries]) kde_libdir="no" for kde_check in $kde_libdirs ; do if test -r "$kde_check/$kde_test_library" ; then kde_libdir="$kde_check" break fi done AC_MSG_RESULT([$kde_libdir]) if test "x$kde_libdir" = "xno" ; then AC_MSG_ERROR([KDE libraries not found. Please specify the root of your KDE installation by exporting KDEDIR before running "configure".]) fi dnl Set the variables KDE_CFLAGS="-I$qt_incdir -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_NO_EMIT -DQT_THREAD_SUPPORT" KDE_LIBS="-L$kde_libdir -L$qt_libdir -lkdeui -lkdecore -lqt-mt" fi AC_SUBST(KDE_CFLAGS) AC_SUBST(KDE_LIBS) AC_SUBST(MOC) dnl =================================================================== dnl Test for the presence of libstartup-notification dnl =================================================================== AC_MSG_CHECKING([whether to use libstartup-notification]) WITH_LIBSN=NO if test -n "$enable_libsn" && test "$enable_libsn" != "no"; then PKG_CHECK_MODULES( LIBSN, libstartup-notification-1.0 >= 0.5 ) WITH_LIBSN=YES AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi AC_SUBST(WITH_LIBSN) AC_SUBST(LIBSN_CFLAGS) AC_SUBST(LIBSN_LIBS) dnl =================================================================== dnl Test whether to include Evolution 2 support dnl =================================================================== AC_MSG_CHECKING([whether to enable evolution 2 support]) if test "$enable_evolution2" = "yes" -o "$enable_evolution2" = "TRUE"; then AC_MSG_RESULT([yes]) PKG_CHECK_MODULES(GOBJECT, gobject-2.0) ENABLE_EVOAB2="TRUE" else ENABLE_EVOAB2="" AC_MSG_RESULT([no]) fi AC_SUBST(ENABLE_EVOAB2) AC_SUBST(GOBJECT_CFLAGS) AC_SUBST(GOBJECT_LIBS) dnl =================================================================== dnl Test whether to include FontOOo dnl =================================================================== AC_MSG_CHECKING([whether to include FontOOo]) if test -n "$enable_fontooo"; then if test "$enable_fontooo" = "no"; then AC_MSG_RESULT([no]) WITH_FONTOOO=NO SCPDEFS="$SCPDEFS -DWITHOUT_FONTOOO" else AC_MSG_RESULT([yes]) WITH_FONTOOO=YES fi else AC_MSG_RESULT([no]) WITH_FONTOOO=NO SCPDEFS="$SCPDEFS -DWITHOUT_FONTOOO" fi AC_SUBST(WITH_FONTOOO) if test "$WITH_FONTOOO" = "YES"; then dnl =============================================================== dnl Check whether to use libmspack from system dnl =============================================================== AC_MSG_CHECKING([whether to use system libmspack]) if test -n "$with_system_mspack" -o -n "$with_system_libs" && \ test "$with_system_mspack" != "no"; then AC_MSG_RESULT([yes]) SYSTEM_MSPACK=YES AC_CHECK_HEADER(mspack.h, [], [AC_MSG_ERROR([mspack.h not found, install libmspack])], []) AC_CHECK_LIB(mspack, mspack_create_cab_decompressor, [], [AC_MSG_ERROR(libmspack not installed or functional)], []) else AC_MSG_RESULT([no]) SYSTEM_MSPACK=NO fi fi AC_SUBST(SYSTEM_MSPACK) dnl =================================================================== dnl Test whether to include fonts dnl =================================================================== AC_MSG_CHECKING([whether to include Bitstream Vera fonts]) if test "$with_fonts" != "no" ; then AC_MSG_RESULT([yes]) WITH_FONTS=YES BUILD_TYPE="$BUILD_TYPE BITSTREAM_VERA_FONTS" else AC_MSG_RESULT([no]) WITH_FONTS=NO SCPDEFS="$SCPDEFS -DWITHOUT_FONTS" fi AC_SUBST(WITH_FONTS) AC_SUBST(SCPDEFS) AC_MSG_CHECKING([whether and how to use Xinerama]) if test "$_os" = "Darwin"; then USE_XINERAMA=YES XINERAMA_LINK=dynamic AC_MSG_RESULT([yes]) elif test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then if test -e "$XLIB/libXinerama.so" -a -e "$XLIB/libXinerama.a"; then # we have both versions, let the user decide but use the static one # per default USE_XINERAMA=YES if test -n "$with_dynamic_xinerama" -o -n "$with_system_libs"; then XINERAMA_LINK=dynamic else XINERAMA_LINK=static fi elif test -e "$XLIB/libXinerama.so" -a ! -e "XLIB/libXinerama.a"; then # we have only the dynamic version USE_XINERAMA=YES XINERAMA_LINK=dynamic elif test -e "$XLIB/libXinerama.a"; then # static version if echo $build_cpu | grep -E 'i[[3456]]86' 2>/dev/null >/dev/null; then USE_XINERAMA=YES XINERAMA_LINK=static else USE_XINERAMA=NO XINERAMA_LINK=none fi else # no Xinerama USE_XINERAMA=NO XINERAMA_LINK=none fi if test "$USE_XINERAMA" = "YES"; then AC_MSG_RESULT([yes, with $XINERAMA_LINK linking]) AC_CHECK_HEADER(X11/extensions/Xinerama.h, [], [AC_MSG_ERROR(Xinerama header not found.)], []) AC_CHECK_LIB(Xinerama, XineramaIsActive, [], [AC_MSG_ERROR(Xinerama not functional?)], [-L$XLIB -lXext]) else AC_MSG_RESULT([no, libXinerama not found or wrong architecture.]) fi else AC_MSG_RESULT([no]) fi AC_SUBST(USE_XINERAMA) AC_SUBST(XINERAMA_LINK) dnl =================================================================== dnl Test for the presence of Ant and that it works dnl =================================================================== if test "$SOLAR_JAVA" != ""; then ANT_HOME=; export ANT_HOME WITH_ANT_HOME=; export WITH_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:$PATH) WITH_ANT_HOME=$with_ant_home fi if test -z "$ANT"; then AC_MSG_ERROR([Ant not found - Make sure it's in the path or use --with-ant-home]) else # resolve relative or absolute symlink while test -h "$ANT"; do a_cwd=`pwd` a_basename=`basename "$ANT"` a_script=`ls -l "$ANT" | sed "s/.*${a_basename} -> //g"` cd "`dirname "$ANT"`" cd "`dirname "$a_script"`" ANT="`pwd`"/"`basename "$a_script"`" cd "$a_cwd" done 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 EOF oldJAVA_HOME=$JAVA_HOME if test "$JDK" = "gcj"; then JAVA_HOME=; export JAVA_HOME ant_cmd="$ANT -Dbuild.compiler=gcj -buildfile conftest.xml 1>&2" else ant_cmd="$ANT -buildfile conftest.xml 1>&2" fi AC_TRY_EVAL(ant_cmd) if test $? = 0 && test -f ./conftest.class ; then AC_MSG_RESULT([Ant works]) if test -z "$WITH_ANT_HOME"; then ANT_HOME=`echo $ANT | $SED -n "s/\/bin\/ant.*\$//p"` else ANT_HOME="$WITH_ANT_HOME" fi 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!]) ANT_HOME="" echo "Ant does not work - Some Java projects will not build!" >>warn fi JAVA_HOME=$oldJAVA_HOME rm -f conftest* core core.* *.core fi if test -z "$ANT_HOME"; then ANT_HOME="NO_ANT_HOME" fi AC_SUBST(ANT_HOME) dnl Checking for ant.jar if test "$ANT_HOME" != "NO_ANT_HOME"; then AC_MSG_CHECKING([Ant lib directory]) if test -f $ANT_HOME/lib/ant.jar; then ANT_LIB="$ANT_HOME/lib" else if test -f $ANT_HOME/ant.jar; then ANT_LIB="$ANT_HOME" else if test -f /usr/share/java/ant.jar; then ANT_LIB=/usr/share/java else if test -f /usr/share/ant-core/lib/ant.jar; then ANT_LIB=/usr/share/ant-core/lib else AC_MSG_ERROR([Ant libraries not found!]) fi fi fi fi AC_MSG_RESULT([Ant lib directory found.]) fi AC_SUBST(ANT_LIB) fi AC_MSG_CHECKING([which languages to be built]) WITH_LANG="$with_lang" if test -z "$WITH_LANG"; then AC_MSG_RESULT([en-US]) else AC_MSG_RESULT([$WITH_LANG]) fi AC_SUBST(WITH_LANG) AC_MSG_CHECKING([which dictionaries to include]) if test -z "$with_dict"; then WITH_DICT=,ALL, AC_MSG_RESULT([ALL]) else WITH_DICT=","$with_dict"," AC_MSG_RESULT([$with_dict]) fi AC_SUBST(WITH_DICT) AC_MSG_CHECKING([whether to statically link to Gtk]) if test -n "$enable_static_gtk" && test "$enable_static_gtk" != "no"; then ENABLE_STATIC_GTK="TRUE" AC_MSG_RESULT([yes]) else ENABLE_STATIC_GTK="FALSE" AC_MSG_RESULT([no]) fi AC_SUBST(ENABLE_STATIC_GTK) AC_MSG_CHECKING([whether to use custom image sets]) if test -z "$with_images"; then AC_MSG_RESULT([no]) else CUSTOM_IMAGE_SETS="$with_images" AC_MSG_RESULT([$CUSTOM_IMAGE_SETS]) fi AC_SUBST(CUSTOM_IMAGE_SETS) dnl =================================================================== dnl Setting up the environment. dnl =================================================================== echo "********************************************************************" echo "* *" echo "* Setting up the build environment variables. *" echo "* *" echo "********************************************************************" if test -z "$COMPATH"; then AC_MSG_ERROR([No compiler found.]) fi AC_SUBST(COMPATH) AC_MSG_CHECKING([solver path]) if test -z "$with_local_solver"; then LOCAL_SOLVER="DEFAULT" AC_MSG_RESULT([default]) else LOCAL_SOLVER=$with_local_solver AC_MSG_RESULT([$with_local_solver]) fi AC_SUBST(LOCAL_SOLVER) AC_SUBST(BUILD_TYPE) # make sure config.guess is +x; we execute config.guess, so it has to be so; chmod +x $_solenv/bin/config.guess 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' else echo echo Test Complete echo No environment file will be generated echo num_warnings=`wc -l warn` _num=`echo $num_warnings | $AWK '{ print $1 }'` if test $_num -gt 0; then echo The following warning\(s\) were generated by configure echo ---------------------------------------------------- echo cat warn echo else echo There were no warnings fi echo fi