Changeset 547 for trunk/configure.ac


Ignore:
Timestamp:
Jan 7, 2008, 3:13:57 PM (13 years ago)
Author:
Peter Johansson
Message:

removed configure option wctests - now detected automatically. Also parsing version number and setting variables MAJOR, MINOR, PATCH, and DEV_BUILD

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r540 r547  
    1313# Copyright (C) 2006 Jari Häkkinen
    1414# Copyright (C) 2007 Jari Häkkinen, Peter Johansson
     15# Copyright (C) 2008 Peter Johansson
    1516#
    1617# This file is part of svndigest, http://trac.thep.lu.se/svndigest
     
    3233
    3334AC_PREREQ(2.57)
     35
     36
    3437AC_INIT([svndigest],[pre0.7],[jari@thep.lu.se])
    3538AC_CONFIG_SRCDIR([lib/File.h])
     
    4144AM_INIT_AUTOMAKE([std-options check-news])
    4245
     46AC_MSG_NOTICE([version $VERSION])
     47DEV=`echo $VERSION|sed 's/\([[a-z]]*\).*/\1/'`
     48if test "$DEV" = "pre"; then
     49  DEV="1"
     50else
     51  DEV="0"
     52fi
     53MY_MAJOR=`echo $VERSION|sed 's/[[a-z]]*\([[0-9]]*\).*/\1/'`
     54MY_MINOR=`echo $VERSION|sed 's/[[a-z]]*[[0-9]]*\.\([[0-9]]*\).*/\1/'`
     55if test "$MY_MINOR" = "$VERSION" || "$MY_MAJOR" = "$VERSION" ; then
     56 AC_MSG_ERROR([version number is incorrect])
     57fi
     58
     59MY_PATCH=`echo $VERSION|sed 's/[[a-z]]*[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\).*/\1/'`
     60
     61if test "$MY_PATCH" = "$VERSION"; then
     62 MY_PATCH="0"
     63fi
     64
     65# AM_CONDITIONAL(DEV_BUILD, $DEV )
     66AC_SUBST([VERSION_MAJOR], [$MY_MAJOR])
     67AC_SUBST([VERSION_MINOR], [$MY_MINOR])
     68AC_SUBST([VERSION_PATCH], [$MY_PATCH])
     69AC_DEFINE_UNQUOTED([DEV_BUILD],[$DEV],
     70                   [true if dev build (version starts with pre)])
     71AC_DEFINE_UNQUOTED([VERSION_MAJOR], [$MY_MAJOR],
     72                   [Define to the svndigest major version])
     73AC_DEFINE_UNQUOTED([VERSION_MINOR], [$MY_MINOR],
     74                   [Define to the svndigest minor version])
     75AC_DEFINE_UNQUOTED([VERSION_PATCH], [$MY_PATCH],
     76                   [Define to the svndigest patch version])
     77
     78
     79# seems like these variables are not set with older autoconf(?)
     80AC_SUBST([abs_srcdir], ["`cd $srcdir && pwd`"])
     81AC_SUBST([abs_builddir], ["`pwd`"])
     82
    4383# Set default programming language
    4484AC_LANG(C++)
     
    4787AC_PROG_CPP
    4888AC_PROG_CXX
     89AC_PROG_GREP
    4990AC_PROG_INSTALL
    5091AC_PROG_LIBTOOL
    5192AC_PROG_RANLIB
     93AC_PROG_SED
    5294AC_CHECK_PROG([GNUPLOT],[gnuplot],[ok])
    5395
     
    61103  [CXXFLAGS="$CXXFLAGS -g -O"],
    62104  [CPPFLAGS="$CPPFLAGS -DNDEBUG" CXXFLAGS="$CXXFLAGS -O3"])
    63 
    64 AC_ARG_ENABLE(wctests,
    65   [AS_HELP_STRING([--enable-wctests],[turn on all tests, tests
    66   requiring a subversion WC are disabled by default])], [wctests=true])
    67 AM_CONDITIONAL(WCTESTS, test x$wctests = xtrue)
    68105
    69106# optionally prepare for building static libraries.
     
    131168   wc_found="yes";
    132169fi
    133 AC_CHECK_FILE("lib/subversion_info.h", info_found="yes", info_found="no")   
     170AC_CHECK_FILE("lib/subversion_info.h", info_found="yes", info_found="no")
    134171
    135172# devel version should have svn WC and SVNVERSION installed
     
    236273
    237274AC_MSG_NOTICE([Now type 'make ; make check'.])
     275
Note: See TracChangeset for help on using the changeset viewer.