File: configure.ac

package info (click to toggle)
medicalterms 20160103-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 564 kB
  • sloc: sh: 508; perl: 197; makefile: 92
file content (66 lines) | stat: -rw-r--r-- 2,155 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Some configure options for medicalterms
# Process this file with autoconf to produce a configure script.
#
# Copyright © 2005-2016 Dr. Tobias Quathamer <t.quathamer@mailbox.org>
#
# This file is part of Medicalterms.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#

AC_INIT(medicalterms, 20160103)
AM_MAINTAINER_MODE
AM_INIT_AUTOMAKE([foreign])

# Check for needed programs
AC_PATH_PROG([PERL], [perl])
if test -z $PERL; then
	AC_MSG_ERROR([perl is required for building this package.])
fi

AC_PATH_PROG([SORT], [sort])
if test -z $SORT; then
	AC_MSG_ERROR([sort is required for building this package.])
fi

AC_PATH_PROG([ASPELL], [aspell])
# Fail if program is not found
if test -z $ASPELL; then
	AC_MSG_ERROR([aspell is required for building this package.])
else
	AC_MSG_CHECKING([for aspell version >= 0.60.0])
	ac_cv_aspell_version=`$ASPELL --version | $PERL -pe "s/.+ really Aspell (.+)\)/\1/g"`
	changequote(+)dnl
	ac_cv_aspell_major=`$PERL -e "@v = split(/\./, '$ac_cv_aspell_version'); print @v[0]"`
	ac_cv_aspell_minor=`$PERL -e "@v = split(/\./, '$ac_cv_aspell_version'); print @v[1]"`
	changequote([, ])dnl
	if test $ac_cv_aspell_major -gt 0; then
		AC_MSG_RESULT([ok, found $ac_cv_aspell_version])
	else
		if test $ac_cv_aspell_minor -ge 60; then
			AC_MSG_RESULT([ok, found $ac_cv_aspell_version])
		else
			AC_MSG_RESULT([found $ac_cv_aspell_version])
			AC_MSG_ERROR([you need at least version 0.60.0 of aspell.])
		fi
	fi
fi


# Specify the Makefiles
AC_CONFIG_FILES(Makefile bin/Makefile dicts/Makefile)


# Write the configure script
AC_OUTPUT