]> sourceware.org Git - lvm2.git/blame - configure.in
Abort if any filter creation fails.
[lvm2.git] / configure.in
CommitLineData
795ca3e5
AK
1################################################################################
2##
3## Copyright 1999-2000 Sistina Software, Inc.
4##
5## This is free software released under the GNU General Public License.
6## There is no warranty for this software. See the file COPYING for
7## details.
8##
9## See the file CONTRIBUTORS for a list of contributors.
10##
11## This file is maintained by:
12## AJ Lewis <lewis@sistina.com>
13##
14## File name: configure.in
15##
16## Description: Input file for autoconf. Generates the configure script
17## that tries to keep everything nice and portable. It also
18## simplifies distribution package building considerably.
19################################################################################
20
21dnl Process this file with autoconf to produce a configure script.
13c7b701 22AC_INIT(lib/device/dev-cache.h)
795ca3e5
AK
23
24dnl setup the directory where autoconf has auxilary files
25AC_CONFIG_AUX_DIR(autoconf)
26
27dnl Checks for programs.
28AC_PROG_AWK
29AC_PROG_CC
30AC_PROG_INSTALL
31AC_PROG_LN_S
32AC_PROG_MAKE_SET
33AC_PROG_RANLIB
34
35dnl Checks for header files.
36AC_HEADER_DIRENT
37AC_HEADER_STDC
38AC_CHECK_HEADERS(fcntl.h malloc.h sys/ioctl.h unistd.h)
39
40dnl Checks for typedefs, structures, and compiler characteristics.
41AC_C_CONST
42AC_C_INLINE
43AC_TYPE_OFF_T
44AC_TYPE_PID_T
45AC_TYPE_SIZE_T
46AC_STRUCT_ST_RDEV
47AC_HEADER_TIME
48
49dnl -- prefix is /usr by default, the exec_prefix default is setup later
50AC_PREFIX_DEFAULT(/usr)
51
52dnl -- setup the ownership of the files
53AC_ARG_WITH(user,
54 [ --with-user=USER Set the owner of installed files ],
55 [ OWNER="$withval" ],
56 [ OWNER="root" ])
57
58dnl -- setup the group ownership of the files
59AC_ARG_WITH(group,
60 [ --with-group=GROUP Set the group owner of installed files ],
61 [ GROUP="$withval" ],
62 [ GROUP="root" ])
63
5a52dca9
AK
64dnl -- format1 inclusion type
65AC_ARG_WITH(lvm1,
66 [ --with-lvm1=TYPE LVM1 metadata support: internal/shared/none
67 [TYPE=internal] ],
68 [ LVM1="$withval" ],
69 [ LVM1="internal" ])
70
71if [[ "x$LVM1" != xnone -a "x$LVM1" != xinternal -a "x$LVM1" != xshared ]];
72 then AC_MSG_ERROR(
73--with-lvm1 parameter invalid
74)
75 exit
76fi;
77
8ef2b021 78AC_ARG_ENABLE(jobs, [ --enable-jobs=NUM Number of jobs to run simultaneously], JOBS=-j$enableval, JOBS=-j2)
795ca3e5
AK
79
80dnl Enables staticly linked tools
81AC_ARG_ENABLE(static_link, [ --enable-static_link Use this to link the tools to the liblvm library
82 statically. Default is dynamic linking], STATIC_LINK=$enableval, STATIC_LINK=no)
83
5a52dca9
AK
84dnl Enable readline
85AC_ARG_ENABLE(readline, [ --enable-readline Enable readline support], \
86READLINE=$enableval, READLINE=no)
795ca3e5 87
8ef2b021
AK
88dnl Enable Debugging
89AC_ARG_ENABLE(debug, [ --enable-debug Enable debugging], \
90DEBUG=yes, DEBUG=no)
91
199e490e
AK
92dnl Disable devmapper
93AC_ARG_ENABLE(devmapper, [ --disable-devmapper Disable device-mapper interaction], \
94DEVMAPPER=no, DEVMAPPER=yes)
95
795ca3e5
AK
96dnl Mess with default exec_prefix
97if [[ "x$exec_prefix" = xNONE -a "x$prefix" = xNONE ]];
98 then exec_prefix="";
99fi;
100
101dnl Checks for library functions.
102AC_PROG_GCC_TRADITIONAL
103AC_TYPE_SIGNAL
104AC_FUNC_VPRINTF
105AC_CHECK_FUNCS(mkdir rmdir uname)
106
107dnl check for termcap (Shamelessly copied from parted 1.4.17)
108if test x$READLINE = xyes; then
109 AC_SEARCH_LIBS(tgetent, ncurses curses termcap termlib, ,
110 AC_MSG_ERROR(
111termcap could not be found which is required for the
112--enable-readline option (which is enabled by default). Either disable readline
113support with --disable-readline or download and install termcap from:
114 ftp.gnu.org/gnu/termcap
115Note: if you are using precompiled packages you will also need the development
116 package as well (which may be called termcap-devel or something similar).
117Note: (n)curses also seems to work as a substitute for termcap. This was
118 not found either - but you could try installing that as well.
119)
120 exit
121 )
122fi
123
26e7f2e0
AK
124dnl Check for dlopen
125AC_CHECK_LIB(dl, dlopen, HAVE_LIBDL=yes, HAVE_LIBDL=no)
126
127if test x$HAVE_LIBDL = xyes; then
128 LIBS="-ldl $LIBS"
129fi
130
795ca3e5
AK
131dnl Check for readline (Shamelessly copied from parted 1.4.17)
132if test x$READLINE = xyes; then
133 AC_CHECK_LIB(readline, readline, ,
134 AC_MSG_ERROR(
135GNU Readline could not be found which is required for the
136--enable-readline option (which is enabled by default). Either disable readline
137support with --disable-readline or download and install readline from:
138 ftp.gnu.org/gnu/readline
139Note: if you are using precompiled packages you will also need the development
140package as well (which may be called readline-devel or something similar).
141)
142 exit
143 )
83912faa
AK
144 AC_CHECK_FUNC(rl_completion_matches, HAVE_RL_COMPLETION_MATCHES=yes,
145 HAVE_RL_COMPLETION_MATCHES=no)
795ca3e5
AK
146fi
147
fae0c576
AK
148if test "-f VERSION"; then
149 LVM_VERSION="\"`cat VERSION`\""
150else
151 LVM_VERSION="Unknown"
152fi
153
795ca3e5
AK
154AC_SUBST(JOBS)
155AC_SUBST(STATIC_LINK)
156AC_SUBST(READLINE)
5a52dca9 157AC_SUBST(LVM1)
83912faa 158AC_SUBST(HAVE_RL_COMPLETION_MATCHES)
795ca3e5
AK
159AC_SUBST(OWNER)
160AC_SUBST(GROUP)
5f68d858 161AC_SUBST(LIBS)
fae0c576 162AC_SUBST(LVM_VERSION)
8ef2b021 163AC_SUBST(DEBUG)
199e490e 164AC_SUBST(DEVMAPPER)
26e7f2e0 165AC_SUBST(HAVE_LIBDL)
795ca3e5
AK
166dnl First and last lines should not contain files to generate in order to
167dnl keep utility scripts running properly
168AC_OUTPUT( \
169Makefile \
170make.tmpl \
fa42e649 171include/Makefile \
795ca3e5 172lib/Makefile \
5a52dca9 173lib/format1/Makefile \
795ca3e5
AK
174man/Makefile \
175tools/Makefile \
fae0c576 176tools/version.h \
e6efb2b0 177test/mm/Makefile \
43b7b8cf 178test/device/Makefile \
e0304b58 179test/format1/Makefile \
d1b28647 180test/regex/Makefile \
291ec3b6 181test/filters/Makefile \
795ca3e5 182)
This page took 0.045792 seconds and 5 git commands to generate.