aboutsummaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorMartijn Kaijser <mcm.kaijser@gmail.com>2014-08-10 10:53:02 +0200
committerMartijn Kaijser <mcm.kaijser@gmail.com>2014-08-10 10:53:02 +0200
commita884d68587afe009ae3ff622bf09fcbb4aa889f7 (patch)
tree916aece19322587ff2f804950405d8dc03749009 /configure.in
parentbfdcc44372836efae169f15c5e0b9e23a631a7aa (diff)
[configure] use central version.txt file to store Kodi name, and add it to GuiInfoManager
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in79
1 files changed, 41 insertions, 38 deletions
diff --git a/configure.in b/configure.in
index fb6ab20cb8..725a271d85 100644
--- a/configure.in
+++ b/configure.in
@@ -115,6 +115,41 @@ AC_DEFUN([XB_PUSH_FLAGS], [
INCLUDES="$SAVE_INCLUDES"
])
+# version can be overridden by setting the following as ENV vars when running configure
+APP_NAME=${APP_NAME-$(${AWK} '/APP_NAME/ {print $2}' version.txt)}
+APP_VERSION_MAJOR=${APP_VERSION_MAJOR-$(${AWK} '/VERSION_MAJOR/ {print $2}' version.txt)}
+APP_VERSION_MINOR=${APP_VERSION_MINOR-$(${AWK} '/VERSION_MINOR/ {print $2}' version.txt)}
+APP_VERSION_TAG=${APP_VERSION_TAG-$(${AWK} '/VERSION_TAG/ {print $2}' version.txt)}
+APP_VERSION_TAG_LC=$(echo $APP_VERSION_TAG | ${AWK} '{print tolower($0)}')
+APP_VERSION_CODE=${APP_VERSION_CODE-$(${AWK} '/VERSION_CODE/ {print $2}' version.txt)}
+APP_ADDON_API=${APP_ADDON_API-$(${AWK} '/ADDON_API/ {print $2}' version.txt)}
+if test "$APP_NAME" != "" && test "$APP_VERSION_MAJOR" != "" && test "$APP_VERSION_MINOR" != "" \
+&& test "$APP_VERSION_TAG" != "" && test "$APP_VERSION_CODE" != "" && test "$APP_ADDON_API" != ""; then
+ final_message="$final_message\n ${APP_NAME} Version:\t${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}-${APP_VERSION_TAG}"
+ AC_SUBST(APP_NAME)
+ AC_SUBST(APP_VERSION_MAJOR)
+ AC_SUBST(APP_VERSION_MINOR)
+ AC_SUBST(APP_VERSION_TAG)
+ AC_SUBST(APP_VERSION_TAG_LC)
+ AC_SUBST(APP_VERSION_CODE)
+ AC_SUBST(APP_ADDON_API)
+else
+ AC_MSG_ERROR(could not detect application Version, make sure version.txt is complete)
+fi
+
+# check for GIT_REV
+AC_CHECK_PROG(HAVE_GIT,git,"yes","no",)
+if test "$GIT_REV" = ""; then
+ if test -f VERSION ; then
+ GIT_REV=$(awk 'END{print substr($1,1,16)}' VERSION)
+ elif test "$HAVE_GIT" = "yes" -a -d ${abs_top_srcdir}/.git; then
+ GIT_REV=$(git --no-pager log --abbrev=7 -n 1 --pretty=format:"%h %ci" HEAD | awk '{gsub("-", "");print $2"-"$1}')
+ else
+ GIT_REV="Unknown"
+ fi
+fi
+final_message="$final_message\n git Rev.:\t${GIT_REV}"
+
# General message strings
configure_debug="ERROR: this is a configure debug statement"
missing_library="Could not find a required library. Please see the README for your platform."
@@ -183,7 +218,7 @@ libcec_enabled="== libcec enabled. =="
libcec_disabled="== libcec disabled. CEC adapter support will not be available. =="
dashes="------------------------"
-final_message="\n XBMC Configuration:"
+final_message="\n ${APP_NAME} Configuration:"
final_message="\n$dashes$final_message\n$dashes"
AC_ARG_WITH([ffmpeg],
@@ -513,8 +548,8 @@ AC_ARG_ENABLE([codec],
AC_ARG_ENABLE([libav-compat],
[AS_HELP_STRING([--enable-libav-compat],
- [build a wrapper around libav to provide the functions needed by XBMC. This is
- *not* supported by XBMC developers and is provided only for convenience. (default is no) 'Linux only'])],
+ [build a wrapper around libav to provide the functions needed by ${APP_NAME}. This is
+ *not* supported by ${APP_NAME} developers and is provided only for convenience. (default is no) 'Linux only'])],
[use_libav_hacks=$enableval],
[use_libav_hacks=no])
@@ -687,39 +722,7 @@ esac
XBMC_SETUP_ARCH_DEFINES()
-# check for GIT_REV
-AC_CHECK_PROG(HAVE_GIT,git,"yes","no",)
-if test "$GIT_REV" = ""; then
- if test -f VERSION ; then
- GIT_REV=$(awk 'END{print substr($1,1,16)}' VERSION)
- elif test "$HAVE_GIT" = "yes" -a -d ${abs_top_srcdir}/.git; then
- GIT_REV=$(git --no-pager log --abbrev=7 -n 1 --pretty=format:"%h %ci" HEAD | awk '{gsub("-", "");print $2"-"$1}')
- else
- GIT_REV="Unknown"
- fi
-fi
-final_message="$final_message\n git Rev.:\t${GIT_REV}"
-
-# detect Xbmc soname version
-# version can be overridden by setting the following as ENV vars when running configure
-APP_VERSION_MAJOR=${APP_VERSION_MAJOR-$(${AWK} '/VERSION_MAJOR/ {print $2}' version.txt)}
-APP_VERSION_MINOR=${APP_VERSION_MINOR-$(${AWK} '/VERSION_MINOR/ {print $2}' version.txt)}
-APP_VERSION_TAG=${APP_VERSION_TAG-$(${AWK} '/VERSION_TAG/ {print $2}' version.txt)}
-APP_VERSION_TAG_LC=$(echo $APP_VERSION_TAG | ${AWK} '{print tolower($0)}')
-APP_VERSION_CODE=${APP_VERSION_CODE-$(${AWK} '/VERSION_CODE/ {print $2}' version.txt)}
-APP_ADDON_API=${APP_ADDON_API-$(${AWK} '/ADDON_API/ {print $2}' version.txt)}
-if test "$APP_VERSION_MAJOR" != "" && test "$APP_VERSION_MINOR" != "" && test "$APP_VERSION_TAG" != "" \
-&& test "$APP_VERSION_CODE" != "" && test "$APP_ADDON_API" != ""; then
- final_message="$final_message\n Xbmc Version:\t${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}-${APP_VERSION_TAG}"
- AC_SUBST(APP_VERSION_MAJOR)
- AC_SUBST(APP_VERSION_MINOR)
- AC_SUBST(APP_VERSION_TAG)
- AC_SUBST(APP_VERSION_TAG_LC)
- AC_SUBST(APP_VERSION_CODE)
- AC_SUBST(APP_ADDON_API)
-else
- AC_MSG_ERROR(could not detect XBMC Version, make sure version.txt is complete)
-fi
+# detect soname version
if test "$host_vendor" = "apple"; then
echo "#define GIT_REV \"$GIT_REV\"" > git_revision.h
@@ -780,7 +783,7 @@ if echo "$ARCH" | grep -q "freebsd" ; then
LDFLAGS="$LDFLAGS -L$LOCALBASE/lib"
fi
if test "$host_vendor" = "apple" ; then
- # standard xbmc paths
+ # standard application paths
INCLUDES="$INCLUDES -I\$(abs_top_srcdir)/xbmc/osx"
if test "$use_arch" != "arm"; then
LIBS="$LIBS -framework ApplicationServices"
@@ -1010,7 +1013,7 @@ else
AC_CHECK_LIB([GLU], [main],, AC_MSG_ERROR($missing_library))
fi
else
- AC_MSG_RESULT(== WARNING: OpenGL support is disabled. XBMC will run VERY slow. ==)
+ AC_MSG_RESULT(== WARNING: OpenGL support is disabled. ${APP_NAME} will run VERY slow. ==)
AC_CHECK_LIB([SDL_gfx],[main])
fi
fi