1 # aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*-
3 # Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
4 # Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
15 # Generic macro, sets up all of the global packaging variables.
16 # The following environment variables may be set to override defaults:
17 # DEBUG OPTIMIZER MALLOCLIB PLATFORM DISTRIBUTION INSTALL_USER INSTALL_GROUP
20 AC_DEFUN([AC_PACKAGE_GLOBALS],
25 pkg_version=${PKG_MAJOR}.${PKG_MINOR}.${PKG_REVISION}
27 pkg_release=$PKG_BUILD
28 test -z "$BUILD_VERSION" || pkg_release="$BUILD_VERSION"
31 DEBUG=${DEBUG:-'-DDEBUG'} dnl -DNDEBUG
35 OPTIMIZER=${OPTIMIZER:-'-g'} dnl -O2
36 opt_build="$OPTIMIZER"
39 MALLOCLIB=${MALLOCLIB:-''} dnl /usr/lib/libefence.a
40 malloc_lib="$MALLOCLIB"
43 PKG_USER=${INSTALL_USER:-'root'}
47 PKG_GROUP=${INSTALL_GROUP:-'root'}
48 pkg_group="$PKG_GROUP"
51 pkg_distribution=`uname -s`
52 test -z "$DISTRIBUTION" || pkg_distribution="$DISTRIBUTION"
53 AC_SUBST(pkg_distribution)
55 pkg_platform=`uname -s | tr 'A-Z' 'a-z' | sed -e 's/irix64/irix/'`
56 test -z "$PLATFORM" || pkg_platform="$PLATFORM"
57 AC_SUBST(pkg_platform)
61 # Check for specified utility (env var) - if unset, fail.
63 AC_DEFUN([AC_PACKAGE_NEED_UTILITY],
64 [ if test -z "$2"; then
66 echo FATAL ERROR: $3 does not seem to be installed.
67 echo $1 cannot be built without a working $4 installation.
73 # Generic macro, sets up all of the global build variables.
74 # The following environment variables may be set to override defaults:
75 # CC MAKE LIBTOOL TAR ZIP MAKEDEPEND AWK SED ECHO SORT
78 AC_DEFUN([AC_PACKAGE_UTILITIES],
82 AC_PACKAGE_NEED_UTILITY($1, "$cc", cc, [C compiler])
84 if test -z "$MAKE"; then
85 AC_PATH_PROG(MAKE, gmake,, /usr/bin:/usr/freeware/bin)
87 if test -z "$MAKE"; then
88 AC_PATH_PROG(MAKE, make,, /usr/bin)
92 AC_PACKAGE_NEED_UTILITY($1, "$make", make, [GNU make])
94 if test -z "$LIBTOOL"; then
95 AC_PATH_PROG(LIBTOOL, glibtool,, /usr/bin)
97 if test -z "$LIBTOOL"; then
98 AC_PATH_PROG(LIBTOOL, libtool,, /usr/bin:/usr/local/bin:/usr/freeware/bin)
102 AC_PACKAGE_NEED_UTILITY($1, "$libtool", libtool, [GNU libtool])
104 if test -z "$TAR"; then
105 AC_PATH_PROG(TAR, tar,, /usr/freeware/bin:/bin:/usr/local/bin:/usr/bin)
109 if test -z "$ZIP"; then
110 AC_PATH_PROG(ZIP, gzip,, /bin:/usr/local/bin:/usr/freeware/bin)
116 if test -z "$MAKEDEPEND"; then
117 AC_PATH_PROG(MAKEDEPEND, makedepend, /bin/true)
119 makedepend=$MAKEDEPEND
122 if test -z "$AWK"; then
123 AC_PATH_PROG(AWK, awk,, /bin:/usr/bin)
128 if test -z "$SED"; then
129 AC_PATH_PROG(SED, sed,, /bin:/usr/bin)
134 if test -z "$ECHO"; then
135 AC_PATH_PROG(ECHO, echo,, /bin:/usr/bin)
140 if test -z "$SORT"; then
141 AC_PATH_PROG(SORT, sort,, /bin:/usr/bin)
146 dnl check if symbolic links are supported
149 if test "$enable_gettext" = yes; then
150 if test -z "$MSGFMT"; then
151 AC_PATH_PROG(MSGFMT, msgfmt,, /usr/bin:/usr/freeware/bin)
155 AC_PACKAGE_NEED_UTILITY($1, "$msgfmt", msgfmt, gettext)
157 if test -z "$MSGMERGE"; then
158 AC_PATH_PROG(MSGMERGE, msgmerge,, /usr/bin:/usr/freeware/bin)
162 AC_PACKAGE_NEED_UTILITY($1, "$msgmerge", msgmerge, gettext)
165 if test -z "$RPM"; then
166 AC_PATH_PROG(RPM, rpm,, /bin:/usr/bin:/usr/freeware/bin)
171 dnl .. and what version is rpm
173 test -x "$RPM" && rpm_version=`$RPM --version \
174 | awk '{print $NF}' | awk -F. '{V=1; print $V}'`
175 AC_SUBST(rpm_version)
176 dnl At some point in rpm 4.0, rpm can no longer build rpms, and
177 dnl rpmbuild is needed (rpmbuild may go way back; not sure)
178 dnl So, if rpm version >= 4.0, look for rpmbuild. Otherwise build w/ rpm
179 if test $rpm_version -ge 4; then
180 AC_PATH_PROG(RPMBUILD, rpmbuild)
188 AC_DEFUN([AC_PACKAGE_NEED_UUID_H],
189 [ AC_CHECK_HEADERS(uuid.h)
190 if test $ac_cv_header_uuid_h = no; then
191 AC_CHECK_HEADERS(uuid/uuid.h,, [
193 echo 'FATAL ERROR: could not find a valid UUID header.'
194 echo 'Install the Universally Unique Identifiers development package.'
199 AC_DEFUN([AC_PACKAGE_NEED_UUIDCOMPARE],
200 [ AC_CHECK_FUNCS(uuid_compare)
201 if test $ac_cv_func_uuid_compare = yes; then
204 AC_CHECK_LIB(uuid, uuid_compare,, [
206 echo 'FATAL ERROR: could not find a valid UUID library.'
207 echo 'Install the Universally Unique Identifiers library package.'
214 AC_DEFUN([AC_PACKAGE_NEED_SYS_ACL_H],
215 [ AC_CHECK_HEADERS([sys/acl.h])
216 if test "$ac_cv_header_sys_acl_h" != "yes"; then
218 echo 'FATAL ERROR: sys/acl.h does not exist.'
219 echo 'Install the access control lists (acl) development package.'
220 echo 'Alternatively, run "make install-lib" from the acl source.'
225 AC_DEFUN([AC_PACKAGE_NEED_ACL_LIBACL_H],
226 [ AC_CHECK_HEADERS([acl/libacl.h])
227 if test "$ac_cv_header_acl_libacl_h" != "yes"; then
229 echo 'FATAL ERROR: acl/libacl.h does not exist.'
230 echo 'Install the access control lists (acl) development package.'
231 echo 'Alternatively, run "make install-lib" from the acl source.'
237 AC_DEFUN([AC_PACKAGE_NEED_ACLINIT_LIBACL],
238 [ AC_CHECK_LIB(acl, acl_init,, [
240 echo 'FATAL ERROR: could not find a valid Access Control List library.'
241 echo 'Install either the libacl (rpm) or the libacl1 (deb) package.'
242 echo 'Alternatively, run "make install-lib" from the acl source.'
246 test -f `pwd`/../acl/libacl/libacl.la && \
247 libacl="`pwd`/../acl/libacl/libacl.la"
248 test -f /usr/lib/libacl.la && libacl="/usr/lib/libacl.la"
252 AC_DEFUN([AC_PACKAGE_WANT_NDBM],
253 [ AC_CHECK_HEADERS(ndbm.h, [ have_db=true ], [ have_db=false ])
259 AC_DEFUN([AC_PACKAGE_WANT_GDBM],
260 [ AC_CHECK_HEADERS([gdbm/ndbm.h], [ have_db=true ], [ have_db=false ])
261 if test $have_db = true -a -f /usr/lib/libgdbm.a; then
262 libgdbm="/usr/lib/libgdbm.a"
268 AC_DEFUN([AC_PACKAGE_NEED_XFS_LIBXFS_H],
269 [ AC_CHECK_HEADERS([xfs/libxfs.h])
270 if test "$ac_cv_header_xfs_libxfs_h" != "yes"; then
272 echo 'FATAL ERROR: cannot find a valid <xfs/libxfs.h> header file.'
273 echo 'Install or upgrade the XFS development package.'
274 echo 'Alternatively, run "make install-dev" from the xfsprogs source.'
279 AC_DEFUN([AC_PACKAGE_NEED_XFS_XQM_H],
280 [ AC_CHECK_HEADERS([xfs/xqm.h])
281 if test "$ac_cv_header_xfs_xqm_h" != "yes"; then
283 echo 'FATAL ERROR: cannot find a valid <xfs/xqm.h> header file.'
284 echo 'Install or upgrade the XFS development package.'
285 echo 'Alternatively, run "make install-dev" from the xfsprogs source.'
290 AC_DEFUN([AC_PACKAGE_NEED_XFS_HANDLE_H],
291 [ AC_CHECK_HEADERS([xfs/handle.h])
292 if test "$ac_cv_header_xfs_handle_h" != "yes"; then
294 echo 'FATAL ERROR: cannot find a valid <xfs/handle.h> header file.'
295 echo 'Install or upgrade the XFS development package.'
296 echo 'Alternatively, run "make install-dev" from the xfsprogs source.'
301 AC_DEFUN([AC_PACKAGE_NEED_LIBXFSINIT_LIBXFS],
302 [ AC_CHECK_LIB(xfs, libxfs_init,, [
304 echo 'FATAL ERROR: could not find a valid XFS base library.'
305 echo 'Install or upgrade the XFS library package.'
306 echo 'Alternatively, run "make install-dev" from the xfsprogs source.'
310 test -f `pwd`/../xfsprogs/libxfs/libxfs.la && \
311 libxfs="`pwd`/../xfsprogs/libxfs/libxfs.la"
312 test -f /usr/lib/libxfs.la && libxfs="/usr/lib/libxfs.la"
316 AC_DEFUN([AC_PACKAGE_NEED_OPEN_BY_FSHANDLE],
317 [ AC_CHECK_LIB(handle, open_by_fshandle,, [
319 echo 'FATAL ERROR: could not find a current XFS handle library.'
320 echo 'Install or upgrade the XFS library package.'
321 echo 'Alternatively, run "make install-dev" from the xfsprogs source.'
325 test -f `pwd`/../xfsprogs/libhandle/libhandle.la && \
326 libhdl="`pwd`/../xfsprogs/libhandle/libhandle.la"
327 test -f /usr/lib/libhandle.la && libhdl="/usr/lib/libhandle.la"
331 AC_DEFUN([AC_PACKAGE_NEED_XFSCTL_MACRO],
332 [ AC_MSG_CHECKING([xfsctl from xfs/libxfs.h])
333 AC_TRY_LINK([#include <xfs/libxfs.h>], [ int x = xfsctl(0, 0, 0, 0); ],
336 echo 'FATAL ERROR: cannot find required macros in the XFS headers.'
337 echo 'Upgrade your XFS programs (xfsprogs) development package.'
338 echo 'Alternatively, run "make install-dev" from the xfsprogs source.'
343 AC_DEFUN([AC_PACKAGE_NEED_ATTR_XATTR_H],
344 [ AC_CHECK_HEADERS([attr/xattr.h])
345 if test "$ac_cv_header_attr_xattr_h" != "yes"; then
347 echo 'FATAL ERROR: attr/xattr.h does not exist.'
348 echo 'Install the extended attributes (attr) development package.'
349 echo 'Alternatively, run "make install-lib" from the attr source.'
354 AC_DEFUN([AC_PACKAGE_NEED_ATTR_ERROR_H],
355 [ AC_CHECK_HEADERS([attr/error_context.h])
356 if test "$ac_cv_header_attr_error_context_h" != "yes"; then
358 echo 'FATAL ERROR: attr/error_context.h does not exist.'
359 echo 'Install the extended attributes (attr) development package.'
360 echo 'Alternatively, run "make install-lib" from the attr source.'
365 AC_DEFUN([AC_PACKAGE_NEED_ATTR_ATTRIBUTES_H],
366 [ AC_CHECK_HEADERS([attr/attributes.h])
367 if test "$ac_cv_header_attr_attributes_h" != "yes"; then
369 echo 'FATAL ERROR: attr/attributes.h does not exist.'
370 echo 'Install the extended attributes (attr) development package.'
371 echo 'Alternatively, run "make install-lib" from the attr source.'
376 AC_DEFUN([AC_PACKAGE_NEED_GETXATTR_LIBATTR],
377 [ AC_CHECK_LIB(attr, getxattr,, [
379 echo 'FATAL ERROR: could not find a valid Extended Attributes library.'
380 echo 'Install the extended attributes (attr) development package.'
381 echo 'Alternatively, run "make install-lib" from the attr source.'
385 test -f `pwd`/../attr/libattr/libattr.la && \
386 libattr="`pwd`/../attr/libattr/libattr.la"
387 test -f /usr/lib/libattr.la && libattr="/usr/lib/libattr.la"
391 AC_DEFUN([AC_PACKAGE_NEED_ATTRGET_LIBATTR],
392 [ AC_CHECK_LIB(attr, attr_get,, [
394 echo 'FATAL ERROR: could not find a valid Extended Attributes library.'
395 echo 'Install the extended attributes (attr) development package.'
396 echo 'Alternatively, run "make install-lib" from the attr source.'
400 test -f `pwd`/../attr/libattr/libattr.la && \
401 libattr="`pwd`/../attr/libattr/libattr.la"
402 test -f /usr/lib/libattr.la && libattr="/usr/lib/libattr.la"
406 AC_DEFUN([AC_PACKAGE_NEED_ATTRIBUTES_MACROS],
407 [ AC_MSG_CHECKING([macros in attr/attributes.h])
409 #include <sys/types.h>
410 #include <attr/attributes.h>],
411 [ int x = ATTR_SECURE; ], [ echo ok ], [
413 echo 'FATAL ERROR: could not find a current attributes header.'
414 echo 'Upgrade the extended attributes (attr) development package.'
415 echo 'Alternatively, run "make install-dev" from the attr source.'