1 # generated automatically by aclocal 1.9.6 -*- Autoconf -*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005 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
14 AC_DEFUN([AC_PACKAGE_NEED_SYS_ACL_H],
15 [ AC_CHECK_HEADERS([sys/acl.h])
16 if test "$ac_cv_header_sys_acl_h" != "yes"; then
18 echo 'FATAL ERROR: sys/acl.h does not exist.'
19 echo 'Install the access control lists (acl) development package.'
20 echo 'Alternatively, run "make install-dev" from the acl source.'
25 AC_DEFUN([AC_PACKAGE_NEED_ACL_LIBACL_H],
26 [ AC_CHECK_HEADERS([acl/libacl.h])
27 if test "$ac_cv_header_acl_libacl_h" != "yes"; then
29 echo 'FATAL ERROR: acl/libacl.h does not exist.'
30 echo 'Install the access control lists (acl) development package.'
31 echo 'Alternatively, run "make install-dev" from the acl source.'
37 AC_DEFUN([AC_PACKAGE_NEED_ACLINIT_LIBACL],
38 [ AC_CHECK_LIB(acl, acl_init,, [
40 echo 'FATAL ERROR: could not find a valid Access Control List library.'
41 echo 'Install either the libacl (rpm) or the libacl1 (deb) package.'
42 echo 'Alternatively, run "make install-lib" from the acl source.'
46 test -f `pwd`/../acl/libacl/libacl.la && \
47 libacl="`pwd`/../acl/libacl/libacl.la"
48 test -f /usr/lib/libacl.la && libacl="/usr/lib/libacl.la"
52 AC_DEFUN([AC_PACKAGE_WANT_AIO],
53 [ AC_CHECK_HEADERS(libaio.h, [ have_aio=true ], [ have_aio=false ])
57 AC_DEFUN([AC_PACKAGE_NEED_ATTR_XATTR_H],
58 [ AC_CHECK_HEADERS([attr/xattr.h])
59 if test "$ac_cv_header_attr_xattr_h" != "yes"; then
61 echo 'FATAL ERROR: attr/xattr.h does not exist.'
62 echo 'Install the extended attributes (attr) development package.'
63 echo 'Alternatively, run "make install-dev" from the attr source.'
68 AC_DEFUN([AC_PACKAGE_NEED_ATTR_ERROR_H],
69 [ AC_CHECK_HEADERS([attr/error_context.h])
70 if test "$ac_cv_header_attr_error_context_h" != "yes"; then
72 echo 'FATAL ERROR: attr/error_context.h does not exist.'
73 echo 'Install the extended attributes (attr) development package.'
74 echo 'Alternatively, run "make install-dev" from the attr source.'
79 AC_DEFUN([AC_PACKAGE_NEED_ATTRIBUTES_H],
80 [ have_attributes_h=false
81 AC_CHECK_HEADERS([attr/attributes.h sys/attributes.h], [have_attributes_h=true], )
82 if test "$have_attributes_h" = "false"; then
84 echo 'FATAL ERROR: attributes.h does not exist.'
85 echo 'Install the extended attributes (attr) development package.'
86 echo 'Alternatively, run "make install-dev" from the attr source.'
91 AC_DEFUN([AC_PACKAGE_WANT_ATTRLIST_LIBATTR],
92 [ AC_CHECK_LIB(attr, attr_list, [have_attr_list=true], [have_attr_list=false])
93 AC_SUBST(have_attr_list)
96 AC_DEFUN([AC_PACKAGE_NEED_GETXATTR_LIBATTR],
97 [ AC_CHECK_LIB(attr, getxattr,, [
99 echo 'FATAL ERROR: could not find a valid Extended Attributes library.'
100 echo 'Install the extended attributes (attr) development package.'
101 echo 'Alternatively, run "make install-lib" from the attr source.'
105 test -f `pwd`/../attr/libattr/libattr.la && \
106 libattr="`pwd`/../attr/libattr/libattr.la"
107 test -f /usr/lib/libattr.la && libattr="/usr/lib/libattr.la"
111 AC_DEFUN([AC_PACKAGE_NEED_ATTRGET_LIBATTR],
112 [ AC_CHECK_LIB(attr, attr_get,, [
114 echo 'FATAL ERROR: could not find a valid Extended Attributes library.'
115 echo 'Install the extended attributes (attr) development package.'
116 echo 'Alternatively, run "make install-lib" from the attr source.'
120 test -f `pwd`/../attr/libattr/libattr.la && \
121 libattr="`pwd`/../attr/libattr/libattr.la"
122 test -f /usr/lib/libattr.la && libattr="/usr/lib/libattr.la"
126 AC_DEFUN([AC_PACKAGE_NEED_ATTRIBUTES_MACROS],
127 [ AC_MSG_CHECKING([macros in attr/attributes.h])
129 #include <sys/types.h>
130 #include <attr/attributes.h>],
131 [ int x = ATTR_SECURE; ], [ echo ok ], [
133 echo 'FATAL ERROR: could not find a current attributes header.'
134 echo 'Upgrade the extended attributes (attr) development package.'
135 echo 'Alternatively, run "make install-dev" from the attr source.'
139 AC_DEFUN([AC_PACKAGE_WANT_NDBM],
140 [ AC_CHECK_HEADERS(ndbm.h, [ have_db=true ], [ have_db=false ])
146 AC_DEFUN([AC_PACKAGE_WANT_GDBM],
147 [ AC_CHECK_HEADERS([gdbm/ndbm.h], [ have_db=true ], [ have_db=false ])
148 if test $have_db = true -a -f /usr/lib/libgdbm.a; then
149 libgdbm="/usr/lib/libgdbm.a"
156 # Generic macro, sets up all of the global packaging variables.
157 # The following environment variables may be set to override defaults:
158 # DEBUG OPTIMIZER MALLOCLIB PLATFORM DISTRIBUTION INSTALL_USER INSTALL_GROUP
161 AC_DEFUN([AC_PACKAGE_GLOBALS],
166 pkg_version=${PKG_MAJOR}.${PKG_MINOR}.${PKG_REVISION}
167 AC_SUBST(pkg_version)
168 pkg_release=$PKG_BUILD
169 test -z "$BUILD_VERSION" || pkg_release="$BUILD_VERSION"
170 AC_SUBST(pkg_release)
172 DEBUG=${DEBUG:-'-DDEBUG'} dnl -DNDEBUG
174 AC_SUBST(debug_build)
176 OPTIMIZER=${OPTIMIZER:-'-g'} dnl -O2
177 opt_build="$OPTIMIZER"
180 MALLOCLIB=${MALLOCLIB:-''} dnl /usr/lib/libefence.a
181 malloc_lib="$MALLOCLIB"
185 test -z "$INSTALL_USER" || pkg_user="$INSTALL_USER"
189 test -z "$INSTALL_GROUP" || pkg_group="$INSTALL_GROUP"
192 pkg_distribution=`uname -s`
193 test -z "$DISTRIBUTION" || pkg_distribution="$DISTRIBUTION"
194 AC_SUBST(pkg_distribution)
196 pkg_platform=`uname -s | tr 'A-Z' 'a-z' | sed -e 's/irix64/irix/'`
197 test -z "$PLATFORM" || pkg_platform="$PLATFORM"
198 AC_SUBST(pkg_platform)
202 # Check for specified utility (env var) - if unset, fail.
204 AC_DEFUN([AC_PACKAGE_NEED_UTILITY],
205 [ if test -z "$2"; then
207 echo FATAL ERROR: $3 does not seem to be installed.
208 echo $1 cannot be built without a working $4 installation.
214 # Generic macro, sets up all of the global build variables.
215 # The following environment variables may be set to override defaults:
216 # CC MAKE LIBTOOL TAR ZIP MAKEDEPEND AWK SED ECHO SORT
217 # MSGFMT MSGMERGE RPM
219 AC_DEFUN([AC_PACKAGE_UTILITIES],
223 AC_PACKAGE_NEED_UTILITY($1, "$cc", cc, [C compiler])
225 if test -z "$MAKE"; then
226 AC_PATH_PROG(MAKE, gmake,, /usr/bin:/usr/local/bin:/usr/freeware/bin)
228 if test -z "$MAKE"; then
229 AC_PATH_PROG(MAKE, make,, /usr/bin)
233 AC_PACKAGE_NEED_UTILITY($1, "$make", make, [GNU make])
235 if test -z "$LIBTOOL"; then
236 AC_PATH_PROG(LIBTOOL, glibtool,, /usr/bin)
238 if test -z "$LIBTOOL"; then
239 AC_PATH_PROG(LIBTOOL, libtool,, /usr/bin:/usr/local/bin:/usr/freeware/bin)
243 AC_PACKAGE_NEED_UTILITY($1, "$libtool", libtool, [GNU libtool])
245 if test -z "$TAR"; then
246 AC_PATH_PROG(TAR, tar,, /usr/freeware/bin:/bin:/usr/local/bin:/usr/bin)
250 if test -z "$ZIP"; then
251 AC_PATH_PROG(ZIP, gzip,, /bin:/usr/bin:/usr/local/bin:/usr/freeware/bin)
257 if test -z "$MAKEDEPEND"; then
258 AC_PATH_PROG(MAKEDEPEND, makedepend, /bin/true)
260 makedepend=$MAKEDEPEND
263 if test -z "$AWK"; then
264 AC_PATH_PROG(AWK, awk,, /bin:/usr/bin)
269 if test -z "$SED"; then
270 AC_PATH_PROG(SED, sed,, /bin:/usr/bin)
275 if test -z "$ECHO"; then
276 AC_PATH_PROG(ECHO, echo,, /bin:/usr/bin)
281 if test -z "$SORT"; then
282 AC_PATH_PROG(SORT, sort,, /bin:/usr/bin)
287 dnl check if symbolic links are supported
290 if test "$enable_gettext" = yes; then
291 if test -z "$MSGFMT"; then
292 AC_PATH_PROG(MSGFMT, msgfmt,, /usr/bin:/usr/local/bin:/usr/freeware/bin)
296 AC_PACKAGE_NEED_UTILITY($1, "$msgfmt", msgfmt, gettext)
298 if test -z "$MSGMERGE"; then
299 AC_PATH_PROG(MSGMERGE, msgmerge,, /usr/bin:/usr/local/bin:/usr/freeware/bin)
303 AC_PACKAGE_NEED_UTILITY($1, "$msgmerge", msgmerge, gettext)
306 if test -z "$RPM"; then
307 AC_PATH_PROG(RPM, rpm,, /bin:/usr/bin:/usr/freeware/bin)
312 dnl .. and what version is rpm
314 test -n "$RPM" && test -x "$RPM" && rpm_version=`$RPM --version \
315 | awk '{print $NF}' | awk -F. '{V=1; print $V}'`
316 AC_SUBST(rpm_version)
317 dnl At some point in rpm 4.0, rpm can no longer build rpms, and
318 dnl rpmbuild is needed (rpmbuild may go way back; not sure)
319 dnl So, if rpm version >= 4.0, look for rpmbuild. Otherwise build w/ rpm
320 if test $rpm_version -ge 4; then
321 AC_PATH_PROG(RPMBUILD, rpmbuild)
329 AC_DEFUN([AC_PACKAGE_NEED_UUID_H],
330 [ AC_CHECK_HEADERS([uuid.h sys/uuid.h uuid/uuid.h])
331 if test $ac_cv_header_uuid_h = no -a \
332 $ac_cv_header_sys_uuid_h = no -a \
333 $ac_cv_header_uuid_uuid_h = no; then
335 echo 'FATAL ERROR: could not find a valid UUID header.'
336 echo 'Install the Universally Unique Identifiers development package.'
341 AC_DEFUN([AC_PACKAGE_NEED_UUIDCOMPARE],
342 [ AC_CHECK_FUNCS(uuid_compare)
343 if test $ac_cv_func_uuid_compare = yes; then
346 AC_CHECK_LIB(uuid, uuid_compare,, [
348 echo 'FATAL ERROR: could not find a valid UUID library.'
349 echo 'Install the Universally Unique Identifiers library package.'
356 AC_DEFUN([AC_PACKAGE_NEED_XFS_LIBXFS_H],
357 [ AC_CHECK_HEADERS([xfs/libxfs.h])
358 if test "$ac_cv_header_xfs_libxfs_h" != "yes"; then
360 echo 'FATAL ERROR: cannot find a valid <xfs/libxfs.h> header file.'
361 echo 'Install or upgrade the XFS development package.'
362 echo 'Alternatively, run "make install-dev" from the xfsprogs source.'
367 AC_DEFUN([AC_PACKAGE_NEED_XFS_XQM_H],
368 [ AC_CHECK_HEADERS([xfs/xqm.h])
369 if test "$ac_cv_header_xfs_xqm_h" != "yes"; then
371 echo 'FATAL ERROR: cannot find a valid <xfs/xqm.h> header file.'
372 echo 'Install or upgrade the XFS development package.'
373 echo 'Alternatively, run "make install-dev" from the xfsprogs source.'
378 AC_DEFUN([AC_PACKAGE_NEED_XFS_HANDLE_H],
379 [ AC_CHECK_HEADERS([xfs/handle.h])
380 if test "$ac_cv_header_xfs_handle_h" != "yes"; then
382 echo 'FATAL ERROR: cannot find a valid <xfs/handle.h> header file.'
383 echo 'Install or upgrade the XFS development package.'
384 echo 'Alternatively, run "make install-dev" from the xfsprogs source.'
389 AC_DEFUN([AC_PACKAGE_NEED_LIBXFSINIT_LIBXFS],
390 [ AC_CHECK_LIB(xfs, libxfs_init,, [
392 echo 'FATAL ERROR: could not find a valid XFS base library.'
393 echo 'Install or upgrade the XFS library package.'
394 echo 'Alternatively, run "make install-dev" from the xfsprogs source.'
398 test -f `pwd`/../xfsprogs/libxfs/libxfs.la && \
399 libxfs="`pwd`/../xfsprogs/libxfs/libxfs.la"
400 test -f /usr/lib/libxfs.la && libxfs="/usr/lib/libxfs.la"
404 AC_DEFUN([AC_PACKAGE_NEED_OPEN_BY_FSHANDLE],
405 [ AC_CHECK_LIB(handle, open_by_fshandle,, [
407 echo 'FATAL ERROR: could not find a current XFS handle library.'
408 echo 'Install or upgrade the XFS library package.'
409 echo 'Alternatively, run "make install-dev" from the xfsprogs source.'
413 test -f `pwd`/../xfsprogs/libhandle/libhandle.la && \
414 libhdl="`pwd`/../xfsprogs/libhandle/libhandle.la"
415 test -f /usr/lib/libhandle.la && libhdl="/usr/lib/libhandle.la"
419 AC_DEFUN([AC_PACKAGE_NEED_ATTRLIST_LIBHANDLE],
420 [ AC_CHECK_LIB(handle, attr_list_by_handle,, [
422 echo 'FATAL ERROR: could not find a current XFS handle library.'
423 echo 'Install or upgrade the XFS library package.'
424 echo 'Alternatively, run "make install-lib" from the xfsprogs source.'
428 test -f `pwd`/../xfsprogs/libhandle/libhandle.la && \
429 libhdl="`pwd`/../xfsprogs/libhandle/libhandle.la"
430 test -f /usr/lib/libhandle.la && libhdl="/usr/lib/libhandle.la"
434 AC_DEFUN([AC_PACKAGE_NEED_IRIX_LIBHANDLE],
436 AC_MSG_CHECKING([libhandle.a for IRIX])
437 libhdl="`pwd`/../irix/libhandle/libhandle.a"
438 if ! test -f $libhdl; then
440 echo 'FATAL ERROR: could not find IRIX XFS handle library.'
447 AC_DEFUN([AC_PACKAGE_NEED_XFSCTL_MACRO],
448 [ AC_MSG_CHECKING([xfsctl from xfs/libxfs.h])
449 AC_TRY_LINK([#include <xfs/libxfs.h>], [ int x = xfsctl(0, 0, 0, 0); ],
452 echo 'FATAL ERROR: cannot find required macros in the XFS headers.'
453 echo 'Upgrade your XFS programs (xfsprogs) development package.'
454 echo 'Alternatively, run "make install-dev" from the xfsprogs source.'