+MYCFLAGS="-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}"
+
+# These variables define the identifiers of the
+# system (both Intel and PowerPC) to compile for.
+# (Note: darwin8 is 10.4; darwin9 is 10.5.)
+# Only change these if necessary
+
+HostSystem_i386="i686-apple-darwin8"
+HostSystem_ppc="powerpc-apple-darwin8"
+
+if [ "${configure_qt4_frameworks}" != "yes" -a -d "${Qt4SourceDir}" -a ! \( -d "${Qt4BuildDir}" -a -d "${QtInstallDir}" \) ]; then
+ echo Build Qt4 library ${Qt4SourceDir}
+ if [ "${QtInstallDir}" = "${Qt4BuildDir}" ]; then
+ echo Bad install directory for Qt.
+ echo Must be different from build directory "${Qt4BuildDir}".
+ exit 1
+ fi
+ (
+ mkdir -p "${Qt4BuildDir}" && cd "${Qt4BuildDir}"
+ for arch in ${ARCH_LIST} ; do
+ ARCHS="${ARCHS} -arch ${arch}"
+ done
+ echo configure options:
+ echo ${Qt4ConfigureOptions} ${ARCHS} -prefix "${QtInstallDir}"
+ echo yes | "${Qt4SourceDir}"/configure ${Qt4ConfigureOptions} ${ARCHS} -prefix "${QtInstallDir}"
+ make && make install
+ )
+ cd "${QtInstallDir}" && (
+ mkdir -p include
+ cd include
+ for libnm in ${QtLibraries} ; do
+ test -d ${libnm} -o -L ${libnm} || ln -s ../lib/${libnm}.framework/Headers ${libnm}
+ done
+ )
+fi
+
+if [ -d "${HunSpellSourceDir}" -a ! -f "${HunSpellInstallHdr}" ]; then
+ # we have a private HunSpell source tree at hand...
+ # so let's build and install it
+ if [ -z "${HunSpellVersion}" ]; then
+ HunSpellVersion=`grep AC_INIT "${HunSpellSourceDir}"/configure.ac | cut -d, -f2|tr -d " ()"`
+ fi
+
+ HunSpellName="Hunspell"
+ HunSpellBase="${HunSpellName}-${HunSpellVersion}"
+
+ echo Build hunspell library ${HunSpellBase}
+ echo configure options:
+ echo --prefix="${HunSpellInstallDir}" ${HunspellConfigureOptions}
+
+ cd "${HunSpellSourceDir}"
+
+ # ----------------------------------------
+ # Build HunSpell for different architectures
+ # ----------------------------------------
+ FILE_LIST="libhunspell-1.2.0.dylib"