-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.in
88 lines (70 loc) · 2.29 KB
/
configure.in
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
dnl +--------------------------------------------------------------------------+
dnl | MM8DRead v0.4 * Status reader program for MM8D device |
dnl | Copyright (C) 2020-2024 Pozsár Zsolt <pozsarzs@gmail.com> |
dnl | configure.in |
dnl | Autoconf input file for unix-like systems |
dnl +--------------------------------------------------------------------------+
AC_INIT
AC_CONFIG_SRCDIR([source/mm8dread/config.pas.in])
AC_CONFIG_AUX_DIR(config)
AC_CANONICAL_TARGET
AC_PATH_PROG(ln, ln, no)
AC_PATH_PROG(rm, rm, no)
AC_PATH_PROG(rmdir, rmdir, no)
AC_PATH_PROG(install, install, no)
AC_CHECK_PROGS(make, gmake make)
test "$make" == "" && AC_MSG_ERROR(Make not found!)
AC_CHECK_PROGS(hfpc,fpc,no)
test x"$hfpc" == xno && AC_MSG_ERROR(FreePascal compiler not found!)
lcldir=`find /usr -type d -name lcl | grep lazarus | grep -v doc | grep -v test`
AC_CHECK_FILE($lcldir/lclbase.lpk,,AC_MSG_ERROR(LCL unit files not found!))
AC_CHECK_FILE(documents/VERSION,,AC_MSG_ERROR(VERSION file not found!))
version=`cat documents/VERSION`
AC_CHECK_FILE(documents/copyright,,AC_MSG_ERROR(copyright file not found!))
copyright=`cat documents/copyright`
os=`fpc -iSO`
architecture=`fpc -iSP`
AC_PREFIX_DEFAULT("/usr/local")
test x"$prefix" == xNONE && prefix="$ac_default_prefix"
if test $prefix == "/usr"
then
vardir="/var"
else
vardir="/var/local"
fi
mandir="$prefix/man"
test "$os" = "linux" && mandir="$datarootdir/man"
bprefix="$prefix"
test "$stagedir" != "" && prefix="$stagedir"
test "$stagedir" != "" && mandir="$prefix/man"
AC_SUBST(architecture)
AC_SUBST(copyright)
AC_SUBST(os)
AC_SUBST(prefix)
AC_SUBST(version)
AC_SUBST(bindir)
AC_SUBST(bprefix)
AC_SUBST(datarootdir)
AC_SUBST(lcldir)
AC_SUBST(libdir)
AC_SUBST(mandir)
AC_SUBST(sysconfdir)
AC_SUBST(vardir)
AC_SUBST(fpflag)
AC_SUBST(install)
AC_SUBST(ln)
AC_SUBST(make)
AC_SUBST(rm)
AC_CONFIG_FILES([Makefile.global \
manuals/mm8dread.1 \
source/mm8dread/config.pas ])
AC_OUTPUT
echo "
Summary
=======
Target op. system $os
Target processor $architecture
Target directory $prefix
Type '${make}' for compilation and then '${make} install'.
"
test "$stagedir" != "" && echo Install to FreeBSD stage directory: $prefix