-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac.in
116 lines (94 loc) · 2.95 KB
/
configure.ac.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# $Id: configure.ac.in,v 1.15 2004/06/09 16:42:58 flux Exp $
## are we using AC_CONFIG_HEADERS?
## in http://www.gnu.org/software/autoconf/manual/autoconf.html#Writing-Autoconf-Input
## it is suggested that this is required to output config.h
## we are using AM_CONFIG_HEADER instead. How does this work?
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.50)
AC_INIT([zoem], setversion_VERSION)
PACKAGE=$PACKAGE_NAME
VERSION=$PACKAGE_VERSION
AC_CONFIG_AUX_DIR(autofoo)
AC_CONFIG_SRCDIR([src/segment.c])
AM_INIT_AUTOMAKE
AC_CONFIG_HEADER(config.h)
# AC_CONFIG_HEADERS([config.h])
# add a `--enable-maintainer-mode' option to `configure'; `maintainer-only' rules turned off by
# default in Makefile.in's
AM_MAINTAINER_MODE
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
AC_ARG_WITH(
includepath,
AC_HELP_STRING(
[ --with-includepath=DIR ],
[ a colon separated list of directories where to look for definition
files. It is overridden by the environment variable ZOEMSEARCHPATH, if set.
The default is PREFIX/share/aephea. If Aephea files are installed e.g. as
/opt/aephea/aephea/simpledocument.zmm
/opt/aephea/pud/man.zmm
then pass --with-includepath=/opt/aephea.
If aephea is installed with the same PREFIX as zoem, nothing need be done.
]
),
[ if test "x$prefix" != xNONE; then
ac_cv_use_includepath=$withval:$prefix/share/aephea
else
ac_cv_use_includepath=$withval:/usr/local/share/aephea
fi
],
[ if test "x$prefix" != xNONE; then
ac_cv_use_includepath=$prefix/share/aephea
else
ac_cv_use_includepath=/usr/local/share/aephea
fi
]
)
AC_CACHE_CHECK(
Include path(s) to add,
ac_cv_use_includepath,
[
if test "x$prefix" != xNONE; then
ac_cv_use_includepath=$prefix/share/aephea
else
ac_cv_use_includepath=/usr/local/share/aephea
fi
]
)
AC_DEFINE_UNQUOTED(INCLUDEPATH, $ac_cv_use_includepath, [
where to look for zoem macro files
])
AC_SUBST(ac_cv_use_includepath)
# Checks for programs.
AC_PROG_AWK
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_RANLIB
# Checks for libraries.
AC_CHECK_LIB([m], [ceil])
# AC_CHECK_LIB([tingea], [mcxHashNew], [], [echo "Need cimfomfa (please read INSTALL)" && exit 1])
# Checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([fcntl.h float.h limits.h stdlib.h string.h ])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_PID_T
# Checks for library functions.
AC_FUNC_VPRINTF
AC_FUNC_FORK
AC_FUNC_MALLOC
AC_FUNC_MEMCMP
# AC_FUNC_REALLOC
AC_MMX_OPTION_READLINE
AC_CHECK_FUNCS([dup2 floor memset pow regcomp sqrt strchr strrchr strstr])
AC_CHECK_VA_COPY
# AC_CONFIG_FILES([])
AC_OUTPUT([
Makefile
doc/Makefile
examples/Makefile
src/Makefile
shed/Makefile
])