]>
Commit | Line | Data |
---|---|---|
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 | ||
21 | dnl Process this file with autoconf to produce a configure script. | |
13c7b701 | 22 | AC_INIT(lib/device/dev-cache.h) |
795ca3e5 AK |
23 | |
24 | dnl setup the directory where autoconf has auxilary files | |
25 | AC_CONFIG_AUX_DIR(autoconf) | |
26 | ||
27 | dnl Checks for programs. | |
28 | AC_PROG_AWK | |
29 | AC_PROG_CC | |
30 | AC_PROG_INSTALL | |
31 | AC_PROG_LN_S | |
32 | AC_PROG_MAKE_SET | |
33 | AC_PROG_RANLIB | |
34 | ||
35 | dnl Checks for header files. | |
36 | AC_HEADER_DIRENT | |
37 | AC_HEADER_STDC | |
38 | AC_CHECK_HEADERS(fcntl.h malloc.h sys/ioctl.h unistd.h) | |
39 | ||
40 | dnl Checks for typedefs, structures, and compiler characteristics. | |
41 | AC_C_CONST | |
42 | AC_C_INLINE | |
43 | AC_TYPE_OFF_T | |
44 | AC_TYPE_PID_T | |
45 | AC_TYPE_SIZE_T | |
46 | AC_STRUCT_ST_RDEV | |
47 | AC_HEADER_TIME | |
48 | ||
49 | dnl -- prefix is /usr by default, the exec_prefix default is setup later | |
50 | AC_PREFIX_DEFAULT(/usr) | |
51 | ||
52 | dnl -- setup the ownership of the files | |
53 | AC_ARG_WITH(user, | |
54 | [ --with-user=USER Set the owner of installed files ], | |
55 | [ OWNER="$withval" ], | |
56 | [ OWNER="root" ]) | |
57 | ||
58 | dnl -- setup the group ownership of the files | |
59 | AC_ARG_WITH(group, | |
60 | [ --with-group=GROUP Set the group owner of installed files ], | |
61 | [ GROUP="$withval" ], | |
62 | [ GROUP="root" ]) | |
63 | ||
795ca3e5 AK |
64 | AC_ARG_ENABLE(jobs, [ --enable-jobs=NUM Number of jobs to run simultaneously], JOBS=-j$enableval, JOBS=) |
65 | ||
66 | dnl Enables staticly linked tools | |
67 | AC_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 | ||
70 | dnl Disable readline | |
71 | AC_ARG_ENABLE(readline, [ --disable-readline Disable readline support], \ | |
72 | READLINE=$enableval, READLINE=yes) | |
73 | ||
74 | dnl Mess with default exec_prefix | |
75 | if [[ "x$exec_prefix" = xNONE -a "x$prefix" = xNONE ]]; | |
76 | then exec_prefix=""; | |
77 | fi; | |
78 | ||
79 | dnl Checks for library functions. | |
80 | AC_PROG_GCC_TRADITIONAL | |
81 | AC_TYPE_SIGNAL | |
82 | AC_FUNC_VPRINTF | |
83 | AC_CHECK_FUNCS(mkdir rmdir uname) | |
84 | ||
85 | dnl check for termcap (Shamelessly copied from parted 1.4.17) | |
86 | if test x$READLINE = xyes; then | |
87 | AC_SEARCH_LIBS(tgetent, ncurses curses termcap termlib, , | |
88 | AC_MSG_ERROR( | |
89 | termcap could not be found which is required for the | |
90 | --enable-readline option (which is enabled by default). Either disable readline | |
91 | support with --disable-readline or download and install termcap from: | |
92 | ftp.gnu.org/gnu/termcap | |
93 | Note: 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). | |
95 | Note: (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 | ) | |
100 | fi | |
101 | ||
102 | dnl Check for readline (Shamelessly copied from parted 1.4.17) | |
103 | if test x$READLINE = xyes; then | |
104 | AC_CHECK_LIB(readline, readline, , | |
105 | AC_MSG_ERROR( | |
106 | GNU Readline could not be found which is required for the | |
107 | --enable-readline option (which is enabled by default). Either disable readline | |
108 | support with --disable-readline or download and install readline from: | |
109 | ftp.gnu.org/gnu/readline | |
110 | Note: if you are using precompiled packages you will also need the development | |
111 | package 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 |
117 | fi |
118 | ||
119 | AC_SUBST(JOBS) | |
120 | AC_SUBST(STATIC_LINK) | |
121 | AC_SUBST(READLINE) | |
83912faa | 122 | AC_SUBST(HAVE_RL_COMPLETION_MATCHES) |
795ca3e5 AK |
123 | AC_SUBST(OWNER) |
124 | AC_SUBST(GROUP) | |
5f68d858 | 125 | AC_SUBST(LIBS) |
795ca3e5 AK |
126 | dnl First and last lines should not contain files to generate in order to |
127 | dnl keep utility scripts running properly | |
128 | AC_OUTPUT( \ | |
129 | Makefile \ | |
130 | make.tmpl \ | |
fa42e649 | 131 | include/Makefile \ |
795ca3e5 AK |
132 | lib/Makefile \ |
133 | man/Makefile \ | |
134 | tools/Makefile \ | |
e6efb2b0 | 135 | test/mm/Makefile \ |
43b7b8cf | 136 | test/device/Makefile \ |
e0304b58 | 137 | test/format1/Makefile \ |
d1b28647 | 138 | test/regex/Makefile \ |
291ec3b6 | 139 | test/filters/Makefile \ |
795ca3e5 | 140 | ) |