This repository has been archived by the owner on Sep 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.in
64 lines (53 loc) · 1.9 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
dnl +--------------------------------------------------------------------------+
dnl | MM5DRead v0.3 * Status reader program for MM5D device |
dnl | Copyright (C) 2020-2023 Pozsár Zsolt <pozsar.zsolt@szerafingomba.hu> |
dnl | configure.in |
dnl | Autoconf input file for unix-like systems |
dnl +--------------------------------------------------------------------------+
AC_INIT(source/config.pas.in)
AC_CONFIG_AUX_DIR(config)
AC_CANONICAL_SYSTEM
AC_PATH_PROG(rm, rm, 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_PREFIX_DEFAULT("/usr/local")
test x"$prefix" = xNONE && prefix="$ac_default_prefix"
AC_CHECK_FILE(documents/VERSION,,AC_MSG_ERROR(VERSION file not found!))
version=`cat documents/VERSION`
os=`fpc -iSO`
architecture=`fpc -iSP`
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(bindir)
AC_SUBST(bprefix)
AC_SUBST(datarootdir)
AC_SUBST(fpflag)
AC_SUBST(install)
AC_SUBST(lcldir)
AC_SUBST(libdir)
AC_SUBST(make)
AC_SUBST(mandir)
AC_SUBST(os)
AC_SUBST(prefix)
AC_SUBST(rm)
AC_SUBST(sysconfdir)
AC_SUBST(version)
AC_OUTPUT( Makefile.global source/config.pas )
echo "
Summary
=======
Target op. system $os
Target processor $architecture
Install prefix $bprefix
Type '${make}' for compilation and then '${make} install'.
"
test "$stagedir" != "" && echo Install to FreeBSD stage directory: $prefix