]> sourceware.org Git - lvm2.git/blame - configure.in
Add function that returns the library version.
[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
795ca3e5
AK
64AC_ARG_ENABLE(jobs, [ --enable-jobs=NUM Number of jobs to run simultaneously], JOBS=-j$enableval, JOBS=)
65
66dnl Enables staticly linked tools
67AC_ARG_ENABLE(static_link, [ --enable-static_link Use this to link the tools to the liblvm library
68 statically. Default is dynamic linking], STATIC_LINK=$enableval, STATIC_LINK=no)
69
70dnl Disable readline
71AC_ARG_ENABLE(readline, [ --disable-readline Disable readline support], \
72READLINE=$enableval, READLINE=yes)
73
74dnl Mess with default exec_prefix
75if [[ "x$exec_prefix" = xNONE -a "x$prefix" = xNONE ]];
76 then exec_prefix="";
77fi;
78
79dnl Checks for library functions.
80AC_PROG_GCC_TRADITIONAL
81AC_TYPE_SIGNAL
82AC_FUNC_VPRINTF
83AC_CHECK_FUNCS(mkdir rmdir uname)
84
85dnl check for termcap (Shamelessly copied from parted 1.4.17)
86if test x$READLINE = xyes; then
87 AC_SEARCH_LIBS(tgetent, ncurses curses termcap termlib, ,
88 AC_MSG_ERROR(
89termcap could not be found which is required for the
90--enable-readline option (which is enabled by default). Either disable readline
91support with --disable-readline or download and install termcap from:
92 ftp.gnu.org/gnu/termcap
93Note: if you are using precompiled packages you will also need the development
94 package as well (which may be called termcap-devel or something similar).
95Note: (n)curses also seems to work as a substitute for termcap. This was
96 not found either - but you could try installing that as well.
97)
98 exit
99 )
100fi
101
102dnl Check for readline (Shamelessly copied from parted 1.4.17)
103if test x$READLINE = xyes; then
104 AC_CHECK_LIB(readline, readline, ,
105 AC_MSG_ERROR(
106GNU Readline could not be found which is required for the
107--enable-readline option (which is enabled by default). Either disable readline
108support with --disable-readline or download and install readline from:
109 ftp.gnu.org/gnu/readline
110Note: if you are using precompiled packages you will also need the development
111package as well (which may be called readline-devel or something similar).
112)
113 exit
114 )
83912faa
AK
115 AC_CHECK_FUNC(rl_completion_matches, HAVE_RL_COMPLETION_MATCHES=yes,
116 HAVE_RL_COMPLETION_MATCHES=no)
795ca3e5
AK
117fi
118
119AC_SUBST(JOBS)
120AC_SUBST(STATIC_LINK)
121AC_SUBST(READLINE)
83912faa 122AC_SUBST(HAVE_RL_COMPLETION_MATCHES)
795ca3e5
AK
123AC_SUBST(OWNER)
124AC_SUBST(GROUP)
5f68d858 125AC_SUBST(LIBS)
795ca3e5
AK
126dnl First and last lines should not contain files to generate in order to
127dnl keep utility scripts running properly
128AC_OUTPUT( \
129Makefile \
130make.tmpl \
fa42e649 131include/Makefile \
795ca3e5
AK
132lib/Makefile \
133man/Makefile \
134tools/Makefile \
e6efb2b0 135test/mm/Makefile \
43b7b8cf 136test/device/Makefile \
e0304b58 137test/format1/Makefile \
d1b28647 138test/regex/Makefile \
291ec3b6 139test/filters/Makefile \
795ca3e5 140)
This page took 0.037135 seconds and 5 git commands to generate.