| 1 | dnl -*-autoconf-*- |
| 2 | dnl |
| 3 | dnl Build-time configuration for rsync-backup |
| 4 | dnl |
| 5 | dnl (c) 2012 Mark Wooding |
| 6 | dnl |
| 7 | |
| 8 | dnl----- Licensing notice --------------------------------------------------- |
| 9 | dnl |
| 10 | dnl This file is part of the `rsync-backup' program. |
| 11 | dnl |
| 12 | dnl rsync-backup is free software; you can redistribute it and/or modify |
| 13 | dnl it under the terms of the GNU General Public License as published by |
| 14 | dnl the Free Software Foundation; either version 2 of the License, or |
| 15 | dnl (at your option) any later version. |
| 16 | dnl |
| 17 | dnl rsync-backup is distributed in the hope that it will be useful, |
| 18 | dnl but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 19 | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 20 | dnl GNU General Public License for more details. |
| 21 | dnl |
| 22 | dnl You should have received a copy of the GNU General Public License |
| 23 | dnl along with rsync-backup; if not, write to the Free Software Foundation, |
| 24 | dnl Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 25 | |
| 26 | dnl-------------------------------------------------------------------------- |
| 27 | dnl Initialization. |
| 28 | |
| 29 | mdw_AUTO_VERSION |
| 30 | AC_INIT([rsync-backup], AUTO_VERSION, [mdw@distorted.org.uk]) |
| 31 | AC_CONFIG_SRCDIR([rsync-backup.in]) |
| 32 | AC_CONFIG_AUX_DIR([config]) |
| 33 | AM_INIT_AUTOMAKE([foreign]) |
| 34 | mdw_SILENT_RULES |
| 35 | |
| 36 | dnl-------------------------------------------------------------------------- |
| 37 | dnl Paths. |
| 38 | |
| 39 | AC_ARG_WITH([mntbkpdir], |
| 40 | AS_HELP_STRING([--with-mntbkpdir], [location of the backup mount tree]), |
| 41 | [mntbkpdir=$withval], |
| 42 | [mntbkpdir=/mnt/bkp]) |
| 43 | AC_SUBST([mntbkpdir]) |
| 44 | |
| 45 | AC_ARG_WITH([fshashdir], |
| 46 | AS_HELP_STRING([--with-fshashdir], [location for fshash cache files]), |
| 47 | [fshashdir=$withval], |
| 48 | [fshashdir=$localstatedir/cache/fshash]) |
| 49 | AC_SUBST([fshashdir]) |
| 50 | |
| 51 | AC_ARG_WITH([logdir], |
| 52 | AS_HELP_STRING([--with-logdir], [location for logfiles]), |
| 53 | [logdir=$withval], |
| 54 | [logdir=$localstatedir/log/bkp]) |
| 55 | AC_SUBST([logdir]) |
| 56 | |
| 57 | dnl-------------------------------------------------------------------------- |
| 58 | dnl Programming environments. |
| 59 | |
| 60 | dnl C compilers and libraries. |
| 61 | AC_PROG_CC |
| 62 | AX_CFLAGS_WARN_ALL |
| 63 | PKG_CHECK_MODULES([mLib], [mLib >= 2.2.1], [have_mlib=t], [have_mlib=nil]) |
| 64 | AM_CONDITIONAL([HAVE_MLIB], [test $have_mlib = t]) |
| 65 | |
| 66 | dnl Bourne-Again Shell. |
| 67 | AC_PATH_PROG([BASH], [bash]) |
| 68 | |
| 69 | dnl Python. |
| 70 | AC_PATH_PROG([PYTHON], [python]) |
| 71 | AX_PROG_PYTHON_VERSION([2.5],, |
| 72 | [AC_MSG_ERROR([Failed to find suitable Python.])]) |
| 73 | |
| 74 | dnl-------------------------------------------------------------------------- |
| 75 | dnl Output. |
| 76 | |
| 77 | AC_CONFIG_FILES([Makefile]) |
| 78 | AC_OUTPUT |
| 79 | |
| 80 | dnl----- That's all, folks -------------------------------------------------- |