1 # ===========================================================================
3 # ===========================================================================
11 # Discover whether or not we are operating with a tree which
12 # has been checked out of a version control system.
17 # Copyright (C) 2012 Brian Aker
18 # All rights reserved.
20 # Redistribution and use in source and binary forms, with or without
21 # modification, are permitted provided that the following conditions are
24 # * Redistributions of source code must retain the above copyright
25 # notice, this list of conditions and the following disclaimer.
27 # * Redistributions in binary form must reproduce the above
28 # copyright notice, this list of conditions and the following disclaimer
29 # in the documentation and/or other materials provided with the
32 # * The names of its contributors may not be used to endorse or
33 # promote products derived from this software without specific prior
36 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
37 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
38 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
39 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
40 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
41 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
42 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
43 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
44 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
45 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
46 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
50 AC_DEFUN([AX_VCS_CHECKOUT],[
51 AC_CACHE_CHECK([for vcs checkout], [ac_cv_vcs_checkout], [
52 AS_IF([test -d ".bzr"],[ac_cv_vcs_checkout=yes])
53 AS_IF([test -d ".svn"],[ac_cv_vcs_checkout=yes])
54 AS_IF([test -d ".hg"], [ac_cv_vcs_checkout=yes])
55 AS_IF([test -d ".git"],[ac_cv_vcs_checkout=yes])
60 AM_CONDITIONAL([MAINTAINER_MODE], [ test "$ac_cv_vcs_checkout" = "yes" ])