X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=m4%2Fpandora_vc_build.m4;h=1adb28098c6f7d3ca02504ca4ac0f3943be5c9bb;hb=6953ecee35a39d2303577ec92ca5ead4efa7ea7a;hp=d84b96767f3b499619c57c8e677eb2433c1e16ed;hpb=d6db1d64eaa5644a4fe19d2accc4fb012f27ee0a;p=awesomized%2Flibmemcached diff --git a/m4/pandora_vc_build.m4 b/m4/pandora_vc_build.m4 index d84b9676..1adb2809 100644 --- a/m4/pandora_vc_build.m4 +++ b/m4/pandora_vc_build.m4 @@ -1,57 +1,36 @@ -dnl Copyright (C) 2009 Sun Microsystems -dnl This file is free software; Sun Microsystems +dnl Copyright (C) 2009 Sun Microsystems, Inc. +dnl This file is free software; Sun Microsystems, Inc. dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. -AC_DEFUN([PANDORA_BUILDING_FROM_VC],[ - - ac_cv_building_from_vc=no - - AS_IF([test -d "${srcdir}/.bzr"],[ - ac_cv_building_from_bzr=yes - ac_cv_building_from_vc=yes - ],[ - ac_cv_building_from_bzr=no - ]) - - AS_IF([test -d "${srcdir}/.svn"],[ - ac_cv_building_from_svn=yes - ac_cv_building_from_vc=yes - ],[ - ac_cv_building_from_svn=no - ]) - - AS_IF([test -d "${srcdir}/.hg"],[ - ac_cv_building_from_hg=yes - ac_cv_building_from_vc=yes - ],[ - ac_cv_building_from_hg=no - ]) - - AS_IF([test -d "${srcdir}/.git"],[ - ac_cv_building_from_git=yes - ac_cv_building_from_vc=yes - ],[ - ac_cv_building_from_git=no - ]) - - +AC_DEFUN([PANDORA_TEST_VC_DIR],[ + pandora_building_from_vc=no + + if test -d ".bzr" ; then + pandora_building_from_bzr=yes + pandora_building_from_vc=yes + else + pandora_building_from_bzr=no + fi + + if test -d ".svn" ; then + pandora_building_from_svn=yes + pandora_building_from_vc=yes + else + pandora_building_from_svn=no + fi + + if test -d ".hg" ; then + pandora_building_from_hg=yes + pandora_building_from_vc=yes + else + pandora_building_from_hg=no + fi + + if test -d ".git" ; then + pandora_building_from_git=yes + pandora_building_from_vc=yes + else + pandora_building_from_git=no + fi ]) - -dnl Takes one argument which is the prefix to append -AC_DEFUN([PANDORA_EXPORT_BZR_INFO],[ - m4_ifval(m4_normalize([$1]),[ - m4_define([PEBI_PREFIX],[]) - ],[ - m4_define([PEBI_PREFIX],m4_toupper(m4_normalize($1))[_]) - ]) - - AC_DEFINE(PEBI_PREFIX[BZR_REVID], ["BZR_REVID"], [bzr revision ID]) - AC_DEFINE(PEBI_PREFIX[BZR_BRANCH], ["BZR_BRANCH"], [bzr branch name]) - AC_DEFINE(PEBI_PREFIX[RELEASE_DATE], ["RELEASE_DATE"], [Release date based on the date of the repo checkout]) - AC_DEFINE(PEBI_PREFIX[RELEASE_VERSION], ["RELEASE_VERSION"], [$1 version number formatted for display]) - AC_DEFINE(PEBI_PREFIX[RELEASE_COMMENT], ["RELEASE_COMMENT"], [Set to trunk if the branch is the main $1 branch]) - AC_DEFINE(PEBI_PREFIX[RELEASE_ID], [RELEASE_ID], [$1 version number formatted for numerical comparison]) - -]) -