diff options
author | Tor Lillqvist <tml@collabora.com> | 2013-09-23 15:34:26 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2013-09-23 15:38:10 +0300 |
commit | 0618b35ebda29b911058254cd34620e8b24ab8f7 (patch) | |
tree | 381c2b5531b4745c0cd89b5994022bf98a37c08d /configure.ac | |
parent | Updated core (diff) | |
download | core-0618b35ebda29b911058254cd34620e8b24ab8f7.tar.gz core-0618b35ebda29b911058254cd34620e8b24ab8f7.zip |
Fixes for cross-compilation on OS X (to iOS)
Introduce SDKDIRNAME as a configury variable and use it instead of the
gbuild gb_Package_SDKDIRNAME. Then we can easily construct the
SDKDIRNAME_FOR_BUILD variant that is needed to find the specially
named SDK in instdir on OS X when cross-compiling.
Move the version number section in configure.ac earlier.
Change-Id: Iee3db1a50ad4c7a9f91bbc5e0d0b01d76a76f701
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 112 |
1 files changed, 59 insertions, 53 deletions
diff --git a/configure.ac b/configure.ac index 13f4e69b388e..1f3ea9b2f7b2 100644 --- a/configure.ac +++ b/configure.ac @@ -99,6 +99,57 @@ fi AC_MSG_RESULT([$PRODUCTNAME]) AC_SUBST(PRODUCTNAME) +dnl =================================================================== +dnl Our version is defined by the AC_INIT() at the top of this script. +dnl =================================================================== + +set `echo AC_PACKAGE_VERSION | sed "s/\./ /g"` + +LIBO_VERSION_MAJOR=$1 +LIBO_VERSION_MINOR=$2 +LIBO_VERSION_MICRO=$3 +LIBO_VERSION_PATCH=$4 + +LIBO_VERSION_SUFFIX=$5 +# Split out LIBO_VERSION_SUFFIX_SUFFIX... horrible crack. But apparently wanted separately in +# openoffice.lst as ABOUTBOXPRODUCTVERSIONSUFFIX. Note that the double brackets are for m4's sake, +# they get undoubled before actually passed to sed. +LIBO_VERSION_SUFFIX_SUFFIX=`echo "$LIBO_VERSION_SUFFIX" | sed -e 's/.*[[a-zA-Z0-9]]\([[^a-zA-Z0-9]]*\)$/\1/'` +test -n "$LIBO_VERSION_SUFFIX_SUFFIX" && LIBO_VERSION_SUFFIX="${LIBO_VERSION_SUFFIX%${LIBO_VERSION_SUFFIX_SUFFIX}}" +# LIBO_VERSION_SUFFIX, if non-empty, should include the period separator +test -n "$LIBO_VERSION_SUFFIX" && LIBO_VERSION_SUFFIX=".$LIBO_VERSION_SUFFIX" + +AC_SUBST(LIBO_VERSION_MAJOR) +AC_SUBST(LIBO_VERSION_MINOR) +AC_SUBST(LIBO_VERSION_MICRO) +AC_SUBST(LIBO_VERSION_PATCH) +AC_SUBST(LIBO_VERSION_SUFFIX) +AC_SUBST(LIBO_VERSION_SUFFIX_SUFFIX) + +AC_DEFINE_UNQUOTED(LIBO_VERSION_MAJOR,$LIBO_VERSION_MAJOR) +AC_DEFINE_UNQUOTED(LIBO_VERSION_MINOR,$LIBO_VERSION_MINOR) +AC_DEFINE_UNQUOTED(LIBO_VERSION_MICRO,$LIBO_VERSION_MICRO) +AC_DEFINE_UNQUOTED(LIBO_VERSION_PATCH,$LIBO_VERSION_PATCH) + +LIBO_THIS_YEAR=`date +%Y` +AC_DEFINE_UNQUOTED(LIBO_THIS_YEAR,$LIBO_THIS_YEAR) + +# This UPD silly thing must go away soon +UPD="${LIBO_VERSION_MAJOR}${LIBO_VERSION_MINOR}0" +AC_SUBST(UPD) + +# This too should go away +SOURCEVERSION="OOO$UPD" +AC_SUBST(SOURCEVERSION) + +dnl =================================================================== +dnl Product version +dnl =================================================================== +AC_MSG_CHECKING([for product version]) +PRODUCTVERSION="$LIBO_VERSION_MAJOR.$LIBO_VERSION_MINOR" +AC_MSG_RESULT([$PRODUCTVERSION]) +AC_SUBST(PRODUCTVERSION) + AC_PROG_EGREP # AC_PROG_EGREP doesn't set GREP on all systems as well AC_PATH_PROG(GREP, grep) @@ -381,6 +432,7 @@ CPP_LIBRARY="GLIBCXX" AC_SUBST(CPP_LIBRARY) INSTROOTSUFFIX= +SDKDIRNAME=sdk case "$host_os" in @@ -493,6 +545,7 @@ darwin*) # Mac OS X or iOS else _os=Darwin INSTROOTSUFFIX=/$PRODUCTNAME.app/Contents + SDKDIRNAME=AC_PACKAGE_NAME${PRODUCTVERSION}_SDK fi enable_systray=no # See comment above the case "$host_os" @@ -637,6 +690,8 @@ if test "$_os" = "AIX"; then fi fi +AC_SUBST(SDKDIRNAME) + AC_SUBST(WITH_MINGW) AC_SUBST(OSVERSION) AC_SUBST(PTHREAD_CFLAGS) @@ -4483,9 +4538,9 @@ if test "$cross_compiling" = "yes"; then mv config.log ../config.Build.log mkdir -p ../config_build mv config_host/*.h ../config_build - . ./bin/get_config_variables CC CXX INPATH INSTDIR INSTROOT LIBO_BIN_FOLDER LIBO_LIB_FOLDER LIBO_URE_LIB_FOLDER OS OUTDIR PATH SYSTEM_LIBXSLT WORKDIR + . ./bin/get_config_variables CC CXX INPATH INSTDIR INSTROOT LIBO_BIN_FOLDER LIBO_LIB_FOLDER LIBO_URE_LIB_FOLDER OS OUTDIR PATH SDKDIRNAME SYSTEM_LIBXSLT WORKDIR - for V in CC CXX INPATH LIBO_BIN_FOLDER LIBO_LIB_FOLDER LIBO_URE_LIB_FOLDER OS SYSTEM_LIBXSLT; do + for V in CC CXX INPATH LIBO_BIN_FOLDER LIBO_LIB_FOLDER LIBO_URE_LIB_FOLDER OS SDKDIRNAME SYSTEM_LIBXSLT; do VV='$'$V VV=`eval "echo $VV"` if test -n "$VV"; then @@ -4525,6 +4580,7 @@ else LIBO_LIB_FOLDER_FOR_BUILD="$LIBO_LIB_FOLDER" LIBO_URE_LIB_FOLDER_FOR_BUILD="$LIBO_URE_LIB_FOLDER" OUTDIR_FOR_BUILD="$OUTDIR" + SDKDIRNAME_FOR_BUILD="$SDKDIRNAME" WORKDIR_FOR_BUILD="$WORKDIR" fi AC_SUBST(OS_FOR_BUILD) @@ -4535,52 +4591,10 @@ AC_SUBST(LIBO_BIN_FOLDER_FOR_BUILD) AC_SUBST(LIBO_LIB_FOLDER_FOR_BUILD) AC_SUBST(LIBO_URE_LIB_FOLDER_FOR_BUILD) AC_SUBST(OUTDIR_FOR_BUILD) +AC_SUBST(SDKDIRNAME_FOR_BUILD) AC_SUBST(WORKDIR_FOR_BUILD) dnl =================================================================== -dnl Our version is defined by the AC_INIT() at the top of this script. -dnl =================================================================== - -set `echo AC_PACKAGE_VERSION | sed "s/\./ /g"` - -LIBO_VERSION_MAJOR=$1 -LIBO_VERSION_MINOR=$2 -LIBO_VERSION_MICRO=$3 -LIBO_VERSION_PATCH=$4 - -LIBO_VERSION_SUFFIX=$5 -# Split out LIBO_VERSION_SUFFIX_SUFFIX... horrible crack. But apparently wanted separately in -# openoffice.lst as ABOUTBOXPRODUCTVERSIONSUFFIX. Note that the double brackets are for m4's sake, -# they get undoubled before actually passed to sed. -LIBO_VERSION_SUFFIX_SUFFIX=`echo "$LIBO_VERSION_SUFFIX" | sed -e 's/.*[[a-zA-Z0-9]]\([[^a-zA-Z0-9]]*\)$/\1/'` -test -n "$LIBO_VERSION_SUFFIX_SUFFIX" && LIBO_VERSION_SUFFIX="${LIBO_VERSION_SUFFIX%${LIBO_VERSION_SUFFIX_SUFFIX}}" -# LIBO_VERSION_SUFFIX, if non-empty, should include the period separator -test -n "$LIBO_VERSION_SUFFIX" && LIBO_VERSION_SUFFIX=".$LIBO_VERSION_SUFFIX" - -AC_SUBST(LIBO_VERSION_MAJOR) -AC_SUBST(LIBO_VERSION_MINOR) -AC_SUBST(LIBO_VERSION_MICRO) -AC_SUBST(LIBO_VERSION_PATCH) -AC_SUBST(LIBO_VERSION_SUFFIX) -AC_SUBST(LIBO_VERSION_SUFFIX_SUFFIX) - -AC_DEFINE_UNQUOTED(LIBO_VERSION_MAJOR,$LIBO_VERSION_MAJOR) -AC_DEFINE_UNQUOTED(LIBO_VERSION_MINOR,$LIBO_VERSION_MINOR) -AC_DEFINE_UNQUOTED(LIBO_VERSION_MICRO,$LIBO_VERSION_MICRO) -AC_DEFINE_UNQUOTED(LIBO_VERSION_PATCH,$LIBO_VERSION_PATCH) - -LIBO_THIS_YEAR=`date +%Y` -AC_DEFINE_UNQUOTED(LIBO_THIS_YEAR,$LIBO_THIS_YEAR) - -# This UPD silly thing must go away soon -UPD="${LIBO_VERSION_MAJOR}${LIBO_VERSION_MINOR}0" -AC_SUBST(UPD) - -# This too should go away -SOURCEVERSION="OOO$UPD" -AC_SUBST(SOURCEVERSION) - -dnl =================================================================== dnl Check for syslog header dnl =================================================================== AC_CHECK_HEADER(syslog.h, AC_DEFINE(HAVE_SYSLOG_H)) @@ -12009,14 +12023,6 @@ AC_SUBST(CURL) AC_SUBST(MD5SUM) dnl =================================================================== -dnl Product version -dnl =================================================================== -AC_MSG_CHECKING([for product version]) -PRODUCTVERSION="$LIBO_VERSION_MAJOR.$LIBO_VERSION_MINOR" -AC_MSG_RESULT([$PRODUCTVERSION]) -AC_SUBST(PRODUCTVERSION) - -dnl =================================================================== dnl Dealing with l10n options dnl =================================================================== AC_MSG_CHECKING([which languages to be built]) |