From mornfall@sourceware.org Mon Jan 3 15:07:00 2011 From: mornfall@sourceware.org (mornfall@sourceware.org) Date: Mon, 03 Jan 2011 15:07:00 -0000 Subject: LVM2/test/api percent.c Message-ID: <20110103150740.29956.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: mornfall@sourceware.org 2011-01-03 15:07:40 Modified files: test/api : percent.c Log message: Use system assert in test/api/percent.c, for now. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/api/percent.c.diff?cvsroot=lvm2&r1=1.3&r2=1.4 --- LVM2/test/api/percent.c 2010/12/21 01:14:34 1.3 +++ LVM2/test/api/percent.c 2011/01/03 15:07:39 1.4 @@ -12,9 +12,10 @@ * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "lvm2app.h" +#undef NDEBUG -#define assert(x) do { if (!(x)) goto bad; } while (0) +#include "lvm2app.h" +#include "assert.h" int main(int argc, char *argv[]) { @@ -52,13 +53,4 @@ lvm_vg_close(vg); return 0; - -bad: - if (handle && lvm_errno(handle)) - fprintf(stderr, "LVM Error: %s\n", lvm_errmsg(handle)); - if (vg) - lvm_vg_close(vg); - if (handle) - lvm_quit(handle); - return 1; } From prajnoha@sourceware.org Tue Jan 4 14:43:00 2011 From: prajnoha@sourceware.org (prajnoha@sourceware.org) Date: Tue, 04 Jan 2011 14:43:00 -0000 Subject: LVM2 ./WHATS_NEW_DM libdm/libdevmapper.h libdm ... Message-ID: <20110104144354.14530.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: prajnoha@sourceware.org 2011-01-04 14:43:54 Modified files: . : WHATS_NEW_DM libdm : libdevmapper.h libdm/ioctl : libdm-iface.c Log message: Export DM_CONTROL_NODE_UMASK and use it while creating /dev/mapper/control. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW_DM.diff?cvsroot=lvm2&r1=1.434&r2=1.435 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/libdevmapper.h.diff?cvsroot=lvm2&r1=1.131&r2=1.132 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/ioctl/libdm-iface.c.diff?cvsroot=lvm2&r1=1.86&r2=1.87 --- LVM2/WHATS_NEW_DM 2010/12/21 21:08:52 1.434 +++ LVM2/WHATS_NEW_DM 2011/01/04 14:43:53 1.435 @@ -1,5 +1,6 @@ Version 1.02.61 - ==================================== + Export DM_CONTROL_NODE_UMASK and use it while creating /dev/mapper/control. Version 1.02.60 - 20th December 2010 ==================================== --- LVM2/libdm/libdevmapper.h 2010/12/20 13:39:12 1.131 +++ LVM2/libdm/libdevmapper.h 2011/01/04 14:43:54 1.132 @@ -1219,6 +1219,7 @@ int dm_udev_wait(uint32_t cookie); #define DM_DEV_DIR_UMASK 0022 +#define DM_CONTROL_NODE_UMASK 0177 #ifdef __cplusplus } --- LVM2/libdm/ioctl/libdm-iface.c 2010/12/13 10:43:58 1.86 +++ LVM2/libdm/ioctl/libdm-iface.c 2011/01/04 14:43:54 1.87 @@ -282,12 +282,14 @@ log_verbose("Creating device %s (%u, %u)", control, major, minor); (void) dm_prepare_selinux_context(control, S_IFCHR); + old_umask = umask(DM_CONTROL_NODE_UMASK); if (mknod(control, S_IFCHR | S_IRUSR | S_IWUSR, MKDEV(major, minor)) < 0) { log_sys_error("mknod", control); (void) dm_prepare_selinux_context(NULL, 0); return 0; } + umask(old_umask); (void) dm_prepare_selinux_context(NULL, 0); return 1; From jbrassow@sourceware.org Tue Jan 4 21:17:00 2011 From: jbrassow@sourceware.org (jbrassow@sourceware.org) Date: Tue, 04 Jan 2011 21:17:00 -0000 Subject: LVM2/scripts cmirrord_init_red_hat.in Message-ID: <20110104211658.15646.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: jbrassow@sourceware.org 2011-01-04 21:16:56 Modified files: scripts : cmirrord_init_red_hat.in Log message: Fix bug 632681: cmirrord shouldn't fail 'start' if already started Return 0 from the cmirrord init script if the daemon is already running. http://refspecs.freestandards.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/iniscrptact.html Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/scripts/cmirrord_init_red_hat.in.diff?cvsroot=lvm2&r1=1.4&r2=1.5 --- LVM2/scripts/cmirrord_init_red_hat.in 2010/01/22 16:19:38 1.4 +++ LVM2/scripts/cmirrord_init_red_hat.in 2011/01/04 21:16:54 1.5 @@ -21,6 +21,7 @@ start() { + rtrn=0 if ! pidof $DAEMON > /dev/null then echo -n "Starting $DAEMON: " From jbrassow@sourceware.org Tue Jan 4 21:33:00 2011 From: jbrassow@sourceware.org (jbrassow@sourceware.org) Date: Tue, 04 Jan 2011 21:33:00 -0000 Subject: LVM2 WHATS_NEW Message-ID: <20110104213311.25559.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: jbrassow@sourceware.org 2011-01-04 21:33:08 Modified files: . : WHATS_NEW Log message: Change to correct cmirrord return code is user visible - update WHATS_NEW file. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1856&r2=1.1857 --- LVM2/WHATS_NEW 2010/12/23 14:23:30 1.1856 +++ LVM2/WHATS_NEW 2011/01/04 21:33:06 1.1857 @@ -1,5 +1,6 @@ Version 2.02.80 - ==================================== + Correct return code of cmirrord when issuing 'start' when already running. Fix wrongly paired unlocking of global lock in pvchange. (2.02.66) Add backtraces for backup and backup_remove fail paths. Detect errors from dm_task_set calls in _get_device_info (dmeventd). From jbrassow@sourceware.org Tue Jan 4 21:41:00 2011 From: jbrassow@sourceware.org (jbrassow@sourceware.org) Date: Tue, 04 Jan 2011 21:41:00 -0000 Subject: LVM2/man lvconvert.8.in Message-ID: <20110104214137.23994.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: jbrassow@sourceware.org 2011-01-04 21:41:36 Modified files: man : lvconvert.8.in Log message: Fix bug 635949: lvconvert man page clarification Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/man/lvconvert.8.in.diff?cvsroot=lvm2&r1=1.18&r2=1.19 --- LVM2/man/lvconvert.8.in 2010/10/13 21:26:38 1.18 +++ LVM2/man/lvconvert.8.in 2011/01/04 21:41:35 1.19 @@ -51,9 +51,10 @@ [\-\-version] LogicalVolume[Path] [PhysicalVolume[Path]...] .SH DESCRIPTION -lvconvert will change a linear logical volume to a mirror -logical volume or to a snapshot of linear volume and vice versa. -It is also used to add and remove disk logs from mirror devices. +lvconvert is used to change the segment type (i.e. linear, mirror, etc) or +characteristics of a logical volume. For example, it can add or remove the +redundant images of a logical volume, change the log type of a mirror, or +designate a logical volume as a snapshot repository. .br If the conversion requires allocation of physical extents (for example, when converting from linear to mirror) and you specify From mornfall@sourceware.org Tue Jan 4 23:56:00 2011 From: mornfall@sourceware.org (mornfall@sourceware.org) Date: Tue, 04 Jan 2011 23:56:00 -0000 Subject: LVM2/test/lib Message-ID: <20110104235640.26955.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: mornfall@sourceware.org 2011-01-04 23:56:39 LVM2/test/lib Update of /cvs/lvm2/LVM2/test/lib In directory sourceware.org:/tmp/cvs-serv26948/test/lib Log Message: Directory /cvs/lvm2/LVM2/test/lib added to the repository From mornfall@sourceware.org Wed Jan 5 00:16:00 2011 From: mornfall@sourceware.org (mornfall@sourceware.org) Date: Wed, 05 Jan 2011 00:16:00 -0000 Subject: LVM2/test Makefile.in t-000-basic.sh t-activat ... Message-ID: <20110105001641.3640.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: mornfall@sourceware.org 2011-01-05 00:16:21 Modified files: test : Makefile.in t-000-basic.sh t-activate-missing.sh t-activate-partial.sh t-covercmd.sh t-dmeventd-restart.sh t-fsadm.sh t-inconsistent-metadata.sh t-listings.sh t-lock-blocking.sh t-lvchange-mirror.sh t-lvconvert-mirror-basic.sh t-lvconvert-mirror.sh t-lvconvert-repair-dmeventd.sh t-lvconvert-repair-policy.sh t-lvconvert-repair-replace.sh t-lvconvert-repair-transient.sh t-lvconvert-repair.sh t-lvconvert-twostep.sh t-lvcreate-mirror.sh t-lvcreate-operation.sh t-lvcreate-pvtags.sh t-lvcreate-small-snap.sh t-lvcreate-usage.sh t-lvextend-percent-extents.sh t-lvextend-snapshot-dmeventd.sh t-lvextend-snapshot-policy.sh t-lvm-init.sh t-lvmcache-exercise.sh t-lvresize-mirror.sh t-lvresize-usage.sh t-mdata-strings.sh t-metadata-balance.sh t-metadata.sh t-mirror-names.sh t-mirror-vgreduce-removemissing.sh t-nomda-missing.sh t-pool-labels.sh t-pv-range-overflow.sh t-pvchange-usage.sh t-pvcreate-metadata0.sh t-pvcreate-operation-md.sh t-pvcreate-operation.sh t-pvcreate-usage.sh t-pvmove-basic.sh t-pvremove-usage.sh t-read-ahead.sh t-snapshot-autoumount-dmeventd.sh t-snapshot-merge.sh t-snapshots-of-mirrors.sh t-tags.sh t-test-partition.sh t-topology-support.sh t-unknown-segment.sh t-unlost-pv.sh t-vgcfgbackup-usage.sh t-vgchange-maxlv.sh t-vgchange-usage.sh t-vgcreate-usage.sh t-vgextend-restoremissing.sh t-vgextend-usage.sh t-vgmerge-operation.sh t-vgmerge-usage.sh t-vgreduce-usage.sh t-vgrename-usage.sh t-vgsplit-operation.sh t-vgsplit-stacked.sh t-vgsplit-usage.sh test/api : percent.sh vgtest.sh Added files: test/lib : aux.sh check.sh get.sh harness.c lvm-wrapper.sh not.c test.sh utils.sh Removed files: test : check.sh harness.c not.c Log message: Substantial rework of the functional test support code. Some new features: - somewhat neater, more consistent and more readable output - possible to set any lvm.conf value: aux lvmconf "section/key = value" - LVM_TEST_NODEBUG to suppress the (lengthy) "## DEBUG" output - back-substitution on test output ($TESTDIR/$PREFIX -> @TESTDIR@/@PREFIX@) - support code moved from test/ to test/lib/ --> less clutter Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/Makefile.in.diff?cvsroot=lvm2&r1=1.49&r2=1.50 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-000-basic.sh.diff?cvsroot=lvm2&r1=1.10&r2=1.11 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-activate-missing.sh.diff?cvsroot=lvm2&r1=1.3&r2=1.4 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-activate-partial.sh.diff?cvsroot=lvm2&r1=1.4&r2=1.5 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-covercmd.sh.diff?cvsroot=lvm2&r1=1.9&r2=1.10 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-dmeventd-restart.sh.diff?cvsroot=lvm2&r1=1.1&r2=1.2 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-fsadm.sh.diff?cvsroot=lvm2&r1=1.4&r2=1.5 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-inconsistent-metadata.sh.diff?cvsroot=lvm2&r1=1.4&r2=1.5 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-listings.sh.diff?cvsroot=lvm2&r1=1.2&r2=1.3 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-lock-blocking.sh.diff?cvsroot=lvm2&r1=1.2&r2=1.3 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-lvchange-mirror.sh.diff?cvsroot=lvm2&r1=1.1&r2=1.2 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-lvconvert-mirror-basic.sh.diff?cvsroot=lvm2&r1=1.4&r2=1.5 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-lvconvert-mirror.sh.diff?cvsroot=lvm2&r1=1.8&r2=1.9 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-lvconvert-repair-dmeventd.sh.diff?cvsroot=lvm2&r1=1.3&r2=1.4 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-lvconvert-repair-policy.sh.diff?cvsroot=lvm2&r1=1.5&r2=1.6 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-lvconvert-repair-replace.sh.diff?cvsroot=lvm2&r1=1.1&r2=1.2 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-lvconvert-repair-transient.sh.diff?cvsroot=lvm2&r1=1.2&r2=1.3 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-lvconvert-repair.sh.diff?cvsroot=lvm2&r1=1.8&r2=1.9 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-lvconvert-twostep.sh.diff?cvsroot=lvm2&r1=1.1&r2=1.2 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-lvcreate-mirror.sh.diff?cvsroot=lvm2&r1=1.2&r2=1.3 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-lvcreate-operation.sh.diff?cvsroot=lvm2&r1=1.5&r2=1.6 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-lvcreate-pvtags.sh.diff?cvsroot=lvm2&r1=1.7&r2=1.8 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-lvcreate-small-snap.sh.diff?cvsroot=lvm2&r1=1.1&r2=1.2 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-lvcreate-usage.sh.diff?cvsroot=lvm2&r1=1.18&r2=1.19 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-lvextend-percent-extents.sh.diff?cvsroot=lvm2&r1=1.9&r2=1.10 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-lvextend-snapshot-dmeventd.sh.diff?cvsroot=lvm2&r1=1.1&r2=1.2 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-lvextend-snapshot-policy.sh.diff?cvsroot=lvm2&r1=1.1&r2=1.2 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-lvm-init.sh.diff?cvsroot=lvm2&r1=1.1&r2=1.2 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-lvmcache-exercise.sh.diff?cvsroot=lvm2&r1=1.2&r2=1.3 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-lvresize-mirror.sh.diff?cvsroot=lvm2&r1=1.1&r2=1.2 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-lvresize-usage.sh.diff?cvsroot=lvm2&r1=1.3&r2=1.4 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-mdata-strings.sh.diff?cvsroot=lvm2&r1=1.5&r2=1.6 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-metadata-balance.sh.diff?cvsroot=lvm2&r1=1.4&r2=1.5 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-metadata.sh.diff?cvsroot=lvm2&r1=1.6&r2=1.7 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-mirror-names.sh.diff?cvsroot=lvm2&r1=1.7&r2=1.8 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-mirror-vgreduce-removemissing.sh.diff?cvsroot=lvm2&r1=1.9&r2=1.10 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-nomda-missing.sh.diff?cvsroot=lvm2&r1=1.3&r2=1.4 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-pool-labels.sh.diff?cvsroot=lvm2&r1=1.3&r2=1.4 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-pv-range-overflow.sh.diff?cvsroot=lvm2&r1=1.4&r2=1.5 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-pvchange-usage.sh.diff?cvsroot=lvm2&r1=1.5&r2=1.6 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-pvcreate-metadata0.sh.diff?cvsroot=lvm2&r1=1.2&r2=1.3 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-pvcreate-operation-md.sh.diff?cvsroot=lvm2&r1=1.10&r2=1.11 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-pvcreate-operation.sh.diff?cvsroot=lvm2&r1=1.19&r2=1.20 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-pvcreate-usage.sh.diff?cvsroot=lvm2&r1=1.16&r2=1.17 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-pvmove-basic.sh.diff?cvsroot=lvm2&r1=1.11&r2=1.12 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-pvremove-usage.sh.diff?cvsroot=lvm2&r1=1.6&r2=1.7 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-read-ahead.sh.diff?cvsroot=lvm2&r1=1.12&r2=1.13 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-snapshot-autoumount-dmeventd.sh.diff?cvsroot=lvm2&r1=1.1&r2=1.2 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-snapshot-merge.sh.diff?cvsroot=lvm2&r1=1.7&r2=1.8 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-snapshots-of-mirrors.sh.diff?cvsroot=lvm2&r1=1.5&r2=1.6 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-tags.sh.diff?cvsroot=lvm2&r1=1.1&r2=1.2 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-test-partition.sh.diff?cvsroot=lvm2&r1=1.1&r2=1.2 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-topology-support.sh.diff?cvsroot=lvm2&r1=1.5&r2=1.6 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-unknown-segment.sh.diff?cvsroot=lvm2&r1=1.1&r2=1.2 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-unlost-pv.sh.diff?cvsroot=lvm2&r1=1.3&r2=1.4 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-vgcfgbackup-usage.sh.diff?cvsroot=lvm2&r1=1.6&r2=1.7 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-vgchange-maxlv.sh.diff?cvsroot=lvm2&r1=1.1&r2=1.2 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-vgchange-usage.sh.diff?cvsroot=lvm2&r1=1.2&r2=1.3 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-vgcreate-usage.sh.diff?cvsroot=lvm2&r1=1.17&r2=1.18 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-vgextend-restoremissing.sh.diff?cvsroot=lvm2&r1=1.1&r2=1.2 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-vgextend-usage.sh.diff?cvsroot=lvm2&r1=1.5&r2=1.6 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-vgmerge-operation.sh.diff?cvsroot=lvm2&r1=1.6&r2=1.7 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-vgmerge-usage.sh.diff?cvsroot=lvm2&r1=1.7&r2=1.8 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-vgreduce-usage.sh.diff?cvsroot=lvm2&r1=1.6&r2=1.7 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-vgrename-usage.sh.diff?cvsroot=lvm2&r1=1.5&r2=1.6 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-vgsplit-operation.sh.diff?cvsroot=lvm2&r1=1.26&r2=1.27 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-vgsplit-stacked.sh.diff?cvsroot=lvm2&r1=1.4&r2=1.5 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-vgsplit-usage.sh.diff?cvsroot=lvm2&r1=1.14&r2=1.15 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/check.sh.diff?cvsroot=lvm2&r1=1.6&r2=NONE http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/harness.c.diff?cvsroot=lvm2&r1=1.14&r2=NONE http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/not.c.diff?cvsroot=lvm2&r1=1.5&r2=NONE http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/api/percent.sh.diff?cvsroot=lvm2&r1=1.2&r2=1.3 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/api/vgtest.sh.diff?cvsroot=lvm2&r1=1.1&r2=1.2 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/lib/aux.sh.diff?cvsroot=lvm2&r1=NONE&r2=1.1 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/lib/check.sh.diff?cvsroot=lvm2&r1=NONE&r2=1.1 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/lib/get.sh.diff?cvsroot=lvm2&r1=NONE&r2=1.1 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/lib/harness.c.diff?cvsroot=lvm2&r1=NONE&r2=1.1 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/lib/lvm-wrapper.sh.diff?cvsroot=lvm2&r1=NONE&r2=1.1 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/lib/not.c.diff?cvsroot=lvm2&r1=NONE&r2=1.1 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/lib/test.sh.diff?cvsroot=lvm2&r1=NONE&r2=1.1 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/lib/utils.sh.diff?cvsroot=lvm2&r1=NONE&r2=1.1 --- LVM2/test/Makefile.in 2010/12/14 23:23:45 1.49 +++ LVM2/test/Makefile.in 2011/01/05 00:16:18 1.50 @@ -34,94 +34,73 @@ # Shell quote; SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH)) -SUPPORT := $(srcdir)/test-utils.sh \ - $(srcdir)/lvm-utils.sh - ifeq ("@UDEV_SYNC@", "yes") dm_udev_synchronisation = 1 endif -all check: init.sh +all check: .tests-stamp make -C api tests @echo Testing with locking_type 1 - VERBOSE=$(VERBOSE) ./bin/harness $(RUN_BASE) + VERBOSE=$(VERBOSE) ./lib/harness $(RUN_BASE) @echo Testing with locking_type 3 - VERBOSE=$(VERBOSE) LVM_TEST_LOCKING=3 ./bin/harness $(RUN_BASE) + VERBOSE=$(VERBOSE) LVM_TEST_LOCKING=3 ./lib/harness $(RUN_BASE) -check_cluster: init.sh +check_cluster: .tests-stamp make -C api tests @echo Testing with locking_type 3 - VERBOSE=$(VERBOSE) LVM_TEST_LOCKING=3 ./bin/harness $(RUN_BASE) + VERBOSE=$(VERBOSE) LVM_TEST_LOCKING=3 ./lib/harness $(RUN_BASE) -check_local: init.sh +check_local: .tests-stamp make -C api tests @echo Testing with locking_type 1 - VERBOSE=$(VERBOSE) LVM_TEST_LOCKING=1 ./bin/harness $(RUN_BASE) + VERBOSE=$(VERBOSE) LVM_TEST_LOCKING=1 ./lib/harness $(RUN_BASE) -bin/not: $(srcdir)/not.c .bin-dir-stamp - $(CC) -o bin/not $< - ln -sf not bin/should +lib/should: lib/not + ln -sf not lib/should -bin/harness: $(srcdir)/harness.c .bin-dir-stamp - $(CC) -o bin/harness $< +lib/%: $(srcdir)/lib/%.c .lib-dir-stamp + $(CC) -o $@ $< -bin/check: $(srcdir)/check.sh .bin-dir-stamp - cp $< bin/check - chmod +x bin/check +lib/%: $(srcdir)/lib/%.sh .lib-dir-stamp + cp $< $@ + chmod +x $@ -init.sh: $(srcdir)/Makefile.in .bin-dir-stamp bin/not bin/check bin/harness $(RUN) $(SUPPORT) $(UNIT) - rm -f $@-t $@ +lib/paths: $(srcdir)/Makefile.in .lib-dir-stamp + rm -f $@-t echo 'top_srcdir=$(top_srcdir)' >> $@-t echo 'abs_top_builddir=$(abs_top_builddir)' >> $@-t echo 'abs_top_srcdir=$(abs_top_builddir)' >> $@-t - echo 'PATH=$$abs_top_builddir/test/bin:$$PATH' >> $@-t - LDLPATH="\$$abs_top_builddir/libdm"; \ - LDLPATH="$$LDLPATH:\$$abs_top_builddir/tools"; \ - LDLPATH="$$LDLPATH:\$$abs_top_builddir/liblvm"; \ - LDLPATH="$$LDLPATH:\$$abs_top_builddir/daemons/dmeventd"; \ - LDLPATH="$$LDLPATH:\$$abs_top_builddir/daemons/dmeventd/plugins/lvm2"; \ - LDLPATH="$$LDLPATH:\$$abs_top_builddir/daemons/dmeventd/plugins/mirror"; \ - LDLPATH="$$LDLPATH:\$$abs_top_builddir/daemons/dmeventd/plugins/snapshot"; \ - echo "export LD_LIBRARY_PATH=\"$$LDLPATH\"" >> $@-t - echo 'top_srcdir=$(top_srcdir)' >> $@-t echo 'abs_srcdir=$(abs_srcdir)' >> $@-t echo 'abs_builddir=$(abs_builddir)' >> $@-t - echo 'export PATH' >> $@-t echo 'export DM_UDEV_SYNCHRONISATION=$(dm_udev_synchronisation)' >> $@-t - chmod a-w $@-t mv $@-t $@ + +LIB = lib/not lib/should lib/harness \ + lib/check lib/aux lib/test lib/utils lib/get lib/lvm-wrapper \ + lib/paths + +.tests-stamp: $(RUN) $(LIB) @if test "$(srcdir)" != . ; then \ echo "Copying tests to builddir."; \ - cp $(SUPPORT) .; \ for f in $(RUN); do cp $$f `echo $$f | sed -e s,^$(srcdir)/,,`; done; \ fi + touch .tests-stamp Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -.bin-dir-stamp: lvm-wrapper - rm -rf bin - mkdir bin +.lib-dir-stamp: + mkdir -p lib for i in lvm $$(cat ../tools/.commands); do \ - ln -s ../lvm-wrapper bin/$$i; \ + ln -fs lvm-wrapper lib/$$i; \ done - ln -s "$(abs_top_builddir)/tools/dmsetup" bin/dmsetup - ln -s "$(abs_top_builddir)/daemons/clvmd/clvmd" bin/clvmd - ln -s "$(abs_top_builddir)/daemons/dmeventd/dmeventd" bin/dmeventd + ln -s "$(abs_top_builddir)/tools/dmsetup" lib/dmsetup + ln -s "$(abs_top_builddir)/daemons/clvmd/clvmd" lib/clvmd + ln -s "$(abs_top_builddir)/daemons/dmeventd/dmeventd" lib/dmeventd touch $@ -lvm-wrapper: Makefile - rm -f $@-t $@ - echo '#!/bin/sh' > $@-t - echo 'cmd=$$(echo ./$$0|sed "s,.*/,,")' >> $@-t - echo 'test "$$cmd" = lvm &&' >> $@-t - echo 'exec "$(abs_top_builddir)/tools/lvm" "$$@"' >> $@-t - echo 'exec "$(abs_top_builddir)/tools/lvm" "$$cmd" "$$@"' >> $@-t - chmod a-w,a+x $@-t - mv $@-t $@ - clean: - rm -rf init.sh lvm-wrapper bin .bin-dir-stamp + rm -rf bin .lib-dir-stamp .test-stamp if test "$(srcdir)" != . ; then rm -f $(subst $(srcdir)/, ,$(RUN)) lvm2app.sh ; fi distclean: clean --- LVM2/test/t-000-basic.sh 2010/08/02 13:18:02 1.10 +++ LVM2/test/t-000-basic.sh 2011/01/05 00:16:20 1.11 @@ -8,7 +8,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -. ./test-utils.sh +. lib/test lvm version --- LVM2/test/t-activate-missing.sh 2010/07/28 12:20:41 1.3 +++ LVM2/test/t-activate-missing.sh 2011/01/05 00:16:20 1.4 @@ -17,9 +17,9 @@ # instead lvconvert --repair them?) # - linear LVs with bits missing are not activated -. ./test-utils.sh +. lib/test -prepare_vg 4 +aux prepare_vg 4 lvcreate -l1 -n linear1 $vg $dev1 lvcreate -l1 -n linear2 $vg $dev2 @@ -32,7 +32,7 @@ lvcreate -l1 -m1 -n mirror123 $vg $dev1 $dev2 $dev3 vgchange -a n $vg -disable_dev $dev1 +aux disable_dev $dev1 not vgchange -a y $vg not vgck $vg @@ -45,8 +45,8 @@ check inactive $vg mirror123 vgchange -a n $vg -enable_dev $dev1 -disable_dev $dev2 +aux enable_dev $dev1 +aux disable_dev $dev2 not vgchange -a y $vg not vgck $vg @@ -59,8 +59,8 @@ check inactive $vg mirror123 vgchange -a n $vg -enable_dev $dev2 -disable_dev $dev3 +aux enable_dev $dev2 +aux disable_dev $dev3 not vgchange -a y $vg not vgck $vg @@ -73,8 +73,8 @@ check active $vg mirror12 vgchange -a n $vg -enable_dev $dev3 -disable_dev $dev4 +aux enable_dev $dev3 +aux disable_dev $dev4 vgchange -a y $vg not vgck $vg --- LVM2/test/t-activate-partial.sh 2010/07/28 12:20:41 1.4 +++ LVM2/test/t-activate-partial.sh 2011/01/05 00:16:20 1.5 @@ -8,13 +8,13 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -. ./test-utils.sh +. lib/test aux prepare_vg 3 lvcreate -m 1 -l 1 -n mirror $vg lvchange -a n $vg/mirror -disable_dev $dev1 +aux disable_dev $dev1 not vgreduce --removemissing $vg not lvchange -v -a y $vg/mirror --- LVM2/test/t-covercmd.sh 2010/08/12 04:09:00 1.9 +++ LVM2/test/t-covercmd.sh 2011/01/05 00:16:20 1.10 @@ -12,7 +12,7 @@ # tests basic functionality of read-ahead and ra regressions # -. ./test-utils.sh +. lib/test TEST_UUID="aaaaaa-aaaa-aaaa-aaaa-aaaa-aaaa-aaaaaa" @@ -31,7 +31,7 @@ pvcreate --metadatacopies 0 $dev3 pvcreate $dev4 pvcreate --norestorefile -u $TEST_UUID --metadatacopies 0 $dev5 -vgcreate -c n $vg $devs +vgcreate -c n $vg $(cat DEVICES) lvcreate -n $lv -l 5 -i5 -I256 $vg # test *scan and *display tools --- LVM2/test/t-dmeventd-restart.sh 2010/10/27 09:16:31 1.1 +++ LVM2/test/t-dmeventd-restart.sh 2011/01/05 00:16:20 1.2 @@ -9,10 +9,10 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -. ./test-utils.sh +. lib/test -prepare_vg 5 -prepare_dmeventd +aux prepare_vg 5 +aux prepare_dmeventd which mkfs.ext2 || exit 200 @@ -22,7 +22,7 @@ lvchange --monitor y $vg/3way dmeventd -R -f & -LOCAL_DMEVENTD="$!" +echo "$!" > LOCAL_DMEVENTD sleep 1 # wait a bit, so we talk to the new dmeventd later --- LVM2/test/t-fsadm.sh 2010/10/13 09:44:52 1.4 +++ LVM2/test/t-fsadm.sh 2011/01/05 00:16:20 1.5 @@ -12,7 +12,7 @@ test_description='Exercise fsadm filesystem resize' exit 200 -. ./test-utils.sh +. lib/test aux prepare_vg 1 100 --- LVM2/test/t-inconsistent-metadata.sh 2010/07/07 14:43:57 1.4 +++ LVM2/test/t-inconsistent-metadata.sh 2011/01/05 00:16:20 1.5 @@ -9,7 +9,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -. ./test-utils.sh +. lib/test aux prepare_vg 3 @@ -17,14 +17,14 @@ lvcreate -l 1 -n resized $vg lvchange -a n $vg/mirror -backup_dev $devs +aux backup_dev $(cat DEVICES) init() { - restore_dev $devs + aux restore_dev $(cat DEVICES) lvs -o lv_name,lv_size --units k $vg | tee lvs.out grep resized lvs.out | not grep 8192 lvresize -L 8192K $vg/resized - restore_dev $dev1 + aux restore_dev $dev1 } check() { @@ -66,10 +66,10 @@ echo Check auto-repair of failed vgextend - metadata written to original pv but not new pv vgremove -f $vg -pvremove -ff $devs -pvcreate $devs -backup_dev $dev2 +pvremove -ff $(cat DEVICES) +pvcreate $(cat DEVICES) +aux backup_dev $dev2 vgcreate $vg $dev1 vgextend $vg $dev2 -restore_dev $dev2 -should compare_two_fields_ vgs $vg vg_mda_count pvs $dev2 vg_mda_count +aux restore_dev $dev2 +should check compare_fields vgs $vg vg_mda_count pvs $dev2 vg_mda_count --- LVM2/test/t-listings.sh 2009/04/21 12:59:18 1.2 +++ LVM2/test/t-listings.sh 2011/01/05 00:16:20 1.3 @@ -12,7 +12,7 @@ # tests functionality of lvs, pvs, vgs, *display tools # -. ./test-utils.sh +. lib/test get_lvs_() { @@ -38,16 +38,16 @@ pvs --noheadings -o seg_all,pv_all,lv_all,vg_all | tee out test $(wc -l out -pvdisplay --maps $devs >out2 +pvdisplay $(cat DEVICES) >out +pvdisplay --maps $(cat DEVICES) >out2 not diff out out2 --- LVM2/test/t-lock-blocking.sh 2010/08/02 13:23:01 1.2 +++ LVM2/test/t-lock-blocking.sh 2011/01/05 00:16:20 1.3 @@ -11,7 +11,7 @@ test_description='test some blocking / non-blocking multi-vg operations' -. ./test-utils.sh +. lib/test aux prepare_devs 3 test -n "$LOCAL_CLVMD" && exit 200 --- LVM2/test/t-lvchange-mirror.sh 2010/04/12 19:16:24 1.1 +++ LVM2/test/t-lvchange-mirror.sh 2011/01/05 00:16:20 1.2 @@ -9,7 +9,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -. ./test-utils.sh +. lib/test aux prepare_vg 3 # force resync 2-way active mirror --- LVM2/test/t-lvconvert-mirror-basic.sh 2010/07/28 12:20:41 1.4 +++ LVM2/test/t-lvconvert-mirror-basic.sh 2011/01/05 00:16:20 1.5 @@ -8,7 +8,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -. ./test-utils.sh +. lib/test log_name_to_count() { @@ -83,7 +83,7 @@ max_log_count=$start_log_count fi - prepare_vg 5 + aux prepare_vg 5 if [ $start_count -gt 0 ]; then # Are there extra devices for the log or do we overlap --- LVM2/test/t-lvconvert-mirror.sh 2010/11/30 11:35:32 1.8 +++ LVM2/test/t-lvconvert-mirror.sh 2011/01/05 00:16:20 1.9 @@ -9,7 +9,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -. ./test-utils.sh +. lib/test # convert from linear to 2-way mirror aux prepare_vg 5 --- LVM2/test/t-lvconvert-repair-dmeventd.sh 2010/10/26 12:53:07 1.3 +++ LVM2/test/t-lvconvert-repair-dmeventd.sh 2011/01/05 00:16:20 1.4 @@ -9,18 +9,18 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -. ./test-utils.sh +. lib/test -prepare_vg 5 -prepare_dmeventd +aux prepare_vg 5 +aux prepare_dmeventd which mkfs.ext2 || exit 200 lvcreate -m 3 --ig -L 1 -n 4way $vg lvchange --monitor y $vg/4way -disable_dev $dev2 $dev4 +aux disable_dev $dev2 $dev4 mkfs.ext2 $DM_DEV_DIR/$vg/4way sleep 10 # FIXME: need a "poll" utility, akin to "check" -enable_dev $dev2 $dev4 +aux enable_dev $dev2 $dev4 check mirror $vg 4way check mirror_legs $vg 4way 2 --- LVM2/test/t-lvconvert-repair-policy.sh 2010/05/24 15:32:21 1.5 +++ LVM2/test/t-lvconvert-repair-policy.sh 2011/01/05 00:16:20 1.6 @@ -9,16 +9,16 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -. ./test-utils.sh +. lib/test -prepare_vg 4 +aux prepare_vg 4 # Clean-up and create a 2-way mirror, where the the # leg devices are always on $dev[12] and the log # is always on $dev3. ($dev4 behaves as a spare) cleanup() { vgreduce --removemissing $vg - for d in "$@"; do enable_dev $d; done + for d in "$@"; do aux enable_dev $d; done for d in "$@"; do vgextend $vg $d; done lvremove -ff $vg/mirror lvcreate -m 1 --ig -l 2 -n mirror $vg $dev1 $dev2 $dev3:0 @@ -36,7 +36,7 @@ lvchange --partial -a y $vg/mirror repair 'activation { mirror_image_fault_policy = "remove" }' check linear $vg mirror -aux cleanup $dev1 +cleanup $dev1 # Fail a leg of a mirror. # Expected result: Mirror (leg replaced) @@ -44,7 +44,7 @@ repair 'activation { mirror_image_fault_policy = "replace" }' check mirror $vg mirror lvs | grep mirror_mlog -aux cleanup $dev1 +cleanup $dev1 # Fail a leg of a mirror (use old name for policy specification) # Expected result: Mirror (leg replaced) @@ -52,7 +52,7 @@ repair 'activation { mirror_device_fault_policy = "replace" }' check mirror $vg mirror lvs | grep mirror_mlog -aux cleanup $dev1 +cleanup $dev1 # Fail a leg of a mirror w/ no available spare # Expected result: 2-way with corelog @@ -60,7 +60,7 @@ repair 'activation { mirror_image_fault_policy = "replace" }' check mirror $vg mirror lvs | not grep mirror_mlog -aux cleanup $dev2 $dev4 +cleanup $dev2 $dev4 # Fail the log device of a mirror w/ no available spare # Expected result: mirror w/ corelog @@ -68,7 +68,7 @@ repair 'activation { mirror_image_fault_policy = "replace" }' $vg/mirror check mirror $vg mirror lvs | not grep mirror_mlog -aux cleanup $dev3 $dev4 +cleanup $dev3 $dev4 # Fail the log device with a remove policy # Expected result: mirror w/ corelog --- LVM2/test/t-lvconvert-repair-replace.sh 2010/04/14 13:51:58 1.1 +++ LVM2/test/t-lvconvert-repair-replace.sh 2011/01/05 00:16:20 1.2 @@ -9,43 +9,43 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -. ./test-utils.sh +. lib/test -prepare_vg 6 +aux prepare_vg 6 # multiple failures, full replace lvcreate --mirrorlog disk -m 2 --ig -L 1 -n 3way $vg $dev1 $dev2 $dev3 $dev4:0-1 -disable_dev $dev1 $dev2 +aux disable_dev $dev1 $dev2 echo y | lvconvert --repair $vg/3way 2>&1 | tee 3way.out lvs -a -o +devices | not grep unknown not grep "WARNING: Failed" 3way.out vgreduce --removemissing $vg check mirror $vg 3way -enable_dev $dev1 $dev2 +aux enable_dev $dev1 $dev2 vgremove -ff $vg; vgcreate -c n $vg $dev1 $dev2 $dev3 $dev4 $dev5 # multiple failures, partial replace lvcreate --mirrorlog disk -m 2 --ig -L 1 -n 3way $vg $dev1 $dev2 $dev3 $dev4 -disable_dev $dev1 $dev2 +aux disable_dev $dev1 $dev2 echo y | lvconvert --repair $vg/3way 2>&1 | tee 3way.out grep "WARNING: Failed" 3way.out lvs -a -o +devices | not grep unknown vgreduce --removemissing $vg check mirror $vg 3way -enable_dev $dev1 $dev2 +aux enable_dev $dev1 $dev2 lvchange -a n $vg/3way vgremove -ff $vg; vgcreate -c n $vg $dev1 $dev2 $dev3 lvcreate --mirrorlog disk -m 1 --ig -L 1 -n 2way $vg $dev1 $dev2 $dev3 -disable_dev $dev1 +aux disable_dev $dev1 echo y | lvconvert --repair $vg/2way 2>&1 | tee 2way.out grep "WARNING: Failed" 2way.out lvs -a -o +devices | not grep unknown vgreduce --removemissing $vg check mirror $vg 2way -enable_dev $dev1 $dev2 +aux enable_dev $dev1 $dev2 lvchange -a n $vg/2way vgremove -ff $vg; vgcreate -c n $vg $dev1 $dev2 $dev3 $dev4 --- LVM2/test/t-lvconvert-repair-transient.sh 2010/05/24 16:33:21 1.2 +++ LVM2/test/t-lvconvert-repair-transient.sh 2011/01/05 00:16:20 1.3 @@ -9,18 +9,18 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -. ./test-utils.sh - -prepare_vg 5 +. lib/test exit 200 # this breaks upstream .33 and RHEL6 kernel :( +aux prepare_vg 5 + # fail multiple devices lvcreate -m 3 --ig -L 1 -n 4way $vg -disable_dev $dev2 $dev4 +aux disable_dev $dev2 $dev4 mkfs.ext3 $DM_DEV_DIR/$vg/4way -enable_dev $dev2 $dev4 +aux enable_dev $dev2 $dev4 echo n | lvconvert --repair $vg/4way 2>&1 | tee 4way.out lvs -a -o +devices | not grep unknown vgreduce --removemissing $vg --- LVM2/test/t-lvconvert-repair.sh 2010/05/24 15:32:21 1.8 +++ LVM2/test/t-lvconvert-repair.sh 2011/01/05 00:16:20 1.9 @@ -9,54 +9,54 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -. ./test-utils.sh +. lib/test # fail multiple devices aux prepare_vg 5 lvcreate -m 3 --ig -L 1 -n 4way $vg $dev1 $dev2 $dev3 $dev4 $dev5:0 -disable_dev $dev2 $dev4 +aux disable_dev $dev2 $dev4 echo n | lvconvert --repair $vg/4way 2>&1 | tee 4way.out lvs -a -o +devices | not grep unknown vgreduce --removemissing $vg -enable_dev $dev2 $dev4 +aux enable_dev $dev2 $dev4 check mirror $vg 4way $dev5 aux prepare_vg 5 lvcreate -m 2 --ig -L 1 -n 3way $vg -disable_dev $dev1 $dev2 +aux disable_dev $dev1 $dev2 echo n | lvconvert --repair $vg/3way check linear $vg 3way lvs -a -o +devices | not grep unknown lvs -a -o +devices | not grep mlog dmsetup ls | grep $PREFIX | not grep mlog vgreduce --removemissing $vg -enable_dev $dev1 $dev2 +aux enable_dev $dev1 $dev2 check linear $vg 3way # fail just log and get it removed aux prepare_vg 5 lvcreate -m 2 --ig -L 1 -n 3way $vg $dev1 $dev2 $dev3 $dev4:0 -disable_dev $dev4 +aux disable_dev $dev4 echo n | lvconvert --repair $vg/3way check mirror $vg 3way core lvs -a -o +devices | not grep unknown lvs -a -o +devices | not grep mlog dmsetup ls | grep $PREFIX | not grep mlog vgreduce --removemissing $vg -enable_dev $dev4 +aux enable_dev $dev4 aux prepare_vg 5 lvcreate -m 1 --ig -L 1 -n 2way $vg $dev1 $dev2 $dev3:0 -disable_dev $dev3 +aux disable_dev $dev3 echo n | lvconvert --repair $vg/2way check mirror $vg 2way core lvs -a -o +devices | not grep unknown lvs -a -o +devices | not grep mlog vgreduce --removemissing $vg -enable_dev $dev3 +aux enable_dev $dev3 # fail single devices @@ -66,24 +66,24 @@ lvcreate -m 1 --ig -L 1 -n mirror $vg lvchange -a n $vg/mirror vgextend $vg $dev4 -disable_dev $dev1 +aux disable_dev $dev1 lvchange --partial -a y $vg/mirror not vgreduce -v --removemissing $vg lvconvert -y --repair $vg/mirror vgreduce --removemissing $vg -enable_dev $dev1 +aux enable_dev $dev1 vgextend $vg $dev1 -disable_dev $dev2 +aux disable_dev $dev2 lvconvert -y --repair $vg/mirror vgreduce --removemissing $vg -enable_dev $dev2 +aux enable_dev $dev2 vgextend $vg $dev2 -disable_dev $dev3 +aux disable_dev $dev3 lvconvert -y --repair $vg/mirror vgreduce --removemissing $vg -enable_dev $dev3 +aux enable_dev $dev3 vgextend $vg $dev3 lvremove -ff $vg --- LVM2/test/t-lvconvert-twostep.sh 2010/11/25 17:15:46 1.1 +++ LVM2/test/t-lvconvert-twostep.sh 2011/01/05 00:16:20 1.2 @@ -9,7 +9,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -. ./test-utils.sh +. lib/test aux prepare_vg 4 lvcreate -m 1 --mirrorlog disk --ig -L 1 -n mirror $vg --- LVM2/test/t-lvcreate-mirror.sh 2010/05/12 10:08:36 1.2 +++ LVM2/test/t-lvcreate-mirror.sh 2011/01/05 00:16:20 1.3 @@ -9,7 +9,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -. ./test-utils.sh +. lib/test aux prepare_vg 5 80 # 2-way mirror with corelog, 2 PVs --- LVM2/test/t-lvcreate-operation.sh 2010/04/07 14:46:26 1.5 +++ LVM2/test/t-lvcreate-operation.sh 2011/01/05 00:16:20 1.6 @@ -11,7 +11,7 @@ # 'Exercise some lvcreate diagnostics' -. ./test-utils.sh +. lib/test cleanup_lvs() { lvremove -ff $vg @@ -21,9 +21,9 @@ fi } -prepare_pvs 2 +aux prepare_pvs 2 aux pvcreate --metadatacopies 0 $dev1 -aux vgcreate -c n $vg $devs +aux vgcreate -c n $vg $(cat DEVICES) # --- # Create snapshots of LVs on --metadatacopies 0 PV (bz450651) --- LVM2/test/t-lvcreate-pvtags.sh 2010/04/07 14:46:26 1.7 +++ LVM2/test/t-lvcreate-pvtags.sh 2011/01/05 00:16:20 1.8 @@ -8,14 +8,14 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -. ./test-utils.sh +. lib/test aux prepare_pvs 3 # not required, just testing aux pvcreate --metadatacopies 0 $dev1 -vgcreate -c n $vg $devs -pvchange --addtag fast $devs +vgcreate -c n $vg $(cat DEVICES) +pvchange --addtag fast $(cat DEVICES) # 3 stripes with 3 PVs (selected by tag, @fast) is fine lvcreate -l3 -i3 $vg @fast --- LVM2/test/t-lvcreate-small-snap.sh 2010/10/13 13:52:54 1.1 +++ LVM2/test/t-lvcreate-small-snap.sh 2011/01/05 00:16:20 1.2 @@ -9,11 +9,11 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -. ./test-utils.sh +. lib/test aux prepare_pvs 3 -vgcreate -c n -s 1k $vg $devs +vgcreate -c n -s 1k $vg $(cat DEVICES) lvcreate -n one -l 10 $vg lvcreate -s -l 8 -n snapA $vg/one --- LVM2/test/t-lvcreate-usage.sh 2010/04/13 06:25:08 1.18 +++ LVM2/test/t-lvcreate-usage.sh 2011/01/05 00:16:20 1.19 @@ -11,11 +11,11 @@ # 'Exercise some lvcreate diagnostics' -. ./test-utils.sh +. lib/test aux prepare_pvs 4 aux pvcreate --metadatacopies 0 $dev1 -vgcreate -cn $vg $devs +vgcreate -cn $vg $(cat DEVICES) # "lvcreate rejects repeated invocation (run 2 times) (bz178216)" lvcreate -n $lv -l 4 $vg @@ -42,7 +42,7 @@ lvcreate -L 64m -n $lv -i2 $vg > out grep "^ Using default stripesize" out lvdisplay $vg -check_lv_field_ $vg/$lv stripesize "64.00k" +check lv_field $vg/$lv stripesize "64.00k" lvremove -ff $vg # 'lvcreate rejects an invalid number of stripes' @@ -89,16 +89,16 @@ # lvcreate rejects invalid chunksize, accepts between 4K and 512K # validate origin_size vgremove -ff $vg -vgcreate -cn $vg $devs +vgcreate -cn $vg $(cat DEVICES) lvcreate -L 32m -n $lv1 $vg not lvcreate -L 8m -n $lv2 -s --chunksize 3k $vg/$lv1 not lvcreate -L 8m -n $lv2 -s --chunksize 1024k $vg/$lv1 lvcreate -L 8m -n $lv2 -s --chunksize 4k $vg/$lv1 -check_lv_field_ $vg/$lv2 chunk_size 4.00k -check_lv_field_ $vg/$lv2 origin_size 32.00m +check lv_field $vg/$lv2 chunk_size 4.00k +check lv_field $vg/$lv2 origin_size 32.00m lvcreate -L 8m -n $lv3 -s --chunksize 512k $vg/$lv1 -check_lv_field_ $vg/$lv3 chunk_size 512.00k -check_lv_field_ $vg/$lv3 origin_size 32.00m +check lv_field $vg/$lv3 chunk_size 512.00k +check lv_field $vg/$lv3 origin_size 32.00m lvremove -ff $vg vgchange -l 0 $vg @@ -111,10 +111,10 @@ not lvcreate -L 32m -n $lv -R 11k $vg not lvcreate -L 32m -n $lv -R 1k $vg lvcreate -L 32m -n $lv --regionsize 128m -m 1 $vg -check_lv_field_ $vg/$lv regionsize "32.00m" +check lv_field $vg/$lv regionsize "32.00m" lvremove -ff $vg lvcreate -L 32m -n $lv --regionsize 4m -m 1 $vg -check_lv_field_ $vg/$lv regionsize "4.00m" +check lv_field $vg/$lv regionsize "4.00m" lvremove -ff $vg # snapshot with virtual origin works @@ -127,15 +127,15 @@ # readahead default (auto), none, #, auto lvcreate -L 32m -n $lv $vg -check_lv_field_ $vg/$lv lv_read_ahead "auto" +check lv_field $vg/$lv lv_read_ahead "auto" lvremove -ff $vg lvcreate -L 32m -n $lv --readahead none $vg -check_lv_field_ $vg/$lv lv_read_ahead "0" +check lv_field $vg/$lv lv_read_ahead "0" lvremove -ff $vg lvcreate -L 32m -n $lv --readahead 8k $vg -check_lv_field_ $vg/$lv lv_read_ahead "8.00k" +check lv_field $vg/$lv lv_read_ahead "8.00k" lvremove -ff $vg lvcreate -L 32m -n $lv --readahead auto $vg -check_lv_field_ $vg/$lv lv_read_ahead "auto" +check lv_field $vg/$lv lv_read_ahead "auto" lvremove -ff $vg --- LVM2/test/t-lvextend-percent-extents.sh 2010/02/17 15:41:28 1.9 +++ LVM2/test/t-lvextend-percent-extents.sh 2011/01/05 00:16:20 1.10 @@ -11,7 +11,7 @@ # 'Check extents percentage arguments' -. ./test-utils.sh +. lib/test aux prepare_vg 2 128 @@ -28,7 +28,7 @@ # 'lvextend accepts no size or extents but one PV - bz154691' lvextend $vg/$lv $dev1 >out grep "^ Logical volume $lv successfully resized\$" out -check_pv_field_ $dev1 pv_free "0" +check pv_field $dev1 pv_free "0" lvremove -f $vg/$lv @@ -45,8 +45,8 @@ # 'lvextend accepts no size but extents 100%PVS and two PVs - bz154691' lvextend -l +100%PVS $vg/$lv $dev1 $dev2 >out grep "^ Logical volume $lv successfully resized\$" out -check_pv_field_ $dev1 pv_free "0" -check_pv_field_ $dev2 pv_free "0" +check pv_field $dev1 pv_free "0" +check pv_field $dev2 pv_free "0" # Exercise the range overlap code. Allocate every 2 extents. # @@ -72,13 +72,13 @@ create_pvs=`for i in $(seq 0 4 20); do echo -n "\$dev1:$i-$(($i + 1)) "; done` lvremove -f $vg/$lv lvcreate -l 12 -n $lv $vg $create_pvs -check_lv_field_ $vg/$lv lv_size "48.00m" +check lv_field $vg/$lv lv_size "48.00m" # 'lvextend with partially allocated PVs and extents 100%PVS with PE ranges' extend_pvs=`for i in $(seq 0 6 18); do echo -n "\$dev1:$i-$(($i + 2)) "; done` lvextend -l +100%PVS $vg/$lv $extend_pvs >out grep "^ Logical volume $lv successfully resized\$" out -check_lv_field_ $vg/$lv lv_size "72.00m" +check lv_field $vg/$lv lv_size "72.00m" # Simple seg_count validation; initially create the LV with half the # of # extents (should be 1 lv segment), extend it (should go to 2 segments), @@ -90,12 +90,12 @@ lvcreate -l $pe1 -n $lv $vg pesize=$(lvs -ovg_extent_size --units b --nosuffix --noheadings $vg/$lv) segsize=$(( $pe1 * $pesize / 1024 / 1024 ))m -check_lv_field_ $vg/$lv seg_count 1 -check_lv_field_ $vg/$lv seg_start 0 -check_lv_field_ $vg/$lv seg_start_pe 0 -#check_lv_field_ $vg/$lv seg_size $segsize +check lv_field $vg/$lv seg_count 1 +check lv_field $vg/$lv seg_start 0 +check lv_field $vg/$lv seg_start_pe 0 +#check lv_field $vg/$lv seg_size $segsize lvextend -l +$(( $pe_count * 1 )) $vg/$lv -check_lv_field_ $vg/$lv seg_count 2 +check lv_field $vg/$lv seg_count 2 lvreduce -f -l -$(( $pe_count * 1 )) $vg/$lv -check_lv_field_ $vg/$lv seg_count 1 +check lv_field $vg/$lv seg_count 1 --- LVM2/test/t-lvextend-snapshot-dmeventd.sh 2010/10/15 16:28:15 1.1 +++ LVM2/test/t-lvextend-snapshot-dmeventd.sh 2011/01/05 00:16:20 1.2 @@ -9,7 +9,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -. ./test-utils.sh +. lib/test extend() { lvextend --use-policies --config "activation { snapshot_extend_threshold = $1 }" $vg/snap --- LVM2/test/t-lvextend-snapshot-policy.sh 2010/10/15 16:28:15 1.1 +++ LVM2/test/t-lvextend-snapshot-policy.sh 2011/01/05 00:16:20 1.2 @@ -9,7 +9,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -. ./test-utils.sh +. lib/test extend() { lvextend --use-policies --config "activation { snapshot_extend_threshold = $1 }" $vg/snap --- LVM2/test/t-lvm-init.sh 2009/07/08 18:14:47 1.1 +++ LVM2/test/t-lvm-init.sh 2011/01/05 00:16:20 1.2 @@ -12,7 +12,7 @@ # tests lvm initialization, and especially negative tests of error paths # -. ./test-utils.sh +. lib/test aux prepare_devs 5 --- LVM2/test/t-lvmcache-exercise.sh 2008/09/29 16:02:49 1.2 +++ LVM2/test/t-lvmcache-exercise.sh 2011/01/05 00:16:20 1.3 @@ -8,16 +8,16 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -. ./test-utils.sh +. lib/test aux prepare_pvs 5 vgcreate $vg1 $dev1 vgcreate $vg2 $dev3 -disable_dev $dev1 +aux disable_dev $dev1 pvscan vgcreate $vg1 $dev2 -enable_dev $dev1 +aux enable_dev $dev1 pvs pvs --- LVM2/test/t-lvresize-mirror.sh 2010/04/12 19:16:24 1.1 +++ LVM2/test/t-lvresize-mirror.sh 2011/01/05 00:16:20 1.2 @@ -9,7 +9,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -. ./test-utils.sh +. lib/test aux prepare_vg 5 80 # extend 2-way mirror --- LVM2/test/t-lvresize-usage.sh 2008/09/29 16:02:49 1.3 +++ LVM2/test/t-lvresize-usage.sh 2011/01/05 00:16:20 1.4 @@ -8,7 +8,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -. ./test-utils.sh +. lib/test aux prepare_vg 2 --- LVM2/test/t-mdata-strings.sh 2009/04/03 14:23:17 1.5 +++ LVM2/test/t-mdata-strings.sh 2011/01/05 00:16:20 1.6 @@ -11,7 +11,7 @@ # 'Test for proper escaping of strings in metadata (bz431474)' -. ./test-utils.sh +. lib/test aux prepare_devs 1 --- LVM2/test/t-metadata-balance.sh 2010/07/07 19:14:58 1.4 +++ LVM2/test/t-metadata-balance.sh 2011/01/05 00:16:20 1.5 @@ -8,7 +8,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -. ./test-utils.sh +. lib/test aux prepare_devs 6 @@ -21,22 +21,22 @@ vgcreate -c n "$vg" $dev1 $dev2 $dev3 fi pvchange --metadataignore y $dev1 - check_pv_field_ $dev1 pv_mda_count $mdacp - check_pv_field_ $dev1 pv_mda_used_count 0 - check_pv_field_ $dev2 pv_mda_count $mdacp - check_pv_field_ $dev2 pv_mda_used_count $mdacp + check pv_field $dev1 pv_mda_count $mdacp + check pv_field $dev1 pv_mda_used_count 0 + check pv_field $dev2 pv_mda_count $mdacp + check pv_field $dev2 pv_mda_used_count $mdacp if [ $pv_in_vg = 1 ]; then - check_vg_field_ $vg vg_mda_count $(($mdacp * 2)) - check_vg_field_ $vg vg_mda_used_count $mdacp - check_vg_field_ $vg vg_mda_copies unmanaged + check vg_field $vg vg_mda_count $(($mdacp * 2)) + check vg_field $vg vg_mda_used_count $mdacp + check vg_field $vg vg_mda_copies unmanaged fi pvchange --metadataignore n $dev1 - check_pv_field_ $dev1 pv_mda_count $mdacp - check_pv_field_ $dev1 pv_mda_used_count $mdacp + check pv_field $dev1 pv_mda_count $mdacp + check pv_field $dev1 pv_mda_used_count $mdacp if [ $pv_in_vg = 1 ]; then - check_vg_field_ $vg vg_mda_count $(($mdacp * 2)) - check_vg_field_ $vg vg_mda_used_count $(($mdacp * 2)) - check_vg_field_ $vg vg_mda_copies unmanaged + check vg_field $vg vg_mda_count $(($mdacp * 2)) + check vg_field $vg vg_mda_used_count $(($mdacp * 2)) + check vg_field $vg vg_mda_copies unmanaged vgremove -f $vg fi done @@ -44,7 +44,7 @@ # Check if a PV has unignored (used) mdas, and if so, ignore pvignore_ () { - pv_mda_used_count=$(get_pv_field "$1" pv_mda_used_count) + pv_mda_used_count=$(get pv_field "$1" pv_mda_used_count) if [ $pv_mda_used_count -ne 0 ]; then pvchange --metadataignore y $1 fi @@ -52,8 +52,8 @@ # Check if a PV has ignored mdas, and if so, unignore (make used) pvunignore_ () { - pv_mda_count=$(get_pv_field "$1" pv_mda_count) - pv_mda_used_count=$(get_pv_field "$1" pv_mda_used_count) + pv_mda_count=$(get pv_field "$1" pv_mda_count) + pv_mda_used_count=$(get pv_field "$1" pv_mda_used_count) if [ $pv_mda_count -gt $pv_mda_used_count ]; then pvchange --metadataignore n $1 fi @@ -62,51 +62,51 @@ echo Test of vgmetadatacopies with vgcreate and vgchange for mdacp in 1 2; do pvcreate --metadatacopies $mdacp $dev1 $dev2 $dev4 $dev5 - check_pv_field_ $dev1 pv_mda_used_count $mdacp - check_pv_field_ $dev2 pv_mda_used_count $mdacp - check_pv_field_ $dev4 pv_mda_used_count $mdacp - check_pv_field_ $dev5 pv_mda_used_count $mdacp + check pv_field $dev1 pv_mda_used_count $mdacp + check pv_field $dev2 pv_mda_used_count $mdacp + check pv_field $dev4 pv_mda_used_count $mdacp + check pv_field $dev5 pv_mda_used_count $mdacp pvcreate --metadatacopies 0 $dev3 vgcreate -c n "$vg" $dev1 $dev2 $dev3 - check_vg_field_ $vg vg_mda_copies unmanaged + check vg_field $vg vg_mda_copies unmanaged echo ensure both --vgmetadatacopies and --metadatacopies accepted vgchange --metadatacopies $(($mdacp * 1)) $vg echo --vgmetadatacopies is persistent on disk echo --vgmetadatacopies affects underlying pv mda ignore - check_vg_field_ $vg vg_mda_copies $(($mdacp * 1)) - check_vg_field_ $vg vg_mda_used_count $(($mdacp * 1)) + check vg_field $vg vg_mda_copies $(($mdacp * 1)) + check vg_field $vg vg_mda_used_count $(($mdacp * 1)) vgchange --vgmetadatacopies $(($mdacp * 2)) $vg - check_vg_field_ $vg vg_mda_copies $(($mdacp * 2)) - check_vg_field_ $vg vg_mda_used_count $(($mdacp * 2)) + check vg_field $vg vg_mda_copies $(($mdacp * 2)) + check vg_field $vg vg_mda_used_count $(($mdacp * 2)) echo allow setting metadatacopies larger than number of PVs vgchange --vgmetadatacopies $(($mdacp * 5)) $vg - check_vg_field_ $vg vg_mda_copies $(($mdacp * 5)) - check_vg_field_ $vg vg_mda_used_count $(($mdacp * 2)) + check vg_field $vg vg_mda_copies $(($mdacp * 5)) + check vg_field $vg vg_mda_used_count $(($mdacp * 2)) echo setting to 0 disables automatic balancing vgchange --vgmetadatacopies unmanaged $vg - check_vg_field_ $vg vg_mda_copies unmanaged + check vg_field $vg vg_mda_copies unmanaged vgremove -f $vg echo vgcreate succeeds even when creating a VG w/all ignored mdas pvchange --metadataignore y $dev1 $dev2 - check_pv_field_ $dev1 pv_mda_count $mdacp - check_pv_field_ $dev2 pv_mda_used_count 0 + check pv_field $dev1 pv_mda_count $mdacp + check pv_field $dev2 pv_mda_used_count 0 vgcreate -c n "$vg" $dev1 $dev2 - check_vg_field_ $vg vg_mda_copies unmanaged + check vg_field $vg vg_mda_copies unmanaged vgremove -f $vg echo vgcreate succeeds with a specific number of metadata copies vgcreate -c n --vgmetadatacopies $(($mdacp * 2)) "$vg" $dev1 $dev2 - check_vg_field_ $vg vg_mda_copies $(($mdacp * 2)) + check vg_field $vg vg_mda_copies $(($mdacp * 2)) vgremove -f $vg vgcreate -c n --vgmetadatacopies $(($mdacp * 1)) "$vg" $dev1 $dev2 - check_vg_field_ $vg vg_mda_copies $(($mdacp * 1)) + check vg_field $vg vg_mda_copies $(($mdacp * 1)) vgremove -f $vg echo vgcreate succeeds with a larger value than total metadatacopies vgcreate -c n --vgmetadatacopies $(($mdacp * 5)) "$vg" $dev1 $dev2 - check_vg_field_ $vg vg_mda_copies $(($mdacp * 5)) + check vg_field $vg vg_mda_copies $(($mdacp * 5)) vgremove -f $vg echo vgcreate succeeds with --vgmetadatacopies unmanaged vgcreate -c n --vgmetadatacopies unmanaged "$vg" $dev1 $dev2 - check_vg_field_ $vg vg_mda_copies unmanaged + check vg_field $vg vg_mda_copies unmanaged vgremove -f $vg pvunignore_ $dev1 pvunignore_ $dev2 @@ -114,24 +114,24 @@ pvunignore_ $dev5 echo vgcreate succeds with small value of --metadatacopies, ignores mdas vgcreate -c n --vgmetadatacopies 1 "$vg" $dev1 $dev2 $dev4 $dev5 - check_vg_field_ $vg vg_mda_copies 1 - check_vg_field_ $vg vg_mda_count $(($mdacp * 4)) - check_vg_field_ $vg vg_mda_used_count 1 + check vg_field $vg vg_mda_copies 1 + check vg_field $vg vg_mda_count $(($mdacp * 4)) + check vg_field $vg vg_mda_used_count 1 echo Setting a larger value should trigger non-ignore of mdas vgchange --metadatacopies 3 $vg - check_vg_field_ $vg vg_mda_copies 3 - check_vg_field_ $vg vg_mda_used_count 3 + check vg_field $vg vg_mda_copies 3 + check vg_field $vg vg_mda_used_count 3 echo Setting all should trigger unignore of all mdas vgchange --vgmetadatacopies all $vg - check_vg_field_ $vg vg_mda_count $(($mdacp * 4)) - check_vg_field_ $vg vg_mda_copies unmanaged - check_vg_field_ $vg vg_mda_used_count $(($mdacp * 4)) + check vg_field $vg vg_mda_count $(($mdacp * 4)) + check vg_field $vg vg_mda_copies unmanaged + check vg_field $vg vg_mda_used_count $(($mdacp * 4)) echo --vgmetadatacopies 0 should be unmanaged for vgchange and vgcreate vgchange --vgmetadatacopies 0 $vg - check_vg_field_ $vg vg_mda_copies unmanaged + check vg_field $vg vg_mda_copies unmanaged vgremove -f $vg vgcreate -c n --vgmetadatacopies 0 "$vg" $dev1 $dev2 $dev4 $dev5 - check_vg_field_ $vg vg_mda_copies unmanaged + check vg_field $vg vg_mda_copies unmanaged vgremove -f $vg done @@ -141,43 +141,43 @@ pvcreate --metadatacopies 0 $dev3 echo Set a large value of vgmetadatacopies vgcreate -c n --vgmetadatacopies $(($mdacp * 5)) "$vg" $dev1 $dev2 $dev3 - check_vg_field_ $vg vg_mda_copies $(($mdacp * 5)) + check vg_field $vg vg_mda_copies $(($mdacp * 5)) echo Ignore mdas on devices to be used for vgextend echo Large value of vgetadatacopies should automatically un-ignore mdas pvchange --metadataignore y $dev4 $dev5 - check_pv_field_ $dev4 pv_mda_used_count 0 + check pv_field $dev4 pv_mda_used_count 0 vgextend $vg $dev4 $dev5 - check_pv_field_ $dev4 pv_mda_used_count $mdacp - check_pv_field_ $dev5 pv_mda_used_count $mdacp + check pv_field $dev4 pv_mda_used_count $mdacp + check pv_field $dev5 pv_mda_used_count $mdacp vgremove -f $vg echo Set a small value of vgmetadatacopies vgcreate -c n --vgmetadatacopies $(($mdacp * 1)) "$vg" $dev1 $dev2 $dev3 - check_vg_field_ $vg vg_mda_copies $(($mdacp * 1)) + check vg_field $vg vg_mda_copies $(($mdacp * 1)) echo Ignore mdas on devices to be used for vgextend echo Small value of vgetadatacopies should leave mdas as ignored pvchange --metadataignore y $dev4 $dev5 - check_pv_field_ $dev4 pv_mda_used_count 0 + check pv_field $dev4 pv_mda_used_count 0 vgextend $vg $dev4 $dev5 - check_pv_field_ $dev4 pv_mda_used_count 0 - check_pv_field_ $dev5 pv_mda_used_count 0 + check pv_field $dev4 pv_mda_used_count 0 + check pv_field $dev5 pv_mda_used_count 0 echo vgreduce of ignored pv w/mda should not trigger any change to ignore bits vgreduce $vg $dev4 - check_pv_field_ $dev4 pv_mda_used_count 0 - check_pv_field_ $dev5 pv_mda_used_count 0 + check pv_field $dev4 pv_mda_used_count 0 + check pv_field $dev5 pv_mda_used_count 0 echo vgreduce of un-ignored pv w/mda should trigger un-ignore on an mda vgreduce $vg $dev1 $dev2 $dev3 - check_pv_field_ $dev5 pv_mda_used_count $mdacp - check_vg_field_ $vg vg_mda_copies $(($mdacp * 1)) + check pv_field $dev5 pv_mda_used_count $mdacp + check vg_field $vg vg_mda_copies $(($mdacp * 1)) pvunignore_ $dev1 pvunignore_ $dev2 echo setting vgmetadatacopies to unmanaged should allow vgextend to add w/out balancing vgchange --vgmetadatacopies unmanaged $vg vgextend $vg $dev1 $dev2 - check_vg_field_ $vg vg_mda_copies unmanaged - check_vg_field_ $vg vg_mda_count $(($mdacp * 3)) - check_vg_field_ $vg vg_mda_used_count $((mdacp * 3)) - check_pv_field_ $dev1 pv_mda_used_count $mdacp - check_pv_field_ $dev2 pv_mda_used_count $mdacp + check vg_field $vg vg_mda_copies unmanaged + check vg_field $vg vg_mda_count $(($mdacp * 3)) + check vg_field $vg vg_mda_used_count $((mdacp * 3)) + check pv_field $dev1 pv_mda_used_count $mdacp + check pv_field $dev2 pv_mda_used_count $mdacp vgremove -f $vg done @@ -187,16 +187,16 @@ vgcreate -c n --vgmetadatacopies 2 $vg1 $dev1 $dev2 $dev3 vgcreate -c n --vgmetadatacopies $(($mdacp * 1)) $vg2 $dev4 $dev5 echo vgsplit/vgmerge preserves value of metadata copies - check_vg_field_ $vg1 vg_mda_copies 2 - check_vg_field_ $vg2 vg_mda_copies $(($mdacp * 1)) + check vg_field $vg1 vg_mda_copies 2 + check vg_field $vg2 vg_mda_copies $(($mdacp * 1)) vgsplit $vg1 $vg2 $dev1 - check_vg_field_ $vg2 vg_mda_copies $(($mdacp * 1)) + check vg_field $vg2 vg_mda_copies $(($mdacp * 1)) vgmerge $vg1 $vg2 - check_vg_field_ $vg1 vg_mda_copies 2 - check_vg_field_ $vg1 vg_mda_count $(($mdacp * 5)) + check vg_field $vg1 vg_mda_copies 2 + check vg_field $vg1 vg_mda_count $(($mdacp * 5)) echo vgsplit into new vg sets proper value of vgmetadatacopies vgsplit --vgmetadatacopies $(($mdacp * 2)) $vg1 $vg2 $dev1 $dev2 - check_vg_field_ $vg2 vg_mda_copies $(($mdacp * 2)) + check vg_field $vg2 vg_mda_copies $(($mdacp * 2)) echo vgchange fails if given both vgmetadatacopies and metadatacopies not vgchange --vgmetadatacopies 5 --metadatacopies 7 $vg2 vgremove -f $vg1 @@ -207,26 +207,26 @@ for mdacp in 1 2; do pvcreate --metadatacopies $mdacp $dev1 $dev2 $dev3 $dev4 $dev5 vgcreate -c n --vgmetadatacopies $(($mdacp * 1)) $vg1 $dev1 $dev2 - check_vg_field_ $vg1 vg_mda_copies $(($mdacp * 1)) - check_vg_field_ $vg1 vg_mda_used_count $(($mdacp * 1)) + check vg_field $vg1 vg_mda_copies $(($mdacp * 1)) + check vg_field $vg1 vg_mda_used_count $(($mdacp * 1)) pvignore_ $dev3 echo Ensure vgextend of PVs with ignored MDAs does not add to vg_mda_used_count vgextend $vg1 $dev3 - check_vg_field_ $vg1 vg_mda_used_count $(($mdacp * 1)) + check vg_field $vg1 vg_mda_used_count $(($mdacp * 1)) echo Using pvchange to unignore should update vg_mda_used_count pvchange -f --metadataignore n $dev3 - check_pv_field_ $dev3 pv_mda_used_count $mdacp - check_vg_field_ $vg1 vg_mda_used_count $(($mdacp * 2)) + check pv_field $dev3 pv_mda_used_count $mdacp + check vg_field $vg1 vg_mda_used_count $(($mdacp * 2)) echo Set unmanaged on the vg should keep ignore bits the same during vgextend vgchange --vgmetadatacopies unmanaged $vg1 - check_vg_field_ $vg1 vg_mda_used_count $(($mdacp * 2)) + check vg_field $vg1 vg_mda_used_count $(($mdacp * 2)) pvunignore_ $dev4 vgextend $vg1 $dev4 - check_pv_field_ $dev4 pv_mda_used_count $mdacp - check_vg_field_ $vg1 vg_mda_used_count $(($mdacp * 3)) + check pv_field $dev4 pv_mda_used_count $mdacp + check vg_field $vg1 vg_mda_used_count $(($mdacp * 3)) echo Using pvchange to ignore should update vg_mda_used_count pvchange -f --metadataignore y $dev4 - check_pv_field_ $dev4 pv_mda_used_count 0 - check_vg_field_ $vg1 vg_mda_used_count $(($mdacp * 2)) + check pv_field $dev4 pv_mda_used_count 0 + check vg_field $vg1 vg_mda_used_count $(($mdacp * 2)) vgremove -f $vg1 done --- LVM2/test/t-metadata.sh 2010/10/26 12:52:25 1.6 +++ LVM2/test/t-metadata.sh 2011/01/05 00:16:20 1.7 @@ -8,7 +8,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -. ./test-utils.sh +. lib/test aux prepare_devs 5 @@ -18,7 +18,7 @@ pvcreate $dev4 pvcreate --metadatacopies 0 $dev5 -vgcreate -c n "$vg" $devs +vgcreate -c n "$vg" $(cat DEVICES) lvcreate -n $lv -l 1 -i5 -I256 $vg pvchange -x n $dev1 @@ -30,9 +30,9 @@ # check that PVs without metadata don't cause too many full device rescans (bz452606) for mdacp in 1 0; do - pvcreate --metadatacopies $mdacp $devs + pvcreate --metadatacopies $mdacp $(cat DEVICES) pvcreate $dev1 - vgcreate -c n $vg $devs + vgcreate -c n $vg $(cat DEVICES) lvcreate -n $lv1 -l 2 -i5 -I256 $vg lvcreate -n $lv2 -m2 -l 2 $vg #lvchange -an $vg @@ -55,9 +55,9 @@ # verify pe_start of all M1 PVs pv_align="128.00k" -check_pv_field_ $dev1 pe_start $pv_align -check_pv_field_ $dev2 pe_start $pv_align -check_pv_field_ $dev3 pe_start $pv_align +check pv_field $dev1 pe_start $pv_align +check pv_field $dev2 pe_start $pv_align +check pv_field $dev3 pe_start $pv_align pvs --units k -o name,pe_start,vg_mda_size,vg_name @@ -65,9 +65,9 @@ vgconvert -M2 $vg # verify pe_start of all M2 PVs -check_pv_field_ $dev1 pe_start $pv_align -check_pv_field_ $dev2 pe_start $pv_align -check_pv_field_ $dev3 pe_start $pv_align +check pv_field $dev1 pe_start $pv_align +check pv_field $dev2 pe_start $pv_align +check pv_field $dev3 pe_start $pv_align pvs --units k -o name,pe_start,vg_mda_size,vg_name @@ -77,4 +77,4 @@ vgcfgrestore -f $TESTDIR/bak-$vg $vg # verify pe_start of $dev3 -check_pv_field_ $dev3 pe_start $pv_align +check pv_field $dev3 pe_start $pv_align --- LVM2/test/t-mirror-names.sh 2010/10/20 15:35:00 1.7 +++ LVM2/test/t-mirror-names.sh 2011/01/05 00:16:20 1.8 @@ -12,7 +12,7 @@ test_description="check namings of mirrored LV" -. ./test-utils.sh +. lib/test # --------------------------------------------------------------------- # Utilities --- LVM2/test/t-mirror-vgreduce-removemissing.sh 2010/04/07 16:00:19 1.9 +++ LVM2/test/t-mirror-vgreduce-removemissing.sh 2011/01/05 00:16:20 1.10 @@ -11,7 +11,7 @@ test_description="ensure that 'vgreduce --removemissing' works on mirrored LV" -. ./test-utils.sh +. lib/test lv_is_on_ () { @@ -86,7 +86,7 @@ # --------------------------------------------------------------------- # Initialize PVs and VGs -prepare_vg 5 +aux prepare_vg 5 # --------------------------------------------------------------------- # Common environment setup/cleanup for each sub testcases @@ -113,7 +113,7 @@ recover_vg_() { - enable_dev $* + aux enable_dev $* pvcreate -ff $* vgextend $vg $* check_and_cleanup_lvs_ @@ -130,9 +130,9 @@ prepare_lvs_ lvcreate -l2 -m1 -n $lv1 $vg $dev1 $dev2 $dev3:0 lvchange -an $vg/$lv1 -aux mimages_are_on_ $lv1 $dev1 $dev2 +mimages_are_on_ $lv1 $dev1 $dev2 mirrorlog_is_on_ $lv1 $dev3 -disable_dev $dev2 +aux disable_dev $dev2 vgreduce --removemissing --force $vg lv_is_linear_ $lv1 lv_is_on_ $lv1 $dev1 @@ -151,9 +151,9 @@ lvcreate -l2 -m2 -n $lv1 $vg $dev1 $dev2 $dev3 $dev4:0 lvchange -an $vg/$lv1 - aux mimages_are_on_ $lv1 $dev1 $dev2 $dev3 + mimages_are_on_ $lv1 $dev1 $dev2 $dev3 mirrorlog_is_on_ $lv1 $dev4 - eval disable_dev \$dev$index + eval aux disable_dev \$dev$index vgreduce --removemissing --force $vg lvs -a -o+devices $vg mimages_are_on_ $lv1 $(rest_pvs_ $index 3) @@ -181,10 +181,10 @@ mimages_are_on_ $lv1 $dev1 $dev2 $dev3 mirrorlog_is_on_ $lv1 $dev4 rest_pvs_ $index 3 - disable_dev $(rest_pvs_ $index 3) + aux disable_dev $(rest_pvs_ $index 3) vgreduce --force --removemissing $vg lvs -a -o+devices $vg - aux lv_is_linear_ $lv1 + lv_is_linear_ $lv1 eval lv_is_on_ $lv1 \$dev$n } @@ -209,7 +209,7 @@ lvconvert -m+1 $vg/$lv1 $dev4 mimages_are_on_ $lv1 $dev1 $dev2 $dev3 $dev4 mirrorlog_is_on_ $lv1 $dev5 - eval disable_dev \$dev$n + eval aux disable_dev \$dev$n vgreduce --removemissing --force $vg lvs -a -o+devices $vg mimages_are_on_ $lv1 $(rest_pvs_ $index 4) @@ -237,7 +237,7 @@ lvconvert -m+1 $vg/$lv1 $dev4 mimages_are_on_ $lv1 $dev1 $dev2 $dev3 $dev4 mirrorlog_is_on_ $lv1 $dev5 - disable_dev $(rest_pvs_ $index 4) + aux disable_dev $(rest_pvs_ $index 4) vgreduce --removemissing --force $vg lvs -a -o+devices $vg eval local dev=\$dev$n @@ -266,7 +266,7 @@ lvconvert -m+2 $vg/$lv1 $dev3 $dev4 mimages_are_on_ $lv1 $dev1 $dev2 $dev3 $dev4 mirrorlog_is_on_ $lv1 $dev5 - eval disable_dev \$dev$n + eval aux disable_dev \$dev$n vgreduce --removemissing --force $vg lvs -a -o+devices $vg mimages_are_on_ $lv1 $(rest_pvs_ $index 4) @@ -294,7 +294,7 @@ lvconvert -m+2 $vg/$lv1 $dev3 $dev4 mimages_are_on_ $lv1 $dev1 $dev2 $dev3 $dev4 mirrorlog_is_on_ $lv1 $dev5 - disable_dev $(rest_pvs_ $index 4) + aux disable_dev $(rest_pvs_ $index 4) vgreduce --removemissing --force $vg lvs -a -o+devices $vg eval local dev=\$dev$n @@ -318,7 +318,7 @@ lvchange -an $vg/$lv1 mimages_are_on_ $lv1 $dev1 $dev2 mirrorlog_is_on_ $lv1 $dev5 -disable_dev $dev5 +aux disable_dev $dev5 vgreduce --removemissing --force $vg mimages_are_on_ $lv1 $dev1 $dev2 not mirrorlog_is_on_ $lv1 $dev5 @@ -331,7 +331,7 @@ lvconvert -m+1 $vg/$lv1 $dev3 mimages_are_on_ $lv1 $dev1 $dev2 $dev3 mirrorlog_is_on_ $lv1 $dev5 -disable_dev $dev5 +aux disable_dev $dev5 vgreduce --removemissing --force $vg mimages_are_on_ $lv1 $dev1 $dev2 $dev3 not mirrorlog_is_on_ $lv1 $dev5 @@ -346,7 +346,7 @@ lvchange -an $vg/$lv1 mimages_are_on_ $lv1 $dev1 $dev2 mirrorlog_is_on_ $lv1 $dev5 -disable_dev $dev1 $dev2 +aux disable_dev $dev1 $dev2 vgreduce --removemissing --force $vg not lvs $vg/$lv1 recover_vg_ $dev1 $dev2 @@ -358,7 +358,7 @@ lvconvert -m+1 $vg/$lv1 $dev3 mimages_are_on_ $lv1 $dev1 $dev2 $dev3 mirrorlog_is_on_ $lv1 $dev5 -disable_dev $dev1 $dev2 $dev3 +aux disable_dev $dev1 $dev2 $dev3 vgreduce --removemissing --force $vg not lvs $vg/$lv1 recover_vg_ $dev1 $dev2 $dev3 @@ -376,7 +376,7 @@ mimages_are_on_ $lv2 $dev3 $dev4 mirrorlog_is_on_ $lv1 $dev5 mirrorlog_is_on_ $lv2 $dev5 -disable_dev $dev2 +aux disable_dev $dev2 vgreduce --removemissing --force $vg mimages_are_on_ $lv2 $dev3 $dev4 mirrorlog_is_on_ $lv2 $dev5 @@ -394,8 +394,8 @@ mimages_are_on_ $lv2 $dev3 $dev4 mirrorlog_is_on_ $lv1 $dev5 mirrorlog_is_on_ $lv2 $dev5 -disable_dev $dev2 -disable_dev $dev4 +aux disable_dev $dev2 +aux disable_dev $dev4 vgreduce --removemissing --force $vg lv_is_linear_ $lv1 lv_is_on_ $lv1 $dev1 --- LVM2/test/t-nomda-missing.sh 2010/07/28 12:20:41 1.3 +++ LVM2/test/t-nomda-missing.sh 2011/01/05 00:16:20 1.4 @@ -10,9 +10,9 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -. ./test-utils.sh +. lib/test -prepare_devs 4 +aux prepare_devs 4 pvcreate $dev1 $dev2 pvcreate --metadatacopies 0 $dev3 $dev4 vgcreate -c n $vg $dev1 $dev2 $dev3 $dev4 @@ -28,7 +28,7 @@ lvcreate -l1 -m1 -n mirror123 $vg $dev1 $dev2 $dev3 vgchange -a n $vg -disable_dev $dev1 +aux disable_dev $dev1 not vgchange -a y $vg not vgck $vg @@ -41,8 +41,8 @@ check inactive $vg mirror123 vgchange -a n $vg -enable_dev $dev1 -disable_dev $dev2 +aux enable_dev $dev1 +aux disable_dev $dev2 not vgchange -a y $vg not vgck $vg @@ -55,8 +55,8 @@ check inactive $vg mirror123 vgchange -a n $vg -enable_dev $dev2 -disable_dev $dev3 +aux enable_dev $dev2 +aux disable_dev $dev3 not vgchange -a y $vg not vgck $vg @@ -69,8 +69,8 @@ check active $vg mirror12 vgchange -a n $vg -enable_dev $dev3 -disable_dev $dev4 +aux enable_dev $dev3 +aux disable_dev $dev4 vgchange -a y $vg not vgck $vg --- LVM2/test/t-pool-labels.sh 2008/11/10 13:44:01 1.3 +++ LVM2/test/t-pool-labels.sh 2011/01/05 00:16:20 1.4 @@ -8,7 +8,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -. ./test-utils.sh +. lib/test # create the old GFS pool labeled linear devices create_pool_label_() @@ -32,7 +32,7 @@ # check that vgdisplay and pvcreate -ff works with the pool device vgdisplay --config 'global { locking_type = 0 }' -disable_dev "$dev2" +aux disable_dev "$dev2" # FIXME! since pool1 cannot be opened, vgdisplay gives error... should we say # "not" there instead, checking that it indeed does fail? vgdisplay --config 'global { locking_type = 0 }' || true --- LVM2/test/t-pv-range-overflow.sh 2008/10/06 16:47:07 1.4 +++ LVM2/test/t-pv-range-overflow.sh 2011/01/05 00:16:20 1.5 @@ -11,7 +11,7 @@ # 'Ensure that pvmove diagnoses PE-range values 2^32 and larger.' -. ./test-utils.sh +. lib/test aux prepare_vg 2 --- LVM2/test/t-pvchange-usage.sh 2010/08/02 13:20:50 1.5 +++ LVM2/test/t-pvchange-usage.sh 2011/01/05 00:16:20 1.6 @@ -11,7 +11,7 @@ # 'Test pvchange option values' -. ./test-utils.sh +. lib/test aux prepare_devs 4 @@ -24,15 +24,15 @@ # "pvchange adds/dels tag to pvs with metadatacopies = $mda " pvchange $dev1 --addtag test$mda - check_pv_field_ $dev1 pv_tags test$mda + check pv_field $dev1 pv_tags test$mda pvchange $dev1 --deltag test$mda - check_pv_field_ $dev1 pv_tags "" + check pv_field $dev1 pv_tags "" # "vgchange disable/enable allocation for pvs with metadatacopies = $mda (bz452982)" pvchange $dev1 -x n - check_pv_field_ $dev1 pv_attr -- + check pv_field $dev1 pv_attr -- pvchange $dev1 -x y - check_pv_field_ $dev1 pv_attr a- + check pv_field $dev1 pv_attr a- # 'remove pv' vgremove $vg1 @@ -45,13 +45,13 @@ vgcreate $vg1 $dev1 $dev2 pvchange -u $dev1 pvchange -u $dev2 -vg_validate_pvlv_counts_ $vg1 2 0 0 +check pvlv_counts $vg1 2 0 0 pvchange -u --all -vg_validate_pvlv_counts_ $vg1 2 0 0 +check pvlv_counts $vg1 2 0 0 # "pvchange rejects uuid change under an active lv" lvcreate -l 16 -i 2 -n $lv --alloc anywhere $vg1 -vg_validate_pvlv_counts_ $vg1 2 1 0 +check pvlv_counts $vg1 2 1 0 not pvchange -u $dev1 lvchange -an "$vg1"/"$lv" pvchange -u $dev1 --- LVM2/test/t-pvcreate-metadata0.sh 2008/10/06 16:47:07 1.2 +++ LVM2/test/t-pvcreate-metadata0.sh 2011/01/05 00:16:20 1.3 @@ -15,7 +15,7 @@ # # 'Test pvcreate without metadata on all pvs' -. ./test-utils.sh +. lib/test aux prepare_devs 2 128 --- LVM2/test/t-pvcreate-operation-md.sh 2010/08/21 15:43:45 1.10 +++ LVM2/test/t-pvcreate-operation-md.sh 2011/01/05 00:16:20 1.11 @@ -18,9 +18,9 @@ test -f /proc/mdstat && grep -q raid0 /proc/mdstat || \ modprobe raid0 || exit 200 -. ./test-utils.sh +. lib/test -prepare_lvmconf '[ "a|/dev/md.*|", "a/dev\/mapper\/.*$/", "r/.*/" ]' +prepare_lvmconf 'devices/filter = [ "a|/dev/md.*|", "a/dev\/mapper\/.*$/", "r/.*/" ]' aux prepare_devs 2 # Have MD use a non-standard name to avoid colliding with an existing MD device @@ -60,14 +60,14 @@ pvcreate --metadatasize 128k \ --config 'devices {md_chunk_alignment=0 data_alignment_detection=0 data_alignment_offset_detection=0}' \ $mddev -check_pv_field_ $mddev pe_start $pv_align +check pv_field $mddev pe_start $pv_align # Test md_chunk_alignment independent of topology-aware detection pv_align="1.00m" pvcreate --metadatasize 128k \ --config 'devices {data_alignment_detection=0 data_alignment_offset_detection=0}' \ $mddev -check_pv_field_ $mddev pe_start $pv_align +check pv_field $mddev pe_start $pv_align # Get linux minor version linux_minor=$(echo `uname -r` | cut -d'.' -f3 | cut -d'-' -f1) @@ -79,7 +79,7 @@ # optimal_io_size=131072, minimum_io_size=65536 pvcreate --metadatasize 128k \ --config 'devices { md_chunk_alignment=0 }' $mddev - check_pv_field_ $mddev pe_start $pv_align + check pv_field $mddev pe_start $pv_align fi # partition MD array directly, depends on blkext in Linux >= 2.6.28 @@ -113,7 +113,7 @@ # default alignment is 1M, add alignment_offset pv_align=$((1048576+$alignment_offset))B pvcreate --metadatasize 128k $mddev_p - check_pv_field_ $mddev_p pe_start $pv_align "--units b" + check pv_field $mddev_p pe_start $pv_align "--units b" pvremove $mddev_p fi fi @@ -133,11 +133,11 @@ pv_align="2.00m" pvcreate --metadatasize 128k \ --config 'devices { md_chunk_alignment=0 }' $mddev - check_pv_field_ $mddev pe_start $pv_align + check pv_field $mddev pe_start $pv_align # now verify pe_start alignment override using --dataalignment pv_align="192.00k" pvcreate --dataalignment 64k --metadatasize 128k \ --config 'devices { md_chunk_alignment=0 }' $mddev - check_pv_field_ $mddev pe_start $pv_align + check pv_field $mddev pe_start $pv_align fi --- LVM2/test/t-pvcreate-operation.sh 2010/08/12 04:09:00 1.19 +++ LVM2/test/t-pvcreate-operation.sh 2011/01/05 00:16:20 1.20 @@ -8,7 +8,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -. ./test-utils.sh +. lib/test aux prepare_devs 4 --- LVM2/test/t-pvcreate-usage.sh 2010/08/12 04:11:50 1.16 +++ LVM2/test/t-pvcreate-usage.sh 2011/01/05 00:16:20 1.17 @@ -12,7 +12,7 @@ test_description='Test pvcreate option values' PAGESIZE=$(getconf PAGESIZE) -. ./test-utils.sh +. lib/test aux prepare_devs 4 @@ -25,7 +25,7 @@ # x. metadatasize 0, defaults to 255 # FIXME: unable to check default value, not in reporting cmds # should default to 255 according to code -# check_pv_field_ pv_mda_size 255 +# check pv_field pv_mda_size 255 #COMM 'pvcreate accepts metadatasize 0' pvcreate --metadatasize 0 $dev1 pvremove $dev1 @@ -34,7 +34,7 @@ pvcreate --metadatasize 512k $dev1 pvcreate --metadatasize 96k $dev2 vgcreate $vg $dev1 $dev2 -compare_two_fields_ vgs $vg vg_mda_size pvs $dev2 pv_mda_size +check compare_fields vgs $vg vg_mda_size pvs $dev2 pv_mda_size vgremove -ff $vg # x. metadatasize too large @@ -51,9 +51,9 @@ pvcreate --$j 0 $dev1 pvcreate --$j 1 $dev2 pvcreate --$j 2 $dev3 -check_pv_field_ $dev1 pv_mda_count 0 -check_pv_field_ $dev2 pv_mda_count 1 -check_pv_field_ $dev3 pv_mda_count 2 +check pv_field $dev1 pv_mda_count 0 +check pv_field $dev2 pv_mda_count 1 +check pv_field $dev3 pv_mda_count 2 pvremove $dev1 pvremove $dev2 pvremove $dev3 @@ -89,21 +89,21 @@ #COMM 'pvcreate always rounded up to page size for start of device' #pvcreate --metadatacopies 0 --dataalignment 1 $dev1 # amuse shell experts -#check_pv_field_ $dev1 pe_start $(($(getconf PAGESIZE)/1024))".00k" +#check pv_field $dev1 pe_start $(($(getconf PAGESIZE)/1024))".00k" #COMM 'pvcreate sets data offset directly' pvcreate --dataalignment 512k $dev1 -check_pv_field_ $dev1 pe_start 512.00k +check pv_field $dev1 pe_start 512.00k #COMM 'vgcreate/vgremove do not modify data offset of existing PV' vgcreate $vg $dev1 --config 'devices { data_alignment = 1024 }' -check_pv_field_ $dev1 pe_start 512.00k +check pv_field $dev1 pe_start 512.00k vgremove $vg --config 'devices { data_alignment = 1024 }' -check_pv_field_ $dev1 pe_start 512.00k +check pv_field $dev1 pe_start 512.00k #COMM 'pvcreate sets data offset next to mda area' pvcreate --metadatasize 100k --dataalignment 100k $dev1 -check_pv_field_ $dev1 pe_start 200.00k +check pv_field $dev1 pe_start 200.00k # metadata area start is aligned according to pagesize # pagesize should be 64k or 4k ... @@ -114,21 +114,21 @@ fi pvcreate --metadatasize 128k --dataalignment 3.5k $dev1 -check_pv_field_ $dev1 pe_start $pv_align +check pv_field $dev1 pe_start $pv_align pvcreate --metadatasize 128k --metadatacopies 2 --dataalignment 3.5k $dev1 -check_pv_field_ $dev1 pe_start $pv_align +check pv_field $dev1 pe_start $pv_align # data area is aligned to 1M by default, # data area start is shifted by the specified alignment_offset pv_align="1052160B" # 1048576 + (7*512) pvcreate --metadatasize 128k --dataalignmentoffset 7s $dev1 -check_pv_field_ $dev1 pe_start $pv_align "--units b" +check pv_field $dev1 pe_start $pv_align "--units b" # 2nd metadata area is created without problems when # data area start is shifted by the specified alignment_offset pvcreate --metadatasize 128k --metadatacopies 2 --dataalignmentoffset 7s $dev1 -check_pv_field_ $dev1 pv_mda_count 2 +check pv_field $dev1 pv_mda_count 2 # FIXME: compare start of 2nd mda with and without --dataalignmentoffset #COMM 'pv with LVM1 compatible data alignment can be convereted' @@ -137,7 +137,7 @@ vgcreate -s 1m $vg $dev1 vgconvert -M1 $vg vgconvert -M2 $vg -check_pv_field_ $dev1 pe_start 256.00k +check pv_field $dev1 pe_start 256.00k vgremove $vg #COMM 'pv with LVM1 incompatible data alignment cannot be convereted' @@ -155,8 +155,8 @@ vgcfgbackup -f "$(pwd)/backup.$$" $vg sed 's/pe_start = [0-9]*/pe_start = 0/' "$(pwd)/backup.$$" > "$(pwd)/backup.$$1" vgcfgrestore -f "$(pwd)/backup.$$1" $vg -check_pv_field_ $dev1 pe_start 0 -check_pv_field_ $dev2 pe_start 0 +check pv_field $dev1 pe_start 0 +check pv_field $dev2 pe_start 0 vgremove $vg echo test pvcreate --metadataignore @@ -165,25 +165,25 @@ for ignore in y n; do echo pvcreate --metadataignore has proper mda_count and mda_used_count pvcreate --metadatacopies $mdacp --metadataignore $ignore $dev1 $dev2 - check_pv_field_ $dev1 pv_mda_count $mdacp - check_pv_field_ $dev2 pv_mda_count $mdacp + check pv_field $dev1 pv_mda_count $mdacp + check pv_field $dev2 pv_mda_count $mdacp if [ $ignore = y ]; then - check_pv_field_ $dev1 pv_mda_used_count 0 - check_pv_field_ $dev2 pv_mda_used_count 0 + check pv_field $dev1 pv_mda_used_count 0 + check pv_field $dev2 pv_mda_used_count 0 else - check_pv_field_ $dev1 pv_mda_used_count $mdacp - check_pv_field_ $dev2 pv_mda_used_count $mdacp + check pv_field $dev1 pv_mda_used_count $mdacp + check pv_field $dev2 pv_mda_used_count $mdacp fi echo vgcreate has proper vg_mda_count and vg_mda_used_count if [ $pv_in_vg = 1 ]; then vgcreate -c n "$vg" $dev1 $dev2 - check_vg_field_ $vg vg_mda_count $(($mdacp * 2)) + check vg_field $vg vg_mda_count $(($mdacp * 2)) if [ $ignore = y ]; then - check_vg_field_ $vg vg_mda_used_count 1 + check vg_field $vg vg_mda_used_count 1 else - check_vg_field_ $vg vg_mda_used_count $(($mdacp * 2)) + check vg_field $vg vg_mda_used_count $(($mdacp * 2)) fi - check_vg_field_ $vg vg_mda_copies unmanaged + check vg_field $vg vg_mda_copies unmanaged vgremove $vg fi done --- LVM2/test/t-pvmove-basic.sh 2010/08/02 13:18:02 1.11 +++ LVM2/test/t-pvmove-basic.sh 2011/01/05 00:16:20 1.12 @@ -12,7 +12,7 @@ test_description="ensure that pvmove works with basic options" -. ./test-utils.sh +. lib/test # --------------------------------------------------------------------- # Utilities @@ -361,9 +361,9 @@ #COMM "pvmove out of --metadatacopies 0 PV (bz252150)" vgremove -ff $vg -pvcreate $devs +pvcreate $(cat DEVICES) pvcreate --metadatacopies 0 $dev1 $dev2 -vgcreate -c n $vg $devs +vgcreate -c n $vg $(cat DEVICES) lvcreate -l4 -n $lv1 $vg $dev1 pvmove $dev1 --- LVM2/test/t-pvremove-usage.sh 2010/02/17 15:41:28 1.6 +++ LVM2/test/t-pvremove-usage.sh 2011/01/05 00:16:20 1.7 @@ -9,7 +9,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -. ./test-utils.sh +. lib/test aux prepare_devs 3 pvcreate $dev1 --- LVM2/test/t-read-ahead.sh 2010/04/07 14:46:26 1.12 +++ LVM2/test/t-read-ahead.sh 2011/01/05 00:16:20 1.13 @@ -15,7 +15,7 @@ test_description='Test read-ahead functionality' -. ./test-utils.sh +. lib/test get_lvs_() { @@ -53,10 +53,10 @@ # Check default, active/inactive values for read_ahead / kernel_read_ahead lvcreate -n $lv -l 50%FREE $vg lvchange -an $vg/$lv -check_lv_field_ $vg/$lv lv_read_ahead auto -check_lv_field_ $vg/$lv lv_kernel_read_ahead -1 +check lv_field $vg/$lv lv_read_ahead auto +check lv_field $vg/$lv lv_kernel_read_ahead -1 lvchange -r 512 $vg/$lv lvchange -ay $vg/$lv -check_lv_field_ $vg/$lv lv_read_ahead 256.00k -check_lv_field_ $vg/$lv lv_kernel_read_ahead 256.00k +check lv_field $vg/$lv lv_read_ahead 256.00k +check lv_field $vg/$lv lv_kernel_read_ahead 256.00k lvremove -ff $vg --- LVM2/test/t-snapshot-autoumount-dmeventd.sh 2010/10/29 16:43:52 1.1 +++ LVM2/test/t-snapshot-autoumount-dmeventd.sh 2011/01/05 00:16:20 1.2 @@ -10,15 +10,13 @@ # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # no automatic extensions please -LVM_TEST_CONFIG_SNAPSHOT_AUTOEXTEND=" - snapshot_autoextend_percent = 0 - snapshot_autoextend_threshold = 100" -. ./test-utils.sh +. lib/test which mkfs.ext2 || exit 200 -prepare_lvmconf +aux lvmconf "activation/snapshot_autoextend_percent = 0" \ + "activation/snapshot_autoextend_threshold = 100" aux prepare_vg 2 aux prepare_dmeventd --- LVM2/test/t-snapshot-merge.sh 2010/08/03 20:22:31 1.7 +++ LVM2/test/t-snapshot-merge.sh 2011/01/05 00:16:20 1.8 @@ -12,7 +12,7 @@ which mkfs.ext3 || exit 200 -. ./test-utils.sh +. lib/test lvdev_() { --- LVM2/test/t-snapshots-of-mirrors.sh 2010/07/28 12:20:41 1.5 +++ LVM2/test/t-snapshots-of-mirrors.sh 2011/01/05 00:16:20 1.6 @@ -8,9 +8,9 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -. ./test-utils.sh +. lib/test -prepare_vg 4 +aux prepare_vg 4 # Create snapshot of a mirror origin lvcreate -m 1 -L 10M -n lv $vg --- LVM2/test/t-tags.sh 2010/02/16 17:49:18 1.1 +++ LVM2/test/t-tags.sh 2011/01/05 00:16:20 1.2 @@ -8,15 +8,15 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -. ./test-utils.sh +. lib/test aux prepare_pvs 5 # vgcreate with --addtag vgcreate -c n --addtag firstvg $vg1 $dev1 $dev2 vgcreate -c n --addtag secondvg $vg2 $dev3 $dev4 -check_vg_field_ $vg1 tags firstvg -check_vg_field_ $vg2 tags secondvg +check vg_field $vg1 tags firstvg +check vg_field $vg2 tags secondvg vgremove -ff $vg1 vgremove -ff $vg2 @@ -31,10 +31,10 @@ vgchange --addtag secondvgtag1 $vg2 vgchange --addtag secondvgtag2 $vg2 vgchange --addtag secondvgtag3 $vg2 -check_vg_field_ @firstvgtag2 tags "firstvgtag1,firstvgtag2,firstvgtag3" -check_vg_field_ @secondvgtag1 tags "secondvgtag1,secondvgtag2,secondvgtag3" +check vg_field @firstvgtag2 tags "firstvgtag1,firstvgtag2,firstvgtag3" +check vg_field @secondvgtag1 tags "secondvgtag1,secondvgtag2,secondvgtag3" vgchange --deltag firstvgtag2 $vg1 -check_vg_field_ @firstvgtag1 tags "firstvgtag1,firstvgtag3" +check vg_field @firstvgtag1 tags "firstvgtag1,firstvgtag3" # deleting a tag multiple times is not an error vgchange --deltag firstvgtag2 $vg1 vgchange --deltag firstvgtag1 $vg2 @@ -45,10 +45,10 @@ vgcreate -c n $vg1 $dev1 $dev2 lvcreate --addtag firstlvtag1 -l 4 -n $lv1 $vg1 lvcreate --addtag secondlvtag1 -l 4 -n $lv2 $vg1 -check_lv_field_ @firstlvtag1 tags "firstlvtag1" -not check_lv_field_ @secondlvtag1 tags "firstlvtag1" -check_lv_field_ $vg1/$lv2 tags "secondlvtag1" -not check_lv_field_ $vg1/$lv1 tags "secondlvtag1" +check lv_field @firstlvtag1 tags "firstlvtag1" +not check lv_field @secondlvtag1 tags "firstlvtag1" +check lv_field $vg1/$lv2 tags "secondlvtag1" +not check lv_field $vg1/$lv1 tags "secondlvtag1" vgremove -ff $vg1 # lvchange with --addtag and --deltag @@ -63,12 +63,12 @@ lvchange --addtag secondlvtag1 $vg1/$lv2 lvchange --addtag secondlvtag2 $vg1/$lv2 lvchange --addtag secondlvtag3 $vg1/$lv2 -check_lv_field_ $vg1/$lv1 tags "firstlvtag1,firstlvtag2,firstlvtag3" -not $(check_lv_field_ $vg1/$lv1 tags "secondlvtag1") -check_lv_field_ $vg1/$lv2 tags "secondlvtag1,secondlvtag2,secondlvtag3" -not $(check_lv_field_ $vg1/$lv1 tags "secondlvtag1") +check lv_field $vg1/$lv1 tags "firstlvtag1,firstlvtag2,firstlvtag3" +not $(check lv_field $vg1/$lv1 tags "secondlvtag1") +check lv_field $vg1/$lv2 tags "secondlvtag1,secondlvtag2,secondlvtag3" +not $(check lv_field $vg1/$lv1 tags "secondlvtag1") # deleting a tag multiple times is not an error lvchange --deltag firstlvtag2 $vg1/$lv1 lvchange --deltag firstlvtag2 $vg1/$lv1 -check_lv_field_ $vg1/$lv1 tags "firstlvtag1,firstlvtag3" -check_lv_field_ $vg1/$lv2 tags "secondlvtag1,secondlvtag2,secondlvtag3" +check lv_field $vg1/$lv1 tags "firstlvtag1,firstlvtag3" +check lv_field $vg1/$lv2 tags "secondlvtag1,secondlvtag2,secondlvtag3" --- LVM2/test/t-test-partition.sh 2010/10/20 15:14:13 1.1 +++ LVM2/test/t-test-partition.sh 2011/01/05 00:16:20 1.2 @@ -18,7 +18,7 @@ LVM_TEST_CONFIG_DEVICES="types = [\"device-mapper\", 142]" -. ./test-utils.sh +. lib/test aux prepare_pvs 1 30 --- LVM2/test/t-topology-support.sh 2010/08/12 04:11:50 1.5 +++ LVM2/test/t-topology-support.sh 2011/01/05 00:16:20 1.6 @@ -15,7 +15,7 @@ test $linux_minor -ge 31 || exit 200 -. ./test-utils.sh +. lib/test check_logical_block_size() { @@ -64,41 +64,41 @@ # Create "desktop-class" 4K drive # (logical_block_size=512, physical_block_size=4096, alignment_offset=0): LOGICAL_BLOCK_SIZE=512 -prepare_scsi_debug_dev $DEV_SIZE \ +aux prepare_scsi_debug_dev $DEV_SIZE \ sector_size=$LOGICAL_BLOCK_SIZE physblk_exp=3 check_logical_block_size $SCSI_DEBUG_DEV $LOGICAL_BLOCK_SIZE aux prepare_pvs $NUM_DEVS $PER_DEV_SIZE -vgcreate -c n $vg $devs +vgcreate -c n $vg $(cat DEVICES) test_snapshot_mount vgremove $vg -cleanup_scsi_debug_dev +aux cleanup_scsi_debug_dev # --------------------------------------------- # Create "desktop-class" 4K drive w/ 63-sector DOS partition compensation # (logical_block_size=512, physical_block_size=4096, alignment_offset=3584): LOGICAL_BLOCK_SIZE=512 -prepare_scsi_debug_dev $DEV_SIZE \ +aux prepare_scsi_debug_dev $DEV_SIZE \ sector_size=$LOGICAL_BLOCK_SIZE physblk_exp=3 lowest_aligned=7 check_logical_block_size $SCSI_DEBUG_DEV $LOGICAL_BLOCK_SIZE aux prepare_pvs $NUM_DEVS $PER_DEV_SIZE -vgcreate -c n $vg $devs +vgcreate -c n $vg $(cat DEVICES) test_snapshot_mount vgremove $vg -cleanup_scsi_debug_dev +aux cleanup_scsi_debug_dev # --------------------------------------------- # Create "enterprise-class" 4K drive # (logical_block_size=4096, physical_block_size=4096, alignment_offset=0): LOGICAL_BLOCK_SIZE=4096 -prepare_scsi_debug_dev $DEV_SIZE \ +aux prepare_scsi_debug_dev $DEV_SIZE \ sector_size=$LOGICAL_BLOCK_SIZE check_logical_block_size $SCSI_DEBUG_DEV $LOGICAL_BLOCK_SIZE aux prepare_pvs $NUM_DEVS $PER_DEV_SIZE -vgcreate -c n $vg $devs +vgcreate -c n $vg $(cat DEVICES) test_snapshot_mount vgremove $vg --- LVM2/test/t-unknown-segment.sh 2009/10/16 17:41:52 1.1 +++ LVM2/test/t-unknown-segment.sh 2011/01/05 00:16:20 1.2 @@ -9,7 +9,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -. ./test-utils.sh +. lib/test aux prepare_vg 4 --- LVM2/test/t-unlost-pv.sh 2009/06/10 20:17:33 1.3 +++ LVM2/test/t-unlost-pv.sh 2011/01/05 00:16:20 1.4 @@ -9,7 +9,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -. ./test-utils.sh +. lib/test aux prepare_vg 3 @@ -24,15 +24,15 @@ } # try orphaning a missing PV (bz45867) -disable_dev $dev1 +aux disable_dev $dev1 vgreduce --removemissing --force $vg -enable_dev $dev1 +aux enable_dev $dev1 check # try to just change metadata; we expect the new version (with MISSING_PV set # on the reappeared volume) to be written out to the previously missing PV vgextend $vg $dev1 -disable_dev $dev1 +aux disable_dev $dev1 lvremove $vg/mirror -enable_dev $dev1 +aux enable_dev $dev1 check --- LVM2/test/t-vgcfgbackup-usage.sh 2010/10/04 18:59:02 1.6 +++ LVM2/test/t-vgcfgbackup-usage.sh 2011/01/05 00:16:20 1.7 @@ -9,7 +9,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -. ./test-utils.sh +. lib/test aux prepare_pvs 4 @@ -28,7 +28,7 @@ # and vgcfgrestore able to restore them when device reappears pv1_uuid=$(pvs --noheadings -o pv_uuid $dev1) pv2_uuid=$(pvs --noheadings -o pv_uuid $dev2) -vgcreate $vg $devs +vgcreate $vg $(cat DEVICES) lvcreate -l1 -n $lv1 $vg $dev1 lvcreate -l1 -n $lv2 $vg $dev2 lvcreate -l1 -n $lv3 $vg $dev3 @@ -46,8 +46,8 @@ # FIXME: clvmd seems to have problem with metadata format change here # fix it and remove this vgscan vgscan -pvcreate -M1 $devs -vgcreate -M1 -c n $vg $devs +pvcreate -M1 $(cat DEVICES) +vgcreate -M1 -c n $vg $(cat DEVICES) lvcreate -l1 -n $lv1 $vg $dev1 pvremove -ff -y $dev2 not lvcreate -l1 -n $lv1 $vg $dev3 --- LVM2/test/t-vgchange-maxlv.sh 2010/10/20 15:32:15 1.1 +++ LVM2/test/t-vgchange-maxlv.sh 2011/01/05 00:16:20 1.2 @@ -9,9 +9,9 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -. ./test-utils.sh +. lib/test -prepare_dmeventd +aux prepare_dmeventd aux prepare_pvs 3 vgcreate -c n -l 2 $vg $dev1 $dev2 $dev3 --- LVM2/test/t-vgchange-usage.sh 2010/02/16 17:48:46 1.2 +++ LVM2/test/t-vgchange-usage.sh 2011/01/05 00:16:20 1.3 @@ -11,34 +11,34 @@ test_description='Exercise some vgchange diagnostics' -. ./test-utils.sh +. lib/test aux prepare_pvs 3 pvcreate --metadatacopies 0 $dev1 -vgcreate $vg $devs +vgcreate $vg $(cat DEVICES) vgdisplay $vg # vgchange -p MaxPhysicalVolumes (bz202232) -aux check_vg_field_ $vg max_pv 0 +aux check vg_field $vg max_pv 0 vgchange -p 128 $vg -aux check_vg_field_ $vg max_pv 128 +aux check vg_field $vg max_pv 128 -pv_count=$(get_vg_field $vg pv_count) +pv_count=$(get vg_field $vg pv_count) not vgchange -p 2 $vg 2>err grep "MaxPhysicalVolumes is less than the current number $pv_count of PVs for" err -aux check_vg_field_ $vg max_pv 128 +aux check vg_field $vg max_pv 128 # vgchange -l MaxLogicalVolumes -aux check_vg_field_ $vg max_lv 0 +aux check vg_field $vg max_lv 0 vgchange -l 128 $vg -aux check_vg_field_ $vg max_lv 128 +aux check vg_field $vg max_lv 128 lvcreate -l4 -n$lv1 $vg lvcreate -l4 -n$lv2 $vg -lv_count=$(get_vg_field $vg lv_count) +lv_count=$(get vg_field $vg lv_count) not vgchange -l 1 $vg 2>err grep "MaxLogicalVolume is less than the current number $lv_count of LVs for" err -aux check_vg_field_ $vg max_lv 128 +aux check vg_field $vg max_lv 128 --- LVM2/test/t-vgcreate-usage.sh 2010/08/12 04:11:50 1.17 +++ LVM2/test/t-vgcreate-usage.sh 2011/01/05 00:16:20 1.18 @@ -11,7 +11,7 @@ test_description='Exercise some vgcreate diagnostics' -. ./test-utils.sh +. lib/test aux prepare_devs 3 pvcreate $dev1 $dev2 @@ -21,7 +21,7 @@ #COMM 'vgcreate accepts 8.00m physicalextentsize for VG' vgcreate -c n $vg --physicalextentsize 8.00m $dev1 $dev2 -check_vg_field_ $vg vg_extent_size 8.00m +check vg_field $vg vg_extent_size 8.00m vgremove $vg # try vgck and to remove it again - should fail (but not segfault) not vgremove $vg @@ -29,12 +29,12 @@ #COMM 'vgcreate accepts smaller (128) maxlogicalvolumes for VG' vgcreate -c n $vg --maxlogicalvolumes 128 $dev1 $dev2 -check_vg_field_ $vg max_lv 128 +check vg_field $vg max_lv 128 vgremove $vg #COMM 'vgcreate accepts smaller (128) maxphysicalvolumes for VG' vgcreate -c n $vg --maxphysicalvolumes 128 $dev1 $dev2 -check_vg_field_ $vg max_pv 128 +check vg_field $vg max_pv 128 vgremove $vg #COMM 'vgcreate rejects a zero physical extent size' @@ -75,7 +75,7 @@ # Test default (4MB) vg_extent_size as well as limits of extent_size not vgcreate -c n --physicalextentsize 0k $vg $dev1 $dev2 vgcreate -c n --physicalextentsize 1k $vg $dev1 $dev2 -check_vg_field_ $vg vg_extent_size 1.00k +check vg_field $vg vg_extent_size 1.00k vgremove -ff $vg not vgcreate -c n --physicalextentsize 3K $vg $dev1 $dev2 not vgcreate -c n --physicalextentsize 1024t $vg $dev1 $dev2 @@ -84,10 +84,10 @@ # Test default max_lv, max_pv, extent_size, alloc_policy, clustered vgcreate -c n $vg $dev1 $dev2 -check_vg_field_ $vg vg_extent_size 4.00m -check_vg_field_ $vg max_lv 0 -check_vg_field_ $vg max_pv 0 -check_vg_field_ $vg vg_attr "wz--n-" +check vg_field $vg vg_extent_size 4.00m +check vg_field $vg max_lv 0 +check vg_field $vg max_pv 0 +check vg_field $vg vg_attr "wz--n-" vgremove -ff $vg # Implicit pvcreate tests, test pvcreate options on vgcreate @@ -111,22 +111,22 @@ for i in 1 2 do vgcreate -c n --pvmetadatacopies $i $vg $dev1 - check_pv_field_ $dev1 pv_mda_count $i + check pv_field $dev1 pv_mda_count $i vgremove -f $vg pvremove -f $dev1 done not vgcreate -c n --pvmetadatacopies 0 $vg $dev1 pvcreate --metadatacopies 1 $dev2 vgcreate -c n --pvmetadatacopies 0 $vg $dev1 $dev2 -check_pv_field_ $dev1 pv_mda_count 0 -check_pv_field_ $dev2 pv_mda_count 1 +check pv_field $dev1 pv_mda_count 0 +check pv_field $dev2 pv_mda_count 1 vgremove -f $vg pvremove -f $dev1 # metadatasize, dataalignment, dataalignmentoffset #COMM 'pvcreate sets data offset next to mda area' vgcreate -c n --metadatasize 100k --dataalignment 100k $vg $dev1 -check_pv_field_ $dev1 pe_start 200.00k +check pv_field $dev1 pe_start 200.00k vgremove -f $vg pvremove -f $dev1 @@ -134,7 +134,7 @@ # data area start is shifted by the specified alignment_offset pv_align="1052160B" # 1048576 + (7*512) vgcreate -c n --metadatasize 128k --dataalignmentoffset 7s $vg $dev1 -check_pv_field_ $dev1 pe_start $pv_align "--units b" +check pv_field $dev1 pe_start $pv_align "--units b" vgremove -f $vg pvremove -f $dev1 @@ -142,7 +142,7 @@ for i in 1 2 do vgcreate -c n -M $i $vg $dev1 - check_vg_field_ $vg vg_fmt lvm$i + check vg_field $vg vg_fmt lvm$i vgremove -f $vg pvremove -f $dev1 done @@ -156,8 +156,8 @@ # all PVs exist in the VG after created pvcreate $dev1 vgcreate -c n $vg1 $dev1 $dev2 $dev3 -check_pv_field_ $dev1 vg_name $vg1 -check_pv_field_ $dev2 vg_name $vg1 -check_pv_field_ $dev3 vg_name $vg1 +check pv_field $dev1 vg_name $vg1 +check pv_field $dev2 vg_name $vg1 +check pv_field $dev3 vg_name $vg1 vgremove -f $vg1 pvremove -f $dev1 $dev2 $dev3 --- LVM2/test/t-vgextend-restoremissing.sh 2010/10/13 10:36:26 1.1 +++ LVM2/test/t-vgextend-restoremissing.sh 2011/01/05 00:16:20 1.2 @@ -9,7 +9,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -. ./test-utils.sh +. lib/test aux prepare_vg 3 @@ -19,9 +19,9 @@ # try to just change metadata; we expect the new version (with MISSING_PV set # on the reappeared volume) to be written out to the previously missing PV -disable_dev $dev1 +aux disable_dev $dev1 lvremove $vg/mirror -enable_dev $dev1 +aux enable_dev $dev1 not vgck $vg 2>&1 | tee log grep "missing 1 physical volume" log not lvcreate -m 1 -l 1 -n mirror $vg # write operations fail --- LVM2/test/t-vgextend-usage.sh 2010/08/12 04:11:50 1.5 +++ LVM2/test/t-vgextend-usage.sh 2011/01/05 00:16:20 1.6 @@ -12,7 +12,7 @@ # Exercise various vgextend commands # -. ./test-utils.sh +. lib/test aux prepare_devs 5 @@ -55,7 +55,7 @@ for i in 0 1 2 do vgextend --pvmetadatacopies $i $vg $dev1 - check_pv_field_ $dev1 pv_mda_count $i + check pv_field $dev1 pv_mda_count $i vgreduce $vg $dev1 pvremove -f $dev1 done @@ -63,7 +63,7 @@ # metadatasize, dataalignment, dataalignmentoffset #COMM 'pvcreate sets data offset next to mda area' vgextend --metadatasize 100k --dataalignment 100k $vg $dev1 -check_pv_field_ $dev1 pe_start 200.00k +check pv_field $dev1 pe_start 200.00k vgreduce $vg $dev1 pvremove -f $dev1 @@ -71,7 +71,7 @@ # data area start is shifted by the specified alignment_offset pv_align="1052160B" # 1048576 + (7*512) vgextend --metadatasize 128k --dataalignmentoffset 7s $vg $dev1 -check_pv_field_ $dev1 pe_start $pv_align "--units b" +check pv_field $dev1 pe_start $pv_align "--units b" vgremove -f $vg pvremove -f $dev1 @@ -94,9 +94,9 @@ pvcreate $dev1 vgcreate $vg1 $dev2 vgextend $vg1 $dev1 $dev3 -check_pv_field_ $dev1 vg_name $vg1 -check_pv_field_ $dev2 vg_name $vg1 -check_pv_field_ $dev3 vg_name $vg1 +check pv_field $dev1 vg_name $vg1 +check pv_field $dev2 vg_name $vg1 +check pv_field $dev3 vg_name $vg1 vgremove -f $vg1 pvremove -f $dev1 $dev2 $dev3 @@ -106,23 +106,23 @@ echo vgextend --metadataignore has proper mda_count and mda_used_count vgcreate $vg $dev3 vgextend --metadataignore $ignore --pvmetadatacopies $mdacp $vg $dev1 $dev2 - check_pv_field_ $dev1 pv_mda_count $mdacp - check_pv_field_ $dev2 pv_mda_count $mdacp + check pv_field $dev1 pv_mda_count $mdacp + check pv_field $dev2 pv_mda_count $mdacp if [ $ignore = y ]; then - check_pv_field_ $dev1 pv_mda_used_count 0 - check_pv_field_ $dev2 pv_mda_used_count 0 + check pv_field $dev1 pv_mda_used_count 0 + check pv_field $dev2 pv_mda_used_count 0 else - check_pv_field_ $dev1 pv_mda_used_count $mdacp - check_pv_field_ $dev2 pv_mda_used_count $mdacp + check pv_field $dev1 pv_mda_used_count $mdacp + check pv_field $dev2 pv_mda_used_count $mdacp fi echo vg has proper vg_mda_count and vg_mda_used_count - check_vg_field_ $vg vg_mda_count $(($mdacp * 2 + 1)) + check vg_field $vg vg_mda_count $(($mdacp * 2 + 1)) if [ $ignore = y ]; then - check_vg_field_ $vg vg_mda_used_count 1 + check vg_field $vg vg_mda_used_count 1 else - check_vg_field_ $vg vg_mda_used_count $(($mdacp * 2 + 1)) + check vg_field $vg vg_mda_used_count $(($mdacp * 2 + 1)) fi - check_vg_field_ $vg vg_mda_copies unmanaged + check vg_field $vg vg_mda_copies unmanaged vgremove $vg pvremove -ff $dev1 $dev2 $dev3 done --- LVM2/test/t-vgmerge-operation.sh 2009/12/28 18:33:04 1.6 +++ LVM2/test/t-vgmerge-operation.sh 2011/01/05 00:16:20 1.7 @@ -11,7 +11,7 @@ test_description='Test vgmerge operation' -. ./test-utils.sh +. lib/test aux prepare_pvs 4 64 @@ -20,10 +20,10 @@ vgcreate -c n $vg2 $dev3 $dev4 lvcreate -l 4 -n $lv1 $vg1 $dev1 vgchange -an $vg1 -vg_validate_pvlv_counts_ $vg1 2 1 0 -vg_validate_pvlv_counts_ $vg2 2 0 0 +check pvlv_counts $vg1 2 1 0 +check pvlv_counts $vg2 2 0 0 vgmerge $vg2 $vg1 -vg_validate_pvlv_counts_ $vg2 4 1 0 +check pvlv_counts $vg2 4 1 0 vgremove -f $vg2 # 'vgmerge succeeds with single linear LV in source and destination VG' @@ -33,10 +33,10 @@ lvcreate -l 4 -n $lv2 $vg2 vgchange -an $vg1 vgchange -an $vg2 -vg_validate_pvlv_counts_ $vg1 2 1 0 -vg_validate_pvlv_counts_ $vg2 2 1 0 +check pvlv_counts $vg1 2 1 0 +check pvlv_counts $vg2 2 1 0 vgmerge $vg2 $vg1 -vg_validate_pvlv_counts_ $vg2 4 2 0 +check pvlv_counts $vg2 4 2 0 vgremove -f $vg2 # 'vgmerge succeeds with linear LV + snapshots in source VG' @@ -45,10 +45,10 @@ lvcreate -l 16 -n $lv1 $vg1 lvcreate -l 4 -s -n $lv2 $vg1/$lv1 vgchange -an $vg1 -vg_validate_pvlv_counts_ $vg1 2 2 1 -vg_validate_pvlv_counts_ $vg2 2 0 0 +check pvlv_counts $vg1 2 2 1 +check pvlv_counts $vg2 2 0 0 vgmerge $vg2 $vg1 -vg_validate_pvlv_counts_ $vg2 4 2 1 +check pvlv_counts $vg2 4 2 1 lvremove -f $vg2/$lv2 vgremove -f $vg2 @@ -57,10 +57,10 @@ vgcreate -c n $vg2 $dev4 lvcreate -l 4 -n $lv1 -m1 $vg1 vgchange -an $vg1 -vg_validate_pvlv_counts_ $vg1 3 1 0 -vg_validate_pvlv_counts_ $vg2 1 0 0 +check pvlv_counts $vg1 3 1 0 +check pvlv_counts $vg2 1 0 0 vgmerge $vg2 $vg1 -vg_validate_pvlv_counts_ $vg2 4 1 0 +check pvlv_counts $vg2 4 1 0 lvremove -f $vg2/$lv1 vgremove -f $vg2 @@ -70,12 +70,12 @@ lvcreate -l 4 -n $lv1 $vg1 lvcreate -l 4 -n $lv1 $vg2 vgchange -an $vg1 -aux vg_validate_pvlv_counts_ $vg1 2 1 0 -aux vg_validate_pvlv_counts_ $vg2 2 1 0 +check pvlv_counts $vg1 2 1 0 +check pvlv_counts $vg2 2 1 0 not vgmerge $vg2 $vg1 2>err grep "Duplicate logical volume name \"$lv1\" in \"$vg2\" and \"$vg1" err -aux vg_validate_pvlv_counts_ $vg1 2 1 0 -aux vg_validate_pvlv_counts_ $vg2 2 1 0 +check pvlv_counts $vg1 2 1 0 +check pvlv_counts $vg2 2 1 0 vgremove -f $vg1 vgremove -f $vg2 --- LVM2/test/t-vgmerge-usage.sh 2009/12/28 18:33:04 1.7 +++ LVM2/test/t-vgmerge-usage.sh 2011/01/05 00:16:20 1.8 @@ -11,7 +11,7 @@ # 'Test vgmerge command options for validity' -. ./test-utils.sh +. lib/test aux prepare_pvs 4 --- LVM2/test/t-vgreduce-usage.sh 2009/12/28 18:33:04 1.6 +++ LVM2/test/t-vgreduce-usage.sh 2011/01/05 00:16:20 1.7 @@ -9,7 +9,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -. ./test-utils.sh +. lib/test aux prepare_devs 4 @@ -21,7 +21,7 @@ # (lvm$mdatype) vgreduce removes only the specified pv from vg (bz427382)" ' vgcreate -c n -M$mdatype $vg1 $dev1 $dev2 vgreduce $vg1 $dev1 - check_pv_field_ $dev2 vg_name $vg1 + check pv_field $dev2 vg_name $vg1 vgremove -f $vg1 # (lvm$mdatype) vgreduce rejects removing the last pv (--all) @@ -58,15 +58,15 @@ aux disable_dev $dev1 # (lvm$mdatype) vgreduce --removemissing --force repares to linear vgreduce --removemissing --force $vg1 -check_lv_field_ $vg1/$lv1 segtype linear -vg_validate_pvlv_counts_ $vg1 2 3 0 +check lv_field $vg1/$lv1 segtype linear +check pvlv_counts $vg1 2 3 0 # cleanup aux enable_dev $dev1 vgremove -ff $vg1 #COMM "vgreduce rejects --removemissing --mirrorsonly --force when nonmirror lv lost too" # (lvm$mdatype) setup: create mirror + linear lvs -vgcreate -c n -M$mdatype $vg1 $devs +vgcreate -c n -M$mdatype $vg1 $(cat DEVICES) lvcreate -n $lv2 -l 4 $vg1 lvcreate -m1 -n $lv1 -l 4 $vg1 $dev1 $dev2 $dev3 lvcreate -n $lv3 -l 4 $vg1 $dev3 --- LVM2/test/t-vgrename-usage.sh 2009/09/02 18:31:11 1.5 +++ LVM2/test/t-vgrename-usage.sh 2011/01/05 00:16:20 1.6 @@ -8,7 +8,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -. ./test-utils.sh +. lib/test aux prepare_devs 4 pvcreate $dev1 $dev2 @@ -19,17 +19,17 @@ # ensure name ordering does not matter vgcreate $vg1 $dev1 $dev2 vgrename $vg1 $vg2 -check_vg_field_ $vg2 vg_name $vg2 +check vg_field $vg2 vg_name $vg2 vgrename $vg2 $vg1 -check_vg_field_ $vg1 vg_name $vg1 +check vg_field $vg1 vg_name $vg1 vgremove $vg1 # vgrename by uuid (bz231187) vgcreate $vg1 $dev1 $dev3 UUID=$(vgs --noheading -o vg_uuid $vg1) -check_vg_field_ $vg1 vg_uuid $UUID +check vg_field $vg1 vg_uuid $UUID vgrename $UUID $vg2 -check_vg_field_ $vg2 vg_name $vg2 +check vg_field $vg2 vg_name $vg2 vgremove $vg2 # vgrename fails - new vg already exists --- LVM2/test/t-vgsplit-operation.sh 2010/08/12 04:11:50 1.26 +++ LVM2/test/t-vgsplit-operation.sh 2011/01/05 00:16:20 1.27 @@ -11,13 +11,13 @@ # Test vgsplit operation, including different LV types -. ./test-utils.sh +. lib/test COMM() { LAST_TEST="$@" } -prepare_pvs 5 258 +aux prepare_pvs 5 258 # FIXME: paramaterize lvm1 vs lvm2 metadata; most of these tests should run # fine with lvm1 metadata as well; for now, just add disks 5 and 6 as lvm1 # metadata @@ -44,11 +44,11 @@ else vgsplit -n $lv1 $vg1 $vg2 fi - vg_validate_pvlv_counts_ $vg1 1 0 0 + check pvlv_counts $vg1 1 0 0 if [ $i = existing ]; then - aux vg_validate_pvlv_counts_ $vg2 3 1 0 + check pvlv_counts $vg2 3 1 0 else - aux vg_validate_pvlv_counts_ $vg2 1 1 0 + check pvlv_counts $vg2 1 1 0 fi lvremove -f $vg2/$lv1 vgremove -f $vg2 @@ -67,9 +67,9 @@ vgsplit -n $lv1 $vg1 $vg2 fi if [ $i = existing ]; then - aux vg_validate_pvlv_counts_ $vg2 4 1 0 + check pvlv_counts $vg2 4 1 0 else - aux vg_validate_pvlv_counts_ $vg2 2 1 0 + check pvlv_counts $vg2 2 1 0 fi lvremove -f $vg2/$lv1 vgremove -f $vg2 @@ -87,9 +87,9 @@ vgsplit -n $lv1 $vg1 $vg2 fi if [ $i = existing ]; then - aux vg_validate_pvlv_counts_ $vg2 4 1 0 + check pvlv_counts $vg2 4 1 0 else - aux vg_validate_pvlv_counts_ $vg2 3 1 0 + check pvlv_counts $vg2 3 1 0 fi lvremove -f $vg2/$lv1 vgremove -f $vg2 @@ -108,9 +108,9 @@ vgsplit -n $lv1 $vg1 $vg2 fi if [ $i = existing ]; then - aux vg_validate_pvlv_counts_ $vg2 4 2 1 + check pvlv_counts $vg2 4 2 1 else - aux vg_validate_pvlv_counts_ $vg2 2 2 1 + check pvlv_counts $vg2 2 2 1 fi lvremove -f $vg2/$lv2 lvremove -f $vg2/$lv1 @@ -132,11 +132,11 @@ vgsplit -n $lv3 $vg1 $vg2 fi if [ $i = existing ]; then - aux vg_validate_pvlv_counts_ $vg2 2 1 0 - aux vg_validate_pvlv_counts_ $vg1 2 2 1 + check pvlv_counts $vg2 2 1 0 + check pvlv_counts $vg1 2 2 1 else - aux vg_validate_pvlv_counts_ $vg2 1 1 0 - aux vg_validate_pvlv_counts_ $vg1 2 2 1 + check pvlv_counts $vg2 1 1 0 + check pvlv_counts $vg1 2 2 1 fi lvremove -f $vg1/$lv2 lvremove -f $vg1/$lv1 @@ -162,14 +162,14 @@ vgsplit -n $lv2 $vg1 $vg2 fi if [ $i = existing ]; then - aux vg_validate_pvlv_counts_ $vg1 3 1 0 - aux vg_validate_pvlv_counts_ $vg2 2 1 0 + check pvlv_counts $vg1 3 1 0 + check pvlv_counts $vg2 2 1 0 else vgs lvs pvs - aux vg_validate_pvlv_counts_ $vg1 3 1 0 - aux vg_validate_pvlv_counts_ $vg2 1 1 0 + check pvlv_counts $vg1 3 1 0 + check pvlv_counts $vg2 1 1 0 fi lvremove -f $vg1/$lv1 lvremove -f $vg2/$lv2 @@ -197,7 +197,7 @@ lvcreate -l 16 -n $lv1 $vg1 $dev1 $dev2 lvcreate -l 4 -n $lv2 -s $vg1/$lv1 $dev3 lvcreate -l 4 -n $lv3 -s $vg1/$lv1 $dev4 -vg_validate_pvlv_counts_ $vg1 4 3 2 +check pvlv_counts $vg1 4 3 2 vgchange -an $vg1 not vgsplit -n $lv1 $vg1 $vg2; lvremove -f $vg1/$lv2 @@ -210,7 +210,7 @@ lvcreate -l 16 -n $lv1 $vg1 $dev1 $dev2 lvcreate -l 4 -n $lv2 -s $vg1/$lv1 $dev3 lvcreate -l 4 -n $lv3 -s $vg1/$lv1 $dev4 -vg_validate_pvlv_counts_ $vg1 4 3 2 +check pvlv_counts $vg1 4 3 2 vgchange -an $vg1 not vgsplit -n $lv2 $vg1 $vg2 lvremove -f $vg1/$lv2 @@ -221,7 +221,7 @@ COMM "vgsplit fails splitting one mirror LV, only one PV specified" vgcreate -c n $vg1 $dev1 $dev2 $dev3 $dev4 lvcreate -l 16 -n $lv1 -m1 $vg1 $dev1 $dev2 $dev3 -vg_validate_pvlv_counts_ $vg1 4 1 0 +check pvlv_counts $vg1 4 1 0 vgchange -an $vg1 not vgsplit $vg1 $vg2 $dev2 vgremove -ff $vg1 @@ -230,7 +230,7 @@ vgcreate -c n $vg1 $dev1 $dev2 $dev3 $dev4 lvcreate -l 16 -n $lv1 -m1 $vg1 $dev1 $dev2 $dev3 lvcreate -l 16 -n $lv2 -i 2 $vg1 $dev3 $dev4 -vg_validate_pvlv_counts_ $vg1 4 2 0 +check pvlv_counts $vg1 4 2 0 vgchange -an $vg1 not vgsplit -n $lv2 $vg1 $vg2 2>err vgremove -ff $vg1 @@ -243,9 +243,9 @@ lvcreate -l 16 -n $lv1 -m1 $vg1 $dev1 $dev2 $dev3 lvcreate -l 16 -n $lv2 $vg1 $dev4 lvchange -an $vg1/$lv2 -vg_validate_pvlv_counts_ $vg1 4 2 0 +check pvlv_counts $vg1 4 2 0 not vgsplit -n $lv1 $vg1 $vg2; -vg_validate_pvlv_counts_ $vg1 4 2 0 +check pvlv_counts $vg1 4 2 0 vgremove -ff $vg1 COMM "vgsplit succeeds, active mirror not involved in split" @@ -253,10 +253,10 @@ lvcreate -l 16 -n $lv1 -m1 $vg1 $dev1 $dev2 $dev3 lvcreate -l 16 -n $lv2 $vg1 $dev4 lvchange -an $vg1/$lv2 -vg_validate_pvlv_counts_ $vg1 4 2 0 +check pvlv_counts $vg1 4 2 0 vgsplit -n $lv2 $vg1 $vg2 -vg_validate_pvlv_counts_ $vg1 3 1 0 -vg_validate_pvlv_counts_ $vg2 1 1 0 +check pvlv_counts $vg1 3 1 0 +check pvlv_counts $vg2 1 1 0 vgremove -ff $vg1 vgremove -ff $vg2 @@ -266,9 +266,9 @@ lvcreate -l 4 -i 2 -s -n $lv2 $vg1/$lv1 lvcreate -l 64 -i 2 -n $lv3 $vg1 $dev3 $dev4 lvchange -an $vg1/$lv3 -vg_validate_pvlv_counts_ $vg1 4 3 1 +check pvlv_counts $vg1 4 3 1 not vgsplit -n $lv2 $vg1 $vg2; -vg_validate_pvlv_counts_ $vg1 4 3 1 +check pvlv_counts $vg1 4 3 1 lvremove -f $vg1/$lv2 vgremove -ff $vg1 @@ -279,10 +279,10 @@ vgextend $vg1 $dev4 lvcreate -l 64 -n $lv3 $vg1 $dev4 lvchange -an $vg1/$lv3 -vg_validate_pvlv_counts_ $vg1 4 3 1 +check pvlv_counts $vg1 4 3 1 vgsplit -n $lv3 $vg1 $vg2 -vg_validate_pvlv_counts_ $vg1 3 2 1 -vg_validate_pvlv_counts_ $vg2 1 1 0 +check pvlv_counts $vg1 3 2 1 +check pvlv_counts $vg2 1 1 0 vgchange -an $vg1 lvremove -f $vg1/$lv2 vgremove -ff $vg1 --- LVM2/test/t-vgsplit-stacked.sh 2010/07/28 12:20:41 1.4 +++ LVM2/test/t-vgsplit-stacked.sh 2011/01/05 00:16:20 1.5 @@ -8,12 +8,13 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -. ./test-utils.sh +. lib/test -prepare_lvmconf '[ "a/dev\/mirror/", "a/dev\/mapper\/.*$/", "a/dev\/LVMTEST/", "r/.*/" ]' +aux lvmconf 'devices/filter = [ "a/dev\/mirror/", "a/dev\/mapper\/.*$/", "a/dev\/LVMTEST/", "r/.*/" ]' +cat $TESTDIR/etc/lvm.conf aux prepare_devs 3 -pvcreate $devs +pvcreate $(cat DEVICES) vgcreate $vg1 $dev1 $dev2 lvcreate -n $lv1 -l 100%FREE $vg1 --- LVM2/test/t-vgsplit-usage.sh 2009/09/02 19:38:53 1.14 +++ LVM2/test/t-vgsplit-usage.sh 2011/01/05 00:16:20 1.15 @@ -11,29 +11,29 @@ # Test vgsplit command options for validity -. ./test-utils.sh +. lib/test aux prepare_devs 5 for mdatype in 1 2 do -pvcreate -M$mdatype $devs +pvcreate -M$mdatype $(cat DEVICES) # ensure name order does not matter # NOTE: if we're using lvm1, we must use -M on vgsplit -vgcreate -M$mdatype $vg1 $devs +vgcreate -M$mdatype $vg1 $(cat DEVICES) vgsplit -M$mdatype $vg1 $vg2 $dev1 vgremove $vg1 vgremove $vg2 -vgcreate -M$mdatype $vg2 $devs +vgcreate -M$mdatype $vg2 $(cat DEVICES) vgsplit -M$mdatype $vg2 $vg1 $dev1 vgremove $vg1 vgremove $vg2 # vgsplit accepts new vg as destination of split # lvm1 -- bz244792 -vgcreate -M$mdatype $vg1 $devs +vgcreate -M$mdatype $vg1 $(cat DEVICES) vgsplit $vg1 $vg2 $dev1 1>err grep "New volume group \"$vg2\" successfully split from \"$vg1\"" err vgremove $vg1 @@ -50,14 +50,14 @@ # vgsplit accepts --maxphysicalvolumes 128 on new VG vgcreate -M$mdatype $vg1 $dev1 $dev2 vgsplit --maxphysicalvolumes 128 $vg1 $vg2 $dev1 -check_vg_field_ $vg2 max_pv 128 +check vg_field $vg2 max_pv 128 vgremove $vg1 vgremove $vg2 # vgsplit accepts --maxlogicalvolumes 128 on new VG vgcreate -M$mdatype $vg1 $dev1 $dev2 vgsplit --maxlogicalvolumes 128 $vg1 $vg2 $dev1 -check_vg_field_ $vg2 max_lv 128 +check vg_field $vg2 max_lv 128 vgremove $vg1 vgremove $vg2 @@ -129,7 +129,7 @@ lvcreate -l 4 -n $lv1 $vg1 vgchange -an $vg1 vgsplit $vg1 $vg2 $dev1 -compare_vg_field_ $vg1 $vg2 max_lv +check compare_vg_field $vg1 $vg2 max_lv vgremove -f $vg2 vgremove -f $vg1 @@ -138,7 +138,7 @@ lvcreate -l 4 -n $lv1 $vg1 vgchange -an $vg1 vgsplit $vg1 $vg2 $dev1 -compare_vg_field_ $vg1 $vg2 max_pv +check compare_vg_field $vg1 $vg2 max_pv vgremove -f $vg2 vgremove -f $vg1 @@ -147,7 +147,7 @@ lvcreate -l 4 -n $lv1 $vg1 vgchange -an $vg1 vgsplit $vg1 $vg2 $dev1 -compare_vg_field_ $vg1 $vg2 vg_fmt +check compare_vg_field $vg1 $vg2 vg_fmt vgremove -f $vg2 vgremove -f $vg1 @@ -170,9 +170,9 @@ vgcreate $vg1 $dev5 $dev2 lvcreate -l 10 -n $lv1 $vg1 lvchange -an $vg1/$lv1 -vg_validate_pvlv_counts_ $vg1 2 1 0 +check pvlv_counts $vg1 2 1 0 not vgsplit $vg1 $vg2 $dev5; -vg_validate_pvlv_counts_ $vg1 2 1 0 +check pvlv_counts $vg1 2 1 0 vgremove -ff $vg1 # vgsplit rejects split because metadata types differ --- LVM2/test/api/percent.sh 2010/12/21 01:14:34 1.2 +++ LVM2/test/api/percent.sh 2011/01/05 00:16:21 1.3 @@ -11,13 +11,14 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -. ./test-utils.sh +. lib/test + aux prepare_devs 2 -vgcreate -c n -s 4k $vg $devs +vgcreate -c n -s 4k $vg $(cat DEVICES) lvcreate -n foo $vg -l 5 lvcreate -s -n snap $vg/foo -l 2 -c 4k lvcreate -s -n snap2 $vg/foo -l 6 -c 4k dd if=/dev/urandom of=$DM_DEV_DIR/$vg/snap2 count=1 bs=1024 lvcreate -m 1 -n mirr $vg -l 1 --mirrorlog core lvs -apitest percent $vg +aux apitest percent $vg --- LVM2/test/api/vgtest.sh 2010/12/12 20:36:38 1.1 +++ LVM2/test/api/vgtest.sh 2011/01/05 00:16:21 1.2 @@ -12,7 +12,7 @@ # tests lvm2app library # -. ./test-utils.sh +. lib/test aux prepare_devs 2 pvcreate $dev1 $dev2 -apitest vgtest $vg1 $dev1 $dev2 +aux apitest vgtest $vg1 $dev1 $dev2 /cvs/lvm2/LVM2/test/lib/aux.sh,v --> standard output revision 1.1 --- LVM2/test/lib/aux.sh +++ - 2011-01-05 00:16:39.654010000 +0000 @@ -0,0 +1,367 @@ +# Copyright (C) 2011 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing to use, +# modify, copy, or redistribute it subject to the terms and conditions +# of the GNU General Public License v.2. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +. lib/utils + +prepare_clvmd() { + if test -z "$LVM_TEST_LOCKING" || test "$LVM_TEST_LOCKING" -ne 3 ; then + return 0 # not needed + fi + + if pgrep clvmd ; then + echo "Cannot use fake cluster locking with real clvmd ($(pgrep clvmd)) running." + touch SKIP_THIS_TEST + exit 1 + fi + + # skip if we don't have our own clvmd... + (which clvmd | grep $abs_builddir) || exit 200 + + # skip if we singlenode is not compiled in + (clvmd --help 2>&1 | grep "Available cluster managers" | grep singlenode) || exit 200 + + clvmd -Isinglenode -d 1 & + LOCAL_CLVMD="$!" + + # check that it is really running now + sleep .1 + ps $LOCAL_CLVMD || exit 200 +} + +prepare_dmeventd() { + if pgrep dmeventd ; then + echo "Cannot test dmeventd with real dmeventd ($(pgrep dmeventd)) running." + touch SKIP_THIS_TEST + exit 1 + fi + + # skip if we don't have our own dmeventd... + (which dmeventd | grep $abs_builddir) || exit 200 + + dmeventd -f & + echo "$!" > LOCAL_DMEVENTD +} + +teardown_devs() { + test -n "$PREFIX" && { + rm -rf $TESTDIR/dev/$PREFIX* + + init_udev_transaction + while dmsetup table | grep -q ^$PREFIX; do + for s in `dmsetup info -c -o name --noheading | grep ^$PREFIX`; do + umount -fl $DM_DEV_DIR/mapper/$s >& /dev/null || true + dmsetup remove $s >& /dev/null || true + done + done + finish_udev_transaction + + } + + # NOTE: SCSI_DEBUG_DEV test must come before the LOOP test because + # prepare_scsi_debug_dev() also sets LOOP to short-circuit prepare_loop() + if test -f SCSI_DEBUG_DEV; then + modprobe -r scsi_debug + else + test -f LOOP && losetup -d $(cat LOOP) + test -f LOOPFILE && rm -f $(cat LOOPFILE) + fi + rm -f DEVICES # devs is set in prepare_devs() + rm -f LOOP +} + +teardown() { + echo -n "## teardown..." + + test -n "$LOCAL_CLVMD" && { + kill "$LOCAL_CLVMD" + sleep .1 + kill -9 "$LOCAL_CLVMD" || true + } + + echo -n . + + test -f LOCAL_DMEVENTD && kill -9 "$(cat LOCAL_DMEVENTD)" + + echo -n . + + teardown_devs + + echo -n . + + test -n "$TESTDIR" && { + cd $OLDPWD + rm -rf $TESTDIR || echo BLA + } + + echo "ok" +} + +make_ioerror() { + echo 0 10000000 error | dmsetup create ioerror + ln -s $DM_DEV_DIR/mapper/ioerror $DM_DEV_DIR/ioerror +} + +prepare_loop() { + size=$1 + test -n "$size" || size=32 + + echo -n "## preparing loop device..." + + # skip if prepare_scsi_debug_dev() was used + if [ -f "SCSI_DEBUG_DEV" -a -f "LOOP" ]; then + echo "(skipped)" + return 0 + fi + + test ! -e LOOP + test -n "$DM_DEV_DIR" + + for i in 0 1 2 3 4 5 6 7; do + test -e $DM_DEV_DIR/loop$i || mknod $DM_DEV_DIR/loop$i b 7 $i + done + + echo -n . + + LOOPFILE="$PWD/test.img" + dd if=/dev/zero of="$LOOPFILE" bs=$((1024*1024)) count=0 seek=$(($size-1)) 2> /dev/null + if LOOP=`losetup -s -f "$LOOPFILE" 2>/dev/null`; then + : + elif LOOP=`losetup -f` && losetup $LOOP "$LOOPFILE"; then + # no -s support + : + else + # no -f support + # Iterate through $DM_DEV_DIR/loop{,/}{0,1,2,3,4,5,6,7} + for slash in '' /; do + for i in 0 1 2 3 4 5 6 7; do + local dev=$DM_DEV_DIR/loop$slash$i + ! losetup $dev >/dev/null 2>&1 || continue + # got a free + losetup "$dev" "$LOOPFILE" + LOOP=$dev + break + done + if [ -n "$LOOP" ]; then + break + fi + done + fi + test -n "$LOOP" # confirm or fail + echo "$LOOP" > LOOP + echo "ok ($LOOP)" +} + +# A drop-in replacement for prepare_loop() that uses scsi_debug to create +# a ramdisk-based SCSI device upon which all LVM devices will be created +# - scripts must take care not to use a DEV_SIZE that will enduce OOM-killer +prepare_scsi_debug_dev() +{ + local DEV_SIZE="$1" + shift + local SCSI_DEBUG_PARAMS="$@" + + test -f "SCSI_DEBUG_DEV" && return 0 + test -z "$LOOP" + test -n "$DM_DEV_DIR" + + # Skip test if awk isn't available (required for get_sd_devs_) + which awk || exit 200 + + # Skip test if scsi_debug module is unavailable or is already in use + modprobe --dry-run scsi_debug || exit 200 + lsmod | grep -q scsi_debug && exit 200 + + # Create the scsi_debug device and determine the new scsi device's name + # NOTE: it will _never_ make sense to pass num_tgts param; + # last param wins.. so num_tgts=1 is imposed + modprobe scsi_debug dev_size_mb=$DEV_SIZE $SCSI_DEBUG_PARAMS num_tgts=1 || exit 200 + sleep 2 # allow for async Linux SCSI device registration + + local DEBUG_DEV=/dev/$(grep -H scsi_debug /sys/block/*/device/model | cut -f4 -d /) + [ -b $DEBUG_DEV ] || exit 1 # should not happen + + # Create symlink to scsi_debug device in $DM_DEV_DIR + SCSI_DEBUG_DEV="$DM_DEV_DIR/$(basename $DEBUG_DEV)" + echo "$SCSI_DEBUG_DEV" > SCSI_DEBUG_DEV + echo "$SCSI_DEBUG_DEV" > LOOP + # Setting $LOOP provides means for prepare_devs() override + ln -snf $DEBUG_DEV $SCSI_DEBUG_DEV + return 0 +} + +cleanup_scsi_debug_dev() +{ + aux teardown_devs + rm -f SCSI_DEBUG_DEV + rm -f LOOP +} + +prepare_devs() { + local n="$1" + test -z "$n" && n=3 + local devsize="$2" + test -z "$devsize" && devsize=34 + local pvname="$3" + test -z "$pvname" && pvname="pv" + + prepare_loop $(($n*$devsize)) + echo -n "## preparing $n devices..." + + if ! loopsz=`blockdev --getsz $LOOP 2>/dev/null`; then + loopsz=`blockdev --getsize $LOOP 2>/dev/null` + fi + + local size=$(($loopsz/$n)) + + init_udev_transaction + for i in `seq 1 $n`; do + local name="${PREFIX}$pvname$i" + local dev="$DM_DEV_DIR/mapper/$name" + devs="$devs $dev" + echo 0 $size linear $LOOP $((($i-1)*$size)) > $name.table + dmsetup create $name $name.table + done + finish_udev_transaction + + #for i in `seq 1 $n`; do + # local name="${PREFIX}$pvname$i" + # dmsetup info -c $name + #done + #for i in `seq 1 $n`; do + # local name="${PREFIX}$pvname$i" + # dmsetup table $name + #done + + echo $devs > DEVICES + echo "ok" +} + +disable_dev() { + + init_udev_transaction + for dev in "$@"; do + # first we make the device inaccessible + echo 0 10000000 error | dmsetup load $dev + dmsetup resume $dev + # now let's try to get rid of it if it's unused + #dmsetup remove $dev + done + finish_udev_transaction + +} + +enable_dev() { + + init_udev_transaction + for dev in "$@"; do + local name=`echo "$dev" | sed -e 's,.*/,,'` + dmsetup create $name $name.table || dmsetup load $name $name.table + dmsetup resume $dev + done + finish_udev_transaction +} + +backup_dev() { + for dev in "$@"; do + dd if=$dev of=$dev.backup bs=1024 + done +} + +restore_dev() { + for dev in "$@"; do + test -e $dev.backup || { + echo "Internal error: $dev not backed up, can't restore!" + exit 1 + } + dd of=$dev if=$dev.backup bs=1024 + done +} + +prepare_pvs() { + prepare_devs "$@" + pvcreate -ff $devs +} + +prepare_vg() { + vgremove -ff $vg >& /dev/null || true + teardown_devs + + prepare_pvs "$@" + vgcreate -c n $vg $devs + #pvs -v +} + +lvmconf() { + if test -z "$LVM_TEST_LOCKING"; then LVM_TEST_LOCKING=1; fi + test -f CONFIG_VALUES || { + cat > CONFIG_VALUES <<-EOF +devices/dir = "$DM_DEV_DIR" +devices/scan = "$DM_DEV_DIR" +devices/filter = [ "a/dev\/mirror/", "a/dev\/mapper\/.*pv[0-9_]*$/", "r/.*/" ] +devices/cache_dir = "$TESTDIR/etc" +devices/sysfs_scan = 0 +devices/default_data_alignment = 1 +log/syslog = 0 +log/indent = 1 +log/level = 9 +log/file = "$TESTDIR/debug.log" +log/overwrite = 1 +log/activation = 1 +backup/backup = 0 +backup/archive = 0 +global/abort_on_internal_errors = 1 +global/library_dir = "$TESTDIR/lib" +global/locking_dir = "$TESTDIR/var/lock/lvm" +global/locking_type=$LVM_TEST_LOCKING +global/si_unit_consistency = 1 +global/fallback_to_local_locking = 0 +activation/udev_sync = 1 +activation/udev_rules = 1 +activation/polling_interval = 0 +activation/snapshot_autoextend_percent = 50 +activation/snapshot_autoextend_threshold = 50 +EOF + } + + for v in "$@"; do + echo "$v" >> CONFIG_VALUES + done + + rm -f CONFIG + for s in `cat CONFIG_VALUES | cut -f1 -d/ | sort | uniq`; do + echo "$s {" >> CONFIG + for k in `grep ^$s/ CONFIG_VALUES | cut -f1 -d= | sed -e 's, *$,,' | sort | uniq`; do + grep "^$k" CONFIG_VALUES | tail -n 1 | sed -e "s,^$s/, ," >> CONFIG + done + echo "}" >> CONFIG + echo >> CONFIG + done + mv -f CONFIG $TESTDIR/etc/lvm.conf +} + +apitest() { + t=$1 + shift + test -x $abs_top_builddir/test/api/$t.t || { + touch SKIP_THIS_TEST + exit 200 + } + $abs_top_builddir/test/api/$t.t "$@" +} + +api() { + test -x $abs_top_builddir/test/api/wrapper || exit 200 + $abs_top_builddir/test/api/wrapper "$@" +} + +test -f DEVICES && devs=$(cat DEVICES) +test -f LOOP && LOOP=$(cat LOOP) + +"$@" /cvs/lvm2/LVM2/test/lib/check.sh,v --> standard output revision 1.1 --- LVM2/test/lib/check.sh +++ - 2011-01-05 00:16:39.767535000 +0000 @@ -0,0 +1,281 @@ +#!/bin/bash + +# Copyright (C) 2010 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing to use, +# modify, copy, or redistribute it subject to the terms and conditions +# of the GNU General Public License v.2. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +# check.sh: assert various things about volumes + +# USAGE +# check linear VG LV +# check lv_on VG LV PV + +# check mirror VG LV [LOGDEV|core] +# check mirror_nonredundant VG LV +# check mirror_legs VG LV N +# check mirror_images_on VG LV DEV [DEV...] + +# ... + +set -e -o pipefail + +trim() +{ + trimmed=${1%% } + trimmed=${trimmed## } + + echo "$trimmed" +} + +lvl() { + lvs -a --noheadings "$@" +} + +lvdevices() { + lvl -odevices "$@" | sed 's/([^)]*)//g; s/,/ /g' +} + +mirror_images_redundant() +{ + vg=$1 + lv=$vg/$2 + + lvs -a $vg -o+devices + for i in `lvdevices $lv`; do + echo "# $i:" + lvdevices $vg/$i | sort | uniq + done > check.tmp.all + + (grep -v ^# check.tmp.all || true) | sort | uniq -d > check.tmp + + test "`cat check.tmp | wc -l`" -eq 0 || { + echo "mirror images of $lv expected redundant, but are not:" + cat check.tmp.all + exit 1 + } +} + +mirror_images_on() { + vg=$1 + lv=$2 + + shift 2 + + for i in `lvdevices $lv`; do + lv_on $vg $lv $1 + shift + done +} + +lv_on() +{ + lv="$1/$2" + lvdevices $lv | grep -F "$3" || { + echo "LV $lv expected on $3 but is not:" >&2 + lvdevices $lv >&2 + exit 1 + } + test `lvdevices $lv | grep -vF "$3" | wc -l` -eq 0 || { + echo "LV $lv contains unexpected devices:" >&2 + lvdevices $lv >&2 + exit 1 + } +} + +mirror_log_on() +{ + vg="$1" + lv="$2" + where="$3" + if test "$where" = "core"; then + lvl -omirror_log "$vg/$lv" | not grep mlog + else + lv_on $vg "${lv}_mlog" "$where" + fi +} + +lv_is_contiguous() +{ + test `lvl --segments $1 | wc -l` -eq 1 || { + echo "LV $1 expected to be contiguous, but is not:" + lvl --segments $1 + exit 1 + } +} + +lv_is_clung() +{ + test `lvdevices $1 | sort | uniq | wc -l` -eq 1 || { + echo "LV $1 expected to be clung, but is not:" + lvdevices $! | sort | uniq + exit 1 + } +} + +mirror_images_contiguous() +{ + for i in `lvdevices $1/$2`; do + lv_is_contiguous $1/$i + done +} + +mirror_images_clung() +{ + for i in `lvdevices $1/$2`; do + lv_is_clung $1/$i + done +} + +mirror() { + mirror_nonredundant "$@" + mirror_images_redundant "$1" "$2" +} + +mirror_nonredundant() { + lv="$1/$2" + lvs -oattr "$lv" | grep -q "^ *m.....$" || { + echo "$lv expected a mirror, but is not:" + lvs -a $lv + exit 1 + } + if test -n "$3"; then mirror_log_on "$1" "$2" "$3"; fi +} + +mirror_legs() { + lv="$1/$2" + expect="$3" + lvdevices "$lv" + real=`lvdevices "$lv" | wc -w` + test "$expect" = "$real" +} + +mirror_no_temporaries() +{ + vg=$1 + lv=$2 + lvl -oname $vg | grep $lv | not grep "tmp" || { + echo "$lv has temporary mirror images unexpectedly:" + lvl $vg | grep $lv + exit 1 + } +} + +linear() { + lv="$1/$2" + lvl -ostripes "$lv" | grep -q "1" || { + echo "$lv expected linear, but is not:" + lvl "$lv" -o+devices + exit 1 + } +} + +active() { + lv="$1/$2" + lvl -oattr "$lv" 2> /dev/null | grep -q "^ *....a.$" || { + echo "$lv expected active, but lvs says it's not:" + lvl "$lv" -o+devices 2>/dev/null + exit 1 + } + dmsetup table | egrep -q "$1-$2: *[^ ]+" || { + echo "$lv expected active, lvs thinks it is but there are no mappings!" + dmsetup table | grep $1-$2: + exit 1 + } +} + +inactive() { + lv="$1/$2" + lvl -oattr "$lv" 2> /dev/null | grep -q '^ *....[-isd].$' || { + echo "$lv expected inactive, but lvs says it's not:" + lvl "$lv" -o+devices 2>/dev/null + exit 1 + } + dmsetup table | not egrep -q "$1-$2: *[^ ]+" || { + echo "$lv expected inactive, lvs thinks it is but there are mappings!" + dmsetup table | grep $1-$2: + exit 1 + } +} + +pv_field() +{ + actual=$(trim $(pvs --noheadings $4 -o $2 $1)) + + test "$actual" = "$3" || { + echo "pv_field: PV=$1, field=$2, actual=$actual, expected=$3" + exit 1 + } +} + +vg_field() +{ + actual=$(trim $(vgs --noheadings $4 -o $2 $1)) + test "$actual" = "$3" || { + echo "vg_field: vg=$1, field=$2, actual=$actual, expected=$3" + exit 1 + } +} + +lv_field() +{ + actual=$(trim $(lvs --noheadings $4 -o $2 $1)) + test "$actual" = "$3" || { + echo "lv_field: lv=$1, field=$2, actual=$actual, expected=$3" + exit 1 + } +} + +compare_fields() +{ + local cmd1=$1; + local obj1=$2; + local field1=$3; + local cmd2=$4; + local obj2=$5; + local field2=$6; + local val1; + local val2; + + val1=$($cmd1 --noheadings -o $field1 $obj1) + val2=$($cmd2 --noheadings -o $field2 $obj2) + test "$val1" = "$val2" || { + echo "compare_fields $obj1($field1): $val1 $obj2($field2): $val2" + exit 1 + } +} + +compare_vg_field() +{ + local vg1=$1; + local vg2=$2; + local field=$3; + + val1=$(vgs --noheadings -o $field $vg1) + val2=$(vgs --noheadings -o $field $vg2) + test "$val1" = "$val2" || { + echo "compare_vg_field: $vg1: $val1, $vg2: $val2" + exit 1 + } +} + +pvlv_counts() +{ + local local_vg=$1 + local num_pvs=$2 + local num_lvs=$3 + local num_snaps=$4 + + lvs -a -o+devices $local_vg + + vg_field $local_vg pv_count $num_pvs + vg_field $local_vg lv_count $num_lvs + vg_field $local_vg snap_count $num_snaps +} + +"$@" /cvs/lvm2/LVM2/test/lib/get.sh,v --> standard output revision 1.1 --- LVM2/test/lib/get.sh +++ - 2011-01-05 00:16:39.910727000 +0000 @@ -0,0 +1,23 @@ +# Copyright (C) 2011 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing to use, +# modify, copy, or redistribute it subject to the terms and conditions +# of the GNU General Public License v.2. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +pv_field() { + pvs --noheading -o $2 $1 | sed 's/^ *//' +} + +vg_field() { + vgs --noheading -o $2 $1 | sed 's/^ *//' +} + +lv_field() { + lvs --noheading -o $2 $1 | sed 's/^ *//' +} + +"$@" /cvs/lvm2/LVM2/test/lib/harness.c,v --> standard output revision 1.1 --- LVM2/test/lib/harness.c +++ - 2011-01-05 00:16:40.027256000 +0000 @@ -0,0 +1,284 @@ +/* + * Copyright (C) 2010 Red Hat, Inc. All rights reserved. + * + * This file is part of LVM2. + * + * This copyrighted material is made available to anyone wishing to use, + * modify, copy, or redistribute it subject to the terms and conditions + * of the GNU General Public License v.2. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include +#include +#include +#include +#include +#include +#include + +pid_t pid; +int fds[2]; + +#define MAX 1024 + +struct stats { + int nfailed; + int nskipped; + int npassed; + int nwarned; + int status[MAX]; +}; + +struct stats s; + +char *readbuf = NULL; +int readbuf_sz = 0, readbuf_used = 0; + +int die = 0; +int verbose = 0; +int verbose_off = 0; + +struct subst { + char *key; + char *value; +}; + +struct subst subst[2]; + +char *TESTDIR = NULL; +char *PREFIX = NULL; + +#define PASSED 0 +#define SKIPPED 1 +#define FAILED 2 +#define WARNED 3 + +void handler( int s ) { + signal( s, SIG_DFL ); + kill( pid, s ); + die = s; +} + +int outline(char *buf, int start, int force) { + char *from = buf + start; + char *next = strchr(buf + start, '\n'); + + if (!next && !force) /* not a complete line yet... */ + return start; + + if (!next) + next = from + strlen(from); + else + ++next; + + if (!strncmp(from, "@TESTDIR=", 9)) { + subst[0].key = "@TESTDIR@"; + subst[0].value = strndup(from + 9, next - from - 9 - 1); + } else if (!strncmp(from, "@PREFIX=", 8)) { + subst[1].key = "@PREFIX@"; + subst[1].value = strndup(from + 8, next - from - 8 - 1); + } else { + char *line = strndup(from, next - from); + char *a = line, *b; + do { + b = line + strlen(line); + int idx = -1; + int i; + for ( i = 0; i < 2; ++i ) { + if (subst[i].key) { + // printf("trying: %s -> %s\n", subst[i].value, subst[i].key); + char *stop = strstr(a, subst[i].value); + if (stop && stop < b) { + idx = i; + b = stop; + } + } + } + fwrite(a, 1, b - a, stdout); + a = b; + + if ( idx >= 0 ) { + fprintf(stdout, "%s", subst[idx].key); + a += strlen(subst[idx].value); + } + } while (b < line + strlen(line)); + free(line); + } + + return next - buf + (force ? 0 : 1); +} + +void dump() { + int counter = 0; + + while ( counter < readbuf_used ) + counter = outline( readbuf, counter, 1 ); +} + +void clear() { + readbuf_used = 0; +} + +void drain() { + int sz; + char buf[2048]; + memset(buf, 0, 2048); + + while (1) { + sz = read(fds[1], buf, 2047); + if (verbose) + write(1, buf, sz); + if (sz <= 0) + return; + if (readbuf_used + sz >= readbuf_sz) { + readbuf_sz = readbuf_sz ? 2 * readbuf_sz : 4096; + readbuf = realloc(readbuf, readbuf_sz); + } + if (!readbuf) + exit(205); + memcpy(readbuf + readbuf_used, buf, sz); + readbuf_used += sz; + readbuf[readbuf_used] = 0; + } +} + +void passed(int i, char *f) { + if (strstr(readbuf, "TEST WARNING")) { + ++s.nwarned; + s.status[i] = WARNED; + printf("warnings\n"); + } else { + ++ s.npassed; + s.status[i] = PASSED; + printf("passed.\n"); + } +} + +void skipped(int i, char *f) { + ++ s.nskipped; + s.status[i] = SKIPPED; + printf("skipped.\n"); +} + +void failed(int i, char *f, int st) { + ++ s.nfailed; + s.status[i] = FAILED; + if(die == 2) { + printf("interrupted.\n"); + return; + } + printf("FAILED.\n"); + printf("-- FAILED %s ------------------------------------\n", f); + dump(); + printf("-- FAILED %s (end) ------------------------------\n", f); +} + +void run(int i, char *f) { + pid = fork(); + if (pid < 0) { + perror("Fork failed."); + exit(201); + } else if (pid == 0) { + close(0); + dup2(fds[0], 1); + dup2(fds[0], 2); + close(fds[0]); + close(fds[1]); + execlp("bash", "bash", f, NULL); + perror("execlp"); + fflush(stderr); + _exit(202); + } else { + char buf[128]; + snprintf(buf, 128, "%s ...", f); + buf[127] = 0; + printf("Running %-40s ", buf); + fflush(stdout); + int st, w; + while ((w = waitpid(pid, &st, WNOHANG)) == 0) { + drain(); + usleep(20000); + } + if (w != pid) { + perror("waitpid"); + exit(206); + } + drain(); + if (WIFEXITED(st)) { + if (WEXITSTATUS(st) == 0) { + passed(i, f); + } else if (WEXITSTATUS(st) == 200) { + skipped(i, f); + } else { + failed(i, f, st); + } + } else { + failed(i, f, st); + } + clear(); + } +} + +int main(int argc, char **argv) { + int i; + + if (argc >= MAX) { + fprintf(stderr, "Sorry, my head exploded. Please increase MAX.\n"); + exit(1); + } + + s.nwarned = s.nfailed = s.npassed = s.nskipped = 0; + + char *be_verbose = getenv("VERBOSE"); + if (be_verbose && atoi(be_verbose)) + verbose = 1; // XXX + + if (socketpair(PF_UNIX, SOCK_STREAM, 0, fds)) { + perror("socketpair"); + return 201; + } + + if ( fcntl( fds[1], F_SETFL, O_NONBLOCK ) == -1 ) { + perror("fcntl on socket"); + return 202; + } + + /* set up signal handlers */ + for (i = 0; i <= 32; ++i) { + if (i == SIGCHLD || i == SIGWINCH || i == SIGURG) + continue; + signal(i, handler); + } + + /* run the tests */ + for (i = 1; i < argc; ++ i) { + run(i, argv[i]); + if (die) + break; + } + + printf("\n## %d tests: %d OK, %d warnings, %d failures; %d skipped\n", + s.nwarned + s.npassed + s.nfailed + s.nskipped, + s.npassed, s.nwarned, s.nfailed, s.nskipped); + + /* print out a summary */ + if (s.nfailed || s.nskipped) { + for (i = 1; i < argc; ++ i) { + switch (s.status[i]) { + case FAILED: + printf("FAILED: %s\n", argv[i]); + break; + case SKIPPED: + printf("skipped: %s\n", argv[i]); + break; + } + } + printf("\n"); + return s.nfailed > 0 || die; + } + return die; +} /cvs/lvm2/LVM2/test/lib/lvm-wrapper.sh,v --> standard output revision 1.1 --- LVM2/test/lib/lvm-wrapper.sh +++ - 2011-01-05 00:16:40.332200000 +0000 @@ -0,0 +1,7 @@ +#!/bin/sh + +. lib/paths +cmd=$(echo ./$0|sed "s,.*/,,") + +test "$cmd" = lvm && exec "$abs_top_builddir/tools/lvm" "$@" +exec "$abs_top_builddir/tools/lvm" "$cmd" "$@" /cvs/lvm2/LVM2/test/lib/not.c,v --> standard output revision 1.1 --- LVM2/test/lib/not.c +++ - 2011-01-05 00:16:40.553031000 +0000 @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2010 Red Hat, Inc. All rights reserved. + * + * This file is part of LVM2. + * + * This copyrighted material is made available to anyone wishing to use, + * modify, copy, or redistribute it subject to the terms and conditions + * of the GNU General Public License v.2. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include +#include +#include +#include +#include + +int finished(const char *cmd, int status) { + if (!strcmp(cmd, "not")) + return !status; + if (!strcmp(cmd, "should")) { + if (status) + fprintf(stderr, "TEST WARNING: Ignoring command failure.\n"); + return 0; + } + return 6; +} + +int main(int args, char **argv) { + pid_t pid; + int status; + int FAILURE = 6; + + if (args < 2) { + fprintf(stderr, "Need args\n"); + return FAILURE; + } + + pid = fork(); + if (pid == -1) { + fprintf(stderr, "Could not fork\n"); + return FAILURE; + } else if (pid == 0) { /* child */ + execvp(argv[1], &argv[1]); + /* should not be accessible */ + return FAILURE; + } else { /* parent */ + waitpid(pid, &status, 0); + if (!WIFEXITED(status)) { + if (WIFSIGNALED(status)) + fprintf(stderr, + "Process %d died of signal %d.\n", + pid, WTERMSIG(status)); + /* did not exit correctly */ + return FAILURE; + } + + return finished(argv[0], WEXITSTATUS(status)); + } + /* not accessible */ + return FAILURE; +} /cvs/lvm2/LVM2/test/lib/test.sh,v --> standard output revision 1.1 --- LVM2/test/lib/test.sh +++ - 2011-01-05 00:16:40.981486000 +0000 @@ -0,0 +1,55 @@ +# Copyright (C) 2011 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing to use, +# modify, copy, or redistribute it subject to the terms and conditions +# of the GNU General Public License v.2. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +# sanitize the environment +LANG=C +LC_ALL=C +TZ=UTC + +unset CDPATH + +# grab some common utilities +. lib/utils + +OLDPWD="`pwd`" +PREFIX="LVMTEST$$" + +TESTDIR=$($abs_srcdir/mkdtemp ${LVM_TEST_DIR-$(pwd)} $PREFIX.XXXXXXXXXX) \ + || { echo "failed to create temporary directory in ${LVM_TEST_DIR-$(pwd)}"; exit 1; } + +export PREFIX +export TESTDIR + +trap 'set +vx; STACKTRACE; set -vx' ERR +trap 'aux teardown' EXIT # don't forget to clean up + +export LVM_SYSTEM_DIR=$TESTDIR/etc +export DM_DEV_DIR=$TESTDIR/dev +mkdir $LVM_SYSTEM_DIR $DM_DEV_DIR $DM_DEV_DIR/mapper $TESTDIR/lib + +cd $TESTDIR + +for i in `find $abs_top_builddir/daemons/dmeventd/plugins/ -name \*.so`; do + #echo Setting up symlink from $i to $TESTDIR/lib + ln -s $i $TESTDIR/lib +done + +ln -s $abs_top_builddir/test/lib/* $TESTDIR/lib + +# re-do the utils now that we have TESTDIR/PREFIX/... +. lib/utils + +set -eE -o pipefail +aux lvmconf +aux prepare_clvmd +echo "@TESTDIR=$TESTDIR" +echo "@PREFIX=$PREFIX" + +set -vx /cvs/lvm2/LVM2/test/lib/utils.sh,v --> standard output revision 1.1 --- LVM2/test/lib/utils.sh +++ - 2011-01-05 00:16:41.135555000 +0000 @@ -0,0 +1,80 @@ +# Copyright (C) 2011 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing to use, +# modify, copy, or redistribute it subject to the terms and conditions +# of the GNU General Public License v.2. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +set -e + +STACKTRACE() { + trap - ERR; + i=0; + + while FUNC=${FUNCNAME[$i]}; test "$FUNC" != "main"; do + echo "## $i ${FUNC}() called from ${BASH_SOURCE[$i]}:${BASH_LINENO[$i]}" + i=$(($i + 1)); + done + + # Get backtraces from coredumps + if which gdb >& /dev/null; then + echo bt full > gdb_commands.txt + echo l >> gdb_commands.txt + echo quit >> gdb_commands.txt + for core in `ls core* 2>/dev/null`; do + bin=$(gdb -batch -c $core 2>&1 | grep "generated by" | \ + sed -e "s,.*generated by \`\([^ ']*\).*,\1,") + gdb -batch -c $core -x gdb_commands.txt `which $bin` + done + fi + + test -z "$LVM_TEST_NODEBUG" && test -f debug.log && { + sed -e "s,^,## DEBUG: ,;s,$top_srcdir/\?,," < debug.log + } + + test -f SKIP_THIS_TEST && exit 200 +} + +init_udev_transaction() { + if test "$DM_UDEV_SYNCHRONISATION" = 1; then + COOKIE=$(dmsetup udevcreatecookie) + # Cookie is not generated if udev is not running! + if test -n "$COOKIE"; then + export DM_UDEV_COOKIE=$COOKIE + fi + fi +} + +finish_udev_transaction() { + if test "$DM_UDEV_SYNCHRONISATION" = 1 -a -n "$DM_UDEV_COOKIE"; then + dmsetup udevreleasecookie + unset DM_UDEV_COOKIE + fi +} + +. lib/paths || { echo >&2 you must run make first; exit 1; } + +PATH=$abs_top_builddir/test/lib:$PATH +LIBDIRS="libdm tools liblvm daemons/dmeventd daemons/dmeventd/plugins/lvm2 \ + daemons/dmeventd/plugins/mirror daemons/dmeventd/plugins/snapshot" + +for d in $LIBDIRS; do + LD_LIBRARY_PATH=$abs_top_builddir/$d:$LD_LIBRARY_PATH +done +export LD_LIBRARY_PATH + +if test -n "$PREFIX"; then + vg=${PREFIX}vg + lv=LV + + for i in `seq 1 16`; do + name="${PREFIX}pv$i" + dev="$DM_DEV_DIR/mapper/$name" + eval "dev$i=$dev" + eval "lv$i=LV$i" + eval "vg$i=${PREFIX}vg$i" + done +fi From mornfall@sourceware.org Wed Jan 5 00:25:00 2011 From: mornfall@sourceware.org (mornfall@sourceware.org) Date: Wed, 05 Jan 2011 00:25:00 -0000 Subject: LVM2/test/lib aux.sh Message-ID: <20110105002516.9877.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: mornfall@sourceware.org 2011-01-05 00:25:10 Modified files: test/lib : aux.sh Log message: Fix a couple of bugs in the new (test/lib/)aux.sh. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/lib/aux.sh.diff?cvsroot=lvm2&r1=1.1&r2=1.2 --- LVM2/test/lib/aux.sh 2011/01/05 00:16:21 1.1 +++ LVM2/test/lib/aux.sh 2011/01/05 00:25:07 1.2 @@ -43,7 +43,10 @@ fi # skip if we don't have our own dmeventd... - (which dmeventd | grep $abs_builddir) || exit 200 + (which dmeventd | grep $abs_builddir) || { + touch SKIP_THIS_TEST + exit 1 + } dmeventd -f & echo "$!" > LOCAL_DMEVENTD @@ -219,6 +222,7 @@ fi local size=$(($loopsz/$n)) + devs= init_udev_transaction for i in `seq 1 $n`; do From mornfall@sourceware.org Wed Jan 5 00:26:00 2011 From: mornfall@sourceware.org (mornfall@sourceware.org) Date: Wed, 05 Jan 2011 00:26:00 -0000 Subject: LVM2/test lib/test.sh lib/utils.sh mkdtemp Message-ID: <20110105002624.11703.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: mornfall@sourceware.org 2011-01-05 00:26:20 Modified files: test/lib : test.sh utils.sh Removed files: test : mkdtemp Log message: Move the mkdtemp functionality into test/lib/utils.sh. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/lib/test.sh.diff?cvsroot=lvm2&r1=1.1&r2=1.2 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/lib/utils.sh.diff?cvsroot=lvm2&r1=1.1&r2=1.2 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/mkdtemp.diff?cvsroot=lvm2&r1=1.2&r2=NONE --- LVM2/test/lib/test.sh 2011/01/05 00:16:21 1.1 +++ LVM2/test/lib/test.sh 2011/01/05 00:26:19 1.2 @@ -21,7 +21,7 @@ OLDPWD="`pwd`" PREFIX="LVMTEST$$" -TESTDIR=$($abs_srcdir/mkdtemp ${LVM_TEST_DIR-$(pwd)} $PREFIX.XXXXXXXXXX) \ +TESTDIR=$(mkdtemp ${LVM_TEST_DIR-$(pwd)} $PREFIX.XXXXXXXXXX) \ || { echo "failed to create temporary directory in ${LVM_TEST_DIR-$(pwd)}"; exit 1; } export PREFIX --- LVM2/test/lib/utils.sh 2011/01/05 00:16:21 1.1 +++ LVM2/test/lib/utils.sh 2011/01/05 00:26:19 1.2 @@ -10,6 +10,97 @@ set -e +die() { echo >&2 "$@"; exit 1; } + +MAX_TRIES=4 + +rand_bytes() +{ + n=$1 + + chars=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 + + dev_rand=/dev/urandom + if test -r "$dev_rand"; then + # Note: 256-length($chars) == 194; 3 copies of $chars is 186 + 8 = 194. + head -c$n "$dev_rand" | tr -c $chars 01234567$chars$chars$chars + return + fi + + cmds='date; date +%N; free; who -a; w; ps auxww; ps ef; netstat -n' + data=$( (eval "$cmds") 2>&1 | gzip ) + + n_plus_50=$(expr $n + 50) + + # Ensure that $data has length at least 50+$n + while :; do + len=$(echo "$data"|wc -c) + test $n_plus_50 -le $len && break; + data=$( (echo "$data"; eval "$cmds") 2>&1 | gzip ) + done + + echo "$data" \ + | dd bs=1 skip=50 count=$n 2>/dev/null \ + | tr -c $chars 01234567$chars$chars$chars +} + +mkdtemp() +{ + case $# in + 2);; + *) die "Usage: mkdtemp DIR TEMPLATE";; + esac + + destdir=$1 + template=$2 + + case $template in + *XXXX) ;; + *) die "invalid template: $template (must have a suffix of at least 4 X's)";; + esac + + fail=0 + + # First, try to use mktemp. + d=$(env -u TMPDIR mktemp -d -t -p "$destdir" "$template" 2>/dev/null) \ + || fail=1 + + # The resulting name must be in the specified directory. + case $d in "$destdir"*);; *) fail=1;; esac + + # It must have created the directory. + test -d "$d" || fail=1 + + # It must have 0700 permissions. + perms=$(ls -dgo "$d" 2>/dev/null) || fail=1 + case $perms in drwx------*) ;; *) fail=1;; esac + + test $fail = 0 && { + echo "$d" + return + } + + # If we reach this point, we'll have to create a directory manually. + + # Get a copy of the template without its suffix of X's. + base_template=$(echo "$template"|sed 's/XX*$//') + + # Calculate how many X's we've just removed. + nx=$(expr length "$template" - length "$base_template") + + err= + i=1 + while :; do + X=$(rand_bytes $nx) + candidate_dir="$destdir/$base_template$X" + err=$(mkdir -m 0700 "$candidate_dir" 2>&1) \ + && { echo "$candidate_dir"; return; } + test $MAX_TRIES -le $i && break; + i=$(expr $i + 1) + done + die "$err" +} + STACKTRACE() { trap - ERR; i=0; From mornfall@sourceware.org Wed Jan 5 00:38:00 2011 From: mornfall@sourceware.org (mornfall@sourceware.org) Date: Wed, 05 Jan 2011 00:38:00 -0000 Subject: LVM2/test t-pvcreate-operation-md.sh Message-ID: <20110105003843.10092.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: mornfall@sourceware.org 2011-01-05 00:38:41 Modified files: test : t-pvcreate-operation-md.sh Log message: Fix typo in t-pvcreate-operation-md.sh. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-pvcreate-operation-md.sh.diff?cvsroot=lvm2&r1=1.11&r2=1.12 --- LVM2/test/t-pvcreate-operation-md.sh 2011/01/05 00:16:20 1.11 +++ LVM2/test/t-pvcreate-operation-md.sh 2011/01/05 00:38:41 1.12 @@ -20,7 +20,7 @@ . lib/test -prepare_lvmconf 'devices/filter = [ "a|/dev/md.*|", "a/dev\/mapper\/.*$/", "r/.*/" ]' +aux lvmconf 'devices/filter = [ "a|/dev/md.*|", "a/dev\/mapper\/.*$/", "r/.*/" ]' aux prepare_devs 2 # Have MD use a non-standard name to avoid colliding with an existing MD device From mornfall@sourceware.org Wed Jan 5 01:00:00 2011 From: mornfall@sourceware.org (mornfall@sourceware.org) Date: Wed, 05 Jan 2011 01:00:00 -0000 Subject: LVM2/test t-metadata-dirs.sh Message-ID: <20110105010035.10630.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: mornfall@sourceware.org 2011-01-05 01:00:34 Added files: test : t-metadata-dirs.sh Log message: Add a test for RHBZ 640621 (metadata/dirs + no PV MDAs broken). Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-metadata-dirs.sh.diff?cvsroot=lvm2&r1=NONE&r2=1.1 /cvs/lvm2/LVM2/test/t-metadata-dirs.sh,v --> standard output revision 1.1 --- LVM2/test/t-metadata-dirs.sh +++ - 2011-01-05 01:00:34.976299000 +0000 @@ -0,0 +1,43 @@ +#!/bin/sh +# Copyright (C) 2011 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing to use, +# modify, copy, or redistribute it subject to the terms and conditions +# of the GNU General Public License v.2. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +. lib/test + +aux prepare_devs 3 +pvcreate --metadatacopies 0 $(cat DEVICES) + +not vgcreate $vg $(cat DEVICES) + +aux lvmconf "metadata/dirs = [ \"$TESTDIR/mda\" ]" + +vgcreate $vg $dev1 +check vg_field $vg vg_mda_count 1 +vgremove -ff $vg + +vgcreate $vg $(cat DEVICES) +check vg_field $vg vg_mda_count 1 + +vgremove -ff $vg +pvcreate --metadatacopies 1 --metadataignore y $dev1 +vgcreate $vg $(cat DEVICES) +check vg_field $vg vg_mda_count 2 + +vgremove -ff $vg +pvcreate --metadatacopies 1 --metadataignore n $dev1 +vgcreate $vg $(cat DEVICES) +check vg_field $vg vg_mda_count 2 + +vgremove -ff $vg +pvcreate --metadatacopies 0 $dev1 + +aux lvmconf "metadata/dirs = [ \"$TESTDIR/mda\", \"$TESTDIR/mda2\" ]" +vgcreate $vg $(cat DEVICES) +check vg_field $vg vg_mda_count 2 From mornfall@sourceware.org Wed Jan 5 01:04:00 2011 From: mornfall@sourceware.org (mornfall@sourceware.org) Date: Wed, 05 Jan 2011 01:04:00 -0000 Subject: LVM2/test t-pvcreate-operation-md.sh Message-ID: <20110105010447.11413.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: mornfall@sourceware.org 2011-01-05 01:04:47 Modified files: test : t-pvcreate-operation-md.sh Log message: Fix another bug in t-pvcreate-operation-md (should pass now). Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-pvcreate-operation-md.sh.diff?cvsroot=lvm2&r1=1.12&r2=1.13 --- LVM2/test/t-pvcreate-operation-md.sh 2011/01/05 00:38:41 1.12 +++ LVM2/test/t-pvcreate-operation-md.sh 2011/01/05 01:04:47 1.13 @@ -45,13 +45,13 @@ cleanup_md_and_teardown() { cleanup_md - teardown + aux teardown } # create 2 disk MD raid0 array (stripe_width=128K) test -b "$mddev" && exit 200 mdadm --create --metadata=1.0 $mddev --auto=md --level 0 --raid-devices=2 --chunk 64 $dev1 $dev2 -trap 'aux cleanup_md_and_teardown' EXIT # cleanup this MD device at the end of the test +trap 'cleanup_md_and_teardown' EXIT # cleanup this MD device at the end of the test test -b "$mddev" || exit 200 # Test alignment of PV on MD without any MD-aware or topology-aware detection From zkabelac@sourceware.org Wed Jan 5 12:17:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Wed, 05 Jan 2011 12:17:00 -0000 Subject: LVM2/daemons/clvmd clvmd.c Message-ID: <20110105121720.29669.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-05 12:17:20 Modified files: daemons/clvmd : clvmd.c Log message: Remove dead assignment to thisfd Value of 'thisfd' is not read again after its assigment Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/clvmd.c.diff?cvsroot=lvm2&r1=1.91&r2=1.92 --- LVM2/daemons/clvmd/clvmd.c 2010/12/22 14:00:28 1.91 +++ LVM2/daemons/clvmd/clvmd.c 2011/01/05 12:17:19 1.92 @@ -830,7 +830,6 @@ struct local_client *free_fd; lastfd->next = thisfd->next; free_fd = thisfd; - thisfd = lastfd; DEBUGLOG("removeme set for fd %d\n", free_fd->fd); @@ -866,7 +865,6 @@ ret, errno); lastfd->next = thisfd->next; free_fd = thisfd; - thisfd = lastfd; safe_close(&(free_fd->fd)); /* Queue cleanup, this also frees the client struct */ From zkabelac@sourceware.org Wed Jan 5 12:27:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Wed, 05 Jan 2011 12:27:00 -0000 Subject: LVM2/lib/mirror mirrored.c Message-ID: <20110105122757.845.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-05 12:27:57 Modified files: lib/mirror : mirrored.c Log message: Remove unused variable mirr_state and its assignment Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/mirror/mirrored.c.diff?cvsroot=lvm2&r1=1.82&r2=1.83 --- LVM2/lib/mirror/mirrored.c 2010/12/20 13:32:49 1.82 +++ LVM2/lib/mirror/mirrored.c 2011/01/05 12:27:56 1.83 @@ -184,7 +184,6 @@ uint64_t *total_numerator, uint64_t *total_denominator) { - struct mirror_state *mirr_state; uint64_t numerator, denominator; unsigned mirror_count, m; int used; @@ -193,8 +192,6 @@ if (!*target_state) *target_state = _mirrored_init_target(mem, cmd); - mirr_state = *target_state; - /* Status line: <#mirrors> (maj:min)+ / */ log_debug("Mirror status: %s", params); From zkabelac@sourceware.org Wed Jan 5 12:33:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Wed, 05 Jan 2011 12:33:00 -0000 Subject: LVM2 ./WHATS_NEW lib/report/properties.c Message-ID: <20110105123356.3167.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-05 12:33:53 Modified files: . : WHATS_NEW lib/report : properties.c Log message: Return PERCENT_INVALID for error case If the percent value could not be determined return PERCENT_INVALID. Indent function with tabs. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1857&r2=1.1858 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/report/properties.c.diff?cvsroot=lvm2&r1=1.27&r2=1.28 --- LVM2/WHATS_NEW 2011/01/04 21:33:06 1.1857 +++ LVM2/WHATS_NEW 2011/01/05 12:33:51 1.1858 @@ -1,5 +1,6 @@ Version 2.02.80 - ==================================== + Return defined value for errors in _copy_percent() and _snap_percent(). Correct return code of cmirrord when issuing 'start' when already running. Fix wrongly paired unlocking of global lock in pvchange. (2.02.66) Add backtraces for backup and backup_remove fail paths. --- LVM2/lib/report/properties.c 2010/12/14 23:20:58 1.27 +++ LVM2/lib/report/properties.c 2011/01/05 12:33:52 1.28 @@ -87,15 +87,18 @@ } static percent_t _copy_percent(const struct logical_volume *lv) { - percent_t perc; - lv_mirror_percent(lv->vg->cmd, (struct logical_volume *) lv, 0, &perc, NULL); - return perc; + percent_t perc; + if (!lv_mirror_percent(lv->vg->cmd, (struct logical_volume *) lv, + 0, &perc, NULL)) + perc = PERCENT_INVALID; + return perc; } static percent_t _snap_percent(const struct logical_volume *lv) { - percent_t perc; - lv_snapshot_percent(lv, &perc); - return perc; + percent_t perc; + if (!lv_snapshot_percent(lv, &perc)) + perc = PERCENT_INVALID; + return perc; } /* PV */ From zkabelac@sourceware.org Wed Jan 5 12:59:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Wed, 05 Jan 2011 12:59:00 -0000 Subject: LVM2 ./WHATS_NEW tools/polldaemon.c Message-ID: <20110105125947.30840.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-05 12:59:47 Modified files: . : WHATS_NEW tools : polldaemon.c Log message: Fail deamonization if lvmcache_init fail FIXME Add proper cleanup Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1858&r2=1.1859 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/polldaemon.c.diff?cvsroot=lvm2&r1=1.39&r2=1.40 --- LVM2/WHATS_NEW 2011/01/05 12:33:51 1.1858 +++ LVM2/WHATS_NEW 2011/01/05 12:59:46 1.1859 @@ -1,5 +1,6 @@ Version 2.02.80 - ==================================== + Fail poll daemon creation when lvmcache_init() fails. Return defined value for errors in _copy_percent() and _snap_percent(). Correct return code of cmirrord when issuing 'start' when already running. Fix wrongly paired unlocking of global lock in pvchange. (2.02.66) --- LVM2/tools/polldaemon.c 2010/12/08 20:50:51 1.39 +++ LVM2/tools/polldaemon.c 2011/01/05 12:59:47 1.40 @@ -64,7 +64,9 @@ strncpy(*cmd->argv, "(lvm2)", strlen(*cmd->argv)); reset_locking(); - lvmcache_init(); + if (!lvmcache_init()) + /* FIXME Clean up properly here */ + _exit(ECMD_FAILED); dev_close_all(); return 1; From zkabelac@sourceware.org Wed Jan 5 14:03:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Wed, 05 Jan 2011 14:03:00 -0000 Subject: LVM2 ./WHATS_NEW lib/activate/dev_manager.c Message-ID: <20110105140338.25448.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-05 14:03:37 Modified files: . : WHATS_NEW lib/activate : dev_manager.c Log message: Add missing error path tests Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1859&r2=1.1860 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/dev_manager.c.diff?cvsroot=lvm2&r1=1.210&r2=1.211 --- LVM2/WHATS_NEW 2011/01/05 12:59:46 1.1859 +++ LVM2/WHATS_NEW 2011/01/05 14:03:36 1.1860 @@ -1,5 +1,6 @@ Version 2.02.80 - ==================================== + Add missing tests in _setup_task(). Fail poll daemon creation when lvmcache_init() fails. Return defined value for errors in _copy_percent() and _snap_percent(). Correct return code of cmirrord when issuing 'start' when already running. --- LVM2/lib/activate/dev_manager.c 2010/12/22 15:32:15 1.210 +++ LVM2/lib/activate/dev_manager.c 2011/01/05 14:03:37 1.211 @@ -75,19 +75,22 @@ if (!(dmt = dm_task_create(task))) return_NULL; - if (name) - dm_task_set_name(dmt, name); + if (name && !dm_task_set_name(dmt, name)) + goto_out; - if (uuid && *uuid) - dm_task_set_uuid(dmt, uuid); + if (uuid && *uuid && !dm_task_set_uuid(dmt, uuid)) + goto_out; - if (event_nr) - dm_task_set_event_nr(dmt, *event_nr); + if (event_nr && !dm_task_set_event_nr(dmt, *event_nr)) + goto_out; - if (major) - dm_task_set_major_minor(dmt, major, minor, 1); + if (major && !dm_task_set_major_minor(dmt, major, minor, 1)) + goto_out; return dmt; + out: + dm_task_destroy(dmt); + return NULL; } static int _info_run(const char *name, const char *dlid, struct dm_info *info, From mornfall@sourceware.org Wed Jan 5 14:15:00 2011 From: mornfall@sourceware.org (mornfall@sourceware.org) Date: Wed, 05 Jan 2011 14:15:00 -0000 Subject: LVM2/test t-lvconvert-repair-transient.sh Message-ID: <20110105141502.31030.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: mornfall@sourceware.org 2011-01-05 14:15:01 Modified files: test : t-lvconvert-repair-transient.sh Log message: Re-enable t-lvconvert-repair-transient, avoiding the deadlock by running mkfs asynchronously. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-lvconvert-repair-transient.sh.diff?cvsroot=lvm2&r1=1.3&r2=1.4 --- LVM2/test/t-lvconvert-repair-transient.sh 2011/01/05 00:16:20 1.3 +++ LVM2/test/t-lvconvert-repair-transient.sh 2011/01/05 14:15:01 1.4 @@ -11,18 +11,16 @@ . lib/test -exit 200 # this breaks upstream .33 and RHEL6 kernel :( - aux prepare_vg 5 -# fail multiple devices - lvcreate -m 3 --ig -L 1 -n 4way $vg aux disable_dev $dev2 $dev4 -mkfs.ext3 $DM_DEV_DIR/$vg/4way +mkfs.ext3 $DM_DEV_DIR/$vg/4way & +sleep 1 aux enable_dev $dev2 $dev4 echo n | lvconvert --repair $vg/4way 2>&1 | tee 4way.out lvs -a -o +devices | not grep unknown vgreduce --removemissing $vg check mirror $vg 4way lvchange -a n $vg/4way +wait From mornfall@sourceware.org Wed Jan 5 14:15:00 2011 From: mornfall@sourceware.org (mornfall@sourceware.org) Date: Wed, 05 Jan 2011 14:15:00 -0000 Subject: LVM2/test harness.sh lvm-utils.sh test-utils.sh Message-ID: <20110105141531.31422.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: mornfall@sourceware.org 2011-01-05 14:15:27 Removed files: test : harness.sh lvm-utils.sh test-utils.sh Log message: Remove obsolete bits of support code from test/. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/harness.sh.diff?cvsroot=lvm2&r1=1.6&r2=NONE http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/lvm-utils.sh.diff?cvsroot=lvm2&r1=1.27&r2=NONE http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/test-utils.sh.diff?cvsroot=lvm2&r1=1.57&r2=NONE From zkabelac@sourceware.org Wed Jan 5 15:03:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Wed, 05 Jan 2011 15:03:00 -0000 Subject: LVM2/test/lib harness.c not.c Message-ID: <20110105150344.12122.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-05 15:03:43 Modified files: test/lib : harness.c not.c Log message: Fix gcc warnings for missing headers and prototypes Add missing header string.h (strcmp, strndup). Add 'static' to fix missing prototypes gcc warning. Remove unused variables verbose_off, TESTDIR, PREFIX. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/lib/harness.c.diff?cvsroot=lvm2&r1=1.1&r2=1.2 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/lib/not.c.diff?cvsroot=lvm2&r1=1.1&r2=1.2 --- LVM2/test/lib/harness.c 2011/01/05 00:16:21 1.1 +++ LVM2/test/lib/harness.c 2011/01/05 15:03:43 1.2 @@ -19,9 +19,10 @@ #include #include #include +#include -pid_t pid; -int fds[2]; +static pid_t pid; +static int fds[2]; #define MAX 1024 @@ -33,37 +34,33 @@ int status[MAX]; }; -struct stats s; +static struct stats s; -char *readbuf = NULL; -int readbuf_sz = 0, readbuf_used = 0; +static char *readbuf = NULL; +static int readbuf_sz = 0, readbuf_used = 0; -int die = 0; -int verbose = 0; -int verbose_off = 0; +static int die = 0; +static int verbose = 0; struct subst { - char *key; + const char *key; char *value; }; -struct subst subst[2]; - -char *TESTDIR = NULL; -char *PREFIX = NULL; +static struct subst subst[2]; #define PASSED 0 #define SKIPPED 1 #define FAILED 2 #define WARNED 3 -void handler( int s ) { +static void handler( int s ) { signal( s, SIG_DFL ); kill( pid, s ); die = s; } -int outline(char *buf, int start, int force) { +static int outline(char *buf, int start, int force) { char *from = buf + start; char *next = strchr(buf + start, '\n'); @@ -112,18 +109,18 @@ return next - buf + (force ? 0 : 1); } -void dump() { +static void dump(void) { int counter = 0; while ( counter < readbuf_used ) counter = outline( readbuf, counter, 1 ); } -void clear() { +static void clear(void) { readbuf_used = 0; } -void drain() { +static void drain(void) { int sz; char buf[2048]; memset(buf, 0, 2048); @@ -146,7 +143,7 @@ } } -void passed(int i, char *f) { +static void passed(int i, char *f) { if (strstr(readbuf, "TEST WARNING")) { ++s.nwarned; s.status[i] = WARNED; @@ -158,13 +155,13 @@ } } -void skipped(int i, char *f) { +static void skipped(int i, char *f) { ++ s.nskipped; s.status[i] = SKIPPED; printf("skipped.\n"); } -void failed(int i, char *f, int st) { +static void failed(int i, char *f, int st) { ++ s.nfailed; s.status[i] = FAILED; if(die == 2) { @@ -177,7 +174,7 @@ printf("-- FAILED %s (end) ------------------------------\n", f); } -void run(int i, char *f) { +static void run(int i, char *f) { pid = fork(); if (pid < 0) { perror("Fork failed."); --- LVM2/test/lib/not.c 2011/01/05 00:16:21 1.1 +++ LVM2/test/lib/not.c 2011/01/05 15:03:43 1.2 @@ -15,10 +15,11 @@ #include #include #include +#include #include #include -int finished(const char *cmd, int status) { +static int finished(const char *cmd, int status) { if (!strcmp(cmd, "not")) return !status; if (!strcmp(cmd, "should")) { From zkabelac@sourceware.org Wed Jan 5 15:06:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Wed, 05 Jan 2011 15:06:00 -0000 Subject: LVM2/lib/format_text archiver.c Message-ID: <20110105150610.12612.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-05 15:06:10 Modified files: lib/format_text: archiver.c Log message: Add sys_debug loging for unlink This unlink intentionally silently ignores any errors. It's still worth to trace its error status in debug mode. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/archiver.c.diff?cvsroot=lvm2&r1=1.36&r2=1.37 --- LVM2/lib/format_text/archiver.c 2010/12/22 13:45:33 1.36 +++ LVM2/lib/format_text/archiver.c 2011/01/05 15:06:10 1.37 @@ -261,7 +261,9 @@ /* * Let this fail silently. */ - unlink(path); + if (unlink(path)) + log_sys_debug("unlink", path); + return 1; } From zkabelac@sourceware.org Wed Jan 5 15:10:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Wed, 05 Jan 2011 15:10:00 -0000 Subject: LVM2/lib/locking cluster_locking.c file_locking.c Message-ID: <20110105151031.14688.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-05 15:10:30 Modified files: lib/locking : cluster_locking.c file_locking.c Log message: Check result of dm_snprintf for error Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/locking/cluster_locking.c.diff?cvsroot=lvm2&r1=1.47&r2=1.48 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/locking/file_locking.c.diff?cvsroot=lvm2&r1=1.51&r2=1.52 --- LVM2/lib/locking/cluster_locking.c 2010/11/29 11:13:12 1.47 +++ LVM2/lib/locking/cluster_locking.c 2011/01/05 15:10:30 1.48 @@ -409,12 +409,14 @@ } /* If the VG name is empty then lock the unused PVs */ - if (is_orphan_vg(resource) || is_global_vg(resource) || (flags & LCK_CACHE)) - dm_snprintf(lockname, sizeof(lockname), "P_%s", - resource); - else - dm_snprintf(lockname, sizeof(lockname), "V_%s", - resource); + if (dm_snprintf(lockname, sizeof(lockname), "%c_%s", + (is_orphan_vg(resource) || + is_global_vg(resource) || + (flags & LCK_CACHE)) ? 'P' : 'V', + resource) < 0) { + log_error("Locking resource %s too long.", resource); + return 0; + } lock_scope = "VG"; clvmd_cmd = CLVMD_CMD_LOCK_VG; --- LVM2/lib/locking/file_locking.c 2010/12/13 10:43:57 1.51 +++ LVM2/lib/locking/file_locking.c 2011/01/05 15:10:30 1.52 @@ -268,12 +268,20 @@ if (flags & LCK_CACHE) break; - if (is_orphan_vg(resource) || is_global_vg(resource)) - dm_snprintf(lockfile, sizeof(lockfile), - "%s/P_%s", _lock_dir, resource + 1); - else - dm_snprintf(lockfile, sizeof(lockfile), - "%s/V_%s", _lock_dir, resource); + if (is_orphan_vg(resource) || is_global_vg(resource)) { + if (dm_snprintf(lockfile, sizeof(lockfile), + "%s/P_%s", _lock_dir, resource + 1) < 0) { + log_error("Too long locking filename %s/P_%s.", + _lock_dir, resource + 1); + return 0; + } + } else + if (dm_snprintf(lockfile, sizeof(lockfile), + "%s/V_%s", _lock_dir, resource) < 0) { + log_error("Too long locking filename %s/V_%s.", + _lock_dir, resource); + return 0; + } if (!_lock_file(lockfile, flags)) return_0; From jbrassow@sourceware.org Wed Jan 5 20:02:00 2011 From: jbrassow@sourceware.org (jbrassow@sourceware.org) Date: Wed, 05 Jan 2011 20:02:00 -0000 Subject: LVM2 ./WHATS_NEW tools/lvconvert.c Message-ID: <20110105200246.25601.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: jbrassow@sourceware.org 2011-01-05 20:02:45 Modified files: . : WHATS_NEW tools : lvconvert.c Log message: Prevent the user from simultaneously adding a mirror log while removing a mirror image (or removing a log while adding a mirror). Advise the user to use two separate commands instead. This issue become especially problematic when PVs are specified, as they tend to mean different things when adding vs removing. In a command that mixes adding and removing, it is impossible to decern exactly what the user wants. This change prevents bug 603912. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1860&r2=1.1861 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvconvert.c.diff?cvsroot=lvm2&r1=1.152&r2=1.153 --- LVM2/WHATS_NEW 2011/01/05 14:03:36 1.1860 +++ LVM2/WHATS_NEW 2011/01/05 20:02:45 1.1861 @@ -1,5 +1,6 @@ Version 2.02.80 - ==================================== + Prevent adding/removing mirror log while removing/adding an image. Add missing tests in _setup_task(). Fail poll daemon creation when lvmcache_init() fails. Return defined value for errors in _copy_percent() and _snap_percent(). --- LVM2/tools/lvconvert.c 2010/12/08 20:50:51 1.152 +++ LVM2/tools/lvconvert.c 2011/01/05 20:02:45 1.153 @@ -927,6 +927,25 @@ } /* + * Disallow adding logs while removing images or + * adding images while removing logs + */ + if ((*old_log_count < *new_log_count) && + (*old_mimage_count > *new_mimage_count)) { + log_error("Mirror logs cannot be added while images are" + " being removed."); + log_error("Try two separate commands."); + return 0; + } + if ((*old_log_count > *new_log_count) && + (*old_mimage_count < *new_mimage_count)) { + log_error("Mirror images cannot be added while logs are" + " being removed."); + log_error("Try two separate commands."); + return 0; + } + + /* * No mirrored logs for cluster mirrors until * log daemon is multi-threaded. */ From jbrassow@sourceware.org Wed Jan 5 23:18:00 2011 From: jbrassow@sourceware.org (jbrassow@sourceware.org) Date: Wed, 05 Jan 2011 23:18:00 -0000 Subject: LVM2 ./WHATS_NEW tools/lvconvert.c Message-ID: <20110105231847.30157.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: jbrassow@sourceware.org 2011-01-05 23:18:47 Modified files: . : WHATS_NEW tools : lvconvert.c Log message: Reverting recent commit to disallow adding/removing mirror log while removing/adding mirror images... There was already code in there to do the job - I just didn't find it in WHATS_NEW (or in the code right away). Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1861&r2=1.1862 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvconvert.c.diff?cvsroot=lvm2&r1=1.153&r2=1.154 --- LVM2/WHATS_NEW 2011/01/05 20:02:45 1.1861 +++ LVM2/WHATS_NEW 2011/01/05 23:18:46 1.1862 @@ -1,6 +1,5 @@ Version 2.02.80 - ==================================== - Prevent adding/removing mirror log while removing/adding an image. Add missing tests in _setup_task(). Fail poll daemon creation when lvmcache_init() fails. Return defined value for errors in _copy_percent() and _snap_percent(). --- LVM2/tools/lvconvert.c 2011/01/05 20:02:45 1.153 +++ LVM2/tools/lvconvert.c 2011/01/05 23:18:47 1.154 @@ -927,25 +927,6 @@ } /* - * Disallow adding logs while removing images or - * adding images while removing logs - */ - if ((*old_log_count < *new_log_count) && - (*old_mimage_count > *new_mimage_count)) { - log_error("Mirror logs cannot be added while images are" - " being removed."); - log_error("Try two separate commands."); - return 0; - } - if ((*old_log_count > *new_log_count) && - (*old_mimage_count < *new_mimage_count)) { - log_error("Mirror images cannot be added while logs are" - " being removed."); - log_error("Try two separate commands."); - return 0; - } - - /* * No mirrored logs for cluster mirrors until * log daemon is multi-threaded. */ @@ -1368,8 +1349,8 @@ if (((old_mimage_count < new_mimage_count && old_log_count > new_log_count) || (old_mimage_count > new_mimage_count && old_log_count < new_log_count)) && lp->pv_count) { - log_error("Cannot both allocate and free extents when specifying physical" - " volumes to use."); + log_error("Cannot both allocate and free extents when " + "specifying physical volumes to use."); log_error("Please specify the operation in two steps."); return 0; } From zkabelac@sourceware.org Thu Jan 6 09:45:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Thu, 06 Jan 2011 09:45:00 -0000 Subject: LVM2/daemons/dmeventd libdevmapper-event.c Message-ID: <20110106094506.14126.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-06 09:45:05 Modified files: daemons/dmeventd: libdevmapper-event.c Log message: Remove unneeded stack prints after log_error Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/dmeventd/libdevmapper-event.c.diff?cvsroot=lvm2&r1=1.37&r2=1.38 --- LVM2/daemons/dmeventd/libdevmapper-event.c 2010/12/22 15:28:44 1.37 +++ LVM2/daemons/dmeventd/libdevmapper-event.c 2011/01/06 09:45:05 1.38 @@ -432,7 +432,6 @@ log_error("%s: Can't open client fifo %s: %s", __func__, fifos->client_path, strerror(errno)); - stack; return 0; } @@ -441,7 +440,7 @@ if (!strncmp(DMEVENTD_PATH, "/", 1) && stat(DMEVENTD_PATH, &statbuf)) { log_error("Unable to find dmeventd."); - return_0; + return 0; } pid = fork(); @@ -479,7 +478,6 @@ if ((fifos->server = open(fifos->server_path, O_RDWR)) < 0) { log_error("%s: open server fifo %s", __func__, fifos->server_path); - stack; return 0; } @@ -495,7 +493,6 @@ log_error("%s: Can't open client fifo %s: %s", __func__, fifos->client_path, strerror(errno)); close(fifos->server); - stack; return 0; } From zkabelac@sourceware.org Thu Jan 6 10:45:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Thu, 06 Jan 2011 10:45:00 -0000 Subject: LVM2/daemons/dmeventd libdevmapper-event.c Message-ID: <20110106104541.30667.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-06 10:45:41 Modified files: daemons/dmeventd: libdevmapper-event.c Log message: Remove dead assignment of 'ret' value Variable 'ret' assigned from _do_event() was actually not used and replaced with next assignment without any read of the returned value. Code is reformated - so the error path is put in the if() branch and normal code is put after the 'if' together with FIXME comment. FIXME lowprio: logging needs to be fixed in this code, - multiple log_errors are printed, stacks are missing... Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/dmeventd/libdevmapper-event.c.diff?cvsroot=lvm2&r1=1.38&r2=1.39 --- LVM2/daemons/dmeventd/libdevmapper-event.c 2011/01/06 09:45:05 1.38 +++ LVM2/daemons/dmeventd/libdevmapper-event.c 2011/01/06 10:45:41 1.39 @@ -715,17 +715,18 @@ uuid = dm_task_get_uuid(dmt); - if (!(ret = _do_event(next ? DM_EVENT_CMD_GET_NEXT_REGISTERED_DEVICE : - DM_EVENT_CMD_GET_REGISTERED_DEVICE, dmevh->dmeventd_path, - &msg, dmevh->dso, uuid, dmevh->mask, 0))) { - /* FIXME this will probably horribly break if we get - ill-formatted reply */ - ret = _parse_message(&msg, &reply_dso, &reply_uuid, &reply_mask); - } else { + if (_do_event(next ? DM_EVENT_CMD_GET_NEXT_REGISTERED_DEVICE : + DM_EVENT_CMD_GET_REGISTERED_DEVICE, dmevh->dmeventd_path, + &msg, dmevh->dso, uuid, dmevh->mask, 0)) { ret = -ENOENT; + stack; goto fail; } + /* FIXME this will probably horribly break if we get + ill-formatted reply */ + ret = _parse_message(&msg, &reply_dso, &reply_uuid, &reply_mask); + dm_task_destroy(dmt); dmt = NULL; From zkabelac@sourceware.org Thu Jan 6 15:25:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Thu, 06 Jan 2011 15:25:00 -0000 Subject: LVM2/lib/format_text import_vsn1.c Message-ID: <20110106152507.7370.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-06 15:25:07 Modified files: lib/format_text: import_vsn1.c Log message: Intentionaly ignore result from get_config_uint32 Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/import_vsn1.c.diff?cvsroot=lvm2&r1=1.80&r2=1.81 --- LVM2/lib/format_text/import_vsn1.c 2010/12/22 15:44:09 1.80 +++ LVM2/lib/format_text/import_vsn1.c 2011/01/06 15:25:07 1.81 @@ -840,7 +840,7 @@ log_suppress(old_suppress); *desc = dm_pool_strdup(mem, d); - get_config_uint32(cft->root, "creation_time", &u); + (void) get_config_uint32(cft->root, "creation_time", &u); *when = u; } From zkabelac@sourceware.org Thu Jan 6 15:29:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Thu, 06 Jan 2011 15:29:00 -0000 Subject: LVM2 ./WHATS_NEW lib/commands/toolcontext.c li ... Message-ID: <20110106152925.9121.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-06 15:29:24 Modified files: . : WHATS_NEW lib/commands : toolcontext.c lib/filters : filter-persistent.c Log message: Fix memory leak in filter creation error path If some allocation for peristent filter fails its memory reference was lost, fix it by calling filter's destructor. Fix log_error messages for failing allocation. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1862&r2=1.1863 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/commands/toolcontext.c.diff?cvsroot=lvm2&r1=1.113&r2=1.114 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/filters/filter-persistent.c.diff?cvsroot=lvm2&r1=1.47&r2=1.48 --- LVM2/WHATS_NEW 2011/01/05 23:18:46 1.1862 +++ LVM2/WHATS_NEW 2011/01/06 15:29:24 1.1863 @@ -1,5 +1,6 @@ Version 2.02.80 - ==================================== + Fix memory leak in filter creation error path. Add missing tests in _setup_task(). Fail poll daemon creation when lvmcache_init() fails. Return defined value for errors in _copy_percent() and _snap_percent(). --- LVM2/lib/commands/toolcontext.c 2010/12/20 14:34:49 1.113 +++ LVM2/lib/commands/toolcontext.c 2011/01/06 15:29:24 1.114 @@ -708,6 +708,7 @@ cache_dir ? : DEFAULT_CACHE_SUBDIR, cache_file_prefix ? : DEFAULT_CACHE_FILE_PREFIX) < 0) { log_error("Persistent cache filename too long."); + f3->destroy(f3); return 0; } } else if (!(dev_cache = find_config_tree_str(cmd, "devices/cache", NULL)) && @@ -716,6 +717,7 @@ cmd->system_dir, DEFAULT_CACHE_SUBDIR, DEFAULT_CACHE_FILE_PREFIX) < 0)) { log_error("Persistent cache filename too long."); + f3->destroy(f3); return 0; } @@ -723,8 +725,9 @@ dev_cache = cache_file; if (!(f4 = persistent_filter_create(f3, dev_cache))) { - log_error("Failed to create persistent device filter"); - return 0; + log_verbose("Failed to create persistent device filter."); + f3->destroy(f3); + return_0; } /* Should we ever dump persistent filter state? */ --- LVM2/lib/filters/filter-persistent.c 2010/12/20 13:12:56 1.47 +++ LVM2/lib/filters/filter-persistent.c 2011/01/06 15:29:24 1.48 @@ -318,13 +318,16 @@ struct dev_filter *f = NULL; struct stat info; - if (!(pf = dm_zalloc(sizeof(*pf)))) - return_NULL; + if (!(pf = dm_zalloc(sizeof(*pf)))) { + log_error("Allocation of persistent filter failed."); + return NULL; + } - if (!(pf->file = dm_malloc(strlen(file) + 1))) - goto_bad; + if (!(pf->file = dm_strdup(file))) { + log_error("Filename duplication for persistent filter failed."); + goto bad; + } - strcpy(pf->file, file); pf->real = real; if (!(_init_hash(pf))) { @@ -332,8 +335,10 @@ goto bad; } - if (!(f = dm_malloc(sizeof(*f)))) - goto_bad; + if (!(f = dm_malloc(sizeof(*f)))) { + log_error("Allocation of device filter for persistent filter failed."); + goto bad; + } /* Only merge cache file before dumping it if it changed externally. */ if (!stat(pf->file, &info)) From mornfall@sourceware.org Fri Jan 7 12:26:00 2011 From: mornfall@sourceware.org (mornfall@sourceware.org) Date: Fri, 07 Jan 2011 12:26:00 -0000 Subject: LVM2/test Makefile.in Message-ID: <20110107122603.22389.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: mornfall@sourceware.org 2011-01-07 12:26:02 Modified files: test : Makefile.in Log message: Fix up the make clean target in test/. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/Makefile.in.diff?cvsroot=lvm2&r1=1.50&r2=1.51 --- LVM2/test/Makefile.in 2011/01/05 00:16:18 1.50 +++ LVM2/test/Makefile.in 2011/01/07 12:26:02 1.51 @@ -101,6 +101,9 @@ clean: rm -rf bin .lib-dir-stamp .test-stamp + rm -f $(LIB) + rm -f lib/dmsetup lib/clvmd lib/dmeventd + for i in lvm $$(cat ../tools/.commands); do rm -f lib/$$i; done if test "$(srcdir)" != . ; then rm -f $(subst $(srcdir)/, ,$(RUN)) lvm2app.sh ; fi distclean: clean From mornfall@sourceware.org Fri Jan 7 13:03:00 2011 From: mornfall@sourceware.org (mornfall@sourceware.org) Date: Fri, 07 Jan 2011 13:03:00 -0000 Subject: LVM2/test/lib check.sh Message-ID: <20110107130347.23378.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: mornfall@sourceware.org 2011-01-07 13:03:47 Modified files: test/lib : check.sh Log message: Relax the mirror test in test/lib/check.sh. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/lib/check.sh.diff?cvsroot=lvm2&r1=1.1&r2=1.2 --- LVM2/test/lib/check.sh 2011/01/05 00:16:21 1.1 +++ LVM2/test/lib/check.sh 2011/01/07 13:03:46 1.2 @@ -140,9 +140,15 @@ mirror_nonredundant() { lv="$1/$2" lvs -oattr "$lv" | grep -q "^ *m.....$" || { - echo "$lv expected a mirror, but is not:" - lvs -a $lv - exit 1 + if lvs -oattr "$lv" | grep -q "^ *o.....$" && + lvs -a | fgrep -q "[${lv}_mimage"; then + echo "TEST WARNING: $lv is a snapshot origin and looks like a mirror," + echo "assuming it is actually a mirror" + else + echo "$lv expected a mirror, but is not:" + lvs -a $lv + exit 1 + fi } if test -n "$3"; then mirror_log_on "$1" "$2" "$3"; fi } From mornfall@sourceware.org Fri Jan 7 13:03:00 2011 From: mornfall@sourceware.org (mornfall@sourceware.org) Date: Fri, 07 Jan 2011 13:03:00 -0000 Subject: LVM2/test/lib aux.sh Message-ID: <20110107130305.23157.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: mornfall@sourceware.org 2011-01-07 13:03:04 Modified files: test/lib : aux.sh Log message: In aux, exit 200 no longer works as skip -- replace with real skip call. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/lib/aux.sh.diff?cvsroot=lvm2&r1=1.2&r2=1.3 --- LVM2/test/lib/aux.sh 2011/01/05 00:25:07 1.2 +++ LVM2/test/lib/aux.sh 2011/01/07 13:03:04 1.3 @@ -10,6 +10,11 @@ . lib/utils +skip() { + touch SKIP_THIS_TEST + exit 1 +} + prepare_clvmd() { if test -z "$LVM_TEST_LOCKING" || test "$LVM_TEST_LOCKING" -ne 3 ; then return 0 # not needed @@ -17,22 +22,21 @@ if pgrep clvmd ; then echo "Cannot use fake cluster locking with real clvmd ($(pgrep clvmd)) running." - touch SKIP_THIS_TEST - exit 1 + skip fi # skip if we don't have our own clvmd... - (which clvmd | grep $abs_builddir) || exit 200 + (which clvmd | grep $abs_builddir) || skip # skip if we singlenode is not compiled in - (clvmd --help 2>&1 | grep "Available cluster managers" | grep singlenode) || exit 200 + (clvmd --help 2>&1 | grep "Available cluster managers" | grep singlenode) || skip clvmd -Isinglenode -d 1 & LOCAL_CLVMD="$!" # check that it is really running now sleep .1 - ps $LOCAL_CLVMD || exit 200 + ps $LOCAL_CLVMD || skip } prepare_dmeventd() { @@ -175,16 +179,16 @@ test -n "$DM_DEV_DIR" # Skip test if awk isn't available (required for get_sd_devs_) - which awk || exit 200 + which awk || skip # Skip test if scsi_debug module is unavailable or is already in use - modprobe --dry-run scsi_debug || exit 200 - lsmod | grep -q scsi_debug && exit 200 + modprobe --dry-run scsi_debug || skip + lsmod | grep -q scsi_debug && skip # Create the scsi_debug device and determine the new scsi device's name # NOTE: it will _never_ make sense to pass num_tgts param; # last param wins.. so num_tgts=1 is imposed - modprobe scsi_debug dev_size_mb=$DEV_SIZE $SCSI_DEBUG_PARAMS num_tgts=1 || exit 200 + modprobe scsi_debug dev_size_mb=$DEV_SIZE $SCSI_DEBUG_PARAMS num_tgts=1 || skip sleep 2 # allow for async Linux SCSI device registration local DEBUG_DEV=/dev/$(grep -H scsi_debug /sys/block/*/device/model | cut -f4 -d /) @@ -353,15 +357,12 @@ apitest() { t=$1 shift - test -x $abs_top_builddir/test/api/$t.t || { - touch SKIP_THIS_TEST - exit 200 - } + test -x $abs_top_builddir/test/api/$t.t || skip $abs_top_builddir/test/api/$t.t "$@" } api() { - test -x $abs_top_builddir/test/api/wrapper || exit 200 + test -x $abs_top_builddir/test/api/wrapper || skip $abs_top_builddir/test/api/wrapper "$@" } From mornfall@sourceware.org Fri Jan 7 13:04:00 2011 From: mornfall@sourceware.org (mornfall@sourceware.org) Date: Fri, 07 Jan 2011 13:04:00 -0000 Subject: LVM2/test/lib aux.sh Message-ID: <20110107130417.24365.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: mornfall@sourceware.org 2011-01-07 13:04:17 Modified files: test/lib : aux.sh Log message: Disable activation/monitoring in testing lvm.conf by default. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/lib/aux.sh.diff?cvsroot=lvm2&r1=1.3&r2=1.4 --- LVM2/test/lib/aux.sh 2011/01/07 13:03:04 1.3 +++ LVM2/test/lib/aux.sh 2011/01/07 13:04:17 1.4 @@ -52,7 +52,9 @@ exit 1 } - dmeventd -f & + lvmconf "activation/monitoring = 1" + + dmeventd -f "$@" & echo "$!" > LOCAL_DMEVENTD } @@ -335,6 +337,7 @@ activation/polling_interval = 0 activation/snapshot_autoextend_percent = 50 activation/snapshot_autoextend_threshold = 50 +activation/monitoring = 0 EOF } From mornfall@sourceware.org Fri Jan 7 13:07:00 2011 From: mornfall@sourceware.org (mornfall@sourceware.org) Date: Fri, 07 Jan 2011 13:07:00 -0000 Subject: LVM2/test/api Makefile.in Message-ID: <20110107130710.25105.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: mornfall@sourceware.org 2011-01-07 13:07:10 Modified files: test/api : Makefile.in Log message: Remove *.t in test/api's make clean target. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/api/Makefile.in.diff?cvsroot=lvm2&r1=1.19&r2=1.20 --- LVM2/test/api/Makefile.in 2010/12/14 23:20:59 1.19 +++ LVM2/test/api/Makefile.in 2011/01/07 13:07:10 1.20 @@ -59,3 +59,6 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status test/api/Makefile + +clean: + rm -f *.t From agk@sourceware.org Fri Jan 7 14:38:00 2011 From: agk@sourceware.org (agk@sourceware.org) Date: Fri, 07 Jan 2011 14:38:00 -0000 Subject: LVM2 ./configure lib/misc/configure.h.in autoc ... Message-ID: <20110107143836.5781.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: agk@sourceware.org 2011-01-07 14:38:35 Modified files: . : configure lib/misc : configure.h.in autoconf : config.guess config.sub Log message: Using Fedora 14's autoreconf. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/configure.diff?cvsroot=lvm2&r1=1.143&r2=1.144 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/misc/configure.h.in.diff?cvsroot=lvm2&r1=1.30&r2=1.31 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/autoconf/config.guess.diff?cvsroot=lvm2&r1=1.5&r2=1.6 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/autoconf/config.sub.diff?cvsroot=lvm2&r1=1.5&r2=1.6 --- LVM2/configure 2010/12/13 11:03:10 1.143 +++ LVM2/configure 2011/01/07 14:38:34 1.144 @@ -1,18 +1,22 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63. +# Generated by GNU Autoconf 2.66. +# # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. +# +# # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which @@ -20,23 +24,15 @@ alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - as_nl=' ' export as_nl @@ -44,7 +40,13 @@ as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else @@ -55,7 +57,7 @@ as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; - case $arg in + case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; @@ -78,13 +80,6 @@ } fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - # IFS # We need space, tab and new line, in precisely that order. Quoting is @@ -94,15 +89,15 @@ IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -114,12 +109,16 @@ fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' @@ -131,330 +130,299 @@ LANGUAGE=C export LANGUAGE -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - # CDPATH. -$as_unset CDPATH - +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST else - as_have_required=no + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes else - exitcode=1 - echo positional parameters were not saved. + as_have_required=no fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : -test \$exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : else - as_candidate_shells= - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - case $as_dir in + as_found=: + case $as_dir in #( /*) for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi done;; esac + as_found=false done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } IFS=$as_save_IFS - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done + if test "x$CONFIG_SHELL" != x; then : + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 fi - - fi - fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} +} # as_fn_mkdir_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append -exitcode=0 -if as_func_success; then - : +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' else - exitcode=1 - echo as_func_success failed. -fi + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi -if as_func_ret_success; then - : +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr else - exitcode=1 - echo as_func_ret_success failed. + as_expr=false fi -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false fi -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname else - exitcode=1 - echo positional parameters were not saved. + as_dirname=false fi -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell bug-autoconf@gnu.org about your system, - echo including any error possibly output before this message. - echo This can help us improve future autoconf versions. - echo Configuration will now proceed without shell functions. -} +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= @@ -471,8 +439,7 @@ s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the @@ -482,29 +449,18 @@ exit } - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in +case `echo -n x` in #((((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then @@ -534,7 +490,7 @@ rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false @@ -553,10 +509,10 @@ if test -d "$1"; then test -d "$1/."; else - case $1 in + case $1 in #( -*)set "./$1";; esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' @@ -570,11 +526,11 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - -exec 7<&0 &1 +test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -589,7 +545,6 @@ subdirs= MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME= @@ -597,6 +552,7 @@ PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= +PACKAGE_URL= ac_unique_file="lib/device/dev-cache.h" # Factoring default headers for most tests. @@ -635,6 +591,7 @@ # include #endif" +ac_header_list= ac_default_prefix=/usr ac_subst_vars='LTLIBOBJS usrsbindir @@ -744,6 +701,8 @@ CCS_CFLAGS PKGCONFIGINIT_LIBS PKGCONFIGINIT_CFLAGS +PKG_CONFIG_LIBDIR +PKG_CONFIG_PATH PKG_CONFIG POW_LIB LIBOBJS @@ -811,6 +770,7 @@ program_transform_name prefix exec_prefix +PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION @@ -889,6 +849,8 @@ CPPFLAGS CPP PKG_CONFIG +PKG_CONFIG_PATH +PKG_CONFIG_LIBDIR PKGCONFIGINIT_CFLAGS PKGCONFIGINIT_LIBS CCS_CFLAGS @@ -1019,8 +981,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1046,8 +1007,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1251,8 +1211,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1268,8 +1227,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1299,17 +1257,17 @@ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) { $as_echo "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1326,15 +1284,13 @@ if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { $as_echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 - { (exit 1); exit 1; }; } ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1357,8 +1313,7 @@ [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1372,8 +1327,8 @@ if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1388,11 +1343,9 @@ ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { $as_echo "$as_me: error: working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1431,13 +1384,11 @@ fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 - { (exit 1); exit 1; }; } + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1477,7 +1428,7 @@ --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages + -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1568,23 +1519,23 @@ Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-user=USER set the owner of installed files [USER=] - --with-group=GROUP set the group owner of installed files [GROUP=] - --with-device-uid=UID set the owner used for new device nodes [UID=0] - --with-device-gid=GID set the group used for new device nodes [GID=0] - --with-device-mode=MODE set the mode used for new device nodes [MODE=0600] + --with-user=USER set the owner of installed files [[USER=]] + --with-group=GROUP set the group owner of installed files [[GROUP=]] + --with-device-uid=UID set the owner used for new device nodes [[UID=0]] + --with-device-gid=GID set the group used for new device nodes [[GID=0]] + --with-device-mode=MODE set the mode used for new device nodes [[MODE=0600]] --with-lvm1=TYPE LVM1 metadata support: internal/shared/none - [TYPE=internal] + [[TYPE=internal]] --with-pool=TYPE GFS pool read-only support: internal/shared/none - [TYPE=internal] + [[TYPE=internal]] --with-cluster=TYPE cluster LVM locking support: internal/shared/none - [TYPE=internal] + [[TYPE=internal]] --with-snapshots=TYPE snapshot support: internal/shared/none - [TYPE=internal] + [[TYPE=internal]] --with-mirrors=TYPE mirror support: internal/shared/none - [TYPE=internal] + [[TYPE=internal]] --with-replicators=TYPE replicator support: internal/shared/none - [TYPE=none] + [[TYPE=none]] --with-clvmd=TYPE build cluster LVM Daemon The following cluster manager combinations are valid: * cman,gulm (RHEL4 or equivalent) @@ -1595,36 +1546,36 @@ * none (disable build) [TYPE=none] --with-clvmd-pidfile=PATH - clvmd pidfile [/var/run/clvmd.pid] + clvmd pidfile [[/var/run/clvmd.pid]] --with-cmirrord-pidfile=PATH - cmirrord pidfile [/var/run/cmirrord.pid] - --with-optimisation=OPT C optimisation flag [OPT=-O2] - --with-localedir=DIR translation files in DIR [PREFIX/share/locale] - --with-confdir=DIR configuration files in DIR [/etc] - --with-staticdir=DIR static binaries in DIR [EPREFIX/sbin] - --with-usrlibdir=DIR usrlib in DIR [PREFIX/lib] - --with-usrsbindir=DIR usrsbin executables in DIR [PREFIX/sbin] + cmirrord pidfile [[/var/run/cmirrord.pid]] + --with-optimisation=OPT C optimisation flag [[OPT=-O2]] + --with-localedir=DIR translation files in DIR [[PREFIX/share/locale]] + --with-confdir=DIR configuration files in DIR [[/etc]] + --with-staticdir=DIR static binaries in DIR [[EPREFIX/sbin]] + --with-usrlibdir=DIR usrlib in DIR [[PREFIX/lib]] + --with-usrsbindir=DIR usrsbin executables in DIR [[PREFIX/sbin]] --with-udev-prefix=UPREFIX - install udev rule files in UPREFIX [EPREFIX] - --with-udevdir=DIR udev rules in DIR [UPREFIX/lib/udev/rules.d] + install udev rule files in UPREFIX [[EPREFIX]] + --with-udevdir=DIR udev rules in DIR [[UPREFIX/lib/udev/rules.d]] --with-dmeventd-pidfile=PATH - dmeventd pidfile [/var/run/dmeventd.pid] + dmeventd pidfile [[/var/run/dmeventd.pid]] --with-dmeventd-path=PATH - dmeventd path [EPREFIX/sbin/dmeventd] + dmeventd path [[EPREFIX/sbin/dmeventd]] --with-default-run-dir=DIR Default run directory [/var/run/lvm] --with-default-system-dir=DIR - default LVM system directory [/etc/lvm] + default LVM system directory [[/etc/lvm]] --with-default-archive-subdir=SUBDIR - default metadata archive subdir [archive] + default metadata archive subdir [[archive]] --with-default-backup-subdir=SUBDIR - default metadata backup subdir [backup] + default metadata backup subdir [[backup]] --with-default-cache-subdir=SUBDIR - default metadata cache subdir [cache] + default metadata cache subdir [[cache]] --with-default-locking-dir=DIR - default locking directory [/var/lock/lvm] + default locking directory [[/var/lock/lvm]] --with-default-data-alignment=NUM - set the default data alignment in MiB [1] - --with-interface=IFACE choose kernel interface (ioctl) [ioctl] + set the default data alignment in MiB [[1]] + --with-interface=IFACE choose kernel interface (ioctl) [[ioctl]] Some influential environment variables: CC C compiler command @@ -1632,10 +1583,14 @@ LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor PKG_CONFIG path to pkg-config utility + PKG_CONFIG_PATH + directories to add to pkg-config's search path + PKG_CONFIG_LIBDIR + path overriding pkg-config's built-in search path PKGCONFIGINIT_CFLAGS C compiler flags for PKGCONFIGINIT, overriding pkg-config PKGCONFIGINIT_LIBS @@ -1670,6 +1625,7 @@ Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. +Report bugs to the package provider. _ACEOF ac_status=$? fi @@ -1733,9224 +1689,2755 @@ if $ac_init_version; then cat <<\_ACEOF configure -generated by GNU Autoconf 2.63 +generated by GNU Autoconf 2.66 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by $as_me, which was -generated by GNU Autoconf 2.63. Invocation command line was - $ $0 $@ - -_ACEOF -exec 5>>config.log +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () { -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` +} # ac_fn_c_try_compile -_ASUNAME +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" -done -IFS=$as_save_IFS + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval -} >&5 +} # ac_fn_c_try_cpp -cat >&5 <<_ACEOF +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval -## ----------- ## -## Core tests. ## -## ----------- ## +} # ac_fn_c_try_link +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval "test \"\${$3+set}\"" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval "test \"\${$3+set}\"" = set; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> _ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; - 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - ac_configure_args="$ac_configure_args '$ac_arg'" - ;; - esac - done -done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval "test \"\${$3+set}\"" = set; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo +} # ac_fn_c_check_header_mongrel - cat <<\_ASBOX -## ---------------- ## -## Cache variables. ## -## ---------------- ## -_ASBOX - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - cat <<\_ASBOX -## ----------------- ## -## Output variables. ## -## ----------------- ## -_ASBOX - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval - if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## -## File substitutions. ## -## ------------------- ## -_ASBOX - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi +} # ac_fn_c_try_run - if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## -## confdefs.h. ## -## ----------- ## -_ASBOX - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval "test \"\${$3+set}\"" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> _ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} +} # ac_fn_c_check_header_compile -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES +# ---------------------------------------------------- +# Tries to find if the field MEMBER exists in type AGGR, after including +# INCLUDES, setting cache variable VAR accordingly. +ac_fn_c_check_member () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 +$as_echo_n "checking for $2.$3... " >&6; } +if eval "test \"\${$4+set}\"" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (ac_aggr.$3) +return 0; + ; + return 0; +} _ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (sizeof ac_aggr.$3) +return 0; + ; + return 0; +} _ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + eval "$4=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$4 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} +} # ac_fn_c_check_member -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" +# ac_fn_c_check_type LINENO TYPE VAR INCLUDES +# ------------------------------------------- +# Tests whether TYPE exists after having included INCLUDES, setting cache +# variable VAR accordingly. +ac_fn_c_check_type () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval "test \"\${$3+set}\"" = set; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} _ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} _ACEOF +if ac_fn_c_try_compile "$LINENO"; then : - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site + eval "$3=yes" fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test -r "$ac_site_file"; then - { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then - { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} +} # ac_fn_c_check_type +# ac_fn_c_find_intX_t LINENO BITS VAR +# ----------------------------------- +# Finds a signed integer type with width BITS, setting cache variable VAR +# accordingly. +ac_fn_c_find_intX_t () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5 +$as_echo_n "checking for int$2_t... " >&6; } +if eval "test \"\${$3+set}\"" = set; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + # Order is important - never check a type that is potentially smaller + # than half of the expected target width. + for ac_type in int$2_t 'int' 'long int' \ + 'long long int' 'short int' 'signed char'; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default + enum { N = $2 / 2 - 1 }; +int +main () +{ +static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))]; +test_array [0] = 0 + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default + enum { N = $2 / 2 - 1 }; +int +main () +{ +static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1) + < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))]; +test_array [0] = 0 + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : +else + case $ac_type in #( + int$2_t) : + eval "$3=yes" ;; #( + *) : + eval "$3=\$ac_type" ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if eval test \"x\$"$3"\" = x"no"; then : +else + break +fi + done +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} +} # ac_fn_c_find_intX_t +# ac_fn_c_find_uintX_t LINENO BITS VAR +# ------------------------------------ +# Finds an unsigned integer type with width BITS, setting cache variable VAR +# accordingly. +ac_fn_c_find_uintX_t () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5 +$as_echo_n "checking for uint$2_t... " >&6; } +if eval "test \"\${$3+set}\"" = set; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + # Order is important - never check a type that is potentially smaller + # than half of the expected target width. + for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \ + 'unsigned long long int' 'unsigned short int' 'unsigned char'; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)]; +test_array [0] = 0 + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + case $ac_type in #( + uint$2_t) : + eval "$3=yes" ;; #( + *) : + eval "$3=\$ac_type" ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if eval test \"x\$"$3"\" = x"no"; then : +else + break +fi + done +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} +} # ac_fn_c_find_uintX_t +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval "test \"\${$3+set}\"" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif +#undef $2 - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -ac_config_headers="$ac_config_headers lib/misc/configure.h" - - -################################################################################ -ac_aux_dir= -for ac_dir in autoconf "$srcdir"/autoconf; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in autoconf \"$srcdir\"/autoconf" >&5 -$as_echo "$as_me: error: cannot find install-sh or install.sh in autoconf \"$srcdir\"/autoconf" >&2;} - { (exit 1); exit 1; }; } -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - - -################################################################################ -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 -$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} - { (exit 1); exit 1; }; } - -{ $as_echo "$as_me:$LINENO: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} - { (exit 1); exit 1; }; } -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} - { (exit 1); exit 1; }; } - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 -$as_echo "$as_me: error: invalid value of canonical build" >&2;} - { (exit 1); exit 1; }; };; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:$LINENO: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} - { (exit 1); exit 1; }; } -fi - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 -$as_echo "$as_me: error: invalid value of canonical host" >&2;} - { (exit 1); exit 1; }; };; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:$LINENO: checking target system type" >&5 -$as_echo_n "checking target system type... " >&6; } -if test "${ac_cv_target+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "x$target_alias" = x; then - ac_cv_target=$ac_cv_host -else - ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || - { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;} - { (exit 1); exit 1; }; } -fi - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_target" >&5 -$as_echo "$ac_cv_target" >&6; } -case $ac_cv_target in -*-*-*) ;; -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical target" >&5 -$as_echo "$as_me: error: invalid value of canonical target" >&2;} - { (exit 1); exit 1; }; };; -esac -target=$ac_cv_target -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_target -shift -target_cpu=$1 -target_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -target_os=$* -IFS=$ac_save_IFS -case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac - - -# The aliases save the names the user supplied, while $host etc. -# will get canonicalized. -test -n "$target_alias" && - test "$program_prefix$program_suffix$program_transform_name" = \ - NONENONEs,x,x, && - program_prefix=${target_alias}- - -case "$host_os" in - linux*) - CFLAGS="$CFLAGS" - COPTIMISE_FLAG="-O2" - CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym" - CLDWHOLEARCHIVE="-Wl,-whole-archive" - CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive" - LDDEPS="$LDDEPS .export.sym" - LDFLAGS="$LDFLAGS -Wl,--export-dynamic" - LIB_SUFFIX=so - DEVMAPPER=yes - ODIRECT=yes - DM_IOCTLS=yes - SELINUX=yes - CLUSTER=internal - FSADM=yes - ;; - darwin*) - CFLAGS="$CFLAGS -no-cpp-precomp -fno-common" - COPTIMISE_FLAG="-O2" - CLDFLAGS="$CLDFLAGS" - CLDWHOLEARCHIVE="-all_load" - CLDNOWHOLEARCHIVE= - LIB_SUFFIX=dylib - DEVMAPPER=yes - ODIRECT=no - DM_IOCTLS=no - SELINUX=no - CLUSTER=none - FSADM=no - ;; -esac - -################################################################################ -{ $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 -$as_echo_n "checking for a sed that does not truncate output... " >&6; } -if test "${ac_cv_path_SED+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - $as_unset ac_script || ac_script= - if test -z "$SED"; then - ac_path_SED_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue -# Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_SED_found && break 3 - done - done -done -IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable sed could be found in \$PATH" >&5 -$as_echo "$as_me: error: no acceptable sed could be found in \$PATH" >&2;} - { (exit 1); exit 1; }; } - fi -else - ac_cv_path_SED=$SED -fi - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5 -$as_echo "$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:$LINENO: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } - -# Provide some information about the compiler. -$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { (ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi - -{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -if test -z "$ac_file"; then - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C compiler cannot create executables -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } -fi - -ac_exeext=$ac_cv_exeext - -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 -# If not cross compiling, check that we can run a simple program. -if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } - fi - fi -fi -{ $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -fi - -rm -f conftest$ac_cv_exeext -{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -fi - -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_compiler_gnu=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_c89=$ac_arg -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:$LINENO: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:$LINENO: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : -else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done -done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done -done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -if test $ac_cv_c_compiler_gnu = yes; then - { $as_echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5 -$as_echo_n "checking whether $CC needs -traditional... " >&6; } -if test "${ac_cv_prog_gcc_traditional+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_pattern="Autoconf.*'x'" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -Autoconf TIOCGETP -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "$ac_pattern" >/dev/null 2>&1; then - ac_cv_prog_gcc_traditional=yes -else - ac_cv_prog_gcc_traditional=no -fi -rm -f conftest* - - - if test $ac_cv_prog_gcc_traditional = no; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -Autoconf TCGETA -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "$ac_pattern" >/dev/null 2>&1; then - ac_cv_prog_gcc_traditional=yes -fi -rm -f conftest* - - fi -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5 -$as_echo "$ac_cv_prog_gcc_traditional" >&6; } - if test $ac_cv_prog_gcc_traditional = yes; then - CC="$CC -traditional" - fi -fi - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - -done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } -fi - -{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } -if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done -done -IFS=$as_save_IFS - -fi - - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - test -d ./--version && rmdir ./--version - MKDIR_P="$ac_install_sh -d" - fi -fi -{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -# Extract the first word of "cflow", so it can be a program name with args. -set dummy cflow; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_CFLOW_CMD+set}" = set; then - $as_echo_n "(cached) " >&6 -else - case $CFLOW_CMD in - [\\/]* | ?:[\\/]*) - ac_cv_path_CFLOW_CMD="$CFLOW_CMD" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_CFLOW_CMD="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - ;; -esac -fi -CFLOW_CMD=$ac_cv_path_CFLOW_CMD -if test -n "$CFLOW_CMD"; then - { $as_echo "$as_me:$LINENO: result: $CFLOW_CMD" >&5 -$as_echo "$CFLOW_CMD" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -# Extract the first word of "cscope", so it can be a program name with args. -set dummy cscope; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_CSCOPE_CMD+set}" = set; then - $as_echo_n "(cached) " >&6 -else - case $CSCOPE_CMD in - [\\/]* | ?:[\\/]*) - ac_cv_path_CSCOPE_CMD="$CSCOPE_CMD" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_CSCOPE_CMD="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - ;; -esac -fi -CSCOPE_CMD=$ac_cv_path_CSCOPE_CMD -if test -n "$CSCOPE_CMD"; then - { $as_echo "$as_me:$LINENO: result: $CSCOPE_CMD" >&5 -$as_echo "$CSCOPE_CMD" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - -################################################################################ - - - - - -ac_header_dirent=no -for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do - as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 -$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include <$ac_hdr> - -int -main () -{ -if ((DIR *) 0) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 -_ACEOF - -ac_header_dirent=$ac_hdr; break -fi - -done -# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. -if test $ac_header_dirent = dirent.h; then - { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5 -$as_echo_n "checking for library containing opendir... " >&6; } -if test "${ac_cv_search_opendir+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char opendir (); -int -main () -{ -return opendir (); - ; - return 0; -} -_ACEOF -for ac_lib in '' dir; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_search_opendir=$ac_res -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext - if test "${ac_cv_search_opendir+set}" = set; then - break -fi -done -if test "${ac_cv_search_opendir+set}" = set; then - : -else - ac_cv_search_opendir=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 -$as_echo "$ac_cv_search_opendir" >&6; } -ac_res=$ac_cv_search_opendir -if test "$ac_res" != no; then - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - -else - { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5 -$as_echo_n "checking for library containing opendir... " >&6; } -if test "${ac_cv_search_opendir+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char opendir (); -int -main () -{ -return opendir (); - ; - return 0; -} -_ACEOF -for ac_lib in '' x; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_search_opendir=$ac_res -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext - if test "${ac_cv_search_opendir+set}" = set; then - break -fi -done -if test "${ac_cv_search_opendir+set}" = set; then - : -else - ac_cv_search_opendir=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 -$as_echo "$ac_cv_search_opendir" >&6; } -ac_res=$ac_cv_search_opendir -if test "$ac_res" != no; then - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - -fi - -{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_header_stdc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdc=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_header_stdc=no -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - -fi -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. - - - - - - - - - -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -{ $as_echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5 -$as_echo_n "checking whether sys/types.h defines makedev... " >&6; } -if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -return makedev(0, 0); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_header_sys_types_h_makedev=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_sys_types_h_makedev=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5 -$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; } - -if test $ac_cv_header_sys_types_h_makedev = no; then -if test "${ac_cv_header_sys_mkdev_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5 -$as_echo_n "checking for sys/mkdev.h... " >&6; } -if test "${ac_cv_header_sys_mkdev_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5 -$as_echo "$ac_cv_header_sys_mkdev_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5 -$as_echo_n "checking sys/mkdev.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5 -$as_echo_n "checking sys/mkdev.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5 -$as_echo_n "checking for sys/mkdev.h... " >&6; } -if test "${ac_cv_header_sys_mkdev_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_sys_mkdev_h=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5 -$as_echo "$ac_cv_header_sys_mkdev_h" >&6; } - -fi -if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then - -cat >>confdefs.h <<\_ACEOF -#define MAJOR_IN_MKDEV 1 -_ACEOF - -fi - - - - if test $ac_cv_header_sys_mkdev_h = no; then - if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5 -$as_echo_n "checking for sys/sysmacros.h... " >&6; } -if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5 -$as_echo "$ac_cv_header_sys_sysmacros_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5 -$as_echo_n "checking sys/sysmacros.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5 -$as_echo_n "checking sys/sysmacros.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5 -$as_echo_n "checking for sys/sysmacros.h... " >&6; } -if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_sys_sysmacros_h=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5 -$as_echo "$ac_cv_header_sys_sysmacros_h" >&6; } - -fi -if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then - -cat >>confdefs.h <<\_ACEOF -#define MAJOR_IN_SYSMACROS 1 -_ACEOF - -fi - - - fi -fi - -{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_header_stdc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdc=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_header_stdc=no -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - -fi -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF - -fi - -{ $as_echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 -$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } -if test "${ac_cv_header_sys_wait_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#ifndef WEXITSTATUS -# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) -#endif -#ifndef WIFEXITED -# define WIFEXITED(stat_val) (((stat_val) & 255) == 0) -#endif - -int -main () -{ - int s; - wait (&s); - s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_header_sys_wait_h=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_sys_wait_h=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -$as_echo "$ac_cv_header_sys_wait_h" >&6; } -if test $ac_cv_header_sys_wait_h = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_SYS_WAIT_H 1 -_ACEOF - -fi - -{ $as_echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 -$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } -if test "${ac_cv_header_time+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include - -int -main () -{ -if ((struct tm *) 0) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_header_time=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_time=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 -$as_echo "$ac_cv_header_time" >&6; } -if test $ac_cv_header_time = yes; then - -cat >>confdefs.h <<\_ACEOF -#define TIME_WITH_SYS_TIME 1 -_ACEOF - -fi - - - - - - - - - - - - - - - - -for ac_header in locale.h stddef.h syslog.h sys/file.h sys/time.h assert.h \ - langinfo.h libgen.h signal.h sys/mman.h sys/resource.h sys/utsname.h \ - sys/wait.h time.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -else - { { $as_echo "$as_me:$LINENO: error: bailing out" >&5 -$as_echo "$as_me: error: bailing out" >&2;} - { (exit 1); exit 1; }; } -fi - -done - - -case "$host_os" in - linux*) - - - -for ac_header in asm/byteorder.h linux/fs.h malloc.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -else - { { $as_echo "$as_me:$LINENO: error: bailing out" >&5 -$as_echo "$as_me: error: bailing out" >&2;} - { (exit 1); exit 1; }; } -fi - -done - ;; - darwin*) - - -for ac_header in machine/endian.h sys/disk.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -else - { { $as_echo "$as_me:$LINENO: error: bailing out" >&5 -$as_echo "$as_me: error: bailing out" >&2;} - { (exit 1); exit 1; }; } -fi - -done - ;; -esac - - - - - - - - - - - - - - - - - -for ac_header in ctype.h dirent.h errno.h fcntl.h getopt.h inttypes.h limits.h \ - stdarg.h stdio.h stdlib.h string.h sys/ioctl.h sys/param.h sys/stat.h \ - sys/types.h unistd.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -else - { { $as_echo "$as_me:$LINENO: error: bailing out" >&5 -$as_echo "$as_me: error: bailing out" >&2;} - { (exit 1); exit 1; }; } -fi - -done - - - -for ac_header in termios.h sys/statvfs.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -################################################################################ -{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 -$as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if test "${ac_cv_c_const+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -/* FIXME: Include the comments suggested by Paul. */ -#ifndef __cplusplus - /* Ultrix mips cc rejects this. */ - typedef int charset[2]; - const charset cs; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *pcpcc; - char **ppc; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - pcpcc = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++pcpcc; - ppc = (char**) pcpcc; - pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; - if (s) return 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* AIX XL C 1.02.0.0 rejects this saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - if (!foo) return 0; - } - return !cs[0] && !zero.x; -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_c_const=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_c_const=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 -$as_echo "$ac_cv_c_const" >&6; } -if test $ac_cv_c_const = no; then - -cat >>confdefs.h <<\_ACEOF -#define const /**/ -_ACEOF - -fi - -{ $as_echo "$as_me:$LINENO: checking for inline" >&5 -$as_echo_n "checking for inline... " >&6; } -if test "${ac_cv_c_inline+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_c_inline=$ac_kw -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break -done - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -$as_echo "$ac_cv_c_inline" >&6; } - - -case $ac_cv_c_inline in - inline | yes) ;; - *) - case $ac_cv_c_inline in - no) ac_val=;; - *) ac_val=$ac_cv_c_inline;; - esac - cat >>confdefs.h <<_ACEOF -#ifndef __cplusplus -#define inline $ac_val -#endif -_ACEOF - ;; -esac - -{ $as_echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5 -$as_echo_n "checking for struct stat.st_rdev... " >&6; } -if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static struct stat ac_aggr; -if (ac_aggr.st_rdev) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_member_struct_stat_st_rdev=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static struct stat ac_aggr; -if (sizeof ac_aggr.st_rdev) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_member_struct_stat_st_rdev=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_member_struct_stat_st_rdev=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5 -$as_echo "$ac_cv_member_struct_stat_st_rdev" >&6; } -if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_RDEV 1 -_ACEOF - - -fi - -{ $as_echo "$as_me:$LINENO: checking for off_t" >&5 -$as_echo_n "checking for off_t... " >&6; } -if test "${ac_cv_type_off_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_type_off_t=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if (sizeof (off_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if (sizeof ((off_t))) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_off_t=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 -$as_echo "$ac_cv_type_off_t" >&6; } -if test "x$ac_cv_type_off_t" = x""yes; then - : -else - -cat >>confdefs.h <<_ACEOF -#define off_t long int -_ACEOF - -fi - -{ $as_echo "$as_me:$LINENO: checking for pid_t" >&5 -$as_echo_n "checking for pid_t... " >&6; } -if test "${ac_cv_type_pid_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_type_pid_t=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if (sizeof (pid_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if (sizeof ((pid_t))) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_pid_t=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 -$as_echo "$ac_cv_type_pid_t" >&6; } -if test "x$ac_cv_type_pid_t" = x""yes; then - : -else - -cat >>confdefs.h <<_ACEOF -#define pid_t int -_ACEOF - -fi - -{ $as_echo "$as_me:$LINENO: checking return type of signal handlers" >&5 -$as_echo_n "checking return type of signal handlers... " >&6; } -if test "${ac_cv_type_signal+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include - -int -main () -{ -return *(signal (0, 0)) (0) == 1; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_type_signal=int -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_signal=void -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 -$as_echo "$ac_cv_type_signal" >&6; } - -cat >>confdefs.h <<_ACEOF -#define RETSIGTYPE $ac_cv_type_signal -_ACEOF - - -{ $as_echo "$as_me:$LINENO: checking for size_t" >&5 -$as_echo_n "checking for size_t... " >&6; } -if test "${ac_cv_type_size_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_type_size_t=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if (sizeof (size_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if (sizeof ((size_t))) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_size_t=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -$as_echo "$ac_cv_type_size_t" >&6; } -if test "x$ac_cv_type_size_t" = x""yes; then - : -else - -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int -_ACEOF - -fi - -{ $as_echo "$as_me:$LINENO: checking for mode_t" >&5 -$as_echo_n "checking for mode_t... " >&6; } -if test "${ac_cv_type_mode_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_type_mode_t=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if (sizeof (mode_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if (sizeof ((mode_t))) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_mode_t=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 -$as_echo "$ac_cv_type_mode_t" >&6; } -if test "x$ac_cv_type_mode_t" = x""yes; then - : -else - -cat >>confdefs.h <<_ACEOF -#define mode_t int -_ACEOF - -fi - - - { $as_echo "$as_me:$LINENO: checking for int8_t" >&5 -$as_echo_n "checking for int8_t... " >&6; } -if test "${ac_cv_c_int8_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_c_int8_t=no - for ac_type in 'int8_t' 'int' 'long int' \ - 'long long int' 'short int' 'signed char'; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (8 - 2)) - 1) * 2 + 1))]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (8 - 2)) - 1) * 2 + 1) - < ($ac_type) (((($ac_type) 1 << (8 - 2)) - 1) * 2 + 2))]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - case $ac_type in - int8_t) ac_cv_c_int8_t=yes ;; - *) ac_cv_c_int8_t=$ac_type ;; -esac - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_int8_t" != no && break - done -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_int8_t" >&5 -$as_echo "$ac_cv_c_int8_t" >&6; } - case $ac_cv_c_int8_t in #( - no|yes) ;; #( - *) - -cat >>confdefs.h <<_ACEOF -#define int8_t $ac_cv_c_int8_t -_ACEOF -;; - esac - - - { $as_echo "$as_me:$LINENO: checking for int16_t" >&5 -$as_echo_n "checking for int16_t... " >&6; } -if test "${ac_cv_c_int16_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_c_int16_t=no - for ac_type in 'int16_t' 'int' 'long int' \ - 'long long int' 'short int' 'signed char'; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (16 - 2)) - 1) * 2 + 1))]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (16 - 2)) - 1) * 2 + 1) - < ($ac_type) (((($ac_type) 1 << (16 - 2)) - 1) * 2 + 2))]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - case $ac_type in - int16_t) ac_cv_c_int16_t=yes ;; - *) ac_cv_c_int16_t=$ac_type ;; -esac - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_int16_t" != no && break - done -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_int16_t" >&5 -$as_echo "$ac_cv_c_int16_t" >&6; } - case $ac_cv_c_int16_t in #( - no|yes) ;; #( - *) - -cat >>confdefs.h <<_ACEOF -#define int16_t $ac_cv_c_int16_t -_ACEOF -;; - esac - - - { $as_echo "$as_me:$LINENO: checking for int32_t" >&5 -$as_echo_n "checking for int32_t... " >&6; } -if test "${ac_cv_c_int32_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_c_int32_t=no - for ac_type in 'int32_t' 'int' 'long int' \ - 'long long int' 'short int' 'signed char'; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1) - < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - case $ac_type in - int32_t) ac_cv_c_int32_t=yes ;; - *) ac_cv_c_int32_t=$ac_type ;; -esac - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_int32_t" != no && break - done -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5 -$as_echo "$ac_cv_c_int32_t" >&6; } - case $ac_cv_c_int32_t in #( - no|yes) ;; #( - *) - -cat >>confdefs.h <<_ACEOF -#define int32_t $ac_cv_c_int32_t -_ACEOF -;; - esac - - - { $as_echo "$as_me:$LINENO: checking for int64_t" >&5 -$as_echo_n "checking for int64_t... " >&6; } -if test "${ac_cv_c_int64_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_c_int64_t=no - for ac_type in 'int64_t' 'int' 'long int' \ - 'long long int' 'short int' 'signed char'; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1) - < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - case $ac_type in - int64_t) ac_cv_c_int64_t=yes ;; - *) ac_cv_c_int64_t=$ac_type ;; -esac - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_int64_t" != no && break - done -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5 -$as_echo "$ac_cv_c_int64_t" >&6; } - case $ac_cv_c_int64_t in #( - no|yes) ;; #( - *) - -cat >>confdefs.h <<_ACEOF -#define int64_t $ac_cv_c_int64_t -_ACEOF -;; - esac - -{ $as_echo "$as_me:$LINENO: checking for ssize_t" >&5 -$as_echo_n "checking for ssize_t... " >&6; } -if test "${ac_cv_type_ssize_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_type_ssize_t=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if (sizeof (ssize_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if (sizeof ((ssize_t))) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_ssize_t=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 -$as_echo "$ac_cv_type_ssize_t" >&6; } -if test "x$ac_cv_type_ssize_t" = x""yes; then - : -else - -cat >>confdefs.h <<_ACEOF -#define ssize_t int -_ACEOF - -fi - -{ $as_echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 -$as_echo_n "checking for uid_t in sys/types.h... " >&6; } -if test "${ac_cv_type_uid_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "uid_t" >/dev/null 2>&1; then - ac_cv_type_uid_t=yes -else - ac_cv_type_uid_t=no -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 -$as_echo "$ac_cv_type_uid_t" >&6; } -if test $ac_cv_type_uid_t = no; then - -cat >>confdefs.h <<\_ACEOF -#define uid_t int -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define gid_t int -_ACEOF - -fi - - - { $as_echo "$as_me:$LINENO: checking for uint8_t" >&5 -$as_echo_n "checking for uint8_t... " >&6; } -if test "${ac_cv_c_uint8_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_c_uint8_t=no - for ac_type in 'uint8_t' 'unsigned int' 'unsigned long int' \ - 'unsigned long long int' 'unsigned short int' 'unsigned char'; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(($ac_type) -1 >> (8 - 1) == 1)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - case $ac_type in - uint8_t) ac_cv_c_uint8_t=yes ;; - *) ac_cv_c_uint8_t=$ac_type ;; -esac - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_uint8_t" != no && break - done -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_uint8_t" >&5 -$as_echo "$ac_cv_c_uint8_t" >&6; } - case $ac_cv_c_uint8_t in #( - no|yes) ;; #( - *) - -cat >>confdefs.h <<\_ACEOF -#define _UINT8_T 1 -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define uint8_t $ac_cv_c_uint8_t -_ACEOF -;; - esac - - - { $as_echo "$as_me:$LINENO: checking for uint16_t" >&5 -$as_echo_n "checking for uint16_t... " >&6; } -if test "${ac_cv_c_uint16_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_c_uint16_t=no - for ac_type in 'uint16_t' 'unsigned int' 'unsigned long int' \ - 'unsigned long long int' 'unsigned short int' 'unsigned char'; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(($ac_type) -1 >> (16 - 1) == 1)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - case $ac_type in - uint16_t) ac_cv_c_uint16_t=yes ;; - *) ac_cv_c_uint16_t=$ac_type ;; -esac - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_uint16_t" != no && break - done -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_uint16_t" >&5 -$as_echo "$ac_cv_c_uint16_t" >&6; } - case $ac_cv_c_uint16_t in #( - no|yes) ;; #( - *) - - -cat >>confdefs.h <<_ACEOF -#define uint16_t $ac_cv_c_uint16_t -_ACEOF -;; - esac - - - { $as_echo "$as_me:$LINENO: checking for uint32_t" >&5 -$as_echo_n "checking for uint32_t... " >&6; } -if test "${ac_cv_c_uint32_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_c_uint32_t=no - for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \ - 'unsigned long long int' 'unsigned short int' 'unsigned char'; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - case $ac_type in - uint32_t) ac_cv_c_uint32_t=yes ;; - *) ac_cv_c_uint32_t=$ac_type ;; -esac - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_uint32_t" != no && break - done -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5 -$as_echo "$ac_cv_c_uint32_t" >&6; } - case $ac_cv_c_uint32_t in #( - no|yes) ;; #( - *) - -cat >>confdefs.h <<\_ACEOF -#define _UINT32_T 1 -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define uint32_t $ac_cv_c_uint32_t -_ACEOF -;; - esac - - - { $as_echo "$as_me:$LINENO: checking for uint64_t" >&5 -$as_echo_n "checking for uint64_t... " >&6; } -if test "${ac_cv_c_uint64_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_c_uint64_t=no - for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \ - 'unsigned long long int' 'unsigned short int' 'unsigned char'; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - case $ac_type in - uint64_t) ac_cv_c_uint64_t=yes ;; - *) ac_cv_c_uint64_t=$ac_type ;; -esac - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_uint64_t" != no && break - done -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5 -$as_echo "$ac_cv_c_uint64_t" >&6; } - case $ac_cv_c_uint64_t in #( - no|yes) ;; #( - *) - -cat >>confdefs.h <<\_ACEOF -#define _UINT64_T 1 -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define uint64_t $ac_cv_c_uint64_t -_ACEOF -;; - esac - -{ $as_echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5 -$as_echo_n "checking for struct stat.st_rdev... " >&6; } -if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static struct stat ac_aggr; -if (ac_aggr.st_rdev) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_member_struct_stat_st_rdev=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static struct stat ac_aggr; -if (sizeof ac_aggr.st_rdev) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_member_struct_stat_st_rdev=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_member_struct_stat_st_rdev=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5 -$as_echo "$ac_cv_member_struct_stat_st_rdev" >&6; } -if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_RDEV 1 -_ACEOF - - -fi - -{ $as_echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 -$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } -if test "${ac_cv_struct_tm+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include - -int -main () -{ -struct tm tm; - int *p = &tm.tm_sec; - return !p; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_struct_tm=time.h -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_struct_tm=sys/time.h -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 -$as_echo "$ac_cv_struct_tm" >&6; } -if test $ac_cv_struct_tm = sys/time.h; then - -cat >>confdefs.h <<\_ACEOF -#define TM_IN_SYS_TIME 1 -_ACEOF - -fi - - -################################################################################ - - - - - - - - - - - - - - - - - - - - - - - - -for ac_func in ftruncate gethostname getpagesize \ - gettimeofday memset mkdir mkfifo rmdir munmap nl_langinfo setenv setlocale \ - strcasecmp strchr strcspn strspn strdup strncasecmp strerror strrchr \ - strstr strtol strtoul uname -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -else - { { $as_echo "$as_me:$LINENO: error: bailing out" >&5 -$as_echo "$as_me: error: bailing out" >&2;} - { (exit 1); exit 1; }; } -fi -done - - -for ac_func in siginterrupt -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - -# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works -# for constant arguments. Useless! -{ $as_echo "$as_me:$LINENO: checking for working alloca.h" >&5 -$as_echo_n "checking for working alloca.h... " >&6; } -if test "${ac_cv_working_alloca_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -char *p = (char *) alloca (2 * sizeof (int)); - if (p) return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_working_alloca_h=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_working_alloca_h=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 -$as_echo "$ac_cv_working_alloca_h" >&6; } -if test $ac_cv_working_alloca_h = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_ALLOCA_H 1 -_ACEOF - -fi - -{ $as_echo "$as_me:$LINENO: checking for alloca" >&5 -$as_echo_n "checking for alloca... " >&6; } -if test "${ac_cv_func_alloca_works+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __GNUC__ -# define alloca __builtin_alloca -#else -# ifdef _MSC_VER -# include -# define alloca _alloca -# else -# ifdef HAVE_ALLOCA_H -# include -# else -# ifdef _AIX - #pragma alloca -# else -# ifndef alloca /* predefined by HP cc +Olibcalls */ -char *alloca (); -# endif -# endif -# endif -# endif -#endif - -int -main () -{ -char *p = (char *) alloca (1); - if (p) return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_alloca_works=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_alloca_works=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 -$as_echo "$ac_cv_func_alloca_works" >&6; } - -if test $ac_cv_func_alloca_works = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_ALLOCA 1 -_ACEOF - -else - # The SVR3 libPW and SVR4 libucb both contain incompatible functions -# that cause trouble. Some versions do not even contain alloca or -# contain a buggy version. If you still want to use their alloca, -# use ar to extract alloca.o from them instead of compiling alloca.c. - -ALLOCA=\${LIBOBJDIR}alloca.$ac_objext - -cat >>confdefs.h <<\_ACEOF -#define C_ALLOCA 1 -_ACEOF - - -{ $as_echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 -$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } -if test "${ac_cv_os_cray+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#if defined CRAY && ! defined CRAY2 -webecray -#else -wenotbecray -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "webecray" >/dev/null 2>&1; then - ac_cv_os_cray=yes -else - ac_cv_os_cray=no -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 -$as_echo "$ac_cv_os_cray" >&6; } -if test $ac_cv_os_cray = yes; then - for ac_func in _getb67 GETB67 getb67; do - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif int main () { -return $ac_func (); +return $2 (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" + eval "$3=no" fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} -cat >>confdefs.h <<_ACEOF -#define CRAY_STACKSEG_END $ac_func -_ACEOF +} # ac_fn_c_check_func +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. - break -fi +It was created by $as_me, which was +generated by GNU Autoconf 2.66. Invocation command line was - done -fi + $ $0 $@ -{ $as_echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 -$as_echo_n "checking stack direction for C alloca... " >&6; } -if test "${ac_cv_c_stack_direction+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_c_stack_direction=0 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -find_stack_direction () +exec 5>>config.log { - static char *addr = 0; - auto char dummy; - if (addr == 0) - { - addr = &dummy; - return find_stack_direction (); - } - else - return (&dummy > addr) ? 1 : -1; -} +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## -int -main () -{ - return find_stack_direction () < 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_c_stack_direction=1 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` -( exit $ac_status ) -ac_cv_c_stack_direction=-1 -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 -$as_echo "$ac_cv_c_stack_direction" >&6; } +_ASUNAME -cat >>confdefs.h <<_ACEOF -#define STACK_DIRECTION $ac_cv_c_stack_direction -_ACEOF +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS +} >&5 -fi +cat >&5 <<_ACEOF -{ $as_echo "$as_me:$LINENO: checking whether closedir returns void" >&5 -$as_echo_n "checking whether closedir returns void... " >&6; } -if test "${ac_cv_func_closedir_void+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_func_closedir_void=yes -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header_dirent> -#ifndef __cplusplus -int closedir (); -#endif -int -main () -{ -return closedir (opendir (".")) != 0; - ; - return 0; -} +## ----------- ## +## Core tests. ## +## ----------- ## + _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_closedir_void=no -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -ac_cv_func_closedir_void=yes -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + $as_echo "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + $as_echo "## ----------------- ## +## Output variables. ## +## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + $as_echo "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_closedir_void" >&5 -$as_echo "$ac_cv_func_closedir_void" >&6; } -if test $ac_cv_func_closedir_void = yes; then + if test -s confdefs.h; then + $as_echo "## ----------- ## +## confdefs.h. ## +## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 -cat >>confdefs.h <<\_ACEOF -#define CLOSEDIR_VOID 1 -_ACEOF +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h -fi +$as_echo "/* confdefs.h */" > confdefs.h +# Predefined preprocessor variables. -for ac_header in unistd.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no -fi +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site else - eval "$as_ac_Header=\$ac_header_preproc" + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } + fi +done +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +as_fn_append ac_header_list " stdlib.h" +as_fn_append ac_header_list " unistd.h" +as_fn_append ac_header_list " sys/param.h" +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## -done +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking for working chown" >&5 -$as_echo_n "checking for working chown... " >&6; } -if test "${ac_cv_func_chown_works+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_func_chown_works=no -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -int -main () -{ - char *f = "conftest.chown"; - struct stat before, after; - if (creat (f, 0600) < 0) - return 1; - if (stat (f, &before) < 0) - return 1; - if (chown (f, (uid_t) -1, (gid_t) -1) == -1) - return 1; - if (stat (f, &after) < 0) - return 1; - return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid); +ac_config_headers="$ac_config_headers lib/misc/configure.h" - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_chown_works=yes -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -ac_cv_func_chown_works=no -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +################################################################################ +ac_aux_dir= +for ac_dir in autoconf "$srcdir"/autoconf; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in autoconf \"$srcdir\"/autoconf" "$LINENO" 5 fi +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + -rm -f conftest.chown -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_chown_works" >&5 -$as_echo "$ac_cv_func_chown_works" >&6; } -if test $ac_cv_func_chown_works = yes; then +################################################################################ +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 -cat >>confdefs.h <<\_ACEOF -#define HAVE_CHOWN 1 -_ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if test "${ac_cv_build+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -for ac_header in vfork.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if test "${ac_cv_host+set}" = set; then : $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 +$as_echo_n "checking target system type... " >&6; } +if test "${ac_cv_target+set}" = set; then : $as_echo_n "(cached) " >&6 else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - + if test "x$target_alias" = x; then + ac_cv_target=$ac_cv_host +else + ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 +$as_echo "$ac_cv_target" >&6; } +case $ac_cv_target in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; +esac +target=$ac_cv_target +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_target +shift +target_cpu=$1 +target_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +target_os=$* +IFS=$ac_save_IFS +case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac -done +# The aliases save the names the user supplied, while $host etc. +# will get canonicalized. +test -n "$target_alias" && + test "$program_prefix$program_suffix$program_transform_name" = \ + NONENONEs,x,x, && + program_prefix=${target_alias}- +case "$host_os" in + linux*) + CFLAGS="$CFLAGS" + COPTIMISE_FLAG="-O2" + CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym" + CLDWHOLEARCHIVE="-Wl,-whole-archive" + CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive" + LDDEPS="$LDDEPS .export.sym" + LDFLAGS="$LDFLAGS -Wl,--export-dynamic" + LIB_SUFFIX=so + DEVMAPPER=yes + ODIRECT=yes + DM_IOCTLS=yes + SELINUX=yes + CLUSTER=internal + FSADM=yes + ;; + darwin*) + CFLAGS="$CFLAGS -no-cpp-precomp -fno-common" + COPTIMISE_FLAG="-O2" + CLDFLAGS="$CLDFLAGS" + CLDWHOLEARCHIVE="-all_load" + CLDNOWHOLEARCHIVE= + LIB_SUFFIX=dylib + DEVMAPPER=yes + ODIRECT=no + DM_IOCTLS=no + SELINUX=no + CLUSTER=none + FSADM=no + ;; +esac -for ac_func in fork vfork -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +################################################################################ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if test "${ac_cv_path_SED+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext + $ac_path_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF fi -done +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed -if test "x$ac_cv_func_fork" = xyes; then - { $as_echo "$as_me:$LINENO: checking for working fork" >&5 -$as_echo_n "checking for working fork... " >&6; } -if test "${ac_cv_func_fork_works+set}" = set; then +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_AWK+set}" = set; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then - ac_cv_func_fork_works=cross -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ - - /* By Ruediger Kuhlmann. */ - return fork () < 0; - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_fork_works=yes + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -( exit $ac_status ) -ac_cv_func_fork_works=no -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5 -$as_echo "$ac_cv_func_fork_works" >&6; } - +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } else - ac_cv_func_fork_works=$ac_cv_func_fork -fi -if test "x$ac_cv_func_fork_works" = xcross; then - case $host in - *-*-amigaos* | *-*-msdosdjgpp*) - # Override, as these systems have only a dummy fork() stub - ac_cv_func_fork_works=no - ;; - *) - ac_cv_func_fork_works=yes - ;; - esac - { $as_echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 -$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -ac_cv_func_vfork_works=$ac_cv_func_vfork -if test "x$ac_cv_func_vfork" = xyes; then - { $as_echo "$as_me:$LINENO: checking for working vfork" >&5 -$as_echo_n "checking for working vfork... " >&6; } -if test "${ac_cv_func_vfork_works+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_func_vfork_works=cross -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Thanks to Paul Eggert for this test. */ -$ac_includes_default -#include -#ifdef HAVE_VFORK_H -# include -#endif -/* On some sparc systems, changes by the child to local and incoming - argument registers are propagated back to the parent. The compiler - is told about this with #include , but some compilers - (e.g. gcc -O) don't grok . Test for this by using a - static variable whose address is put into a register that is - clobbered by the vfork. */ -static void -#ifdef __cplusplus -sparc_address_test (int arg) -# else -sparc_address_test (arg) int arg; -#endif -{ - static pid_t child; - if (!child) { - child = vfork (); - if (child < 0) { - perror ("vfork"); - _exit(2); - } - if (!child) { - arg = getpid(); - write(-1, "", 0); - _exit (arg); - } - } -} - -int -main () -{ - pid_t parent = getpid (); - pid_t child; - - sparc_address_test (0); - - child = vfork (); - - if (child == 0) { - /* Here is another test for sparc vfork register problems. This - test uses lots of local variables, at least as many local - variables as main has allocated so far including compiler - temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris - 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should - reuse the register of parent for one of the local variables, - since it will think that parent can't possibly be used any more - in this routine. Assigning to the local variable will thus - munge parent in the parent process. */ - pid_t - p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), - p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); - /* Convince the compiler that p..p7 are live; otherwise, it might - use the same hardware register for all 8 local variables. */ - if (p != p1 || p != p2 || p != p3 || p != p4 - || p != p5 || p != p6 || p != p7) - _exit(1); - - /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent - from child file descriptors. If the child closes a descriptor - before it execs or exits, this munges the parent's descriptor - as well. Test for this by closing stdout in the child. */ - _exit(close(fileno(stdout)) != 0); - } else { - int status; - struct stat st; - - while (wait(&status) != child) - ; - return ( - /* Was there some problem with vforking? */ - child < 0 - /* Did the child fail? (This shouldn't happen.) */ - || status - /* Did the vfork/compiler bug occur? */ - || parent != getpid() + test -n "$AWK" && break +done - /* Did the file descriptor bug occur? */ - || fstat(fileno(stdout), &st) != 0 - ); - } -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_vfork_works=yes +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_func_vfork_works=no -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5 -$as_echo "$ac_cv_func_vfork_works" >&6; } - -fi; -if test "x$ac_cv_func_fork_works" = xcross; then - ac_cv_func_vfork_works=$ac_cv_func_vfork - { $as_echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 -$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} fi - -if test "x$ac_cv_func_vfork_works" = xyes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_WORKING_VFORK 1 -_ACEOF - +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - -cat >>confdefs.h <<\_ACEOF -#define vfork fork -_ACEOF - + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -if test "x$ac_cv_func_fork_works" = xyes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_WORKING_FORK 1 -_ACEOF fi - -{ $as_echo "$as_me:$LINENO: checking whether lstat dereferences a symlink specified with a trailing slash" >&5 -$as_echo_n "checking whether lstat dereferences a symlink specified with a trailing slash... " >&6; } -if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else - rm -f conftest.sym conftest.file -echo >conftest.file -if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then - if test "$cross_compiling" = yes; then - ac_cv_func_lstat_dereferences_slashed_symlink=no -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -struct stat sbuf; - /* Linux will dereference the symlink and fail. - That is better in the sense that it means we will not - have to compile and use the lstat wrapper. */ - return lstat ("conftest.sym/", &sbuf) == 0; - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_lstat_dereferences_slashed_symlink=yes + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -( exit $ac_status ) -ac_cv_func_lstat_dereferences_slashed_symlink=no fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - # If the `ln -s' command failed, then we probably don't even - # have an lstat function. - ac_cv_func_lstat_dereferences_slashed_symlink=no -fi -rm -f conftest.sym conftest.file - + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 -$as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } - -test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && - -cat >>confdefs.h <<_ACEOF -#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 -_ACEOF - -if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then - case " $LIBOBJS " in - *" lstat.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS lstat.$ac_objext" - ;; + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; esac - + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" fi -{ $as_echo "$as_me:$LINENO: checking whether lstat accepts an empty string" >&5 -$as_echo_n "checking whether lstat accepts an empty string... " >&6; } -if test "${ac_cv_func_lstat_empty_string_bug+set}" = set; then +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then - ac_cv_func_lstat_empty_string_bug=yes -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -struct stat sbuf; - return lstat ("", &sbuf) == 0; - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_lstat_empty_string_bug=no + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -( exit $ac_status ) -ac_cv_func_lstat_empty_string_bug=yes fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_lstat_empty_string_bug" >&5 -$as_echo "$ac_cv_func_lstat_empty_string_bug" >&6; } -if test $ac_cv_func_lstat_empty_string_bug = yes; then - case " $LIBOBJS " in - *" lstat.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS lstat.$ac_objext" - ;; -esac -cat >>confdefs.h <<_ACEOF -#define HAVE_LSTAT_EMPTY_STRING_BUG 1 -_ACEOF + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -for ac_header in stdlib.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - ac_header_compiler=no +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - ac_header_preproc=no +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + test -n "$ac_ct_CC" && break +done - ;; + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" + CC=$ac_ct_CC + fi fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF -fi +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } done -{ $as_echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5 -$as_echo_n "checking for GNU libc compatible malloc... " >&6; } -if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_func_malloc_0_nonnull=no -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#if defined STDC_HEADERS || defined HAVE_STDLIB_H -# include -#else -char *malloc (); -#endif int main () { -return ! malloc (0); + ; return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_malloc_0_nonnull=yes + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + else - $as_echo "$as_me: program exited with status $ac_status" >&5 + ac_file='' +fi +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -ac_cv_func_malloc_0_nonnull=no -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5 -$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } -if test $ac_cv_func_malloc_0_nonnull = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_MALLOC 1 -_ACEOF - +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } else - cat >>confdefs.h <<\_ACEOF -#define HAVE_MALLOC 0 -_ACEOF - - case " $LIBOBJS " in - *" malloc.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS malloc.$ac_objext" - ;; -esac - - -cat >>confdefs.h <<\_ACEOF -#define malloc rpl_malloc -_ACEOF - + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +ac_exeext=$ac_cv_exeext - - -{ $as_echo "$as_me:$LINENO: checking for working memcmp" >&5 -$as_echo_n "checking for working memcmp... " >&6; } -if test "${ac_cv_func_memcmp_working+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_func_memcmp_working=no +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ - - /* Some versions of memcmp are not 8-bit clean. */ - char c0 = '\100', c1 = '\200', c2 = '\201'; - if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) - return 1; + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } - /* The Next x86 OpenStep bug shows up only when comparing 16 bytes - or more and with at least one buffer not starting on a 4-byte boundary. - William Lewis provided this test program. */ - { - char foo[21]; - char bar[21]; - int i; - for (i = 0; i < 4; i++) - { - char *a = foo + i; - char *b = bar + i; - strcpy (a, "--------01111111"); - strcpy (b, "--------10000000"); - if (memcmp (a, b, 16) >= 0) - return 1; - } - return 0; - } +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_memcmp_working=yes -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_func_memcmp_working=no -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 -$as_echo "$ac_cv_func_memcmp_working" >&6; } -test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in - *" memcmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" - ;; -esac - - - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } -for ac_header in stdlib.h unistd.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if test "${ac_cv_objext+set}" = set; then : $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> + +int +main () +{ + + ; + return 0; +} _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f conftest.o conftest.obj +if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest.$ac_cv_objext conftest.$ac_ext fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +int +main () +{ +#ifndef __GNUC__ + choke me +#endif -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> + ; + return 0; +} _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no + ac_compiler_gnu=no fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes else - eval "$as_ac_Header=\$ac_header_preproc" + GCC= fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +int +main () +{ -fi + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -done +int +main () +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : -for ac_func in getpagesize -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ +int +main () +{ -#ifdef __STDC__ -# include -#else -# include -#endif + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} -#undef $ac_func +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; int main () { -return $ac_func (); +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : fi -done - -{ $as_echo "$as_me:$LINENO: checking for working mmap" >&5 -$as_echo_n "checking for working mmap... " >&6; } -if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_func_mmap_fixed_mapped=no -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -/* malloc might have been renamed as rpl_malloc. */ -#undef malloc -/* Thanks to Mike Haertel and Jim Avera for this test. - Here is a matrix of mmap possibilities: - mmap private not fixed - mmap private fixed at somewhere currently unmapped - mmap private fixed at somewhere already mapped - mmap shared not fixed - mmap shared fixed at somewhere currently unmapped - mmap shared fixed at somewhere already mapped - For private mappings, we should verify that changes cannot be read() - back from the file, nor mmap's back from the file at a different - address. (There have been systems where private was not correctly - implemented like the infamous i386 svr4.0, and systems where the - VM page cache was not coherent with the file system buffer cache - like early versions of FreeBSD and possibly contemporary NetBSD.) - For shared mappings, we should conversely verify that changes get - propagated back to all the places they're supposed to be. +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu - Grep wants private fixed already mapped. - The main things grep needs to know about mmap are: - * does it exist and is it safe to write into the mmap'd area - * how to use it (BSD variants) */ -#include -#include -#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H -char *malloc (); +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include #endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : -/* This mess was copied from the GNU getpagesize.h. */ -#ifndef HAVE_GETPAGESIZE -/* Assume that all systems that can run configure have sys/param.h. */ -# ifndef HAVE_SYS_PARAM_H -# define HAVE_SYS_PARAM_H 1 -# endif - -# ifdef _SC_PAGESIZE -# define getpagesize() sysconf(_SC_PAGESIZE) -# else /* no _SC_PAGESIZE */ -# ifdef HAVE_SYS_PARAM_H -# include -# ifdef EXEC_PAGESIZE -# define getpagesize() EXEC_PAGESIZE -# else /* no EXEC_PAGESIZE */ -# ifdef NBPG -# define getpagesize() NBPG * CLSIZE -# ifndef CLSIZE -# define CLSIZE 1 -# endif /* no CLSIZE */ -# else /* no NBPG */ -# ifdef NBPC -# define getpagesize() NBPC -# else /* no NBPC */ -# ifdef PAGESIZE -# define getpagesize() PAGESIZE -# endif /* PAGESIZE */ -# endif /* no NBPC */ -# endif /* no NBPG */ -# endif /* no EXEC_PAGESIZE */ -# else /* no HAVE_SYS_PARAM_H */ -# define getpagesize() 8192 /* punt totally */ -# endif /* no HAVE_SYS_PARAM_H */ -# endif /* no _SC_PAGESIZE */ - -#endif /* no HAVE_GETPAGESIZE */ - -int -main () -{ - char *data, *data2, *data3; - int i, pagesize; - int fd; +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext - pagesize = getpagesize (); + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext - /* First, make a file with some known garbage in it. */ - data = (char *) malloc (pagesize); - if (!data) - return 1; - for (i = 0; i < pagesize; ++i) - *(data + i) = rand (); - umask (0); - fd = creat ("conftest.mmap", 0600); - if (fd < 0) - return 1; - if (write (fd, data, pagesize) != pagesize) - return 1; - close (fd); +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi - /* Next, try to mmap the file at a fixed address which already has - something else allocated at it. If we can, also make sure that - we see the same garbage. */ - fd = open ("conftest.mmap", O_RDWR); - if (fd < 0) - return 1; - data2 = (char *) malloc (2 * pagesize); - if (!data2) - return 1; - data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1); - if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_FIXED, fd, 0L)) - return 1; - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data2 + i)) - return 1; + done + ac_cv_prog_CPP=$CPP - /* Finally, make sure that changes to the mapped area do not - percolate back to the file as seen by read(). (This is a bug on - some variants of i386 svr4.0.) */ - for (i = 0; i < pagesize; ++i) - *(data2 + i) = *(data2 + i) + 1; - data3 = (char *) malloc (pagesize); - if (!data3) - return 1; - if (read (fd, data3, pagesize) != pagesize) - return 1; - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data3 + i)) - return 1; - close (fd); - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_mmap_fixed_mapped=yes +fi + CPP=$ac_cv_prog_CPP else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : -( exit $ac_status ) -ac_cv_func_mmap_fixed_mapped=no +else + # Broken: fails on valid input. +continue fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break fi +rm -f conftest.err conftest.$ac_ext +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5 -$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } -if test $ac_cv_func_mmap_fixed_mapped = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_MMAP 1 -_ACEOF +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if test "${ac_cv_path_GREP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi fi -rm -f conftest.mmap +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" -for ac_header in stdlib.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then : $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_path_EGREP=$EGREP +fi - ac_header_compiler=no + fi fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if test $ac_cv_c_compiler_gnu = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 +$as_echo_n "checking whether $CC needs -traditional... " >&6; } +if test "${ac_cv_prog_gcc_traditional+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_pattern="Autoconf.*'x'" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include <$ac_header> +#include +Autoconf TIOCGETP _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "$ac_pattern" >/dev/null 2>&1; then : + ac_cv_prog_gcc_traditional=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no + ac_cv_prog_gcc_traditional=no fi +rm -f conftest* -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + if test $ac_cv_prog_gcc_traditional = no; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +Autoconf TCGETA +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "$ac_pattern" >/dev/null 2>&1; then : + ac_cv_prog_gcc_traditional=yes +fi +rm -f conftest* + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5 +$as_echo "$ac_cv_prog_gcc_traditional" >&6; } + if test $ac_cv_prog_gcc_traditional = yes; then + CC="$CC -traditional" + fi +fi +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done ;; esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done -{ $as_echo "$as_me:$LINENO: checking for GNU libc compatible realloc" >&5 -$as_echo_n "checking for GNU libc compatible realloc... " >&6; } -if test "${ac_cv_func_realloc_0_nonnull+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_func_realloc_0_nonnull=no -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#if defined STDC_HEADERS || defined HAVE_STDLIB_H -# include -#else -char *realloc (); -#endif + done +IFS=$as_save_IFS -int -main () -{ -return ! realloc (0, 0); - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_realloc_0_nonnull=yes -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +rm -rf conftest.one conftest.two conftest.dir -( exit $ac_status ) -ac_cv_func_realloc_0_nonnull=no fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_realloc_0_nonnull" >&5 -$as_echo "$ac_cv_func_realloc_0_nonnull" >&6; } -if test $ac_cv_func_realloc_0_nonnull = yes; then +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' -cat >>confdefs.h <<\_ACEOF -#define HAVE_REALLOC 1 -_ACEOF +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - cat >>confdefs.h <<\_ACEOF -#define HAVE_REALLOC 0 -_ACEOF - - case " $LIBOBJS " in - *" realloc.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS realloc.$ac_objext" - ;; -esac - - -cat >>confdefs.h <<\_ACEOF -#define realloc rpl_realloc -_ACEOF - + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } fi - - -{ $as_echo "$as_me:$LINENO: checking whether stat accepts an empty string" >&5 -$as_echo_n "checking whether stat accepts an empty string... " >&6; } -if test "${ac_cv_func_stat_empty_string_bug+set}" = set; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then - ac_cv_func_stat_empty_string_bug=yes -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -struct stat sbuf; - return stat ("", &sbuf) == 0; - ; - return 0; -} + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_stat_empty_string_bug=no -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_func_stat_empty_string_bug=yes +rm -f conftest.make fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if test "${ac_cv_path_mkdir+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_stat_empty_string_bug" >&5 -$as_echo "$ac_cv_func_stat_empty_string_bug" >&6; } -if test $ac_cv_func_stat_empty_string_bug = yes; then - case " $LIBOBJS " in - *" stat.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS stat.$ac_objext" - ;; -esac - - -cat >>confdefs.h <<_ACEOF -#define HAVE_STAT_EMPTY_STRING_BUG 1 -_ACEOF + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" + fi fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } -{ $as_echo "$as_me:$LINENO: checking for working strtod" >&5 -$as_echo_n "checking for working strtod... " >&6; } -if test "${ac_cv_func_strtod+set}" = set; then +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then - ac_cv_func_strtod=no -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -$ac_includes_default -#ifndef strtod -double strtod (); -#endif -int -main() -{ - { - /* Some versions of Linux strtod mis-parse strings with leading '+'. */ - char *string = " +69"; - char *term; - double value; - value = strtod (string, &term); - if (value != 69 || term != (string + 4)) - return 1; - } - - { - /* Under Solaris 2.4, strtod returns the wrong value for the - terminating character under some conditions. */ - char *string = "NaN"; - char *term; - strtod (string, &term); - if (term != string && *(term - 1) == 0) - return 1; - } - return 0; -} - -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_strtod=yes + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -( exit $ac_status ) -ac_cv_func_strtod=no fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 -$as_echo "$ac_cv_func_strtod" >&6; } -if test $ac_cv_func_strtod = no; then - case " $LIBOBJS " in - *" strtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtod.$ac_objext" - ;; -esac - -{ $as_echo "$as_me:$LINENO: checking for pow" >&5 -$as_echo_n "checking for pow... " >&6; } -if test "${ac_cv_func_pow+set}" = set; then +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define pow to an innocuous variant, in case declares pow. - For example, HP-UX 11i declares gettimeofday. */ -#define pow innocuous_pow - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char pow (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef pow - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pow (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_pow || defined __stub___pow -choke me -#endif - -int -main () -{ -return pow (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_pow=yes + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - ac_cv_func_pow=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_pow" >&5 -$as_echo "$ac_cv_func_pow" >&6; } - -if test $ac_cv_func_pow = no; then - { $as_echo "$as_me:$LINENO: checking for pow in -lm" >&5 -$as_echo_n "checking for pow in -lm... " >&6; } -if test "${ac_cv_lib_m_pow+set}" = set; then - $as_echo_n "(cached) " >&6 +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pow (); -int -main () -{ -return pow (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_m_pow=yes + RANLIB=$ac_ct_RANLIB + fi else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_m_pow=no + RANLIB="$ac_cv_prog_RANLIB" fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_pow" >&5 -$as_echo "$ac_cv_lib_m_pow" >&6; } -if test "x$ac_cv_lib_m_pow" = x""yes; then - POW_LIB=-lm +# Extract the first word of "cflow", so it can be a program name with args. +set dummy cflow; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_CFLOW_CMD+set}" = set; then : + $as_echo_n "(cached) " >&6 else - { $as_echo "$as_me:$LINENO: WARNING: cannot find library containing definition of pow" >&5 -$as_echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;} -fi + case $CFLOW_CMD in + [\\/]* | ?:[\\/]*) + ac_cv_path_CFLOW_CMD="$CFLOW_CMD" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_CFLOW_CMD="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + ;; +esac fi - +CFLOW_CMD=$ac_cv_path_CFLOW_CMD +if test -n "$CFLOW_CMD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLOW_CMD" >&5 +$as_echo "$CFLOW_CMD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -for ac_func in vprintf -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +# Extract the first word of "cscope", so it can be a program name with args. +set dummy cscope; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_CSCOPE_CMD+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func + case $CSCOPE_CMD in + [\\/]* | ?:[\\/]*) + ac_cv_path_CSCOPE_CMD="$CSCOPE_CMD" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_CSCOPE_CMD="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ + ;; +esac +fi +CSCOPE_CMD=$ac_cv_path_CSCOPE_CMD +if test -n "$CSCOPE_CMD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CSCOPE_CMD" >&5 +$as_echo "$CSCOPE_CMD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -#ifdef __STDC__ -# include -#else -# include -#endif -#undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif +################################################################################ +ac_header_dirent=no +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do + as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 +$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } +if eval "test \"\${$as_ac_Header+set}\"" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include <$ac_hdr> int main () { -return $ac_func (); +if ((DIR *) 0) +return 0; ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_ac_Header=yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" + eval "$as_ac_Header=no" fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +eval ac_res=\$$as_ac_Header + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF -{ $as_echo "$as_me:$LINENO: checking for _doprnt" >&5 -$as_echo_n "checking for _doprnt... " >&6; } -if test "${ac_cv_func__doprnt+set}" = set; then +ac_header_dirent=$ac_hdr; break +fi + +done +# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. +if test $ac_header_dirent = dirent.h; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 +$as_echo_n "checking for library containing opendir... " >&6; } +if test "${ac_cv_search_opendir+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Define _doprnt to an innocuous variant, in case declares _doprnt. - For example, HP-UX 11i declares gettimeofday. */ -#define _doprnt innocuous__doprnt - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char _doprnt (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef _doprnt /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC @@ -10958,3332 +4445,2489 @@ #ifdef __cplusplus extern "C" #endif -char _doprnt (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub__doprnt || defined __stub____doprnt -choke me -#endif - +char opendir (); int main () { -return _doprnt (); +return opendir (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func__doprnt=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func__doprnt=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5 -$as_echo "$ac_cv_func__doprnt" >&6; } -if test "x$ac_cv_func__doprnt" = x""yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DOPRNT 1 -_ACEOF - +for ac_lib in '' dir; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_opendir=$ac_res fi - +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_opendir+set}" = set; then : + break fi done +if test "${ac_cv_search_opendir+set}" = set; then : - - -################################################################################ -{ $as_echo "$as_me:$LINENO: checking whether to use static linking" >&5 -$as_echo_n "checking whether to use static linking... " >&6; } -# Check whether --enable-static_link was given. -if test "${enable_static_link+set}" = set; then - enableval=$enable_static_link; STATIC_LINK=$enableval -else - STATIC_LINK=no -fi - -{ $as_echo "$as_me:$LINENO: result: $STATIC_LINK" >&5 -$as_echo "$STATIC_LINK" >&6; } - -################################################################################ - - -################################################################################ -{ $as_echo "$as_me:$LINENO: checking file owner" >&5 -$as_echo_n "checking file owner... " >&6; } - -# Check whether --with-user was given. -if test "${with_user+set}" = set; then - withval=$with_user; OWNER=$withval -fi - -{ $as_echo "$as_me:$LINENO: result: $OWNER" >&5 -$as_echo "$OWNER" >&6; } - -if test x$OWNER != x; then - INSTALL="$INSTALL -o $OWNER" -fi - -################################################################################ -{ $as_echo "$as_me:$LINENO: checking group owner" >&5 -$as_echo_n "checking group owner... " >&6; } - -# Check whether --with-group was given. -if test "${with_group+set}" = set; then - withval=$with_group; GROUP=$withval -fi - -{ $as_echo "$as_me:$LINENO: result: $GROUP" >&5 -$as_echo "$GROUP" >&6; } - -if test x$GROUP != x; then - INSTALL="$INSTALL -g $GROUP" -fi - -################################################################################ -{ $as_echo "$as_me:$LINENO: checking device node uid" >&5 -$as_echo_n "checking device node uid... " >&6; } - - -# Check whether --with-device-uid was given. -if test "${with_device_uid+set}" = set; then - withval=$with_device_uid; DM_DEVICE_UID=$withval -else - DM_DEVICE_UID=0 -fi - -{ $as_echo "$as_me:$LINENO: result: $DM_DEVICE_UID" >&5 -$as_echo "$DM_DEVICE_UID" >&6; } - -################################################################################ -{ $as_echo "$as_me:$LINENO: checking device node gid" >&5 -$as_echo_n "checking device node gid... " >&6; } - - -# Check whether --with-device-gid was given. -if test "${with_device_gid+set}" = set; then - withval=$with_device_gid; DM_DEVICE_GID=$withval -else - DM_DEVICE_GID=0 -fi - -{ $as_echo "$as_me:$LINENO: result: $DM_DEVICE_GID" >&5 -$as_echo "$DM_DEVICE_GID" >&6; } - -################################################################################ -{ $as_echo "$as_me:$LINENO: checking device node mode" >&5 -$as_echo_n "checking device node mode... " >&6; } - - -# Check whether --with-device-mode was given. -if test "${with_device_mode+set}" = set; then - withval=$with_device_mode; DM_DEVICE_MODE=$withval else - DM_DEVICE_MODE=0600 + ac_cv_search_opendir=no fi - -{ $as_echo "$as_me:$LINENO: result: $DM_DEVICE_MODE" >&5 -$as_echo "$DM_DEVICE_MODE" >&6; } - -################################################################################ -{ $as_echo "$as_me:$LINENO: checking whether to enable lvm1 fallback" >&5 -$as_echo_n "checking whether to enable lvm1 fallback... " >&6; } -# Check whether --enable-lvm1_fallback was given. -if test "${enable_lvm1_fallback+set}" = set; then - enableval=$enable_lvm1_fallback; LVM1_FALLBACK=$enableval -else - LVM1_FALLBACK=no +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS fi - -{ $as_echo "$as_me:$LINENO: result: $LVM1_FALLBACK" >&5 -$as_echo "$LVM1_FALLBACK" >&6; } - -if test x$LVM1_FALLBACK = xyes; then - -cat >>confdefs.h <<\_ACEOF -#define LVM1_FALLBACK 1 -_ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 +$as_echo "$ac_cv_search_opendir" >&6; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi -################################################################################ -{ $as_echo "$as_me:$LINENO: checking whether to include support for lvm1 metadata" >&5 -$as_echo_n "checking whether to include support for lvm1 metadata... " >&6; } - -# Check whether --with-lvm1 was given. -if test "${with_lvm1+set}" = set; then - withval=$with_lvm1; LVM1=$withval else - LVM1=internal -fi - -{ $as_echo "$as_me:$LINENO: result: $LVM1" >&5 -$as_echo "$LVM1" >&6; } - -if [ "x$LVM1" != xnone -a "x$LVM1" != xinternal -a "x$LVM1" != xshared ]; - then { { $as_echo "$as_me:$LINENO: error: --with-lvm1 parameter invalid -" >&5 -$as_echo "$as_me: error: --with-lvm1 parameter invalid -" >&2;} - { (exit 1); exit 1; }; } -fi; - -if test x$LVM1 = xinternal; then - -cat >>confdefs.h <<\_ACEOF -#define LVM1_INTERNAL 1 -_ACEOF - -fi - -################################################################################ -{ $as_echo "$as_me:$LINENO: checking whether to include support for GFS pool metadata" >&5 -$as_echo_n "checking whether to include support for GFS pool metadata... " >&6; } - -# Check whether --with-pool was given. -if test "${with_pool+set}" = set; then - withval=$with_pool; POOL=$withval + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 +$as_echo_n "checking for library containing opendir... " >&6; } +if test "${ac_cv_search_opendir+set}" = set; then : + $as_echo_n "(cached) " >&6 else - POOL=internal -fi - -{ $as_echo "$as_me:$LINENO: result: $POOL" >&5 -$as_echo "$POOL" >&6; } - -if [ "x$POOL" != xnone -a "x$POOL" != xinternal -a "x$POOL" != xshared ]; - then { { $as_echo "$as_me:$LINENO: error: --with-pool parameter invalid -" >&5 -$as_echo "$as_me: error: --with-pool parameter invalid -" >&2;} - { (exit 1); exit 1; }; } -fi; - -if test x$POOL = xinternal; then - -cat >>confdefs.h <<\_ACEOF -#define POOL_INTERNAL 1 -_ACEOF - -fi - -################################################################################ -{ $as_echo "$as_me:$LINENO: checking whether to include support for cluster locking" >&5 -$as_echo_n "checking whether to include support for cluster locking... " >&6; } - -# Check whether --with-cluster was given. -if test "${with_cluster+set}" = set; then - withval=$with_cluster; CLUSTER=$withval -fi - -{ $as_echo "$as_me:$LINENO: result: $CLUSTER" >&5 -$as_echo "$CLUSTER" >&6; } - -if [ "x$CLUSTER" != xnone -a "x$CLUSTER" != xinternal -a "x$CLUSTER" != xshared ]; - then { { $as_echo "$as_me:$LINENO: error: --with-cluster parameter invalid -" >&5 -$as_echo "$as_me: error: --with-cluster parameter invalid -" >&2;} - { (exit 1); exit 1; }; } -fi; - -if test x$CLUSTER = xinternal; then + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -cat >>confdefs.h <<\_ACEOF -#define CLUSTER_LOCKING_INTERNAL 1 +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char opendir (); +int +main () +{ +return opendir (); + ; + return 0; +} _ACEOF - -fi - -################################################################################ -{ $as_echo "$as_me:$LINENO: checking whether to include snapshots" >&5 -$as_echo_n "checking whether to include snapshots... " >&6; } - -# Check whether --with-snapshots was given. -if test "${with_snapshots+set}" = set; then - withval=$with_snapshots; SNAPSHOTS=$withval -else - SNAPSHOTS=internal +for ac_lib in '' x; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_opendir=$ac_res fi - -{ $as_echo "$as_me:$LINENO: result: $SNAPSHOTS" >&5 -$as_echo "$SNAPSHOTS" >&6; } - -if [ "x$SNAPSHOTS" != xnone -a "x$SNAPSHOTS" != xinternal -a "x$SNAPSHOTS" != xshared ]; - then { { $as_echo "$as_me:$LINENO: error: --with-snapshots parameter invalid -" >&5 -$as_echo "$as_me: error: --with-snapshots parameter invalid -" >&2;} - { (exit 1); exit 1; }; } -fi; - -if test x$SNAPSHOTS = xinternal; then - -cat >>confdefs.h <<\_ACEOF -#define SNAPSHOT_INTERNAL 1 -_ACEOF - +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_opendir+set}" = set; then : + break fi +done +if test "${ac_cv_search_opendir+set}" = set; then : -################################################################################ -{ $as_echo "$as_me:$LINENO: checking whether to include mirrors" >&5 -$as_echo_n "checking whether to include mirrors... " >&6; } - -# Check whether --with-mirrors was given. -if test "${with_mirrors+set}" = set; then - withval=$with_mirrors; MIRRORS=$withval else - MIRRORS=internal + ac_cv_search_opendir=no fi - -{ $as_echo "$as_me:$LINENO: result: $MIRRORS" >&5 -$as_echo "$MIRRORS" >&6; } - -if [ "x$MIRRORS" != xnone -a "x$MIRRORS" != xinternal -a "x$MIRRORS" != xshared ]; - then { { $as_echo "$as_me:$LINENO: error: --with-mirrors parameter invalid -" >&5 -$as_echo "$as_me: error: --with-mirrors parameter invalid -" >&2;} - { (exit 1); exit 1; }; } -fi; - -if test x$MIRRORS = xinternal; then - -cat >>confdefs.h <<\_ACEOF -#define MIRRORED_INTERNAL 1 -_ACEOF +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 +$as_echo "$ac_cv_search_opendir" >&6; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi -################################################################################ -{ $as_echo "$as_me:$LINENO: checking whether to include replicators" >&5 -$as_echo_n "checking whether to include replicators... " >&6; } +fi -# Check whether --with-replicators was given. -if test "${with_replicators+set}" = set; then - withval=$with_replicators; REPLICATORS=$withval +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if test "${ac_cv_header_stdc+set}" = set; then : + $as_echo_n "(cached) " >&6 else - REPLICATORS=none -fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include -{ $as_echo "$as_me:$LINENO: result: $REPLICATORS" >&5 -$as_echo "$REPLICATORS" >&6; } +int +main () +{ -case "$REPLICATORS" in - none|shared) ;; - internal) -cat >>confdefs.h <<\_ACEOF -#define REPLICATOR_INTERNAL 1 + ; + return 0; +} _ACEOF - ;; - *) { { $as_echo "$as_me:$LINENO: error: --with-replicators parameter invalid ($REPLICATORS)" >&5 -$as_echo "$as_me: error: --with-replicators parameter invalid ($REPLICATORS)" >&2;} - { (exit 1); exit 1; }; } ;; -esac - -################################################################################ -{ $as_echo "$as_me:$LINENO: checking whether to enable readline" >&5 -$as_echo_n "checking whether to enable readline... " >&6; } -# Check whether --enable-readline was given. -if test "${enable_readline+set}" = set; then - enableval=$enable_readline; READLINE=$enableval +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes else - READLINE=maybe + ac_cv_header_stdc=no fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $READLINE" >&5 -$as_echo "$READLINE" >&6; } - -################################################################################ -{ $as_echo "$as_me:$LINENO: checking whether to enable realtime support" >&5 -$as_echo_n "checking whether to enable realtime support... " >&6; } -# Check whether --enable-realtime was given. -if test "${enable_realtime+set}" = set; then - enableval=$enable_realtime; REALTIME=$enableval -fi +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include -{ $as_echo "$as_me:$LINENO: result: $REALTIME" >&5 -$as_echo "$REALTIME" >&6; } +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : -################################################################################ -{ $as_echo "$as_me:$LINENO: checking whether to enable OCF resource agents" >&5 -$as_echo_n "checking whether to enable OCF resource agents... " >&6; } -# Check whether --enable-ocf was given. -if test "${enable_ocf+set}" = set; then - enableval=$enable_ocf; OCF=$enableval else - OCF=no + ac_cv_header_stdc=no fi +rm -f conftest* -{ $as_echo "$as_me:$LINENO: result: $OCF" >&5 -$as_echo "$OCF" >&6; } +fi -################################################################################ -pkg_config_init() { +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. -set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS + ac_cv_header_stdc=no +fi +rm -f conftest* - ;; -esac fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : -fi -if test -z "$ac_cv_path_PKG_CONFIG"; then - ac_pt_PKG_CONFIG=$PKG_CONFIG - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 else - case $ac_pt_PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - ;; -esac + ac_cv_header_stdc=no fi -ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG -if test -n "$ac_pt_PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 -$as_echo "$ac_pt_PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - if test "x$ac_pt_PKG_CONFIG" = x; then - PKG_CONFIG="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - PKG_CONFIG=$ac_pt_PKG_CONFIG - fi -else - PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=0.9.0 - { $as_echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 -$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG="" - fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF fi -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for PKGCONFIGINIT" >&5 -$as_echo_n "checking for PKGCONFIGINIT... " >&6; } +done -if test -n "$PKGCONFIGINIT_CFLAGS"; then - pkg_cv_PKGCONFIGINIT_CFLAGS="$PKGCONFIGINIT_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"pkgconfiginit\"") >&5 - ($PKG_CONFIG --exists --print-errors "pkgconfiginit") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_PKGCONFIGINIT_CFLAGS=`$PKG_CONFIG --cflags "pkgconfiginit" 2>/dev/null` + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5 +$as_echo_n "checking whether sys/types.h defines makedev... " >&6; } +if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then : + $as_echo_n "(cached) " >&6 else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$PKGCONFIGINIT_LIBS"; then - pkg_cv_PKGCONFIGINIT_LIBS="$PKGCONFIGINIT_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"pkgconfiginit\"") >&5 - ($PKG_CONFIG --exists --print-errors "pkgconfiginit") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_PKGCONFIGINIT_LIBS=`$PKG_CONFIG --libs "pkgconfiginit" 2>/dev/null` + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +return makedev(0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_header_sys_types_h_makedev=yes else - pkg_failed=yes + ac_cv_header_sys_types_h_makedev=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi - else - pkg_failed=untried +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5 +$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; } + +if test $ac_cv_header_sys_types_h_makedev = no; then +ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then : + +$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h + fi -if test $pkg_failed = yes; then + if test $ac_cv_header_sys_mkdev_h = no; then + ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then : + +$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no fi - if test $_pkg_short_errors_supported = yes; then - PKGCONFIGINIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "pkgconfiginit" 2>&1` - else - PKGCONFIGINIT_PKG_ERRORS=`$PKG_CONFIG --print-errors "pkgconfiginit" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$PKGCONFIGINIT_PKG_ERRORS" >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:$LINENO: result: pkg-config initialized" >&5 -$as_echo "pkg-config initialized" >&6; } -elif test $pkg_failed = untried; then - { $as_echo "$as_me:$LINENO: result: pkg-config initialized" >&5 -$as_echo "pkg-config initialized" >&6; } -else - PKGCONFIGINIT_CFLAGS=$pkg_cv_PKGCONFIGINIT_CFLAGS - PKGCONFIGINIT_LIBS=$pkg_cv_PKGCONFIGINIT_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - : + + fi fi - PKGCONFIG_INIT=1 -} -################################################################################ -{ $as_echo "$as_me:$LINENO: checking whether to build cluster LVM daemon" >&5 -$as_echo_n "checking whether to build cluster LVM daemon... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if test "${ac_cv_header_stdc+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include -# Check whether --with-clvmd was given. -if test "${with_clvmd+set}" = set; then - withval=$with_clvmd; CLVMD=$withval +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes else - CLVMD=none + ac_cv_header_stdc=no fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -if test x$CLVMD = xyes; then - CLVMD=all -fi -{ $as_echo "$as_me:$LINENO: result: $CLVMD" >&5 -$as_echo "$CLVMD" >&6; } +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include -if test x$CLVMD != xnone && test x$CLUSTER = xnone; then - CLUSTER=internal +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no fi +rm -f conftest* -if test x$CLVMD != xnone && test x$PKGCONFIG_INIT != x1; then - pkg_config_init fi -CLVMD_CMANAGERS="" -CLVMD_NEEDS_QDISKD=no +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include -if [ `expr x"$CLVMD" : '.*gulm.*'` != 0 ]; then - BUILDGULM=yes - CLVMD_CMANAGERS="$CLVMD_CMANAGERS lock_gulmd" - CLVMD_NEEDS_QDISKD=yes -fi -if [ `expr x"$CLVMD" : '.*cman.*'` != 0 ]; then - BUILDCMAN=yes - CLVMD_CMANAGERS="$CLVMD_CMANAGERS cman" - CLVMD_NEEDS_QDISKD=yes -fi -if [ `expr x"$CLVMD" : '.*corosync.*'` != 0 ]; then - BUILDCOROSYNC=yes - CLVMD_CMANAGERS="$CLVMD_CMANAGERS corosync" -fi -if [ `expr x"$CLVMD" : '.*openais.*'` != 0 ]; then - BUILDOPENAIS=yes - CLVMD_CMANAGERS="$CLVMD_CMANAGERS openais" -fi -if test x$CLVMD_NEEDS_QDISKD != xno; then - CLVMD_CMANAGERS="$CLVMD_CMANAGERS qdiskd" +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no fi +rm -f conftest* -if test x$BUILDGULM = xyes; then - if test x$BUILDCOROSYNC = xyes || \ - test x$BUILDOPENAIS = xyes; then - { { $as_echo "$as_me:$LINENO: error: requested clvmd configuration is not valid" >&5 -$as_echo "$as_me: error: requested clvmd configuration is not valid" >&2;} - { (exit 1); exit 1; }; } - fi fi -soft_bailout() { - NOTFOUND=1 -} +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif -hard_bailout() { - { { $as_echo "$as_me:$LINENO: error: bailing out" >&5 -$as_echo "$as_me: error: bailing out" >&2;} - { (exit 1); exit 1; }; } +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; } +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : -if test x$CLVMD = xall; then - bailout=soft_bailout - BUILDGULM=yes - BUILDCMAN=yes - BUILDCOROSYNC=yes - BUILDOPENAIS=yes else - bailout=hard_bailout + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -check_lib_no_libs() { - lib_no_libs_arg1=$1 - shift - lib_no_libs_arg2=$1 - shift - lib_no_libs_args=$@ +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then -as_ac_Lib=`$as_echo "ac_cv_lib_$lib_no_libs_arg1''_$lib_no_libs_arg2" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $lib_no_libs_arg2 in -l$lib_no_libs_arg1" >&5 -$as_echo_n "checking for $lib_no_libs_arg2 in -l$lib_no_libs_arg1... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 +$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } +if test "${ac_cv_header_sys_wait_h+set}" = set; then : $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-l$lib_no_libs_arg1 $lib_no_libs_args $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" +#include +#include +#ifndef WEXITSTATUS +# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) #endif -char $lib_no_libs_arg2 (); +#ifndef WIFEXITED +# define WIFEXITED(stat_val) (((stat_val) & 255) == 0) +#endif + int main () { -return $lib_no_libs_arg2 (); + int s; + wait (&s); + s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_Lib=yes" +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_sys_wait_h=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" + ac_cv_header_sys_wait_h=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_Lib'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Lib'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_LIB$lib_no_libs_arg1" | $as_tr_cpp` 1 -_ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 +$as_echo "$ac_cv_header_sys_wait_h" >&6; } +if test $ac_cv_header_sys_wait_h = yes; then - LIBS="-l$lib_no_libs_arg1 $LIBS" +$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h -else - $bailout fi - LIBS=$ac_check_lib_save_LIBS -} - -if test x$BUILDGULM = xyes; then - -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for CCS" >&5 -$as_echo_n "checking for CCS... " >&6; } - -if test -n "$CCS_CFLAGS"; then - pkg_cv_CCS_CFLAGS="$CCS_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libccs\"") >&5 - ($PKG_CONFIG --exists --print-errors "libccs") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_CCS_CFLAGS=`$PKG_CONFIG --cflags "libccs" 2>/dev/null` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 +$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } +if test "${ac_cv_header_time+set}" = set; then : + $as_echo_n "(cached) " >&6 else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$CCS_LIBS"; then - pkg_cv_CCS_LIBS="$CCS_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libccs\"") >&5 - ($PKG_CONFIG --exists --print-errors "libccs") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_CCS_LIBS=`$PKG_CONFIG --libs "libccs" 2>/dev/null` + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include + +int +main () +{ +if ((struct tm *) 0) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_time=yes else - pkg_failed=yes + ac_cv_header_time=no fi - else - pkg_failed=untried +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 +$as_echo "$ac_cv_header_time" >&6; } +if test $ac_cv_header_time = yes; then +$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h +fi -if test $pkg_failed = yes; then -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes +for ac_header in locale.h stddef.h syslog.h sys/file.h sys/time.h assert.h \ + langinfo.h libgen.h signal.h sys/mman.h sys/resource.h sys/utsname.h \ + sys/wait.h time.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + else - _pkg_short_errors_supported=no + as_fn_error $? "bailing out" "$LINENO" 5 fi - if test $_pkg_short_errors_supported = yes; then - CCS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libccs" 2>&1` - else - CCS_PKG_ERRORS=`$PKG_CONFIG --print-errors "libccs" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$CCS_PKG_ERRORS" >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - NOTFOUND=0 +done -for ac_header in ccs.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> + +case "$host_os" in + linux*) + for ac_header in asm/byteorder.h linux/fs.h malloc.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +else + as_fn_error $? "bailing out" "$LINENO" 5 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> +done + ;; + darwin*) + for ac_header in machine/endian.h sys/disk.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no +else + as_fn_error $? "bailing out" "$LINENO" 5 fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +done + ;; +esac -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +for ac_header in ctype.h dirent.h errno.h fcntl.h getopt.h inttypes.h limits.h \ + stdarg.h stdio.h stdlib.h string.h sys/ioctl.h sys/param.h sys/stat.h \ + sys/types.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 else - eval "$as_ac_Header=\$ac_header_preproc" + as_fn_error $? "bailing out" "$LINENO" 5 fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +done + +for ac_header in termios.h sys/statvfs.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF -else - $bailout fi done - check_lib_no_libs ccs ccs_connect - if test $NOTFOUND = 0; then - { $as_echo "$as_me:$LINENO: result: no pkg for libccs, using -lccs" >&5 -$as_echo "no pkg for libccs, using -lccs" >&6; } - CCS_LIBS="-lccs" - HAVE_CCS=yes - fi -elif test $pkg_failed = untried; then - NOTFOUND=0 -for ac_header in ccs.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +################################################################################ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +$as_echo_n "checking for an ANSI C-conforming const... " >&6; } +if test "${ac_cv_c_const+set}" = set; then : $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no -fi +int +main () +{ +/* FIXME: Include the comments suggested by Paul. */ +#ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; + const charset cs; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *pcpcc; + char **ppc; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + pcpcc = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++pcpcc; + ppc = (char**) pcpcc; + pcpcc = (char const *const *) ppc; + { /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } + *t++ = 0; + if (s) return 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + if (!foo) return 0; + } + return !cs[0] && !zero.x; +#endif -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> + ; + return 0; +} _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_const=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no + ac_cv_c_const=no fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 +$as_echo "$ac_cv_c_const" >&6; } +if test $ac_cv_c_const = no; then -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +$as_echo "#define const /**/" >>confdefs.h -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +fi - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 +$as_echo_n "checking for inline... " >&6; } +if test "${ac_cv_c_inline+set}" = set; then : $as_echo_n "(cached) " >&6 else - eval "$as_ac_Header=\$ac_header_preproc" + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_inline=$ac_kw fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break +done + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 +$as_echo "$ac_cv_c_inline" >&6; } + +case $ac_cv_c_inline in + inline | yes) ;; + *) + case $ac_cv_c_inline in + no) ac_val=;; + *) ac_val=$ac_cv_c_inline;; + esac + cat >>confdefs.h <<_ACEOF +#ifndef __cplusplus +#define inline $ac_val +#endif +_ACEOF + ;; +esac + +ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default" +if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then : -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_RDEV 1 _ACEOF -else - $bailout + fi -done +ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" +if test "x$ac_cv_type_off_t" = x""yes; then : - check_lib_no_libs ccs ccs_connect - if test $NOTFOUND = 0; then - { $as_echo "$as_me:$LINENO: result: no pkg for libccs, using -lccs" >&5 -$as_echo "no pkg for libccs, using -lccs" >&6; } - CCS_LIBS="-lccs" - HAVE_CCS=yes - fi else - CCS_CFLAGS=$pkg_cv_CCS_CFLAGS - CCS_LIBS=$pkg_cv_CCS_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - HAVE_CCS=yes + +cat >>confdefs.h <<_ACEOF +#define off_t long int +_ACEOF + fi -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for GULM" >&5 -$as_echo_n "checking for GULM... " >&6; } +ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" +if test "x$ac_cv_type_pid_t" = x""yes; then : -if test -n "$GULM_CFLAGS"; then - pkg_cv_GULM_CFLAGS="$GULM_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libgulm\"") >&5 - ($PKG_CONFIG --exists --print-errors "libgulm") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_GULM_CFLAGS=`$PKG_CONFIG --cflags "libgulm" 2>/dev/null` else - pkg_failed=yes -fi - else - pkg_failed=untried + +cat >>confdefs.h <<_ACEOF +#define pid_t int +_ACEOF + fi -if test -n "$GULM_LIBS"; then - pkg_cv_GULM_LIBS="$GULM_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libgulm\"") >&5 - ($PKG_CONFIG --exists --print-errors "libgulm") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_GULM_LIBS=`$PKG_CONFIG --libs "libgulm" 2>/dev/null` + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 +$as_echo_n "checking return type of signal handlers... " >&6; } +if test "${ac_cv_type_signal+set}" = set; then : + $as_echo_n "(cached) " >&6 else - pkg_failed=yes + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include + +int +main () +{ +return *(signal (0, 0)) (0) == 1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_signal=int +else + ac_cv_type_signal=void fi - else - pkg_failed=untried +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 +$as_echo "$ac_cv_type_signal" >&6; } +cat >>confdefs.h <<_ACEOF +#define RETSIGTYPE $ac_cv_type_signal +_ACEOF -if test $pkg_failed = yes; then +ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" +if test "x$ac_cv_type_size_t" = x""yes; then : -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - GULM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libgulm" 2>&1` - else - GULM_PKG_ERRORS=`$PKG_CONFIG --print-errors "libgulm" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$GULM_PKG_ERRORS" >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - NOTFOUND=0 +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int +_ACEOF -for ac_header in libgulm.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + +ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" +if test "x$ac_cv_type_mode_t" = x""yes; then : + else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> + +cat >>confdefs.h <<_ACEOF +#define mode_t int _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +ac_fn_c_find_intX_t "$LINENO" "8" "ac_cv_c_int8_t" +case $ac_cv_c_int8_t in #( + no|yes) ;; #( + *) -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> +cat >>confdefs.h <<_ACEOF +#define int8_t $ac_cv_c_int8_t _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; +;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no -fi +ac_fn_c_find_intX_t "$LINENO" "16" "ac_cv_c_int16_t" +case $ac_cv_c_int16_t in #( + no|yes) ;; #( + *) -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +cat >>confdefs.h <<_ACEOF +#define int16_t $ac_cv_c_int16_t +_ACEOF +;; +esac -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t" +case $ac_cv_c_int32_t in #( + no|yes) ;; #( + *) - ;; +cat >>confdefs.h <<_ACEOF +#define int32_t $ac_cv_c_int32_t +_ACEOF +;; esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t" +case $ac_cv_c_int64_t in #( + no|yes) ;; #( + *) + +cat >>confdefs.h <<_ACEOF +#define int64_t $ac_cv_c_int64_t _ACEOF +;; +esac + +ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" +if test "x$ac_cv_type_ssize_t" = x""yes; then : else - $bailout -fi -done +cat >>confdefs.h <<_ACEOF +#define ssize_t int +_ACEOF - check_lib_no_libs gulm lg_core_login - if test $NOTFOUND = 0; then - { $as_echo "$as_me:$LINENO: result: no pkg for libgulm, using -lgulm" >&5 -$as_echo "no pkg for libgulm, using -lgulm" >&6; } - GULM_LIBS="-lgulm" - HAVE_GULM=yes - fi -elif test $pkg_failed = untried; then - NOTFOUND=0 +fi -for ac_header in libgulm.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 +$as_echo_n "checking for uid_t in sys/types.h... " >&6; } +if test "${ac_cv_type_uid_t+set}" = set; then : $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> +#include + _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "uid_t" >/dev/null 2>&1; then : + ac_cv_type_uid_t=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_uid_t=no +fi +rm -f conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 +$as_echo "$ac_cv_type_uid_t" >&6; } +if test $ac_cv_type_uid_t = no; then + +$as_echo "#define uid_t int" >>confdefs.h + + +$as_echo "#define gid_t int" >>confdefs.h - ac_header_compiler=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +ac_fn_c_find_uintX_t "$LINENO" "8" "ac_cv_c_uint8_t" +case $ac_cv_c_uint8_t in #( + no|yes) ;; #( + *) + +$as_echo "#define _UINT8_T 1" >>confdefs.h + + +cat >>confdefs.h <<_ACEOF +#define uint8_t $ac_cv_c_uint8_t +_ACEOF +;; + esac + +ac_fn_c_find_uintX_t "$LINENO" "16" "ac_cv_c_uint16_t" +case $ac_cv_c_uint16_t in #( + no|yes) ;; #( + *) + + +cat >>confdefs.h <<_ACEOF +#define uint16_t $ac_cv_c_uint16_t +_ACEOF +;; + esac + +ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t" +case $ac_cv_c_uint32_t in #( + no|yes) ;; #( + *) + +$as_echo "#define _UINT32_T 1" >>confdefs.h + + +cat >>confdefs.h <<_ACEOF +#define uint32_t $ac_cv_c_uint32_t +_ACEOF +;; + esac + +ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t" +case $ac_cv_c_uint64_t in #( + no|yes) ;; #( + *) + +$as_echo "#define _UINT64_T 1" >>confdefs.h + + +cat >>confdefs.h <<_ACEOF +#define uint64_t $ac_cv_c_uint64_t +_ACEOF +;; + esac + +ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default" +if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then : -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_RDEV 1 _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 +$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } +if test "${ac_cv_struct_tm+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include <$ac_header> +#include +#include + +int +main () +{ +struct tm tm; + int *p = &tm.tm_sec; + return !p; + ; + return 0; +} _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_struct_tm=time.h else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_struct_tm=sys/time.h +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 +$as_echo "$ac_cv_struct_tm" >&6; } +if test $ac_cv_struct_tm = sys/time.h; then + +$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h - ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +################################################################################ +for ac_func in ftruncate gethostname getpagesize \ + gettimeofday memset mkdir mkfifo rmdir munmap nl_langinfo setenv setlocale \ + strcasecmp strchr strcspn strspn strdup strncasecmp strerror strrchr \ + strstr strtol strtoul uname +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 else - eval "$as_ac_Header=\$ac_header_preproc" + as_fn_error $? "bailing out" "$LINENO" 5 fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } +done -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +for ac_func in siginterrupt +do : + ac_fn_c_check_func "$LINENO" "siginterrupt" "ac_cv_func_siginterrupt" +if test "x$ac_cv_func_siginterrupt" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_SIGINTERRUPT 1 _ACEOF -else - $bailout fi - done - check_lib_no_libs gulm lg_core_login - if test $NOTFOUND = 0; then - { $as_echo "$as_me:$LINENO: result: no pkg for libgulm, using -lgulm" >&5 -$as_echo "no pkg for libgulm, using -lgulm" >&6; } - GULM_LIBS="-lgulm" - HAVE_GULM=yes - fi +# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works +# for constant arguments. Useless! +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 +$as_echo_n "checking for working alloca.h... " >&6; } +if test "${ac_cv_working_alloca_h+set}" = set; then : + $as_echo_n "(cached) " >&6 else - GULM_CFLAGS=$pkg_cv_GULM_CFLAGS - GULM_LIBS=$pkg_cv_GULM_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - HAVE_GULM=yes + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +char *p = (char *) alloca (2 * sizeof (int)); + if (p) return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_working_alloca_h=yes +else + ac_cv_working_alloca_h=no fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 +$as_echo "$ac_cv_working_alloca_h" >&6; } +if test $ac_cv_working_alloca_h = yes; then -if test x$BUILDCMAN = xyes; then +$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for CMAN" >&5 -$as_echo_n "checking for CMAN... " >&6; } +fi -if test -n "$CMAN_CFLAGS"; then - pkg_cv_CMAN_CFLAGS="$CMAN_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libcman\"") >&5 - ($PKG_CONFIG --exists --print-errors "libcman") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_CMAN_CFLAGS=`$PKG_CONFIG --cflags "libcman" 2>/dev/null` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 +$as_echo_n "checking for alloca... " >&6; } +if test "${ac_cv_func_alloca_works+set}" = set; then : + $as_echo_n "(cached) " >&6 else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$CMAN_LIBS"; then - pkg_cv_CMAN_LIBS="$CMAN_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libcman\"") >&5 - ($PKG_CONFIG --exists --print-errors "libcman") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_CMAN_LIBS=`$PKG_CONFIG --libs "libcman" 2>/dev/null` + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __GNUC__ +# define alloca __builtin_alloca +#else +# ifdef _MSC_VER +# include +# define alloca _alloca +# else +# ifdef HAVE_ALLOCA_H +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ +char *alloca (); +# endif +# endif +# endif +# endif +#endif + +int +main () +{ +char *p = (char *) alloca (1); + if (p) return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_func_alloca_works=yes else - pkg_failed=yes + ac_cv_func_alloca_works=no fi - else - pkg_failed=untried +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 +$as_echo "$ac_cv_func_alloca_works" >&6; } +if test $ac_cv_func_alloca_works = yes; then +$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h -if test $pkg_failed = yes; then - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - CMAN_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libcman" 2>&1` - else - CMAN_PKG_ERRORS=`$PKG_CONFIG --print-errors "libcman" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$CMAN_PKG_ERRORS" >&5 + # The SVR3 libPW and SVR4 libucb both contain incompatible functions +# that cause trouble. Some versions do not even contain alloca or +# contain a buggy version. If you still want to use their alloca, +# use ar to extract alloca.o from them instead of compiling alloca.c. - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - NOTFOUND=0 +ALLOCA=\${LIBOBJDIR}alloca.$ac_objext -for ac_header in libcman.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +$as_echo "#define C_ALLOCA 1" >>confdefs.h + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 +$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } +if test "${ac_cv_os_cray+set}" = set; then : $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> +#if defined CRAY && ! defined CRAY2 +webecray +#else +wenotbecray +#endif + _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "webecray" >/dev/null 2>&1; then : + ac_cv_os_cray=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no + ac_cv_os_cray=no fi +rm -f conftest* -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 +$as_echo "$ac_cv_os_cray" >&6; } +if test $ac_cv_os_cray = yes; then + for ac_func in _getb67 GETB67 getb67; do + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> +cat >>confdefs.h <<_ACEOF +#define CRAY_STACKSEG_END $ac_func _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no + break fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } + done +fi -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 +$as_echo_n "checking stack direction for C alloca... " >&6; } +if test "${ac_cv_c_stack_direction+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_c_stack_direction=0 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +find_stack_direction () +{ + static char *addr = 0; + auto char dummy; + if (addr == 0) + { + addr = &dummy; + return find_stack_direction (); + } + else + return (&dummy > addr) ? 1 : -1; +} - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 +int +main () +{ + return find_stack_direction () < 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_stack_direction=1 else - eval "$as_ac_Header=\$ac_header_preproc" + ac_cv_c_stack_direction=-1 fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF -else - $bailout fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 +$as_echo "$ac_cv_c_stack_direction" >&6; } +cat >>confdefs.h <<_ACEOF +#define STACK_DIRECTION $ac_cv_c_stack_direction +_ACEOF -done - check_lib_no_libs cman cman_init - if test $NOTFOUND = 0; then - { $as_echo "$as_me:$LINENO: result: no pkg for libcman, using -lcman" >&5 -$as_echo "no pkg for libcman, using -lcman" >&6; } - CMAN_LIBS="-lcman" - HAVE_CMAN=yes - fi -elif test $pkg_failed = untried; then - NOTFOUND=0 +fi -for ac_header in libcman.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether closedir returns void" >&5 +$as_echo_n "checking whether closedir returns void... " >&6; } +if test "${ac_cv_func_closedir_void+set}" = set; then : $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + if test "$cross_compiling" = yes; then : + ac_cv_func_closedir_void=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +#include <$ac_header_dirent> +#ifndef __cplusplus +int closedir (); +#endif -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> +int +main () +{ +return closedir (opendir (".")) != 0; + ; + return 0; +} _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_closedir_void=no else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no + ac_cv_func_closedir_void=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_closedir_void" >&5 +$as_echo "$ac_cv_func_closedir_void" >&6; } +if test $ac_cv_func_closedir_void = yes; then -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +$as_echo "#define CLOSEDIR_VOID 1" >>confdefs.h - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +for ac_header in unistd.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" +if test "x$ac_cv_header_unistd_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_UNISTD_H 1 _ACEOF -else - $bailout fi done - check_lib_no_libs cman cman_init - if test $NOTFOUND = 0; then - { $as_echo "$as_me:$LINENO: result: no pkg for libcman, using -lcman" >&5 -$as_echo "no pkg for libcman, using -lcman" >&6; } - CMAN_LIBS="-lcman" - HAVE_CMAN=yes - fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5 +$as_echo_n "checking for working chown... " >&6; } +if test "${ac_cv_func_chown_works+set}" = set; then : + $as_echo_n "(cached) " >&6 else - CMAN_CFLAGS=$pkg_cv_CMAN_CFLAGS - CMAN_LIBS=$pkg_cv_CMAN_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - HAVE_CMAN=yes -fi - CHECKCONFDB=yes - CHECKDLM=yes -fi + if test "$cross_compiling" = yes; then : + ac_cv_func_chown_works=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +#include -if test x$BUILDCOROSYNC = xyes || \ - test x$BUILDOPENAIS = xyes; then +int +main () +{ + char *f = "conftest.chown"; + struct stat before, after; -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for COROSYNC" >&5 -$as_echo_n "checking for COROSYNC... " >&6; } + if (creat (f, 0600) < 0) + return 1; + if (stat (f, &before) < 0) + return 1; + if (chown (f, (uid_t) -1, (gid_t) -1) == -1) + return 1; + if (stat (f, &after) < 0) + return 1; + return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid); -if test -n "$COROSYNC_CFLAGS"; then - pkg_cv_COROSYNC_CFLAGS="$COROSYNC_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"corosync\"") >&5 - ($PKG_CONFIG --exists --print-errors "corosync") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_COROSYNC_CFLAGS=`$PKG_CONFIG --cflags "corosync" 2>/dev/null` -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$COROSYNC_LIBS"; then - pkg_cv_COROSYNC_LIBS="$COROSYNC_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"corosync\"") >&5 - ($PKG_CONFIG --exists --print-errors "corosync") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_COROSYNC_LIBS=`$PKG_CONFIG --libs "corosync" 2>/dev/null` + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_chown_works=yes else - pkg_failed=yes + ac_cv_func_chown_works=no fi - else - pkg_failed=untried +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi +rm -f conftest.chown +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5 +$as_echo "$ac_cv_func_chown_works" >&6; } +if test $ac_cv_func_chown_works = yes; then -if test $pkg_failed = yes; then +$as_echo "#define HAVE_CHOWN 1" >>confdefs.h -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no fi - if test $_pkg_short_errors_supported = yes; then - COROSYNC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "corosync" 2>&1` - else - COROSYNC_PKG_ERRORS=`$PKG_CONFIG --print-errors "corosync" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$COROSYNC_PKG_ERRORS" >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - $bailout -elif test $pkg_failed = untried; then - $bailout -else - COROSYNC_CFLAGS=$pkg_cv_COROSYNC_CFLAGS - COROSYNC_LIBS=$pkg_cv_COROSYNC_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - HAVE_COROSYNC=yes -fi - CHECKCONFDB=yes +for ac_header in vfork.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" +if test "x$ac_cv_header_vfork_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_VFORK_H 1 +_ACEOF + fi -if test x$BUILDCOROSYNC = xyes; then +done -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for QUORUM" >&5 -$as_echo_n "checking for QUORUM... " >&6; } +for ac_func in fork vfork +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if test -n "$QUORUM_CFLAGS"; then - pkg_cv_QUORUM_CFLAGS="$QUORUM_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libquorum\"") >&5 - ($PKG_CONFIG --exists --print-errors "libquorum") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_QUORUM_CFLAGS=`$PKG_CONFIG --cflags "libquorum" 2>/dev/null` -else - pkg_failed=yes -fi - else - pkg_failed=untried fi -if test -n "$QUORUM_LIBS"; then - pkg_cv_QUORUM_LIBS="$QUORUM_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libquorum\"") >&5 - ($PKG_CONFIG --exists --print-errors "libquorum") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_QUORUM_LIBS=`$PKG_CONFIG --libs "libquorum" 2>/dev/null` +done + +if test "x$ac_cv_func_fork" = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 +$as_echo_n "checking for working fork... " >&6; } +if test "${ac_cv_func_fork_works+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_fork_works=cross +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* By Ruediger Kuhlmann. */ + return fork () < 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_fork_works=yes else - pkg_failed=yes + ac_cv_func_fork_works=no fi - else - pkg_failed=untried +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - - -if test $pkg_failed = yes; then - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no fi - if test $_pkg_short_errors_supported = yes; then - QUORUM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libquorum" 2>&1` - else - QUORUM_PKG_ERRORS=`$PKG_CONFIG --print-errors "libquorum" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$QUORUM_PKG_ERRORS" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 +$as_echo "$ac_cv_func_fork_works" >&6; } - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - $bailout -elif test $pkg_failed = untried; then - $bailout else - QUORUM_CFLAGS=$pkg_cv_QUORUM_CFLAGS - QUORUM_LIBS=$pkg_cv_QUORUM_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - HAVE_QUORUM=yes + ac_cv_func_fork_works=$ac_cv_func_fork fi - CHECKCPG=yes - CHECKDLM=yes +if test "x$ac_cv_func_fork_works" = xcross; then + case $host in + *-*-amigaos* | *-*-msdosdjgpp*) + # Override, as these systems have only a dummy fork() stub + ac_cv_func_fork_works=no + ;; + *) + ac_cv_func_fork_works=yes + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 +$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} fi +ac_cv_func_vfork_works=$ac_cv_func_vfork +if test "x$ac_cv_func_vfork" = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 +$as_echo_n "checking for working vfork... " >&6; } +if test "${ac_cv_func_vfork_works+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_vfork_works=cross +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Thanks to Paul Eggert for this test. */ +$ac_includes_default +#include +#ifdef HAVE_VFORK_H +# include +#endif +/* On some sparc systems, changes by the child to local and incoming + argument registers are propagated back to the parent. The compiler + is told about this with #include , but some compilers + (e.g. gcc -O) don't grok . Test for this by using a + static variable whose address is put into a register that is + clobbered by the vfork. */ +static void +#ifdef __cplusplus +sparc_address_test (int arg) +# else +sparc_address_test (arg) int arg; +#endif +{ + static pid_t child; + if (!child) { + child = vfork (); + if (child < 0) { + perror ("vfork"); + _exit(2); + } + if (!child) { + arg = getpid(); + write(-1, "", 0); + _exit (arg); + } + } +} -if test x$BUILDOPENAIS = xyes; then +int +main () +{ + pid_t parent = getpid (); + pid_t child; -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for SALCK" >&5 -$as_echo_n "checking for SALCK... " >&6; } + sparc_address_test (0); -if test -n "$SALCK_CFLAGS"; then - pkg_cv_SALCK_CFLAGS="$SALCK_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libSaLck\"") >&5 - ($PKG_CONFIG --exists --print-errors "libSaLck") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_SALCK_CFLAGS=`$PKG_CONFIG --cflags "libSaLck" 2>/dev/null` -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$SALCK_LIBS"; then - pkg_cv_SALCK_LIBS="$SALCK_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libSaLck\"") >&5 - ($PKG_CONFIG --exists --print-errors "libSaLck") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_SALCK_LIBS=`$PKG_CONFIG --libs "libSaLck" 2>/dev/null` -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi + child = vfork (); + + if (child == 0) { + /* Here is another test for sparc vfork register problems. This + test uses lots of local variables, at least as many local + variables as main has allocated so far including compiler + temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris + 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should + reuse the register of parent for one of the local variables, + since it will think that parent can't possibly be used any more + in this routine. Assigning to the local variable will thus + munge parent in the parent process. */ + pid_t + p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), + p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); + /* Convince the compiler that p..p7 are live; otherwise, it might + use the same hardware register for all 8 local variables. */ + if (p != p1 || p != p2 || p != p3 || p != p4 + || p != p5 || p != p6 || p != p7) + _exit(1); + /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent + from child file descriptors. If the child closes a descriptor + before it execs or exits, this munges the parent's descriptor + as well. Test for this by closing stdout in the child. */ + _exit(close(fileno(stdout)) != 0); + } else { + int status; + struct stat st; + while (wait(&status) != child) + ; + return ( + /* Was there some problem with vforking? */ + child < 0 -if test $pkg_failed = yes; then + /* Did the child fail? (This shouldn't happen.) */ + || status -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - SALCK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libSaLck" 2>&1` - else - SALCK_PKG_ERRORS=`$PKG_CONFIG --print-errors "libSaLck" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$SALCK_PKG_ERRORS" >&5 + /* Did the vfork/compiler bug occur? */ + || parent != getpid() - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - $bailout -elif test $pkg_failed = untried; then - $bailout + /* Did the file descriptor bug occur? */ + || fstat(fileno(stdout), &st) != 0 + ); + } +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_vfork_works=yes else - SALCK_CFLAGS=$pkg_cv_SALCK_CFLAGS - SALCK_LIBS=$pkg_cv_SALCK_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - HAVE_SALCK=yes + ac_cv_func_vfork_works=no fi - CHECKCPG=yes +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 +$as_echo "$ac_cv_func_vfork_works" >&6; } +fi; +if test "x$ac_cv_func_fork_works" = xcross; then + ac_cv_func_vfork_works=$ac_cv_func_vfork + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 +$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} +fi -if test x$CHECKCONFDB = xyes; then +if test "x$ac_cv_func_vfork_works" = xyes; then -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for CONFDB" >&5 -$as_echo_n "checking for CONFDB... " >&6; } +$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h -if test -n "$CONFDB_CFLAGS"; then - pkg_cv_CONFDB_CFLAGS="$CONFDB_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libconfdb\"") >&5 - ($PKG_CONFIG --exists --print-errors "libconfdb") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_CONFDB_CFLAGS=`$PKG_CONFIG --cflags "libconfdb" 2>/dev/null` -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$CONFDB_LIBS"; then - pkg_cv_CONFDB_LIBS="$CONFDB_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libconfdb\"") >&5 - ($PKG_CONFIG --exists --print-errors "libconfdb") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_CONFDB_LIBS=`$PKG_CONFIG --libs "libconfdb" 2>/dev/null` else - pkg_failed=yes -fi - else - pkg_failed=untried -fi +$as_echo "#define vfork fork" >>confdefs.h +fi +if test "x$ac_cv_func_fork_works" = xyes; then -if test $pkg_failed = yes; then +$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no fi - if test $_pkg_short_errors_supported = yes; then - CONFDB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libconfdb" 2>&1` - else - CONFDB_PKG_ERRORS=`$PKG_CONFIG --print-errors "libconfdb" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$CONFDB_PKG_ERRORS" >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - HAVE_CONFDB=no -elif test $pkg_failed = untried; then - HAVE_CONFDB=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 +$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } +if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + rm -f conftest.sym conftest.file +echo >conftest.file +if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then + if test "$cross_compiling" = yes; then : + ac_cv_func_lstat_dereferences_slashed_symlink=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +struct stat sbuf; + /* Linux will dereference the symlink and fail, as required by POSIX. + That is better in the sense that it means we will not + have to compile and use the lstat wrapper. */ + return lstat ("conftest.sym/", &sbuf) == 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_lstat_dereferences_slashed_symlink=yes else - CONFDB_CFLAGS=$pkg_cv_CONFDB_CFLAGS - CONFDB_LIBS=$pkg_cv_CONFDB_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - HAVE_CONFDB=yes + ac_cv_func_lstat_dereferences_slashed_symlink=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi +else + # If the `ln -s' command failed, then we probably don't even + # have an lstat function. + ac_cv_func_lstat_dereferences_slashed_symlink=no +fi +rm -f conftest.sym conftest.file -for ac_header in corosync/confdb.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 +$as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } + +test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && + +cat >>confdefs.h <<_ACEOF +#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; + + +if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then + case " $LIBOBJS " in + *" lstat.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS lstat.$ac_objext" + ;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat accepts an empty string" >&5 +$as_echo_n "checking whether lstat accepts an empty string... " >&6; } +if test "${ac_cv_func_lstat_empty_string_bug+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_lstat_empty_string_bug=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include <$ac_header> +$ac_includes_default +int +main () +{ +struct stat sbuf; + return lstat ("", &sbuf) == 0; + ; + return 0; +} _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_lstat_empty_string_bug=no else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_func_lstat_empty_string_bug=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi - ac_header_preproc=no fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_empty_string_bug" >&5 +$as_echo "$ac_cv_func_lstat_empty_string_bug" >&6; } +if test $ac_cv_func_lstat_empty_string_bug = yes; then + case " $LIBOBJS " in + *" lstat.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS lstat.$ac_objext" + ;; +esac -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +cat >>confdefs.h <<_ACEOF +#define HAVE_LSTAT_EMPTY_STRING_BUG 1 +_ACEOF - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +for ac_header in stdlib.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" +if test "x$ac_cv_header_stdlib_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_STDLIB_H 1 _ACEOF - HAVE_CONFDB_H=yes -else - HAVE_CONFDB_H=no + fi done +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 +$as_echo_n "checking for GNU libc compatible malloc... " >&6; } +if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_malloc_0_nonnull=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined STDC_HEADERS || defined HAVE_STDLIB_H +# include +#else +char *malloc (); +#endif - if test x$HAVE_CONFDB != xyes && \ - test x$HAVE_CONFDB_H = xyes; then - check_lib_no_libs confdb confdb_initialize - { $as_echo "$as_me:$LINENO: result: no pkg for confdb, using -lconfdb" >&5 -$as_echo "no pkg for confdb, using -lconfdb" >&6; } - CONFDB_LIBS="-lconfdb" - HAVE_CONFDB=yes - fi - - if test x$BUILDCOROSYNC = xyes && \ - test x$HAVE_CONFDB != xyes && - test x$CLVMD != xall; then - { { $as_echo "$as_me:$LINENO: error: bailing out... confdb library is required" >&5 -$as_echo "$as_me: error: bailing out... confdb library is required" >&2;} - { (exit 1); exit 1; }; } - fi +int +main () +{ +return ! malloc (0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_malloc_0_nonnull=yes +else + ac_cv_func_malloc_0_nonnull=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -if test x$CHECKCPG = xyes; then +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 +$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } +if test $ac_cv_func_malloc_0_nonnull = yes; then : -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for CPG" >&5 -$as_echo_n "checking for CPG... " >&6; } +$as_echo "#define HAVE_MALLOC 1" >>confdefs.h -if test -n "$CPG_CFLAGS"; then - pkg_cv_CPG_CFLAGS="$CPG_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libcpg\"") >&5 - ($PKG_CONFIG --exists --print-errors "libcpg") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_CPG_CFLAGS=`$PKG_CONFIG --cflags "libcpg" 2>/dev/null` -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$CPG_LIBS"; then - pkg_cv_CPG_LIBS="$CPG_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libcpg\"") >&5 - ($PKG_CONFIG --exists --print-errors "libcpg") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_CPG_LIBS=`$PKG_CONFIG --libs "libcpg" 2>/dev/null` else - pkg_failed=yes -fi - else - pkg_failed=untried -fi + $as_echo "#define HAVE_MALLOC 0" >>confdefs.h + case " $LIBOBJS " in + *" malloc.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS malloc.$ac_objext" + ;; +esac -if test $pkg_failed = yes; then +$as_echo "#define malloc rpl_malloc" >>confdefs.h -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no fi - if test $_pkg_short_errors_supported = yes; then - CPG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libcpg" 2>&1` - else - CPG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libcpg" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$CPG_PKG_ERRORS" >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - $bailout -elif test $pkg_failed = untried; then - $bailout + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5 +$as_echo_n "checking for working memcmp... " >&6; } +if test "${ac_cv_func_memcmp_working+set}" = set; then : + $as_echo_n "(cached) " >&6 else - CPG_CFLAGS=$pkg_cv_CPG_CFLAGS - CPG_LIBS=$pkg_cv_CPG_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - HAVE_CPG=yes -fi -fi + if test "$cross_compiling" = yes; then : + ac_cv_func_memcmp_working=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ -if test x$CHECKDLM = xyes; then + /* Some versions of memcmp are not 8-bit clean. */ + char c0 = '\100', c1 = '\200', c2 = '\201'; + if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) + return 1; -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for DLM" >&5 -$as_echo_n "checking for DLM... " >&6; } + /* The Next x86 OpenStep bug shows up only when comparing 16 bytes + or more and with at least one buffer not starting on a 4-byte boundary. + William Lewis provided this test program. */ + { + char foo[21]; + char bar[21]; + int i; + for (i = 0; i < 4; i++) + { + char *a = foo + i; + char *b = bar + i; + strcpy (a, "--------01111111"); + strcpy (b, "--------10000000"); + if (memcmp (a, b, 16) >= 0) + return 1; + } + return 0; + } -if test -n "$DLM_CFLAGS"; then - pkg_cv_DLM_CFLAGS="$DLM_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libdlm\"") >&5 - ($PKG_CONFIG --exists --print-errors "libdlm") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_DLM_CFLAGS=`$PKG_CONFIG --cflags "libdlm" 2>/dev/null` -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$DLM_LIBS"; then - pkg_cv_DLM_LIBS="$DLM_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libdlm\"") >&5 - ($PKG_CONFIG --exists --print-errors "libdlm") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_DLM_LIBS=`$PKG_CONFIG --libs "libdlm" 2>/dev/null` + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_memcmp_working=yes else - pkg_failed=yes + ac_cv_func_memcmp_working=no fi - else - pkg_failed=untried +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5 +$as_echo "$ac_cv_func_memcmp_working" >&6; } +test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in + *" memcmp.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" + ;; +esac -if test $pkg_failed = yes; then -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - DLM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libdlm" 2>&1` - else - DLM_PKG_ERRORS=`$PKG_CONFIG --print-errors "libdlm" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$DLM_PKG_ERRORS" >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - NOTFOUND=0 -for ac_header in libdlm.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> + for ac_header in $ac_header_list +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +done -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then + + +for ac_func in getpagesize +do : + ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" +if test "x$ac_cv_func_getpagesize" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_GETPAGESIZE 1 _ACEOF -else - $bailout fi - done - check_lib_no_libs dlm dlm_lock -lpthread - if test $NOTFOUND = 0; then - { $as_echo "$as_me:$LINENO: result: no pkg for libdlm, using -ldlm" >&5 -$as_echo "no pkg for libdlm, using -ldlm" >&6; } - DLM_LIBS="-ldlm -lpthread" - HAVE_DLM=yes - fi -elif test $pkg_failed = untried; then - NOTFOUND=0 - -for ac_header in libdlm.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 +$as_echo_n "checking for working mmap... " >&6; } +if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + if test "$cross_compiling" = yes; then : + ac_cv_func_mmap_fixed_mapped=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +/* malloc might have been renamed as rpl_malloc. */ +#undef malloc - ac_header_compiler=no -fi +/* Thanks to Mike Haertel and Jim Avera for this test. + Here is a matrix of mmap possibilities: + mmap private not fixed + mmap private fixed at somewhere currently unmapped + mmap private fixed at somewhere already mapped + mmap shared not fixed + mmap shared fixed at somewhere currently unmapped + mmap shared fixed at somewhere already mapped + For private mappings, we should verify that changes cannot be read() + back from the file, nor mmap's back from the file at a different + address. (There have been systems where private was not correctly + implemented like the infamous i386 svr4.0, and systems where the + VM page cache was not coherent with the file system buffer cache + like early versions of FreeBSD and possibly contemporary NetBSD.) + For shared mappings, we should conversely verify that changes get + propagated back to all the places they're supposed to be. -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } + Grep wants private fixed already mapped. + The main things grep needs to know about mmap are: + * does it exist and is it safe to write into the mmap'd area + * how to use it (BSD variants) */ -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +#include +#include - ac_header_preproc=no -fi +#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H +char *malloc (); +#endif -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +/* This mess was copied from the GNU getpagesize.h. */ +#ifndef HAVE_GETPAGESIZE +# ifdef _SC_PAGESIZE +# define getpagesize() sysconf(_SC_PAGESIZE) +# else /* no _SC_PAGESIZE */ +# ifdef HAVE_SYS_PARAM_H +# include +# ifdef EXEC_PAGESIZE +# define getpagesize() EXEC_PAGESIZE +# else /* no EXEC_PAGESIZE */ +# ifdef NBPG +# define getpagesize() NBPG * CLSIZE +# ifndef CLSIZE +# define CLSIZE 1 +# endif /* no CLSIZE */ +# else /* no NBPG */ +# ifdef NBPC +# define getpagesize() NBPC +# else /* no NBPC */ +# ifdef PAGESIZE +# define getpagesize() PAGESIZE +# endif /* PAGESIZE */ +# endif /* no NBPC */ +# endif /* no NBPG */ +# endif /* no EXEC_PAGESIZE */ +# else /* no HAVE_SYS_PARAM_H */ +# define getpagesize() 8192 /* punt totally */ +# endif /* no HAVE_SYS_PARAM_H */ +# endif /* no _SC_PAGESIZE */ -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +#endif /* no HAVE_GETPAGESIZE */ - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 +int +main () +{ + char *data, *data2, *data3; + const char *cdata2; + int i, pagesize; + int fd, fd2; + + pagesize = getpagesize (); + + /* First, make a file with some known garbage in it. */ + data = (char *) malloc (pagesize); + if (!data) + return 1; + for (i = 0; i < pagesize; ++i) + *(data + i) = rand (); + umask (0); + fd = creat ("conftest.mmap", 0600); + if (fd < 0) + return 2; + if (write (fd, data, pagesize) != pagesize) + return 3; + close (fd); + + /* Next, check that the tail of a page is zero-filled. File must have + non-zero length, otherwise we risk SIGBUS for entire page. */ + fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); + if (fd2 < 0) + return 4; + cdata2 = ""; + if (write (fd2, cdata2, 1) != 1) + return 5; + data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); + if (data2 == MAP_FAILED) + return 6; + for (i = 0; i < pagesize; ++i) + if (*(data2 + i)) + return 7; + close (fd2); + if (munmap (data2, pagesize)) + return 8; + + /* Next, try to mmap the file at a fixed address which already has + something else allocated at it. If we can, also make sure that + we see the same garbage. */ + fd = open ("conftest.mmap", O_RDWR); + if (fd < 0) + return 9; + if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED, fd, 0L)) + return 10; + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data2 + i)) + return 11; + + /* Finally, make sure that changes to the mapped area do not + percolate back to the file as seen by read(). (This is a bug on + some variants of i386 svr4.0.) */ + for (i = 0; i < pagesize; ++i) + *(data2 + i) = *(data2 + i) + 1; + data3 = (char *) malloc (pagesize); + if (!data3) + return 12; + if (read (fd, data3, pagesize) != pagesize) + return 13; + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data3 + i)) + return 14; + close (fd); + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_mmap_fixed_mapped=yes else - eval "$as_ac_Header=\$ac_header_preproc" + ac_cv_func_mmap_fixed_mapped=no fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 +$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } +if test $ac_cv_func_mmap_fixed_mapped = yes; then + +$as_echo "#define HAVE_MMAP 1" >>confdefs.h fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +rm -f conftest.mmap conftest.txt + +for ac_header in stdlib.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" +if test "x$ac_cv_header_stdlib_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_STDLIB_H 1 _ACEOF -else - $bailout fi done - check_lib_no_libs dlm dlm_lock -lpthread - if test $NOTFOUND = 0; then - { $as_echo "$as_me:$LINENO: result: no pkg for libdlm, using -ldlm" >&5 -$as_echo "no pkg for libdlm, using -ldlm" >&6; } - DLM_LIBS="-ldlm -lpthread" - HAVE_DLM=yes - fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5 +$as_echo_n "checking for GNU libc compatible realloc... " >&6; } +if test "${ac_cv_func_realloc_0_nonnull+set}" = set; then : + $as_echo_n "(cached) " >&6 else - DLM_CFLAGS=$pkg_cv_DLM_CFLAGS - DLM_LIBS=$pkg_cv_DLM_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - HAVE_DLM=yes + if test "$cross_compiling" = yes; then : + ac_cv_func_realloc_0_nonnull=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined STDC_HEADERS || defined HAVE_STDLIB_H +# include +#else +char *realloc (); +#endif + +int +main () +{ +return ! realloc (0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_realloc_0_nonnull=yes +else + ac_cv_func_realloc_0_nonnull=no fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -if test x$CLVMD = xall; then - CLVMD=none - CLVMD_CMANAGERS="" - CLVMD_NEEDS_QDISKD=no - if test x$HAVE_CCS = xyes && \ - test x$HAVE_GULM = xyes; then - { $as_echo "$as_me:$LINENO: result: Enabling clvmd gulm cluster manager" >&5 -$as_echo "Enabling clvmd gulm cluster manager" >&6; } - CLVMD="$CLVMD,gulm" - CLVMD_CMANAGERS="$CLVMD_CMANAGERS lock_gulmd" - CLVMD_NEEDS_QDISKD=yes - fi - if test x$HAVE_CMAN = xyes && \ - test x$HAVE_DLM = xyes; then - { $as_echo "$as_me:$LINENO: result: Enabling clvmd cman cluster manager" >&5 -$as_echo "Enabling clvmd cman cluster manager" >&6; } - CLVMD="$CLVMD,cman" - CLVMD_CMANAGERS="$CLVMD_CMANAGERS cman" - CLVMD_NEEDS_QDISKD=yes - fi - if test x$HAVE_COROSYNC = xyes && \ - test x$HAVE_QUORUM = xyes && \ - test x$HAVE_CPG = xyes && \ - test x$HAVE_DLM = xyes && \ - test x$HAVE_CONFDB = xyes; then - { $as_echo "$as_me:$LINENO: result: Enabling clvmd corosync cluster manager" >&5 -$as_echo "Enabling clvmd corosync cluster manager" >&6; } - CLVMD="$CLVMD,corosync" - CLVMD_CMANAGERS="$CLVMD_CMANAGERS corosync" - fi - if test x$HAVE_COROSYNC = xyes && \ - test x$HAVE_CPG = xyes && \ - test x$HAVE_SALCK = xyes; then - { $as_echo "$as_me:$LINENO: result: Enabling clvmd openais cluster manager" >&5 -$as_echo "Enabling clvmd openais cluster manager" >&6; } - CLVMD="$CLVMD,openais" - CLVMD_CMANAGERS="$CLVMD_CMANAGERS openais" - fi - if test x$CLVMD_NEEDS_QDISKD != xno; then - CLVMD_CMANAGERS="$CLVMD_CMANAGERS qdiskd" - fi - if test x$CLVMD = xnone; then - { $as_echo "$as_me:$LINENO: result: Disabling clvmd build. No cluster manager detected." >&5 -$as_echo "Disabling clvmd build. No cluster manager detected." >&6; } - fi fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5 +$as_echo "$ac_cv_func_realloc_0_nonnull" >&6; } +if test $ac_cv_func_realloc_0_nonnull = yes; then : -################################################################################ -if test "x$CLVMD" != xnone; then +$as_echo "#define HAVE_REALLOC 1" >>confdefs.h -# Check whether --with-clvmd-pidfile was given. -if test "${with_clvmd_pidfile+set}" = set; then - withval=$with_clvmd_pidfile; CLVMD_PIDFILE=$withval else - CLVMD_PIDFILE="/var/run/clvmd.pid" -fi + $as_echo "#define HAVE_REALLOC 0" >>confdefs.h + + case " $LIBOBJS " in + *" realloc.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS realloc.$ac_objext" + ;; +esac -cat >>confdefs.h <<_ACEOF -#define CLVMD_PIDFILE "$CLVMD_PIDFILE" -_ACEOF +$as_echo "#define realloc rpl_realloc" >>confdefs.h fi -################################################################################ -{ $as_echo "$as_me:$LINENO: checking whether to build cluster mirror log daemon" >&5 -$as_echo_n "checking whether to build cluster mirror log daemon... " >&6; } -# Check whether --enable-cmirrord was given. -if test "${enable_cmirrord+set}" = set; then - enableval=$enable_cmirrord; CMIRRORD=$enableval + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5 +$as_echo_n "checking whether stat accepts an empty string... " >&6; } +if test "${ac_cv_func_stat_empty_string_bug+set}" = set; then : + $as_echo_n "(cached) " >&6 else - CMIRRORD=no + if test "$cross_compiling" = yes; then : + ac_cv_func_stat_empty_string_bug=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +struct stat sbuf; + return stat ("", &sbuf) == 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_stat_empty_string_bug=no +else + ac_cv_func_stat_empty_string_bug=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $CMIRRORD" >&5 -$as_echo "$CMIRRORD" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5 +$as_echo "$ac_cv_func_stat_empty_string_bug" >&6; } +if test $ac_cv_func_stat_empty_string_bug = yes; then + case " $LIBOBJS " in + *" stat.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS stat.$ac_objext" + ;; +esac -BUILD_CMIRRORD=$CMIRRORD -################################################################################ -if test "x$BUILD_CMIRRORD" = xyes; then +cat >>confdefs.h <<_ACEOF +#define HAVE_STAT_EMPTY_STRING_BUG 1 +_ACEOF -# Check whether --with-cmirrord-pidfile was given. -if test "${with_cmirrord_pidfile+set}" = set; then - withval=$with_cmirrord_pidfile; CMIRRORD_PIDFILE=$withval -else - CMIRRORD_PIDFILE="/var/run/cmirrord.pid" fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strtod" >&5 +$as_echo_n "checking for working strtod... " >&6; } +if test "${ac_cv_func_strtod+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_strtod=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +$ac_includes_default +#ifndef strtod +double strtod (); +#endif +int +main() +{ + { + /* Some versions of Linux strtod mis-parse strings with leading '+'. */ + char *string = " +69"; + char *term; + double value; + value = strtod (string, &term); + if (value != 69 || term != (string + 4)) + return 1; + } + + { + /* Under Solaris 2.4, strtod returns the wrong value for the + terminating character under some conditions. */ + char *string = "NaN"; + char *term; + strtod (string, &term); + if (term != string && *(term - 1) == 0) + return 1; + } + return 0; +} -cat >>confdefs.h <<_ACEOF -#define CMIRRORD_PIDFILE "$CMIRRORD_PIDFILE" _ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_strtod=yes +else + ac_cv_func_strtod=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strtod" >&5 +$as_echo "$ac_cv_func_strtod" >&6; } +if test $ac_cv_func_strtod = no; then + case " $LIBOBJS " in + *" strtod.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strtod.$ac_objext" + ;; +esac -################################################################################ -if [ "x$BUILD_CMIRRORD" = xyes ]; then - if test x$PKGCONFIG_INIT != x1; then - pkg_config_init - fi +ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow" +if test "x$ac_cv_func_pow" = x""yes; then : -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for SACKPT" >&5 -$as_echo_n "checking for SACKPT... " >&6; } +fi -if test -n "$SACKPT_CFLAGS"; then - pkg_cv_SACKPT_CFLAGS="$SACKPT_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libSaCkpt\"") >&5 - ($PKG_CONFIG --exists --print-errors "libSaCkpt") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_SACKPT_CFLAGS=`$PKG_CONFIG --cflags "libSaCkpt" 2>/dev/null` +if test $ac_cv_func_pow = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5 +$as_echo_n "checking for pow in -lm... " >&6; } +if test "${ac_cv_lib_m_pow+set}" = set; then : + $as_echo_n "(cached) " >&6 else - pkg_failed=yes + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pow (); +int +main () +{ +return pow (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_m_pow=yes +else + ac_cv_lib_m_pow=no fi - else - pkg_failed=untried +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -if test -n "$SACKPT_LIBS"; then - pkg_cv_SACKPT_LIBS="$SACKPT_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libSaCkpt\"") >&5 - ($PKG_CONFIG --exists --print-errors "libSaCkpt") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_SACKPT_LIBS=`$PKG_CONFIG --libs "libSaCkpt" 2>/dev/null` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5 +$as_echo "$ac_cv_lib_m_pow" >&6; } +if test "x$ac_cv_lib_m_pow" = x""yes; then : + POW_LIB=-lm else - pkg_failed=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find library containing definition of pow" >&5 +$as_echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;} fi - else - pkg_failed=untried + +fi + +fi + +for ac_func in vprintf +do : + ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf" +if test "x$ac_cv_func_vprintf" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_VPRINTF 1 +_ACEOF + +ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt" +if test "x$ac_cv_func__doprnt" = x""yes; then : + +$as_echo "#define HAVE_DOPRNT 1" >>confdefs.h + fi +fi +done -if test $pkg_failed = yes; then -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes +################################################################################ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use static linking" >&5 +$as_echo_n "checking whether to use static linking... " >&6; } +# Check whether --enable-static_link was given. +if test "${enable_static_link+set}" = set; then : + enableval=$enable_static_link; STATIC_LINK=$enableval else - _pkg_short_errors_supported=no + STATIC_LINK=no fi - if test $_pkg_short_errors_supported = yes; then - SACKPT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libSaCkpt" 2>&1` - else - SACKPT_PKG_ERRORS=`$PKG_CONFIG --print-errors "libSaCkpt" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$SACKPT_PKG_ERRORS" >&5 - { { $as_echo "$as_me:$LINENO: error: Package requirements (libSaCkpt) were not met: +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $STATIC_LINK" >&5 +$as_echo "$STATIC_LINK" >&6; } -$SACKPT_PKG_ERRORS +################################################################################ -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. -Alternatively, you may set the environment variables SACKPT_CFLAGS -and SACKPT_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&5 -$as_echo "$as_me: error: Package requirements (libSaCkpt) were not met: +################################################################################ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking file owner" >&5 +$as_echo_n "checking file owner... " >&6; } -$SACKPT_PKG_ERRORS +# Check whether --with-user was given. +if test "${with_user+set}" = set; then : + withval=$with_user; OWNER=$withval +fi -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OWNER" >&5 +$as_echo "$OWNER" >&6; } -Alternatively, you may set the environment variables SACKPT_CFLAGS -and SACKPT_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&2;} - { (exit 1); exit 1; }; } -elif test $pkg_failed = untried; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. +if test x$OWNER != x; then + INSTALL="$INSTALL -o $OWNER" +fi -Alternatively, you may set the environment variables SACKPT_CFLAGS -and SACKPT_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. +################################################################################ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking group owner" >&5 +$as_echo_n "checking group owner... " >&6; } -To get pkg-config, see . -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. +# Check whether --with-group was given. +if test "${with_group+set}" = set; then : + withval=$with_group; GROUP=$withval +fi -Alternatively, you may set the environment variables SACKPT_CFLAGS -and SACKPT_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GROUP" >&5 +$as_echo "$GROUP" >&6; } -To get pkg-config, see . -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - SACKPT_CFLAGS=$pkg_cv_SACKPT_CFLAGS - SACKPT_LIBS=$pkg_cv_SACKPT_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - : +if test x$GROUP != x; then + INSTALL="$INSTALL -g $GROUP" fi - if test x$HAVE_CPG != xyes; then -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for CPG" >&5 -$as_echo_n "checking for CPG... " >&6; } +################################################################################ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking device node uid" >&5 +$as_echo_n "checking device node uid... " >&6; } -if test -n "$CPG_CFLAGS"; then - pkg_cv_CPG_CFLAGS="$CPG_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libcpg\"") >&5 - ($PKG_CONFIG --exists --print-errors "libcpg") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_CPG_CFLAGS=`$PKG_CONFIG --cflags "libcpg" 2>/dev/null` -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$CPG_LIBS"; then - pkg_cv_CPG_LIBS="$CPG_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libcpg\"") >&5 - ($PKG_CONFIG --exists --print-errors "libcpg") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_CPG_LIBS=`$PKG_CONFIG --libs "libcpg" 2>/dev/null` + +# Check whether --with-device-uid was given. +if test "${with_device_uid+set}" = set; then : + withval=$with_device_uid; DM_DEVICE_UID=$withval else - pkg_failed=yes -fi - else - pkg_failed=untried + DM_DEVICE_UID=0 fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DM_DEVICE_UID" >&5 +$as_echo "$DM_DEVICE_UID" >&6; } +################################################################################ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking device node gid" >&5 +$as_echo_n "checking device node gid... " >&6; } -if test $pkg_failed = yes; then -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes +# Check whether --with-device-gid was given. +if test "${with_device_gid+set}" = set; then : + withval=$with_device_gid; DM_DEVICE_GID=$withval else - _pkg_short_errors_supported=no + DM_DEVICE_GID=0 fi - if test $_pkg_short_errors_supported = yes; then - CPG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libcpg" 2>&1` - else - CPG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libcpg" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$CPG_PKG_ERRORS" >&5 - { { $as_echo "$as_me:$LINENO: error: Package requirements (libcpg) were not met: +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DM_DEVICE_GID" >&5 +$as_echo "$DM_DEVICE_GID" >&6; } -$CPG_PKG_ERRORS +################################################################################ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking device node mode" >&5 +$as_echo_n "checking device node mode... " >&6; } -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. -Alternatively, you may set the environment variables CPG_CFLAGS -and CPG_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&5 -$as_echo "$as_me: error: Package requirements (libcpg) were not met: +# Check whether --with-device-mode was given. +if test "${with_device_mode+set}" = set; then : + withval=$with_device_mode; DM_DEVICE_MODE=$withval +else + DM_DEVICE_MODE=0600 +fi -$CPG_PKG_ERRORS +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DM_DEVICE_MODE" >&5 +$as_echo "$DM_DEVICE_MODE" >&6; } -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. +################################################################################ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable lvm1 fallback" >&5 +$as_echo_n "checking whether to enable lvm1 fallback... " >&6; } +# Check whether --enable-lvm1_fallback was given. +if test "${enable_lvm1_fallback+set}" = set; then : + enableval=$enable_lvm1_fallback; LVM1_FALLBACK=$enableval +else + LVM1_FALLBACK=no +fi -Alternatively, you may set the environment variables CPG_CFLAGS -and CPG_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&2;} - { (exit 1); exit 1; }; } -elif test $pkg_failed = untried; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LVM1_FALLBACK" >&5 +$as_echo "$LVM1_FALLBACK" >&6; } -Alternatively, you may set the environment variables CPG_CFLAGS -and CPG_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. +if test x$LVM1_FALLBACK = xyes; then -To get pkg-config, see . -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. +$as_echo "#define LVM1_FALLBACK 1" >>confdefs.h -Alternatively, you may set the environment variables CPG_CFLAGS -and CPG_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. +fi -To get pkg-config, see . -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +################################################################################ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include support for lvm1 metadata" >&5 +$as_echo_n "checking whether to include support for lvm1 metadata... " >&6; } + +# Check whether --with-lvm1 was given. +if test "${with_lvm1+set}" = set; then : + withval=$with_lvm1; LVM1=$withval else - CPG_CFLAGS=$pkg_cv_CPG_CFLAGS - CPG_LIBS=$pkg_cv_CPG_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - : + LVM1=internal fi - fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LVM1" >&5 +$as_echo "$LVM1" >&6; } + +if [ "x$LVM1" != xnone -a "x$LVM1" != xinternal -a "x$LVM1" != xshared ]; + then as_fn_error $? "--with-lvm1 parameter invalid +" "$LINENO" 5 +fi; + +if test x$LVM1 = xinternal; then + +$as_echo "#define LVM1_INTERNAL 1" >>confdefs.h + fi ################################################################################ -{ $as_echo "$as_me:$LINENO: checking whether to enable debugging" >&5 -$as_echo_n "checking whether to enable debugging... " >&6; } -# Check whether --enable-debug was given. -if test "${enable_debug+set}" = set; then - enableval=$enable_debug; DEBUG=$enableval +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include support for GFS pool metadata" >&5 +$as_echo_n "checking whether to include support for GFS pool metadata... " >&6; } + +# Check whether --with-pool was given. +if test "${with_pool+set}" = set; then : + withval=$with_pool; POOL=$withval else - DEBUG=no + POOL=internal fi -{ $as_echo "$as_me:$LINENO: result: $DEBUG" >&5 -$as_echo "$DEBUG" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $POOL" >&5 +$as_echo "$POOL" >&6; } + +if [ "x$POOL" != xnone -a "x$POOL" != xinternal -a "x$POOL" != xshared ]; + then as_fn_error $? "--with-pool parameter invalid +" "$LINENO" 5 +fi; + +if test x$POOL = xinternal; then + +$as_echo "#define POOL_INTERNAL 1" >>confdefs.h -if test x$DEBUG = xyes; then - COPTIMISE_FLAG= -else - CSCOPE_CMD= fi ################################################################################ -{ $as_echo "$as_me:$LINENO: checking for C optimisation flag" >&5 -$as_echo_n "checking for C optimisation flag... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include support for cluster locking" >&5 +$as_echo_n "checking whether to include support for cluster locking... " >&6; } -# Check whether --with-optimisation was given. -if test "${with_optimisation+set}" = set; then - withval=$with_optimisation; COPTIMISE_FLAG=$withval +# Check whether --with-cluster was given. +if test "${with_cluster+set}" = set; then : + withval=$with_cluster; CLUSTER=$withval fi -{ $as_echo "$as_me:$LINENO: result: $COPTIMISE_FLAG" >&5 -$as_echo "$COPTIMISE_FLAG" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLUSTER" >&5 +$as_echo "$CLUSTER" >&6; } + +if [ "x$CLUSTER" != xnone -a "x$CLUSTER" != xinternal -a "x$CLUSTER" != xshared ]; + then as_fn_error $? "--with-cluster parameter invalid +" "$LINENO" 5 +fi; + +if test x$CLUSTER = xinternal; then + +$as_echo "#define CLUSTER_LOCKING_INTERNAL 1" >>confdefs.h + +fi ################################################################################ -{ $as_echo "$as_me:$LINENO: checking whether to gather gcov profiling data" >&5 -$as_echo_n "checking whether to gather gcov profiling data... " >&6; } -# Check whether --enable-profiling was given. -if test "${enable_profiling+set}" = set; then - enableval=$enable_profiling; PROFILING=$enableval +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include snapshots" >&5 +$as_echo_n "checking whether to include snapshots... " >&6; } + +# Check whether --with-snapshots was given. +if test "${with_snapshots+set}" = set; then : + withval=$with_snapshots; SNAPSHOTS=$withval else - PROFILING=no + SNAPSHOTS=internal fi -{ $as_echo "$as_me:$LINENO: result: $PROFILING" >&5 -$as_echo "$PROFILING" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SNAPSHOTS" >&5 +$as_echo "$SNAPSHOTS" >&6; } -if test "x$PROFILING" = xyes; then - COPTIMISE_FLAG="$COPTIMISE_FLAG -fprofile-arcs -ftest-coverage" - # Extract the first word of "lcov", so it can be a program name with args. -set dummy lcov; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_LCOV+set}" = set; then - $as_echo_n "(cached) " >&6 -else - case $LCOV in - [\\/]* | ?:[\\/]*) - ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS +if [ "x$SNAPSHOTS" != xnone -a "x$SNAPSHOTS" != xinternal -a "x$SNAPSHOTS" != xshared ]; + then as_fn_error $? "--with-snapshots parameter invalid +" "$LINENO" 5 +fi; + +if test x$SNAPSHOTS = xinternal; then + +$as_echo "#define SNAPSHOT_INTERNAL 1" >>confdefs.h - ;; -esac fi -LCOV=$ac_cv_path_LCOV -if test -n "$LCOV"; then - { $as_echo "$as_me:$LINENO: result: $LCOV" >&5 -$as_echo "$LCOV" >&6; } + +################################################################################ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include mirrors" >&5 +$as_echo_n "checking whether to include mirrors... " >&6; } + +# Check whether --with-mirrors was given. +if test "${with_mirrors+set}" = set; then : + withval=$with_mirrors; MIRRORS=$withval else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + MIRRORS=internal fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIRRORS" >&5 +$as_echo "$MIRRORS" >&6; } - # Extract the first word of "genhtml", so it can be a program name with args. -set dummy genhtml; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_GENHTML+set}" = set; then - $as_echo_n "(cached) " >&6 -else - case $GENHTML in - [\\/]* | ?:[\\/]*) - ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS +if [ "x$MIRRORS" != xnone -a "x$MIRRORS" != xinternal -a "x$MIRRORS" != xshared ]; + then as_fn_error $? "--with-mirrors parameter invalid +" "$LINENO" 5 +fi; + +if test x$MIRRORS = xinternal; then + +$as_echo "#define MIRRORED_INTERNAL 1" >>confdefs.h - ;; -esac -fi -GENHTML=$ac_cv_path_GENHTML -if test -n "$GENHTML"; then - { $as_echo "$as_me:$LINENO: result: $GENHTML" >&5 -$as_echo "$GENHTML" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } fi +################################################################################ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include replicators" >&5 +$as_echo_n "checking whether to include replicators... " >&6; } - if test -z "$LCOV" -o -z "$GENHTML"; then - { { $as_echo "$as_me:$LINENO: error: lcov and genhtml are required for profiling" >&5 -$as_echo "$as_me: error: lcov and genhtml are required for profiling" >&2;} - { (exit 1); exit 1; }; } - fi - # Extract the first word of "genpng", so it can be a program name with args. -set dummy genpng; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_GENPNG+set}" = set; then - $as_echo_n "(cached) " >&6 +# Check whether --with-replicators was given. +if test "${with_replicators+set}" = set; then : + withval=$with_replicators; REPLICATORS=$withval else - case $GENPNG in - [\\/]* | ?:[\\/]*) - ac_cv_path_GENPNG="$GENPNG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_GENPNG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS + REPLICATORS=none +fi - ;; +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $REPLICATORS" >&5 +$as_echo "$REPLICATORS" >&6; } + +case "$REPLICATORS" in + none|shared) ;; + internal) +$as_echo "#define REPLICATOR_INTERNAL 1" >>confdefs.h + ;; + *) as_fn_error $? "--with-replicators parameter invalid ($REPLICATORS)" "$LINENO" 5 ;; esac -fi -GENPNG=$ac_cv_path_GENPNG -if test -n "$GENPNG"; then - { $as_echo "$as_me:$LINENO: result: $GENPNG" >&5 -$as_echo "$GENPNG" >&6; } + +################################################################################ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable readline" >&5 +$as_echo_n "checking whether to enable readline... " >&6; } +# Check whether --enable-readline was given. +if test "${enable_readline+set}" = set; then : + enableval=$enable_readline; READLINE=$enableval else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + READLINE=maybe fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE" >&5 +$as_echo "$READLINE" >&6; } - if test -n "$GENPNG"; then - { $as_echo "$as_me:$LINENO: checking whether $GENPNG has all required modules" >&5 -$as_echo_n "checking whether $GENPNG has all required modules... " >&6; } - if $GENPNG --help > /dev/null 2>&1 ; then - { $as_echo "$as_me:$LINENO: result: ok" >&5 -$as_echo "ok" >&6; } - GENHTML="$GENHTML --frames" - else - { $as_echo "$as_me:$LINENO: result: not supported" >&5 -$as_echo "not supported" >&6; } - { $as_echo "$as_me:$LINENO: WARNING: GD.pm perl module is not installed" >&5 -$as_echo "$as_me: WARNING: GD.pm perl module is not installed" >&2;} - GENPNG= - fi - fi +################################################################################ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable realtime support" >&5 +$as_echo_n "checking whether to enable realtime support... " >&6; } +# Check whether --enable-realtime was given. +if test "${enable_realtime+set}" = set; then : + enableval=$enable_realtime; REALTIME=$enableval fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $REALTIME" >&5 +$as_echo "$REALTIME" >&6; } + ################################################################################ -{ $as_echo "$as_me:$LINENO: checking whether to enable unit testing" >&5 -$as_echo_n "checking whether to enable unit testing... " >&6; } -# Check whether --enable-testing was given. -if test "${enable_testing+set}" = set; then - enableval=$enable_testing; TESTING=$enableval +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable OCF resource agents" >&5 +$as_echo_n "checking whether to enable OCF resource agents... " >&6; } +# Check whether --enable-ocf was given. +if test "${enable_ocf+set}" = set; then : + enableval=$enable_ocf; OCF=$enableval else - TESTING=no + OCF=no fi -{ $as_echo "$as_me:$LINENO: result: $TESTING" >&5 -$as_echo "$TESTING" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCF" >&5 +$as_echo "$OCF" >&6; } -if test "$TESTING" = yes; then - # Extract the first word of "ruby1.9", so it can be a program name with args. -set dummy ruby1.9; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +################################################################################ +pkg_config_init() { + + + + + + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_RUBY19+set}" = set; then +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else - case $RUBY19 in + case $PKG_CONFIG in [\\/]* | ?:[\\/]*) - ac_cv_path_RUBY19="$RUBY19" # Let the user override the test with a path. + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -14291,39 +6935,42 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_RUBY19="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; esac fi -RUBY19=$ac_cv_path_RUBY19 -if test -n "$RUBY19"; then - { $as_echo "$as_me:$LINENO: result: $RUBY19" >&5 -$as_echo "$RUBY19" >&6; } +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - # Extract the first word of "valgrind", so it can be a program name with args. -set dummy valgrind; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_VALGRIND+set}" = set; then +if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else - case $VALGRIND in + case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) - ac_cv_path_VALGRIND="$VALGRIND" # Let the user override the test with a path. + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -14331,252 +6978,221 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_VALGRIND="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; esac fi -VALGRIND=$ac_cv_path_VALGRIND -if test -n "$VALGRIND"; then - { $as_echo "$as_me:$LINENO: result: $VALGRIND" >&5 -$as_echo "$VALGRIND" >&6; } +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +$as_echo "$ac_pt_PKG_CONFIG" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - - if test -z "$RUBY19" -o -z "$VALGRIND"; then - { { $as_echo "$as_me:$LINENO: error: ruby1.9 and valgrind are required for testing" >&5 -$as_echo "$as_me: error: ruby1.9 and valgrind are required for testing" >&2;} - { (exit 1); exit 1; }; } - fi -fi - -################################################################################ -{ $as_echo "$as_me:$LINENO: checking whether to enable valgrind awareness of pools" >&5 -$as_echo_n "checking whether to enable valgrind awareness of pools... " >&6; } -# Check whether --enable-valgrind_pool was given. -if test "${enable_valgrind_pool+set}" = set; then - enableval=$enable_valgrind_pool; VALGRIND_POOL=$enableval + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi else - VALGRIND_POOL=no + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi -{ $as_echo "$as_me:$LINENO: result: $VALGRIND_POOL" >&5 -$as_echo "$VALGRIND_POOL" >&6; } +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + PKG_CONFIG="" + fi +fi -if test "$VALGRIND_POOL" = yes; then +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PKGCONFIGINIT" >&5 +$as_echo_n "checking for PKGCONFIGINIT... " >&6; } -for ac_header in valgrind/memcheck.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if test -n "$PKGCONFIGINIT_CFLAGS"; then + pkg_cv_PKGCONFIGINIT_CFLAGS="$PKGCONFIGINIT_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pkgconfiginit\""; } >&5 + ($PKG_CONFIG --exists --print-errors "pkgconfiginit") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_PKGCONFIGINIT_CFLAGS=`$PKG_CONFIG --cflags "pkgconfiginit" 2>/dev/null` else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no + pkg_failed=yes fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + else + pkg_failed=untried +fi +if test -n "$PKGCONFIGINIT_LIBS"; then + pkg_cv_PKGCONFIGINIT_LIBS="$PKGCONFIGINIT_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pkgconfiginit\""; } >&5 + ($PKG_CONFIG --exists --print-errors "pkgconfiginit") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_PKGCONFIGINIT_LIBS=`$PKG_CONFIG --libs "pkgconfiginit" 2>/dev/null` else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no + pkg_failed=yes +fi + else + pkg_failed=untried fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF + if test $_pkg_short_errors_supported = yes; then + PKGCONFIGINIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "pkgconfiginit" 2>&1` + else + PKGCONFIGINIT_PKG_ERRORS=`$PKG_CONFIG --print-errors "pkgconfiginit" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$PKGCONFIGINIT_PKG_ERRORS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: pkg-config initialized" >&5 +$as_echo "pkg-config initialized" >&6; } +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: pkg-config initialized" >&5 +$as_echo "pkg-config initialized" >&6; } else - { { $as_echo "$as_me:$LINENO: error: bailing out" >&5 -$as_echo "$as_me: error: bailing out" >&2;} - { (exit 1); exit 1; }; } -fi + PKGCONFIGINIT_CFLAGS=$pkg_cv_PKGCONFIGINIT_CFLAGS + PKGCONFIGINIT_LIBS=$pkg_cv_PKGCONFIGINIT_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -done +fi + PKGCONFIG_INIT=1 +} +################################################################################ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build cluster LVM daemon" >&5 +$as_echo_n "checking whether to build cluster LVM daemon... " >&6; } -cat >>confdefs.h <<\_ACEOF -#define VALGRIND_POOL 1 -_ACEOF +# Check whether --with-clvmd was given. +if test "${with_clvmd+set}" = set; then : + withval=$with_clvmd; CLVMD=$withval +else + CLVMD=none +fi +if test x$CLVMD = xyes; then + CLVMD=all fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLVMD" >&5 +$as_echo "$CLVMD" >&6; } -################################################################################ -{ $as_echo "$as_me:$LINENO: checking whether to use device-mapper" >&5 -$as_echo_n "checking whether to use device-mapper... " >&6; } -# Check whether --enable-devmapper was given. -if test "${enable_devmapper+set}" = set; then - enableval=$enable_devmapper; DEVMAPPER=$enableval +if test x$CLVMD != xnone && test x$CLUSTER = xnone; then + CLUSTER=internal fi -{ $as_echo "$as_me:$LINENO: result: $DEVMAPPER" >&5 -$as_echo "$DEVMAPPER" >&6; } +if test x$CLVMD != xnone && test x$PKGCONFIG_INIT != x1; then + pkg_config_init +fi -if test x$DEVMAPPER = xyes; then +CLVMD_CMANAGERS="" +CLVMD_NEEDS_QDISKD=no -cat >>confdefs.h <<\_ACEOF -#define DEVMAPPER_SUPPORT 1 -_ACEOF +if [ `expr x"$CLVMD" : '.*gulm.*'` != 0 ]; then + BUILDGULM=yes + CLVMD_CMANAGERS="$CLVMD_CMANAGERS lock_gulmd" + CLVMD_NEEDS_QDISKD=yes +fi +if [ `expr x"$CLVMD" : '.*cman.*'` != 0 ]; then + BUILDCMAN=yes + CLVMD_CMANAGERS="$CLVMD_CMANAGERS cman" + CLVMD_NEEDS_QDISKD=yes +fi +if [ `expr x"$CLVMD" : '.*corosync.*'` != 0 ]; then + BUILDCOROSYNC=yes + CLVMD_CMANAGERS="$CLVMD_CMANAGERS corosync" +fi +if [ `expr x"$CLVMD" : '.*openais.*'` != 0 ]; then + BUILDOPENAIS=yes + CLVMD_CMANAGERS="$CLVMD_CMANAGERS openais" +fi +if test x$CLVMD_NEEDS_QDISKD != xno; then + CLVMD_CMANAGERS="$CLVMD_CMANAGERS qdiskd" +fi +if test x$BUILDGULM = xyes; then + if test x$BUILDCOROSYNC = xyes || \ + test x$BUILDOPENAIS = xyes; then + as_fn_error $? "requested clvmd configuration is not valid" "$LINENO" 5 + fi fi -################################################################################ -{ $as_echo "$as_me:$LINENO: checking whether to enable synchronisation with udev processing" >&5 -$as_echo_n "checking whether to enable synchronisation with udev processing... " >&6; } -# Check whether --enable-udev_sync was given. -if test "${enable_udev_sync+set}" = set; then - enableval=$enable_udev_sync; UDEV_SYNC=$enableval +soft_bailout() { + NOTFOUND=1 +} + +hard_bailout() { + as_fn_error $? "bailing out" "$LINENO" 5 +} + +if test x$CLVMD = xall; then + bailout=soft_bailout + BUILDGULM=yes + BUILDCMAN=yes + BUILDCOROSYNC=yes + BUILDOPENAIS=yes else - UDEV_SYNC=no + bailout=hard_bailout fi -{ $as_echo "$as_me:$LINENO: result: $UDEV_SYNC" >&5 -$as_echo "$UDEV_SYNC" >&6; } - -if test x$UDEV_SYNC = xyes; then - { $as_echo "$as_me:$LINENO: checking for udev_queue_get_udev_is_active in -ludev" >&5 -$as_echo_n "checking for udev_queue_get_udev_is_active in -ludev... " >&6; } -if test "${ac_cv_lib_udev_udev_queue_get_udev_is_active+set}" = set; then +check_lib_no_libs() { + lib_no_libs_arg1=$1 + shift + lib_no_libs_arg2=$1 + shift + lib_no_libs_args=$@ + as_ac_Lib=`$as_echo "ac_cv_lib_$lib_no_libs_arg1''_$lib_no_libs_arg2" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $lib_no_libs_arg2 in -l$lib_no_libs_arg1" >&5 +$as_echo_n "checking for $lib_no_libs_arg2 in -l$lib_no_libs_arg1... " >&6; } +if eval "test \"\${$as_ac_Lib+set}\"" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-ludev $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +LIBS="-l$lib_no_libs_arg1 $lib_no_libs_args $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -14585,1674 +7201,1430 @@ #ifdef __cplusplus extern "C" #endif -char udev_queue_get_udev_is_active (); +char $lib_no_libs_arg2 (); int main () { -return udev_queue_get_udev_is_active (); +return $lib_no_libs_arg2 (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_udev_udev_queue_get_udev_is_active=yes +if ac_fn_c_try_link "$LINENO"; then : + eval "$as_ac_Lib=yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_Lib=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +eval ac_res=\$$as_ac_Lib + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_LIB$lib_no_libs_arg1" | $as_tr_cpp` 1 +_ACEOF - ac_cv_lib_udev_udev_queue_get_udev_is_active=no + LIBS="-l$lib_no_libs_arg1 $LIBS" + +else + $bailout fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + LIBS=$ac_check_lib_save_LIBS +} + +if test x$BUILDGULM = xyes; then + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCS" >&5 +$as_echo_n "checking for CCS... " >&6; } + +if test -n "$CCS_CFLAGS"; then + pkg_cv_CCS_CFLAGS="$CCS_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libccs\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libccs") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CCS_CFLAGS=`$PKG_CONFIG --cflags "libccs" 2>/dev/null` +else + pkg_failed=yes fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_udev_udev_queue_get_udev_is_active" >&5 -$as_echo "$ac_cv_lib_udev_udev_queue_get_udev_is_active" >&6; } -if test "x$ac_cv_lib_udev_udev_queue_get_udev_is_active" = x""yes; then - UDEV_PC="libudev"; UDEV_LIBS="-ludev" + else + pkg_failed=untried +fi +if test -n "$CCS_LIBS"; then + pkg_cv_CCS_LIBS="$CCS_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libccs\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libccs") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CCS_LIBS=`$PKG_CONFIG --libs "libccs" 2>/dev/null` else - { { $as_echo "$as_me:$LINENO: error: bailing out... libudev library is required" >&5 -$as_echo "$as_me: error: bailing out... libudev library is required" >&2;} - { (exit 1); exit 1; }; } + pkg_failed=yes +fi + else + pkg_failed=untried fi -cat >>confdefs.h <<\_ACEOF -#define UDEV_SYNC_SUPPORT 1 + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + CCS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libccs" 2>&1` + else + CCS_PKG_ERRORS=`$PKG_CONFIG --print-errors "libccs" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$CCS_PKG_ERRORS" >&5 + + NOTFOUND=0 + for ac_header in ccs.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "ccs.h" "ac_cv_header_ccs_h" "$ac_includes_default" +if test "x$ac_cv_header_ccs_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_CCS_H 1 _ACEOF +else + $bailout fi -{ $as_echo "$as_me:$LINENO: checking whether to enable installation of udev rules required for synchronisation" >&5 -$as_echo_n "checking whether to enable installation of udev rules required for synchronisation... " >&6; } -# Check whether --enable-udev_rules was given. -if test "${enable_udev_rules+set}" = set; then - enableval=$enable_udev_rules; UDEV_RULES=$enableval +done + + check_lib_no_libs ccs ccs_connect + if test $NOTFOUND = 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no pkg for libccs, using -lccs" >&5 +$as_echo "no pkg for libccs, using -lccs" >&6; } + CCS_LIBS="-lccs" + HAVE_CCS=yes + fi +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + NOTFOUND=0 + for ac_header in ccs.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "ccs.h" "ac_cv_header_ccs_h" "$ac_includes_default" +if test "x$ac_cv_header_ccs_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_CCS_H 1 +_ACEOF + else - UDEV_RULES=$UDEV_SYNC + $bailout +fi + +done + + check_lib_no_libs ccs ccs_connect + if test $NOTFOUND = 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no pkg for libccs, using -lccs" >&5 +$as_echo "no pkg for libccs, using -lccs" >&6; } + CCS_LIBS="-lccs" + HAVE_CCS=yes + fi +else + CCS_CFLAGS=$pkg_cv_CCS_CFLAGS + CCS_LIBS=$pkg_cv_CCS_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_CCS=yes fi -{ $as_echo "$as_me:$LINENO: result: $UDEV_RULES" >&5 -$as_echo "$UDEV_RULES" >&6; } +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GULM" >&5 +$as_echo_n "checking for GULM... " >&6; } -################################################################################ -# Check whether --enable-compat was given. -if test "${enable_compat+set}" = set; then - enableval=$enable_compat; DM_COMPAT=$enableval +if test -n "$GULM_CFLAGS"; then + pkg_cv_GULM_CFLAGS="$GULM_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libgulm\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libgulm") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_GULM_CFLAGS=`$PKG_CONFIG --cflags "libgulm" 2>/dev/null` else - DM_COMPAT=no + pkg_failed=yes fi - - -################################################################################ -# Check whether --enable-units-compat was given. -if test "${enable_units_compat+set}" = set; then - enableval=$enable_units_compat; UNITS_COMPAT=$enableval + else + pkg_failed=untried +fi +if test -n "$GULM_LIBS"; then + pkg_cv_GULM_LIBS="$GULM_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libgulm\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libgulm") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_GULM_LIBS=`$PKG_CONFIG --libs "libgulm" 2>/dev/null` else - UNITS_COMPAT=no + pkg_failed=yes +fi + else + pkg_failed=untried fi -if test x$UNITS_COMPAT = xyes; then - -cat >>confdefs.h <<\_ACEOF -#define DEFAULT_SI_UNIT_CONSISTENCY 0 -_ACEOF -fi +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } -################################################################################ -# Check whether --enable-ioctl was given. -if test "${enable_ioctl+set}" = set; then - enableval=$enable_ioctl; DM_IOCTLS=$enableval +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no fi + if test $_pkg_short_errors_supported = yes; then + GULM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libgulm" 2>&1` + else + GULM_PKG_ERRORS=`$PKG_CONFIG --print-errors "libgulm" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$GULM_PKG_ERRORS" >&5 + NOTFOUND=0 + for ac_header in libgulm.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "libgulm.h" "ac_cv_header_libgulm_h" "$ac_includes_default" +if test "x$ac_cv_header_libgulm_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBGULM_H 1 +_ACEOF -################################################################################ -{ $as_echo "$as_me:$LINENO: checking whether to enable O_DIRECT" >&5 -$as_echo_n "checking whether to enable O_DIRECT... " >&6; } -# Check whether --enable-o_direct was given. -if test "${enable_o_direct+set}" = set; then - enableval=$enable_o_direct; ODIRECT=$enableval +else + $bailout fi -{ $as_echo "$as_me:$LINENO: result: $ODIRECT" >&5 -$as_echo "$ODIRECT" >&6; } - -if test x$ODIRECT = xyes; then +done -cat >>confdefs.h <<\_ACEOF -#define O_DIRECT_SUPPORT 1 + check_lib_no_libs gulm lg_core_login + if test $NOTFOUND = 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no pkg for libgulm, using -lgulm" >&5 +$as_echo "no pkg for libgulm, using -lgulm" >&6; } + GULM_LIBS="-lgulm" + HAVE_GULM=yes + fi +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + NOTFOUND=0 + for ac_header in libgulm.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "libgulm.h" "ac_cv_header_libgulm_h" "$ac_includes_default" +if test "x$ac_cv_header_libgulm_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBGULM_H 1 _ACEOF -fi - -################################################################################ -{ $as_echo "$as_me:$LINENO: checking whether to build liblvm2app.so application library" >&5 -$as_echo_n "checking whether to build liblvm2app.so application library... " >&6; } -# Check whether --enable-applib was given. -if test "${enable_applib+set}" = set; then - enableval=$enable_applib; APPLIB=$enableval else - APPLIB=no + $bailout fi -{ $as_echo "$as_me:$LINENO: result: $APPLIB" >&5 -$as_echo "$APPLIB" >&6; } - -test x$APPLIB = xyes \ - && LVM2APP_LIB=-llvm2app \ - || LVM2APP_LIB= +done -################################################################################ -{ $as_echo "$as_me:$LINENO: checking whether to compile liblvm2cmd.so" >&5 -$as_echo_n "checking whether to compile liblvm2cmd.so... " >&6; } -# Check whether --enable-cmdlib was given. -if test "${enable_cmdlib+set}" = set; then - enableval=$enable_cmdlib; CMDLIB=$enableval + check_lib_no_libs gulm lg_core_login + if test $NOTFOUND = 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no pkg for libgulm, using -lgulm" >&5 +$as_echo "no pkg for libgulm, using -lgulm" >&6; } + GULM_LIBS="-lgulm" + HAVE_GULM=yes + fi else - CMDLIB=no + GULM_CFLAGS=$pkg_cv_GULM_CFLAGS + GULM_LIBS=$pkg_cv_GULM_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_GULM=yes +fi fi -{ $as_echo "$as_me:$LINENO: result: $CMDLIB" >&5 -$as_echo "$CMDLIB" >&6; } +if test x$BUILDCMAN = xyes; then -test x$CMDLIB = xyes \ - && LVM2CMD_LIB=-llvm2cmd \ - || LVM2CMD_LIB= +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMAN" >&5 +$as_echo_n "checking for CMAN... " >&6; } -################################################################################ -# Check whether --enable-pkgconfig was given. -if test "${enable_pkgconfig+set}" = set; then - enableval=$enable_pkgconfig; PKGCONFIG=$enableval +if test -n "$CMAN_CFLAGS"; then + pkg_cv_CMAN_CFLAGS="$CMAN_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcman\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libcman") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CMAN_CFLAGS=`$PKG_CONFIG --cflags "libcman" 2>/dev/null` else - PKGCONFIG=no + pkg_failed=yes fi - - -################################################################################ -# Check whether --enable-write_install was given. -if test "${enable_write_install+set}" = set; then - enableval=$enable_write_install; WRITE_INSTALL=$enableval + else + pkg_failed=untried +fi +if test -n "$CMAN_LIBS"; then + pkg_cv_CMAN_LIBS="$CMAN_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcman\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libcman") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CMAN_LIBS=`$PKG_CONFIG --libs "libcman" 2>/dev/null` else - WRITE_INSTALL=no + pkg_failed=yes +fi + else + pkg_failed=untried fi -################################################################################ -{ $as_echo "$as_me:$LINENO: checking whether to install fsadm" >&5 -$as_echo_n "checking whether to install fsadm... " >&6; } -# Check whether --enable-fsadm was given. -if test "${enable_fsadm+set}" = set; then - enableval=$enable_fsadm; FSADM=$enableval -fi -{ $as_echo "$as_me:$LINENO: result: $FSADM" >&5 -$as_echo "$FSADM" >&6; } +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } -################################################################################ -{ $as_echo "$as_me:$LINENO: checking whether to use dmeventd" >&5 -$as_echo_n "checking whether to use dmeventd... " >&6; } -# Check whether --enable-dmeventd was given. -if test "${enable_dmeventd+set}" = set; then - enableval=$enable_dmeventd; DMEVENTD=$enableval +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no fi + if test $_pkg_short_errors_supported = yes; then + CMAN_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libcman" 2>&1` + else + CMAN_PKG_ERRORS=`$PKG_CONFIG --print-errors "libcman" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$CMAN_PKG_ERRORS" >&5 -{ $as_echo "$as_me:$LINENO: result: $DMEVENTD" >&5 -$as_echo "$DMEVENTD" >&6; } - -BUILD_DMEVENTD=$DMEVENTD + NOTFOUND=0 + for ac_header in libcman.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "libcman.h" "ac_cv_header_libcman_h" "$ac_includes_default" +if test "x$ac_cv_header_libcman_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBCMAN_H 1 +_ACEOF -if test x$DMEVENTD = xyes; then - if test x$MIRRORS != xinternal; then - { { $as_echo "$as_me:$LINENO: error: --enable-dmeventd currently requires --with-mirrors=internal - " >&5 -$as_echo "$as_me: error: --enable-dmeventd currently requires --with-mirrors=internal - " >&2;} - { (exit 1); exit 1; }; } - fi - if test x$CMDLIB = xno; then - { { $as_echo "$as_me:$LINENO: error: --enable-dmeventd requires --enable-cmdlib to be used as well - " >&5 -$as_echo "$as_me: error: --enable-dmeventd requires --enable-cmdlib to be used as well - " >&2;} - { (exit 1); exit 1; }; } - fi +else + $bailout fi -if test x$DMEVENTD = xyes; then +done -cat >>confdefs.h <<\_ACEOF -#define DMEVENTD 1 + check_lib_no_libs cman cman_init + if test $NOTFOUND = 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no pkg for libcman, using -lcman" >&5 +$as_echo "no pkg for libcman, using -lcman" >&6; } + CMAN_LIBS="-lcman" + HAVE_CMAN=yes + fi +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + NOTFOUND=0 + for ac_header in libcman.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "libcman.h" "ac_cv_header_libcman_h" "$ac_includes_default" +if test "x$ac_cv_header_libcman_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBCMAN_H 1 _ACEOF +else + $bailout fi -################################################################################ +done -{ $as_echo "$as_me:$LINENO: checking for getline in -lc" >&5 -$as_echo_n "checking for getline in -lc... " >&6; } -if test "${ac_cv_lib_c_getline+set}" = set; then - $as_echo_n "(cached) " >&6 + check_lib_no_libs cman cman_init + if test $NOTFOUND = 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no pkg for libcman, using -lcman" >&5 +$as_echo "no pkg for libcman, using -lcman" >&6; } + CMAN_LIBS="-lcman" + HAVE_CMAN=yes + fi else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lc $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ + CMAN_CFLAGS=$pkg_cv_CMAN_CFLAGS + CMAN_LIBS=$pkg_cv_CMAN_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_CMAN=yes +fi + CHECKCONFDB=yes + CHECKDLM=yes +fi -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char getline (); -int -main () -{ -return getline (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if test x$BUILDCOROSYNC = xyes || \ + test x$BUILDOPENAIS = xyes; then + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for COROSYNC" >&5 +$as_echo_n "checking for COROSYNC... " >&6; } + +if test -n "$COROSYNC_CFLAGS"; then + pkg_cv_COROSYNC_CFLAGS="$COROSYNC_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"corosync\""; } >&5 + ($PKG_CONFIG --exists --print-errors "corosync") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_c_getline=yes + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_COROSYNC_CFLAGS=`$PKG_CONFIG --cflags "corosync" 2>/dev/null` else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_c_getline=no + pkg_failed=yes fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + else + pkg_failed=untried fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_getline" >&5 -$as_echo "$ac_cv_lib_c_getline" >&6; } -if test "x$ac_cv_lib_c_getline" = x""yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GETLINE 1 -_ACEOF - +if test -n "$COROSYNC_LIBS"; then + pkg_cv_COROSYNC_LIBS="$COROSYNC_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"corosync\""; } >&5 + ($PKG_CONFIG --exists --print-errors "corosync") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_COROSYNC_LIBS=`$PKG_CONFIG --libs "corosync" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried fi -################################################################################ -{ $as_echo "$as_me:$LINENO: checking for canonicalize_file_name in -lc" >&5 -$as_echo_n "checking for canonicalize_file_name in -lc... " >&6; } -if test "${ac_cv_lib_c_canonicalize_file_name+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lc $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char canonicalize_file_name (); -int -main () -{ -return canonicalize_file_name (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_c_canonicalize_file_name=yes +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_c_canonicalize_file_name=no + _pkg_short_errors_supported=no fi + if test $_pkg_short_errors_supported = yes; then + COROSYNC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "corosync" 2>&1` + else + COROSYNC_PKG_ERRORS=`$PKG_CONFIG --print-errors "corosync" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$COROSYNC_PKG_ERRORS" >&5 -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + $bailout +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + $bailout +else + COROSYNC_CFLAGS=$pkg_cv_COROSYNC_CFLAGS + COROSYNC_LIBS=$pkg_cv_COROSYNC_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_COROSYNC=yes fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_canonicalize_file_name" >&5 -$as_echo "$ac_cv_lib_c_canonicalize_file_name" >&6; } -if test "x$ac_cv_lib_c_canonicalize_file_name" = x""yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_CANONICALIZE_FILE_NAME 1 -_ACEOF - + CHECKCONFDB=yes fi +if test x$BUILDCOROSYNC = xyes; then -################################################################################ -if [ "x$exec_prefix" = xNONE -a "x$prefix" = xNONE ]; - then exec_prefix=""; -fi; +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for QUORUM" >&5 +$as_echo_n "checking for QUORUM... " >&6; } -################################################################################ -{ $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - $as_echo_n "(cached) " >&6 +if test -n "$QUORUM_CFLAGS"; then + pkg_cv_QUORUM_CFLAGS="$QUORUM_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libquorum\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libquorum") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_QUORUM_CFLAGS=`$PKG_CONFIG --cflags "libquorum" 2>/dev/null` else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$QUORUM_LIBS"; then + pkg_cv_QUORUM_LIBS="$QUORUM_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libquorum\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libquorum") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_dl_dlopen=yes + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_QUORUM_LIBS=`$PKG_CONFIG --libs "libquorum" 2>/dev/null` else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dl_dlopen=no + pkg_failed=yes fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + else + pkg_failed=untried fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_LIBDL 1 -_ACEOF - DL_LIBS="-ldl" - HAVE_LIBDL=yes +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + QUORUM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libquorum" 2>&1` + else + QUORUM_PKG_ERRORS=`$PKG_CONFIG --print-errors "libquorum" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$QUORUM_PKG_ERRORS" >&5 - DL_LIBS= - HAVE_LIBDL=no + $bailout +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + $bailout +else + QUORUM_CFLAGS=$pkg_cv_QUORUM_CFLAGS + QUORUM_LIBS=$pkg_cv_QUORUM_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_QUORUM=yes +fi + CHECKCPG=yes + CHECKDLM=yes fi +if test x$BUILDOPENAIS = xyes; then -################################################################################ -if [ \( "x$LVM1" = xshared -o "x$POOL" = xshared -o "x$CLUSTER" = xshared \ - -o "x$SNAPSHOTS" = xshared -o "x$MIRRORS" = xshared \ - \) -a "x$STATIC_LINK" = xyes ]; - then { { $as_echo "$as_me:$LINENO: error: Features cannot be 'shared' when building statically -" >&5 -$as_echo "$as_me: error: Features cannot be 'shared' when building statically -" >&2;} - { (exit 1); exit 1; }; } -fi +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SALCK" >&5 +$as_echo_n "checking for SALCK... " >&6; } -################################################################################ -if [ "$DMEVENTD" = yes -o "$CLVMD" != none ] ; then - { $as_echo "$as_me:$LINENO: checking for pthread_mutex_lock in -lpthread" >&5 -$as_echo_n "checking for pthread_mutex_lock in -lpthread... " >&6; } -if test "${ac_cv_lib_pthread_pthread_mutex_lock+set}" = set; then - $as_echo_n "(cached) " >&6 +if test -n "$SALCK_CFLAGS"; then + pkg_cv_SALCK_CFLAGS="$SALCK_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libSaLck\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libSaLck") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_SALCK_CFLAGS=`$PKG_CONFIG --cflags "libSaLck" 2>/dev/null` else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthread $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_mutex_lock (); -int -main () -{ -return pthread_mutex_lock (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$SALCK_LIBS"; then + pkg_cv_SALCK_LIBS="$SALCK_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libSaLck\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libSaLck") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_pthread_pthread_mutex_lock=yes + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_SALCK_LIBS=`$PKG_CONFIG --libs "libSaLck" 2>/dev/null` else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + - ac_cv_lib_pthread_pthread_mutex_lock=no -fi +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_lock" >&5 -$as_echo "$ac_cv_lib_pthread_pthread_mutex_lock" >&6; } -if test "x$ac_cv_lib_pthread_pthread_mutex_lock" = x""yes; then - PTHREAD_LIBS="-lpthread" +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes else - hard_bailout + _pkg_short_errors_supported=no fi + if test $_pkg_short_errors_supported = yes; then + SALCK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libSaLck" 2>&1` + else + SALCK_PKG_ERRORS=`$PKG_CONFIG --print-errors "libSaLck" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$SALCK_PKG_ERRORS" >&5 + $bailout +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + $bailout +else + SALCK_CFLAGS=$pkg_cv_SALCK_CFLAGS + SALCK_LIBS=$pkg_cv_SALCK_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_SALCK=yes fi - -################################################################################ -{ $as_echo "$as_me:$LINENO: checking whether to enable selinux support" >&5 -$as_echo_n "checking whether to enable selinux support... " >&6; } -# Check whether --enable-selinux was given. -if test "${enable_selinux+set}" = set; then - enableval=$enable_selinux; SELINUX=$enableval + CHECKCPG=yes fi -{ $as_echo "$as_me:$LINENO: result: $SELINUX" >&5 -$as_echo "$SELINUX" >&6; } -################################################################################ -if test x$SELINUX = xyes; then - { $as_echo "$as_me:$LINENO: checking for sepol_check_context in -lsepol" >&5 -$as_echo_n "checking for sepol_check_context in -lsepol... " >&6; } -if test "${ac_cv_lib_sepol_sepol_check_context+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsepol $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char sepol_check_context (); -int -main () -{ -return sepol_check_context (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +if test x$CHECKCONFDB = xyes; then + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CONFDB" >&5 +$as_echo_n "checking for CONFDB... " >&6; } + +if test -n "$CONFDB_CFLAGS"; then + pkg_cv_CONFDB_CFLAGS="$CONFDB_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libconfdb\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libconfdb") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_sepol_sepol_check_context=yes + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CONFDB_CFLAGS=`$PKG_CONFIG --cflags "libconfdb" 2>/dev/null` else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_sepol_sepol_check_context=no + pkg_failed=yes fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + else + pkg_failed=untried +fi +if test -n "$CONFDB_LIBS"; then + pkg_cv_CONFDB_LIBS="$CONFDB_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libconfdb\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libconfdb") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CONFDB_LIBS=`$PKG_CONFIG --libs "libconfdb" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sepol_sepol_check_context" >&5 -$as_echo "$ac_cv_lib_sepol_sepol_check_context" >&6; } -if test "x$ac_cv_lib_sepol_sepol_check_context" = x""yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_SEPOL 1 -_ACEOF - SELINUX_LIBS="-lsepol" -fi +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + CONFDB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libconfdb" 2>&1` + else + CONFDB_PKG_ERRORS=`$PKG_CONFIG --print-errors "libconfdb" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$CONFDB_PKG_ERRORS" >&5 - { $as_echo "$as_me:$LINENO: checking for is_selinux_enabled in -lselinux" >&5 -$as_echo_n "checking for is_selinux_enabled in -lselinux... " >&6; } -if test "${ac_cv_lib_selinux_is_selinux_enabled+set}" = set; then - $as_echo_n "(cached) " >&6 + HAVE_CONFDB=no +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + HAVE_CONFDB=no else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lselinux $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ + CONFDB_CFLAGS=$pkg_cv_CONFDB_CFLAGS + CONFDB_LIBS=$pkg_cv_CONFDB_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_CONFDB=yes +fi -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char is_selinux_enabled (); -int -main () -{ -return is_selinux_enabled (); - ; - return 0; -} + for ac_header in corosync/confdb.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "corosync/confdb.h" "ac_cv_header_corosync_confdb_h" "$ac_includes_default" +if test "x$ac_cv_header_corosync_confdb_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_COROSYNC_CONFDB_H 1 _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_selinux_is_selinux_enabled=yes + HAVE_CONFDB_H=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_selinux_is_selinux_enabled=no + HAVE_CONFDB_H=no fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_selinux_is_selinux_enabled" >&5 -$as_echo "$ac_cv_lib_selinux_is_selinux_enabled" >&6; } -if test "x$ac_cv_lib_selinux_is_selinux_enabled" = x""yes; then +done -for ac_header in selinux/selinux.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + if test x$HAVE_CONFDB != xyes && \ + test x$HAVE_CONFDB_H = xyes; then + check_lib_no_libs confdb confdb_initialize + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no pkg for confdb, using -lconfdb" >&5 +$as_echo "no pkg for confdb, using -lconfdb" >&6; } + CONFDB_LIBS="-lconfdb" + HAVE_CONFDB=yes + fi - ac_header_compiler=no + if test x$BUILDCOROSYNC = xyes && \ + test x$HAVE_CONFDB != xyes && + test x$CLVMD != xall; then + as_fn_error $? "bailing out... confdb library is required" "$LINENO" 5 + fi fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +if test x$CHECKCPG = xyes; then -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPG" >&5 +$as_echo_n "checking for CPG... " >&6; } + +if test -n "$CPG_CFLAGS"; then + pkg_cv_CPG_CFLAGS="$CPG_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcpg\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libcpg") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CPG_CFLAGS=`$PKG_CONFIG --cflags "libcpg" 2>/dev/null` else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$CPG_LIBS"; then + pkg_cv_CPG_LIBS="$CPG_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcpg\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libcpg") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CPG_LIBS=`$PKG_CONFIG --libs "libcpg" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF + if test $_pkg_short_errors_supported = yes; then + CPG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libcpg" 2>&1` + else + CPG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libcpg" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$CPG_PKG_ERRORS" >&5 + $bailout +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + $bailout else - hard_bailout + CPG_CFLAGS=$pkg_cv_CPG_CFLAGS + CPG_LIBS=$pkg_cv_CPG_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_CPG=yes +fi fi -done +if test x$CHECKDLM = xyes; then +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DLM" >&5 +$as_echo_n "checking for DLM... " >&6; } -for ac_header in selinux/label.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +if test -n "$DLM_CFLAGS"; then + pkg_cv_DLM_CFLAGS="$DLM_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdlm\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libdlm") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_DLM_CFLAGS=`$PKG_CONFIG --cflags "libdlm" 2>/dev/null` else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no + pkg_failed=yes fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + else + pkg_failed=untried +fi +if test -n "$DLM_LIBS"; then + pkg_cv_DLM_LIBS="$DLM_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdlm\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libdlm") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_DLM_LIBS=`$PKG_CONFIG --libs "libdlm" 2>/dev/null` else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no + pkg_failed=yes +fi + else + pkg_failed=untried fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes else - eval "$as_ac_Header=\$ac_header_preproc" + _pkg_short_errors_supported=no fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + if test $_pkg_short_errors_supported = yes; then + DLM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libdlm" 2>&1` + else + DLM_PKG_ERRORS=`$PKG_CONFIG --print-errors "libdlm" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$DLM_PKG_ERRORS" >&5 -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then + NOTFOUND=0 + for ac_header in libdlm.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "libdlm.h" "ac_cv_header_libdlm_h" "$ac_includes_default" +if test "x$ac_cv_header_libdlm_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_LIBDLM_H 1 _ACEOF +else + $bailout fi done - -cat >>confdefs.h <<\_ACEOF -#define HAVE_SELINUX 1 + check_lib_no_libs dlm dlm_lock -lpthread + if test $NOTFOUND = 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no pkg for libdlm, using -ldlm" >&5 +$as_echo "no pkg for libdlm, using -ldlm" >&6; } + DLM_LIBS="-ldlm -lpthread" + HAVE_DLM=yes + fi +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + NOTFOUND=0 + for ac_header in libdlm.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "libdlm.h" "ac_cv_header_libdlm_h" "$ac_includes_default" +if test "x$ac_cv_header_libdlm_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBDLM_H 1 _ACEOF - SELINUX_LIBS="-lselinux $SELINUX_LIBS" - SELINUX_PC="libselinux" - HAVE_SELINUX=yes else + $bailout +fi - { $as_echo "$as_me:$LINENO: WARNING: Disabling selinux" >&5 -$as_echo "$as_me: WARNING: Disabling selinux" >&2;} - SELINUX_LIBS= - SELINUX_PC= - HAVE_SELINUX=no +done + + check_lib_no_libs dlm dlm_lock -lpthread + if test $NOTFOUND = 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no pkg for libdlm, using -ldlm" >&5 +$as_echo "no pkg for libdlm, using -ldlm" >&6; } + DLM_LIBS="-ldlm -lpthread" + HAVE_DLM=yes + fi +else + DLM_CFLAGS=$pkg_cv_DLM_CFLAGS + DLM_LIBS=$pkg_cv_DLM_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_DLM=yes +fi fi +if test x$CLVMD = xall; then + CLVMD=none + CLVMD_CMANAGERS="" + CLVMD_NEEDS_QDISKD=no + if test x$HAVE_CCS = xyes && \ + test x$HAVE_GULM = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling clvmd gulm cluster manager" >&5 +$as_echo "Enabling clvmd gulm cluster manager" >&6; } + CLVMD="$CLVMD,gulm" + CLVMD_CMANAGERS="$CLVMD_CMANAGERS lock_gulmd" + CLVMD_NEEDS_QDISKD=yes + fi + if test x$HAVE_CMAN = xyes && \ + test x$HAVE_DLM = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling clvmd cman cluster manager" >&5 +$as_echo "Enabling clvmd cman cluster manager" >&6; } + CLVMD="$CLVMD,cman" + CLVMD_CMANAGERS="$CLVMD_CMANAGERS cman" + CLVMD_NEEDS_QDISKD=yes + fi + if test x$HAVE_COROSYNC = xyes && \ + test x$HAVE_QUORUM = xyes && \ + test x$HAVE_CPG = xyes && \ + test x$HAVE_DLM = xyes && \ + test x$HAVE_CONFDB = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling clvmd corosync cluster manager" >&5 +$as_echo "Enabling clvmd corosync cluster manager" >&6; } + CLVMD="$CLVMD,corosync" + CLVMD_CMANAGERS="$CLVMD_CMANAGERS corosync" + fi + if test x$HAVE_COROSYNC = xyes && \ + test x$HAVE_CPG = xyes && \ + test x$HAVE_SALCK = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling clvmd openais cluster manager" >&5 +$as_echo "Enabling clvmd openais cluster manager" >&6; } + CLVMD="$CLVMD,openais" + CLVMD_CMANAGERS="$CLVMD_CMANAGERS openais" + fi + if test x$CLVMD_NEEDS_QDISKD != xno; then + CLVMD_CMANAGERS="$CLVMD_CMANAGERS qdiskd" + fi + if test x$CLVMD = xnone; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling clvmd build. No cluster manager detected." >&5 +$as_echo "Disabling clvmd build. No cluster manager detected." >&6; } + fi fi ################################################################################ -if test x$REALTIME = xyes; then - { $as_echo "$as_me:$LINENO: checking for clock_gettime in -lrt" >&5 -$as_echo_n "checking for clock_gettime in -lrt... " >&6; } -if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then - $as_echo_n "(cached) " >&6 +if test "x$CLVMD" != xnone; then + +# Check whether --with-clvmd-pidfile was given. +if test "${with_clvmd_pidfile+set}" = set; then : + withval=$with_clvmd_pidfile; CLVMD_PIDFILE=$withval else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lrt $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ + CLVMD_PIDFILE="/var/run/clvmd.pid" +fi -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char clock_gettime (); -int -main () -{ -return clock_gettime (); - ; - return 0; -} + +cat >>confdefs.h <<_ACEOF +#define CLVMD_PIDFILE "$CLVMD_PIDFILE" _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_rt_clock_gettime=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_rt_clock_gettime=no fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +################################################################################ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build cluster mirror log daemon" >&5 +$as_echo_n "checking whether to build cluster mirror log daemon... " >&6; } +# Check whether --enable-cmirrord was given. +if test "${enable_cmirrord+set}" = set; then : + enableval=$enable_cmirrord; CMIRRORD=$enableval +else + CMIRRORD=no fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_rt_clock_gettime" >&5 -$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } -if test "x$ac_cv_lib_rt_clock_gettime" = x""yes; then - HAVE_REALTIME=yes + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMIRRORD" >&5 +$as_echo "$CMIRRORD" >&6; } + +BUILD_CMIRRORD=$CMIRRORD + +################################################################################ +if test "x$BUILD_CMIRRORD" = xyes; then + +# Check whether --with-cmirrord-pidfile was given. +if test "${with_cmirrord_pidfile+set}" = set; then : + withval=$with_cmirrord_pidfile; CMIRRORD_PIDFILE=$withval else - HAVE_REALTIME=no + CMIRRORD_PIDFILE="/var/run/cmirrord.pid" fi - if test x$HAVE_REALTIME = xyes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_REALTIME 1 +cat >>confdefs.h <<_ACEOF +#define CMIRRORD_PIDFILE "$CMIRRORD_PIDFILE" _ACEOF - LIBS="-lrt $LIBS" - else - { $as_echo "$as_me:$LINENO: WARNING: Disabling realtime clock" >&5 -$as_echo "$as_me: WARNING: Disabling realtime clock" >&2;} - fi fi ################################################################################ +if [ "x$BUILD_CMIRRORD" = xyes ]; then + if test x$PKGCONFIG_INIT != x1; then + pkg_config_init + fi -for ac_header in getopt.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SACKPT" >&5 +$as_echo_n "checking for SACKPT... " >&6; } + +if test -n "$SACKPT_CFLAGS"; then + pkg_cv_SACKPT_CFLAGS="$SACKPT_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libSaCkpt\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libSaCkpt") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_SACKPT_CFLAGS=`$PKG_CONFIG --cflags "libSaCkpt" 2>/dev/null` else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no + pkg_failed=yes fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + else + pkg_failed=untried +fi +if test -n "$SACKPT_LIBS"; then + pkg_cv_SACKPT_LIBS="$SACKPT_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libSaCkpt\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libSaCkpt") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_SACKPT_LIBS=`$PKG_CONFIG --libs "libSaCkpt" 2>/dev/null` else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no + pkg_failed=yes +fi + else + pkg_failed=untried fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes else - eval "$as_ac_Header=\$ac_header_preproc" + _pkg_short_errors_supported=no fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + if test $_pkg_short_errors_supported = yes; then + SACKPT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libSaCkpt" 2>&1` + else + SACKPT_PKG_ERRORS=`$PKG_CONFIG --print-errors "libSaCkpt" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$SACKPT_PKG_ERRORS" >&5 -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF + as_fn_error $? "Package requirements (libSaCkpt) were not met: -cat >>confdefs.h <<\_ACEOF -#define HAVE_GETOPTLONG 1 -_ACEOF +$SACKPT_PKG_ERRORS -fi +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. -done +Alternatively, you may set the environment variables SACKPT_CFLAGS +and SACKPT_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. -################################################################################ -if test x$READLINE != xno; then - lvm_saved_libs=$LIBS - { $as_echo "$as_me:$LINENO: checking for library containing tgetent" >&5 -$as_echo_n "checking for library containing tgetent... " >&6; } -if test "${ac_cv_search_tgetent+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +Alternatively, you may set the environment variables SACKPT_CFLAGS +and SACKPT_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char tgetent (); -int -main () -{ -return tgetent (); - ; - return 0; -} -_ACEOF -for ac_lib in '' tinfo ncurses curses termcap termlib; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_search_tgetent=$ac_res -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +To get pkg-config, see . +See \`config.log' for more details" "$LINENO" 5; } +else + SACKPT_CFLAGS=$pkg_cv_SACKPT_CFLAGS + SACKPT_LIBS=$pkg_cv_SACKPT_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi + if test x$HAVE_CPG != xyes; then -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext - if test "${ac_cv_search_tgetent+set}" = set; then - break -fi -done -if test "${ac_cv_search_tgetent+set}" = set; then - : +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPG" >&5 +$as_echo_n "checking for CPG... " >&6; } + +if test -n "$CPG_CFLAGS"; then + pkg_cv_CPG_CFLAGS="$CPG_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcpg\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libcpg") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CPG_CFLAGS=`$PKG_CONFIG --cflags "libcpg" 2>/dev/null` else - ac_cv_search_tgetent=no + pkg_failed=yes fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS + else + pkg_failed=untried fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_tgetent" >&5 -$as_echo "$ac_cv_search_tgetent" >&6; } -ac_res=$ac_cv_search_tgetent -if test "$ac_res" != no; then - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - READLINE_LIBS=$ac_cv_search_tgetent +if test -n "$CPG_LIBS"; then + pkg_cv_CPG_LIBS="$CPG_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcpg\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libcpg") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CPG_LIBS=`$PKG_CONFIG --libs "libcpg" 2>/dev/null` else - - if test "$READLINE" = yes; then - { { $as_echo "$as_me:$LINENO: error: termcap could not be found which is required for the ---enable-readline option (which is enabled by default). Either disable readline -support with --disable-readline or download and install termcap from: - ftp.gnu.org/gnu/termcap -Note: if you are using precompiled packages you will also need the development - package as well (which may be called termcap-devel or something similar). -Note: (n)curses also seems to work as a substitute for termcap. This was - not found either - but you could try installing that as well." >&5 -$as_echo "$as_me: error: termcap could not be found which is required for the ---enable-readline option (which is enabled by default). Either disable readline -support with --disable-readline or download and install termcap from: - ftp.gnu.org/gnu/termcap -Note: if you are using precompiled packages you will also need the development - package as well (which may be called termcap-devel or something similar). -Note: (n)curses also seems to work as a substitute for termcap. This was - not found either - but you could try installing that as well." >&2;} - { (exit 1); exit 1; }; } - fi + pkg_failed=yes +fi + else + pkg_failed=untried fi - { $as_echo "$as_me:$LINENO: checking for readline in -lreadline" >&5 -$as_echo_n "checking for readline in -lreadline... " >&6; } -if test "${ac_cv_lib_readline_readline+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lreadline $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char readline (); -int -main () -{ -return readline (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_readline_readline=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_readline_readline=no -fi +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5 -$as_echo "$ac_cv_lib_readline_readline" >&6; } -if test "x$ac_cv_lib_readline_readline" = x""yes; then + if test $_pkg_short_errors_supported = yes; then + CPG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libcpg" 2>&1` + else + CPG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libcpg" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$CPG_PKG_ERRORS" >&5 + as_fn_error $? "Package requirements (libcpg) were not met: -cat >>confdefs.h <<\_ACEOF -#define READLINE_SUPPORT 1 -_ACEOF +$CPG_PKG_ERRORS - LIBS=$lvm_saved_libs - { $as_echo "$as_me:$LINENO: checking for rl_line_buffer in -lreadline" >&5 -$as_echo_n "checking for rl_line_buffer in -lreadline... " >&6; } -if test "${ac_cv_lib_readline_rl_line_buffer+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lreadline $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables CPG_CFLAGS +and CPG_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 + +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables CPG_CFLAGS +and CPG_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details" "$LINENO" 5; } -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char rl_line_buffer (); -int -main () -{ -return rl_line_buffer (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_readline_rl_line_buffer=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + CPG_CFLAGS=$pkg_cv_CPG_CFLAGS + CPG_LIBS=$pkg_cv_CPG_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } - ac_cv_lib_readline_rl_line_buffer=no +fi + fi fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +################################################################################ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable debugging" >&5 +$as_echo_n "checking whether to enable debugging... " >&6; } +# Check whether --enable-debug was given. +if test "${enable_debug+set}" = set; then : + enableval=$enable_debug; DEBUG=$enableval +else + DEBUG=no fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_line_buffer" >&5 -$as_echo "$ac_cv_lib_readline_rl_line_buffer" >&6; } -if test "x$ac_cv_lib_readline_rl_line_buffer" = x""yes; then - READLINE_LIBS="-lreadline" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG" >&5 +$as_echo "$DEBUG" >&6; } + +if test x$DEBUG = xyes; then + COPTIMISE_FLAG= else + CSCOPE_CMD= +fi - { $as_echo "$as_me:$LINENO: result: linking -lreadline with $READLINE_LIBS needed" >&5 -$as_echo "linking -lreadline with $READLINE_LIBS needed" >&6; } - READLINE_LIBS="-lreadline $READLINE_LIBS" +################################################################################ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C optimisation flag" >&5 +$as_echo_n "checking for C optimisation flag... " >&6; } +# Check whether --with-optimisation was given. +if test "${with_optimisation+set}" = set; then : + withval=$with_optimisation; COPTIMISE_FLAG=$withval fi -else +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COPTIMISE_FLAG" >&5 +$as_echo "$COPTIMISE_FLAG" >&6; } - READLINE_LIBS= - if test "$READLINE" = yes; then - { { $as_echo "$as_me:$LINENO: error: GNU Readline could not be found which is required for the ---enable-readline option (which is enabled by default). Either disable readline -support with --disable-readline or download and install readline from: - ftp.gnu.org/gnu/readline -Note: if you are using precompiled packages you will also need the development -package as well (which may be called readline-devel or something similar)." >&5 -$as_echo "$as_me: error: GNU Readline could not be found which is required for the ---enable-readline option (which is enabled by default). Either disable readline -support with --disable-readline or download and install readline from: - ftp.gnu.org/gnu/readline -Note: if you are using precompiled packages you will also need the development -package as well (which may be called readline-devel or something similar)." >&2;} - { (exit 1); exit 1; }; } - fi +################################################################################ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to gather gcov profiling data" >&5 +$as_echo_n "checking whether to gather gcov profiling data... " >&6; } +# Check whether --enable-profiling was given. +if test "${enable_profiling+set}" = set; then : + enableval=$enable_profiling; PROFILING=$enableval +else + PROFILING=no fi - LIBS="$READLINE_LIBS $lvm_saved_libs" +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROFILING" >&5 +$as_echo "$PROFILING" >&6; } -for ac_func in rl_completion_matches -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +if test "x$PROFILING" = xyes; then + COPTIMISE_FLAG="$COPTIMISE_FLAG -fprofile-arcs -ftest-coverage" + # Extract the first word of "lcov", so it can be a program name with args. +set dummy lcov; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_LCOV+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ + case $LCOV in + [\\/]* | ?:[\\/]*) + ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -#ifdef __STDC__ -# include -#else -# include -#endif + ;; +esac +fi +LCOV=$ac_cv_path_LCOV +if test -n "$LCOV"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5 +$as_echo "$LCOV" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -#undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif + # Extract the first word of "genhtml", so it can be a program name with args. +set dummy genhtml; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_GENHTML+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $GENHTML in + [\\/]* | ?:[\\/]*) + ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; + ;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" +fi +GENHTML=$ac_cv_path_GENHTML +if test -n "$GENHTML"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5 +$as_echo "$GENHTML" >&6; } else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + - eval "$as_ac_var=no" + if test -z "$LCOV" -o -z "$GENHTML"; then + as_fn_error $? "lcov and genhtml are required for profiling" "$LINENO" 5 + fi + # Extract the first word of "genpng", so it can be a program name with args. +set dummy genpng; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_GENPNG+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $GENPNG in + [\\/]* | ?:[\\/]*) + ac_cv_path_GENPNG="$GENPNG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_GENPNG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +GENPNG=$ac_cv_path_GENPNG +if test -n "$GENPNG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENPNG" >&5 +$as_echo "$GENPNG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext + + if test -n "$GENPNG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GENPNG has all required modules" >&5 +$as_echo_n "checking whether $GENPNG has all required modules... " >&6; } + if $GENPNG --help > /dev/null 2>&1 ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } + GENHTML="$GENHTML --frames" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5 +$as_echo "not supported" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GD.pm perl module is not installed" >&5 +$as_echo "$as_me: WARNING: GD.pm perl module is not installed" >&2;} + GENPNG= + fi + fi fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF +################################################################################ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable unit testing" >&5 +$as_echo_n "checking whether to enable unit testing... " >&6; } +# Check whether --enable-testing was given. +if test "${enable_testing+set}" = set; then : + enableval=$enable_testing; TESTING=$enableval +else + TESTING=no fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $TESTING" >&5 +$as_echo "$TESTING" >&6; } + +if test "$TESTING" = yes; then + # Extract the first word of "ruby1.9", so it can be a program name with args. +set dummy ruby1.9; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_RUBY19+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $RUBY19 in + [\\/]* | ?:[\\/]*) + ac_cv_path_RUBY19="$RUBY19" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_RUBY19="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi done + done +IFS=$as_save_IFS - LIBS=$lvm_saved_libs + ;; +esac fi - -################################################################################ -{ $as_echo "$as_me:$LINENO: checking whether to enable internationalisation" >&5 -$as_echo_n "checking whether to enable internationalisation... " >&6; } -# Check whether --enable-nls was given. -if test "${enable_nls+set}" = set; then - enableval=$enable_nls; INTL=$enableval +RUBY19=$ac_cv_path_RUBY19 +if test -n "$RUBY19"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RUBY19" >&5 +$as_echo "$RUBY19" >&6; } else - INTL=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -{ $as_echo "$as_me:$LINENO: result: $INTL" >&5 -$as_echo "$INTL" >&6; } -if test x$INTL = xyes; then -# FIXME - Move this - can be device-mapper too - INTL_PACKAGE="lvm2" - # Extract the first word of "msgfmt", so it can be a program name with args. -set dummy msgfmt; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 + # Extract the first word of "valgrind", so it can be a program name with args. +set dummy valgrind; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MSGFMT+set}" = set; then +if test "${ac_cv_path_VALGRIND+set}" = set; then : $as_echo_n "(cached) " >&6 else - case $MSGFMT in + case $VALGRIND in [\\/]* | ?:[\\/]*) - ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. + ac_cv_path_VALGRIND="$VALGRIND" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -16260,453 +8632,520 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + ac_cv_path_VALGRIND="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; esac fi -MSGFMT=$ac_cv_path_MSGFMT -if test -n "$MSGFMT"; then - { $as_echo "$as_me:$LINENO: result: $MSGFMT" >&5 -$as_echo "$MSGFMT" >&6; } +VALGRIND=$ac_cv_path_VALGRIND +if test -n "$VALGRIND"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VALGRIND" >&5 +$as_echo "$VALGRIND" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - if [ "x$MSGFMT" == x ]; - then { { $as_echo "$as_me:$LINENO: error: msgfmt not found in path $PATH - " >&5 -$as_echo "$as_me: error: msgfmt not found in path $PATH - " >&2;} - { (exit 1); exit 1; }; } - fi; + if test -z "$RUBY19" -o -z "$VALGRIND"; then + as_fn_error $? "ruby1.9 and valgrind are required for testing" "$LINENO" 5 + fi +fi + +################################################################################ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable valgrind awareness of pools" >&5 +$as_echo_n "checking whether to enable valgrind awareness of pools... " >&6; } +# Check whether --enable-valgrind_pool was given. +if test "${enable_valgrind_pool+set}" = set; then : + enableval=$enable_valgrind_pool; VALGRIND_POOL=$enableval +else + VALGRIND_POOL=no +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $VALGRIND_POOL" >&5 +$as_echo "$VALGRIND_POOL" >&6; } + +if test "$VALGRIND_POOL" = yes; then + for ac_header in valgrind/memcheck.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "valgrind/memcheck.h" "ac_cv_header_valgrind_memcheck_h" "$ac_includes_default" +if test "x$ac_cv_header_valgrind_memcheck_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_VALGRIND_MEMCHECK_H 1 +_ACEOF -# Check whether --with-localedir was given. -if test "${with_localedir+set}" = set; then - withval=$with_localedir; LOCALEDIR=$withval else - LOCALEDIR='${prefix}/share/locale' + as_fn_error $? "bailing out" "$LINENO" 5 fi +done + + +$as_echo "#define VALGRIND_POOL 1" >>confdefs.h + fi ################################################################################ - -# Check whether --with-confdir was given. -if test "${with_confdir+set}" = set; then - withval=$with_confdir; CONFDIR=$withval -else - CONFDIR="/etc" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use device-mapper" >&5 +$as_echo_n "checking whether to use device-mapper... " >&6; } +# Check whether --enable-devmapper was given. +if test "${enable_devmapper+set}" = set; then : + enableval=$enable_devmapper; DEVMAPPER=$enableval fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVMAPPER" >&5 +$as_echo "$DEVMAPPER" >&6; } + +if test x$DEVMAPPER = xyes; then +$as_echo "#define DEVMAPPER_SUPPORT 1" >>confdefs.h -# Check whether --with-staticdir was given. -if test "${with_staticdir+set}" = set; then - withval=$with_staticdir; STATICDIR=$withval +fi + +################################################################################ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable synchronisation with udev processing" >&5 +$as_echo_n "checking whether to enable synchronisation with udev processing... " >&6; } +# Check whether --enable-udev_sync was given. +if test "${enable_udev_sync+set}" = set; then : + enableval=$enable_udev_sync; UDEV_SYNC=$enableval else - STATICDIR='${exec_prefix}/sbin' + UDEV_SYNC=no fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $UDEV_SYNC" >&5 +$as_echo "$UDEV_SYNC" >&6; } +if test x$UDEV_SYNC = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for udev_queue_get_udev_is_active in -ludev" >&5 +$as_echo_n "checking for udev_queue_get_udev_is_active in -ludev... " >&6; } +if test "${ac_cv_lib_udev_udev_queue_get_udev_is_active+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ludev $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -# Check whether --with-usrlibdir was given. -if test "${with_usrlibdir+set}" = set; then - withval=$with_usrlibdir; usrlibdir=$withval +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char udev_queue_get_udev_is_active (); +int +main () +{ +return udev_queue_get_udev_is_active (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_udev_udev_queue_get_udev_is_active=yes else - usrlibdir='${prefix}/lib' + ac_cv_lib_udev_udev_queue_get_udev_is_active=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_udev_udev_queue_get_udev_is_active" >&5 +$as_echo "$ac_cv_lib_udev_udev_queue_get_udev_is_active" >&6; } +if test "x$ac_cv_lib_udev_udev_queue_get_udev_is_active" = x""yes; then : + UDEV_PC="libudev"; UDEV_LIBS="-ludev" +else + as_fn_error $? "bailing out... libudev library is required" "$LINENO" 5 fi +$as_echo "#define UDEV_SYNC_SUPPORT 1" >>confdefs.h -# Check whether --with-usrsbindir was given. -if test "${with_usrsbindir+set}" = set; then - withval=$with_usrsbindir; usrsbindir=$withval +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable installation of udev rules required for synchronisation" >&5 +$as_echo_n "checking whether to enable installation of udev rules required for synchronisation... " >&6; } +# Check whether --enable-udev_rules was given. +if test "${enable_udev_rules+set}" = set; then : + enableval=$enable_udev_rules; UDEV_RULES=$enableval else - usrsbindir='${prefix}/sbin' + UDEV_RULES=$UDEV_SYNC fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $UDEV_RULES" >&5 +$as_echo "$UDEV_RULES" >&6; } ################################################################################ +# Check whether --enable-compat was given. +if test "${enable_compat+set}" = set; then : + enableval=$enable_compat; DM_COMPAT=$enableval +else + DM_COMPAT=no +fi -# Check whether --with-udev_prefix was given. -if test "${with_udev_prefix+set}" = set; then - withval=$with_udev_prefix; udev_prefix=$withval + +################################################################################ +# Check whether --enable-units-compat was given. +if test "${enable_units_compat+set}" = set; then : + enableval=$enable_units_compat; UNITS_COMPAT=$enableval else - udev_prefix='${exec_prefix}' + UNITS_COMPAT=no fi +if test x$UNITS_COMPAT = xyes; then -# Check whether --with-udevdir was given. -if test "${with_udevdir+set}" = set; then - withval=$with_udevdir; udevdir=$withval -else - udevdir='${udev_prefix}/lib/udev/rules.d' +$as_echo "#define DEFAULT_SI_UNIT_CONSISTENCY 0" >>confdefs.h + +fi + +################################################################################ +# Check whether --enable-ioctl was given. +if test "${enable_ioctl+set}" = set; then : + enableval=$enable_ioctl; DM_IOCTLS=$enableval fi ################################################################################ -if test x$READLINE = xyes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable O_DIRECT" >&5 +$as_echo_n "checking whether to enable O_DIRECT... " >&6; } +# Check whether --enable-o_direct was given. +if test "${enable_o_direct+set}" = set; then : + enableval=$enable_o_direct; ODIRECT=$enableval +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ODIRECT" >&5 +$as_echo "$ODIRECT" >&6; } + +if test x$ODIRECT = xyes; then + +$as_echo "#define O_DIRECT_SUPPORT 1" >>confdefs.h -for ac_header in readline/readline.h readline/history.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +################################################################################ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build liblvm2app.so application library" >&5 +$as_echo_n "checking whether to build liblvm2app.so application library... " >&6; } +# Check whether --enable-applib was given. +if test "${enable_applib+set}" = set; then : + enableval=$enable_applib; APPLIB=$enableval +else + APPLIB=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $APPLIB" >&5 +$as_echo "$APPLIB" >&6; } -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes +test x$APPLIB = xyes \ + && LVM2APP_LIB=-llvm2app \ + || LVM2APP_LIB= + +################################################################################ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to compile liblvm2cmd.so" >&5 +$as_echo_n "checking whether to compile liblvm2cmd.so... " >&6; } +# Check whether --enable-cmdlib was given. +if test "${enable_cmdlib+set}" = set; then : + enableval=$enable_cmdlib; CMDLIB=$enableval else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no + CMDLIB=no fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMDLIB" >&5 +$as_echo "$CMDLIB" >&6; } -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +test x$CMDLIB = xyes \ + && LVM2CMD_LIB=-llvm2cmd \ + || LVM2CMD_LIB= - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 +################################################################################ +# Check whether --enable-pkgconfig was given. +if test "${enable_pkgconfig+set}" = set; then : + enableval=$enable_pkgconfig; PKGCONFIG=$enableval else - eval "$as_ac_Header=\$ac_header_preproc" + PKGCONFIG=no fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +################################################################################ +# Check whether --enable-write_install was given. +if test "${enable_write_install+set}" = set; then : + enableval=$enable_write_install; WRITE_INSTALL=$enableval else - { { $as_echo "$as_me:$LINENO: error: bailing out" >&5 -$as_echo "$as_me: error: bailing out" >&2;} - { (exit 1); exit 1; }; } + WRITE_INSTALL=no fi -done +################################################################################ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to install fsadm" >&5 +$as_echo_n "checking whether to install fsadm... " >&6; } +# Check whether --enable-fsadm was given. +if test "${enable_fsadm+set}" = set; then : + enableval=$enable_fsadm; FSADM=$enableval fi -if test x$CLVMD != xnone; then - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $FSADM" >&5 +$as_echo "$FSADM" >&6; } +################################################################################ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use dmeventd" >&5 +$as_echo_n "checking whether to use dmeventd... " >&6; } +# Check whether --enable-dmeventd was given. +if test "${enable_dmeventd+set}" = set; then : + enableval=$enable_dmeventd; DMEVENTD=$enableval +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DMEVENTD" >&5 +$as_echo "$DMEVENTD" >&6; } +BUILD_DMEVENTD=$DMEVENTD +if test x$DMEVENTD = xyes; then + if test x$MIRRORS != xinternal; then + as_fn_error $? "--enable-dmeventd currently requires --with-mirrors=internal + " "$LINENO" 5 + fi + if test x$CMDLIB = xno; then + as_fn_error $? "--enable-dmeventd requires --enable-cmdlib to be used as well + " "$LINENO" 5 + fi +fi +if test x$DMEVENTD = xyes; then +$as_echo "#define DMEVENTD 1" >>confdefs.h +fi +################################################################################ -for ac_header in mntent.h netdb.h netinet/in.h pthread.h search.h sys/mount.h sys/socket.h sys/uio.h sys/un.h utmpx.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getline in -lc" >&5 +$as_echo_n "checking for getline in -lc... " >&6; } +if test "${ac_cv_lib_c_getline+set}" = set; then : $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + ac_check_lib_save_LIBS=$LIBS +LIBS="-lc $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char getline (); +int +main () +{ +return getline (); + ; + return 0; +} _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_c_getline=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_c_getline=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_getline" >&5 +$as_echo "$ac_cv_lib_c_getline" >&6; } +if test "x$ac_cv_lib_c_getline" = x""yes; then : + +$as_echo "#define HAVE_GETLINE 1" >>confdefs.h - ac_header_compiler=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +################################################################################ + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for canonicalize_file_name in -lc" >&5 +$as_echo_n "checking for canonicalize_file_name in -lc... " >&6; } +if test "${ac_cv_lib_c_canonicalize_file_name+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lc $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include <$ac_header> + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char canonicalize_file_name (); +int +main () +{ +return canonicalize_file_name (); + ; + return 0; +} _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_c_canonicalize_file_name=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_c_canonicalize_file_name=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_canonicalize_file_name" >&5 +$as_echo "$ac_cv_lib_c_canonicalize_file_name" >&6; } +if test "x$ac_cv_lib_c_canonicalize_file_name" = x""yes; then : + +$as_echo "#define HAVE_CANONICALIZE_FILE_NAME 1" >>confdefs.h - ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +################################################################################ +if [ "x$exec_prefix" = xNONE -a "x$prefix" = xNONE ]; + then exec_prefix=""; +fi; - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +################################################################################ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} _ACEOF - +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes else - { { $as_echo "$as_me:$LINENO: error: bailing out" >&5 -$as_echo "$as_me: error: bailing out" >&2;} - { (exit 1); exit 1; }; } + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : -done +$as_echo "#define HAVE_LIBDL 1" >>confdefs.h + DL_LIBS="-ldl" + HAVE_LIBDL=yes +else + DL_LIBS= + HAVE_LIBDL=no +fi +################################################################################ +if [ \( "x$LVM1" = xshared -o "x$POOL" = xshared -o "x$CLUSTER" = xshared \ + -o "x$SNAPSHOTS" = xshared -o "x$MIRRORS" = xshared \ + \) -a "x$STATIC_LINK" = xyes ]; + then as_fn_error $? "Features cannot be 'shared' when building statically +" "$LINENO" 5 +fi -for ac_func in dup2 getmntent memmove select socket -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +################################################################################ +if [ "$DMEVENTD" = yes -o "$CLVMD" != none ] ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_lock in -lpthread" >&5 +$as_echo_n "checking for pthread_mutex_lock in -lpthread... " >&6; } +if test "${ac_cv_lib_pthread_pthread_mutex_lock+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthread $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" #endif +char pthread_mutex_lock (); +int +main () +{ +return pthread_mutex_lock (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_pthread_pthread_mutex_lock=yes +else + ac_cv_lib_pthread_pthread_mutex_lock=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_lock" >&5 +$as_echo "$ac_cv_lib_pthread_pthread_mutex_lock" >&6; } +if test "x$ac_cv_lib_pthread_pthread_mutex_lock" = x""yes; then : + PTHREAD_LIBS="-lpthread" +else + hard_bailout +fi + +fi + +################################################################################ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable selinux support" >&5 +$as_echo_n "checking whether to enable selinux support... " >&6; } +# Check whether --enable-selinux was given. +if test "${enable_selinux+set}" = set; then : + enableval=$enable_selinux; SELINUX=$enableval +fi -#undef $ac_func +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SELINUX" >&5 +$as_echo "$SELINUX" >&6; } + +################################################################################ +if test x$SELINUX = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sepol_check_context in -lsepol" >&5 +$as_echo_n "checking for sepol_check_context in -lsepol... " >&6; } +if test "${ac_cv_lib_sepol_sepol_check_context+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsepol $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC @@ -16714,86 +9153,43 @@ #ifdef __cplusplus extern "C" #endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - +char sepol_check_context (); int main () { -return $ac_func (); +return sepol_check_context (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_sepol_sepol_check_context=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" + ac_cv_lib_sepol_sepol_check_context=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sepol_sepol_check_context" >&5 +$as_echo "$ac_cv_lib_sepol_sepol_check_context" >&6; } +if test "x$ac_cv_lib_sepol_sepol_check_context" = x""yes; then : -else - { { $as_echo "$as_me:$LINENO: error: bailing out" >&5 -$as_echo "$as_me: error: bailing out" >&2;} - { (exit 1); exit 1; }; } + +$as_echo "#define HAVE_SEPOL 1" >>confdefs.h + + SELINUX_LIBS="-lsepol" fi -done - # getmntent is in the standard C library on UNICOS, in -lsun on Irix 4, -# -lseq on Dynix/PTX, -lgen on Unixware. -{ $as_echo "$as_me:$LINENO: checking for library containing getmntent" >&5 -$as_echo_n "checking for library containing getmntent... " >&6; } -if test "${ac_cv_search_getmntent+set}" = set; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_selinux_enabled in -lselinux" >&5 +$as_echo_n "checking for is_selinux_enabled in -lselinux... " >&6; } +if test "${ac_cv_lib_selinux_is_selinux_enabled+set}" = set; then : $as_echo_n "(cached) " >&6 else - ac_func_search_save_LIBS=$LIBS -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + ac_check_lib_save_LIBS=$LIBS +LIBS="-lselinux $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -16802,503 +9198,265 @@ #ifdef __cplusplus extern "C" #endif -char getmntent (); +char is_selinux_enabled (); int main () { -return getmntent (); +return is_selinux_enabled (); ; return 0; } _ACEOF -for ac_lib in '' sun seq gen; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_search_getmntent=$ac_res -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext - if test "${ac_cv_search_getmntent+set}" = set; then - break -fi -done -if test "${ac_cv_search_getmntent+set}" = set; then - : +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_selinux_is_selinux_enabled=yes else - ac_cv_search_getmntent=no + ac_cv_lib_selinux_is_selinux_enabled=no fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_getmntent" >&5 -$as_echo "$ac_cv_search_getmntent" >&6; } -ac_res=$ac_cv_search_getmntent -if test "$ac_res" != no; then - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - ac_cv_func_getmntent=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_is_selinux_enabled" >&5 +$as_echo "$ac_cv_lib_selinux_is_selinux_enabled" >&6; } +if test "x$ac_cv_lib_selinux_is_selinux_enabled" = x""yes; then : -cat >>confdefs.h <<\_ACEOF -#define HAVE_GETMNTENT 1 + for ac_header in selinux/selinux.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default" +if test "x$ac_cv_header_selinux_selinux_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SELINUX_SELINUX_H 1 _ACEOF else - ac_cv_func_getmntent=no + hard_bailout fi +done - - -for ac_header in sys/select.h sys/socket.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> + for ac_header in selinux/label.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "selinux/label.h" "ac_cv_header_selinux_label_h" "$ac_includes_default" +if test "x$ac_cv_header_selinux_label_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SELINUX_LABEL_H 1 _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi +done -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +$as_echo "#define HAVE_SELINUX 1" >>confdefs.h - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + SELINUX_LIBS="-lselinux $SELINUX_LIBS" + SELINUX_PC="libselinux" + HAVE_SELINUX=yes else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling selinux" >&5 +$as_echo "$as_me: WARNING: Disabling selinux" >&2;} + SELINUX_LIBS= + SELINUX_PC= + HAVE_SELINUX=no fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF fi -done - -{ $as_echo "$as_me:$LINENO: checking types of arguments for select" >&5 -$as_echo_n "checking types of arguments for select... " >&6; } -if test "${ac_cv_func_select_args+set}" = set; then +################################################################################ +if test x$REALTIME = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 +$as_echo_n "checking for clock_gettime in -lrt... " >&6; } +if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then : $as_echo_n "(cached) " >&6 else - for ac_arg234 in 'fd_set *' 'int *' 'void *'; do - for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do - for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + ac_check_lib_save_LIBS=$LIBS +LIBS="-lrt $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -#ifdef HAVE_SYS_SELECT_H -# include -#endif -#ifdef HAVE_SYS_SOCKET_H -# include -#endif +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char clock_gettime (); int main () { -extern int select ($ac_arg1, - $ac_arg234, $ac_arg234, $ac_arg234, - $ac_arg5); +return clock_gettime (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3 +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_rt_clock_gettime=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - + ac_cv_lib_rt_clock_gettime=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done - done -done -# Provide a safe default value. -: ${ac_cv_func_select_args='int,int *,struct timeval *'} - +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_select_args" >&5 -$as_echo "$ac_cv_func_select_args" >&6; } -ac_save_IFS=$IFS; IFS=',' -set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'` -IFS=$ac_save_IFS -shift - -cat >>confdefs.h <<_ACEOF -#define SELECT_TYPE_ARG1 $1 -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define SELECT_TYPE_ARG234 ($2) -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define SELECT_TYPE_ARG5 ($3) -_ACEOF - -rm -f conftest* - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 +$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } +if test "x$ac_cv_lib_rt_clock_gettime" = x""yes; then : + HAVE_REALTIME=yes +else + HAVE_REALTIME=no fi -if test x$CLUSTER != xnone; then + if test x$HAVE_REALTIME = xyes; then -for ac_header in sys/socket.h sys/un.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +$as_echo "#define HAVE_REALTIME 1" >>confdefs.h - ac_header_compiler=no + LIBS="-lrt $LIBS" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling realtime clock" >&5 +$as_echo "$as_me: WARNING: Disabling realtime clock" >&2;} + fi fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> +################################################################################ +for ac_header in getopt.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" +if test "x$ac_cv_header_getopt_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETOPT_H 1 _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no +$as_echo "#define HAVE_GETOPTLONG 1" >>confdefs.h + fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +done -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +################################################################################ +if test x$READLINE != xno; then + lvm_saved_libs=$LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5 +$as_echo_n "checking for library containing tgetent... " >&6; } +if test "${ac_cv_search_tgetent+set}" = set; then : $as_echo_n "(cached) " >&6 else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char tgetent (); +int +main () +{ +return tgetent (); + ; + return 0; +} _ACEOF +for ac_lib in '' tinfo ncurses curses termcap termlib; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_tgetent=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_tgetent+set}" = set; then : + break +fi +done +if test "${ac_cv_search_tgetent+set}" = set; then : else - { { $as_echo "$as_me:$LINENO: error: bailing out" >&5 -$as_echo "$as_me: error: bailing out" >&2;} - { (exit 1); exit 1; }; } + ac_cv_search_tgetent=no fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5 +$as_echo "$ac_cv_search_tgetent" >&6; } +ac_res=$ac_cv_search_tgetent +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + READLINE_LIBS=$ac_cv_search_tgetent +else -done - + if test "$READLINE" = yes; then + as_fn_error $? "termcap could not be found which is required for the +--enable-readline option (which is enabled by default). Either disable readline +support with --disable-readline or download and install termcap from: + ftp.gnu.org/gnu/termcap +Note: if you are using precompiled packages you will also need the development + package as well (which may be called termcap-devel or something similar). +Note: (n)curses also seems to work as a substitute for termcap. This was + not found either - but you could try installing that as well." "$LINENO" 5 + fi +fi -for ac_func in socket -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5 +$as_echo_n "checking for readline in -lreadline... " >&6; } +if test "${ac_cv_lib_readline_readline+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + ac_check_lib_save_LIBS=$LIBS +LIBS="-lreadline $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" #endif +char readline (); +int +main () +{ +return readline (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_readline_readline=yes +else + ac_cv_lib_readline_readline=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_readline" >&5 +$as_echo "$ac_cv_lib_readline_readline" >&6; } +if test "x$ac_cv_lib_readline_readline" = x""yes; then : + + +$as_echo "#define READLINE_SUPPORT 1" >>confdefs.h -#undef $ac_func + LIBS=$lvm_saved_libs + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_line_buffer in -lreadline" >&5 +$as_echo_n "checking for rl_line_buffer in -lreadline... " >&6; } +if test "${ac_cv_lib_readline_rl_line_buffer+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lreadline $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC @@ -17306,682 +9464,475 @@ #ifdef __cplusplus extern "C" #endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - +char rl_line_buffer (); int main () { -return $ac_func (); +return rl_line_buffer (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_readline_rl_line_buffer=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_readline_rl_line_buffer=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_line_buffer" >&5 +$as_echo "$ac_cv_lib_readline_rl_line_buffer" >&6; } +if test "x$ac_cv_lib_readline_rl_line_buffer" = x""yes; then : + READLINE_LIBS="-lreadline" +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: linking -lreadline with $READLINE_LIBS needed" >&5 +$as_echo "linking -lreadline with $READLINE_LIBS needed" >&6; } + READLINE_LIBS="-lreadline $READLINE_LIBS" - eval "$as_ac_var=no" fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +else + + READLINE_LIBS= + if test "$READLINE" = yes; then + as_fn_error $? "GNU Readline could not be found which is required for the +--enable-readline option (which is enabled by default). Either disable readline +support with --disable-readline or download and install readline from: + ftp.gnu.org/gnu/readline +Note: if you are using precompiled packages you will also need the development +package as well (which may be called readline-devel or something similar)." "$LINENO" 5 + fi fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then + + LIBS="$READLINE_LIBS $lvm_saved_libs" + for ac_func in rl_completion_matches +do : + ac_fn_c_check_func "$LINENO" "rl_completion_matches" "ac_cv_func_rl_completion_matches" +if test "x$ac_cv_func_rl_completion_matches" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define HAVE_RL_COMPLETION_MATCHES 1 _ACEOF -else - { { $as_echo "$as_me:$LINENO: error: bailing out" >&5 -$as_echo "$as_me: error: bailing out" >&2;} - { (exit 1); exit 1; }; } fi done + LIBS=$lvm_saved_libs +fi + +################################################################################ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable internationalisation" >&5 +$as_echo_n "checking whether to enable internationalisation... " >&6; } +# Check whether --enable-nls was given. +if test "${enable_nls+set}" = set; then : + enableval=$enable_nls; INTL=$enableval +else + INTL=no fi -if test x$DMEVENTD = xyes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTL" >&5 +$as_echo "$INTL" >&6; } -for ac_header in arpa/inet.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +if test x$INTL = xyes; then +# FIXME - Move this - can be device-mapper too + INTL_PACKAGE="lvm2" + # Extract the first word of "msgfmt", so it can be a program name with args. +set dummy msgfmt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_MSGFMT+set}" = set; then : $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; + case $MSGFMT in + [\\/]* | ?:[\\/]*) + ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes +fi +MSGFMT=$ac_cv_path_MSGFMT +if test -n "$MSGFMT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 +$as_echo "$MSGFMT" >&6; } else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if [ "x$MSGFMT" == x ]; + then as_fn_error $? "msgfmt not found in path $PATH + " "$LINENO" 5 + fi; + + +# Check whether --with-localedir was given. +if test "${with_localedir+set}" = set; then : + withval=$with_localedir; LOCALEDIR=$withval +else + LOCALEDIR='${prefix}/share/locale' +fi + +fi + +################################################################################ + +# Check whether --with-confdir was given. +if test "${with_confdir+set}" = set; then : + withval=$with_confdir; CONFDIR=$withval +else + CONFDIR="/etc" +fi - ac_header_compiler=no + + +# Check whether --with-staticdir was given. +if test "${with_staticdir+set}" = set; then : + withval=$with_staticdir; STATICDIR=$withval +else + STATICDIR='${exec_prefix}/sbin' fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes + +# Check whether --with-usrlibdir was given. +if test "${with_usrlibdir+set}" = set; then : + withval=$with_usrlibdir; usrlibdir=$withval else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + usrlibdir='${prefix}/lib' +fi - ac_header_preproc=no + + +# Check whether --with-usrsbindir was given. +if test "${with_usrsbindir+set}" = set; then : + withval=$with_usrsbindir; usrsbindir=$withval +else + usrsbindir='${prefix}/sbin' fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +################################################################################ - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 +# Check whether --with-udev_prefix was given. +if test "${with_udev_prefix+set}" = set; then : + withval=$with_udev_prefix; udev_prefix=$withval else - eval "$as_ac_Header=\$ac_header_preproc" + udev_prefix='${exec_prefix}' fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + + +# Check whether --with-udevdir was given. +if test "${with_udevdir+set}" = set; then : + withval=$with_udevdir; udevdir=$withval +else + udevdir='${udev_prefix}/lib/udev/rules.d' fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then + + +################################################################################ +if test x$READLINE = xyes; then + for ac_header in readline/readline.h readline/history.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else - { { $as_echo "$as_me:$LINENO: error: bailing out" >&5 -$as_echo "$as_me: error: bailing out" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "bailing out" "$LINENO" 5 fi done fi -if test x$HAVE_LIBDL = xyes; then - -for ac_header in dlfcn.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> +if test x$CLVMD != xnone; then + for ac_header in mntent.h netdb.h netinet/in.h pthread.h search.h sys/mount.h sys/socket.h sys/uio.h sys/un.h utmpx.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +else + as_fn_error $? "bailing out" "$LINENO" 5 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +done -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> + for ac_func in dup2 getmntent memmove select socket +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no +else + as_fn_error $? "bailing out" "$LINENO" 5 fi +done -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } + # getmntent is in the standard C library on UNICOS, in -lsun on Irix 4, +# -lseq on Dynix/PTX, -lgen on Unixware. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getmntent" >&5 +$as_echo_n "checking for library containing getmntent... " >&6; } +if test "${ac_cv_search_getmntent+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char getmntent (); +int +main () +{ +return getmntent (); + ; + return 0; +} +_ACEOF +for ac_lib in '' sun seq gen; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_getmntent=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_getmntent+set}" = set; then : + break +fi +done +if test "${ac_cv_search_getmntent+set}" = set; then : - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 else - eval "$as_ac_Header=\$ac_header_preproc" + ac_cv_search_getmntent=no fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getmntent" >&5 +$as_echo "$ac_cv_search_getmntent" >&6; } +ac_res=$ac_cv_search_getmntent +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + ac_cv_func_getmntent=yes +$as_echo "#define HAVE_GETMNTENT 1" >>confdefs.h + +else + ac_cv_func_getmntent=no fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then + + + for ac_header in sys/select.h sys/socket.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF -else - { { $as_echo "$as_me:$LINENO: error: bailing out" >&5 -$as_echo "$as_me: error: bailing out" >&2;} - { (exit 1); exit 1; }; } fi done -fi - -if test x$INTL = xyes; then - -for ac_header in libintl.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5 +$as_echo_n "checking types of arguments for select... " >&6; } +if test "${ac_cv_func_select_args+set}" = set; then : $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + for ac_arg234 in 'fd_set *' 'int *' 'void *'; do + for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do + for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +#ifdef HAVE_SYS_SELECT_H +# include +#endif +#ifdef HAVE_SYS_SOCKET_H +# include +#endif - ac_header_compiler=no +int +main () +{ +extern int select ($ac_arg1, + $ac_arg234, $ac_arg234, $ac_arg234, + $ac_arg5); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3 fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } + done + done +done +# Provide a safe default value. +: ${ac_cv_func_select_args='int,int *,struct timeval *'} -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5 +$as_echo "$ac_cv_func_select_args" >&6; } +ac_save_IFS=$IFS; IFS=',' +set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'` +IFS=$ac_save_IFS +shift + +cat >>confdefs.h <<_ACEOF +#define SELECT_TYPE_ARG1 $1 _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +cat >>confdefs.h <<_ACEOF +#define SELECT_TYPE_ARG234 ($2) +_ACEOF -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } +cat >>confdefs.h <<_ACEOF +#define SELECT_TYPE_ARG5 ($3) +_ACEOF + +rm -f conftest* fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then + +if test x$CLUSTER != xnone; then + for ac_header in sys/socket.h sys/un.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else - { { $as_echo "$as_me:$LINENO: error: bailing out" >&5 -$as_echo "$as_me: error: bailing out" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "bailing out" "$LINENO" 5 fi done -fi - -if test x$UDEV_SYNC = xyes; then + for ac_func in socket +do : + ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket" +if test "x$ac_cv_func_socket" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SOCKET 1 +_ACEOF +else + as_fn_error $? "bailing out" "$LINENO" 5 +fi +done -for ac_header in sys/ipc.h sys/sem.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> + +if test x$DMEVENTD = xyes; then + for ac_header in arpa/inet.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default" +if test "x$ac_cv_header_arpa_inet_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_ARPA_INET_H 1 _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +else + as_fn_error $? "bailing out" "$LINENO" 5 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +done -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> +fi + +if test x$HAVE_LIBDL = xyes; then + for ac_header in dlfcn.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" +if test "x$ac_cv_header_dlfcn_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DLFCN_H 1 _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no +else + as_fn_error $? "bailing out" "$LINENO" 5 fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +done -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +fi + +if test x$INTL = xyes; then + for ac_header in libintl.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default" +if test "x$ac_cv_header_libintl_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBINTL_H 1 +_ACEOF - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 else - eval "$as_ac_Header=\$ac_header_preproc" + as_fn_error $? "bailing out" "$LINENO" 5 fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + +done fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then + +if test x$UDEV_SYNC = xyes; then + for ac_header in sys/ipc.h sys/sem.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else - { { $as_echo "$as_me:$LINENO: error: bailing out" >&5 -$as_echo "$as_me: error: bailing out" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "bailing out" "$LINENO" 5 fi done @@ -17991,9 +9942,9 @@ ################################################################################ # Extract the first word of "modprobe", so it can be a program name with args. set dummy modprobe; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MODPROBE_CMD+set}" = set; then +if test "${ac_cv_path_MODPROBE_CMD+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MODPROBE_CMD in @@ -18006,14 +9957,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_MODPROBE_CMD="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -18021,10 +9972,10 @@ fi MODPROBE_CMD=$ac_cv_path_MODPROBE_CMD if test -n "$MODPROBE_CMD"; then - { $as_echo "$as_me:$LINENO: result: $MODPROBE_CMD" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MODPROBE_CMD" >&5 $as_echo "$MODPROBE_CMD" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -18062,7 +10013,7 @@ if test "$BUILD_DMEVENTD" = yes; then # Check whether --with-dmeventd-pidfile was given. -if test "${with_dmeventd_pidfile+set}" = set; then +if test "${with_dmeventd_pidfile+set}" = set; then : withval=$with_dmeventd_pidfile; DMEVENTD_PIDFILE=$withval else DMEVENTD_PIDFILE="/var/run/dmeventd.pid" @@ -18078,7 +10029,7 @@ if test "$BUILD_DMEVENTD" = yes; then # Check whether --with-dmeventd-path was given. -if test "${with_dmeventd_path+set}" = set; then +if test "${with_dmeventd_path+set}" = set; then : withval=$with_dmeventd_path; DMEVENTD_PATH=$withval else DMEVENTD_PATH="$lvm_exec_prefix/sbin/dmeventd" @@ -18093,9 +10044,8 @@ - # Check whether --with-default-run-dir was given. -if test "${with_default_run_dir+set}" = set; then +if test "${with_default_run_dir+set}" = set; then : withval=$with_default_run_dir; DEFAULT_RUN_DIR="$withval" else DEFAULT_RUN_DIR="/var/run/lvm" @@ -18109,7 +10059,7 @@ ################################################################################ # Check whether --with-default-system-dir was given. -if test "${with_default_system_dir+set}" = set; then +if test "${with_default_system_dir+set}" = set; then : withval=$with_default_system_dir; DEFAULT_SYS_DIR=$withval else DEFAULT_SYS_DIR="/etc/lvm" @@ -18123,7 +10073,7 @@ # Check whether --with-default-archive-subdir was given. -if test "${with_default_archive_subdir+set}" = set; then +if test "${with_default_archive_subdir+set}" = set; then : withval=$with_default_archive_subdir; DEFAULT_ARCHIVE_SUBDIR=$withval else DEFAULT_ARCHIVE_SUBDIR=archive @@ -18137,7 +10087,7 @@ # Check whether --with-default-backup-subdir was given. -if test "${with_default_backup_subdir+set}" = set; then +if test "${with_default_backup_subdir+set}" = set; then : withval=$with_default_backup_subdir; DEFAULT_BACKUP_SUBDIR=$withval else DEFAULT_BACKUP_SUBDIR=backup @@ -18151,7 +10101,7 @@ # Check whether --with-default-cache-subdir was given. -if test "${with_default_cache_subdir+set}" = set; then +if test "${with_default_cache_subdir+set}" = set; then : withval=$with_default_cache_subdir; DEFAULT_CACHE_SUBDIR=$withval else DEFAULT_CACHE_SUBDIR=cache @@ -18165,7 +10115,7 @@ # Check whether --with-default-locking-dir was given. -if test "${with_default_locking_dir+set}" = set; then +if test "${with_default_locking_dir+set}" = set; then : withval=$with_default_locking_dir; DEFAULT_LOCK_DIR=$withval else DEFAULT_LOCK_DIR="/var/lock/lvm" @@ -18180,7 +10130,7 @@ ################################################################################ # Check whether --with-default-data-alignment was given. -if test "${with_default_data_alignment+set}" = set; then +if test "${with_default_data_alignment+set}" = set; then : withval=$with_default_data_alignment; DEFAULT_DATA_ALIGNMENT=$withval else DEFAULT_DATA_ALIGNMENT=1 @@ -18193,11 +10143,11 @@ ################################################################################ -{ $as_echo "$as_me:$LINENO: checking for kernel interface choice" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kernel interface choice" >&5 $as_echo_n "checking for kernel interface choice... " >&6; } # Check whether --with-interface was given. -if test "${with_interface+set}" = set; then +if test "${with_interface+set}" = set; then : withval=$with_interface; interface=$withval else interface=ioctl @@ -18205,11 +10155,9 @@ if [ "x$interface" != xioctl ]; then - { { $as_echo "$as_me:$LINENO: error: --with-interface=ioctl required. fs no longer supported." >&5 -$as_echo "$as_me: error: --with-interface=ioctl required. fs no longer supported." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "--with-interface=ioctl required. fs no longer supported." "$LINENO" 5 fi -{ $as_echo "$as_me:$LINENO: result: $interface" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $interface" >&5 $as_echo "$interface" >&6; } ################################################################################ @@ -18366,13 +10314,13 @@ case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) $as_unset $ac_var ;; + *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done @@ -18380,8 +10328,8 @@ (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" @@ -18404,11 +10352,11 @@ if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && - { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi @@ -18422,14 +10370,15 @@ ac_libobjs= ac_ltlibobjs= +U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. - ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs @@ -18441,9 +10390,10 @@ ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -18453,17 +10403,18 @@ debug=false ac_cs_recheck=false ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which @@ -18471,23 +10422,15 @@ alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - as_nl=' ' export as_nl @@ -18495,7 +10438,13 @@ as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else @@ -18506,7 +10455,7 @@ as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; - case $arg in + case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; @@ -18529,13 +10478,6 @@ } fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - # IFS # We need space, tab and new line, in precisely that order. Quoting is @@ -18545,15 +10487,15 @@ IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -18565,12 +10507,16 @@ fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' @@ -18582,7 +10528,89 @@ LANGUAGE=C export LANGUAGE -# Required to use basename. +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -18596,8 +10624,12 @@ as_basename=false fi +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -# Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ @@ -18617,76 +10649,25 @@ } s/.*/./; q'` -# CDPATH. -$as_unset CDPATH - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in +case `echo -n x` in #((((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then @@ -18715,8 +10696,56 @@ rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false @@ -18735,10 +10764,10 @@ if test -d "$1"; then test -d "$1/."; else - case $1 in + case $1 in #( -*)set "./$1";; esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' @@ -18753,13 +10782,19 @@ exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 -# Save the log message, to keep $[0] and so on meaningful, and to +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.63. Invocation command line was +generated by GNU Autoconf 2.66. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -18790,13 +10825,15 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. -Usage: $0 [OPTION]... [FILE]... +Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit + --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files @@ -18812,16 +10849,17 @@ Configuration headers: $config_headers -Report bugs to ." +Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.63, - with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.66, + with options \\"\$ac_cs_config\\" -Copyright (C) 2008 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -18857,6 +10895,8 @@ ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) @@ -18864,20 +10904,19 @@ case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac - CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" + as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac - CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" + as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - { $as_echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; };; + as_fn_error $? "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ @@ -18885,11 +10924,10 @@ ac_cs_silent=: ;; # This is an error. - -*) { $as_echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } ;; + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; - *) ac_config_targets="$ac_config_targets $1" + *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac @@ -18977,9 +11015,7 @@ "unit-tests/regex/Makefile") CONFIG_FILES="$CONFIG_FILES unit-tests/regex/Makefile" ;; "unit-tests/mm/Makefile") CONFIG_FILES="$CONFIG_FILES unit-tests/mm/Makefile" ;; - *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -19005,7 +11041,7 @@ trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 + trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. @@ -19016,11 +11052,7 @@ { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || -{ - $as_echo "$as_me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -19028,7 +11060,13 @@ if test -n "$CONFIG_FILES"; then -ac_cr=' ' +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' @@ -19045,24 +11083,18 @@ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -19084,7 +11116,7 @@ t delim :nl h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p @@ -19098,7 +11130,7 @@ t nl :delim h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p @@ -19151,22 +11183,28 @@ else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 -$as_echo "$as_me: error: could not setup config files machinery" >&2;} - { (exit 1); exit 1; }; } + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// s/^[^=]*=[ ]*$// }' fi @@ -19194,9 +11232,7 @@ if test -z "$ac_t"; then break elif $ac_last_try; then - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -19281,9 +11317,7 @@ _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 -$as_echo "$as_me: error: could not setup config headers machinery" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" @@ -19296,9 +11330,7 @@ esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 -$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} - { (exit 1); exit 1; }; };; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -19326,12 +11358,10 @@ [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - ac_file_inputs="$ac_file_inputs '$ac_f'" + as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't @@ -19342,7 +11372,7 @@ `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. @@ -19355,9 +11385,7 @@ case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } ;; + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -19385,47 +11413,7 @@ q } s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } + as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in @@ -19482,7 +11470,6 @@ # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= - ac_sed_dataroot=' /datarootdir/ { p @@ -19492,12 +11479,11 @@ /@docdir@/p /@infodir@/p /@localedir@/p -/@mandir@/p -' +/@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 @@ -19507,7 +11493,7 @@ s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; + s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF @@ -19536,26 +11522,22 @@ $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} +which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # @@ -19566,25 +11548,19 @@ $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 -$as_echo "$as_me: error: could not create -" >&2;} - { (exit 1); exit 1; }; } + || as_fn_error $? "could not create -" "$LINENO" 5 fi ;; @@ -19594,15 +11570,12 @@ done # for ac_tag -{ (exit 0); exit 0; } +as_fn_exit 0 _ACEOF -chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -19623,15 +11596,15 @@ exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } + $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi if test x$ODIRECT != xyes; then - { $as_echo "$as_me:$LINENO: WARNING: Warning: O_DIRECT disabled: low-memory pvmove may lock up" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Warning: O_DIRECT disabled: low-memory pvmove may lock up" >&5 $as_echo "$as_me: WARNING: Warning: O_DIRECT disabled: low-memory pvmove may lock up" >&2;} fi --- LVM2/lib/misc/configure.h.in 2010/12/13 11:03:11 1.30 +++ LVM2/lib/misc/configure.h.in 2011/01/07 14:38:35 1.31 @@ -334,7 +334,7 @@ /* Define to 1 if you have the `strtoul' function. */ #undef HAVE_STRTOUL -/* Define to 1 if `st_rdev' is member of `struct stat'. */ +/* Define to 1 if `st_rdev' is a member of `struct stat'. */ #undef HAVE_STRUCT_STAT_ST_RDEV /* Define to 1 if you have the header file. */ @@ -481,6 +481,9 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME +/* Define to the home page for this package. */ +#undef PACKAGE_URL + /* Define to the version of this package. */ #undef PACKAGE_VERSION --- LVM2/autoconf/config.guess 2008/06/27 15:35:09 1.5 +++ LVM2/autoconf/config.guess 2011/01/07 14:38:35 1.6 @@ -1,10 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. -timestamp='2008-01-23' +timestamp='2009-11-20' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -27,16 +27,16 @@ # the same distribution terms that you use for the rest of that program. -# Originally written by Per Bothner . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. +# Originally written by Per Bothner. Please send patches (context +# diff format) to and include a ChangeLog +# entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD me=`echo "$0" | sed -e 's,.*/,,'` @@ -170,7 +170,7 @@ arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null + | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? @@ -324,14 +324,33 @@ case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; + s390x:SunOS:*:*) + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux${UNAME_RELEASE} + exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + eval $set_cc_for_build + SUN_ARCH="i386" + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH="x86_64" + fi + fi + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize @@ -640,7 +659,7 @@ # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep __LP64__ >/dev/null + grep -q __LP64__ then HP_ARCH="hppa2.0w" else @@ -791,12 +810,12 @@ i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; - *:Interix*:[3456]*) + *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; - EM64T | authenticamd) + authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) @@ -806,6 +825,9 @@ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we @@ -835,6 +857,20 @@ i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ @@ -857,6 +893,17 @@ frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; + i*86:Linux:*:*) + LIBC=gnu + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; @@ -866,74 +913,33 @@ m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips - #undef mipsel - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - mips64:Linux:*:*) + mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU - #undef mips64 - #undef mips64el + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el + CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 + CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu + padre:Linux:*:*) + echo sparc-unknown-linux-gnu exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level @@ -943,8 +949,11 @@ *) echo hppa-unknown-linux-gnu ;; esac exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux @@ -967,69 +976,6 @@ xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit ;; - coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^LIBC/{ - s: ::g - p - }'`" - test x"${LIBC}" != x && { - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit - } - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both @@ -1058,7 +1004,7 @@ i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) @@ -1102,8 +1048,11 @@ pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configury will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 @@ -1141,6 +1090,16 @@ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; @@ -1153,7 +1112,7 @@ rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) @@ -1216,6 +1175,9 @@ BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; @@ -1243,6 +1205,16 @@ *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in + i386) + eval $set_cc_for_build + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + UNAME_PROCESSOR="x86_64" + fi + fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} @@ -1324,6 +1296,9 @@ i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; + i*86:AROS:*:*) + echo ${UNAME_MACHINE}-pc-aros + exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 --- LVM2/autoconf/config.sub 2008/06/27 15:35:09 1.5 +++ LVM2/autoconf/config.sub 2011/01/07 14:38:35 1.6 @@ -1,10 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. -timestamp='2008-01-16' +timestamp='2009-11-20' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -32,13 +32,16 @@ # Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. +# diff and a properly formatted GNU ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. @@ -122,6 +125,7 @@ case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` @@ -148,10 +152,13 @@ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray) + -apple | -axis | -knuth | -cray | -microblaze) os= basic_machine=$1 ;; + -bluegene*) + os=-cnk + ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 @@ -249,13 +256,16 @@ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ + | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep \ + | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ - | mips64vr | mips64vrel \ + | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ @@ -268,6 +278,7 @@ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ + | moxie \ | mt \ | msp430 \ | nios | nios2 \ @@ -276,20 +287,22 @@ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ + | rx \ | score \ - | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ + | ubicom32 \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k) + | z8k | z80) basic_machine=$basic_machine-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12) + m6811 | m68hc11 | m6812 | m68hc12 | picochip) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none @@ -329,14 +342,17 @@ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ + | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ - | mips64vr-* | mips64vrel-* \ + | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ @@ -357,21 +373,22 @@ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ - | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | romp-* | rs6000-* | rx-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ | tron-* \ + | ubicom32-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ - | z8k-*) + | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) @@ -439,6 +456,10 @@ basic_machine=m68k-apollo os=-bsd ;; + aros) + basic_machine=i386-pc + os=-aros + ;; aux) basic_machine=m68k-apple os=-aux @@ -455,10 +476,18 @@ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; c90) basic_machine=c90-cray os=-unicos ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; convex-c1) basic_machine=c1-convex os=-bsd @@ -526,6 +555,10 @@ basic_machine=m88k-motorola os=-sysv3 ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp @@ -699,6 +732,9 @@ basic_machine=ns32k-utek os=-sysv ;; + microblaze) + basic_machine=microblaze-xilinx + ;; mingw32) basic_machine=i386-pc os=-mingw32 @@ -1128,6 +1164,10 @@ basic_machine=z8k-unknown os=-sim ;; + z80-*-coff) + basic_machine=z80-unknown + os=-sim + ;; none) basic_machine=none-none os=-none @@ -1166,7 +1206,7 @@ we32k) basic_machine=we32k-att ;; - sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) @@ -1216,6 +1256,9 @@ # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; @@ -1236,10 +1279,11 @@ # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ + | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ @@ -1248,7 +1292,7 @@ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* \ + | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ @@ -1258,7 +1302,7 @@ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1388,6 +1432,9 @@ -zvmoe) os=-zvmoe ;; + -dicos*) + os=-dicos + ;; -none) ;; *) @@ -1585,7 +1632,7 @@ -sunos*) vendor=sun ;; - -aix*) + -cnk*|-aix*) vendor=ibm ;; -beos*) From mornfall@sourceware.org Fri Jan 7 14:42:00 2011 From: mornfall@sourceware.org (mornfall@sourceware.org) Date: Fri, 07 Jan 2011 14:42:00 -0000 Subject: LVM2/test/lib check.sh Message-ID: <20110107144236.19736.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: mornfall@sourceware.org 2011-01-07 14:42:36 Modified files: test/lib : check.sh Log message: Fix a typo in the new relaxed mirror check (test/lib/check.sh). Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/lib/check.sh.diff?cvsroot=lvm2&r1=1.2&r2=1.3 --- LVM2/test/lib/check.sh 2011/01/07 13:03:46 1.2 +++ LVM2/test/lib/check.sh 2011/01/07 14:42:35 1.3 @@ -141,7 +141,7 @@ lv="$1/$2" lvs -oattr "$lv" | grep -q "^ *m.....$" || { if lvs -oattr "$lv" | grep -q "^ *o.....$" && - lvs -a | fgrep -q "[${lv}_mimage"; then + lvs -a | fgrep -q "[${2}_mimage"; then echo "TEST WARNING: $lv is a snapshot origin and looks like a mirror," echo "assuming it is actually a mirror" else From mornfall@sourceware.org Fri Jan 7 14:56:00 2011 From: mornfall@sourceware.org (mornfall@sourceware.org) Date: Fri, 07 Jan 2011 14:56:00 -0000 Subject: LVM2/test t-lvconvert-repair-transient-dmeventd.sh Message-ID: <20110107145611.26071.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: mornfall@sourceware.org 2011-01-07 14:56:10 Added files: test : t-lvconvert-repair-transient-dmeventd.sh Log message: Add a test for the interaction of transient errors and dmeventd mirror repair. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-lvconvert-repair-transient-dmeventd.sh.diff?cvsroot=lvm2&r1=NONE&r2=1.1 /cvs/lvm2/LVM2/test/t-lvconvert-repair-transient-dmeventd.sh,v --> standard output revision 1.1 --- LVM2/test/t-lvconvert-repair-transient-dmeventd.sh +++ - 2011-01-07 14:56:11.157984000 +0000 @@ -0,0 +1,27 @@ +#!/bin/bash +# Copyright (C) 2011 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing to use, +# modify, copy, or redistribute it subject to the terms and conditions +# of the GNU General Public License v.2. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +. lib/test + +aux prepare_vg 5 +aux prepare_dmeventd + +lvcreate -m 3 --ig -L 1 -n 4way $vg +lvchange --monitor y $vg/4way +aux disable_dev $dev2 $dev4 +mkfs.ext3 $DM_DEV_DIR/$vg/4way +aux enable_dev $dev2 $dev4 +sleep 10 +lvs -a -o +devices | not grep unknown +check mirror $vg 4way +check mirror_legs $vg 4way 2 +lvs -a -o +devices | should not grep mimage_1 +lvs -a -o +devices | should not grep mimage_3 From mornfall@sourceware.org Fri Jan 7 14:56:00 2011 From: mornfall@sourceware.org (mornfall@sourceware.org) Date: Fri, 07 Jan 2011 14:56:00 -0000 Subject: LVM2/test t-lvconvert-repair-snapshot.sh Message-ID: <20110107145652.26268.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: mornfall@sourceware.org 2011-01-07 14:56:52 Added files: test : t-lvconvert-repair-snapshot.sh Log message: Add a test for the interaction of snapshots of mirrors and lvconvert --repair. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-lvconvert-repair-snapshot.sh.diff?cvsroot=lvm2&r1=NONE&r2=1.1 /cvs/lvm2/LVM2/test/t-lvconvert-repair-snapshot.sh,v --> standard output revision 1.1 --- LVM2/test/t-lvconvert-repair-snapshot.sh +++ - 2011-01-07 14:56:52.590474000 +0000 @@ -0,0 +1,24 @@ +# Copyright (C) 2011 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing to use, +# modify, copy, or redistribute it subject to the terms and conditions +# of the GNU General Public License v.2. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +. lib/test + +aux prepare_vg 5 +lvcreate -m 3 --ig -L 2M -n 4way $vg $dev1 $dev2 $dev3 $dev4 $dev5:0 +lvcreate -s $vg/4way -L 2M -n snap + +aux disable_dev $dev2 $dev4 +echo n | lvconvert --repair $vg/4way 2>&1 | tee 4way.out +lvs -a -o +devices | not grep unknown +vgreduce --removemissing $vg +aux enable_dev $dev2 $dev4 +lvs -a -o +devices +check mirror $vg 4way $dev5 + From mornfall@sourceware.org Fri Jan 7 15:04:00 2011 From: mornfall@sourceware.org (mornfall@sourceware.org) Date: Fri, 07 Jan 2011 15:04:00 -0000 Subject: LVM2/test api/percent.sh lib/aux.sh lib/utils.sh Message-ID: <20110107150452.31492.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: mornfall@sourceware.org 2011-01-07 15:04:52 Modified files: test/api : percent.sh test/lib : aux.sh utils.sh Log message: Skip the api/percent test on kernels <= 2.6.32. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/api/percent.sh.diff?cvsroot=lvm2&r1=1.3&r2=1.4 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/lib/aux.sh.diff?cvsroot=lvm2&r1=1.4&r2=1.5 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/lib/utils.sh.diff?cvsroot=lvm2&r1=1.2&r2=1.3 --- LVM2/test/api/percent.sh 2011/01/05 00:16:21 1.3 +++ LVM2/test/api/percent.sh 2011/01/07 15:04:52 1.4 @@ -13,6 +13,9 @@ . lib/test +linux_minor=$(echo `uname -r` | cut -d'.' -f3 | cut -d'-' -f1) +test $linux_minor -le 32 && skip + aux prepare_devs 2 vgcreate -c n -s 4k $vg $(cat DEVICES) lvcreate -n foo $vg -l 5 --- LVM2/test/lib/aux.sh 2011/01/07 13:04:17 1.4 +++ LVM2/test/lib/aux.sh 2011/01/07 15:04:52 1.5 @@ -10,11 +10,6 @@ . lib/utils -skip() { - touch SKIP_THIS_TEST - exit 1 -} - prepare_clvmd() { if test -z "$LVM_TEST_LOCKING" || test "$LVM_TEST_LOCKING" -ne 3 ; then return 0 # not needed --- LVM2/test/lib/utils.sh 2011/01/05 00:26:19 1.2 +++ LVM2/test/lib/utils.sh 2011/01/07 15:04:52 1.3 @@ -146,6 +146,11 @@ fi } +skip() { + touch SKIP_THIS_TEST + exit 200 +} + . lib/paths || { echo >&2 you must run make first; exit 1; } PATH=$abs_top_builddir/test/lib:$PATH From agk@sourceware.org Fri Jan 7 16:27:00 2011 From: agk@sourceware.org (agk@sourceware.org) Date: Fri, 07 Jan 2011 16:27:00 -0000 Subject: LVM2 WHATS_NEW aclocal.m4 Message-ID: <20110107162706.17247.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: agk@sourceware.org 2011-01-07 16:27:06 Modified files: . : WHATS_NEW Added files: . : aclocal.m4 Log message: Add aclocal.m4 (for pkgconfig). Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/aclocal.m4.diff?cvsroot=lvm2&r1=NONE&r2=1.1 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1863&r2=1.1864 /cvs/lvm2/LVM2/aclocal.m4,v --> standard output revision 1.1 --- LVM2/aclocal.m4 +++ - 2011-01-07 16:27:06.492998000 +0000 @@ -0,0 +1,171 @@ +# generated automatically by aclocal 1.11.1 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# serial 1 (pkg-config-0.24) +# +# Copyright ???? 2004 Scott James Remnant . +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# PKG_PROG_PKG_CONFIG([MIN-VERSION]) +# ---------------------------------- +AC_DEFUN([PKG_PROG_PKG_CONFIG], +[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) +m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) +AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) +AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=m4_default([$1], [0.9.0]) + AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + PKG_CONFIG="" + fi +fi[]dnl +])# PKG_PROG_PKG_CONFIG + +# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# +# Check to see whether a particular set of modules exists. Similar +# to PKG_CHECK_MODULES(), but does not set variables or print errors. +# +# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +# only at the first occurence in configure.ac, so if the first place +# it's called might be skipped (such as if it is within an "if", you +# have to call PKG_CHECK_EXISTS manually +# -------------------------------------------------------------- +AC_DEFUN([PKG_CHECK_EXISTS], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +if test -n "$PKG_CONFIG" && \ + AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then + m4_default([$2], [:]) +m4_ifvaln([$3], [else + $3])dnl +fi]) + +# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) +# --------------------------------------------- +m4_define([_PKG_CONFIG], +[if test -n "$$1"; then + pkg_cv_[]$1="$$1" + elif test -n "$PKG_CONFIG"; then + PKG_CHECK_EXISTS([$3], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], + [pkg_failed=yes]) + else + pkg_failed=untried +fi[]dnl +])# _PKG_CONFIG + +# _PKG_SHORT_ERRORS_SUPPORTED +# ----------------------------- +AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi[]dnl +])# _PKG_SHORT_ERRORS_SUPPORTED + + +# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +# [ACTION-IF-NOT-FOUND]) +# +# +# Note that if there is a possibility the first call to +# PKG_CHECK_MODULES might not happen, you should be sure to include an +# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac +# +# +# -------------------------------------------------------------- +AC_DEFUN([PKG_CHECK_MODULES], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl +AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl + +pkg_failed=no +AC_MSG_CHECKING([for $1]) + +_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) +_PKG_CONFIG([$1][_LIBS], [libs], [$2]) + +m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS +and $1[]_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details.]) + +if test $pkg_failed = yes; then + AC_MSG_RESULT([no]) + _PKG_SHORT_ERRORS_SUPPORTED + if test $_pkg_short_errors_supported = yes; then + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` + else + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD + + m4_default([$4], [AC_MSG_ERROR( +[Package requirements ($2) were not met: + +$$1_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +_PKG_TEXT]) + ]) +elif test $pkg_failed = untried; then + AC_MSG_RESULT([no]) + m4_default([$4], [AC_MSG_FAILURE( +[The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +_PKG_TEXT + +To get pkg-config, see .]) + ]) +else + $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS + $1[]_LIBS=$pkg_cv_[]$1[]_LIBS + AC_MSG_RESULT([yes]) + $3 +fi[]dnl +])# PKG_CHECK_MODULES + --- LVM2/WHATS_NEW 2011/01/06 15:29:24 1.1863 +++ LVM2/WHATS_NEW 2011/01/07 16:27:05 1.1864 @@ -1,5 +1,6 @@ Version 2.02.80 - ==================================== + Add aclocal.m4 (for pkgconfig). Fix memory leak in filter creation error path. Add missing tests in _setup_task(). Fail poll daemon creation when lvmcache_init() fails. From zkabelac@sourceware.org Mon Jan 10 13:00:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Mon, 10 Jan 2011 13:00:00 -0000 Subject: LVM2 WHATS_NEW configure.in make.tmpl.in Message-ID: <20110110130054.2132.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-10 13:00:53 Modified files: . : WHATS_NEW configure.in make.tmpl.in Log message: Improve OCF dir support Add --with-ocfdir configurable option. Fix superfluous /usr in ocf_scriptdir instalation path. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1864&r2=1.1865 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/configure.in.diff?cvsroot=lvm2&r1=1.158&r2=1.159 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/make.tmpl.in.diff?cvsroot=lvm2&r1=1.114&r2=1.115 --- LVM2/WHATS_NEW 2011/01/07 16:27:05 1.1864 +++ LVM2/WHATS_NEW 2011/01/10 13:00:53 1.1865 @@ -1,5 +1,7 @@ Version 2.02.80 - ==================================== + Fix superfluous /usr in ocf_scriptdir instalation path. + Add --with-ocfdir configurable option. Add aclocal.m4 (for pkgconfig). Fix memory leak in filter creation error path. Add missing tests in _setup_task(). --- LVM2/configure.in 2010/12/13 10:43:56 1.158 +++ LVM2/configure.in 2011/01/10 13:00:53 1.159 @@ -368,6 +368,10 @@ [enable Open Cluster Framework (OCF) compliant resource agents]), OCF=$enableval, OCF=no) AC_MSG_RESULT($OCF) +AC_ARG_WITH(ocfdir, + AC_HELP_STRING([--with-ocfdir=DIR], + [install OCF files in DIR [[PREFIX/lib/ocf/resource.d/lvm2]]]), + OCFDIR=$withval, OCFDIR='${prefix}/lib/ocf/resource.d/lvm2') ################################################################################ dnl -- Init pkg-config with dummy invokation: @@ -1328,6 +1332,7 @@ AC_SUBST(LVM_RELEASE_DATE) AC_SUBST(MIRRORS) AC_SUBST(OCF) +AC_SUBST(OCFDIR) AC_SUBST(REPLICATORS) AC_SUBST(MSGFMT) AC_SUBST(PKGCONFIG) --- LVM2/make.tmpl.in 2010/11/05 16:18:38 1.114 +++ LVM2/make.tmpl.in 2011/01/10 13:00:53 1.115 @@ -65,7 +65,7 @@ udevdir = $(DESTDIR)@udevdir@ pkgconfigdir = $(usrlibdir)/pkgconfig initdir = $(DESTDIR)@sysconfdir@/rc.d/init.d -ocf_scriptdir = $(DESTDIR)@prefix@/usr/lib/ocf/resource.d/lvm2 +ocf_scriptdir = $(DESTDIR)@OCFDIR@ USRLIB_RELPATH = $(shell echo $(abspath $(usrlibdir) $(libdir)) | \ $(AWK) -f $(top_srcdir)/scripts/relpath.awk) From zkabelac@sourceware.org Mon Jan 10 13:07:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Mon, 10 Jan 2011 13:07:00 -0000 Subject: LVM2 ./WHATS_NEW liblvm/lvm_misc.c Message-ID: <20110110130759.5582.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-10 13:07:58 Modified files: . : WHATS_NEW liblvm : lvm_misc.c Log message: Add default error path for get_property Set invalid property value for error path when NULL handler is passed. Fixes use of uninitialized prop structure as we return 'v' by value. --- Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1865&r2=1.1866 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/liblvm/lvm_misc.c.diff?cvsroot=lvm2&r1=1.7&r2=1.8 --- LVM2/WHATS_NEW 2011/01/10 13:00:53 1.1865 +++ LVM2/WHATS_NEW 2011/01/10 13:07:58 1.1866 @@ -1,5 +1,6 @@ Version 2.02.80 - ==================================== + Detect NULL handle in get_property(). Fix superfluous /usr in ocf_scriptdir instalation path. Add --with-ocfdir configurable option. Add aclocal.m4 (for pkgconfig). --- LVM2/liblvm/lvm_misc.c 2010/12/14 23:20:58 1.7 +++ LVM2/liblvm/lvm_misc.c 2011/01/10 13:07:58 1.8 @@ -52,33 +52,29 @@ struct lvm_property_type prop; struct lvm_property_value v; + memset(&v, 0, sizeof(v)); prop.id = name; + if (pv) { - if (!pv_get_property(pv, &prop)) { - v.is_valid = 0; + if (!pv_get_property(pv, &prop)) return v; - } } else if (vg) { - if (!vg_get_property(vg, &prop)) { - v.is_valid = 0; + if (!vg_get_property(vg, &prop)) return v; - } } else if (lv) { - if (!lv_get_property(lv, &prop)) { - v.is_valid = 0; + if (!lv_get_property(lv, &prop)) return v; - } } else if (lvseg) { - if (!lvseg_get_property(lvseg, &prop)) { - v.is_valid = 0; + if (!lvseg_get_property(lvseg, &prop)) return v; - } } else if (pvseg) { - if (!pvseg_get_property(pvseg, &prop)) { - v.is_valid = 0; + if (!pvseg_get_property(pvseg, &prop)) return v; - } + } else { + log_errno(EINVAL, "Invalid NULL handle passed to library function."); + return v; } + v.is_settable = prop.is_settable; v.is_string = prop.is_string; v.is_integer = prop.is_integer; From zkabelac@sourceware.org Mon Jan 10 13:13:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Mon, 10 Jan 2011 13:13:00 -0000 Subject: LVM2 ./WHATS_NEW lib/cache/lvmcache.c lib/cach ... Message-ID: <20110110131346.20792.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-10 13:13:43 Modified files: . : WHATS_NEW lib/cache : lvmcache.c lvmcache.h lib/format_text: import.c lib/metadata : metadata.h Log message: Change import_vg_from_buffer to use config_tree Change function import_vg_from_buffer() to import_vg_from_config_tree(). Instead of creating config tree inside the function allow config tree to be passed as parameter - usable later for caching. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1866&r2=1.1867 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/cache/lvmcache.c.diff?cvsroot=lvm2&r1=1.100&r2=1.101 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/cache/lvmcache.h.diff?cvsroot=lvm2&r1=1.35&r2=1.36 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/import.c.diff?cvsroot=lvm2&r1=1.52&r2=1.53 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata.h.diff?cvsroot=lvm2&r1=1.227&r2=1.228 --- LVM2/WHATS_NEW 2011/01/10 13:07:58 1.1866 +++ LVM2/WHATS_NEW 2011/01/10 13:13:42 1.1867 @@ -1,5 +1,6 @@ Version 2.02.80 - ==================================== + Pass config_tree to renamed function import_vg_from_config_tree(). Detect NULL handle in get_property(). Fix superfluous /usr in ocf_scriptdir instalation path. Add --with-ocfdir configurable option. --- LVM2/lib/cache/lvmcache.c 2010/12/10 22:39:54 1.100 +++ LVM2/lib/cache/lvmcache.c 2011/01/10 13:13:42 1.101 @@ -26,6 +26,7 @@ #include "format-text.h" #include "format_pool.h" #include "format1.h" +#include "config.h" static struct dm_hash_table *_pvid_hash = NULL; static struct dm_hash_table *_vgid_hash = NULL; @@ -650,12 +651,20 @@ vgid, NULL))) return_NULL; - if (!(vg = import_vg_from_buffer(vginfo->vgmetadata, fid))) { + if (!(vginfo->cft = + create_config_tree_from_string(fid->fmt->cmd, + vginfo->vgmetadata))) { _free_cached_vgmetadata(vginfo); - free_vg(vg); return_NULL; } + if (!(vg = import_vg_from_config_tree(vginfo->cft, fid))) { + _free_cached_vgmetadata(vginfo); + destroy_config_tree(vginfo->cft); + return_NULL; + } + destroy_config_tree(vginfo->cft); + log_debug("Using cached %smetadata for VG %s.", vginfo->precommitted ? "pre-committed" : "", vginfo->vgname); --- LVM2/lib/cache/lvmcache.h 2010/12/10 22:39:54 1.35 +++ LVM2/lib/cache/lvmcache.h 2011/01/10 13:13:42 1.36 @@ -33,6 +33,7 @@ struct cmd_context; struct format_type; struct volume_group; +struct config_tree; /* One per VG */ struct lvmcache_vginfo { @@ -46,6 +47,7 @@ struct lvmcache_vginfo *next; /* Another VG with same name? */ char *creation_host; char *vgmetadata; /* Copy of VG metadata as format_text string */ + struct config_tree *cft; /* Config tree created from vgmetadata */ unsigned precommitted; /* Is vgmetadata live or precommitted? */ }; --- LVM2/lib/format_text/import.c 2010/12/20 13:19:14 1.52 +++ LVM2/lib/format_text/import.c 2011/01/10 13:13:42 1.53 @@ -131,18 +131,14 @@ when, desc); } -struct volume_group *import_vg_from_buffer(const char *buf, - struct format_instance *fid) +struct volume_group *import_vg_from_config_tree(const struct config_tree *cft, + struct format_instance *fid) { struct volume_group *vg = NULL; - struct config_tree *cft; struct text_vg_version_ops **vsn; _init_text_import(); - if (!(cft = create_config_tree_from_string(fid->fmt->cmd, buf))) - return_NULL; - for (vsn = &_text_vsn_list[0]; *vsn; vsn++) { if (!(*vsn)->check_version(cft)) continue; @@ -155,6 +151,5 @@ break; } - destroy_config_tree(cft); return vg; } --- LVM2/lib/metadata/metadata.h 2010/12/20 13:32:49 1.227 +++ LVM2/lib/metadata/metadata.h 2011/01/10 13:13:43 1.228 @@ -100,6 +100,7 @@ //#define FMT_RESIZE_PV 0x00000080U /* Supports pvresize? */ //#define FMT_UNLIMITED_STRIPESIZE 0x00000100U /* Unlimited stripe size? */ +struct config_tree; struct metadata_area; /* Per-format per-metadata area operations */ @@ -388,6 +389,8 @@ int export_vg_to_buffer(struct volume_group *vg, char **buf); struct volume_group *import_vg_from_buffer(const char *buf, struct format_instance *fid); +struct volume_group *import_vg_from_config_tree(const struct config_tree *cft, + struct format_instance *fid); /* * Mirroring functions From zkabelac@sourceware.org Mon Jan 10 13:15:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Mon, 10 Jan 2011 13:15:00 -0000 Subject: LVM2 ./WHATS_NEW lib/cache/lvmcache.c lib/cach ... Message-ID: <20110110131558.21883.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-10 13:15:57 Modified files: . : WHATS_NEW lib/cache : lvmcache.c lvmcache.h Log message: Cache config_tree Start to use config_tree for cache just like vgmetadata. When vgmetadata are erased destroy its cached config tree. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1867&r2=1.1868 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/cache/lvmcache.c.diff?cvsroot=lvm2&r1=1.101&r2=1.102 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/cache/lvmcache.h.diff?cvsroot=lvm2&r1=1.36&r2=1.37 --- LVM2/WHATS_NEW 2011/01/10 13:13:42 1.1867 +++ LVM2/WHATS_NEW 2011/01/10 13:15:57 1.1868 @@ -1,5 +1,6 @@ Version 2.02.80 - ==================================== + Speedup command processing by caching resolved config tree. Pass config_tree to renamed function import_vg_from_config_tree(). Detect NULL handle in get_property(). Fix superfluous /usr in ocf_scriptdir instalation path. --- LVM2/lib/cache/lvmcache.c 2011/01/10 13:13:42 1.101 +++ LVM2/lib/cache/lvmcache.c 2011/01/10 13:15:57 1.102 @@ -83,6 +83,12 @@ vginfo->vgmetadata = NULL; + /* Release also cached config tree */ + if (vginfo->cft) { + destroy_config_tree(vginfo->cft); + vginfo->cft = NULL; + } + log_debug("Metadata cache: VG %s wiped.", vginfo->vgname); } @@ -651,7 +657,9 @@ vgid, NULL))) return_NULL; - if (!(vginfo->cft = + /* Build config tree from vgmetadata, if not yet cached */ + if (!vginfo->cft && + !(vginfo->cft = create_config_tree_from_string(fid->fmt->cmd, vginfo->vgmetadata))) { _free_cached_vgmetadata(vginfo); @@ -660,10 +668,8 @@ if (!(vg = import_vg_from_config_tree(vginfo->cft, fid))) { _free_cached_vgmetadata(vginfo); - destroy_config_tree(vginfo->cft); return_NULL; } - destroy_config_tree(vginfo->cft); log_debug("Using cached %smetadata for VG %s.", vginfo->precommitted ? "pre-committed" : "", vginfo->vgname); --- LVM2/lib/cache/lvmcache.h 2011/01/10 13:13:42 1.36 +++ LVM2/lib/cache/lvmcache.h 2011/01/10 13:15:57 1.37 @@ -48,6 +48,7 @@ char *creation_host; char *vgmetadata; /* Copy of VG metadata as format_text string */ struct config_tree *cft; /* Config tree created from vgmetadata */ + /* Lifetime is directly tied to vgmetadata */ unsigned precommitted; /* Is vgmetadata live or precommitted? */ }; From zkabelac@sourceware.org Mon Jan 10 13:25:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Mon, 10 Jan 2011 13:25:00 -0000 Subject: LVM2/test/lib harness.c Message-ID: <20110110132523.27769.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-10 13:25:22 Modified files: test/lib : harness.c Log message: Use strndup as GNU extension strndup needs _GNU_SOURCE defined as it's GNU extension. Remove duplicate string.h header added in previous harness commit. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/lib/harness.c.diff?cvsroot=lvm2&r1=1.2&r2=1.3 --- LVM2/test/lib/harness.c 2011/01/05 15:03:43 1.2 +++ LVM2/test/lib/harness.c 2011/01/10 13:25:22 1.3 @@ -12,6 +12,7 @@ * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#define _GNU_SOURCE #include #include #include @@ -19,7 +20,6 @@ #include #include #include -#include static pid_t pid; static int fds[2]; From zkabelac@sourceware.org Mon Jan 10 13:42:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Mon, 10 Jan 2011 13:42:00 -0000 Subject: LVM2 ./WHATS_NEW_DM libdm/libdevmapper.h Message-ID: <20110110134232.25171.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-10 13:42:32 Modified files: . : WHATS_NEW_DM libdm : libdevmapper.h Log message: Define DM_COOKIE_AUTO_CREATE TODO: Use it also for already written code. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW_DM.diff?cvsroot=lvm2&r1=1.435&r2=1.436 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/libdevmapper.h.diff?cvsroot=lvm2&r1=1.132&r2=1.133 --- LVM2/WHATS_NEW_DM 2011/01/04 14:43:53 1.435 +++ LVM2/WHATS_NEW_DM 2011/01/10 13:42:31 1.436 @@ -1,5 +1,6 @@ Version 1.02.61 - ==================================== + Add DM_COOKIE_AUTO_CREATE to libdevmapper.h. Export DM_CONTROL_NODE_UMASK and use it while creating /dev/mapper/control. Version 1.02.60 - 20th December 2010 --- LVM2/libdm/libdevmapper.h 2011/01/04 14:43:54 1.132 +++ LVM2/libdm/libdevmapper.h 2011/01/10 13:42:31 1.133 @@ -1214,6 +1214,11 @@ int dm_udev_get_sync_support(void); void dm_udev_set_checking(int checking); int dm_udev_get_checking(void); + +/* + * Default value to get new auto generated cookie created + */ +#define DM_COOKIE_AUTO_CREATE 0 int dm_udev_create_cookie(uint32_t *cookie); int dm_udev_complete(uint32_t cookie); int dm_udev_wait(uint32_t cookie); From zkabelac@sourceware.org Mon Jan 10 13:44:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Mon, 10 Jan 2011 13:44:00 -0000 Subject: LVM2 ./WHATS_NEW lib/activate/fs.c lib/activat ... Message-ID: <20110110134440.25922.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-10 13:44:39 Modified files: . : WHATS_NEW lib/activate : fs.c fs.h Log message: Add internal fs cookie Add functions for handling internal lvm cookie used for all dm_tree operations until fs_unlock is called. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1868&r2=1.1869 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/fs.c.diff?cvsroot=lvm2&r1=1.53&r2=1.54 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/fs.h.diff?cvsroot=lvm2&r1=1.14&r2=1.15 --- LVM2/WHATS_NEW 2011/01/10 13:15:57 1.1868 +++ LVM2/WHATS_NEW 2011/01/10 13:44:39 1.1869 @@ -1,5 +1,6 @@ Version 2.02.80 - ==================================== + Add internal lvm library cookie. Speedup command processing by caching resolved config tree. Pass config_tree to renamed function import_vg_from_config_tree(). Detect NULL handle in get_property(). --- LVM2/lib/activate/fs.c 2010/12/13 10:43:57 1.53 +++ LVM2/lib/activate/fs.c 2011/01/10 13:44:39 1.54 @@ -1,6 +1,6 @@ /* * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved. - * Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved. * * This file is part of LVM2. * @@ -26,6 +26,12 @@ #include #include +/* + * Library cookie to combine multiple fs transactions. + * Supports to wait for udev device settle only when needed. + */ +static uint32_t _fs_cookie = DM_COOKIE_AUTO_CREATE; + static int _mk_dir(const char *dev_dir, const char *vg_name) { char vg_path[PATH_MAX]; @@ -396,7 +402,21 @@ void fs_unlock(void) { if (!memlock()) { + /* Wait for all processed udev devices */ + if (!dm_udev_wait(_fs_cookie)) + stack; + _fs_cookie = DM_COOKIE_AUTO_CREATE; /* Reset cookie */ dm_lib_release(); _pop_fs_ops(); } } + +uint32_t fs_get_cookie(void) +{ + return _fs_cookie; +} + +void fs_set_cookie(uint32_t cookie) +{ + _fs_cookie = cookie; +} --- LVM2/lib/activate/fs.h 2010/01/07 19:54:21 1.14 +++ LVM2/lib/activate/fs.h 2011/01/10 13:44:39 1.15 @@ -30,5 +30,7 @@ int fs_rename_lv(struct logical_volume *lv, const char *dev, const char *old_vgname, const char *old_lvname); void fs_unlock(void); +uint32_t fs_get_cookie(void); +void fs_set_cookie(uint32_t cookie); #endif From zkabelac@sourceware.org Mon Jan 10 14:02:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Mon, 10 Jan 2011 14:02:00 -0000 Subject: LVM2 ./WHATS_NEW daemons/clvmd/clvmd-command.c ... Message-ID: <20110110140233.6105.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-10 14:02:31 Modified files: . : WHATS_NEW daemons/clvmd : clvmd-command.c lvm-functions.c lvm-functions.h lib/activate : activate.c activate.h dev_manager.c fs.c fs.h lib/locking : file_locking.c lib/metadata : lv_manip.c Log message: Speedup consequent activation calls Stop calling fs_unlock() from lv_de/activate(). Start using internal lvm fs cookie for dm_tree. Stop directly calling dm_udev_wait() and dm_tree_set/get_cookie() from activate code - it's now called through fs_unlock() function. Add lvm_do_fs_unlock() Call fs_unlock() when unlocking vg where implicit unlock solves the problem also for cluster - thus no extra command for clustering environment is required - only lvm_do_fs_unlock() function is added to call lvm's fs_unlock() while holding lvm_lock mutex in clvmd. Add fs_unlock() also to set_lv() so the command waits until devices are ready for regular open (i.e. wiping its begining). Move fs_unlock() prototype to activation.h to keep fs.h private in lib/activate dir and not expose other functions from this header. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1869&r2=1.1870 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/clvmd-command.c.diff?cvsroot=lvm2&r1=1.45&r2=1.46 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/lvm-functions.c.diff?cvsroot=lvm2&r1=1.104&r2=1.105 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/lvm-functions.h.diff?cvsroot=lvm2&r1=1.14&r2=1.15 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.c.diff?cvsroot=lvm2&r1=1.184&r2=1.185 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.h.diff?cvsroot=lvm2&r1=1.72&r2=1.73 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/dev_manager.c.diff?cvsroot=lvm2&r1=1.211&r2=1.212 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/fs.c.diff?cvsroot=lvm2&r1=1.54&r2=1.55 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/fs.h.diff?cvsroot=lvm2&r1=1.15&r2=1.16 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/locking/file_locking.c.diff?cvsroot=lvm2&r1=1.52&r2=1.53 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/lv_manip.c.diff?cvsroot=lvm2&r1=1.241&r2=1.242 --- LVM2/WHATS_NEW 2011/01/10 13:44:39 1.1869 +++ LVM2/WHATS_NEW 2011/01/10 14:02:30 1.1870 @@ -1,5 +1,6 @@ Version 2.02.80 - ==================================== + Speedup consequent activation calls by using internal cookie. Add internal lvm library cookie. Speedup command processing by caching resolved config tree. Pass config_tree to renamed function import_vg_from_config_tree(). --- LVM2/daemons/clvmd/clvmd-command.c 2010/12/22 12:14:11 1.45 +++ LVM2/daemons/clvmd/clvmd-command.c 2011/01/10 14:02:30 1.46 @@ -214,6 +214,7 @@ if (lkid == 0) return EINVAL; + lvm_do_fs_unlock(); /* Wait for devices */ status = sync_unlock(lockname, lkid); if (status) status = errno; --- LVM2/daemons/clvmd/lvm-functions.c 2010/12/08 20:50:48 1.104 +++ LVM2/daemons/clvmd/lvm-functions.c 2011/01/10 14:02:30 1.105 @@ -894,6 +894,13 @@ return v; } +void lvm_do_fs_unlock(void) +{ + pthread_mutex_lock(&lvm_lock); + fs_unlock(); + pthread_mutex_unlock(&lvm_lock); +} + /* Called to initialise the LVM context of the daemon */ int init_clvm(int using_gulm, char **argv) { --- LVM2/daemons/clvmd/lvm-functions.h 2010/08/17 16:25:32 1.14 +++ LVM2/daemons/clvmd/lvm-functions.h 2011/01/10 14:02:30 1.15 @@ -36,5 +36,6 @@ extern void do_lock_vg(unsigned char command, unsigned char lock_flags, char *resource); extern struct dm_hash_node *get_next_excl_lock(struct dm_hash_node *v, char **name); +void lvm_do_fs_unlock(void); #endif --- LVM2/lib/activate/activate.c 2010/12/20 13:37:26 1.184 +++ LVM2/lib/activate/activate.c 2011/01/10 14:02:31 1.185 @@ -1206,7 +1206,6 @@ memlock_inc(cmd); r = _lv_deactivate(lv); memlock_dec(cmd); - fs_unlock(); if (!lv_info(cmd, lv, 0, &info, 1, 0) || info.exists) r = 0; @@ -1305,7 +1304,6 @@ if (!(r = _lv_activate_lv(lv, 0))) stack; memlock_dec(cmd); - fs_unlock(); if (r && !monitor_dev_for_events(cmd, lv, 0, 1)) stack; --- LVM2/lib/activate/activate.h 2010/11/30 11:53:31 1.72 +++ LVM2/lib/activate/activate.h 2011/01/10 14:02:31 1.73 @@ -121,4 +121,9 @@ */ int device_is_usable(struct device *dev); +/* + * Declaration moved here from fs.h to keep header fs.h hidden + */ +void fs_unlock(void); + #endif --- LVM2/lib/activate/dev_manager.c 2011/01/05 14:03:37 1.211 +++ LVM2/lib/activate/dev_manager.c 2011/01/10 14:02:31 1.212 @@ -1622,7 +1622,6 @@ struct dm_tree_node *child; char *vgname, *lvname, *layer; const char *name, *uuid; - int r; while ((child = dm_tree_next_child(&handle, root, 0))) { if (!(name = dm_tree_node_get_name(child))) @@ -1644,12 +1643,7 @@ if (non_toplevel_tree_dlid && !strcmp(non_toplevel_tree_dlid, uuid)) continue; - dm_tree_set_cookie(root, 0); - r = dm_tree_deactivate_children(root, uuid, strlen(uuid)); - if (!dm_udev_wait(dm_tree_get_cookie(root))) - stack; - - if (!r) + if (!dm_tree_deactivate_children(root, uuid, strlen(uuid))) return_0; } @@ -1669,9 +1663,12 @@ if (!(root = dm_tree_find_node(dtree, 0, 0))) { log_error("Lost dependency tree root node"); - goto out; + goto out_no_root; } + /* Restore fs cookie */ + dm_tree_set_cookie(root, fs_get_cookie()); + if (!(dlid = build_dm_uuid(dm->mem, lv->lvid.s, origin_only ? "real" : NULL))) goto_out; @@ -1684,10 +1681,7 @@ break; case DEACTIVATE: /* Deactivate LV and all devices it references that nothing else has open. */ - dm_tree_set_cookie(root, 0); r = dm_tree_deactivate_children(root, dlid, ID_LEN + sizeof(UUID_PREFIX) - 1); - if (!dm_udev_wait(dm_tree_get_cookie(root))) - stack; if (!r) goto_out; if (!_remove_lv_symlinks(dm, root)) @@ -1708,10 +1702,7 @@ goto_out; /* Preload any devices required before any suspensions */ - dm_tree_set_cookie(root, 0); r = dm_tree_preload_children(root, dlid, ID_LEN + sizeof(UUID_PREFIX) - 1); - if (!dm_udev_wait(dm_tree_get_cookie(root))) - stack; if (!r) goto_out; @@ -1719,10 +1710,7 @@ dm->flush_required = 1; if (action == ACTIVATE) { - dm_tree_set_cookie(root, 0); r = dm_tree_activate_children(root, dlid, ID_LEN + sizeof(UUID_PREFIX) - 1); - if (!dm_udev_wait(dm_tree_get_cookie(root))) - stack; if (!r) goto_out; if (!_create_lv_symlinks(dm, root)) { @@ -1740,6 +1728,9 @@ r = 1; out: + /* Save fs cookie for udev settle, do not wait here */ + fs_set_cookie(dm_tree_get_cookie(root)); +out_no_root: dm_tree_free(dtree); return r; --- LVM2/lib/activate/fs.c 2011/01/10 13:44:39 1.54 +++ LVM2/lib/activate/fs.c 2011/01/10 14:02:31 1.55 @@ -15,6 +15,7 @@ #include "lib.h" #include "fs.h" +#include "activate.h" #include "toolcontext.h" #include "lvm-string.h" #include "lvm-file.h" --- LVM2/lib/activate/fs.h 2011/01/10 13:44:39 1.15 +++ LVM2/lib/activate/fs.h 2011/01/10 14:02:31 1.16 @@ -29,7 +29,7 @@ const char *lv_name, int check_udev); int fs_rename_lv(struct logical_volume *lv, const char *dev, const char *old_vgname, const char *old_lvname); -void fs_unlock(void); +/* void fs_unlock(void); moved to activate.h */ uint32_t fs_get_cookie(void); void fs_set_cookie(uint32_t cookie); --- LVM2/lib/locking/file_locking.c 2011/01/05 15:10:30 1.52 +++ LVM2/lib/locking/file_locking.c 2011/01/10 14:02:31 1.53 @@ -215,6 +215,7 @@ state = 'W'; break; case LCK_UNLOCK: + fs_unlock(); /* Wait until devices are available */ return _release_lock(file, 1); default: log_error("Unrecognised lock type: %d", flags & LCK_TYPE_MASK); --- LVM2/lib/metadata/lv_manip.c 2010/12/20 14:38:22 1.241 +++ LVM2/lib/metadata/lv_manip.c 2011/01/10 14:02:31 1.242 @@ -3022,6 +3022,8 @@ return 0; } + fs_unlock(); /* Wait until devices are available */ + log_verbose("Clearing start of logical volume \"%s\"", lv->name); if (!(dev = dev_cache_get(name, NULL))) { From agk@sourceware.org Mon Jan 10 14:28:00 2011 From: agk@sourceware.org (agk@sourceware.org) Date: Mon, 10 Jan 2011 14:28:00 -0000 Subject: LVM2 WHATS_NEW WHATS_NEW_DM VERSION VERSION_DM ... Message-ID: <20110110142819.16930.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: agk@sourceware.org 2011-01-10 14:28:18 Modified files: . : WHATS_NEW WHATS_NEW_DM VERSION VERSION_DM configure Log message: pre-release Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1870&r2=1.1871 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW_DM.diff?cvsroot=lvm2&r1=1.436&r2=1.437 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/VERSION.diff?cvsroot=lvm2&r1=1.266&r2=1.267 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/VERSION_DM.diff?cvsroot=lvm2&r1=1.75&r2=1.76 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/configure.diff?cvsroot=lvm2&r1=1.144&r2=1.145 --- LVM2/WHATS_NEW 2011/01/10 14:02:30 1.1870 +++ LVM2/WHATS_NEW 2011/01/10 14:28:17 1.1871 @@ -1,19 +1,20 @@ -Version 2.02.80 - -==================================== - Speedup consequent activation calls by using internal cookie. - Add internal lvm library cookie. - Speedup command processing by caching resolved config tree. +Version 2.02.80 - 10th January 2011 +=================================== + Use same dm cookie for consecutive dm ops in same VG to reduce udev waits. + Speed up command processing by caching resolved config tree. Pass config_tree to renamed function import_vg_from_config_tree(). Detect NULL handle in get_property(). Fix superfluous /usr in ocf_scriptdir instalation path. Add --with-ocfdir configurable option. Add aclocal.m4 (for pkgconfig). - Fix memory leak in filter creation error path. - Add missing tests in _setup_task(). - Fail poll daemon creation when lvmcache_init() fails. - Return defined value for errors in _copy_percent() and _snap_percent(). - Correct return code of cmirrord when issuing 'start' when already running. - Fix wrongly paired unlocking of global lock in pvchange. (2.02.66) + Fix memory leak in persistent filter creation error path. + Check for errors setting up dm_task struct in _setup_task(). + Fail polldaemon creation when lvmcache_init() fails. + Return PERCENT_INVALID for errors in _copy_percent() and _snap_percent(). + Remove some unused variables. + Improve general lvconvert man page description. + Return 0 from cmirrord initscript 'start' if daemon is already running. + Fix wrongly paired unlocking of VG_GLOBAL in pvchange. (2.02.66) Add backtraces for backup and backup_remove fail paths. Detect errors from dm_task_set calls in _get_device_info (dmeventd). Add backtraces for archive and backup_locally in check_current_backup(). --- LVM2/WHATS_NEW_DM 2011/01/10 13:42:31 1.436 +++ LVM2/WHATS_NEW_DM 2011/01/10 14:28:18 1.437 @@ -1,5 +1,5 @@ -Version 1.02.61 - -==================================== +Version 1.02.61 - 10th January 2011 +=================================== Add DM_COOKIE_AUTO_CREATE to libdevmapper.h. Export DM_CONTROL_NODE_UMASK and use it while creating /dev/mapper/control. --- LVM2/VERSION 2010/12/21 21:08:52 1.266 +++ LVM2/VERSION 2011/01/10 14:28:18 1.267 @@ -1 +1 @@ -2.02.80(2)-cvs (2010-12-21) +2.02.80(2)-cvs (2011-01-10) --- LVM2/VERSION_DM 2010/12/21 21:08:52 1.75 +++ LVM2/VERSION_DM 2011/01/10 14:28:18 1.76 @@ -1 +1 @@ -1.02.61-cvs (2010-12-21) +1.02.61-cvs (2011-01-10) --- LVM2/configure 2011/01/07 14:38:34 1.144 +++ LVM2/configure 2011/01/10 14:28:18 1.145 @@ -619,6 +619,7 @@ POOL PKGCONFIG REPLICATORS +OCFDIR OCF MIRRORS LVM_RELEASE_DATE @@ -797,6 +798,7 @@ enable_readline enable_realtime enable_ocf +with_ocfdir with_clvmd with_clvmd_pidfile enable_cmirrord @@ -1536,6 +1538,8 @@ [[TYPE=internal]] --with-replicators=TYPE replicator support: internal/shared/none [[TYPE=none]] + --with-ocfdir=DIR install OCF files in DIR + [[PREFIX/lib/ocf/resource.d/lvm2]] --with-clvmd=TYPE build cluster LVM Daemon The following cluster manager combinations are valid: * cman,gulm (RHEL4 or equivalent) @@ -6908,6 +6912,14 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCF" >&5 $as_echo "$OCF" >&6; } +# Check whether --with-ocfdir was given. +if test "${with_ocfdir+set}" = set; then : + withval=$with_ocfdir; OCFDIR=$withval +else + OCFDIR='${prefix}/lib/ocf/resource.d/lvm2' +fi + + ################################################################################ pkg_config_init() { @@ -10284,6 +10296,7 @@ + ################################################################################ ac_config_files="$ac_config_files Makefile make.tmpl daemons/Makefile daemons/clvmd/Makefile daemons/cmirrord/Makefile daemons/dmeventd/Makefile daemons/dmeventd/libdevmapper-event.pc daemons/dmeventd/plugins/Makefile daemons/dmeventd/plugins/lvm2/Makefile daemons/dmeventd/plugins/mirror/Makefile daemons/dmeventd/plugins/snapshot/Makefile doc/Makefile doc/example.conf include/.symlinks include/Makefile lib/Makefile lib/format1/Makefile lib/format_pool/Makefile lib/locking/Makefile lib/mirror/Makefile lib/replicator/Makefile lib/misc/lvm-version.h lib/snapshot/Makefile libdm/Makefile libdm/libdevmapper.pc liblvm/Makefile liblvm/liblvm2app.pc man/Makefile po/Makefile scripts/clvmd_init_red_hat scripts/cmirrord_init_red_hat scripts/lvm2_monitoring_init_red_hat scripts/Makefile test/Makefile test/api/Makefile tools/Makefile udev/Makefile unit-tests/datastruct/Makefile unit-tests/regex/Makefile unit-tests/mm/Makefile" From agk@sourceware.org Mon Jan 10 14:51:00 2011 From: agk@sourceware.org (agk@sourceware.org) Date: Mon, 10 Jan 2011 14:51:00 -0000 Subject: LVM2 VERSION VERSION_DM WHATS_NEW WHATS_NEW_DM Message-ID: <20110110145135.18467.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: agk@sourceware.org 2011-01-10 14:51:33 Modified files: . : VERSION VERSION_DM WHATS_NEW WHATS_NEW_DM Log message: post-release Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/VERSION.diff?cvsroot=lvm2&r1=1.267&r2=1.268 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/VERSION_DM.diff?cvsroot=lvm2&r1=1.76&r2=1.77 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1871&r2=1.1872 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW_DM.diff?cvsroot=lvm2&r1=1.437&r2=1.438 --- LVM2/VERSION 2011/01/10 14:28:18 1.267 +++ LVM2/VERSION 2011/01/10 14:51:33 1.268 @@ -1 +1 @@ -2.02.80(2)-cvs (2011-01-10) +2.02.81(2)-cvs (2011-01-10) --- LVM2/VERSION_DM 2011/01/10 14:28:18 1.76 +++ LVM2/VERSION_DM 2011/01/10 14:51:33 1.77 @@ -1 +1 @@ -1.02.61-cvs (2011-01-10) +1.02.62-cvs (2011-01-10) --- LVM2/WHATS_NEW 2011/01/10 14:28:17 1.1871 +++ LVM2/WHATS_NEW 2011/01/10 14:51:33 1.1872 @@ -1,3 +1,6 @@ +Version 2.02.81 - +=================================== + Version 2.02.80 - 10th January 2011 =================================== Use same dm cookie for consecutive dm ops in same VG to reduce udev waits. --- LVM2/WHATS_NEW_DM 2011/01/10 14:28:18 1.437 +++ LVM2/WHATS_NEW_DM 2011/01/10 14:51:33 1.438 @@ -1,3 +1,6 @@ +Version 1.02.62 - +=================================== + Version 1.02.61 - 10th January 2011 =================================== Add DM_COOKIE_AUTO_CREATE to libdevmapper.h. From zkabelac@sourceware.org Mon Jan 10 19:31:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Mon, 10 Jan 2011 19:31:00 -0000 Subject: LVM2 ./WHATS_NEW lib/misc/lvm-exec.c tools/pol ... Message-ID: <20110110193103.1658.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-10 19:31:02 Modified files: . : WHATS_NEW lib/misc : lvm-exec.c tools : polldaemon.c Log message: Avoid cookie sharing between forked processes Before fork, ensure cookie is reset so it's not shared between processes. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1872&r2=1.1873 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/misc/lvm-exec.c.diff?cvsroot=lvm2&r1=1.8&r2=1.9 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/polldaemon.c.diff?cvsroot=lvm2&r1=1.40&r2=1.41 --- LVM2/WHATS_NEW 2011/01/10 14:51:33 1.1872 +++ LVM2/WHATS_NEW 2011/01/10 19:31:02 1.1873 @@ -1,5 +1,6 @@ Version 2.02.81 - =================================== + Fix cookie sharing between forked lvm processes (2.02.80). Version 2.02.80 - 10th January 2011 =================================== --- LVM2/lib/misc/lvm-exec.c 2010/11/01 14:17:36 1.8 +++ LVM2/lib/misc/lvm-exec.c 2011/01/10 19:31:02 1.9 @@ -54,6 +54,8 @@ log_verbose("Executing: %s", _verbose_args(argv, buf, sizeof(buf))); + fs_unlock(); /* Flush oops and ensure cookie is not shared */ + if ((pid = fork()) == -1) { log_error("fork failed: %s", strerror(errno)); return 0; --- LVM2/tools/polldaemon.c 2011/01/05 12:59:47 1.40 +++ LVM2/tools/polldaemon.c 2011/01/10 19:31:02 1.41 @@ -42,6 +42,8 @@ sigaction(SIGCHLD, &act, NULL); + fs_unlock(); /* Flush oops and ensure cookie is not shared */ + if ((pid = fork()) == -1) { log_error("fork failed: %s", strerror(errno)); return -1; From zkabelac@sourceware.org Mon Jan 10 19:49:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Mon, 10 Jan 2011 19:49:00 -0000 Subject: LVM2/lib/misc lvm-exec.c Message-ID: <20110110194943.31864.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-10 19:49:42 Modified files: lib/misc : lvm-exec.c Log message: Fix missing declaration for fs_unlock Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/misc/lvm-exec.c.diff?cvsroot=lvm2&r1=1.9&r2=1.10 --- LVM2/lib/misc/lvm-exec.c 2011/01/10 19:31:02 1.9 +++ LVM2/lib/misc/lvm-exec.c 2011/01/10 19:49:42 1.10 @@ -18,6 +18,7 @@ #include "locking.h" #include "lvm-exec.h" #include "toolcontext.h" +#include "activate.h" #include #include From agk@sourceware.org Mon Jan 10 21:12:00 2011 From: agk@sourceware.org (agk@sourceware.org) Date: Mon, 10 Jan 2011 21:12:00 -0000 Subject: LVM2 WHATS_NEW Message-ID: <20110110211219.8037.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: agk@sourceware.org 2011-01-10 21:12:18 Modified files: . : WHATS_NEW Log message: reissue 2.02.80 Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1873&r2=1.1874 --- LVM2/WHATS_NEW 2011/01/10 19:31:02 1.1873 +++ LVM2/WHATS_NEW 2011/01/10 21:12:18 1.1874 @@ -1,7 +1,3 @@ -Version 2.02.81 - -=================================== - Fix cookie sharing between forked lvm processes (2.02.80). - Version 2.02.80 - 10th January 2011 =================================== Use same dm cookie for consecutive dm ops in same VG to reduce udev waits. From agk@sourceware.org Mon Jan 10 21:12:00 2011 From: agk@sourceware.org (agk@sourceware.org) Date: Mon, 10 Jan 2011 21:12:00 -0000 Subject: LVM2 WHATS_NEW Message-ID: <20110110211255.8365.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: agk@sourceware.org 2011-01-10 21:12:55 Modified files: . : WHATS_NEW Log message: post-release Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1874&r2=1.1875 --- LVM2/WHATS_NEW 2011/01/10 21:12:18 1.1874 +++ LVM2/WHATS_NEW 2011/01/10 21:12:54 1.1875 @@ -1,3 +1,6 @@ +Version 2.02.81 - +=================================== + Version 2.02.80 - 10th January 2011 =================================== Use same dm cookie for consecutive dm ops in same VG to reduce udev waits. From jbrassow@sourceware.org Tue Jan 11 17:05:00 2011 From: jbrassow@sourceware.org (jbrassow@sourceware.org) Date: Tue, 11 Jan 2011 17:05:00 -0000 Subject: LVM2 ./WHATS_NEW lib/metadata/lv_manip.c lib/m ... Message-ID: <20110111170512.2348.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: jbrassow@sourceware.org 2011-01-11 17:05:10 Modified files: . : WHATS_NEW lib/metadata : lv_manip.c mirror.c test : t-lvconvert-mirror-basic.sh t-lvconvert-repair-policy.sh t-lvconvert-repair-replace.sh t-lvconvert-repair.sh t-lvconvert-twostep.sh tools : lvconvert.c lvcreate.c Log message: Add disk to mirrored log type conversion. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1875&r2=1.1876 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/lv_manip.c.diff?cvsroot=lvm2&r1=1.242&r2=1.243 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/mirror.c.diff?cvsroot=lvm2&r1=1.138&r2=1.139 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-lvconvert-mirror-basic.sh.diff?cvsroot=lvm2&r1=1.5&r2=1.6 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-lvconvert-repair-policy.sh.diff?cvsroot=lvm2&r1=1.6&r2=1.7 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-lvconvert-repair-replace.sh.diff?cvsroot=lvm2&r1=1.2&r2=1.3 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-lvconvert-repair.sh.diff?cvsroot=lvm2&r1=1.9&r2=1.10 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-lvconvert-twostep.sh.diff?cvsroot=lvm2&r1=1.2&r2=1.3 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvconvert.c.diff?cvsroot=lvm2&r1=1.154&r2=1.155 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvcreate.c.diff?cvsroot=lvm2&r1=1.227&r2=1.228 --- LVM2/WHATS_NEW 2011/01/10 21:12:54 1.1875 +++ LVM2/WHATS_NEW 2011/01/11 17:05:08 1.1876 @@ -1,5 +1,6 @@ Version 2.02.81 - =================================== + Add disk to mirrored log type conversion. Version 2.02.80 - 10th January 2011 =================================== --- LVM2/lib/metadata/lv_manip.c 2011/01/10 14:02:31 1.242 +++ LVM2/lib/metadata/lv_manip.c 2011/01/11 17:05:09 1.243 @@ -1557,8 +1557,7 @@ parallel_areas))) return_NULL; - if (!segtype_is_virtual(segtype) && - !_allocate(ah, vg, lv, 1, allocatable_pvs)) { + if (!_allocate(ah, vg, lv, 1, allocatable_pvs)) { alloc_destroy(ah); return_NULL; } --- LVM2/lib/metadata/mirror.c 2010/11/30 11:53:32 1.138 +++ LVM2/lib/metadata/mirror.c 2011/01/11 17:05:09 1.139 @@ -1295,7 +1295,7 @@ struct logical_volume **img_lvs, int log) { - uint32_t m; + uint32_t m, first_area; char *img_name; size_t len; @@ -1322,10 +1322,13 @@ } if (log) { - if (!lv_add_log_segment(ah, m * stripes + 1, img_lvs[m], 0)) { - log_error("Aborting. Failed to add mirror image segment " - "to %s. Remove new LV and retry.", - img_lvs[m]->name); + first_area = m * stripes + (log - 1); + + if (!lv_add_log_segment(ah, first_area, img_lvs[m], 0)) { + /* error msg already from lv_add_log_segment */ + log_verbose("Failed to add mirror image segment" + " to %s. Remove new LV and retry.", + img_lvs[m]->name); return 0; } } else { @@ -1760,7 +1763,7 @@ } if ((log_count > 1) && - !_form_mirror(cmd, ah, log_lv, log_count-1, 1, 0, region_size, 1)) { + !_form_mirror(cmd, ah, log_lv, log_count-1, 1, 0, region_size, 2)) { log_error("Failed to form mirrored log."); return NULL; } @@ -1792,6 +1795,7 @@ int in_sync; struct logical_volume *log_lv; struct lvinfo info; + int old_log_count; int r = 0; if (dm_list_size(&lv->segments) != 1) { @@ -1811,6 +1815,15 @@ return 0; } + log_lv = first_seg(lv)->log_lv; + old_log_count = (log_lv) ? lv_mirror_count(log_lv) : 0; + if (old_log_count == log_count) { + log_verbose("Mirror already has a %s log", + !log_count ? "core" : + (log_count == 1) ? "disk" : "mirrored"); + return 1; + } + if (!(parallel_areas = build_parallel_areas_from_lv(cmd, lv, 0))) return_0; @@ -1826,13 +1839,24 @@ /* allocate destination extents */ ah = allocate_extents(lv->vg, NULL, segtype, - 0, 0, log_count, region_size, 0, + 0, 0, log_count - old_log_count, region_size, 0, allocatable_pvs, alloc, parallel_areas); if (!ah) { log_error("Unable to allocate extents for mirror log."); return 0; } + if (old_log_count) { + /* Converting from disk to mirrored log */ + if (!_form_mirror(cmd, ah, log_lv, log_count - 1, 1, 0, + region_size, 1)) { + log_error("Failed to convert mirror log"); + return 0; + } + r = 1; + goto out; + } + /* check sync status */ if (lv_mirror_percent(cmd, lv, 0, &sync_percent, NULL) && (sync_percent == PERCENT_100)) --- LVM2/test/t-lvconvert-mirror-basic.sh 2011/01/05 00:16:20 1.5 +++ LVM2/test/t-lvconvert-mirror-basic.sh 2011/01/11 17:05:09 1.6 @@ -54,12 +54,6 @@ local active=true local i - if [ "$start_log_type" = "disk" ] && - [ "$finish_log_type" = "mirrored" ]; then - echo "FIXME: disk -> mirrored log conversion not yet supported by LVM" - return 0 - fi - test "$5" = "active" && active=false #test $finish_count -gt $start_count && up=true --- LVM2/test/t-lvconvert-repair-policy.sh 2011/01/05 00:16:20 1.6 +++ LVM2/test/t-lvconvert-repair-policy.sh 2011/01/11 17:05:09 1.7 @@ -55,7 +55,8 @@ cleanup $dev1 # Fail a leg of a mirror w/ no available spare -# Expected result: 2-way with corelog +# Expected result: linear +# (or 2-way with leg/log overlap if alloc anywhere) aux disable_dev $dev2 $dev4 repair 'activation { mirror_image_fault_policy = "replace" }' check mirror $vg mirror --- LVM2/test/t-lvconvert-repair-replace.sh 2011/01/05 00:16:20 1.2 +++ LVM2/test/t-lvconvert-repair-replace.sh 2011/01/11 17:05:09 1.3 @@ -13,6 +13,7 @@ aux prepare_vg 6 +# 3-way, disk log # multiple failures, full replace lvcreate --mirrorlog disk -m 2 --ig -L 1 -n 3way $vg $dev1 $dev2 $dev3 $dev4:0-1 aux disable_dev $dev1 $dev2 @@ -23,8 +24,37 @@ check mirror $vg 3way aux enable_dev $dev1 $dev2 +vgremove -ff $vg; vgcreate -c n $vg $dev1 $dev2 $dev3 $dev4 $dev5 $dev6 + +# 2-way, mirrored log +# Double log failure, full replace +lvcreate --mirrorlog mirrored -m 1 --ig -L 1 -n 2way $vg \ + $dev1 $dev2 $dev3:0 $dev4:0 +aux disable_dev $dev3 $dev4 +echo y | lvconvert --repair $vg/2way 2>&1 | tee 2way.out +lvs -a -o +devices | not grep unknown +not grep "WARNING: Failed" 2way.out +vgreduce --removemissing $vg +check mirror $vg 2way +aux enable_dev $dev3 $dev4 + +vgremove -ff $vg; vgcreate -c n $vg $dev1 $dev2 $dev3 $dev4 $dev5 $dev6 + +# 3-way, mirrored log +# Single log failure, replace +lvcreate --mirrorlog mirrored -m 2 --ig -L 1 -n 3way $vg \ + $dev1 $dev2 $dev3 $dev4:0 $dev5:0 +aux disable_dev $dev4 +echo y | lvconvert --repair $vg/3way 2>&1 | tee 3way.out +lvs -a -o +devices | not grep unknown +not grep "WARNING: Failed" 3way.out +vgreduce --removemissing $vg +check mirror $vg 3way +aux enable_dev $dev4 + vgremove -ff $vg; vgcreate -c n $vg $dev1 $dev2 $dev3 $dev4 $dev5 +# 3-way, disk log # multiple failures, partial replace lvcreate --mirrorlog disk -m 2 --ig -L 1 -n 3way $vg $dev1 $dev2 $dev3 $dev4 aux disable_dev $dev1 $dev2 --- LVM2/test/t-lvconvert-repair.sh 2011/01/05 00:16:20 1.9 +++ LVM2/test/t-lvconvert-repair.sh 2011/01/11 17:05:09 1.10 @@ -14,6 +14,7 @@ # fail multiple devices +# 4-way, disk log => 2-way, disk log aux prepare_vg 5 lvcreate -m 3 --ig -L 1 -n 4way $vg $dev1 $dev2 $dev3 $dev4 $dev5:0 aux disable_dev $dev2 $dev4 @@ -23,6 +24,7 @@ aux enable_dev $dev2 $dev4 check mirror $vg 4way $dev5 +# 3-way, disk log => linear aux prepare_vg 5 lvcreate -m 2 --ig -L 1 -n 3way $vg aux disable_dev $dev1 $dev2 @@ -37,6 +39,7 @@ # fail just log and get it removed +# 3-way, disk log => 3-way, core log aux prepare_vg 5 lvcreate -m 2 --ig -L 1 -n 3way $vg $dev1 $dev2 $dev3 $dev4:0 aux disable_dev $dev4 @@ -48,6 +51,20 @@ vgreduce --removemissing $vg aux enable_dev $dev4 +# 3-way, mirrored log => 3-way, core log +aux prepare_vg 5 +lvcreate -m 2 --mirrorlog mirrored --ig -L 1 -n 3way $vg \ + $dev1 $dev2 $dev3 $dev4:0 $dev5:0 +aux disable_dev $dev4 $dev5 +echo n | lvconvert --repair $vg/3way +check mirror $vg 3way core +lvs -a -o +devices | not grep unknown +lvs -a -o +devices | not grep mlog +dmsetup ls | grep $PREFIX | not grep mlog +vgreduce --removemissing $vg +aux enable_dev $dev4 $dev5 + +# 2-way, disk log => 2-way, core log aux prepare_vg 5 lvcreate -m 1 --ig -L 1 -n 2way $vg $dev1 $dev2 $dev3:0 aux disable_dev $dev3 --- LVM2/test/t-lvconvert-twostep.sh 2011/01/05 00:16:20 1.2 +++ LVM2/test/t-lvconvert-twostep.sh 2011/01/11 17:05:09 1.3 @@ -12,10 +12,15 @@ . lib/test aux prepare_vg 4 + lvcreate -m 1 --mirrorlog disk --ig -L 1 -n mirror $vg not lvconvert -m 2 --mirrorlog core $vg/mirror $dev3 2>&1 | tee errs grep "two steps" errs + lvconvert -m 2 $vg/mirror $dev3 lvconvert --mirrorlog core $vg/mirror not lvconvert -m 1 --mirrorlog disk $vg/mirror $dev3 2>&1 | tee errs grep "two steps" errs + +not lvconvert -m 1 --mirrorlog mirrored $vg/mirror $dev3 $dev4 2>&1 | tee errs +grep "two steps" errs --- LVM2/tools/lvconvert.c 2011/01/05 23:18:47 1.154 +++ LVM2/tools/lvconvert.c 2011/01/11 17:05:10 1.155 @@ -718,6 +718,7 @@ operable_pvs, 0U); } +static int _reload_lv(struct cmd_context *cmd, struct logical_volume *lv); static int _lv_update_log_type(struct cmd_context *cmd, struct lvconvert_params *lp, struct logical_volume *lv, @@ -738,14 +739,6 @@ lv->le_count, lp->region_size); - /* Add a log where there is none */ - if (!old_log_count) { - if (!add_mirror_log(cmd, original_lv, log_count, - region_size, operable_pvs, lp->alloc)) - return_0; - return 1; - } - /* Remove an existing log completely */ if (!log_count) { if (!remove_mirror_log(cmd, original_lv, operable_pvs, @@ -759,9 +752,17 @@ /* Adding redundancy to the log */ if (old_log_count < log_count) { - log_error("Adding log redundancy not supported yet."); - log_error("Try converting the log to 'core' first."); - return_0; + if (!add_mirror_log(cmd, original_lv, log_count, + region_size, operable_pvs, lp->alloc)) + return_0; + /* + * FIXME: This simple approach won't work in cluster mirrors, + * but it doesn't matter because we don't support + * mirrored logs in cluster mirrors. + */ + if (old_log_count) + return _reload_lv(cmd, log_lv); + return 1; } /* Reducing redundancy of the log */ @@ -1109,7 +1110,8 @@ /* FIXME: can't have multiple mlogs. force corelog. */ if (!lv_add_mirrors(cmd, lv, - new_mimage_count - old_mimage_count, lp->stripes, lp->stripe_size, + new_mimage_count - old_mimage_count, + lp->stripes, lp->stripe_size, region_size, 0U, operable_pvs, lp->alloc, MIRROR_BY_LV)) { layer_lv = seg_lv(first_seg(lv), 0); --- LVM2/tools/lvcreate.c 2010/12/08 20:50:51 1.227 +++ LVM2/tools/lvcreate.c 2011/01/11 17:05:10 1.228 @@ -538,8 +538,6 @@ struct lvcreate_cmdline_params lcp; struct volume_group *vg; - memset(&lp, 0, sizeof(lp)); - if (!_lvcreate_params(&lp, &lcp, cmd, argc, argv)) return EINVALID_CMD_LINE; From jbrassow@sourceware.org Tue Jan 11 17:21:00 2011 From: jbrassow@sourceware.org (jbrassow@sourceware.org) Date: Tue, 11 Jan 2011 17:21:00 -0000 Subject: LVM2/lib/metadata mirror.c Message-ID: <20110111172102.7625.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: jbrassow@sourceware.org 2011-01-11 17:21:02 Modified files: lib/metadata : mirror.c Log message: s/log_verbose/log_error/ - Increase log level on error message. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/mirror.c.diff?cvsroot=lvm2&r1=1.139&r2=1.140 --- LVM2/lib/metadata/mirror.c 2011/01/11 17:05:09 1.139 +++ LVM2/lib/metadata/mirror.c 2011/01/11 17:21:01 1.140 @@ -1325,10 +1325,9 @@ first_area = m * stripes + (log - 1); if (!lv_add_log_segment(ah, first_area, img_lvs[m], 0)) { - /* error msg already from lv_add_log_segment */ - log_verbose("Failed to add mirror image segment" - " to %s. Remove new LV and retry.", - img_lvs[m]->name); + log_error("Failed to add mirror image segment" + " to %s. Remove new LV and retry.", + img_lvs[m]->name); return 0; } } else { From agk@sourceware.org Wed Jan 12 15:28:00 2011 From: agk@sourceware.org (agk@sourceware.org) Date: Wed, 12 Jan 2011 15:28:00 -0000 Subject: LVM2 ./WHATS_NEW lib/filters/filter.c Message-ID: <20110112152835.3597.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: agk@sourceware.org 2011-01-12 15:28:34 Modified files: . : WHATS_NEW lib/filters : filter.c Log message: add fio Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1876&r2=1.1877 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/filters/filter.c.diff?cvsroot=lvm2&r1=1.58&r2=1.59 --- LVM2/WHATS_NEW 2011/01/11 17:05:08 1.1876 +++ LVM2/WHATS_NEW 2011/01/12 15:28:33 1.1877 @@ -1,5 +1,6 @@ Version 2.02.81 - =================================== + Accept fusion fio in device type filter. Add disk to mirrored log type conversion. Version 2.02.80 - 10th January 2011 --- LVM2/lib/filters/filter.c 2010/12/20 13:12:56 1.58 +++ LVM2/lib/filters/filter.c 2011/01/12 15:28:34 1.59 @@ -1,6 +1,6 @@ /* * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved. - * Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved. * * This file is part of LVM2. * @@ -128,6 +128,7 @@ {"virtblk", 8}, /* VirtIO disk */ {"mmc", 16}, /* MMC block device */ {"blkext", 1}, /* Extended device partitions */ + {"fio", 16}, /* Fusion */ {NULL, 0} }; From mornfall@sourceware.org Wed Jan 12 16:07:00 2011 From: mornfall@sourceware.org (mornfall@sourceware.org) Date: Wed, 12 Jan 2011 16:07:00 -0000 Subject: LVM2/test/lib aux.sh Message-ID: <20110112160756.8967.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: mornfall@sourceware.org 2011-01-12 16:07:56 Modified files: test/lib : aux.sh Log message: Kill clvmd properly after locking_type 3 tests (using clvmd/singlenode). Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/lib/aux.sh.diff?cvsroot=lvm2&r1=1.5&r2=1.6 --- LVM2/test/lib/aux.sh 2011/01/07 15:04:52 1.5 +++ LVM2/test/lib/aux.sh 2011/01/12 16:07:55 1.6 @@ -32,6 +32,7 @@ # check that it is really running now sleep .1 ps $LOCAL_CLVMD || skip + echo "$LOCAL_CLVMD" > LOCAL_CLVMD } prepare_dmeventd() { @@ -83,10 +84,10 @@ teardown() { echo -n "## teardown..." - test -n "$LOCAL_CLVMD" && { - kill "$LOCAL_CLVMD" + test -f LOCAL_CLVMD && { + kill "$(cat LOCAL_CLVMD)" sleep .1 - kill -9 "$LOCAL_CLVMD" || true + kill -9 "$(cat LOCAL_CLVMD)" || true } echo -n . From agk@sourceware.org Wed Jan 12 20:42:00 2011 From: agk@sourceware.org (agk@sourceware.org) Date: Wed, 12 Jan 2011 20:42:00 -0000 Subject: LVM2 ./WHATS_NEW daemons/clvmd/clvm.h daemons/ ... Message-ID: <20110112204258.16799.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: agk@sourceware.org 2011-01-12 20:42:51 Modified files: . : WHATS_NEW daemons/clvmd : clvm.h clvmd-command.c lvm-functions.c lib/activate : fs.c lib/locking : cluster_locking.c file_locking.c locking.c locking.h no_locking.c lib/metadata : lv_manip.c metadata-exported.h metadata.c lib/misc : lvm-exec.c libdm : libdm-common.c tools : polldaemon.c Log message: Replace fs_unlock by sync_local_dev_names to notify local clvmd. (2.02.80) Introduce sync_local_dev_names and CLVMD_CMD_SYNC_NAMES to issue fs_unlock. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1877&r2=1.1878 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/clvm.h.diff?cvsroot=lvm2&r1=1.9&r2=1.10 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/clvmd-command.c.diff?cvsroot=lvm2&r1=1.46&r2=1.47 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/lvm-functions.c.diff?cvsroot=lvm2&r1=1.105&r2=1.106 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/fs.c.diff?cvsroot=lvm2&r1=1.55&r2=1.56 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/locking/cluster_locking.c.diff?cvsroot=lvm2&r1=1.48&r2=1.49 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/locking/file_locking.c.diff?cvsroot=lvm2&r1=1.53&r2=1.54 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/locking/locking.c.diff?cvsroot=lvm2&r1=1.87&r2=1.88 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/locking/locking.h.diff?cvsroot=lvm2&r1=1.59&r2=1.60 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/locking/no_locking.c.diff?cvsroot=lvm2&r1=1.24&r2=1.25 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/lv_manip.c.diff?cvsroot=lvm2&r1=1.243&r2=1.244 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata-exported.h.diff?cvsroot=lvm2&r1=1.173&r2=1.174 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata.c.diff?cvsroot=lvm2&r1=1.419&r2=1.420 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/misc/lvm-exec.c.diff?cvsroot=lvm2&r1=1.10&r2=1.11 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/libdm-common.c.diff?cvsroot=lvm2&r1=1.106&r2=1.107 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/polldaemon.c.diff?cvsroot=lvm2&r1=1.41&r2=1.42 --- LVM2/WHATS_NEW 2011/01/12 15:28:33 1.1877 +++ LVM2/WHATS_NEW 2011/01/12 20:42:50 1.1878 @@ -1,5 +1,7 @@ Version 2.02.81 - =================================== + Replace fs_unlock by sync_local_dev_names to notify local clvmd. (2.02.80) + Introduce sync_local_dev_names and CLVMD_CMD_SYNC_NAMES to issue fs_unlock. Accept fusion fio in device type filter. Add disk to mirrored log type conversion. --- LVM2/daemons/clvmd/clvm.h 2010/07/28 13:55:43 1.9 +++ LVM2/daemons/clvmd/clvm.h 2011/01/12 20:42:50 1.10 @@ -71,4 +71,5 @@ #define CLVMD_CMD_SET_DEBUG 42 #define CLVMD_CMD_VG_BACKUP 43 #define CLVMD_CMD_RESTART 44 +#define CLVMD_CMD_SYNC_NAMES 45 #endif --- LVM2/daemons/clvmd/clvmd-command.c 2011/01/10 14:02:30 1.46 +++ LVM2/daemons/clvmd/clvmd-command.c 2011/01/12 20:42:50 1.47 @@ -139,6 +139,10 @@ do_refresh_cache(); break; + case CLVMD_CMD_SYNC_NAMES: + lvm_do_fs_unlock(); + break; + case CLVMD_CMD_SET_DEBUG: debug = args[0]; break; @@ -275,6 +279,7 @@ case CLVMD_CMD_GET_CLUSTERNAME: case CLVMD_CMD_SET_DEBUG: case CLVMD_CMD_VG_BACKUP: + case CLVMD_CMD_SYNC_NAMES: case CLVMD_CMD_LOCK_QUERY: case CLVMD_CMD_RESTART: break; @@ -307,6 +312,7 @@ case CLVMD_CMD_LOCK_VG: case CLVMD_CMD_VG_BACKUP: + case CLVMD_CMD_SYNC_NAMES: case CLVMD_CMD_LOCK_QUERY: /* Nothing to do here */ break; --- LVM2/daemons/clvmd/lvm-functions.c 2011/01/10 14:02:30 1.105 +++ LVM2/daemons/clvmd/lvm-functions.c 2011/01/12 20:42:50 1.106 @@ -897,6 +897,7 @@ void lvm_do_fs_unlock(void) { pthread_mutex_lock(&lvm_lock); + DEBUGLOG("Syncing device names\n"); fs_unlock(); pthread_mutex_unlock(&lvm_lock); } --- LVM2/lib/activate/fs.c 2011/01/10 14:02:31 1.55 +++ LVM2/lib/activate/fs.c 2011/01/12 20:42:50 1.56 @@ -403,6 +403,7 @@ void fs_unlock(void) { if (!memlock()) { + log_debug("Syncing device names"); /* Wait for all processed udev devices */ if (!dm_udev_wait(_fs_cookie)) stack; --- LVM2/lib/locking/cluster_locking.c 2011/01/05 15:10:30 1.48 +++ LVM2/lib/locking/cluster_locking.c 2011/01/12 20:42:50 1.49 @@ -345,14 +345,15 @@ * locks are cluster-wide. * Also, if the lock is exclusive it makes no sense to try to * acquire it on all nodes, so just do that on the local node too. - * One exception, is that P_ locks /do/ get distributed across - * the cluster because they might have side-effects. + * One exception, is that P_ locks (except VG_SYNC_NAMES) /do/ get + * distributed across the cluster because they might have side-effects. */ - if (strncmp(name, "P_", 2) && - (clvmd_cmd == CLVMD_CMD_LOCK_VG || - (flags & LCK_TYPE_MASK) == LCK_EXCL || - (flags & LCK_LOCAL) || - !(flags & LCK_CLUSTER_VG))) + if ((strncmp(name, "P_", 2) && + (clvmd_cmd == CLVMD_CMD_LOCK_VG || + (flags & LCK_TYPE_MASK) == LCK_EXCL || + (flags & LCK_LOCAL) || + !(flags & LCK_CLUSTER_VG))) || + (clvmd_cmd == CLVMD_CMD_SYNC_NAMES && (flags & LCK_LOCAL))) node = "."; status = _cluster_request(clvmd_cmd, node, args, len, @@ -401,6 +402,11 @@ switch (flags & LCK_SCOPE_MASK) { case LCK_VG: + if (!strcmp(resource, VG_SYNC_NAMES)) { + log_very_verbose("Requesting sync names."); + return _lock_for_cluster(cmd, CLVMD_CMD_SYNC_NAMES, + flags & ~LCK_HOLD, resource); + } if (flags == LCK_VG_BACKUP) { log_very_verbose("Requesting backup of VG metadata for %s", resource); --- LVM2/lib/locking/file_locking.c 2011/01/10 14:02:31 1.53 +++ LVM2/lib/locking/file_locking.c 2011/01/12 20:42:50 1.54 @@ -265,6 +265,9 @@ if (strcmp(resource, VG_GLOBAL)) lvmcache_drop_metadata(resource, 0); + if (!strcmp(resource, VG_SYNC_NAMES)) + fs_unlock(); + /* LCK_CACHE does not require a real lock */ if (flags & LCK_CACHE) break; --- LVM2/lib/locking/locking.c 2010/10/25 11:20:55 1.87 +++ LVM2/lib/locking/locking.c 2011/01/12 20:42:50 1.88 @@ -325,7 +325,7 @@ char path[PATH_MAX]; /* We'll allow operations on orphans */ - if (is_orphan_vg(vgname) || is_global_vg(vgname)) + if (!is_real_vg(vgname)) return 1; /* LVM1 is only present in 2.4 kernels. */ --- LVM2/lib/locking/locking.h 2010/12/08 20:50:50 1.59 +++ LVM2/lib/locking/locking.h 2011/01/12 20:42:51 1.60 @@ -109,6 +109,7 @@ */ #define VG_ORPHANS "#orphans" #define VG_GLOBAL "#global" +#define VG_SYNC_NAMES "#sync_names" /* * Common combinations @@ -169,6 +170,8 @@ lock_vol((vg)->cmd, (vg)->name, LCK_VG_REVERT) #define remote_backup_metadata(vg) \ lock_vol((vg)->cmd, (vg)->name, LCK_VG_BACKUP) +#define sync_local_dev_names(cmd) \ + lock_vol(cmd, VG_SYNC_NAMES, LCK_NONE | LCK_CACHE | LCK_LOCAL) /* Process list of LVs */ int suspend_lvs(struct cmd_context *cmd, struct dm_list *lvs); --- LVM2/lib/locking/no_locking.c 2010/08/17 19:25:05 1.24 +++ LVM2/lib/locking/no_locking.c 2011/01/12 20:42:51 1.25 @@ -38,6 +38,8 @@ { switch (flags & LCK_SCOPE_MASK) { case LCK_VG: + if (!strcmp(resource, VG_SYNC_NAMES)) + fs_unlock(); break; case LCK_LV: switch (flags & LCK_TYPE_MASK) { --- LVM2/lib/metadata/lv_manip.c 2011/01/11 17:05:09 1.243 +++ LVM2/lib/metadata/lv_manip.c 2011/01/12 20:42:51 1.244 @@ -3021,7 +3021,7 @@ return 0; } - fs_unlock(); /* Wait until devices are available */ + sync_local_dev_names(cmd); /* Wait until devices are available */ log_verbose("Clearing start of logical volume \"%s\"", lv->name); --- LVM2/lib/metadata/metadata-exported.h 2010/12/08 20:50:50 1.173 +++ LVM2/lib/metadata/metadata-exported.h 2011/01/12 20:42:51 1.174 @@ -362,6 +362,7 @@ const char *lv_name); int is_global_vg(const char *vg_name); int is_orphan_vg(const char *vg_name); +int is_real_vg(const char *vg_name); int vg_missing_pv_count(const struct volume_group *vg); int vgs_are_compatible(struct cmd_context *cmd, struct volume_group *vg_from, --- LVM2/lib/metadata/metadata.c 2010/12/22 15:36:41 1.419 +++ LVM2/lib/metadata/metadata.c 2011/01/12 20:42:51 1.420 @@ -3561,6 +3561,14 @@ } /* + * Exclude pseudo VG names used for locking. + */ +int is_real_vg(const char *vg_name) +{ + return (vg_name && *vg_name != '#'); +} + +/* * Returns: * 0 - fail * 1 - success --- LVM2/lib/misc/lvm-exec.c 2011/01/10 19:49:42 1.10 +++ LVM2/lib/misc/lvm-exec.c 2011/01/12 20:42:51 1.11 @@ -55,7 +55,7 @@ log_verbose("Executing: %s", _verbose_args(argv, buf, sizeof(buf))); - fs_unlock(); /* Flush oops and ensure cookie is not shared */ + sync_local_dev_names(cmd); /* Flush ops and reset dm cookie */ if ((pid = fork()) == -1) { log_error("fork failed: %s", strerror(errno)); --- LVM2/libdm/libdm-common.c 2010/12/13 12:44:09 1.106 +++ LVM2/libdm/libdm-common.c 2011/01/12 20:42:51 1.107 @@ -507,7 +507,7 @@ (void) dm_prepare_selinux_context(path, S_IFBLK); old_mask = umask(0); if (mknod(path, S_IFBLK | mode, dev) < 0) { - log_error("Unable to make device node for '%s'", dev_name); + log_error("%s: mknod for %s failed: %s", path, dev_name, strerror(errno)); umask(old_mask); (void) dm_prepare_selinux_context(NULL, 0); return 0; --- LVM2/tools/polldaemon.c 2011/01/10 19:31:02 1.41 +++ LVM2/tools/polldaemon.c 2011/01/12 20:42:51 1.42 @@ -42,7 +42,7 @@ sigaction(SIGCHLD, &act, NULL); - fs_unlock(); /* Flush oops and ensure cookie is not shared */ + sync_local_dev_names(cmd); /* Flush ops and reset dm cookie */ if ((pid = fork()) == -1) { log_error("fork failed: %s", strerror(errno)); From zkabelac@sourceware.org Thu Jan 13 11:02:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Thu, 13 Jan 2011 11:02:00 -0000 Subject: LVM2/test/lib harness.c Message-ID: <20110113110256.13782.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-13 11:02:55 Modified files: test/lib : harness.c Log message: Hotfix to stop harness busylooping Harness seems to be able to busyloop in while cycle and not moving forward for certain buffer - so check whethere there was some progress. This fix allows to continue after failed cluster test. Fix gcc warning for hiding global variable 's' -> sig. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/lib/harness.c.diff?cvsroot=lvm2&r1=1.3&r2=1.4 --- LVM2/test/lib/harness.c 2011/01/10 13:25:22 1.3 +++ LVM2/test/lib/harness.c 2011/01/13 11:02:55 1.4 @@ -54,10 +54,10 @@ #define FAILED 2 #define WARNED 3 -static void handler( int s ) { - signal( s, SIG_DFL ); - kill( pid, s ); - die = s; +static void handler( int sig ) { + signal( sig, SIG_DFL ); + kill( pid, sig ); + die = sig; } static int outline(char *buf, int start, int force) { @@ -110,10 +110,12 @@ } static void dump(void) { - int counter = 0; + int counter_last, counter = 0; - while ( counter < readbuf_used ) - counter = outline( readbuf, counter, 1 ); + while ( counter < readbuf_used && counter != counter_last ) { + counter_last = counter; + counter = outline( readbuf, counter, 1 ); + } } static void clear(void) { From zkabelac@sourceware.org Thu Jan 13 11:05:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Thu, 13 Jan 2011 11:05:00 -0000 Subject: LVM2/test t-lock-blocking.sh Message-ID: <20110113110528.15519.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-13 11:05:27 Modified files: test : t-lock-blocking.sh Log message: Check for file with clvmd pid Instead of checking $LOCAL_CLVMD set during some 'aux' execution which doesn't seem to be propagated to this shell - check for existance of pid file of clvmd process - so this test is skipped in singlenode cluster test. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-lock-blocking.sh.diff?cvsroot=lvm2&r1=1.3&r2=1.4 --- LVM2/test/t-lock-blocking.sh 2011/01/05 00:16:20 1.3 +++ LVM2/test/t-lock-blocking.sh 2011/01/13 11:05:27 1.4 @@ -14,7 +14,7 @@ . lib/test aux prepare_devs 3 -test -n "$LOCAL_CLVMD" && exit 200 +test -e LOCAL_CLVMD && exit 200 pvcreate $dev1 $dev2 vgcreate $vg $dev1 $dev2 From zkabelac@sourceware.org Thu Jan 13 14:51:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Thu, 13 Jan 2011 14:51:00 -0000 Subject: LVM2 ./WHATS_NEW lib/activate/activate.c lib/m ... Message-ID: <20110113145139.10590.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-13 14:51:35 Modified files: . : WHATS_NEW lib/activate : activate.c lib/misc : lvm-exec.c lvm-exec.h tools : lvresize.c Log message: Add exec_cmd paramater sync_needed As sync_local_dev_names() cannot be called within activation context, add new parametr which allows to select if the sync call is needed before executing new command. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1878&r2=1.1879 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.c.diff?cvsroot=lvm2&r1=1.185&r2=1.186 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/misc/lvm-exec.c.diff?cvsroot=lvm2&r1=1.11&r2=1.12 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/misc/lvm-exec.h.diff?cvsroot=lvm2&r1=1.6&r2=1.7 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvresize.c.diff?cvsroot=lvm2&r1=1.127&r2=1.128 --- LVM2/WHATS_NEW 2011/01/12 20:42:50 1.1878 +++ LVM2/WHATS_NEW 2011/01/13 14:51:32 1.1879 @@ -1,5 +1,6 @@ Version 2.02.81 - =================================== + Extend exec_cmd params to specify, when device sync is needed. Replace fs_unlock by sync_local_dev_names to notify local clvmd. (2.02.80) Introduce sync_local_dev_names and CLVMD_CMD_SYNC_NAMES to issue fs_unlock. Accept fusion fio in device type filter. --- LVM2/lib/activate/activate.c 2011/01/10 14:02:31 1.185 +++ LVM2/lib/activate/activate.c 2011/01/13 14:51:33 1.186 @@ -424,7 +424,7 @@ argv[1] = module; argv[2] = NULL; - ret = exec_cmd(cmd, argv, NULL); + ret = exec_cmd(cmd, argv, NULL, 0); #endif return ret; } --- LVM2/lib/misc/lvm-exec.c 2011/01/12 20:42:51 1.11 +++ LVM2/lib/misc/lvm-exec.c 2011/01/13 14:51:33 1.12 @@ -1,6 +1,6 @@ /* * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved. - * Copyright (C) 2004-2009 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved. * * This file is part of LVM2. * @@ -47,7 +47,8 @@ /* * Execute and wait for external command */ -int exec_cmd(struct cmd_context *cmd, const char *const argv[], int *rstatus) +int exec_cmd(struct cmd_context *cmd, const char *const argv[], + int *rstatus, int sync_needed) { pid_t pid; int status; @@ -55,7 +56,12 @@ log_verbose("Executing: %s", _verbose_args(argv, buf, sizeof(buf))); - sync_local_dev_names(cmd); /* Flush ops and reset dm cookie */ + if (rstatus) + *rstatus = -1; + + if (sync_needed) + if (!sync_local_dev_names(cmd)) /* Flush ops and reset dm cookie */ + return_0; if ((pid = fork()) == -1) { log_error("fork failed: %s", strerror(errno)); @@ -74,9 +80,6 @@ _exit(errno); } - if (rstatus) - *rstatus = -1; - /* Parent */ if (wait4(pid, &status, 0, NULL) != pid) { log_error("wait4 child process %u failed: %s", pid, --- LVM2/lib/misc/lvm-exec.h 2010/11/01 14:17:36 1.6 +++ LVM2/lib/misc/lvm-exec.h 2011/01/13 14:51:33 1.7 @@ -1,6 +1,6 @@ /* * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved. - * Copyright (C) 2004-2010 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved. * * This file is part of LVM2. * @@ -19,6 +19,22 @@ #include "lib.h" struct cmd_context; -int exec_cmd(struct cmd_context *cmd, const char *const argv[], int *rstatus); + +/** + * Execute command with paramaters and return status + * + * \param rstatus + * Returns command's exit status code. + * + * \param sync_needed + * Bool specifying whether local devices needs to be synchronized + * before executing command. + * Note: You cannot synchronize devices within activation context. + * + * \return + * 0 (success) or -1 (failure). + */ +int exec_cmd(struct cmd_context *cmd, const char *const argv[], + int *rstatus, int sync_needed); #endif --- LVM2/tools/lvresize.c 2010/12/08 20:50:51 1.127 +++ LVM2/tools/lvresize.c 2011/01/13 14:51:34 1.128 @@ -179,7 +179,7 @@ argv[i] = NULL; - return exec_cmd(cmd, argv, status); + return exec_cmd(cmd, argv, status, 1); } static int _lvresize_params(struct cmd_context *cmd, int argc, char **argv, From zkabelac@sourceware.org Thu Jan 13 14:56:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Thu, 13 Jan 2011 14:56:00 -0000 Subject: LVM2 ./WHATS_NEW lib/locking/locking.c Message-ID: <20110113145618.12179.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-13 14:56:17 Modified files: . : WHATS_NEW lib/locking : locking.c Log message: Skip unnecessary lock_vol() call after volume deactivation Improve condition within lock_vol so we are not calling extra unlock if the volume just has been deactivated. Patch uses lck_type and replaces negative 'and' condition to more readable 'or' condition. Few missing strace traces added. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1879&r2=1.1880 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/locking/locking.c.diff?cvsroot=lvm2&r1=1.88&r2=1.89 --- LVM2/WHATS_NEW 2011/01/13 14:51:32 1.1879 +++ LVM2/WHATS_NEW 2011/01/13 14:56:17 1.1880 @@ -1,5 +1,6 @@ Version 2.02.81 - =================================== + Skip unnecessary lock_vol() call after volume deactivation. Extend exec_cmd params to specify, when device sync is needed. Replace fs_unlock by sync_local_dev_names to notify local clvmd. (2.02.80) Introduce sync_local_dev_names and CLVMD_CMD_SYNC_NAMES to issue fs_unlock. --- LVM2/lib/locking/locking.c 2011/01/12 20:42:50 1.88 +++ LVM2/lib/locking/locking.c 2011/01/13 14:56:17 1.89 @@ -406,6 +406,7 @@ { char resource[258] __attribute__((aligned(8))); lv_operation_t lv_op; + int lck_type = flags & LCK_TYPE_MASK; switch (flags & (LCK_SCOPE_MASK | LCK_TYPE_MASK)) { case LCK_LV_SUSPEND: @@ -432,15 +433,15 @@ if (is_orphan_vg(vol)) vol = VG_ORPHANS; /* VG locks alphabetical, ORPHAN lock last */ - if (((flags & LCK_TYPE_MASK) != LCK_UNLOCK) && - !(flags & LCK_CACHE) && - !lvmcache_verify_lock_order(vol)) - return 0; + if ((lck_type != LCK_UNLOCK) && + !(flags & LCK_CACHE) && + !lvmcache_verify_lock_order(vol)) + return_0; /* Lock VG to change on-disk metadata. */ /* If LVM1 driver knows about the VG, it can't be accessed. */ if (!check_lvm1_vg_inactive(cmd, vol)) - return 0; + return_0; break; case LCK_LV: /* All LV locks are non-blocking. */ @@ -455,18 +456,18 @@ strncpy(resource, vol, sizeof(resource)); if (!_lock_vol(cmd, resource, flags, lv_op)) - return 0; + return_0; /* * If a real lock was acquired (i.e. not LCK_CACHE), * perform an immediate unlock unless LCK_HOLD was requested. */ - if (!(flags & LCK_CACHE) && !(flags & LCK_HOLD) && - ((flags & LCK_TYPE_MASK) != LCK_UNLOCK)) { - if (!_lock_vol(cmd, resource, - (flags & ~LCK_TYPE_MASK) | LCK_UNLOCK, lv_op)) - return 0; - } + if ((lck_type == LCK_NULL) || (lck_type == LCK_UNLOCK) || + (flags & (LCK_CACHE | LCK_HOLD))) + return 1; + + if (!_lock_vol(cmd, resource, (flags & ~LCK_TYPE_MASK) | LCK_UNLOCK, lv_op)) + return_0; return 1; } From zkabelac@sourceware.org Thu Jan 13 14:57:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Thu, 13 Jan 2011 14:57:00 -0000 Subject: LVM2/test/lib aux.sh Message-ID: <20110113145718.12588.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-13 14:57:18 Modified files: test/lib : aux.sh Log message: Enable monitoring for cluster tests Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/lib/aux.sh.diff?cvsroot=lvm2&r1=1.6&r2=1.7 --- LVM2/test/lib/aux.sh 2011/01/12 16:07:55 1.6 +++ LVM2/test/lib/aux.sh 2011/01/13 14:57:18 1.7 @@ -26,6 +26,8 @@ # skip if we singlenode is not compiled in (clvmd --help 2>&1 | grep "Available cluster managers" | grep singlenode) || skip + lvmconf "activation/monitoring = 1" + clvmd -Isinglenode -d 1 & LOCAL_CLVMD="$!" From zkabelac@sourceware.org Thu Jan 13 14:59:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Thu, 13 Jan 2011 14:59:00 -0000 Subject: LVM2/test Makefile.in Message-ID: <20110113145900.14465.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-13 14:58:59 Modified files: test : Makefile.in Log message: Include default make.tmpl Use default clean targets for this Makefile Use also same build flags for compiling testing tools like harness. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/Makefile.in.diff?cvsroot=lvm2&r1=1.51&r2=1.52 --- LVM2/test/Makefile.in 2011/01/07 12:26:02 1.51 +++ LVM2/test/Makefile.in 2011/01/13 14:58:59 1.52 @@ -24,6 +24,7 @@ abs_builddir = @abs_builddir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +include $(top_builddir)/make.tmpl T ?= . S ?= @ # never match anything by default @@ -59,7 +60,7 @@ ln -sf not lib/should lib/%: $(srcdir)/lib/%.c .lib-dir-stamp - $(CC) -o $@ $< + $(CC) $(DEFS) $(CFLAGS) -o $@ $< lib/%: $(srcdir)/lib/%.sh .lib-dir-stamp cp $< $@ @@ -100,13 +101,9 @@ touch $@ clean: - rm -rf bin .lib-dir-stamp .test-stamp - rm -f $(LIB) - rm -f lib/dmsetup lib/clvmd lib/dmeventd for i in lvm $$(cat ../tools/.commands); do rm -f lib/$$i; done if test "$(srcdir)" != . ; then rm -f $(subst $(srcdir)/, ,$(RUN)) lvm2app.sh ; fi -distclean: clean - rm -f Makefile +CLEAN_TARGETS += .lib-dir-stamp .test-stamp -f $(LIB) lib/dmsetup lib/clvmd lib/dmeventd .NOTPARALLEL: From zkabelac@sourceware.org Thu Jan 13 15:00:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Thu, 13 Jan 2011 15:00:00 -0000 Subject: LVM2/tools lvmcmdline.c Message-ID: <20110113150030.15326.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-13 15:00:29 Modified files: tools : lvmcmdline.c Log message: Do not log backtrace for correctly processed command Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvmcmdline.c.diff?cvsroot=lvm2&r1=1.136&r2=1.137 --- LVM2/tools/lvmcmdline.c 2010/12/20 13:59:52 1.136 +++ LVM2/tools/lvmcmdline.c 2011/01/13 15:00:29 1.137 @@ -1095,8 +1095,11 @@ if (!_set_udev_checking(cmd)) goto_out; - if ((ret = _process_common_commands(cmd))) - goto_out; + if ((ret = _process_common_commands(cmd))) { + if (ret != ECMD_PROCESSED) + stack; + goto out; + } if (cmd->metadata_read_only && !(cmd->command->flags & PERMITTED_READ_ONLY)) { From zkabelac@sourceware.org Thu Jan 13 15:03:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Thu, 13 Jan 2011 15:03:00 -0000 Subject: LVM2/test/lib harness.c Message-ID: <20110113150328.18360.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-13 15:03:28 Modified files: test/lib : harness.c Log message: Set default value to counter_last Missed in previous commit and could be using some random stack value. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/lib/harness.c.diff?cvsroot=lvm2&r1=1.4&r2=1.5 --- LVM2/test/lib/harness.c 2011/01/13 11:02:55 1.4 +++ LVM2/test/lib/harness.c 2011/01/13 15:03:28 1.5 @@ -110,7 +110,7 @@ } static void dump(void) { - int counter_last, counter = 0; + int counter_last = -1, counter = 0; while ( counter < readbuf_used && counter != counter_last ) { counter_last = counter; From zkabelac@sourceware.org Mon Jan 17 15:16:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Mon, 17 Jan 2011 15:16:00 -0000 Subject: LVM2 ./WHATS_NEW lib/device/dev-cache.c Message-ID: <20110117151656.19868.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-17 15:16:56 Modified files: . : WHATS_NEW lib/device : dev-cache.c Log message: Do not scan devices unnecessarily for reseting error counter For reseting error counter use directly btree cached elements and do not create whole dev_iterator. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1880&r2=1.1881 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/device/dev-cache.c.diff?cvsroot=lvm2&r1=1.62&r2=1.63 --- LVM2/WHATS_NEW 2011/01/13 14:56:17 1.1880 +++ LVM2/WHATS_NEW 2011/01/17 15:16:55 1.1881 @@ -1,5 +1,6 @@ Version 2.02.81 - =================================== + Do not scan devices unnecessarily in dev_reset_error_count(). Skip unnecessary lock_vol() call after volume deactivation. Extend exec_cmd params to specify, when device sync is needed. Replace fs_unlock by sync_local_dev_names to notify local clvmd. (2.02.80) --- LVM2/lib/device/dev-cache.c 2010/12/20 13:23:11 1.62 +++ LVM2/lib/device/dev-cache.c 2011/01/17 15:16:55 1.63 @@ -850,18 +850,14 @@ void dev_reset_error_count(struct cmd_context *cmd) { - struct dev_iter *iter; - struct device *dev; + struct dev_iter iter; - if (!(iter = dev_iter_create(cmd->filter, 0))) { - log_error("Resetting device error count failed"); + if (!_cache.devices) return; - } - for (dev = dev_iter_get(iter); dev; dev = dev_iter_get(iter)) - dev->error_count = 0; - - dev_iter_destroy(iter); + iter.current = btree_first(_cache.devices); + while (iter.current) + _iter_next(&iter)->error_count = 0; } int dev_fd(struct device *dev) From zkabelac@sourceware.org Mon Jan 17 15:18:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Mon, 17 Jan 2011 15:18:00 -0000 Subject: LVM2/test Makefile.in Message-ID: <20110117151811.20511.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-17 15:18:10 Modified files: test : Makefile.in Log message: Remove -f from list of targets for cleanup rm -f is already in used for this cleanup. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/Makefile.in.diff?cvsroot=lvm2&r1=1.52&r2=1.53 --- LVM2/test/Makefile.in 2011/01/13 14:58:59 1.52 +++ LVM2/test/Makefile.in 2011/01/17 15:18:10 1.53 @@ -104,6 +104,6 @@ for i in lvm $$(cat ../tools/.commands); do rm -f lib/$$i; done if test "$(srcdir)" != . ; then rm -f $(subst $(srcdir)/, ,$(RUN)) lvm2app.sh ; fi -CLEAN_TARGETS += .lib-dir-stamp .test-stamp -f $(LIB) lib/dmsetup lib/clvmd lib/dmeventd +CLEAN_TARGETS += .lib-dir-stamp .test-stamp $(LIB) lib/dmsetup lib/clvmd lib/dmeventd .NOTPARALLEL: From agk@sourceware.org Mon Jan 17 16:46:00 2011 From: agk@sourceware.org (agk@sourceware.org) Date: Mon, 17 Jan 2011 16:46:00 -0000 Subject: LVM2 VERSION WHATS_NEW Message-ID: <20110117164650.13050.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: agk@sourceware.org 2011-01-17 16:46:50 Modified files: . : VERSION WHATS_NEW Log message: pre-release Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/VERSION.diff?cvsroot=lvm2&r1=1.268&r2=1.269 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1881&r2=1.1882 --- LVM2/VERSION 2011/01/10 14:51:33 1.268 +++ LVM2/VERSION 2011/01/17 16:46:50 1.269 @@ -1 +1 @@ -2.02.81(2)-cvs (2011-01-10) +2.02.81(2)-cvs (2011-01-17) --- LVM2/WHATS_NEW 2011/01/17 15:16:55 1.1881 +++ LVM2/WHATS_NEW 2011/01/17 16:46:50 1.1882 @@ -1,12 +1,13 @@ -Version 2.02.81 - +Version 2.02.81 - 17th January 2011 =================================== - Do not scan devices unnecessarily in dev_reset_error_count(). - Skip unnecessary lock_vol() call after volume deactivation. - Extend exec_cmd params to specify, when device sync is needed. + Do not scan devices in dev_reset_error_count(). + Skip unnecessary LOCK_NULL unlock call during volume deactivation. + Skip fs_unlock when calling exec_cmd within activation code (for modprobe). + Extend exec_cmd params to specify when device sync (fs_unlock) is needed. Replace fs_unlock by sync_local_dev_names to notify local clvmd. (2.02.80) Introduce sync_local_dev_names and CLVMD_CMD_SYNC_NAMES to issue fs_unlock. Accept fusion fio in device type filter. - Add disk to mirrored log type conversion. + Add disk to allowed mirrored log type conversions. Version 2.02.80 - 10th January 2011 =================================== From agk@sourceware.org Mon Jan 17 18:16:00 2011 From: agk@sourceware.org (agk@sourceware.org) Date: Mon, 17 Jan 2011 18:16:00 -0000 Subject: LVM2 VERSION VERSION_DM WHATS_NEW Message-ID: <20110117181618.11356.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: agk@sourceware.org 2011-01-17 18:16:18 Modified files: . : VERSION VERSION_DM WHATS_NEW Log message: post-release Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/VERSION.diff?cvsroot=lvm2&r1=1.269&r2=1.270 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/VERSION_DM.diff?cvsroot=lvm2&r1=1.77&r2=1.78 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1882&r2=1.1883 --- LVM2/VERSION 2011/01/17 16:46:50 1.269 +++ LVM2/VERSION 2011/01/17 18:16:18 1.270 @@ -1 +1 @@ -2.02.81(2)-cvs (2011-01-17) +2.02.82(2)-cvs (2011-01-17) --- LVM2/VERSION_DM 2011/01/10 14:51:33 1.77 +++ LVM2/VERSION_DM 2011/01/17 18:16:18 1.78 @@ -1 +1 @@ -1.02.62-cvs (2011-01-10) +1.02.62-cvs (2011-01-17) --- LVM2/WHATS_NEW 2011/01/17 16:46:50 1.1882 +++ LVM2/WHATS_NEW 2011/01/17 18:16:18 1.1883 @@ -1,3 +1,6 @@ +Version 2.02.82 - +=================================== + Version 2.02.81 - 17th January 2011 =================================== Do not scan devices in dev_reset_error_count(). From agk@sourceware.org Mon Jan 17 19:02:00 2011 From: agk@sourceware.org (agk@sourceware.org) Date: Mon, 17 Jan 2011 19:02:00 -0000 Subject: LVM2/daemons/dmeventd dmeventd.h Message-ID: <20110117190245.19132.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: agk@sourceware.org 2011-01-17 19:02:45 Modified files: daemons/dmeventd: dmeventd.h Log message: remove unused definitions Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/dmeventd/dmeventd.h.diff?cvsroot=lvm2&r1=1.7&r2=1.8 --- LVM2/daemons/dmeventd/dmeventd.h 2010/10/20 15:12:12 1.7 +++ LVM2/daemons/dmeventd/dmeventd.h 2011/01/17 19:02:44 1.8 @@ -17,11 +17,8 @@ /* FIXME This stuff must be configurable. */ -#define DM_EVENT_DAEMON "/sbin/dmeventd" -#define DM_EVENT_LOCKFILE "/var/lock/dmeventd" #define DM_EVENT_FIFO_CLIENT "/var/run/dmeventd-client" #define DM_EVENT_FIFO_SERVER "/var/run/dmeventd-server" -#define DM_EVENT_PIDFILE "/var/run/dmeventd.pid" #define DM_EVENT_DEFAULT_TIMEOUT 10 From mbroz@sourceware.org Mon Jan 17 23:13:00 2011 From: mbroz@sourceware.org (mbroz@sourceware.org) Date: Mon, 17 Jan 2011 23:13:00 -0000 Subject: LVM2 ./WHATS_NEW daemons/clvmd/clvmd-command.c ... Message-ID: <20110117231315.21661.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: mbroz@sourceware.org 2011-01-17 23:13:14 Modified files: . : WHATS_NEW daemons/clvmd : clvmd-command.c clvmd.c clvmd.h man : clvmd.8.in Log message: Add -f (don't fork) option to clvmd and fix clvmd -d description. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1883&r2=1.1884 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/clvmd-command.c.diff?cvsroot=lvm2&r1=1.47&r2=1.48 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/clvmd.c.diff?cvsroot=lvm2&r1=1.92&r2=1.93 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/clvmd.h.diff?cvsroot=lvm2&r1=1.12&r2=1.13 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/man/clvmd.8.in.diff?cvsroot=lvm2&r1=1.4&r2=1.5 --- LVM2/WHATS_NEW 2011/01/17 18:16:18 1.1883 +++ LVM2/WHATS_NEW 2011/01/17 23:13:14 1.1884 @@ -1,5 +1,6 @@ Version 2.02.82 - =================================== + Add -f (don't fork) option to clvmd and fix clvmd -d description. Version 2.02.81 - 17th January 2011 =================================== --- LVM2/daemons/clvmd/clvmd-command.c 2011/01/12 20:42:50 1.47 +++ LVM2/daemons/clvmd/clvmd-command.c 2011/01/17 23:13:14 1.48 @@ -63,7 +63,6 @@ #include -extern debug_t debug; extern struct cluster_ops *clops; static int restart_clvmd(void); @@ -144,7 +143,7 @@ break; case CLVMD_CMD_SET_DEBUG: - debug = args[0]; + clvmd_set_debug(args[0]); break; case CLVMD_CMD_RESTART: @@ -310,19 +309,16 @@ client->bits.localsock.private = 0; break; - case CLVMD_CMD_LOCK_VG: - case CLVMD_CMD_VG_BACKUP: - case CLVMD_CMD_SYNC_NAMES: - case CLVMD_CMD_LOCK_QUERY: - /* Nothing to do here */ - break; - case CLVMD_CMD_LOCK_LV: lock_cmd = args[0]; lock_flags = args[1]; lockname = &args[2]; status = post_lock_lv(lock_cmd, lock_flags, lockname); break; + + default: + /* Nothing to do here */ + break; } return status; } @@ -381,9 +377,9 @@ goto_out; /* Propogate debug options */ - if (debug) { + if (clvmd_get_debug()) { if (!(debug_arg = malloc(16)) || - dm_snprintf(debug_arg, 16, "-d%d", (int)debug) < 0) + dm_snprintf(debug_arg, 16, "-d%d", (int)clvmd_get_debug()) < 0) goto_out; argv[argc++] = debug_arg; } --- LVM2/daemons/clvmd/clvmd.c 2011/01/05 12:17:19 1.92 +++ LVM2/daemons/clvmd/clvmd.c 2011/01/17 23:13:14 1.93 @@ -81,7 +81,8 @@ char **argv; }; -debug_t debug; +static debug_t debug = DEBUG_OFF; +static int foreground_mode = 0; static pthread_t lvm_thread; static pthread_mutex_t lvm_thread_mutex; static pthread_cond_t lvm_thread_cond; @@ -145,12 +146,11 @@ static void usage(const char *prog, FILE *file) { - fprintf(file, "Usage:\n" - "%s [Vhd]\n\n" + fprintf(file, "Usage: %s [options]\n" " -V Show version of clvmd\n" " -h Show this help information\n" - " -d Set debug level\n" - " If starting clvmd then don't fork, run in the foreground\n" + " -d[n] Set debug logging (0:none, 1:stderr (implies -f option), 2:syslog)\n" + " -f Don't fork, run in the foreground\n" " -R Tell all running clvmds in the cluster to reload their device cache\n" " -S Restart clvmd, preserving exclusive locks\n" " -C Sets debug level (from -d) on all clvmd instances clusterwide\n" @@ -209,14 +209,15 @@ va_list ap; static int syslog_init = 0; - if (debug == DEBUG_STDERR) { + switch (clvmd_get_debug()) { + case DEBUG_STDERR: va_start(ap,fmt); time(&P); fprintf(stderr, "CLVMD[%x]: %.15s ", (int)pthread_self(), ctime(&P)+4 ); vfprintf(stderr, fmt, ap); va_end(ap); - } - if (debug == DEBUG_SYSLOG) { + break; + case DEBUG_SYSLOG: if (!syslog_init) { openlog("clvmd", LOG_PID, LOG_DAEMON); syslog_init = 1; @@ -225,9 +226,28 @@ va_start(ap,fmt); vsyslog(LOG_DEBUG, fmt, ap); va_end(ap); + break; + case DEBUG_OFF: + break; } } +void clvmd_set_debug(debug_t new_debug) +{ + if (!foreground_mode && new_debug == DEBUG_STDERR) + new_debug = DEBUG_SYSLOG; + + if (new_debug > DEBUG_SYSLOG) + new_debug = DEBUG_SYSLOG; + + debug = new_debug; +} + +debug_t clvmd_get_debug(void) +{ + return debug; +} + static const char *decode_cmd(unsigned char cmdl) { static char buf[128]; @@ -322,13 +342,14 @@ sigset_t ss; int using_gulm = 0; int debug_opt = 0; + debug_t debug_arg = DEBUG_OFF; int clusterwide_opt = 0; mode_t old_mask; /* Deal with command-line arguments */ opterr = 0; optind = 0; - while ((opt = getopt(argc, argv, "?vVhd::t:RST:CI:E:")) != EOF) { + while ((opt = getopt(argc, argv, "?vVhfd::t:RST:CI:E:")) != EOF) { switch (opt) { case 'h': usage(argv[0], stdout); @@ -352,12 +373,14 @@ case 'd': debug_opt = 1; - if (optarg) - debug = atoi(optarg); - else - debug = DEBUG_STDERR; + debug_arg = optarg ? atoi(optarg) : DEBUG_STDERR; + if (debug_arg == DEBUG_STDERR) + foreground_mode = 1; break; + case 'f': + foreground_mode = 1; + break; case 't': cmd_timeout = atoi(optarg); if (!cmd_timeout) { @@ -391,15 +414,6 @@ check_permissions(); - /* Setting debug options on an existing clvmd */ - if (debug_opt && !check_local_clvmd()) { - - /* Sending to stderr makes no sense for a detached daemon */ - if (debug == DEBUG_STDERR) - debug = DEBUG_SYSLOG; - return debug_clvmd(debug, clusterwide_opt)==1?0:1; - } - /* * Switch to C locale to avoid reading large locale-archive file * used by some glibc (on some distributions it takes over 100MB). @@ -408,10 +422,15 @@ if (setenv("LANG", "C", 1)) perror("Cannot set LANG to C"); + /* Setting debug options on an existing clvmd */ + if (debug_opt && !check_local_clvmd()) + return debug_clvmd(debug_arg, clusterwide_opt)==1?0:1; + + clvmd_set_debug(debug_opt); + /* Fork into the background (unless requested not to) */ - if (debug != DEBUG_STDERR) { + if (!foreground_mode) be_daemon(start_timeout); - } dm_prepare_selinux_context(DEFAULT_RUN_DIR, S_IFDIR); old_mask = umask(0077); --- LVM2/daemons/clvmd/clvmd.h 2010/07/28 13:55:43 1.12 +++ LVM2/daemons/clvmd/clvmd.h 2011/01/17 23:13:14 1.13 @@ -117,6 +117,9 @@ extern void debuglog(const char *fmt, ... ) __attribute__ ((format(printf, 1, 2))); +void clvmd_set_debug(debug_t new_de); +debug_t clvmd_get_debug(void); + int sync_lock(const char *resource, int mode, int flags, int *lockid); int sync_unlock(const char *resource, int lockid); --- LVM2/man/clvmd.8.in 2010/04/30 14:49:44 1.4 +++ LVM2/man/clvmd.8.in 2011/01/17 23:13:14 1.5 @@ -3,7 +3,7 @@ clvmd \- cluster LVM daemon .SH SYNOPSIS .B clvmd -[\-d []] [\-C] [\-h] +[\-d[]] [\-C] [\-h] [\-R] [\-S] [\-t ] @@ -15,19 +15,18 @@ if a node in the cluster does not have this daemon running. .SH OPTIONS .TP -.I \-d [] +.I \-d[] Enable debug logging. Value can be 0, 1 or 2. .br -0 disables debug logging in a running clvmd +0 disables debug logging .br -1 sends debug logs to stderr (clvmd will not fork in this case) +1 sends debug logs to stderr (implies -f option) .br 2 sends debug logs to syslog .br If .B -d -is specified without a value then 1 is assumed if you are starting a -new clvmd, 2 if you are enabling debug in a running clvmd. +is specified without a value then 1 is assumed. .TP .I \-C Only valid if From mbroz@sourceware.org Mon Jan 17 23:14:00 2011 From: mbroz@sourceware.org (mbroz@sourceware.org) Date: Mon, 17 Jan 2011 23:14:00 -0000 Subject: LVM2/daemons/dmeventd dmeventd.c Message-ID: <20110117231405.22082.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: mbroz@sourceware.org 2011-01-17 23:14:05 Modified files: daemons/dmeventd: dmeventd.c Log message: Remove DEBUGLOG from dmeventd. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/dmeventd/dmeventd.c.diff?cvsroot=lvm2&r1=1.73&r2=1.74 --- LVM2/daemons/dmeventd/dmeventd.c 2010/12/20 14:08:46 1.73 +++ LVM2/daemons/dmeventd/dmeventd.c 2011/01/17 23:14:05 1.74 @@ -95,8 +95,6 @@ #define THREAD_STACK_SIZE (300*1024) -#define DEBUGLOG(fmt, args...) _debuglog(fmt, ## args) - int dmeventd_debug = 0; static int _foreground = 0; static int _restart = 0; @@ -203,24 +201,6 @@ static pthread_mutex_t _timeout_mutex = PTHREAD_MUTEX_INITIALIZER; static pthread_cond_t _timeout_cond = PTHREAD_COND_INITIALIZER; -static void _debuglog(const char *fmt, ...) -{ - time_t P; - va_list ap; - - if (!_foreground) - return; - - va_start(ap,fmt); - - time(&P); - fprintf(stderr, "dmeventd[%p]: %.15s ", (void *) pthread_self(), ctime(&P)+4 ); - vfprintf(stderr, fmt, ap); - fprintf(stderr, "\n"); - - va_end(ap); -} - /* Allocate/free the status structure for a monitoring thread. */ static struct thread_status *_alloc_thread_status(struct message_data *data, struct dso_data *dso_data) @@ -1621,7 +1601,7 @@ if (stat(OOM_ADJ_FILE, &st) == -1) { if (errno == ENOENT) - DEBUGLOG(OOM_ADJ_FILE " not found"); + perror(OOM_ADJ_FILE " not found"); else perror(OOM_ADJ_FILE ": stat failed"); return 1; From jbrassow@sourceware.org Wed Jan 19 19:22:00 2011 From: jbrassow@sourceware.org (jbrassow@sourceware.org) Date: Wed, 19 Jan 2011 19:22:00 -0000 Subject: LVM2/test t-lvconvert-repair-policy.sh Message-ID: <20110119192207.5486.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: jbrassow@sourceware.org 2011-01-19 19:22:07 Modified files: test : t-lvconvert-repair-policy.sh Log message: Add test to make sure that a log device is retained when a mirror image fails and the policies are set to: mirror_image_fault_policy = "replace" mirror_log_fault_policy = "remove" Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-lvconvert-repair-policy.sh.diff?cvsroot=lvm2&r1=1.7&r2=1.8 --- LVM2/test/t-lvconvert-repair-policy.sh 2011/01/11 17:05:09 1.7 +++ LVM2/test/t-lvconvert-repair-policy.sh 2011/01/19 19:22:07 1.8 @@ -39,6 +39,14 @@ cleanup $dev1 # Fail a leg of a mirror. +# Expected result: Mirror (leg replaced, should retain log) +aux disable_dev $dev1 +repair 'activation { mirror_image_fault_policy = "replace" mirror_log_fault_policy = "remove" }' +check mirror $vg mirror +lvs | grep mirror_mlog +cleanup $dev1 + +# Fail a leg of a mirror. # Expected result: Mirror (leg replaced) aux disable_dev $dev1 repair 'activation { mirror_image_fault_policy = "replace" }' @@ -49,7 +57,7 @@ # Fail a leg of a mirror (use old name for policy specification) # Expected result: Mirror (leg replaced) aux disable_dev $dev1 -repair 'activation { mirror_device_fault_policy = "replace" }' +repair 'activation { mirror_image_fault_policy = "replace" }' check mirror $vg mirror lvs | grep mirror_mlog cleanup $dev1 From jbrassow@sourceware.org Wed Jan 19 19:24:00 2011 From: jbrassow@sourceware.org (jbrassow@sourceware.org) Date: Wed, 19 Jan 2011 19:24:00 -0000 Subject: LVM2/tools lvconvert.c Message-ID: <20110119192407.7010.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: jbrassow@sourceware.org 2011-01-19 19:24:07 Modified files: tools : lvconvert.c Log message: Remove duplicate statement (pasted twice by patch at some point?) Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvconvert.c.diff?cvsroot=lvm2&r1=1.155&r2=1.156 --- LVM2/tools/lvconvert.c 2011/01/11 17:05:10 1.155 +++ LVM2/tools/lvconvert.c 2011/01/19 19:24:07 1.156 @@ -1081,16 +1081,6 @@ } /* - * Is there already a convert in progress? We do not - * currently allow more than one. - */ - if (find_temporary_mirror(lv) || (lv->status & CONVERTING)) { - log_error("%s is already being converted. Unable to start another conversion.", - lv->name); - return 0; - } - - /* * Log addition/removal should be done before the layer * insertion to make the end result consistent with * linear-to-mirror conversion. From mbroz@sourceware.org Wed Jan 19 23:09:00 2011 From: mbroz@sourceware.org (mbroz@sourceware.org) Date: Wed, 19 Jan 2011 23:09:00 -0000 Subject: LVM2 ./WHATS_NEW daemons/clvmd/clvmd-cman.c da ... Message-ID: <20110119230932.22038.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: mbroz@sourceware.org 2011-01-19 23:09:31 Modified files: . : WHATS_NEW daemons/clvmd : clvmd-cman.c clvmd-command.c clvmd-corosync.c Log message: In some versions (RHEL6) dlm_create_lockspace() always return lockspace reference (even if lockspace already exists) and thus increases DLM lockspace count. It means that after clvmd restart the lockspace is still in use. (The only way to clean environment to enable clean cluster shutdown is call "dlm_tool leave clvmd" several times.) Because only one clvmd can run in time, we can use simpler logic, try to open lockspace with dlm_open_lockspace() and only if it fails try to create new one. This way the lockspace reference doesn not increase. Very easily reproducible with "clvmd -S" command. Patch also fixes return code when clvmd_restart fails and fixes double free if debug option was specified during restart. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=612862 Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1884&r2=1.1885 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/clvmd-cman.c.diff?cvsroot=lvm2&r1=1.28&r2=1.29 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/clvmd-command.c.diff?cvsroot=lvm2&r1=1.48&r2=1.49 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/clvmd-corosync.c.diff?cvsroot=lvm2&r1=1.14&r2=1.15 --- LVM2/WHATS_NEW 2011/01/17 23:13:14 1.1884 +++ LVM2/WHATS_NEW 2011/01/19 23:09:31 1.1885 @@ -1,6 +1,7 @@ Version 2.02.82 - =================================== Add -f (don't fork) option to clvmd and fix clvmd -d description. + Fix possible clvmd DLM lockspace increasing reference count. Version 2.02.81 - 17th January 2011 =================================== --- LVM2/daemons/clvmd/clvmd-cman.c 2010/06/21 15:56:58 1.28 +++ LVM2/daemons/clvmd/clvmd-cman.c 2011/01/19 23:09:31 1.29 @@ -89,16 +89,17 @@ DEBUGLOG("CMAN initialisation complete\n"); /* Create a lockspace for LV & VG locks to live in */ - lockspace = dlm_create_lockspace(LOCKSPACE_NAME, 0600); + lockspace = dlm_open_lockspace(LOCKSPACE_NAME); if (!lockspace) { - if (errno == EEXIST) { - lockspace = dlm_open_lockspace(LOCKSPACE_NAME); - } + lockspace = dlm_create_lockspace(LOCKSPACE_NAME, 0600); if (!lockspace) { - syslog(LOG_ERR, "Unable to create lockspace for CLVM: %m"); + syslog(LOG_ERR, "Unable to create DLM lockspace for CLVM: %m"); return -1; } - } + DEBUGLOG("Created DLM lockspace for CLVMD.\n"); + } else + DEBUGLOG("Opened existing DLM lockspace for CLVMD.\n"); + dlm_ls_pthread_init(lockspace); DEBUGLOG("DLM initialisation complete\n"); return 0; --- LVM2/daemons/clvmd/clvmd-command.c 2011/01/17 23:13:14 1.48 +++ LVM2/daemons/clvmd/clvmd-command.c 2011/01/19 23:09:31 1.49 @@ -147,7 +147,7 @@ break; case CLVMD_CMD_RESTART: - restart_clvmd(); + status = restart_clvmd(); break; case CLVMD_CMD_GET_CLUSTERNAME: @@ -382,8 +382,14 @@ dm_snprintf(debug_arg, 16, "-d%d", (int)clvmd_get_debug()) < 0) goto_out; argv[argc++] = debug_arg; + debug_arg = NULL; } + /* + * FIXME: specify used cluster backend + * argv[argc++] = strdup("-Isinglenode"); + */ + /* Now add the exclusively-open LVs */ do { hn = get_next_excl_lock(hn, &lv_name); @@ -402,6 +408,7 @@ argv[argc++] = NULL; /* Exec new clvmd */ + DEBUGLOG("--- Restarting %s ---\n", CLVMD_PATH); /* NOTE: This will fail when downgrading! */ execve(CLVMD_PATH, argv, NULL); out: @@ -413,5 +420,5 @@ free(argv); free(debug_arg); - return 0; + return EIO; } --- LVM2/daemons/clvmd/clvmd-corosync.c 2010/06/21 15:56:58 1.14 +++ LVM2/daemons/clvmd/clvmd-corosync.c 2011/01/19 23:09:31 1.15 @@ -294,19 +294,18 @@ return cs_to_errno(err); } - /* Create a lockspace for LV & VG locks to live in */ - lockspace = dlm_create_lockspace(LOCKSPACE_NAME, 0600); + lockspace = dlm_open_lockspace(LOCKSPACE_NAME); if (!lockspace) { - if (errno == EEXIST) { - lockspace = dlm_open_lockspace(LOCKSPACE_NAME); - } + lockspace = dlm_create_lockspace(LOCKSPACE_NAME, 0600); if (!lockspace) { - syslog(LOG_ERR, "Unable to create lockspace for CLVM: %m"); - quorum_finalize(quorum_handle); + syslog(LOG_ERR, "Unable to create DLM lockspace for CLVM: %m"); return -1; } - } + DEBUGLOG("Created DLM lockspace for CLVMD.\n"); + } else + DEBUGLOG("Opened existing DLM lockspace for CLVMD.\n"); + dlm_ls_pthread_init(lockspace); DEBUGLOG("DLM initialisation complete\n"); From mbroz@sourceware.org Wed Jan 19 23:11:00 2011 From: mbroz@sourceware.org (mbroz@sourceware.org) Date: Wed, 19 Jan 2011 23:11:00 -0000 Subject: LVM2 ./WHATS_NEW tools/polldaemon.c Message-ID: <20110119231141.22779.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: mbroz@sourceware.org 2011-01-19 23:11:40 Modified files: . : WHATS_NEW tools : polldaemon.c Log message: If other process finishes (or aborts) pvmove operation and polling function cannot find any lv with PVMOVE flag, return success and do not print "aborting" message. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=602389 Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1885&r2=1.1886 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/polldaemon.c.diff?cvsroot=lvm2&r1=1.42&r2=1.43 --- LVM2/WHATS_NEW 2011/01/19 23:09:31 1.1885 +++ LVM2/WHATS_NEW 2011/01/19 23:11:39 1.1886 @@ -2,6 +2,7 @@ =================================== Add -f (don't fork) option to clvmd and fix clvmd -d description. Fix possible clvmd DLM lockspace increasing reference count. + Do not fail polling if pvmove finished in another process. Version 2.02.81 - 17th January 2011 =================================== --- LVM2/tools/polldaemon.c 2011/01/12 20:42:51 1.42 +++ LVM2/tools/polldaemon.c 2011/01/19 23:11:39 1.43 @@ -193,8 +193,16 @@ return 0; } - if (!(lv = parms->poll_fns->get_copy_lv(cmd, vg, name, uuid, - parms->lv_type))) { + lv = parms->poll_fns->get_copy_lv(cmd, vg, name, uuid, parms->lv_type); + + if (!lv && parms->lv_type == PVMOVE) { + log_print("%s: no pvmove in progress - already finished or aborted.", + name); + unlock_and_free_vg(cmd, vg, vg->name); + return 1; + } + + if (!lv) { log_error("ABORTING: Can't find LV in %s for %s", vg->name, name); unlock_and_free_vg(cmd, vg, vg->name); From agk@sourceware.org Mon Jan 24 13:38:00 2011 From: agk@sourceware.org (agk@sourceware.org) Date: Mon, 24 Jan 2011 13:38:00 -0000 Subject: LVM2 ./WHATS_NEW tools/lvchange.c tools/pvchan ... Message-ID: <20110124133836.4980.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: agk@sourceware.org 2011-01-24 13:38:33 Modified files: . : WHATS_NEW tools : lvchange.c pvchange.c toollib.c toollib.h vgchange.c Log message: Add change_tag to toollib. Allow multiple pvchange command line options to be specified together. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1886&r2=1.1887 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvchange.c.diff?cvsroot=lvm2&r1=1.127&r2=1.128 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/pvchange.c.diff?cvsroot=lvm2&r1=1.87&r2=1.88 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/toollib.c.diff?cvsroot=lvm2&r1=1.218&r2=1.219 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/toollib.h.diff?cvsroot=lvm2&r1=1.75&r2=1.76 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/vgchange.c.diff?cvsroot=lvm2&r1=1.117&r2=1.118 --- LVM2/WHATS_NEW 2011/01/19 23:11:39 1.1886 +++ LVM2/WHATS_NEW 2011/01/24 13:38:31 1.1887 @@ -1,5 +1,7 @@ Version 2.02.82 - =================================== + Add change_tag to toollib. + Allow multiple pvchange command line options to be specified together. Add -f (don't fork) option to clvmd and fix clvmd -d description. Fix possible clvmd DLM lockspace increasing reference count. Do not fail polling if pvmove finished in another process. --- LVM2/tools/lvchange.c 2010/11/11 17:29:06 1.127 +++ LVM2/tools/lvchange.c 2011/01/24 13:38:32 1.128 @@ -491,24 +491,10 @@ return 1; } -static int lvchange_tag(struct cmd_context *cmd, struct logical_volume *lv, - int arg) +static int lvchange_tag(struct cmd_context *cmd, struct logical_volume *lv, int arg) { - const char *tag; - struct arg_value_group_list *current_group; - - dm_list_iterate_items(current_group, &cmd->arg_value_groups) { - if (!grouped_arg_is_set(current_group->arg_values, arg)) - continue; - - if (!(tag = grouped_arg_str_value(current_group->arg_values, arg, NULL))) { - log_error("Failed to get tag"); - return 0; - } - - if (!lv_change_tag(lv, tag, arg == addtag_ARG)) - return_0; - } + if (!change_tag(cmd, NULL, lv, NULL, arg)) + return_0; log_very_verbose("Updating logical volume \"%s\" on disk(s)", lv->name); --- LVM2/tools/pvchange.c 2010/12/23 14:23:30 1.87 +++ LVM2/tools/pvchange.c 2011/01/24 13:38:32 1.88 @@ -15,8 +15,6 @@ #include "tools.h" -/* FIXME Locking. PVs in VG. */ - static int _pvchange_single(struct cmd_context *cmd, struct volume_group *vg, struct physical_volume *pv, void *handle __attribute__((unused))) @@ -27,21 +25,14 @@ uint64_t orig_pe_start; const char *pv_name = pv_dev_name(pv); - const char *tag = NULL; const char *orig_vg_name; char uuid[64] __attribute__((aligned(8))); int allocatable = 0; - int tagarg = 0; - int r = 0; + int tagargs = 0; int mda_ignore = 0; - struct arg_value_group_list *current_group; - - if (arg_count(cmd, addtag_ARG)) - tagarg = addtag_ARG; - else if (arg_count(cmd, deltag_ARG)) - tagarg = deltag_ARG; + tagargs = arg_count(cmd, addtag_ARG) + arg_count(cmd, deltag_ARG); if (arg_count(cmd, allocatable_ARG)) allocatable = !strcmp(arg_str_value(cmd, allocatable_ARG, "n"), @@ -52,20 +43,20 @@ /* If in a VG, must change using volume group. */ if (!is_orphan(pv)) { - if (tagarg && !(vg->fid->fmt->features & FMT_TAGS)) { + if (tagargs && !(vg->fid->fmt->features & FMT_TAGS)) { log_error("Volume group containing %s does not " "support tags", pv_name); - goto out; + return 0; } if (arg_count(cmd, uuid_ARG) && lvs_in_vg_activated(vg)) { log_error("Volume group containing %s has active " "logical volumes", pv_name); - goto out; + return 0; } if (!archive(vg)) - goto out; + return 0; } else { - if (tagarg) { + if (tagargs) { log_error("Can't change tag on Physical Volume %s not " "in volume group", pv_name); return 0; @@ -77,22 +68,20 @@ !(pv->fmt->features & FMT_ORPHAN_ALLOCATABLE)) { log_error("Allocatability not supported by orphan " "%s format PV %s", pv->fmt->name, pv_name); - goto out; + return 0; } /* change allocatability for a PV */ if (allocatable && (pv_status(pv) & ALLOCATABLE_PV)) { log_error("Physical volume \"%s\" is already " "allocatable", pv_name); - r = 1; - goto out; + return 1; } if (!allocatable && !(pv_status(pv) & ALLOCATABLE_PV)) { log_error("Physical volume \"%s\" is already " "unallocatable", pv_name); - r = 1; - goto out; + return 1; } if (allocatable) { @@ -104,50 +93,40 @@ "allocatable", pv_name); pv->status &= ~ALLOCATABLE_PV; } - } else if (tagarg) { - /* tag or deltag */ + } - dm_list_iterate_items(current_group, &cmd->arg_value_groups) { - if (!grouped_arg_is_set(current_group->arg_values, tagarg)) - continue; + if (tagargs) { + /* tag or deltag */ + if (arg_count(cmd, addtag_ARG) && !change_tag(cmd, NULL, NULL, pv, addtag_ARG)) + return_0; - if (!(tag = grouped_arg_str_value(current_group->arg_values, tagarg, NULL))) { - log_error("Failed to get tag"); - goto out; - } + if (arg_count(cmd, deltag_ARG) && !change_tag(cmd, NULL, NULL, pv, deltag_ARG)) + return_0; + + } - if ((tagarg == addtag_ARG)) { - if (!str_list_add(cmd->mem, &pv->tags, tag)) { - log_error("Failed to add tag %s to physical " - "volume %s", tag, pv_name); - goto out; - } - } else if (!str_list_del(&pv->tags, tag)) { - log_error("Failed to remove tag %s from " - "physical volume" "%s", tag, pv_name); - goto out; - } - } - } else if (arg_count(cmd, metadataignore_ARG)) { + if (arg_count(cmd, metadataignore_ARG)) { if ((vg_mda_copies(vg) != VGMETADATACOPIES_UNMANAGED) && (arg_count(cmd, force_ARG) == PROMPT) && yes_no_prompt("Override preferred number of copies " "of VG %s metadata? [y/n]: ", pv_vg_name(pv)) == 'n') { log_error("Physical volume %s not changed", pv_name); - goto out; + return 0; } if (!pv_change_metadataignore(pv, mda_ignore)) - goto out; - } else { + return_0; + } + + if (arg_count(cmd, uuid_ARG)) { /* --uuid: Change PV ID randomly */ if (!id_create(&pv->id)) { log_error("Failed to generate new random UUID for %s.", pv_name); - goto out; + return 0; } if (!id_write_format(&pv->id, uuid, sizeof(uuid))) - goto_out; + return 0; log_verbose("Changing uuid of %s to %s.", pv_name, uuid); if (!is_orphan(pv)) { orig_vg_name = pv_vg_name(pv); @@ -163,7 +142,7 @@ if (!(pv_write(cmd, pv, NULL, INT64_C(-1)))) { log_error("pv_write with new uuid failed " "for %s.", pv_name); - goto out; + return 0; } pv->vg_name = orig_vg_name; pv->pe_alloc_count = orig_pe_alloc_count; @@ -179,20 +158,18 @@ if (!vg_write(vg) || !vg_commit(vg)) { log_error("Failed to store physical volume \"%s\" in " "volume group \"%s\"", pv_name, vg->name); - goto out; + return 0; } backup(vg); } else if (!(pv_write(cmd, pv, NULL, INT64_C(-1)))) { log_error("Failed to store physical volume \"%s\"", pv_name); - goto out; + return 0; } log_print("Physical volume \"%s\" changed", pv_name); - r = 1; -out: - return r; + return 1; } int pvchange(struct cmd_context *cmd, int argc, char **argv) @@ -209,11 +186,11 @@ struct dm_list *vgnames; struct str_list *sll; - if (arg_count(cmd, allocatable_ARG) + arg_is_set(cmd, addtag_ARG) + + if (!(arg_count(cmd, allocatable_ARG) + arg_is_set(cmd, addtag_ARG) + arg_is_set(cmd, deltag_ARG) + arg_count(cmd, uuid_ARG) + - arg_count(cmd, metadataignore_ARG) != 1) { - log_error("Please give exactly one option of -x, -uuid, " - "--addtag or --deltag"); + arg_count(cmd, metadataignore_ARG))) { + log_error("Please give one or more of -x, -uuid, " + "--addtag, --deltag or --metadataignore"); return EINVALID_CMD_LINE; } --- LVM2/tools/toollib.c 2010/12/20 14:05:31 1.218 +++ LVM2/tools/toollib.c 2011/01/24 13:38:32 1.219 @@ -472,7 +472,7 @@ for (;;) { /* FIXME: consistent handling of command break */ if (sigint_caught()) { - ret = ECMD_FAILED; + ret = ECMD_FAILED; break; } if (!cmd_vg_read(cmd, &cmd_vgs)) @@ -1525,7 +1525,7 @@ int get_stripe_params(struct cmd_context *cmd, uint32_t *stripes, uint32_t *stripe_size) { /* stripes_long_ARG takes precedence (for lvconvert) */ - *stripes = arg_uint_value(cmd, arg_count(cmd, stripes_long_ARG) ? stripes_long_ARG : stripes_ARG, 1); + *stripes = arg_uint_value(cmd, arg_count(cmd, stripes_long_ARG) ? stripes_long_ARG : stripes_ARG, 1); *stripe_size = arg_uint_value(cmd, stripesize_ARG, 0); if (*stripe_size) { @@ -1544,3 +1544,47 @@ return _validate_stripe_params(cmd, stripes, stripe_size); } +/* FIXME move to lib */ +static int _pv_change_tag(struct physical_volume *pv, const char *tag, int addtag) +{ + if (addtag) { + if (!str_list_add(pv->fmt->cmd->mem, &pv->tags, tag)) { + log_error("Failed to add tag %s to physical volume %s", + tag, pv_dev_name(pv)); + return 0; + } + } else if (!str_list_del(&pv->tags, tag)) { + log_error("Failed to remove tag %s from physical volume" "%s", + tag, pv_dev_name(pv)); + return 0; + } + + return 1; +} + +/* Set exactly one of VG, LV or PV */ +int change_tag(struct cmd_context *cmd, struct volume_group *vg, + struct logical_volume *lv, struct physical_volume *pv, int arg) +{ + const char *tag; + struct arg_value_group_list *current_group; + + dm_list_iterate_items(current_group, &cmd->arg_value_groups) { + if (!grouped_arg_is_set(current_group->arg_values, arg)) + continue; + + if (!(tag = grouped_arg_str_value(current_group->arg_values, arg, NULL))) { + log_error("Failed to get tag"); + return 0; + } + + if (vg && !vg_change_tag(vg, tag, arg == addtag_ARG)) + return_0; + else if (lv && !lv_change_tag(lv, tag, arg == addtag_ARG)) + return_0; + else if (pv && !_pv_change_tag(pv, tag, arg == addtag_ARG)) + return_0; + } + + return 1; +} --- LVM2/tools/toollib.h 2010/07/09 15:21:10 1.75 +++ LVM2/tools/toollib.h 2011/01/24 13:38:32 1.76 @@ -115,4 +115,7 @@ int get_stripe_params(struct cmd_context *cmd, uint32_t *stripes, uint32_t *stripe_size); +int change_tag(struct cmd_context *cmd, struct volume_group *vg, + struct logical_volume *lv, struct physical_volume *pv, int arg); + #endif --- LVM2/tools/vgchange.c 2010/11/11 17:29:06 1.117 +++ LVM2/tools/vgchange.c 2011/01/24 13:38:32 1.118 @@ -360,37 +360,14 @@ return 1; } -static int _vgchange_tag(struct cmd_context *cmd, struct volume_group *vg, - int arg) -{ - const char *tag; - struct arg_value_group_list *current_group; - - dm_list_iterate_items(current_group, &cmd->arg_value_groups) { - if (!grouped_arg_is_set(current_group->arg_values, arg)) - continue; - - if (!(tag = grouped_arg_str_value(current_group->arg_values, arg, NULL))) { - log_error("Failed to get tag"); - return 0; - } - - if (!vg_change_tag(vg, tag, arg == addtag_ARG)) - return_0; - - } - - return 1; -} - static int _vgchange_addtag(struct cmd_context *cmd, struct volume_group *vg) { - return _vgchange_tag(cmd, vg, addtag_ARG); + return change_tag(cmd, vg, NULL, NULL, addtag_ARG); } static int _vgchange_deltag(struct cmd_context *cmd, struct volume_group *vg) { - return _vgchange_tag(cmd, vg, deltag_ARG); + return change_tag(cmd, vg, NULL, NULL, deltag_ARG); } static int _vgchange_uuid(struct cmd_context *cmd __attribute__((unused)), From agk@sourceware.org Mon Jan 24 14:19:00 2011 From: agk@sourceware.org (agk@sourceware.org) Date: Mon, 24 Jan 2011 14:19:00 -0000 Subject: LVM2 ./WHATS_NEW lib/metadata/lv_manip.c lib/m ... Message-ID: <20110124141906.6197.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: agk@sourceware.org 2011-01-24 14:19:05 Modified files: . : WHATS_NEW lib/metadata : lv_manip.c mirror.c lib/misc : lvm-globals.c Log message: Fix lvchange --test to exit cleanly. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1887&r2=1.1888 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/lv_manip.c.diff?cvsroot=lvm2&r1=1.244&r2=1.245 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/mirror.c.diff?cvsroot=lvm2&r1=1.140&r2=1.141 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/misc/lvm-globals.c.diff?cvsroot=lvm2&r1=1.7&r2=1.8 --- LVM2/WHATS_NEW 2011/01/24 13:38:31 1.1887 +++ LVM2/WHATS_NEW 2011/01/24 14:19:05 1.1888 @@ -1,5 +1,6 @@ Version 2.02.82 - =================================== + Fix lvchange --test to exit cleanly. Add change_tag to toollib. Allow multiple pvchange command line options to be specified together. Add -f (don't fork) option to clvmd and fix clvmd -d description. --- LVM2/lib/metadata/lv_manip.c 2011/01/12 20:42:51 1.244 +++ LVM2/lib/metadata/lv_manip.c 2011/01/24 14:19:05 1.245 @@ -3321,6 +3321,11 @@ backup(vg); + if (test_mode()) { + log_verbose("Test mode: Skipping activation and zeroing."); + goto out; + } + init_dmeventd_monitor(lp->activation_monitoring); if (lp->snapshot) { @@ -3399,6 +3404,7 @@ /* FIXME out of sequence */ backup(vg); +out: log_print("Logical volume \"%s\" created", lv->name); /* --- LVM2/lib/metadata/mirror.c 2011/01/11 17:21:01 1.140 +++ LVM2/lib/metadata/mirror.c 2011/01/24 14:19:05 1.141 @@ -285,6 +285,11 @@ uint64_t orig_status = log_lv->status; int was_active = 0; + if (test_mode()) { + log_verbose("Test mode: Skipping mirror log initialisation."); + return 1; + } + if (!activation() && in_sync) { log_error("Aborting. Unable to create in-sync mirror log " "while activation is disabled."); --- LVM2/lib/misc/lvm-globals.c 2010/10/13 15:40:39 1.7 +++ LVM2/lib/misc/lvm-globals.c 2011/01/24 14:19:05 1.8 @@ -51,7 +51,7 @@ void init_test(int level) { if (!_test && level) - log_print("Test mode: Metadata will NOT be updated."); + log_print("Test mode: Metadata will NOT be updated and volumes will not be (de)activated."); _test = level; } From agk@sourceware.org Mon Jan 24 20:02:00 2011 From: agk@sourceware.org (agk@sourceware.org) Date: Mon, 24 Jan 2011 20:02:00 -0000 Subject: LVM2 ./WHATS_NEW man/lvscan.8.in Message-ID: <20110124200208.31506.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: agk@sourceware.org 2011-01-24 20:02:08 Modified files: . : WHATS_NEW man : lvscan.8.in Log message: Bring lvscan man page up-to-date. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1888&r2=1.1889 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/man/lvscan.8.in.diff?cvsroot=lvm2&r1=1.2&r2=1.3 --- LVM2/WHATS_NEW 2011/01/24 14:19:05 1.1888 +++ LVM2/WHATS_NEW 2011/01/24 20:02:07 1.1889 @@ -1,5 +1,6 @@ Version 2.02.82 - =================================== + Bring lvscan man page up-to-date. Fix lvchange --test to exit cleanly. Add change_tag to toollib. Allow multiple pvchange command line options to be specified together. --- LVM2/man/lvscan.8.in 2009/10/26 14:37:09 1.2 +++ LVM2/man/lvscan.8.in 2011/01/24 20:02:08 1.3 @@ -1,6 +1,6 @@ .TH LVSCAN 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*- .SH NAME -lvscan \- scan (all disks) for logical volumes +lvscan \- scan (all disks) for Logical Volumes .SH SYNOPSIS .B lvscan .RB [ \-a | \-\-all] @@ -13,7 +13,11 @@ .SH DESCRIPTION .B lvscan scans all known volume groups or all supported LVM block devices -in the system for defined logical volumes. +in the system for defined Logical Volumes. The output consists +of one line for each Logical Volume indicating whether or not it is active, +a snapshot or origin, the size of the device and its allocation policy. +Use \fBlvs(8)\fP or \fBlvdisplay(8)\fP to obtain more-comprehensive information +about the Logical Volumes. .SH OPTIONS See \fBlvm\fP for common options. .TP @@ -26,9 +30,10 @@ mimage_0, mimage_1, and mlog. .TP .BR \-b ", " \-\-blockdevice -Adds the device major and minor numbers to the display -of each logical volume. +This option is now ignored. Instead, use \fBlvs(8)\fP or \fBlvdisplay(8)\fP to obtain +the device number. .SH SEE ALSO .BR lvm (8), .BR lvcreate (8), .BR lvdisplay (8) +.BR lvs (8) From agk@sourceware.org Mon Jan 24 23:24:00 2011 From: agk@sourceware.org (agk@sourceware.org) Date: Mon, 24 Jan 2011 23:24:00 -0000 Subject: LVM2 VERSION VERSION_DM WHATS_NEW Message-ID: <20110124232408.13200.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: agk@sourceware.org 2011-01-24 23:24:06 Modified files: . : VERSION VERSION_DM WHATS_NEW Log message: pre-release Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/VERSION.diff?cvsroot=lvm2&r1=1.270&r2=1.271 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/VERSION_DM.diff?cvsroot=lvm2&r1=1.78&r2=1.79 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1889&r2=1.1890 --- LVM2/VERSION 2011/01/17 18:16:18 1.270 +++ LVM2/VERSION 2011/01/24 23:24:06 1.271 @@ -1 +1 @@ -2.02.82(2)-cvs (2011-01-17) +2.02.82(2)-cvs (2011-01-24) --- LVM2/VERSION_DM 2011/01/17 18:16:18 1.78 +++ LVM2/VERSION_DM 2011/01/24 23:24:06 1.79 @@ -1 +1 @@ -1.02.62-cvs (2011-01-17) +1.02.62-cvs (2011-01-24) --- LVM2/WHATS_NEW 2011/01/24 20:02:07 1.1889 +++ LVM2/WHATS_NEW 2011/01/24 23:24:06 1.1890 @@ -1,12 +1,12 @@ -Version 2.02.82 - +Version 2.02.82 - 24th January 2011 =================================== Bring lvscan man page up-to-date. Fix lvchange --test to exit cleanly. Add change_tag to toollib. Allow multiple pvchange command line options to be specified together. + Do not fail pvmove polling if another process cleaned up first. + Avoid clvmd incrementing dlm lockspace reference count more than once. Add -f (don't fork) option to clvmd and fix clvmd -d description. - Fix possible clvmd DLM lockspace increasing reference count. - Do not fail polling if pvmove finished in another process. Version 2.02.81 - 17th January 2011 =================================== From agk@sourceware.org Mon Jan 24 23:34:00 2011 From: agk@sourceware.org (agk@sourceware.org) Date: Mon, 24 Jan 2011 23:34:00 -0000 Subject: LVM2 VERSION WHATS_NEW Message-ID: <20110124233448.8671.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: agk@sourceware.org 2011-01-24 23:34:47 Modified files: . : VERSION WHATS_NEW Log message: post-release Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/VERSION.diff?cvsroot=lvm2&r1=1.271&r2=1.272 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1890&r2=1.1891 --- LVM2/VERSION 2011/01/24 23:24:06 1.271 +++ LVM2/VERSION 2011/01/24 23:34:46 1.272 @@ -1 +1 @@ -2.02.82(2)-cvs (2011-01-24) +2.02.83(2)-cvs (2011-01-24) --- LVM2/WHATS_NEW 2011/01/24 23:24:06 1.1890 +++ LVM2/WHATS_NEW 2011/01/24 23:34:47 1.1891 @@ -1,3 +1,6 @@ +Version 2.02.83 - +=================================== + Version 2.02.82 - 24th January 2011 =================================== Bring lvscan man page up-to-date. From zkabelac@sourceware.org Tue Jan 25 21:51:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Tue, 25 Jan 2011 21:51:00 -0000 Subject: LVM2 ./WHATS_NEW_DM libdm/libdm-report.c Message-ID: <20110125215131.11155.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-25 21:51:31 Modified files: . : WHATS_NEW_DM libdm : libdm-report.c Log message: Initialize pool object for each row Fix assert abort of dmsetup (when compiled with pool debug) dmsetup splitname --nameprefixes --noheadings --rows gvg-a2 Move pool begin in the inner loop - otherwise it would using already 'ended' pool object. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW_DM.diff?cvsroot=lvm2&r1=1.438&r2=1.439 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/libdm-report.c.diff?cvsroot=lvm2&r1=1.40&r2=1.41 --- LVM2/WHATS_NEW_DM 2011/01/10 14:51:33 1.438 +++ LVM2/WHATS_NEW_DM 2011/01/25 21:51:30 1.439 @@ -1,5 +1,6 @@ Version 1.02.62 - =================================== + Initialize pool object for each row in _output_as_rows(). Version 1.02.61 - 10th January 2011 =================================== --- LVM2/libdm/libdm-report.c 2010/11/19 13:17:27 1.40 +++ LVM2/libdm/libdm-report.c 2011/01/25 21:51:31 1.41 @@ -1006,11 +1006,6 @@ struct dm_report_field *field; struct row *row; - if (!dm_pool_begin_object(rh->mem, 512)) { - log_error("dm_report: Unable to allocate output line"); - return 0; - } - dm_list_iterate_items(fp, &rh->field_props) { if (fp->flags & FLD_HIDDEN) { dm_list_iterate_items(row, &rh->rows) { @@ -1020,6 +1015,11 @@ continue; } + if (!dm_pool_begin_object(rh->mem, 512)) { + log_error("dm_report: Unable to allocate output line"); + return 0; + } + if ((rh->flags & DM_REPORT_OUTPUT_HEADINGS)) { if (!dm_pool_grow_object(rh->mem, rh->fields[fp->field_num].heading, 0)) { log_error("dm_report: Failed to extend row for field name"); From zkabelac@sourceware.org Wed Jan 26 21:21:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Wed, 26 Jan 2011 21:21:00 -0000 Subject: LVM2/test/api percent.c Message-ID: <20110126212156.25214.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-26 21:21:56 Modified files: test/api : percent.c Log message: Add missing lvm_quit in test Fix occasional confusing memory leak report in testing. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/api/percent.c.diff?cvsroot=lvm2&r1=1.4&r2=1.5 --- LVM2/test/api/percent.c 2011/01/03 15:07:39 1.4 +++ LVM2/test/api/percent.c 2011/01/26 21:21:56 1.5 @@ -37,7 +37,7 @@ assert(v.is_valid); assert(v.value.integer == PERCENT_0); - lv = lvm_lv_from_name(vg, "mirr"); + lv = lvm_lv_from_name(vg, "mirr"); assert(lv); v = lvm_lv_get_property(lv, "copy_percent"); @@ -52,5 +52,7 @@ assert(v.value.integer == 50 * PERCENT_1); lvm_vg_close(vg); + + lvm_quit(handle); return 0; } From agk@sourceware.org Thu Jan 27 00:21:00 2011 From: agk@sourceware.org (agk@sourceware.org) Date: Thu, 27 Jan 2011 00:21:00 -0000 Subject: LVM2 ./WHATS_NEW lib/filters/filter.c Message-ID: <20110127002138.17816.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: agk@sourceware.org 2011-01-27 00:21:38 Modified files: . : WHATS_NEW lib/filters : filter.c Log message: Use O_DIRECT when reading block devices. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1891&r2=1.1892 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/filters/filter.c.diff?cvsroot=lvm2&r1=1.59&r2=1.60 --- LVM2/WHATS_NEW 2011/01/24 23:34:47 1.1891 +++ LVM2/WHATS_NEW 2011/01/27 00:21:37 1.1892 @@ -1,5 +1,6 @@ Version 2.02.83 - =================================== + Always use O_DIRECT when opening block devices to check for partitioning. Version 2.02.82 - 24th January 2011 =================================== --- LVM2/lib/filters/filter.c 2011/01/12 15:28:34 1.59 +++ LVM2/lib/filters/filter.c 2011/01/27 00:21:37 1.60 @@ -147,7 +147,7 @@ } /* Check it's accessible */ - if (!dev_open_flags(dev, O_RDONLY, 0, 1)) { + if (!dev_open_flags(dev, O_RDONLY, 1, 1)) { log_debug("%s: Skipping: open failed", name); return 0; } From snitzer@sourceware.org Fri Jan 28 02:58:00 2011 From: snitzer@sourceware.org (snitzer@sourceware.org) Date: Fri, 28 Jan 2011 02:58:00 -0000 Subject: LVM2 ./WHATS_NEW lib/metadata/lv_manip.c Message-ID: <20110128025802.30997.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: snitzer@sourceware.org 2011-01-28 02:58:01 Modified files: . : WHATS_NEW lib/metadata : lv_manip.c Log message: Improve lvcreate "insufficient extents" errors to "insufficient free space". Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1892&r2=1.1893 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/lv_manip.c.diff?cvsroot=lvm2&r1=1.245&r2=1.246 --- LVM2/WHATS_NEW 2011/01/27 00:21:37 1.1892 +++ LVM2/WHATS_NEW 2011/01/28 02:58:00 1.1893 @@ -1,6 +1,7 @@ Version 2.02.83 - =================================== Always use O_DIRECT when opening block devices to check for partitioning. + Improve lvcreate "insufficient extents" errors to "insufficient free space". Version 2.02.82 - 24th January 2011 =================================== --- LVM2/lib/metadata/lv_manip.c 2011/01/24 14:19:05 1.245 +++ LVM2/lib/metadata/lv_manip.c 2011/01/28 02:58:01 1.246 @@ -1481,7 +1481,7 @@ } if (log_needs_allocating) { - log_error("Insufficient extents for log allocation " + log_error("Insufficient free space for log allocation " "for logical volume %s.", lv ? lv->name : ""); goto out; @@ -3232,8 +3232,9 @@ if (!seg_is_virtual(lp) && vg->free_count < lp->extents) { - log_error("Insufficient free extents (%u) in volume group %s: " - "%u required", vg->free_count, vg->name, lp->extents); + log_error("Volume group \"%s\" has insufficient free space " + "(%u extents): %u required.", + vg->name, vg->free_count, lp->extents); return 0; } From zkabelac@sourceware.org Fri Jan 28 10:14:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Fri, 28 Jan 2011 10:14:00 -0000 Subject: LVM2 ./WHATS_NEW lib/uuid/uuid.c Message-ID: <20110128101409.30443.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-28 10:14:09 Modified files: . : WHATS_NEW lib/uuid : uuid.c Log message: Avoid rebuilding of uuid validation table Small CPU relax... Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1893&r2=1.1894 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/uuid/uuid.c.diff?cvsroot=lvm2&r1=1.31&r2=1.32 --- LVM2/WHATS_NEW 2011/01/28 02:58:00 1.1893 +++ LVM2/WHATS_NEW 2011/01/28 10:14:08 1.1894 @@ -1,5 +1,6 @@ Version 2.02.83 - =================================== + Avoid rebuilding of uuid validation table. Always use O_DIRECT when opening block devices to check for partitioning. Improve lvcreate "insufficient extents" errors to "insufficient free space". --- LVM2/lib/uuid/uuid.c 2010/09/30 14:07:33 1.31 +++ LVM2/lib/uuid/uuid.c 2011/01/28 10:14:09 1.32 @@ -125,6 +125,7 @@ if (_built_inverse) return; + _built_inverse = 1; memset(_inverse_c, 0, sizeof(_inverse_c)); for (ptr = _c; *ptr; ptr++) From zkabelac@sourceware.org Fri Jan 28 10:16:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Fri, 28 Jan 2011 10:16:00 -0000 Subject: LVM2 lib/format_text/archiver.c lib/locking/cl ... Message-ID: <20110128101605.32718.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-28 10:16:05 Modified files: lib/format_text: archiver.c lib/locking : cluster_locking.c lib/misc : timestamp.c libdm/ioctl : libdm-iface.c Log message: Skip NULL check before dm_free dm_free checks for NULL itself. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/archiver.c.diff?cvsroot=lvm2&r1=1.37&r2=1.38 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/locking/cluster_locking.c.diff?cvsroot=lvm2&r1=1.49&r2=1.50 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/misc/timestamp.c.diff?cvsroot=lvm2&r1=1.3&r2=1.4 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/ioctl/libdm-iface.c.diff?cvsroot=lvm2&r1=1.87&r2=1.88 --- LVM2/lib/format_text/archiver.c 2011/01/05 15:06:10 1.37 +++ LVM2/lib/format_text/archiver.c 2011/01/28 10:16:04 1.38 @@ -69,8 +69,7 @@ { if (!cmd->archive_params) return; - if (cmd->archive_params->dir) - dm_free(cmd->archive_params->dir); + dm_free(cmd->archive_params->dir); memset(cmd->archive_params, 0, sizeof(*cmd->archive_params)); } @@ -183,8 +182,7 @@ { if (!cmd->backup_params) return; - if (cmd->backup_params->dir) - dm_free(cmd->backup_params->dir); + dm_free(cmd->backup_params->dir); memset(cmd->backup_params, 0, sizeof(*cmd->backup_params)); } --- LVM2/lib/locking/cluster_locking.c 2011/01/12 20:42:50 1.49 +++ LVM2/lib/locking/cluster_locking.c 2011/01/28 10:16:04 1.50 @@ -279,8 +279,7 @@ *response = rarray; out: - if (retbuf) - dm_free(retbuf); + dm_free(retbuf); return status; } --- LVM2/lib/misc/timestamp.c 2007/08/20 20:55:27 1.3 +++ LVM2/lib/misc/timestamp.c 2011/01/28 10:16:04 1.4 @@ -125,6 +125,5 @@ void destroy_timestamp(struct timestamp *t) { - if (t) - dm_free(t); + dm_free(t); } --- LVM2/libdm/ioctl/libdm-iface.c 2011/01/04 14:43:54 1.87 +++ LVM2/libdm/ioctl/libdm-iface.c 2011/01/28 10:16:04 1.88 @@ -486,20 +486,11 @@ dm_free(t); } - if (dmt->dev_name) - dm_free(dmt->dev_name); - - if (dmt->newname) - dm_free(dmt->newname); - - if (dmt->message) - dm_free(dmt->message); - _dm_zfree_dmi(dmt->dmi.v4); - - if (dmt->uuid) - dm_free(dmt->uuid); - + dm_free(dmt->dev_name); + dm_free(dmt->newname); + dm_free(dmt->message); + dm_free(dmt->uuid); dm_free(dmt); } From zkabelac@sourceware.org Fri Jan 28 10:19:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Fri, 28 Jan 2011 10:19:00 -0000 Subject: LVM2/lib/config config.c Message-ID: <20110128101900.1452.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-28 10:19:00 Modified files: lib/config : config.c Log message: Use memcpy and add error message strncpy (which check each byte for \0) is not need as we always copy the length size - so using memcpy is a bit cheaper. Add missing log_error message for failed allocation. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/config/config.c.diff?cvsroot=lvm2&r1=1.87&r2=1.88 --- LVM2/lib/config/config.c 2010/12/20 13:53:11 1.87 +++ LVM2/lib/config/config.c 2011/01/28 10:19:00 1.88 @@ -886,9 +886,11 @@ { size_t len = p->te - p->tb; char *str = dm_pool_alloc(p->mem, len + 1); - if (!str) - return_0; - strncpy(str, p->tb, len); + if (!str) { + log_error("Failed to duplicate token."); + return 0; + } + memcpy(str, p->tb, len); str[len] = '\0'; return str; } From prajnoha@sourceware.org Fri Jan 28 11:41:00 2011 From: prajnoha@sourceware.org (prajnoha@sourceware.org) Date: Fri, 28 Jan 2011 11:41:00 -0000 Subject: LVM2 ./WHATS_NEW_DM udev/10-dm.rules.in Message-ID: <20110128114153.25193.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: prajnoha@sourceware.org 2011-01-28 11:41:52 Modified files: . : WHATS_NEW_DM udev : 10-dm.rules.in Log message: Set DM_UDEV_DISABLE_OTHER_RULES_FLAG for suspended DM devices in udev rules. This is to avoid any scanning and processing of DM devices while they are in suspended state (e.g. a rename while the device is suspended - a CHANGE event is generated!). Otherwise, any scanning in the rules could end up with locking the calling process until the device is resumed and so we don't receive a notification about udev rules completion until then (and that effectively locks out the process awaiting the notification!). However, we still keep 'disk' and any 'subsystem' related udev rules running. We trust these and these should check themselves whether a device is suspended or not, not trying to run any scanning if it is. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW_DM.diff?cvsroot=lvm2&r1=1.439&r2=1.440 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/udev/10-dm.rules.in.diff?cvsroot=lvm2&r1=1.12&r2=1.13 --- LVM2/WHATS_NEW_DM 2011/01/25 21:51:30 1.439 +++ LVM2/WHATS_NEW_DM 2011/01/28 11:41:51 1.440 @@ -1,5 +1,6 @@ Version 1.02.62 - =================================== + Set DM_UDEV_DISABLE_OTHER_RULES_FLAG for suspended DM devices in udev rules. Initialize pool object for each row in _output_as_rows(). Version 1.02.61 - 10th January 2011 --- LVM2/udev/10-dm.rules.in 2010/08/12 13:41:19 1.12 +++ LVM2/udev/10-dm.rules.in 2011/01/28 11:41:52 1.13 @@ -119,6 +119,11 @@ ENV{DM_UUID}=="CRYPT-TEMP-?*", GOTO="dm_disable" ENV{DM_UUID}!="?*", ENV{DM_NAME}=="temporary-cryptsetup-?*", GOTO="dm_disable" +# Avoid processing and scanning a DM device in the other (foreign) +# rules if it is in suspended state. However, we still keep 'disk' +# and 'DM subsystem' related rules enabled in this case. +ENV{DM_SUSPENDED}=="1", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}="1" + GOTO="dm_end" LABEL="dm_disable" From zkabelac@sourceware.org Fri Jan 28 16:01:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Fri, 28 Jan 2011 16:01:00 -0000 Subject: LVM2/libdm/mm dbg_malloc.c Message-ID: <20110128160132.23140.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-28 16:01:32 Modified files: libdm/mm : dbg_malloc.c Log message: Compile code for memory debuging only with DEBUG_MEM When it's not in use - do not compile this code. Improves lcov code coverage results for this code a lot :) Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/mm/dbg_malloc.c.diff?cvsroot=lvm2&r1=1.21&r2=1.22 --- LVM2/libdm/mm/dbg_malloc.c 2010/09/30 21:06:52 1.21 +++ LVM2/libdm/mm/dbg_malloc.c 2011/01/28 16:01:32 1.22 @@ -15,6 +15,8 @@ #include "dmlib.h" +#ifdef DEBUG_MEM + #include #include @@ -249,6 +251,8 @@ } } +#endif + void *dm_malloc_aux(size_t s, const char *file __attribute__((unused)), int line __attribute__((unused))) { From zkabelac@sourceware.org Fri Jan 28 16:03:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Fri, 28 Jan 2011 16:03:00 -0000 Subject: LVM2 ./WHATS_NEW man/pvcreate.8.in man/pvremov ... Message-ID: <20110128160339.24249.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-28 16:03:38 Modified files: . : WHATS_NEW man : pvcreate.8.in pvremove.8.in pvresize.8.in pvscan.8.in Log message: Updating man pages Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1894&r2=1.1895 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/man/pvcreate.8.in.diff?cvsroot=lvm2&r1=1.9&r2=1.10 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/man/pvremove.8.in.diff?cvsroot=lvm2&r1=1.1&r2=1.2 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/man/pvresize.8.in.diff?cvsroot=lvm2&r1=1.1&r2=1.2 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/man/pvscan.8.in.diff?cvsroot=lvm2&r1=1.1&r2=1.2 --- LVM2/WHATS_NEW 2011/01/28 10:14:08 1.1894 +++ LVM2/WHATS_NEW 2011/01/28 16:03:38 1.1895 @@ -1,5 +1,6 @@ Version 2.02.83 - =================================== + Updating man pages for pvcreate, pvremove, pvresize, pvscan. Avoid rebuilding of uuid validation table. Always use O_DIRECT when opening block devices to check for partitioning. Improve lvcreate "insufficient extents" errors to "insufficient free space". --- LVM2/man/pvcreate.8.in 2010/08/12 04:09:00 1.9 +++ LVM2/man/pvcreate.8.in 2011/01/28 16:03:38 1.10 @@ -3,25 +3,20 @@ pvcreate \- initialize a disk or partition for use by LVM .SH SYNOPSIS .B pvcreate -.RB [ \-d | \-\-debug ] .RB [ \-f [ f ]| \-\-force " [" \-\-force ]] .RB [ \-y | \-\-yes ] -.RB [ \-h | \-\-help ] -.RB [ \-t | \-\-test ] -.RB [ \-v | \-\-verbose ] .RB [ \-\-labelsector ] -.RB [ \-M | \-\-metadatatype type ] -.RB [ \-\-[pv]metadatacopies #copies ] -.RB [ \-\-metadatasize size ] -.RB [ \-\-metadataignore y|n ] -.RB [ \-\-dataalignment alignment ] -.RB [ \-\-dataalignmentoffset alignment_offset ] -.RB [ \-\-restorefile file ] +.RB [ \-M | \-\-metadatatype " " \fItype ] +.RB [ \-\-[pv]metadatacopies " " \fI#copies ] +.RB [ \-\-metadatasize " " \fIsize ] +.RB [ \-\-metadataignore " {" \fIy | \fIn }] +.RB [ \-\-dataalignment " " \fIalignment ] +.RB [ \-\-dataalignmentoffset " " \fIalignment_offset ] +.RB [ \-\-restorefile " " \fIfile ] .RB [ \-\-norestorefile ] -.RB [ \-\-setphysicalvolumesize size ] -.RB [ \-u | \-\-uuid uuid ] -.RB [ \-\-version ] -.RB [ \-Z | \-\-zero y|n ] +.RB [ \-\-setphysicalvolumesize " " \fIsize ] +.RB [ \-u | \-\-uuid " " \fIuuid ] +.RB [ \-Z | \-\-zero " {" \fIy | \fIn }] .IR PhysicalVolume " [" PhysicalVolume ...] .SH DESCRIPTION .B pvcreate @@ -54,9 +49,9 @@ .BR \-f ", " \-\-force Force the creation without any confirmation. You can not recreate (reinitialize) a physical volume belonging to an existing volume group. -In an emergency you can override this behaviour with -ff. +In an emergency you can override this behaviour with \fB-ff\fP. .TP -.BR \-u ", " \-\-uuid " uuid" +.BR \-u ", " \-\-uuid " " \fIuuid Specify the uuid for the device. Without this option, \fBpvcreate\fP generates a random uuid. All of your physical volumes must have unique uuids. @@ -68,12 +63,12 @@ .BR \-y ", " \-\-yes Answer yes to all questions. .TP -.BR \-Z ", " \-\-zero " y|n" +.BR \-Z ", " \-\-zero " " \fIy | \fIn Whether or not the first 4 sectors (2048 bytes) of the device should be wiped. If this option is not given, the -default is to wipe these sectors unless either or both of the --restorefile -or --uuid options were specified. +default is to wipe these sectors unless either or both of the \fB--restorefile\fP +or \fB--uuid\fP options were specified. .SH NEW METADATA OPTIONS LVM2 introduces a new format for storing metadata on disk. This new format is more efficient and resilient than the format the @@ -91,25 +86,25 @@ will be written in due course. Use the verbose/debug options on the tools to see where the metadata areas are placed. .TP -.BR \-\-metadatasize " size" +.BI \-\-metadatasize " size" The approximate amount of space to be set aside for each metadata area. (The size you specify may get rounded.) .TP -.BR \-\-dataalignment " alignment" +.BI \-\-dataalignment " alignment" Align the start of the data to a multiple of this number. -You should also specify an appropriate \fBPhysicalExtentSize\fP when creating +You should also specify an appropriate \fIPhysicalExtentSize\fP when creating the Volume Group with \fBvgcreate\fP. .sp To see the location of the first Physical Extent of an existing Physical Volume use \fBpvs -o +pe_start\fP . It will be a multiple of the requested -\fBalignment\fP. In addition it may be shifted by \fBalignment_offset\fP from -\fBdata_alignment_offset_detection\fP (if enabled in \fBlvm.conf\fP) or +alignment. In addition it may be shifted by \fIalignment_offset\fP from +\fIdata_alignment_offset_detection\fP (if enabled in \fBlvm.conf\fP) or \fB--dataalignmentoffset\fP. .TP -.BR \-\-dataalignmentoffset " alignment_offset" -Shift the start of the data area by this additional \fBalignment_offset\fP. +.BI \-\-dataalignmentoffset " alignment_offset" +Shift the start of the data area by this additional \fIalignment_offset\fP. .TP -.BR \-\-[pv]metadatacopies " copies" +.BI \-\-[pv]metadatacopies " copies" The number of metadata areas to set aside on each PV. Currently this can be 0, 1 or 2. If set to 2, two copies of the volume group metadata @@ -121,7 +116,7 @@ then later use \fBvgsplit\fP you must ensure that each VG is still going to have a suitable number of copies of the metadata after the split! .TP -.BR \-\-metadataignore " y|n" +.BI \-\-metadataignore " y" \fR| n Ignore or un-ignore metadata areas on this physical volume. The default is "n". This setting can be changed with \fBpvchange\fP. If metadata areas on a physical volume are ignored, LVM will @@ -132,7 +127,7 @@ area in case you need it in the future and to use this option to instruct LVM2 to ignore it. .TP -.BR \-\-restorefile " file" +.BI \-\-restorefile " file" In conjunction with \fB--uuid\fP, this extracts the location and size of the data on the PV from the file (produced by \fBvgcfgbackup\fP) and ensures that the metadata that the program produces is consistent @@ -141,17 +136,17 @@ a mechanism to upgrade the metadata format or to add/remove metadata areas. Use with care. See also \fBvgconvert\fP(8). .TP -.BR \-\-norestorefile -In conjunction with \fB--uuid\fP, this allows a uuid to be specified +.B \-\-norestorefile +In conjunction with \fB--uuid\fP, this allows a \fIuuid\fP to be specified without also requiring that a backup of the metadata be provided. .TP -.BR \-\-labelsector " sector" +.BI \-\-labelsector " sector" By default the PV is labelled with an LVM2 identifier in its second sector (sector 1). This lets you use a different sector near the start of the disk (between 0 and 3 inclusive - see LABEL_SCAN_SECTORS in the source). Use with care. .TP -.BR \-\-setphysicalvolumesize " size" +.BI \-\-setphysicalvolumesize " size" Overrides the automatically-detected size of the PV. Use with care. .SH EXAMPLES Initialize partition #4 on the third SCSI disk and the entire fifth --- LVM2/man/pvremove.8.in 2008/10/08 12:50:13 1.1 +++ LVM2/man/pvremove.8.in 2011/01/28 16:03:38 1.2 @@ -3,11 +3,7 @@ pvremove \- remove a physical volume .SH SYNOPSIS .B pvremove -.RB [ \-d | \-\-debug] .RB [ \-f [ f ]| \-\-force " [" \-\-force ]] -.RB [\-h | \-\-help] -.RB [ \-t | \-\-test ] -.RB [ \-v [ v ]| \-\-verbose " [" \-\-verbose ]] .RB [ \-y | \-\-yes ] .IR PhysicalVolume " [" PhysicalVolume ...] .SH DESCRIPTION @@ -15,7 +11,14 @@ wipes the label on a device so that LVM will no longer recognise it as a physical volume. .SH OPTIONS -See \fBlvm\fP for common options. +See \fBlvm\fP(8) for common options. +.TP +.BR \-ff ", " \-\-force " " \-\-force +Force the removal of a physical volume belonging to an existing volume group. +You cannot remove a physical volume which in use by some active logical volume. +.TP +.BR \-y ", " \-\-yes +Answer yes to all questions. .SH SEE ALSO .BR lvm (8), .BR pvcreate (8), --- LVM2/man/pvresize.8.in 2008/10/08 12:50:13 1.1 +++ LVM2/man/pvresize.8.in 2011/01/28 16:03:38 1.2 @@ -3,11 +3,7 @@ pvresize \- resize a disk or partition in use by LVM2 .SH SYNOPSIS .B pvresize -.RB [ \-d | \-\-debug ] -.RB [ \-h | \-\-help ] -.RB [ \-t | \-\-test ] -.RB [ \-v | \-\-verbose ] -.RB [ \-\-setphysicalvolumesize size ] +.RB [ \-\-setphysicalvolumesize " " \fIsize ] .IR PhysicalVolume " [" PhysicalVolume ...] .SH DESCRIPTION .B pvresize @@ -18,7 +14,7 @@ .SH OPTIONS See \fBlvm\fP(8) for common options. .TP -.BR \-\-setphysicalvolumesize " size" +.BI \-\-setphysicalvolumesize " size" Overrides the automatically-detected size of the PV. Use with care, or prior to reducing the physical size of the device. .SH EXAMPLES @@ -46,4 +42,7 @@ won't currently work correctly on LVM1 volumes or PVs with extra metadata areas. .SH SEE ALSO -.BR lvm "(8), " pvmove "(8), " lvresize "(8), " fdisk "(8)" +.BR lvm (8), +.BR pvmove (8), +.BR lvresize (8), +.BR fdisk (8) --- LVM2/man/pvscan.8.in 2008/10/08 12:50:13 1.1 +++ LVM2/man/pvscan.8.in 2011/01/28 16:03:38 1.2 @@ -3,19 +3,15 @@ pvscan \- scan all disks for physical volumes .SH SYNOPSIS .B pvscan -.RB [ \-d | \-\-debug] -.RB [\-e | \-\-exported] -.RB [\-h | \-\-help] -.RB [\-\-ignorelockingfailure] -.RB [ \-n | \-\-novolumegroup] -.RB [\-s | \-\-short] -.RB [\-u | \-\-uuid] -.RB [ \-v [ v ]| \-\-verbose " [" \-\-verbose ]] +.RB [ \-e | \-\-exported ] +.RB [ \-n | \-\-novolumegroup ] +.RB [ \-s | \-\-short ] +.RB [ \-u | \-\-uuid ] .SH DESCRIPTION .B pvscan scans all supported LVM block devices in the system for physical volumes. .SH OPTIONS -See \fBlvm\fP for common options. +See \fBlvm\fP(8) for common options. .TP .BR \-e ", " \-\-exported Only show physical volumes belonging to exported volume groups. From zkabelac@sourceware.org Fri Jan 28 16:05:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Fri, 28 Jan 2011 16:05:00 -0000 Subject: LVM2/test/lib harness.c Message-ID: <20110128160538.27414.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-28 16:05:38 Modified files: test/lib : harness.c Log message: Display duration of tests when it passed. Enhance output with info about the test duration. Cleanup few declarations in the code. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/lib/harness.c.diff?cvsroot=lvm2&r1=1.5&r2=1.6 --- LVM2/test/lib/harness.c 2011/01/13 15:03:28 1.5 +++ LVM2/test/lib/harness.c 2011/01/28 16:05:38 1.6 @@ -20,6 +20,7 @@ #include #include #include +#include static pid_t pid; static int fds[2]; @@ -82,9 +83,9 @@ char *line = strndup(from, next - from); char *a = line, *b; do { - b = line + strlen(line); int idx = -1; int i; + b = line + strlen(line); for ( i = 0; i < 2; ++i ) { if (subst[i].key) { // printf("trying: %s -> %s\n", subst[i].value, subst[i].key); @@ -145,15 +146,24 @@ } } -static void passed(int i, char *f) { +static const char *duration(time_t start) +{ + static char buf[16]; + int t = (int)(time(NULL) - start); + + sprintf(buf, "%2d:%02d", t / 60, t % 60); + return buf; +} + +static void passed(int i, char *f, time_t t) { if (strstr(readbuf, "TEST WARNING")) { ++s.nwarned; s.status[i] = WARNED; - printf("warnings\n"); + printf("warnings %s\n", duration(t)); } else { ++ s.npassed; s.status[i] = PASSED; - printf("passed.\n"); + printf("passed. %s\n", duration(t)); } } @@ -192,12 +202,13 @@ fflush(stderr); _exit(202); } else { + int st, w; + time_t start = time(NULL); char buf[128]; snprintf(buf, 128, "%s ...", f); buf[127] = 0; printf("Running %-40s ", buf); fflush(stdout); - int st, w; while ((w = waitpid(pid, &st, WNOHANG)) == 0) { drain(); usleep(20000); @@ -209,7 +220,7 @@ drain(); if (WIFEXITED(st)) { if (WEXITSTATUS(st) == 0) { - passed(i, f); + passed(i, f, start); } else if (WEXITSTATUS(st) == 200) { skipped(i, f); } else { @@ -223,6 +234,8 @@ } int main(int argc, char **argv) { + const char *be_verbose = getenv("VERBOSE"); + time_t start = time(NULL); int i; if (argc >= MAX) { @@ -230,9 +243,6 @@ exit(1); } - s.nwarned = s.nfailed = s.npassed = s.nskipped = 0; - - char *be_verbose = getenv("VERBOSE"); if (be_verbose && atoi(be_verbose)) verbose = 1; // XXX @@ -260,8 +270,9 @@ break; } - printf("\n## %d tests: %d OK, %d warnings, %d failures; %d skipped\n", + printf("\n## %d tests %s : %d OK, %d warnings, %d failures; %d skipped\n", s.nwarned + s.npassed + s.nfailed + s.nskipped, + duration(start), s.npassed, s.nwarned, s.nfailed, s.nskipped); /* print out a summary */ @@ -279,5 +290,6 @@ printf("\n"); return s.nfailed > 0 || die; } + return die; } From zkabelac@sourceware.org Fri Jan 28 16:07:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Fri, 28 Jan 2011 16:07:00 -0000 Subject: LVM2/test t-lvconvert-mirror-basic.sh Message-ID: <20110128160705.29046.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-28 16:07:05 Modified files: test : t-lvconvert-mirror-basic.sh Log message: Accelerate mirror tests Instead of recreation of whole device set for each test round, just cleanup created LVs to empty VG. Lower the size of PV devices to 16MB Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-lvconvert-mirror-basic.sh.diff?cvsroot=lvm2&r1=1.6&r2=1.7 --- LVM2/test/t-lvconvert-mirror-basic.sh 2011/01/11 17:05:09 1.6 +++ LVM2/test/t-lvconvert-mirror-basic.sh 2011/01/28 16:07:04 1.7 @@ -77,8 +77,6 @@ max_log_count=$start_log_count fi - aux prepare_vg 5 - if [ $start_count -gt 0 ]; then # Are there extra devices for the log or do we overlap if [ $(($start_count_p1 + $start_log_count)) -gt ${#dev_array[@]} ]; then @@ -123,7 +121,7 @@ fi } -aux prepare_vg 5 +aux prepare_vg 5 16 test_many() { i=$1 @@ -135,7 +133,9 @@ : "Testing mirror conversion -m$i/$k -> -m$j/$l" : ---------------------------------------------------- test_lvconvert $i $k $j $l 0 + lvremove -ff $vg test_lvconvert $i $k $j $l 1 + lvremove -ff $vg done done done From zkabelac@sourceware.org Fri Jan 28 16:08:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Fri, 28 Jan 2011 16:08:00 -0000 Subject: LVM2/test/lib check.sh Message-ID: <20110128160839.30974.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-28 16:08:39 Modified files: test/lib : check.sh Log message: Do not break pipes As the option 'set -e -o pipefail' is very sensite on pipe breaking stop using '-q' for grep commands. Otherwise this command (with large enough table) would fail: dmsetup table | egrep -q with exit code 141 (128 + SIGPIPE) As Peter suggested, he prefers to keep '-o pipefail' - so make sure all piped commands will read the whole output and will not exit too early. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/lib/check.sh.diff?cvsroot=lvm2&r1=1.3&r2=1.4 --- LVM2/test/lib/check.sh 2011/01/07 14:42:35 1.3 +++ LVM2/test/lib/check.sh 2011/01/28 16:08:39 1.4 @@ -139,9 +139,9 @@ mirror_nonredundant() { lv="$1/$2" - lvs -oattr "$lv" | grep -q "^ *m.....$" || { - if lvs -oattr "$lv" | grep -q "^ *o.....$" && - lvs -a | fgrep -q "[${2}_mimage"; then + lvs -oattr "$lv" | grep "^ *m.....$" >/dev/null || { + if lvs -oattr "$lv" | grep "^ *o.....$" >/dev/null && + lvs -a | fgrep "[${2}_mimage" >/dev/null; then echo "TEST WARNING: $lv is a snapshot origin and looks like a mirror," echo "assuming it is actually a mirror" else @@ -174,7 +174,7 @@ linear() { lv="$1/$2" - lvl -ostripes "$lv" | grep -q "1" || { + lvl -ostripes "$lv" | grep "1" >/dev/null || { echo "$lv expected linear, but is not:" lvl "$lv" -o+devices exit 1 @@ -183,12 +183,12 @@ active() { lv="$1/$2" - lvl -oattr "$lv" 2> /dev/null | grep -q "^ *....a.$" || { + lvl -oattr "$lv" 2> /dev/null | grep "^ *....a.$" >/dev/null || { echo "$lv expected active, but lvs says it's not:" lvl "$lv" -o+devices 2>/dev/null exit 1 } - dmsetup table | egrep -q "$1-$2: *[^ ]+" || { + dmsetup table | egrep "$1-$2: *[^ ]+" >/dev/null || { echo "$lv expected active, lvs thinks it is but there are no mappings!" dmsetup table | grep $1-$2: exit 1 @@ -197,12 +197,12 @@ inactive() { lv="$1/$2" - lvl -oattr "$lv" 2> /dev/null | grep -q '^ *....[-isd].$' || { + lvl -oattr "$lv" 2> /dev/null | grep '^ *....[-isd].$' >/dev/null || { echo "$lv expected inactive, but lvs says it's not:" lvl "$lv" -o+devices 2>/dev/null exit 1 } - dmsetup table | not egrep -q "$1-$2: *[^ ]+" || { + dmsetup table | not egrep "$1-$2: *[^ ]+" >/dev/null || { echo "$lv expected inactive, lvs thinks it is but there are mappings!" dmsetup table | grep $1-$2: exit 1 From zkabelac@sourceware.org Fri Jan 28 16:10:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Fri, 28 Jan 2011 16:10:00 -0000 Subject: LVM2/test/lib aux.sh Message-ID: <20110128161022.31663.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-28 16:10:22 Modified files: test/lib : aux.sh Log message: Add command to wait for udevadm settle Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/lib/aux.sh.diff?cvsroot=lvm2&r1=1.7&r2=1.8 --- LVM2/test/lib/aux.sh 2011/01/13 14:57:18 1.7 +++ LVM2/test/lib/aux.sh 2011/01/28 16:10:21 1.8 @@ -1,3 +1,4 @@ +#!/bin/bash # Copyright (C) 2011 Red Hat, Inc. All rights reserved. # # This copyrighted material is made available to anyone wishing to use, @@ -71,6 +72,7 @@ } + udev_wait # NOTE: SCSI_DEBUG_DEV test must come before the LOOP test because # prepare_scsi_debug_dev() also sets LOOP to short-circuit prepare_loop() if test -f SCSI_DEBUG_DEV; then @@ -367,6 +369,15 @@ $abs_top_builddir/test/api/wrapper "$@" } +udev_wait() { + pgrep udev >/dev/null || return + if test -n "$1" ; then + udevadm settle --exit-if-exists=$1 + else + udevadm settle --timeout=5 + fi +} + test -f DEVICES && devs=$(cat DEVICES) test -f LOOP && LOOP=$(cat LOOP) From zkabelac@sourceware.org Fri Jan 28 16:11:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Fri, 28 Jan 2011 16:11:00 -0000 Subject: LVM2/test/api percent.sh Message-ID: <20110128161114.32321.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-28 16:11:14 Modified files: test/api : percent.sh Log message: Query only test related vg name Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/api/percent.sh.diff?cvsroot=lvm2&r1=1.4&r2=1.5 --- LVM2/test/api/percent.sh 2011/01/07 15:04:52 1.4 +++ LVM2/test/api/percent.sh 2011/01/28 16:11:14 1.5 @@ -23,5 +23,5 @@ lvcreate -s -n snap2 $vg/foo -l 6 -c 4k dd if=/dev/urandom of=$DM_DEV_DIR/$vg/snap2 count=1 bs=1024 lvcreate -m 1 -n mirr $vg -l 1 --mirrorlog core -lvs +lvs $vg aux apitest percent $vg From zkabelac@sourceware.org Fri Jan 28 16:12:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Fri, 28 Jan 2011 16:12:00 -0000 Subject: LVM2/test t-pvcreate-operation-md.sh Message-ID: <20110128161247.1277.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-28 16:12:46 Modified files: test : t-pvcreate-operation-md.sh Log message: Replacei sleep wait with udev settle Use new udev_wait command instead of unpredictable sleep waiting. As with more devices in the system, udev processing is slower. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-pvcreate-operation-md.sh.diff?cvsroot=lvm2&r1=1.13&r2=1.14 --- LVM2/test/t-pvcreate-operation-md.sh 2011/01/05 01:04:47 1.13 +++ LVM2/test/t-pvcreate-operation-md.sh 2011/01/28 16:12:45 1.14 @@ -34,8 +34,9 @@ cleanup_md() { # sleeps offer hack to defeat: 'md: md127 still in use' # see: https://bugzilla.redhat.com/show_bug.cgi?id=509908#c25 - sleep 2 + aux udev_wait mdadm --stop $mddev || true + aux udev_wait if [ -b "$mddev" ]; then # mdadm doesn't always cleanup the device node sleep 2 @@ -102,6 +103,11 @@ base_mddev_p=`basename $mddev_p_sysfs_name` mddev_p=/dev/${base_mddev_p} + # in case the system is running without devtmpfs /dev + # wait here for created device node on tmpfs + aux udev_wait $mddev_p + test -b $mddev_p || exit 200 + # Checking for 'alignment_offset' in sysfs implies Linux >= 2.6.31 # but reliable alignment_offset support requires kernel.org Linux >= 2.6.33 sysfs_alignment_offset=/sys/dev/block/${mddev_maj_min}/${base_mddev_p}/alignment_offset From zkabelac@sourceware.org Fri Jan 28 16:13:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Fri, 28 Jan 2011 16:13:00 -0000 Subject: LVM2/test t-inconsistent-metadata.sh Message-ID: <20110128161340.2112.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-28 16:13:39 Modified files: test : t-inconsistent-metadata.sh Log message: Lower disk space usage of inconsistent mda test Smaller size of devices speedups this test. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-inconsistent-metadata.sh.diff?cvsroot=lvm2&r1=1.5&r2=1.6 --- LVM2/test/t-inconsistent-metadata.sh 2011/01/05 00:16:20 1.5 +++ LVM2/test/t-inconsistent-metadata.sh 2011/01/28 16:13:39 1.6 @@ -11,7 +11,7 @@ . lib/test -aux prepare_vg 3 +aux prepare_vg 3 12 lvcreate -m 1 -l 1 -n mirror $vg lvcreate -l 1 -n resized $vg From zkabelac@sourceware.org Fri Jan 28 16:15:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Fri, 28 Jan 2011 16:15:00 -0000 Subject: LVM2/test t-pvmove-basic.sh Message-ID: <20110128161510.3196.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-28 16:15:09 Modified files: test : t-pvmove-basic.sh Log message: Lower device size of pvmove test Lower the size of devices in this test for speedup. And check only once that LVs are prepared properly. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-pvmove-basic.sh.diff?cvsroot=lvm2&r1=1.12&r2=1.13 --- LVM2/test/t-pvmove-basic.sh 2011/01/05 00:16:20 1.12 +++ LVM2/test/t-pvmove-basic.sh 2011/01/28 16:15:08 1.13 @@ -43,30 +43,34 @@ # --------------------------------------------------------------------- # Initialize PVs and VGs -aux prepare_vg 5 80 +aux prepare_vg 5 40 # --------------------------------------------------------------------- # Common environment setup/cleanup for each sub testcases +FIRST="" prepare_lvs_() { lvcreate -l2 -n $lv1 $vg $dev1 - lv_is_on_ $vg/$lv1 $dev1 + test -z "$FIRST" && lv_is_on_ $vg/$lv1 $dev1 lvcreate -l9 -i3 -n $lv2 $vg $dev2 $dev3 $dev4 - lv_is_on_ $vg/$lv2 $dev2 $dev3 $dev4 + test -z "$FIRST" && lv_is_on_ $vg/$lv2 $dev2 $dev3 $dev4 lvextend -l+2 $vg/$lv1 $dev2 - lv_is_on_ $vg/$lv1 $dev1 $dev2 + test -z "$FIRST" && lv_is_on_ $vg/$lv1 $dev1 $dev2 lvextend -l+2 $vg/$lv1 $dev3 - lv_is_on_ $vg/$lv1 $dev1 $dev2 $dev3 + test -z "$FIRST" && lv_is_on_ $vg/$lv1 $dev1 $dev2 $dev3 lvextend -l+2 $vg/$lv1 $dev1 - lv_is_on_ $vg/$lv1 $dev1 $dev2 $dev3 $dev1 + test -z "$FIRST" && lv_is_on_ $vg/$lv1 $dev1 $dev2 $dev3 $dev1 lvcreate -l1 -n $lv3 $vg $dev2 - lv_is_on_ $vg/$lv3 $dev2 + test -z "$FIRST" && lv_is_on_ $vg/$lv3 $dev2 save_dev_sum_ $(lvdev_ $vg $lv1) save_dev_sum_ $(lvdev_ $vg $lv2) save_dev_sum_ $(lvdev_ $vg $lv3) - lvs -a -o devices --noheadings $vg/$lv1 > ${lv1}_devs - lvs -a -o devices --noheadings $vg/$lv2 > ${lv2}_devs - lvs -a -o devices --noheadings $vg/$lv3 > ${lv3}_devs + if test -z "$FIRST" ; then + lvs -a -o devices --noheadings $vg/$lv1 > ${lv1}_devs + lvs -a -o devices --noheadings $vg/$lv2 > ${lv2}_devs + lvs -a -o devices --noheadings $vg/$lv3 > ${lv3}_devs + fi + FIRST=done } lv_not_changed_() { From prajnoha@sourceware.org Mon Jan 31 11:54:00 2011 From: prajnoha@sourceware.org (prajnoha@sourceware.org) Date: Mon, 31 Jan 2011 11:54:00 -0000 Subject: LVM2/libdm/ioctl libdm-iface.c Message-ID: <20110131115455.16794.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: prajnoha@sourceware.org 2011-01-31 11:54:55 Modified files: libdm/ioctl : libdm-iface.c Log message: Add a debug message when uevent is not generated and we call udev_complete internally. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/ioctl/libdm-iface.c.diff?cvsroot=lvm2&r1=1.88&r2=1.89 --- LVM2/libdm/ioctl/libdm-iface.c 2011/01/28 10:16:04 1.88 +++ LVM2/libdm/ioctl/libdm-iface.c 2011/01/31 11:54:55 1.89 @@ -1979,8 +1979,11 @@ } } - if (ioctl_with_uevent && !_check_uevent_generated(dmi)) + if (ioctl_with_uevent && !_check_uevent_generated(dmi)) { + log_debug("Uevent not generated! Calling udev_complete " + "internally to avoid process lock-up."); _udev_complete(dmt); + } #else /* Userspace alternative for testing */ #endif From zkabelac@sourceware.org Mon Jan 31 19:52:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Mon, 31 Jan 2011 19:52:00 -0000 Subject: LVM2 ./WHATS_NEW daemons/clvmd/clvmd-command.c ... Message-ID: <20110131195242.14845.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-31 19:52:41 Modified files: . : WHATS_NEW daemons/clvmd : clvmd-command.c lib/locking : file_locking.c locking.c Added files: test : t-vgchange-sysinit.sh Log message: Fix udev synchronization for no-locking mode Instead of implicitly syncing udev operation in clustered and file locking code - call synchronization directly in lock_vol() when the operation unlocks VG The problem is missing implicit fs_unlock() in the no_locking code. This is used with --sysinit on read-only filesystem locking dir. In this case vgchange -ay could exit before all udev nodes are properly synchronised and may cause problems with accessing such node right after vgchange --sysinint command is finished. Add test case for vgchange --sysinit. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1895&r2=1.1896 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/clvmd-command.c.diff?cvsroot=lvm2&r1=1.49&r2=1.50 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/locking/file_locking.c.diff?cvsroot=lvm2&r1=1.54&r2=1.55 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/locking/locking.c.diff?cvsroot=lvm2&r1=1.89&r2=1.90 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-vgchange-sysinit.sh.diff?cvsroot=lvm2&r1=NONE&r2=1.1 --- LVM2/WHATS_NEW 2011/01/28 16:03:38 1.1895 +++ LVM2/WHATS_NEW 2011/01/31 19:52:40 1.1896 @@ -1,5 +1,6 @@ Version 2.02.83 - =================================== + Fix udev synchronization with no-locking --sysinit (2.02.80). Updating man pages for pvcreate, pvremove, pvresize, pvscan. Avoid rebuilding of uuid validation table. Always use O_DIRECT when opening block devices to check for partitioning. --- LVM2/daemons/clvmd/clvmd-command.c 2011/01/19 23:09:31 1.49 +++ LVM2/daemons/clvmd/clvmd-command.c 2011/01/31 19:52:41 1.50 @@ -217,7 +217,6 @@ if (lkid == 0) return EINVAL; - lvm_do_fs_unlock(); /* Wait for devices */ status = sync_unlock(lockname, lkid); if (status) status = errno; --- LVM2/lib/locking/file_locking.c 2011/01/12 20:42:50 1.54 +++ LVM2/lib/locking/file_locking.c 2011/01/31 19:52:41 1.55 @@ -215,7 +215,6 @@ state = 'W'; break; case LCK_UNLOCK: - fs_unlock(); /* Wait until devices are available */ return _release_lock(file, 1); default: log_error("Unrecognised lock type: %d", flags & LCK_TYPE_MASK); --- LVM2/lib/locking/locking.c 2011/01/13 14:56:17 1.89 +++ LVM2/lib/locking/locking.c 2011/01/31 19:52:41 1.90 @@ -442,6 +442,10 @@ /* If LVM1 driver knows about the VG, it can't be accessed. */ if (!check_lvm1_vg_inactive(cmd, vol)) return_0; + + /* Before unlocking VG wait until devices are available. */ + if ((flags & LCK_TYPE_MASK) == LCK_UNLOCK) + sync_local_dev_names(cmd); break; case LCK_LV: /* All LV locks are non-blocking. */ /cvs/lvm2/LVM2/test/t-vgchange-sysinit.sh,v --> standard output revision 1.1 --- LVM2/test/t-vgchange-sysinit.sh +++ - 2011-01-31 19:52:42.890998000 +0000 @@ -0,0 +1,50 @@ +#!/bin/bash +# Copyright (C) 2011 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing to use, +# modify, copy, or redistribute it subject to the terms and conditions +# of the GNU General Public License v.2. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +. lib/test + +which mkfs.ext3 || exit 200 + +aux prepare_pvs 2 8 + +var_lock="$DM_DEV_DIR/$vg1/$lv1" +# keep in sync with aux configured lockingdir +mount_dir="$TESTDIR/var/lock/lvm" + +cleanup_mounted_and_teardown() +{ + umount $mount_dir || true + aux teardown +} + +vgcreate -c n $vg1 $dev1 +vgcreate -c n $vg2 $dev2 + +lvcreate -l 1 -n $lv2 $vg2 +vgchange -an $vg2 + +lvcreate -n $lv1 -l 100%FREE $vg1 +mkfs.ext3 -b4096 -j $var_lock + +trap 'cleanup_mounted_and_teardown' EXIT +mount -n -r $var_lock $mount_dir + +# locking must fail on read-only filesystem +not vgchange -ay $vg2 + +# no-locking with --sysinit +vgchange --sysinit -ay $vg2 +test -b "$DM_DEV_DIR/$vg2/$lv2" + +vgchange --sysinit -an $vg2 +test ! -b "$DM_DEV_DIR/$vg2/$lv2" + +vgchange --ignorelockingfailure -ay $vg2 From zkabelac@sourceware.org Mon Jan 31 22:05:00 2011 From: zkabelac@sourceware.org (zkabelac@sourceware.org) Date: Mon, 31 Jan 2011 22:05:00 -0000 Subject: LVM2/test t-fsadm.sh t-vgchange-sysinit.sh lib ... Message-ID: <20110131220531.26848.qmail@sourceware.org> CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-01-31 22:05:30 Modified files: test : t-fsadm.sh t-vgchange-sysinit.sh test/lib : utils.sh Log message: Skip sysinit test for cluster Add #bin/bash to utils.sh and update fsadm test to current version of aux script Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-fsadm.sh.diff?cvsroot=lvm2&r1=1.5&r2=1.6 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-vgchange-sysinit.sh.diff?cvsroot=lvm2&r1=1.1&r2=1.2 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/lib/utils.sh.diff?cvsroot=lvm2&r1=1.3&r2=1.4 --- LVM2/test/t-fsadm.sh 2011/01/05 00:16:20 1.5 +++ LVM2/test/t-fsadm.sh 2011/01/31 22:05:30 1.6 @@ -38,7 +38,7 @@ cleanup_mounted_and_teardown() { umount $mount_dir || true - teardown + aux teardown } fscheck_ext3() @@ -68,7 +68,7 @@ # Test for block sizes != 1024 (rhbz #480022) lvcreate -n $lv1 -L20M $vg -trap 'aux cleanup_mounted_and_teardown' EXIT +trap 'cleanup_mounted_and_teardown' EXIT if check_missing ext3; then mkfs.ext3 -b4096 -j $dev_vg_lv --- LVM2/test/t-vgchange-sysinit.sh 2011/01/31 19:52:41 1.1 +++ LVM2/test/t-vgchange-sysinit.sh 2011/01/31 22:05:30 1.2 @@ -14,6 +14,7 @@ which mkfs.ext3 || exit 200 aux prepare_pvs 2 8 +test -e LOCAL_CLVMD && exit 200 var_lock="$DM_DEV_DIR/$vg1/$lv1" # keep in sync with aux configured lockingdir --- LVM2/test/lib/utils.sh 2011/01/07 15:04:52 1.3 +++ LVM2/test/lib/utils.sh 2011/01/31 22:05:30 1.4 @@ -1,3 +1,4 @@ +#!/bin/bash # Copyright (C) 2011 Red Hat, Inc. All rights reserved. # # This copyrighted material is made available to anyone wishing to use,