Merge ubuntu/+source/openipmi:paelzer-lp-issue-workaround-temp-namespace/2.0.27-and-init-for-focal into ubuntu/+source/openipmi:ubuntu/focal-devel

Proposed by Christian Ehrhardt 
Status: Merged
Merge reported by: Christian Ehrhardt 
Merged at revision: 24cbf6954e897b0db3436eb876dcbb39b0556ab3
Proposed branch: ubuntu/+source/openipmi:paelzer-lp-issue-workaround-temp-namespace/2.0.27-and-init-for-focal
Merge into: ubuntu/+source/openipmi:ubuntu/focal-devel
Diff against target: 35577 lines (+7791/-2554)
110 files modified
Makefile.am (+4/-4)
Makefile.in (+29/-21)
OpenIPMI.spec (+2/-2)
README (+0/-4)
aclocal.m4 (+27/-23)
ar-lib (+1/-1)
cmdlang/Makefile.am (+2/-2)
cmdlang/Makefile.in (+24/-17)
cmdlang/cmd_lanparm.c (+4/-2)
cmdlang/cmd_mc.c (+4/-2)
cmdlang/cmd_pef.c (+4/-2)
cmdlang/cmd_solparm.c (+4/-2)
cmdlang/ipmish.c (+3/-1)
config.h.in (+0/-186)
configure (+573/-1403)
configure.ac (+64/-147)
debian/changelog (+11/-0)
debian/control (+1/-1)
debian/openipmi.init (+15/-5)
debian/patches/sample-fix-readline-include-in-ipmi_serial_bmc_emu.c.patch (+36/-0)
debian/patches/series (+1/-0)
debian/rules (+2/-1)
dev/null (+0/-89)
doc/Makefile.in (+21/-13)
glib/Makefile.in (+21/-13)
include/Makefile.in (+21/-13)
include/OpenIPMI/Makefile.in (+21/-13)
include/OpenIPMI/internal/Makefile.in (+21/-13)
include/OpenIPMI/ipmi_conn.h (+7/-0)
include/OpenIPMI/ipmi_sol.h (+17/-7)
include/OpenIPMI/ipmiif.h (+1/-1)
include/OpenIPMI/os_handler.h (+6/-6)
include/OpenIPMI/selector.h (+22/-0)
lanserv/Makefile.in (+21/-13)
lanserv/OpenIPMI/Makefile.in (+21/-13)
lanserv/OpenIPMI/msg.h (+1/-1)
lanserv/bmc_storage.c (+6/-2)
lanserv/config.c (+2/-0)
lanserv/emu_cmd.c (+1/-1)
lanserv/ipmi_sim.c (+12/-0)
lanserv/lan.conf (+1/-3)
lanserv/lanserv_ipmi.c (+1/-0)
lanserv/marvell-bmc/Makefile.in (+21/-13)
lanserv/persist.c (+3/-0)
lanserv/sdrcomp/Makefile.in (+21/-13)
lanserv/serv.c (+4/-0)
lanserv/sol.c (+14/-7)
lib/Makefile.in (+21/-13)
lib/entity.c (+11/-11)
lib/ipmi.c (+2/-0)
lib/ipmi_lan.c (+23/-10)
lib/ipmi_smi.c (+12/-2)
lib/ipmi_sol.c (+54/-23)
lib/mc.c (+5/-3)
lib/normal_fru.c (+2/-2)
ltmain.sh (+2/-2)
m4/ax_compare_version.m4 (+177/-0)
m4/ax_pkg_swig.m4 (+135/-0)
m4/ax_prog_python_version.m4 (+66/-0)
m4/ax_python_devel.m4 (+327/-0)
m4/libtool.m4 (+0/-1)
man/Makefile.in (+21/-13)
sample/Makefile.am (+1/-2)
sample/Makefile.in (+24/-18)
sample/eventd.c (+1/-0)
sample/example_oem.c (+8/-9)
sample/ipmicmd.c (+2/-2)
swig/Makefile.in (+21/-13)
swig/OpenIPMI.i (+1/-1)
swig/perl/Makefile.am (+3/-1)
swig/perl/Makefile.in (+24/-14)
swig/perl/test_chan.p (+600/-0)
swig/perl/test_fru.p (+1151/-0)
swig/perl/test_lanparm.p (+864/-0)
swig/perl/test_pef.p (+1469/-0)
swig/perl/test_pet.p (+1170/-0)
swig/python/Makefile.am (+10/-15)
swig/python/Makefile.in (+34/-32)
swig/python/openipmigui.py (+1/-1)
swig/python/openipmigui/Makefile.am (+7/-27)
swig/python/openipmigui/Makefile.in (+27/-41)
swig/python/openipmigui/_conn.py (+2/-2)
swig/python/openipmigui/_control.py (+3/-3)
swig/python/openipmigui/_domain.py (+9/-9)
swig/python/openipmigui/_entity.py (+6/-6)
swig/python/openipmigui/_fru.py (+4/-4)
swig/python/openipmigui/_mc.py (+6/-6)
swig/python/openipmigui/_mc_chan.py (+6/-6)
swig/python/openipmigui/_mc_lanparm.py (+5/-5)
swig/python/openipmigui/_mc_pefparm.py (+5/-5)
swig/python/openipmigui/_mc_solparm.py (+5/-5)
swig/python/openipmigui/_mc_user.py (+5/-5)
swig/python/openipmigui/_saveprefs.py (+1/-1)
swig/python/openipmigui/_sel.py (+3/-3)
swig/python/openipmigui/_sensor.py (+3/-3)
swig/python/openipmigui/gui.py (+8/-8)
swig/python/openipmigui/gui_SoL.py (+3/-3)
swig/python/openipmigui/gui_cmdwin.py (+2/-2)
swig/python/openipmigui/gui_domainDialog.py (+2/-2)
swig/python/openipmigui/gui_list.py (+2/-2)
swig/python/openipmigui/gui_setdialog.py (+1/-1)
swig/python/openipmigui/gui_term.py (+1/-1)
swig/python/openipmigui/gui_treelist.py (+2/-2)
tcl/Makefile.am (+3/-3)
tcl/Makefile.in (+24/-16)
ui/Makefile.in (+21/-13)
ui/ui.c (+4/-2)
unix/Makefile.in (+21/-13)
unix/selector.c (+239/-94)
utils/Makefile.in (+21/-13)
Reviewer Review Type Date Requested Status
Lucas Kanashiro (community) Approve
Canonical Server packageset reviewers Pending
Review via email: mp+376170@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

This has a new upstream for a year now.
Furthermore I found an open bug that is valid.

Fixed both and ready for upload going ahead of Debian for now.
PPA: https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/3848

It is in bileto, but has no reasonable tests that are worth to link here.

P.S. Debian has no git to MR somewhere, but I'm planning to submit a debdiff to a new bug once we are ok with this.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Note: this is a special case, due to an issue in the LP-git backend we can no more push to repositories that are based on other. The only way to get this reviewable was to push to usd-import-team, but for clear separation under a very obvious different namespace.

TODO: This branch will be dropped even on the remote after the tag was pushed

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

+1 on those changes.

I also tried to reproduce LP #1844448 in a LXD container and got exactly the expected result described here: https://bugs.launchpad.net/ubuntu/+source/openipmi/+bug/1844448/comments/5

Just a small nitpick since we are going ahead of Debian here. After running licensecheck against the source code I found some files not covered by the current debian/copyright file:

./m4/ax_pkg_swig.m4: GPL (v2 or later)
  [Copyright: 2011 Murray Cumming <email address hidden> / 2008 Sebastian Huber <email address hidden> / 2008 Rafael Laboissiere <email address hidden> / 2008 Andrew Collier / 2008 Alan W. Irwin]

./m4/ax_prog_python_version.m4: FSF All Permissive
  [Copyright: 2009 Francesco Salvestrini <email address hidden>]

./m4/ax_python_devel.m4: GPL (v3 or later)
  [Copyright: 2013 Daniel Mullner <email address hidden> / 2009 Sebastian Huber <email address hidden> / 2009 Rafael Laboissiere <email address hidden> / 2009 Matteo Settenvini <email address hidden> / 2009 Horst Knorr <email address hidden> / 2009 Andrew Collier / 2009 Alan W. Irwin]

./sample/solterm.c: BSD (unspecified) LGPL (v2 or later)
  [Copyright: 2005 Cyclades Australia Pty. Ltd.]

Most of those files were added to support python build by default apparently.

review: Approve
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Thanks for the review Lucas, uploading now

To ssh://git.launchpad.net/~usd-import-team/ubuntu/+source/openipmi
 * [new tag] upload/2.0.27-0ubuntu1 -> upload/2.0.27-0ubuntu1

Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading openipmi_2.0.27-0ubuntu1.dsc: done.
  Uploading openipmi_2.0.27.orig.tar.gz: done.
  Uploading openipmi_2.0.27-0ubuntu1.debian.tar.xz: done.
  Uploading openipmi_2.0.27-0ubuntu1_source.buildinfo: done.
  Uploading openipmi_2.0.27-0ubuntu1_source.changes: done.
Successfully uploaded packages.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

To ssh://git.launchpad.net/~usd-import-team/ubuntu/+source/openipmi
 - [deleted] paelzer-lp-issue-workaround-temp-namespace/2.0.27-and-init-for-focal

Cleanup done

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Submitted the new Delta to Debian, but as there is no git that has just a bug report with a link to my branch (that I cleaned up to apply on Debian)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/Makefile.am b/Makefile.am
2index b1aacdf..cd597d5 100644
3--- a/Makefile.am
4+++ b/Makefile.am
5@@ -1,10 +1,10 @@
6 RPM = rpmbuild
7 RPMFLAGS = -ta
8
9-SUBDIRS = include utils lib unix $(GLIB_DIR) $(TCL_DIR) libedit cmdlang \
10+SUBDIRS = include utils lib unix $(GLIB_DIR) $(TCL_DIR) cmdlang \
11 ui lanserv sample doc man $(SWIG_DIR)
12
13-DIST_SUBDIRS = include utils lib unix glib tcl libedit cmdlang \
14+DIST_SUBDIRS = include utils lib unix glib tcl cmdlang \
15 ui lanserv sample doc man swig
16
17 EXTRA_DIST = FAQ TODO README.Force README.MotorolaMXP OpenIPMI.spec.in \
18@@ -29,10 +29,10 @@ uninstall-local:
19 rpm: dist
20 $(RPM) $(RPMFLAGS) $(distdir).tar.gz < /dev/null
21
22-PYPATH=$(top_builddir)/swig/python:$(top_builddir)/swig/python/.libs:$(srcdir)/openipmigui
23+PYPATH=$(top_builddir)/swig/python:$(top_builddir)/swig/python/.libs
24
25 rungui:
26- LD_LIBRARY_PATH=$(top_builddir)/glib/.libs LD_PRELOAD=$(OPENIPMI_SWIG_SO):$(top_builddir)/swig/python/.libs/_OpenIPMI.so PYTHONPATH=$(PYPATH) $(pythonprog) $(top_srcdir)/swig/python/openipmigui.py
27+ LD_LIBRARY_PATH=$(top_builddir)/glib/.libs LD_PRELOAD=$(OPENIPMI_SWIG_SO):$(top_builddir)/swig/python/.libs/_OpenIPMI.so PYTHONPATH=$(PYPATH) $(PYTHON) $(top_srcdir)/swig/python/openipmigui.py
28
29 DISTCLEANFILES=OpenIPMI.spec OpenIPMIcmdlang.pc OpenIPMI.pc OpenIPMItcl.pc \
30 OpenIPMIglib12.pc OpenIPMIposix.pc OpenIPMIui.pc OpenIPMIglib.pc \
31diff --git a/Makefile.in b/Makefile.in
32index aed3ad5..85796b8 100644
33--- a/Makefile.in
34+++ b/Makefile.in
35@@ -1,7 +1,7 @@
36-# Makefile.in generated by automake 1.15 from Makefile.am.
37+# Makefile.in generated by automake 1.15.1 from Makefile.am.
38 # @configure_input@
39
40-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
41+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
42
43 # This Makefile.in is free software; the Free Software Foundation
44 # gives unlimited permission to copy and/or distribute it,
45@@ -90,11 +90,16 @@ host_triplet = @host@
46 target_triplet = @target@
47 subdir = .
48 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
49-am__aclocal_m4_deps = $(top_srcdir)/m4/ax_config_feature.m4 \
50- $(top_srcdir)/m4/ax_have_epoll.m4 $(top_srcdir)/m4/libtool.m4 \
51- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
52- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
53- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
54+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \
55+ $(top_srcdir)/m4/ax_config_feature.m4 \
56+ $(top_srcdir)/m4/ax_have_epoll.m4 \
57+ $(top_srcdir)/m4/ax_pkg_swig.m4 \
58+ $(top_srcdir)/m4/ax_prog_python_version.m4 \
59+ $(top_srcdir)/m4/ax_python_devel.m4 \
60+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
61+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
62+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
63+ $(top_srcdir)/configure.ac
64 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
65 $(ACLOCAL_M4)
66 DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
67@@ -214,7 +219,6 @@ am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
68 | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
69 distcleancheck_listfiles = find . -type f -print
70 ACLOCAL = @ACLOCAL@
71-ALLOCA = @ALLOCA@
72 AMTAR = @AMTAR@
73 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
74 AR = @AR@
75@@ -250,8 +254,6 @@ GLIB_DIR = @GLIB_DIR@
76 GLIB_LIB = @GLIB_LIB@
77 GLIB_LIBS = @GLIB_LIBS@
78 GLIB_PKGCONF = @GLIB_PKGCONF@
79-GLIB_SINGLE_LIB = @GLIB_SINGLE_LIB@
80-GLIB_SINGLE_SO = @GLIB_SINGLE_SO@
81 GLIB_SO = @GLIB_SO@
82 GLIB_TARGET = @GLIB_TARGET@
83 GLIB_VERSION = @GLIB_VERSION@
84@@ -304,14 +306,21 @@ PERL_INSTALL_DIR = @PERL_INSTALL_DIR@
85 PERL_POSIX_LIB = @PERL_POSIX_LIB@
86 PERL_POSIX_SO = @PERL_POSIX_SO@
87 POPTLIBS = @POPTLIBS@
88-PYTHON_CFLAGS = @PYTHON_CFLAGS@
89+PYTHON = @PYTHON@
90+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
91 PYTHON_DIR = @PYTHON_DIR@
92+PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@
93+PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@
94 PYTHON_GUI_DIR = @PYTHON_GUI_DIR@
95 PYTHON_HAS_POSIX_THREADS = @PYTHON_HAS_POSIX_THREADS@
96 PYTHON_INSTALL_DIR = @PYTHON_INSTALL_DIR@
97 PYTHON_INSTALL_LIB_DIR = @PYTHON_INSTALL_LIB_DIR@
98+PYTHON_LIBS = @PYTHON_LIBS@
99 PYTHON_POSIX_LIB = @PYTHON_POSIX_LIB@
100 PYTHON_POSIX_SO = @PYTHON_POSIX_SO@
101+PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
102+PYTHON_SWIG_FLAGS = @PYTHON_SWIG_FLAGS@
103+PYTHON_VERSION = @PYTHON_VERSION@
104 RANLIB = @RANLIB@
105 RT_LIB = @RT_LIB@
106 SED = @SED@
107@@ -322,6 +331,7 @@ SOCKETLIB = @SOCKETLIB@
108 STRIP = @STRIP@
109 SWIG = @SWIG@
110 SWIG_DIR = @SWIG_DIR@
111+SWIG_LIB = @SWIG_LIB@
112 TCL_CFLAGS = @TCL_CFLAGS@
113 TCL_DIR = @TCL_DIR@
114 TCL_LIB = @TCL_LIB@
115@@ -378,12 +388,10 @@ pkgprog = @pkgprog@
116 prefix = @prefix@
117 program_transform_name = @program_transform_name@
118 psdir = @psdir@
119-pythonprog = @pythonprog@
120 runstatedir = @runstatedir@
121 sbindir = @sbindir@
122 sharedstatedir = @sharedstatedir@
123 srcdir = @srcdir@
124-swigprog = @swigprog@
125 sysconfdir = @sysconfdir@
126 target = @target@
127 target_alias = @target_alias@
128@@ -395,10 +403,10 @@ top_builddir = @top_builddir@
129 top_srcdir = @top_srcdir@
130 RPM = rpmbuild
131 RPMFLAGS = -ta
132-SUBDIRS = include utils lib unix $(GLIB_DIR) $(TCL_DIR) libedit cmdlang \
133+SUBDIRS = include utils lib unix $(GLIB_DIR) $(TCL_DIR) cmdlang \
134 ui lanserv sample doc man $(SWIG_DIR)
135
136-DIST_SUBDIRS = include utils lib unix glib tcl libedit cmdlang \
137+DIST_SUBDIRS = include utils lib unix glib tcl cmdlang \
138 ui lanserv sample doc man swig
139
140 EXTRA_DIST = FAQ TODO README.Force README.MotorolaMXP OpenIPMI.spec.in \
141@@ -410,7 +418,7 @@ PKGCONFIGS = OpenIPMIutils.pc OpenIPMI.pc OpenIPMIui.pc OpenIPMIposix.pc \
142 $(GLIB12_PKGCONF) $(TCL_PKGCONF)
143
144 ACLOCAL_AMFLAGS = -I m4
145-PYPATH = $(top_builddir)/swig/python:$(top_builddir)/swig/python/.libs:$(srcdir)/openipmigui
146+PYPATH = $(top_builddir)/swig/python:$(top_builddir)/swig/python/.libs
147 DISTCLEANFILES = OpenIPMI.spec OpenIPMIcmdlang.pc OpenIPMI.pc OpenIPMItcl.pc \
148 OpenIPMIglib12.pc OpenIPMIposix.pc OpenIPMIui.pc OpenIPMIglib.pc \
149 OpenIPMIpthread.pc OpenIPMIutils.pc
150@@ -666,7 +674,7 @@ distdir: $(DISTFILES)
151 ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
152 || chmod -R a+r "$(distdir)"
153 dist-gzip: distdir
154- tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
155+ tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
156 $(am__post_remove_distdir)
157
158 dist-bzip2: distdir
159@@ -692,7 +700,7 @@ dist-shar: distdir
160 @echo WARNING: "Support for shar distribution archives is" \
161 "deprecated." >&2
162 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
163- shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
164+ shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
165 $(am__post_remove_distdir)
166
167 dist-zip: distdir
168@@ -710,7 +718,7 @@ dist dist-all:
169 distcheck: dist
170 case '$(DIST_ARCHIVES)' in \
171 *.tar.gz*) \
172- GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
173+ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
174 *.tar.bz2*) \
175 bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
176 *.tar.lz*) \
177@@ -720,7 +728,7 @@ distcheck: dist
178 *.tar.Z*) \
179 uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
180 *.shar.gz*) \
181- GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
182+ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
183 *.zip*) \
184 unzip $(distdir).zip ;;\
185 esac
186@@ -930,7 +938,7 @@ rpm: dist
187 $(RPM) $(RPMFLAGS) $(distdir).tar.gz < /dev/null
188
189 rungui:
190- LD_LIBRARY_PATH=$(top_builddir)/glib/.libs LD_PRELOAD=$(OPENIPMI_SWIG_SO):$(top_builddir)/swig/python/.libs/_OpenIPMI.so PYTHONPATH=$(PYPATH) $(pythonprog) $(top_srcdir)/swig/python/openipmigui.py
191+ LD_LIBRARY_PATH=$(top_builddir)/glib/.libs LD_PRELOAD=$(OPENIPMI_SWIG_SO):$(top_builddir)/swig/python/.libs/_OpenIPMI.so PYTHONPATH=$(PYPATH) $(PYTHON) $(top_srcdir)/swig/python/openipmigui.py
192
193 # Tell versions [3.59,3.63) of GNU make to not export all variables.
194 # Otherwise a system limit (for SysV at least) may be exceeded.
195diff --git a/OpenIPMI.spec b/OpenIPMI.spec
196index 9534958..6349ee3 100644
197--- a/OpenIPMI.spec
198+++ b/OpenIPMI.spec
199@@ -3,14 +3,14 @@
200
201 Name: OpenIPMI
202 Summary: %{name} - Library interface to IPMI
203-Version: 2.0.25
204+Version: 2.0.27
205 Release: 2
206 License: LGPL
207 URL: http://openipmi.sourceforge.net
208 Group: Utilities
209 Vendor: OpenIPMI Project
210 Packager: Tariq Shureih <tariq.shureih@intel.com>
211-Source: %{name}-2.0.25.tar.gz
212+Source: %{name}-2.0.27.tar.gz
213 Buildroot: /var/tmp/%{name}-root
214 BuildRequires: pkgconfig, perl >= 5, swig >= 1.3
215 Summary: IPMI Library
216diff --git a/README b/README
217index 7e485a5..3c1d5e2 100644
218--- a/README
219+++ b/README
220@@ -322,10 +322,6 @@ The source tree here consists of the following directories:
221 +---lib - The man OpenIPMI code. This is where all the logic for the
222 | handling of IPMI messages is.
223 |
224-+---libedit - A readline replacement that provides cmdlang/openipmish
225-| | with command line editing.
226-| \---editline - Include files for libedit
227-|
228 +---man - The man pages for the
229 |
230 +---sample - Sample code and utilities that use the OpenIPMI library.
231diff --git a/aclocal.m4 b/aclocal.m4
232index b302b55..621a9eb 100644
233--- a/aclocal.m4
234+++ b/aclocal.m4
235@@ -1,6 +1,6 @@
236-# generated automatically by aclocal 1.15 -*- Autoconf -*-
237+# generated automatically by aclocal 1.15.1 -*- Autoconf -*-
238
239-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
240+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
241
242 # This file is free software; the Free Software Foundation
243 # gives unlimited permission to copy and/or distribute it,
244@@ -20,7 +20,7 @@ You have another version of autoconf. It may work, but is not guaranteed to.
245 If you have problems, you may need to regenerate the build system entirely.
246 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
247
248-# Copyright (C) 2002-2014 Free Software Foundation, Inc.
249+# Copyright (C) 2002-2017 Free Software Foundation, Inc.
250 #
251 # This file is free software; the Free Software Foundation
252 # gives unlimited permission to copy and/or distribute it,
253@@ -35,7 +35,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
254 [am__api_version='1.15'
255 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
256 dnl require some minimum version. Point them to the right macro.
257-m4_if([$1], [1.15], [],
258+m4_if([$1], [1.15.1], [],
259 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
260 ])
261
262@@ -51,12 +51,12 @@ m4_define([_AM_AUTOCONF_VERSION], [])
263 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
264 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
265 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
266-[AM_AUTOMAKE_VERSION([1.15])dnl
267+[AM_AUTOMAKE_VERSION([1.15.1])dnl
268 m4_ifndef([AC_AUTOCONF_VERSION],
269 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
270 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
271
272-# Copyright (C) 2011-2014 Free Software Foundation, Inc.
273+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
274 #
275 # This file is free software; the Free Software Foundation
276 # gives unlimited permission to copy and/or distribute it,
277@@ -118,7 +118,7 @@ AC_SUBST([AR])dnl
278
279 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
280
281-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
282+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
283 #
284 # This file is free software; the Free Software Foundation
285 # gives unlimited permission to copy and/or distribute it,
286@@ -170,7 +170,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
287
288 # AM_CONDITIONAL -*- Autoconf -*-
289
290-# Copyright (C) 1997-2014 Free Software Foundation, Inc.
291+# Copyright (C) 1997-2017 Free Software Foundation, Inc.
292 #
293 # This file is free software; the Free Software Foundation
294 # gives unlimited permission to copy and/or distribute it,
295@@ -201,7 +201,7 @@ AC_CONFIG_COMMANDS_PRE(
296 Usually this means the macro was only invoked conditionally.]])
297 fi])])
298
299-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
300+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
301 #
302 # This file is free software; the Free Software Foundation
303 # gives unlimited permission to copy and/or distribute it,
304@@ -392,7 +392,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
305
306 # Generate code to set up dependency tracking. -*- Autoconf -*-
307
308-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
309+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
310 #
311 # This file is free software; the Free Software Foundation
312 # gives unlimited permission to copy and/or distribute it,
313@@ -468,7 +468,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
314
315 # Do all the work for Automake. -*- Autoconf -*-
316
317-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
318+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
319 #
320 # This file is free software; the Free Software Foundation
321 # gives unlimited permission to copy and/or distribute it,
322@@ -665,7 +665,7 @@ for _am_header in $config_headers :; do
323 done
324 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
325
326-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
327+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
328 #
329 # This file is free software; the Free Software Foundation
330 # gives unlimited permission to copy and/or distribute it,
331@@ -686,7 +686,7 @@ if test x"${install_sh+set}" != xset; then
332 fi
333 AC_SUBST([install_sh])])
334
335-# Copyright (C) 2003-2014 Free Software Foundation, Inc.
336+# Copyright (C) 2003-2017 Free Software Foundation, Inc.
337 #
338 # This file is free software; the Free Software Foundation
339 # gives unlimited permission to copy and/or distribute it,
340@@ -707,7 +707,7 @@ AC_SUBST([am__leading_dot])])
341
342 # Check to see how 'make' treats includes. -*- Autoconf -*-
343
344-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
345+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
346 #
347 # This file is free software; the Free Software Foundation
348 # gives unlimited permission to copy and/or distribute it,
349@@ -757,7 +757,7 @@ rm -f confinc confmf
350
351 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
352
353-# Copyright (C) 1997-2014 Free Software Foundation, Inc.
354+# Copyright (C) 1997-2017 Free Software Foundation, Inc.
355 #
356 # This file is free software; the Free Software Foundation
357 # gives unlimited permission to copy and/or distribute it,
358@@ -796,7 +796,7 @@ fi
359
360 # Helper functions for option handling. -*- Autoconf -*-
361
362-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
363+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
364 #
365 # This file is free software; the Free Software Foundation
366 # gives unlimited permission to copy and/or distribute it,
367@@ -825,7 +825,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
368 AC_DEFUN([_AM_IF_OPTION],
369 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
370
371-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
372+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
373 #
374 # This file is free software; the Free Software Foundation
375 # gives unlimited permission to copy and/or distribute it,
376@@ -872,7 +872,7 @@ AC_LANG_POP([C])])
377 # For backward compatibility.
378 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
379
380-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
381+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
382 #
383 # This file is free software; the Free Software Foundation
384 # gives unlimited permission to copy and/or distribute it,
385@@ -891,7 +891,7 @@ AC_DEFUN([AM_RUN_LOG],
386
387 # Check to make sure that the build environment is sane. -*- Autoconf -*-
388
389-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
390+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
391 #
392 # This file is free software; the Free Software Foundation
393 # gives unlimited permission to copy and/or distribute it,
394@@ -972,7 +972,7 @@ AC_CONFIG_COMMANDS_PRE(
395 rm -f conftest.file
396 ])
397
398-# Copyright (C) 2009-2014 Free Software Foundation, Inc.
399+# Copyright (C) 2009-2017 Free Software Foundation, Inc.
400 #
401 # This file is free software; the Free Software Foundation
402 # gives unlimited permission to copy and/or distribute it,
403@@ -1032,7 +1032,7 @@ AC_SUBST([AM_BACKSLASH])dnl
404 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
405 ])
406
407-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
408+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
409 #
410 # This file is free software; the Free Software Foundation
411 # gives unlimited permission to copy and/or distribute it,
412@@ -1060,7 +1060,7 @@ fi
413 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
414 AC_SUBST([INSTALL_STRIP_PROGRAM])])
415
416-# Copyright (C) 2006-2014 Free Software Foundation, Inc.
417+# Copyright (C) 2006-2017 Free Software Foundation, Inc.
418 #
419 # This file is free software; the Free Software Foundation
420 # gives unlimited permission to copy and/or distribute it,
421@@ -1079,7 +1079,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
422
423 # Check how to create a tarball. -*- Autoconf -*-
424
425-# Copyright (C) 2004-2014 Free Software Foundation, Inc.
426+# Copyright (C) 2004-2017 Free Software Foundation, Inc.
427 #
428 # This file is free software; the Free Software Foundation
429 # gives unlimited permission to copy and/or distribute it,
430@@ -1210,8 +1210,12 @@ AC_SUBST([am__tar])
431 AC_SUBST([am__untar])
432 ]) # _AM_PROG_TAR
433
434+m4_include([m4/ax_compare_version.m4])
435 m4_include([m4/ax_config_feature.m4])
436 m4_include([m4/ax_have_epoll.m4])
437+m4_include([m4/ax_pkg_swig.m4])
438+m4_include([m4/ax_prog_python_version.m4])
439+m4_include([m4/ax_python_devel.m4])
440 m4_include([m4/libtool.m4])
441 m4_include([m4/ltoptions.m4])
442 m4_include([m4/ltsugar.m4])
443diff --git a/ar-lib b/ar-lib
444index 463b9ec..05094d3 100755
445--- a/ar-lib
446+++ b/ar-lib
447@@ -4,7 +4,7 @@
448 me=ar-lib
449 scriptversion=2012-03-01.08; # UTC
450
451-# Copyright (C) 2010-2014 Free Software Foundation, Inc.
452+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
453 # Written by Peter Rosin <peda@lysator.liu.se>.
454 #
455 # This program is free software; you can redistribute it and/or modify
456diff --git a/cmdlang/Makefile.am b/cmdlang/Makefile.am
457index 264ee12..0ca3827 100644
458--- a/cmdlang/Makefile.am
459+++ b/cmdlang/Makefile.am
460@@ -4,7 +4,7 @@ LD_VERSION = 0:5:0
461
462 AM_CFLAGS = -Wall -Wsign-compare -I$(top_builddir)/include \
463 -I$(top_srcdir)/include \
464- -I$(top_srcdir)/libedit -DIPMI_CHECK_LOCKS $(GLIB_CFLAGS) \
465+ -DIPMI_CHECK_LOCKS $(GLIB_CFLAGS) \
466 $(TCL_CFLAGS)
467
468 lib_LTLIBRARIES = libOpenIPMIcmdlang.la
469@@ -25,7 +25,7 @@ openipmish_LDADD = libOpenIPMIcmdlang.la \
470 $(top_builddir)/utils/libOpenIPMIutils.la \
471 $(top_builddir)/lib/libOpenIPMI.la \
472 $(top_builddir)/unix/libOpenIPMIposix.la \
473- $(top_builddir)/libedit/libedit.a \
474+ -lreadline \
475 $(TERM_LIBS) \
476 $(SNMPLIBS) $(GLIB_LIB) $(GLIB_LIBS) \
477 $(TCL_LIB) $(TCL_LIBS) \
478diff --git a/cmdlang/Makefile.in b/cmdlang/Makefile.in
479index 56f16de..e2d70be 100644
480--- a/cmdlang/Makefile.in
481+++ b/cmdlang/Makefile.in
482@@ -1,7 +1,7 @@
483-# Makefile.in generated by automake 1.15 from Makefile.am.
484+# Makefile.in generated by automake 1.15.1 from Makefile.am.
485 # @configure_input@
486
487-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
488+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
489
490 # This Makefile.in is free software; the Free Software Foundation
491 # gives unlimited permission to copy and/or distribute it,
492@@ -93,11 +93,16 @@ target_triplet = @target@
493 bin_PROGRAMS = openipmish$(EXEEXT)
494 subdir = cmdlang
495 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
496-am__aclocal_m4_deps = $(top_srcdir)/m4/ax_config_feature.m4 \
497- $(top_srcdir)/m4/ax_have_epoll.m4 $(top_srcdir)/m4/libtool.m4 \
498- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
499- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
500- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
501+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \
502+ $(top_srcdir)/m4/ax_config_feature.m4 \
503+ $(top_srcdir)/m4/ax_have_epoll.m4 \
504+ $(top_srcdir)/m4/ax_pkg_swig.m4 \
505+ $(top_srcdir)/m4/ax_prog_python_version.m4 \
506+ $(top_srcdir)/m4/ax_python_devel.m4 \
507+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
508+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
509+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
510+ $(top_srcdir)/configure.ac
511 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
512 $(ACLOCAL_M4)
513 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
514@@ -157,8 +162,7 @@ am__DEPENDENCIES_1 =
515 openipmish_DEPENDENCIES = libOpenIPMIcmdlang.la \
516 $(top_builddir)/utils/libOpenIPMIutils.la \
517 $(top_builddir)/lib/libOpenIPMI.la \
518- $(top_builddir)/unix/libOpenIPMIposix.la \
519- $(top_builddir)/libedit/libedit.a $(am__DEPENDENCIES_1) \
520+ $(top_builddir)/unix/libOpenIPMIposix.la $(am__DEPENDENCIES_1) \
521 $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
522 $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
523 $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
524@@ -226,7 +230,6 @@ CTAGS = ctags
525 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp README
526 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
527 ACLOCAL = @ACLOCAL@
528-ALLOCA = @ALLOCA@
529 AMTAR = @AMTAR@
530 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
531 AR = @AR@
532@@ -262,8 +265,6 @@ GLIB_DIR = @GLIB_DIR@
533 GLIB_LIB = @GLIB_LIB@
534 GLIB_LIBS = @GLIB_LIBS@
535 GLIB_PKGCONF = @GLIB_PKGCONF@
536-GLIB_SINGLE_LIB = @GLIB_SINGLE_LIB@
537-GLIB_SINGLE_SO = @GLIB_SINGLE_SO@
538 GLIB_SO = @GLIB_SO@
539 GLIB_TARGET = @GLIB_TARGET@
540 GLIB_VERSION = @GLIB_VERSION@
541@@ -316,14 +317,21 @@ PERL_INSTALL_DIR = @PERL_INSTALL_DIR@
542 PERL_POSIX_LIB = @PERL_POSIX_LIB@
543 PERL_POSIX_SO = @PERL_POSIX_SO@
544 POPTLIBS = @POPTLIBS@
545-PYTHON_CFLAGS = @PYTHON_CFLAGS@
546+PYTHON = @PYTHON@
547+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
548 PYTHON_DIR = @PYTHON_DIR@
549+PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@
550+PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@
551 PYTHON_GUI_DIR = @PYTHON_GUI_DIR@
552 PYTHON_HAS_POSIX_THREADS = @PYTHON_HAS_POSIX_THREADS@
553 PYTHON_INSTALL_DIR = @PYTHON_INSTALL_DIR@
554 PYTHON_INSTALL_LIB_DIR = @PYTHON_INSTALL_LIB_DIR@
555+PYTHON_LIBS = @PYTHON_LIBS@
556 PYTHON_POSIX_LIB = @PYTHON_POSIX_LIB@
557 PYTHON_POSIX_SO = @PYTHON_POSIX_SO@
558+PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
559+PYTHON_SWIG_FLAGS = @PYTHON_SWIG_FLAGS@
560+PYTHON_VERSION = @PYTHON_VERSION@
561 RANLIB = @RANLIB@
562 RT_LIB = @RT_LIB@
563 SED = @SED@
564@@ -334,6 +342,7 @@ SOCKETLIB = @SOCKETLIB@
565 STRIP = @STRIP@
566 SWIG = @SWIG@
567 SWIG_DIR = @SWIG_DIR@
568+SWIG_LIB = @SWIG_LIB@
569 TCL_CFLAGS = @TCL_CFLAGS@
570 TCL_DIR = @TCL_DIR@
571 TCL_LIB = @TCL_LIB@
572@@ -390,12 +399,10 @@ pkgprog = @pkgprog@
573 prefix = @prefix@
574 program_transform_name = @program_transform_name@
575 psdir = @psdir@
576-pythonprog = @pythonprog@
577 runstatedir = @runstatedir@
578 sbindir = @sbindir@
579 sharedstatedir = @sharedstatedir@
580 srcdir = @srcdir@
581-swigprog = @swigprog@
582 sysconfdir = @sysconfdir@
583 target = @target@
584 target_alias = @target_alias@
585@@ -409,7 +416,7 @@ LIB_VERSION = 0.0.5
586 LD_VERSION = 0:5:0
587 AM_CFLAGS = -Wall -Wsign-compare -I$(top_builddir)/include \
588 -I$(top_srcdir)/include \
589- -I$(top_srcdir)/libedit -DIPMI_CHECK_LOCKS $(GLIB_CFLAGS) \
590+ -DIPMI_CHECK_LOCKS $(GLIB_CFLAGS) \
591 $(TCL_CFLAGS)
592
593 lib_LTLIBRARIES = libOpenIPMIcmdlang.la
594@@ -429,7 +436,7 @@ openipmish_LDADD = libOpenIPMIcmdlang.la \
595 $(top_builddir)/utils/libOpenIPMIutils.la \
596 $(top_builddir)/lib/libOpenIPMI.la \
597 $(top_builddir)/unix/libOpenIPMIposix.la \
598- $(top_builddir)/libedit/libedit.a \
599+ -lreadline \
600 $(TERM_LIBS) \
601 $(SNMPLIBS) $(GLIB_LIB) $(GLIB_LIBS) \
602 $(TCL_LIB) $(TCL_LIBS) \
603diff --git a/cmdlang/cmd_lanparm.c b/cmdlang/cmd_lanparm.c
604index d43a4e1..7afd7dd 100644
605--- a/cmdlang/cmd_lanparm.c
606+++ b/cmdlang/cmd_lanparm.c
607@@ -945,7 +945,8 @@ lanparm_config_set(ipmi_lanparm_t *lanparm, void *cb_data)
608 goto out_err;
609 }
610 info->cmd_info = cmd_info;
611- strncpy(info->name, name, sizeof(info->name));
612+ strncpy(info->name, name, sizeof(info->name) - 1);
613+ info->name[sizeof(info->name) - 1] = '\0';
614
615 ipmi_cmdlang_cmd_info_get(cmd_info);
616 rv = ipmi_lan_set_config(lanparm, lanc, lanparm_config_set_done, info);
617@@ -1028,7 +1029,8 @@ lanparm_config_unlock(ipmi_lanparm_t *lanparm, void *cb_data)
618 goto out_err;
619 }
620 info->cmd_info = cmd_info;
621- strncpy(info->name, name, sizeof(info->name));
622+ strncpy(info->name, name, sizeof(info->name) - 1);
623+ info->name[sizeof(info->name) - 1] = '\0';
624
625 ipmi_cmdlang_cmd_info_get(cmd_info);
626 rv = ipmi_lan_clear_lock(lanparm, lanc, lanparm_config_unlock_done, info);
627diff --git a/cmdlang/cmd_mc.c b/cmdlang/cmd_mc.c
628index d7a90ea..0a3f644 100644
629--- a/cmdlang/cmd_mc.c
630+++ b/cmdlang/cmd_mc.c
631@@ -1997,7 +1997,8 @@ mc_user_set(ipmi_mc_t *mc, void *cb_data)
632 cmdlang->errstr = "no name value";
633 goto out_err;
634 }
635- strncpy(info->name, argv[curr_arg], 16);
636+ strncpy(info->name, argv[curr_arg], 15);
637+ info->name[15] = '\0';
638 } else if (strcmp(argv[curr_arg], "password") == 0) {
639 info->pw_set = 1;
640 curr_arg++;
641@@ -2015,7 +2016,8 @@ mc_user_set(ipmi_mc_t *mc, void *cb_data)
642 cmdlang->errstr = "no name value";
643 goto out_err;
644 }
645- strncpy(info->pw, argv[curr_arg], 20);
646+ strncpy(info->pw, argv[curr_arg], 19);
647+ info->pw[19] = '\0';
648 } else {
649 cmdlang->err = EINVAL;
650 cmdlang->errstr = "invalid setting";
651diff --git a/cmdlang/cmd_pef.c b/cmdlang/cmd_pef.c
652index 4a09804..47ab2bd 100644
653--- a/cmdlang/cmd_pef.c
654+++ b/cmdlang/cmd_pef.c
655@@ -794,7 +794,8 @@ pef_config_set(ipmi_pef_t *pef, void *cb_data)
656 goto out_err;
657 }
658 info->cmd_info = cmd_info;
659- strncpy(info->name, name, sizeof(info->name));
660+ strncpy(info->name, name, sizeof(info->name) - 1);
661+ info->name[sizeof(info->name) - 1] = '\0';
662
663 ipmi_cmdlang_cmd_info_get(cmd_info);
664 rv = ipmi_pef_set_config(pef, lanc, pef_config_set_done, info);
665@@ -877,7 +878,8 @@ pef_config_unlock(ipmi_pef_t *pef, void *cb_data)
666 goto out_err;
667 }
668 info->cmd_info = cmd_info;
669- strncpy(info->name, name, sizeof(info->name));
670+ strncpy(info->name, name, sizeof(info->name) - 1);
671+ info->name[sizeof(info->name) - 1] = '\0';
672
673 ipmi_cmdlang_cmd_info_get(cmd_info);
674 rv = ipmi_pef_clear_lock(pef, lanc, pef_config_unlock_done, info);
675diff --git a/cmdlang/cmd_solparm.c b/cmdlang/cmd_solparm.c
676index aa5c1fc..df32c3f 100644
677--- a/cmdlang/cmd_solparm.c
678+++ b/cmdlang/cmd_solparm.c
679@@ -539,7 +539,8 @@ solparm_config_set(ipmi_solparm_t *solparm, void *cb_data)
680 goto out_err;
681 }
682 info->cmd_info = cmd_info;
683- strncpy(info->name, name, sizeof(info->name));
684+ strncpy(info->name, name, sizeof(info->name) - 1);
685+ info->name[sizeof(info->name) - 1] = '\0';
686
687 ipmi_cmdlang_cmd_info_get(cmd_info);
688 rv = ipmi_sol_set_config(solparm, solc, solparm_config_set_done, info);
689@@ -622,7 +623,8 @@ solparm_config_unlock(ipmi_solparm_t *solparm, void *cb_data)
690 goto out_err;
691 }
692 info->cmd_info = cmd_info;
693- strncpy(info->name, name, sizeof(info->name));
694+ strncpy(info->name, name, sizeof(info->name) - 1);
695+ info->name[sizeof(info->name) - 1] = '\0';
696
697 ipmi_cmdlang_cmd_info_get(cmd_info);
698 rv = ipmi_sol_clear_lock(solparm, solc, solparm_config_unlock_done, info);
699diff --git a/cmdlang/ipmish.c b/cmdlang/ipmish.c
700index 906cf19..139da67 100644
701--- a/cmdlang/ipmish.c
702+++ b/cmdlang/ipmish.c
703@@ -50,7 +50,7 @@
704 #include <OpenIPMI/ipmi_tcl.h>
705 #include <OpenIPMI/ipmi_cmdlang.h>
706 #include <OpenIPMI/ipmi_debug.h>
707-#include <editline/readline.h>
708+#include <readline/readline.h>
709
710 #ifdef HAVE_GLIB
711 #include <glib.h>
712@@ -1049,6 +1049,8 @@ main(int argc, char *argv[])
713 }
714 }
715
716+ rl_initialize();
717+
718 if (use_debug_os) {
719 os_hnd = &ipmi_debug_os_handlers;
720 rv = sel_alloc_selector_nothread(&debug_sel);
721diff --git a/config.h.in b/config.h.in
722index 3317094..a079f8b 100644
723--- a/config.h.in
724+++ b/config.h.in
725@@ -1,107 +1,38 @@
726 /* config.h.in. Generated from configure.ac by autoheader. */
727
728-/* Define to 1 if the `closedir' function returns void instead of `int'. */
729-#undef CLOSEDIR_VOID
730-
731-/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
732- systems. This function is required for `alloca.c' support on those systems.
733- */
734-#undef CRAY_STACKSEG_END
735-
736-/* Define to 1 if using `alloca.c'. */
737-#undef C_ALLOCA
738-
739-/* Define to 1 if you have `alloca', as a function or macro. */
740-#undef HAVE_ALLOCA
741-
742-/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
743- */
744-#undef HAVE_ALLOCA_H
745-
746 /* Alternate UCD SMP directory */
747 #undef HAVE_ALT_UCDSNMP_DIR
748
749 /* Define to 1 if you have the `cfmakeraw' function. */
750 #undef HAVE_CFMAKERAW
751
752-/* Define to 1 if you have the <curses.h> header file. */
753-#undef HAVE_CURSES_H
754-
755 /* Running on CYGWIN */
756 #undef HAVE_CYGWIN_TARGET
757
758-/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
759- */
760-#undef HAVE_DIRENT_H
761-
762 /* Define to 1 if you have the <dlfcn.h> header file. */
763 #undef HAVE_DLFCN_H
764
765-/* Define to 1 if you have the `endpwent' function. */
766-#undef HAVE_ENDPWENT
767-
768 /* This platform supports epoll(7) with epoll_pwait(2). */
769 #undef HAVE_EPOLL_PWAIT
770
771 /* Define to 1 if you have the <execinfo.h> header file. */
772 #undef HAVE_EXECINFO_H
773
774-/* Define to 1 if you have the <fcntl.h> header file. */
775-#undef HAVE_FCNTL_H
776-
777-/* Define to 1 if you have the `fgetln' function. */
778-#undef HAVE_FGETLN
779-
780-/* Define to 1 if you have the `fork' function. */
781-#undef HAVE_FORK
782-
783 /* Have GDBM libraries */
784 #undef HAVE_GDBM
785
786 /* Define to 1 if you have the `getaddrinfo' function. */
787 #undef HAVE_GETADDRINFO
788
789-/* Define to 1 if you have getpwnam_r and getpwuid_r that are draft POSIX.1
790- versions. */
791-#undef HAVE_GETPW_R_DRAFT
792-
793-/* Define to 1 if you have getpwnam_r and getpwuid_r that are POSIX.1
794- compatible. */
795-#undef HAVE_GETPW_R_POSIX
796-
797 /* Have GLIB libraries */
798 #undef HAVE_GLIB
799
800 /* Define to 1 if you have the <inttypes.h> header file. */
801 #undef HAVE_INTTYPES_H
802
803-/* Define to 1 if you have the `isascii' function. */
804-#undef HAVE_ISASCII
805-
806-/* Define to 1 if you have the `issetugid' function. */
807-#undef HAVE_ISSETUGID
808-
809-/* Define to 1 if you have the <limits.h> header file. */
810-#undef HAVE_LIMITS_H
811-
812-/* Define to 1 if you have the <malloc.h> header file. */
813-#undef HAVE_MALLOC_H
814-
815-/* Define to 1 if you have the `memchr' function. */
816-#undef HAVE_MEMCHR
817-
818 /* Define to 1 if you have the <memory.h> header file. */
819 #undef HAVE_MEMORY_H
820
821-/* Define to 1 if you have the `memset' function. */
822-#undef HAVE_MEMSET
823-
824-/* Define to 1 if you have the <ncurses.h> header file. */
825-#undef HAVE_NCURSES_H
826-
827-/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
828-#undef HAVE_NDIR_H
829-
830 /* Define to 1 if you have the <netinet/ether.h> header file. */
831 #undef HAVE_NETINET_ETHER_H
832
833@@ -120,133 +51,42 @@
834 /* Have Python installed */
835 #undef HAVE_PYTHON
836
837-/* Define to 1 if you have the `regcomp' function. */
838-#undef HAVE_REGCOMP
839-
840-/* Define to 1 if you have the `re_comp' function. */
841-#undef HAVE_RE_COMP
842-
843-/* Define to 1 if `stat' has the bug that it succeeds when given the
844- zero-length file name argument. */
845-#undef HAVE_STAT_EMPTY_STRING_BUG
846-
847 /* Define to 1 if you have the <stdint.h> header file. */
848 #undef HAVE_STDINT_H
849
850 /* Define to 1 if you have the <stdlib.h> header file. */
851 #undef HAVE_STDLIB_H
852
853-/* Define to 1 if you have the `strcasecmp' function. */
854-#undef HAVE_STRCASECMP
855-
856-/* Define to 1 if you have the `strchr' function. */
857-#undef HAVE_STRCHR
858-
859-/* Define to 1 if you have the `strcspn' function. */
860-#undef HAVE_STRCSPN
861-
862-/* Define to 1 if you have the `strdup' function. */
863-#undef HAVE_STRDUP
864-
865-/* Define to 1 if you have the `strerror' function. */
866-#undef HAVE_STRERROR
867-
868 /* Define to 1 if you have the <strings.h> header file. */
869 #undef HAVE_STRINGS_H
870
871 /* Define to 1 if you have the <string.h> header file. */
872 #undef HAVE_STRING_H
873
874-/* Define to 1 if you have the `strlcat' function. */
875-#undef HAVE_STRLCAT
876-
877-/* Define to 1 if you have the `strlcpy' function. */
878-#undef HAVE_STRLCPY
879-
880-/* Define to 1 if you have the `strrchr' function. */
881-#undef HAVE_STRRCHR
882-
883-/* Define to 1 if you have the `strstr' function. */
884-#undef HAVE_STRSTR
885-
886-/* Define to 1 if you have the `strtol' function. */
887-#undef HAVE_STRTOL
888-
889 /* Have swig installed */
890 #undef HAVE_SWIG
891
892 /* Define to 1 if you have the `syslog' function. */
893 #undef HAVE_SYSLOG
894
895-/* Define to 1 if you have the <sys/cdefs.h> header file. */
896-#undef HAVE_SYS_CDEFS_H
897-
898-/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
899- */
900-#undef HAVE_SYS_DIR_H
901-
902 /* Define to 1 if you have the <sys/ethernet.h> header file. */
903 #undef HAVE_SYS_ETHERNET_H
904
905-/* Define to 1 if you have the <sys/ioctl.h> header file. */
906-#undef HAVE_SYS_IOCTL_H
907-
908-/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
909- */
910-#undef HAVE_SYS_NDIR_H
911-
912-/* Define to 1 if you have the <sys/param.h> header file. */
913-#undef HAVE_SYS_PARAM_H
914-
915 /* Define to 1 if you have the <sys/stat.h> header file. */
916 #undef HAVE_SYS_STAT_H
917
918 /* Define to 1 if you have the <sys/types.h> header file. */
919 #undef HAVE_SYS_TYPES_H
920
921-/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
922-#undef HAVE_SYS_WAIT_H
923-
924 /* Have TCL libraries */
925 #undef HAVE_TCL
926
927-/* Define to 1 if you have the <termios.h> header file. */
928-#undef HAVE_TERMIOS_H
929-
930-/* Define to 1 if you have the <term.h> header file. */
931-#undef HAVE_TERM_H
932-
933 /* Have UCD SNMP */
934 #undef HAVE_UCDSNMP
935
936 /* Define to 1 if you have the <unistd.h> header file. */
937 #undef HAVE_UNISTD_H
938
939-/* Define to 1 if the system has the type `u_int32_t'. */
940-#undef HAVE_U_INT32_T
941-
942-/* Define to 1 if you have the `vfork' function. */
943-#undef HAVE_VFORK
944-
945-/* Define to 1 if you have the <vfork.h> header file. */
946-#undef HAVE_VFORK_H
947-
948-/* Define to 1 if you have the `vw_printw' function. */
949-#undef HAVE_VW_PRINTW
950-
951-/* Define to 1 if `fork' works. */
952-#undef HAVE_WORKING_FORK
953-
954-/* Define to 1 if `vfork' works. */
955-#undef HAVE_WORKING_VFORK
956-
957-/* Define to 1 if you have the `wresize' function. */
958-#undef HAVE_WRESIZE
959-
960-/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
961- slash. */
962-#undef LSTAT_FOLLOWS_SLASHED_SYMLINK
963-
964 /* Define to the sub-directory where libtool stores uninstalled libraries. */
965 #undef LT_OBJDIR
966
967@@ -271,17 +111,6 @@
968 /* Define to the version of this package. */
969 #undef PACKAGE_VERSION
970
971-/* Define as the return type of signal handlers (`int' or `void'). */
972-#undef RETSIGTYPE
973-
974-/* If using the C implementation of alloca, define if you know the
975- direction of stack growth for your system; otherwise it will be
976- automatically deduced at runtime.
977- STACK_DIRECTION > 0 => grows toward higher addresses
978- STACK_DIRECTION < 0 => grows toward lower addresses
979- STACK_DIRECTION = 0 => direction of growth unknown */
980-#undef STACK_DIRECTION
981-
982 /* Define to 1 if you have the ANSI C header files. */
983 #undef STDC_HEADERS
984
985@@ -290,18 +119,3 @@
986
987 /* Version number of package */
988 #undef VERSION
989-
990-/* Solaris's term.h does horrid things. */
991-#undef _SUNOS
992-
993-/* Define to empty if `const' does not conform to ANSI C. */
994-#undef const
995-
996-/* Define to `int' if <sys/types.h> does not define. */
997-#undef pid_t
998-
999-/* Define to `unsigned int' if <sys/types.h> does not define. */
1000-#undef size_t
1001-
1002-/* Define as `fork' if `vfork' does not work. */
1003-#undef vfork
1004diff --git a/configure b/configure
1005index 0305f1d..a1068a4 100755
1006--- a/configure
1007+++ b/configure
1008@@ -1,6 +1,6 @@
1009 #! /bin/sh
1010 # Guess values for system-dependent variables and create Makefiles.
1011-# Generated by GNU Autoconf 2.69 for OpenIPMI 2.0.25.
1012+# Generated by GNU Autoconf 2.69 for OpenIPMI 2.0.27.
1013 #
1014 # Report bugs to <minyard@acm.org>.
1015 #
1016@@ -590,8 +590,8 @@ MAKEFLAGS=
1017 # Identity of this package.
1018 PACKAGE_NAME='OpenIPMI'
1019 PACKAGE_TARNAME='OpenIPMI'
1020-PACKAGE_VERSION='2.0.25'
1021-PACKAGE_STRING='OpenIPMI 2.0.25'
1022+PACKAGE_VERSION='2.0.27'
1023+PACKAGE_STRING='OpenIPMI 2.0.27'
1024 PACKAGE_BUGREPORT='minyard@acm.org'
1025 PACKAGE_URL=''
1026
1027@@ -634,10 +634,9 @@ ac_includes_default="\
1028 ac_subst_vars='am__EXEEXT_FALSE
1029 am__EXEEXT_TRUE
1030 LTLIBOBJS
1031+LIBOBJS
1032 BUILD_CC
1033 TERM_LIBS
1034-LIBOBJS
1035-ALLOCA
1036 OPENIPMI_SWIG_SO
1037 OPENIPMI_SWIG_LIBS
1038 DIA_FILTER_NAME
1039@@ -650,18 +649,24 @@ SOCKETLIB
1040 OPENSSLINCS
1041 OPENSSLLIBS
1042 SNMPLIBS
1043-SWIG
1044 SWIG_DIR
1045-swigprog
1046+SWIG_LIB
1047+SWIG
1048 PYTHON_GUI_DIR
1049+PYTHON_SWIG_FLAGS
1050 PYTHON_POSIX_SO
1051 PYTHON_POSIX_LIB
1052 PYTHON_HAS_POSIX_THREADS
1053 PYTHON_INSTALL_LIB_DIR
1054 PYTHON_INSTALL_DIR
1055-PYTHON_CFLAGS
1056 PYTHON_DIR
1057-pythonprog
1058+PYTHON_EXTRA_LIBS
1059+PYTHON_EXTRA_LDFLAGS
1060+PYTHON_SITE_PKG
1061+PYTHON_LIBS
1062+PYTHON_CPPFLAGS
1063+PYTHON
1064+PYTHON_VERSION
1065 PERL_POSIX_SO
1066 PERL_POSIX_LIB
1067 PERL_HAS_POSIX_THREADS
1068@@ -676,8 +681,6 @@ TCL_SO
1069 TCL_LIB
1070 TCL_LIBS
1071 TCL_CFLAGS
1072-GLIB_SINGLE_SO
1073-GLIB_SINGLE_LIB
1074 GLIB_DIR
1075 GLIB_TARGET
1076 GLIB_PKGCONF
1077@@ -866,7 +869,8 @@ LDFLAGS
1078 LIBS
1079 CPPFLAGS
1080 LT_SYS_LIBRARY_PATH
1081-CPP'
1082+CPP
1083+PYTHON_VERSION'
1084
1085
1086 # Initialize some variables set by options.
1087@@ -1417,7 +1421,7 @@ if test "$ac_init_help" = "long"; then
1088 # Omit some internal or obsolete options to make the list less imposing.
1089 # This message is too long to be a string in the A/UX 3.1 sh.
1090 cat <<_ACEOF
1091-\`configure' configures OpenIPMI 2.0.25 to adapt to many kinds of systems.
1092+\`configure' configures OpenIPMI 2.0.27 to adapt to many kinds of systems.
1093
1094 Usage: $0 [OPTION]... [VAR=VALUE]...
1095
1096@@ -1489,7 +1493,7 @@ fi
1097
1098 if test -n "$ac_init_help"; then
1099 case $ac_init_help in
1100- short | recursive ) echo "Configuration of OpenIPMI 2.0.25:";;
1101+ short | recursive ) echo "Configuration of OpenIPMI 2.0.27:";;
1102 esac
1103 cat <<\_ACEOF
1104
1105@@ -1560,6 +1564,10 @@ Some influential environment variables:
1106 LT_SYS_LIBRARY_PATH
1107 User-defined run-time library search path.
1108 CPP C preprocessor
1109+ PYTHON_VERSION
1110+ The installed Python version to use, for example '2.3'. This
1111+ string will be appended to the Python interpreter canonical
1112+ name.
1113
1114 Use these variables to override the choices made by `configure' or to help
1115 it to find libraries and programs with nonstandard names/locations.
1116@@ -1627,7 +1635,7 @@ fi
1117 test -n "$ac_init_help" && exit $ac_status
1118 if $ac_init_version; then
1119 cat <<\_ACEOF
1120-OpenIPMI configure 2.0.25
1121+OpenIPMI configure 2.0.27
1122 generated by GNU Autoconf 2.69
1123
1124 Copyright (C) 2012 Free Software Foundation, Inc.
1125@@ -1992,65 +2000,11 @@ fi
1126 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1127
1128 } # ac_fn_c_check_header_mongrel
1129-
1130-# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1131-# -------------------------------------------
1132-# Tests whether TYPE exists after having included INCLUDES, setting cache
1133-# variable VAR accordingly.
1134-ac_fn_c_check_type ()
1135-{
1136- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1137- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1138-$as_echo_n "checking for $2... " >&6; }
1139-if eval \${$3+:} false; then :
1140- $as_echo_n "(cached) " >&6
1141-else
1142- eval "$3=no"
1143- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1144-/* end confdefs.h. */
1145-$4
1146-int
1147-main ()
1148-{
1149-if (sizeof ($2))
1150- return 0;
1151- ;
1152- return 0;
1153-}
1154-_ACEOF
1155-if ac_fn_c_try_compile "$LINENO"; then :
1156- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1157-/* end confdefs.h. */
1158-$4
1159-int
1160-main ()
1161-{
1162-if (sizeof (($2)))
1163- return 0;
1164- ;
1165- return 0;
1166-}
1167-_ACEOF
1168-if ac_fn_c_try_compile "$LINENO"; then :
1169-
1170-else
1171- eval "$3=yes"
1172-fi
1173-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1174-fi
1175-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1176-fi
1177-eval ac_res=\$$3
1178- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1179-$as_echo "$ac_res" >&6; }
1180- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1181-
1182-} # ac_fn_c_check_type
1183 cat >config.log <<_ACEOF
1184 This file contains any messages produced by compilers while
1185 running configure, to aid debugging if configure makes a mistake.
1186
1187-It was created by OpenIPMI $as_me 2.0.25, which was
1188+It was created by OpenIPMI $as_me 2.0.27, which was
1189 generated by GNU Autoconf 2.69. Invocation command line was
1190
1191 $ $0 $@
1192@@ -3023,7 +2977,7 @@ fi
1193
1194 # Define the identity of the package.
1195 PACKAGE='OpenIPMI'
1196- VERSION='2.0.25'
1197+ VERSION='2.0.27'
1198
1199
1200 cat >>confdefs.h <<_ACEOF
1201@@ -4336,7 +4290,7 @@ OPENIPMI_VERSION_MAJOR=2
1202
1203 OPENIPMI_VERSION_MINOR=0
1204
1205-OPENIPMI_VERSION_RELEASE=25
1206+OPENIPMI_VERSION_RELEASE=27
1207
1208
1209
1210@@ -4568,15 +4522,19 @@ if test "${with_perlusepthreads+set}" = set; then :
1211 fi
1212
1213
1214+pythonprog=
1215 trypython=yes
1216
1217 # Check whether --with-python was given.
1218 if test "${with_python+set}" = set; then :
1219- withval=$with_python; if test "x$withval" = "xyes"; then
1220+ withval=$with_python; if test "x$withval" = "x"; then
1221+ trypython=yes
1222+ elif test "x$withval" = "xyes"; then
1223 trypython=yes
1224 elif test "x$withval" = "xno"; then
1225 trypython=no
1226- elif test -d "$withval"; then
1227+ else
1228+ pythonprog="$withval"
1229 trypython=yes
1230 fi
1231 fi
1232@@ -13065,11 +13023,13 @@ $as_echo "#define HAVE_GLIB /**/" >>confdefs.h
1233 GLIB_SO='$(top_builddir)/glib/.libs/libOpenIPMIglib.so'
1234 GLIB_PKGCONF=OpenIPMIglib.pc
1235 GLIB_TARGET=libOpenIPMIglib.la
1236+ GLIB_DIR=glib
1237 else
1238 GLIB_LIB=
1239 GLIB_SO=
1240 GLIB_PKGCONF=
1241 GLIB_TARGET=
1242+ GLIB_DIR=
1243 fi
1244
1245
1246@@ -13080,19 +13040,6 @@ fi
1247
1248
1249
1250-if test "x$haveglib" = "xyes"; then
1251- GLIB_DIR=glib
1252- GLIB_SINGLE_LIB=$GLIB_LIB
1253- GLIB_SINGLE_SO=$GLIB_SO
1254-else
1255- GLIB_DIR=
1256- GLIB_SINGLE_LIB=
1257- GLIB_SINGLE_SO=
1258-fi
1259-
1260-
1261-
1262-
1263 # Handle TCL support
1264 TCL_LIBS=
1265 TCL_CFLAGS=
1266@@ -13101,22 +13048,26 @@ if test "x$trytcl" != "xno"; then
1267 FOUND_TCL_HEADER=no
1268 ver=`echo 'puts \$tcl_version' | tclsh`
1269 if test "x$tclcflags" = "x"; then
1270- ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
1271-if test "x$ac_cv_header_tcl_h" = xyes; then :
1272+ ac_fn_c_check_header_mongrel "$LINENO" "tcl/tcl.h" "ac_cv_header_tcl_tcl_h" "$ac_includes_default"
1273+if test "x$ac_cv_header_tcl_tcl_h" = xyes; then :
1274 FOUND_TCL_HEADER=yes;
1275 fi
1276
1277
1278 if test "x$FOUND_TCL_HEADER" != "xyes"; then
1279- echo -n "checking for /usr/include/tcl$ver... "
1280- if test 'x$ver' != 'x' -a -d "/usr/include/tcl$ver"; then
1281- echo "yes"
1282+ ac_fn_c_check_header_mongrel "$LINENO" "tcl/tcl.h" "ac_cv_header_tcl_tcl_h" "$ac_includes_default"
1283+if test "x$ac_cv_header_tcl_tcl_h" = xyes; then :
1284+ FOUND_TCL_HEADER=yes;
1285+fi
1286+
1287+
1288+ if test "x$FOUND_TCL_HEADER" == "xyes"; then
1289 tclcflags="-I /usr/include/tcl$ver"
1290 TCL_CFLAGS="$tclcflags"
1291- FOUND_TCL_HEADER=yes
1292- else
1293- echo "no"
1294 fi
1295+ else
1296+ tclcflags="-I /usr/include/tcl"
1297+ TCL_CFLAGS="$tclcflags"
1298 fi
1299 else
1300 TCL_CFLAGS="$tclcflags"
1301@@ -13402,19 +13353,33 @@ fi
1302
1303
1304 # Handle PYTHON support
1305-if test "x$pythoncflags" = "x" -o "x$pythoninstalldir" = "x"; then
1306- pythonprog=
1307- if test "x$trypython" != "xno"; then
1308- # Extract the first word of "python", so it can be a program name with args.
1309-set dummy python; ac_word=$2
1310+PYTHON_DIR=
1311+PYTHON_INSTALL_DIR=
1312+PYTHON_INSTALL_LIB_DIR=
1313+PYTHON_SWIG_FLAGS=
1314+if test "x$trypython" = "xyes"; then
1315+ if test "x$pythonprog" != "x"; then
1316+ PYTHON="$pythonprog"
1317+ fi
1318+ if test "x$pythoncflags" != "x"; then
1319+ PYTHON_CPPFLAGS="$pythoncflags"
1320+ fi
1321+
1322+ #
1323+ # Allow the use of a (user set) custom python version
1324+ #
1325+
1326+
1327+ # Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args.
1328+set dummy python$PYTHON_VERSION; ac_word=$2
1329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
1330 $as_echo_n "checking for $ac_word... " >&6; }
1331-if ${ac_cv_path_pythonprog+:} false; then :
1332+if ${ac_cv_path_PYTHON+:} false; then :
1333 $as_echo_n "(cached) " >&6
1334 else
1335- case $pythonprog in
1336+ case $PYTHON in
1337 [\\/]* | ?:[\\/]*)
1338- ac_cv_path_pythonprog="$pythonprog" # Let the user override the test with a path.
1339+ ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
1340 ;;
1341 *)
1342 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1343@@ -13424,7 +13389,7 @@ do
1344 test -z "$as_dir" && as_dir=.
1345 for ac_exec_ext in '' $ac_executable_extensions; do
1346 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1347- ac_cv_path_pythonprog="$as_dir/$ac_word$ac_exec_ext"
1348+ ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
1349 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1350 break 2
1351 fi
1352@@ -13435,89 +13400,427 @@ IFS=$as_save_IFS
1353 ;;
1354 esac
1355 fi
1356-pythonprog=$ac_cv_path_pythonprog
1357-if test -n "$pythonprog"; then
1358- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pythonprog" >&5
1359-$as_echo "$pythonprog" >&6; }
1360+PYTHON=$ac_cv_path_PYTHON
1361+if test -n "$PYTHON"; then
1362+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
1363+$as_echo "$PYTHON" >&6; }
1364 else
1365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
1366 $as_echo "no" >&6; }
1367 fi
1368
1369
1370- fi
1371- if test "x$pythonprog" != "x"; then
1372- # Now find a proper installation location.
1373- if test "x$pythoninstalldir" = "x"; then
1374- pythoninstalldir=`$pythonprog -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_lib());'`
1375- if test "x$pythoninstalldir" = "x" -o ! -d "$pythoninstalldir"; then
1376- pythoninstalldir=
1377- fi
1378- fi
1379- fi
1380+ if test -z "$PYTHON"; then
1381+ as_fn_error $? "Cannot find python$PYTHON_VERSION in your system path" "$LINENO" 5
1382+ PYTHON_VERSION=""
1383+ fi
1384+
1385+ #
1386+ # Check for a version of Python >= 2.1.0
1387+ #
1388+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a version of Python >= '2.1.0'" >&5
1389+$as_echo_n "checking for a version of Python >= '2.1.0'... " >&6; }
1390+ ac_supports_python_ver=`$PYTHON -c "import sys; \
1391+ ver = sys.version.split ()[0]; \
1392+ print (ver >= '2.1.0')"`
1393+ if test "$ac_supports_python_ver" != "True"; then
1394+ if test -z "$PYTHON_NOVERSIONCHECK"; then
1395+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
1396+$as_echo "no" >&6; }
1397+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1398+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1399+as_fn_error $? "
1400+This version of the AC_PYTHON_DEVEL macro
1401+doesn't work properly with versions of Python before
1402+2.1.0. You may need to re-run configure, setting the
1403+variables PYTHON_CPPFLAGS, PYTHON_LIBS, PYTHON_SITE_PKG,
1404+PYTHON_EXTRA_LIBS and PYTHON_EXTRA_LDFLAGS by hand.
1405+Moreover, to disable this check, set PYTHON_NOVERSIONCHECK
1406+to something else than an empty string.
1407+
1408+See \`config.log' for more details" "$LINENO" 5; }
1409+ else
1410+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: skip at user request" >&5
1411+$as_echo "skip at user request" >&6; }
1412+ fi
1413+ else
1414+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
1415+$as_echo "yes" >&6; }
1416+ fi
1417+
1418+ #
1419+ # if the macro parameter ``version'' is set, honour it
1420+ #
1421+ if test -n ""; then
1422+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a version of Python " >&5
1423+$as_echo_n "checking for a version of Python ... " >&6; }
1424+ ac_supports_python_ver=`$PYTHON -c "import sys; \
1425+ ver = sys.version.split ()[0]; \
1426+ print (ver )"`
1427+ if test "$ac_supports_python_ver" = "True"; then
1428+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
1429+$as_echo "yes" >&6; }
1430+ else
1431+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
1432+$as_echo "no" >&6; }
1433+ as_fn_error $? "this package requires Python .
1434+If you have it installed, but it isn't the default Python
1435+interpreter in your system path, please pass the PYTHON_VERSION
1436+variable to configure. See \`\`configure --help'' for reference.
1437+" "$LINENO" 5
1438+ PYTHON_VERSION=""
1439+ fi
1440+ fi
1441+
1442+ #
1443+ # Check if you have distutils, else fail
1444+ #
1445+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5
1446+$as_echo_n "checking for the distutils Python package... " >&6; }
1447+ ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
1448+ if test -z "$ac_distutils_result"; then
1449+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
1450+$as_echo "yes" >&6; }
1451+ else
1452+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
1453+$as_echo "no" >&6; }
1454+ as_fn_error $? "cannot import Python module \"distutils\".
1455+Please check your Python installation. The error was:
1456+$ac_distutils_result" "$LINENO" 5
1457+ PYTHON_VERSION=""
1458+ fi
1459+
1460+ #
1461+ # Check for Python include path
1462+ #
1463+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5
1464+$as_echo_n "checking for Python include path... " >&6; }
1465+ if test -z "$PYTHON_CPPFLAGS"; then
1466+ python_path=`$PYTHON -c "import distutils.sysconfig; \
1467+ print (distutils.sysconfig.get_python_inc ());"`
1468+ plat_python_path=`$PYTHON -c "import distutils.sysconfig; \
1469+ print (distutils.sysconfig.get_python_inc (plat_specific=1));"`
1470+ if test -n "${python_path}"; then
1471+ if test "${plat_python_path}" != "${python_path}"; then
1472+ python_path="-I$python_path -I$plat_python_path"
1473+ else
1474+ python_path="-I$python_path"
1475+ fi
1476+ fi
1477+ PYTHON_CPPFLAGS=$python_path
1478+ fi
1479+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5
1480+$as_echo "$PYTHON_CPPFLAGS" >&6; }
1481+
1482+
1483+ #
1484+ # Check for Python library path
1485+ #
1486+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5
1487+$as_echo_n "checking for Python library path... " >&6; }
1488+ if test -z "$PYTHON_LIBS"; then
1489+ # (makes two attempts to ensure we've got a version number
1490+ # from the interpreter)
1491+ ac_python_version=`cat<<EOD | $PYTHON -
1492+
1493+# join all versioning strings, on some systems
1494+# major/minor numbers could be in different list elements
1495+from distutils.sysconfig import *
1496+e = get_config_var('VERSION')
1497+if e is not None:
1498+ print(e)
1499+EOD`
1500+
1501+ if test -z "$ac_python_version"; then
1502+ if test -n "$PYTHON_VERSION"; then
1503+ ac_python_version=$PYTHON_VERSION
1504+ else
1505+ ac_python_version=`$PYTHON -c "import sys; \
1506+ print (sys.version[:3])"`
1507+ fi
1508+ fi
1509+
1510+ # Make the versioning information available to the compiler
1511+
1512+cat >>confdefs.h <<_ACEOF
1513+#define HAVE_PYTHON "$ac_python_version"
1514+_ACEOF
1515+
1516+
1517+ # First, the library directory:
1518+ ac_python_libdir=`cat<<EOD | $PYTHON -
1519+
1520+# There should be only one
1521+import distutils.sysconfig
1522+e = distutils.sysconfig.get_config_var('LIBDIR')
1523+if e is not None:
1524+ print (e)
1525+EOD`
1526+
1527+ # Now, for the library:
1528+ ac_python_library=`cat<<EOD | $PYTHON -
1529+
1530+import distutils.sysconfig
1531+c = distutils.sysconfig.get_config_vars()
1532+if 'LDVERSION' in c:
1533+ print ('python'+c['LDVERSION'])
1534+else:
1535+ print ('python'+c['VERSION'])
1536+EOD`
1537+
1538+ # This small piece shamelessly adapted from PostgreSQL python macro;
1539+ # credits goes to momjian, I think. I'd like to put the right name
1540+ # in the credits, if someone can point me in the right direction... ?
1541+ #
1542+ if test -n "$ac_python_libdir" -a -n "$ac_python_library"
1543+ then
1544+ # use the official shared library
1545+ ac_python_library=`echo "$ac_python_library" | sed "s/^lib//"`
1546+ PYTHON_LIBS="-L$ac_python_libdir -l$ac_python_library"
1547+ else
1548+ # old way: use libpython from python_configdir
1549+ ac_python_libdir=`$PYTHON -c \
1550+ "from distutils.sysconfig import get_python_lib as f; \
1551+ import os; \
1552+ print (os.path.join(f(plat_specific=1, standard_lib=1), 'config'));"`
1553+ PYTHON_LIBS="-L$ac_python_libdir -lpython$ac_python_version"
1554+ fi
1555+
1556+ if test -z "PYTHON_LIBS"; then
1557+ as_fn_error $? "
1558+ Cannot determine location of your Python DSO. Please check it was installed with
1559+ dynamic libraries enabled, or try setting PYTHON_LIBS by hand.
1560+ " "$LINENO" 5
1561+ fi
1562+ fi
1563+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LIBS" >&5
1564+$as_echo "$PYTHON_LIBS" >&6; }
1565+
1566+
1567+ #
1568+ # Check for site packages
1569+ #
1570+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python site-packages path" >&5
1571+$as_echo_n "checking for Python site-packages path... " >&6; }
1572+ if test -z "$PYTHON_SITE_PKG"; then
1573+ PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
1574+ print (distutils.sysconfig.get_python_lib(0,0));"`
1575+ fi
1576+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5
1577+$as_echo "$PYTHON_SITE_PKG" >&6; }
1578+
1579+
1580+ #
1581+ # libraries which must be linked in when embedding
1582+ #
1583+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking python extra libraries" >&5
1584+$as_echo_n "checking python extra libraries... " >&6; }
1585+ if test -z "$PYTHON_EXTRA_LDFLAGS"; then
1586+ PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "import distutils.sysconfig; \
1587+ conf = distutils.sysconfig.get_config_var; \
1588+ print (conf('LIBS') + ' ' + conf('SYSLIBS'))"`
1589+ fi
1590+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_EXTRA_LDFLAGS" >&5
1591+$as_echo "$PYTHON_EXTRA_LDFLAGS" >&6; }
1592+
1593+
1594+ #
1595+ # linking flags needed when embedding
1596+ #
1597+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking python extra linking flags" >&5
1598+$as_echo_n "checking python extra linking flags... " >&6; }
1599+ if test -z "$PYTHON_EXTRA_LIBS"; then
1600+ PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \
1601+ conf = distutils.sysconfig.get_config_var; \
1602+ print (conf('LINKFORSHARED'))"`
1603+ fi
1604+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_EXTRA_LIBS" >&5
1605+$as_echo "$PYTHON_EXTRA_LIBS" >&6; }
1606+
1607+
1608+ #
1609+ # final check to see if everything compiles alright
1610+ #
1611+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5
1612+$as_echo_n "checking consistency of all components of python development environment... " >&6; }
1613+ # save current global flags
1614+ ac_save_LIBS="$LIBS"
1615+ ac_save_LDFLAGS="$LDFLAGS"
1616+ ac_save_CPPFLAGS="$CPPFLAGS"
1617+ LIBS="$ac_save_LIBS $PYTHON_LIBS $PYTHON_EXTRA_LIBS $PYTHON_EXTRA_LIBS"
1618+ LDFLAGS="$ac_save_LDFLAGS $PYTHON_EXTRA_LDFLAGS"
1619+ CPPFLAGS="$ac_save_CPPFLAGS $PYTHON_CPPFLAGS"
1620+ ac_ext=c
1621+ac_cpp='$CPP $CPPFLAGS'
1622+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1623+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1624+ac_compiler_gnu=$ac_cv_c_compiler_gnu
1625+
1626+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1627+/* end confdefs.h. */
1628+
1629+ #include <Python.h>
1630+int
1631+main ()
1632+{
1633+Py_Initialize();
1634+ ;
1635+ return 0;
1636+}
1637+
1638+_ACEOF
1639+if ac_fn_c_try_link "$LINENO"; then :
1640+ pythonexists=yes
1641+else
1642+ pythonexists=no
1643+fi
1644+rm -f core conftest.err conftest.$ac_objext \
1645+ conftest$ac_exeext conftest.$ac_ext
1646+ ac_ext=c
1647+ac_cpp='$CPP $CPPFLAGS'
1648+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1649+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1650+ac_compiler_gnu=$ac_cv_c_compiler_gnu
1651+
1652+ # turn back to default flags
1653+ CPPFLAGS="$ac_save_CPPFLAGS"
1654+ LIBS="$ac_save_LIBS"
1655+ LDFLAGS="$ac_save_LDFLAGS"
1656+
1657+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5
1658+$as_echo "$pythonexists" >&6; }
1659+
1660+ if test ! "x$pythonexists" = "xyes"; then
1661+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1662+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1663+as_fn_error $? "
1664+ Could not link test program to Python. Maybe the main Python library has been
1665+ installed in some non-standard library path. If so, pass it to configure,
1666+ via the LIBS environment variable.
1667+ Example: ./configure LIBS=\"-L/usr/non-standard-path/python/lib\"
1668+ ============================================================================
1669+ ERROR!
1670+ You probably have to install the development version of the Python package
1671+ for your distribution. The exact name of this package varies among them.
1672+ ============================================================================
1673+
1674+See \`config.log' for more details" "$LINENO" 5; }
1675+ PYTHON_VERSION=""
1676+ fi
1677+
1678+ #
1679+ # all done!
1680+ #
1681+
1682+fi
1683+if test "x$PYTHON" != "x"; then
1684+
1685+
1686+
1687+
1688+ if test -n "$PYTHON"; then :
1689+
1690+ ax_python_version="3.0.0"
1691+
1692+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python version" >&5
1693+$as_echo_n "checking for python version... " >&6; }
1694+
1695+ python_version=`$PYTHON -V 2>&1 | $GREP "^Python " | $SED -e 's/^.* \([0-9]*\.[0-9]*\.[0-9]*\)/\1/'`
1696+
1697+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_version" >&5
1698+$as_echo "$python_version" >&6; }
1699+
1700+ PYTHON_VERSION=$python_version
1701+
1702+
1703
1704- if test "x$pythoncflags" = "x"; then
1705- pythoninc=`$pythonprog -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_inc());'`
1706- if test "x$pythoninc" != "x"; then
1707- pythoncflags="-I$pythoninc"
1708- else
1709- pythoncflags=""
1710- fi
1711- else
1712- PYTHON_CFLAGS="$pythoncflags"
1713- fi
1714
1715- if test "x$pythoninstalldir" != "x"; then
1716- if test "x$pythoninstalllibdir" = "x"; then
1717- pythoninstalllibdir=$pythoninstalldir
1718- fi
1719+
1720+ # Used to indicate true or false condition
1721+ ax_compare_version=false
1722+
1723+ # Convert the two version strings to be compared into a format that
1724+ # allows a simple string comparison. The end result is that a version
1725+ # string of the form 1.12.5-r617 will be converted to the form
1726+ # 0001001200050617. In other words, each number is zero padded to four
1727+ # digits, and non digits are removed.
1728+
1729+ ax_compare_version_A=`echo "$ax_python_version" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
1730+ -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
1731+ -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
1732+ -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
1733+ -e 's/[^0-9]//g'`
1734+
1735+
1736+ ax_compare_version_B=`echo "$python_version" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
1737+ -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
1738+ -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
1739+ -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
1740+ -e 's/[^0-9]//g'`
1741+
1742+
1743+ ax_compare_version=`echo "x$ax_compare_version_A
1744+x$ax_compare_version_B" | sed 's/^ *//' | sort | sed "s/x${ax_compare_version_A}/true/;s/x${ax_compare_version_B}/false/;1q"`
1745+
1746+
1747+
1748+ if test "$ax_compare_version" = "true" ; then
1749+
1750+ :
1751+ PYTHON_SWIG_FLAGS=-py3
1752+
1753+ else
1754+ :
1755+
1756+
1757+ fi
1758+
1759+
1760+else
1761+
1762+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find the python interpreter" >&5
1763+$as_echo "$as_me: WARNING: could not find the python interpreter" >&2;}
1764+
1765+
1766+fi
1767+
1768
1769 $as_echo "#define HAVE_PYTHON /**/" >>confdefs.h
1770
1771- PYTHON_DIR=python
1772- PYTHON_CFLAGS="$pythoncflags"
1773- PYTHON_INSTALL_DIR="$pythoninstalldir"
1774- PYTHON_INSTALL_LIB_DIR="$pythoninstalllibdir"
1775+ PYTHON_DIR=python
1776+ if test "x$pythoninstalldir" = "x"; then
1777+ PYTHON_INSTALL_DIR="$PYTHON_SITE_PKG"
1778 else
1779- PYTHON_DIR=
1780- PYTHON_CFLAGS=
1781- PYTHON_INSTALL_DIR=
1782- PYTHON_INSTALL_LIB_DIR=
1783+ PYTHON_INSTALL_DIR="$pythoninstalldir"
1784 fi
1785-else
1786 if test "x$pythoninstalllibdir" = "x"; then
1787- pythoninstalllibdir=$pythoninstalldir
1788+ PYTHON_INSTALL_LIB_DIR="$PYTHON_INSTALL_DIR"
1789+ else
1790+ PYTHON_INSTALL_LIB_DIR="$pythoninstalllibdir"
1791 fi
1792
1793-$as_echo "#define HAVE_PYTHON /**/" >>confdefs.h
1794-
1795- PYTHON_DIR=python
1796- PYTHON_CFLAGS="$pythoncflags"
1797- PYTHON_INSTALL_DIR="$pythoninstalldir"
1798- PYTHON_INSTALL_LIB_DIR="$pythoninstalllibdir"
1799-fi
1800-if test "x$pythonprog" != "x"; then
1801 if test "x$pythonusepthreads" = "x"; then
1802 cat - <<_ACEOF >conftest.py
1803 try:
1804- import thread
1805+ import threading
1806 print('yes')
1807 except:
1808 print('no')
1809 _ACEOF
1810- pythonusepthreads=`python conftest.py`
1811+ pythonusepthreads=`$PYTHON conftest.py`
1812 rm -f conftest.py
1813 fi
1814 echo "checking for python threads... $pythonusepthreads"
1815-fi
1816-if test "x$pythonusepthreads" = "xyes"; then
1817- PYTHON_HAS_POSIX_THREADS=1
1818- PYTHON_POSIX_LIB='$(top_builddir)/unix/libOpenIPMIpthread.la'
1819- PYTHON_POSIX_SO='$(top_builddir)/unix/.libs/libOpenIPMIpthread.so'
1820-else
1821- PYTHON_HAS_POSIX_THREADS=0
1822- PYTHON_POSIX_LIB='$(top_builddir)/unix/libOpenIPMIposix.la'
1823- PYTHON_POSIX_SO='$(top_builddir)/unix/.libs/libOpenIPMIposix.so'
1824+
1825+ if test "x$pythonusepthreads" = "xyes"; then
1826+ PYTHON_HAS_POSIX_THREADS=1
1827+ PYTHON_POSIX_LIB='$(top_builddir)/unix/libOpenIPMIpthread.la'
1828+ PYTHON_POSIX_SO='$(top_builddir)/unix/.libs/libOpenIPMIpthread.so'
1829+ else
1830+ PYTHON_HAS_POSIX_THREADS=0
1831+ PYTHON_POSIX_LIB='$(top_builddir)/unix/libOpenIPMIposix.la'
1832+ PYTHON_POSIX_SO='$(top_builddir)/unix/.libs/libOpenIPMIposix.so'
1833+ fi
1834 fi
1835
1836
1837@@ -13527,6 +13830,7 @@ fi
1838
1839
1840
1841+
1842 # Check for Tkinter/Tix
1843 if test "x$tkinter" = "x"; then
1844 if test "x$pythonprog" != "x"; then
1845@@ -13550,17 +13854,26 @@ fi
1846
1847
1848 # Now check for swig
1849-if test "x$swigprog" = "x" -a "x$tryswig" = "xyes"; then
1850- # Extract the first word of "swig", so it can be a program name with args.
1851-set dummy swig; ac_word=$2
1852+SWIG_DIR=
1853+SWIG=
1854+if test "x$tryswig" = "xyes"; then
1855+ if test "x$swigprog" != "x"; then
1856+ SWIG="$swigprog"
1857+ fi
1858+
1859+ # Ubuntu has swig 2.0 as /usr/bin/swig2.0
1860+ for ac_prog in swig swig2.0
1861+do
1862+ # Extract the first word of "$ac_prog", so it can be a program name with args.
1863+set dummy $ac_prog; ac_word=$2
1864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
1865 $as_echo_n "checking for $ac_word... " >&6; }
1866-if ${ac_cv_path_swigprog+:} false; then :
1867+if ${ac_cv_path_SWIG+:} false; then :
1868 $as_echo_n "(cached) " >&6
1869 else
1870- case $swigprog in
1871+ case $SWIG in
1872 [\\/]* | ?:[\\/]*)
1873- ac_cv_path_swigprog="$swigprog" # Let the user override the test with a path.
1874+ ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path.
1875 ;;
1876 *)
1877 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1878@@ -13570,7 +13883,7 @@ do
1879 test -z "$as_dir" && as_dir=.
1880 for ac_exec_ext in '' $ac_executable_extensions; do
1881 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1882- ac_cv_path_swigprog="$as_dir/$ac_word$ac_exec_ext"
1883+ ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext"
1884 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1885 break 2
1886 fi
1887@@ -13581,35 +13894,96 @@ IFS=$as_save_IFS
1888 ;;
1889 esac
1890 fi
1891-swigprog=$ac_cv_path_swigprog
1892-if test -n "$swigprog"; then
1893- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $swigprog" >&5
1894-$as_echo "$swigprog" >&6; }
1895+SWIG=$ac_cv_path_SWIG
1896+if test -n "$SWIG"; then
1897+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
1898+$as_echo "$SWIG" >&6; }
1899 else
1900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
1901 $as_echo "no" >&6; }
1902 fi
1903
1904
1905-fi
1906-if test "x$swigprog" != "x"; then
1907- swigver=`$swigprog -version 2>&1 | grep 'SWIG Version' | sed 's/SWIG Version //'`
1908- swigmajor=`echo $swigver | sed 's/\.[0-9]*\.[0-9]*$//'`
1909- swigminor=`echo $swigver | sed 's/^[0-9]*\.\([0-9]*\)\.[0-9]*$/\1/'`
1910- swigrel=`echo $swigver | sed 's/^[0-9]*\.[0-9]*\.//'`
1911- if test '(' "$swigmajor" -lt 1 ')' -o '(' '(' "$swigmajor" -eq 1 ')' -a '(' "$swigminor" -lt 3 ')' ')' -o '(' '(' "$swigmajor" -eq 1 ')' -a '(' "$swigminor" -eq 3 ')' -a '(' "$swigrel" -lt 21 ')' ')'; then
1912- echo "***swig must be version 1.3.21 or greater, disabling swig and perl/python"
1913- else
1914- echo "swig version $swigver"
1915+ test -n "$SWIG" && break
1916+done
1917+
1918+ if test -z "$SWIG" ; then
1919+ :
1920+ elif test -n "1.3.21" ; then
1921+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking SWIG version" >&5
1922+$as_echo_n "checking SWIG version... " >&6; }
1923+ swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`
1924+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5
1925+$as_echo "$swig_version" >&6; }
1926+ if test -n "$swig_version" ; then
1927+ # Calculate the required version number components
1928+ required=1.3.21
1929+ required_major=`echo $required | sed 's/[^0-9].*//'`
1930+ if test -z "$required_major" ; then
1931+ required_major=0
1932+ fi
1933+ required=`echo $required | sed 's/[0-9]*[^0-9]//'`
1934+ required_minor=`echo $required | sed 's/[^0-9].*//'`
1935+ if test -z "$required_minor" ; then
1936+ required_minor=0
1937+ fi
1938+ required=`echo $required | sed 's/[0-9]*[^0-9]//'`
1939+ required_patch=`echo $required | sed 's/[^0-9].*//'`
1940+ if test -z "$required_patch" ; then
1941+ required_patch=0
1942+ fi
1943+ # Calculate the available version number components
1944+ available=$swig_version
1945+ available_major=`echo $available | sed 's/[^0-9].*//'`
1946+ if test -z "$available_major" ; then
1947+ available_major=0
1948+ fi
1949+ available=`echo $available | sed 's/[0-9]*[^0-9]//'`
1950+ available_minor=`echo $available | sed 's/[^0-9].*//'`
1951+ if test -z "$available_minor" ; then
1952+ available_minor=0
1953+ fi
1954+ available=`echo $available | sed 's/[0-9]*[^0-9]//'`
1955+ available_patch=`echo $available | sed 's/[^0-9].*//'`
1956+ if test -z "$available_patch" ; then
1957+ available_patch=0
1958+ fi
1959+ # Convert the version tuple into a single number for easier comparison.
1960+ # Using base 100 should be safe since SWIG internally uses BCD values
1961+ # to encode its version number.
1962+ required_swig_vernum=`expr $required_major \* 10000 \
1963+ \+ $required_minor \* 100 \+ $required_patch`
1964+ available_swig_vernum=`expr $available_major \* 10000 \
1965+ \+ $available_minor \* 100 \+ $available_patch`
1966+
1967+ if test $available_swig_vernum -lt $required_swig_vernum; then
1968+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SWIG version >= 1.3.21 is required. You have $swig_version." >&5
1969+$as_echo "$as_me: WARNING: SWIG version >= 1.3.21 is required. You have $swig_version." >&2;}
1970+ SWIG=''
1971+
1972+ else
1973+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SWIG library" >&5
1974+$as_echo_n "checking for SWIG library... " >&6; }
1975+ SWIG_LIB=`$SWIG -swiglib`
1976+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG_LIB" >&5
1977+$as_echo "$SWIG_LIB" >&6; }
1978+
1979+ fi
1980+ else
1981+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
1982+$as_echo "$as_me: WARNING: cannot determine SWIG version" >&2;}
1983+ SWIG=''
1984+
1985+ fi
1986+ fi
1987+
1988+
1989+ if test "x$SWIG" != "x"; then
1990
1991 $as_echo "#define HAVE_SWIG /**/" >>confdefs.h
1992
1993 SWIG_DIR=swig
1994- SWIG=$swigprog
1995 fi
1996-else
1997- SWIG_DIR=
1998- SWIG=
1999 fi
2000
2001
2002@@ -14073,11 +14447,12 @@ fi
2003
2004
2005 if test "x$diaprog" != "x"; then
2006- diaver=`$diaprog --version 2>&1 | sed 's/Dia version \([^,]*\), .*$/\1/'`
2007+ diaver=`$diaprog --version 2>&1 | grep 'Dia version' | sed 's/Dia version \([^,]*\), .*$/\1/' | sed 's/^\([0-9.]\+\)+.*$/\1/'`
2008 tmp=`echo $diaver | sed 's/^[0-9.]\+$//'`
2009 if test "x$diaver" = "x" -o "x$tmp" != 'x'; then
2010 # Couldn't get the dia version, give up.
2011 echo "Couldn't determine the dia version from '$diaver'"
2012+ exit 1
2013 else
2014 DIA="$diaprog"
2015 diaver_major=`echo $diaver | sed 's/\.[0-9.]\+$//'`
2016@@ -14225,8 +14600,8 @@ fi
2017
2018
2019
2020-OPENIPMI_SWIG_LIBS="${PYTHON_POSIX_LIB} \$(top_builddir)/lib/libOpenIPMI.la \$(top_builddir)/utils/libOpenIPMIutils.la \$(top_builddir)/cmdlang/libOpenIPMIcmdlang.la ${GLIB_SINGLE_LIB} ${TCL_LIB}"
2021-OPENIPMI_SWIG_SO="${PYTHON_POSIX_SO}:\$(top_builddir)/lib/.libs/libOpenIPMI.so:\$(top_builddir)/utils/.libs/libOpenIPMIutils.so:\$(top_builddir)/cmdlang/.libs/libOpenIPMIcmdlang.so:${GLIB_SINGLE_SO}:${TCL_SO}"
2022+OPENIPMI_SWIG_LIBS="${PYTHON_POSIX_LIB} \$(top_builddir)/lib/libOpenIPMI.la \$(top_builddir)/utils/libOpenIPMIutils.la \$(top_builddir)/cmdlang/libOpenIPMIcmdlang.la ${GLIB_LIB} ${TCL_LIB}"
2023+OPENIPMI_SWIG_SO="${PYTHON_POSIX_SO}:\$(top_builddir)/lib/.libs/libOpenIPMI.so:\$(top_builddir)/utils/.libs/libOpenIPMIutils.so:\$(top_builddir)/cmdlang/.libs/libOpenIPMIcmdlang.so:${GLIB_SO}:${TCL_SO}"
2024
2025
2026
2027@@ -14330,15 +14705,6 @@ fi
2028
2029
2030
2031-# Everything from here to AC_OUTPUT is for libedit
2032-
2033-# AC_PROG_LIBTOOL runs AC_CANONICAL_HOST
2034-case $host in
2035- *-sun-*)
2036-$as_echo "#define _SUNOS /**/" >>confdefs.h
2037-;;
2038-esac
2039-
2040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lcurses" >&5
2041 $as_echo_n "checking for tgetent in -lcurses... " >&6; }
2042 if ${ac_cv_lib_curses_tgetent+:} false; then :
2043@@ -14464,1212 +14830,18 @@ fi
2044 fi
2045
2046
2047-# Checks for header files.
2048-ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
2049-if test "x$ac_cv_type_size_t" = xyes; then :
2050-
2051-else
2052-
2053-cat >>confdefs.h <<_ACEOF
2054-#define size_t unsigned int
2055-_ACEOF
2056-
2057-fi
2058
2059-# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
2060-# for constant arguments. Useless!
2061-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
2062-$as_echo_n "checking for working alloca.h... " >&6; }
2063-if ${ac_cv_working_alloca_h+:} false; then :
2064- $as_echo_n "(cached) " >&6
2065-else
2066- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2067-/* end confdefs.h. */
2068-#include <alloca.h>
2069-int
2070-main ()
2071-{
2072-char *p = (char *) alloca (2 * sizeof (int));
2073- if (p) return 0;
2074- ;
2075- return 0;
2076-}
2077+for ac_func in cfmakeraw
2078+do :
2079+ ac_fn_c_check_func "$LINENO" "cfmakeraw" "ac_cv_func_cfmakeraw"
2080+if test "x$ac_cv_func_cfmakeraw" = xyes; then :
2081+ cat >>confdefs.h <<_ACEOF
2082+#define HAVE_CFMAKERAW 1
2083 _ACEOF
2084-if ac_fn_c_try_link "$LINENO"; then :
2085- ac_cv_working_alloca_h=yes
2086-else
2087- ac_cv_working_alloca_h=no
2088-fi
2089-rm -f core conftest.err conftest.$ac_objext \
2090- conftest$ac_exeext conftest.$ac_ext
2091-fi
2092-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
2093-$as_echo "$ac_cv_working_alloca_h" >&6; }
2094-if test $ac_cv_working_alloca_h = yes; then
2095-
2096-$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
2097
2098 fi
2099-
2100-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
2101-$as_echo_n "checking for alloca... " >&6; }
2102-if ${ac_cv_func_alloca_works+:} false; then :
2103- $as_echo_n "(cached) " >&6
2104-else
2105- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2106-/* end confdefs.h. */
2107-#ifdef __GNUC__
2108-# define alloca __builtin_alloca
2109-#else
2110-# ifdef _MSC_VER
2111-# include <malloc.h>
2112-# define alloca _alloca
2113-# else
2114-# ifdef HAVE_ALLOCA_H
2115-# include <alloca.h>
2116-# else
2117-# ifdef _AIX
2118- #pragma alloca
2119-# else
2120-# ifndef alloca /* predefined by HP cc +Olibcalls */
2121-void *alloca (size_t);
2122-# endif
2123-# endif
2124-# endif
2125-# endif
2126-#endif
2127-
2128-int
2129-main ()
2130-{
2131-char *p = (char *) alloca (1);
2132- if (p) return 0;
2133- ;
2134- return 0;
2135-}
2136-_ACEOF
2137-if ac_fn_c_try_link "$LINENO"; then :
2138- ac_cv_func_alloca_works=yes
2139-else
2140- ac_cv_func_alloca_works=no
2141-fi
2142-rm -f core conftest.err conftest.$ac_objext \
2143- conftest$ac_exeext conftest.$ac_ext
2144-fi
2145-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
2146-$as_echo "$ac_cv_func_alloca_works" >&6; }
2147-
2148-if test $ac_cv_func_alloca_works = yes; then
2149-
2150-$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
2151-
2152-else
2153- # The SVR3 libPW and SVR4 libucb both contain incompatible functions
2154-# that cause trouble. Some versions do not even contain alloca or
2155-# contain a buggy version. If you still want to use their alloca,
2156-# use ar to extract alloca.o from them instead of compiling alloca.c.
2157-
2158-ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
2159-
2160-$as_echo "#define C_ALLOCA 1" >>confdefs.h
2161-
2162-
2163-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
2164-$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
2165-if ${ac_cv_os_cray+:} false; then :
2166- $as_echo_n "(cached) " >&6
2167-else
2168- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2169-/* end confdefs.h. */
2170-#if defined CRAY && ! defined CRAY2
2171-webecray
2172-#else
2173-wenotbecray
2174-#endif
2175-
2176-_ACEOF
2177-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2178- $EGREP "webecray" >/dev/null 2>&1; then :
2179- ac_cv_os_cray=yes
2180-else
2181- ac_cv_os_cray=no
2182-fi
2183-rm -f conftest*
2184-
2185-fi
2186-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
2187-$as_echo "$ac_cv_os_cray" >&6; }
2188-if test $ac_cv_os_cray = yes; then
2189- for ac_func in _getb67 GETB67 getb67; do
2190- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
2191-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
2192-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
2193-
2194-cat >>confdefs.h <<_ACEOF
2195-#define CRAY_STACKSEG_END $ac_func
2196-_ACEOF
2197-
2198- break
2199-fi
2200-
2201- done
2202-fi
2203-
2204-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
2205-$as_echo_n "checking stack direction for C alloca... " >&6; }
2206-if ${ac_cv_c_stack_direction+:} false; then :
2207- $as_echo_n "(cached) " >&6
2208-else
2209- if test "$cross_compiling" = yes; then :
2210- ac_cv_c_stack_direction=0
2211-else
2212- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2213-/* end confdefs.h. */
2214-$ac_includes_default
2215-int
2216-find_stack_direction (int *addr, int depth)
2217-{
2218- int dir, dummy = 0;
2219- if (! addr)
2220- addr = &dummy;
2221- *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
2222- dir = depth ? find_stack_direction (addr, depth - 1) : 0;
2223- return dir + dummy;
2224-}
2225-
2226-int
2227-main (int argc, char **argv)
2228-{
2229- return find_stack_direction (0, argc + !argv + 20) < 0;
2230-}
2231-_ACEOF
2232-if ac_fn_c_try_run "$LINENO"; then :
2233- ac_cv_c_stack_direction=1
2234-else
2235- ac_cv_c_stack_direction=-1
2236-fi
2237-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2238- conftest.$ac_objext conftest.beam conftest.$ac_ext
2239-fi
2240-
2241-fi
2242-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
2243-$as_echo "$ac_cv_c_stack_direction" >&6; }
2244-cat >>confdefs.h <<_ACEOF
2245-#define STACK_DIRECTION $ac_cv_c_stack_direction
2246-_ACEOF
2247-
2248-
2249-fi
2250-
2251-ac_header_dirent=no
2252-for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
2253- as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
2254-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
2255-$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
2256-if eval \${$as_ac_Header+:} false; then :
2257- $as_echo_n "(cached) " >&6
2258-else
2259- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2260-/* end confdefs.h. */
2261-#include <sys/types.h>
2262-#include <$ac_hdr>
2263-
2264-int
2265-main ()
2266-{
2267-if ((DIR *) 0)
2268-return 0;
2269- ;
2270- return 0;
2271-}
2272-_ACEOF
2273-if ac_fn_c_try_compile "$LINENO"; then :
2274- eval "$as_ac_Header=yes"
2275-else
2276- eval "$as_ac_Header=no"
2277-fi
2278-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2279-fi
2280-eval ac_res=\$$as_ac_Header
2281- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2282-$as_echo "$ac_res" >&6; }
2283-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
2284- cat >>confdefs.h <<_ACEOF
2285-#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
2286-_ACEOF
2287-
2288-ac_header_dirent=$ac_hdr; break
2289-fi
2290-
2291-done
2292-# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2293-if test $ac_header_dirent = dirent.h; then
2294- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
2295-$as_echo_n "checking for library containing opendir... " >&6; }
2296-if ${ac_cv_search_opendir+:} false; then :
2297- $as_echo_n "(cached) " >&6
2298-else
2299- ac_func_search_save_LIBS=$LIBS
2300-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2301-/* end confdefs.h. */
2302-
2303-/* Override any GCC internal prototype to avoid an error.
2304- Use char because int might match the return type of a GCC
2305- builtin and then its argument prototype would still apply. */
2306-#ifdef __cplusplus
2307-extern "C"
2308-#endif
2309-char opendir ();
2310-int
2311-main ()
2312-{
2313-return opendir ();
2314- ;
2315- return 0;
2316-}
2317-_ACEOF
2318-for ac_lib in '' dir; do
2319- if test -z "$ac_lib"; then
2320- ac_res="none required"
2321- else
2322- ac_res=-l$ac_lib
2323- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
2324- fi
2325- if ac_fn_c_try_link "$LINENO"; then :
2326- ac_cv_search_opendir=$ac_res
2327-fi
2328-rm -f core conftest.err conftest.$ac_objext \
2329- conftest$ac_exeext
2330- if ${ac_cv_search_opendir+:} false; then :
2331- break
2332-fi
2333-done
2334-if ${ac_cv_search_opendir+:} false; then :
2335-
2336-else
2337- ac_cv_search_opendir=no
2338-fi
2339-rm conftest.$ac_ext
2340-LIBS=$ac_func_search_save_LIBS
2341-fi
2342-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
2343-$as_echo "$ac_cv_search_opendir" >&6; }
2344-ac_res=$ac_cv_search_opendir
2345-if test "$ac_res" != no; then :
2346- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
2347-
2348-fi
2349-
2350-else
2351- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
2352-$as_echo_n "checking for library containing opendir... " >&6; }
2353-if ${ac_cv_search_opendir+:} false; then :
2354- $as_echo_n "(cached) " >&6
2355-else
2356- ac_func_search_save_LIBS=$LIBS
2357-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2358-/* end confdefs.h. */
2359-
2360-/* Override any GCC internal prototype to avoid an error.
2361- Use char because int might match the return type of a GCC
2362- builtin and then its argument prototype would still apply. */
2363-#ifdef __cplusplus
2364-extern "C"
2365-#endif
2366-char opendir ();
2367-int
2368-main ()
2369-{
2370-return opendir ();
2371- ;
2372- return 0;
2373-}
2374-_ACEOF
2375-for ac_lib in '' x; do
2376- if test -z "$ac_lib"; then
2377- ac_res="none required"
2378- else
2379- ac_res=-l$ac_lib
2380- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
2381- fi
2382- if ac_fn_c_try_link "$LINENO"; then :
2383- ac_cv_search_opendir=$ac_res
2384-fi
2385-rm -f core conftest.err conftest.$ac_objext \
2386- conftest$ac_exeext
2387- if ${ac_cv_search_opendir+:} false; then :
2388- break
2389-fi
2390-done
2391-if ${ac_cv_search_opendir+:} false; then :
2392-
2393-else
2394- ac_cv_search_opendir=no
2395-fi
2396-rm conftest.$ac_ext
2397-LIBS=$ac_func_search_save_LIBS
2398-fi
2399-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
2400-$as_echo "$ac_cv_search_opendir" >&6; }
2401-ac_res=$ac_cv_search_opendir
2402-if test "$ac_res" != no; then :
2403- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
2404-
2405-fi
2406-
2407-fi
2408-
2409-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
2410-$as_echo_n "checking for ANSI C header files... " >&6; }
2411-if ${ac_cv_header_stdc+:} false; then :
2412- $as_echo_n "(cached) " >&6
2413-else
2414- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2415-/* end confdefs.h. */
2416-#include <stdlib.h>
2417-#include <stdarg.h>
2418-#include <string.h>
2419-#include <float.h>
2420-
2421-int
2422-main ()
2423-{
2424-
2425- ;
2426- return 0;
2427-}
2428-_ACEOF
2429-if ac_fn_c_try_compile "$LINENO"; then :
2430- ac_cv_header_stdc=yes
2431-else
2432- ac_cv_header_stdc=no
2433-fi
2434-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2435-
2436-if test $ac_cv_header_stdc = yes; then
2437- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2438- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2439-/* end confdefs.h. */
2440-#include <string.h>
2441-
2442-_ACEOF
2443-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2444- $EGREP "memchr" >/dev/null 2>&1; then :
2445-
2446-else
2447- ac_cv_header_stdc=no
2448-fi
2449-rm -f conftest*
2450-
2451-fi
2452-
2453-if test $ac_cv_header_stdc = yes; then
2454- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2455- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2456-/* end confdefs.h. */
2457-#include <stdlib.h>
2458-
2459-_ACEOF
2460-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2461- $EGREP "free" >/dev/null 2>&1; then :
2462-
2463-else
2464- ac_cv_header_stdc=no
2465-fi
2466-rm -f conftest*
2467-
2468-fi
2469-
2470-if test $ac_cv_header_stdc = yes; then
2471- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2472- if test "$cross_compiling" = yes; then :
2473- :
2474-else
2475- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2476-/* end confdefs.h. */
2477-#include <ctype.h>
2478-#include <stdlib.h>
2479-#if ((' ' & 0x0FF) == 0x020)
2480-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2481-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2482-#else
2483-# define ISLOWER(c) \
2484- (('a' <= (c) && (c) <= 'i') \
2485- || ('j' <= (c) && (c) <= 'r') \
2486- || ('s' <= (c) && (c) <= 'z'))
2487-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2488-#endif
2489-
2490-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2491-int
2492-main ()
2493-{
2494- int i;
2495- for (i = 0; i < 256; i++)
2496- if (XOR (islower (i), ISLOWER (i))
2497- || toupper (i) != TOUPPER (i))
2498- return 2;
2499- return 0;
2500-}
2501-_ACEOF
2502-if ac_fn_c_try_run "$LINENO"; then :
2503-
2504-else
2505- ac_cv_header_stdc=no
2506-fi
2507-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2508- conftest.$ac_objext conftest.beam conftest.$ac_ext
2509-fi
2510-
2511-fi
2512-fi
2513-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
2514-$as_echo "$ac_cv_header_stdc" >&6; }
2515-if test $ac_cv_header_stdc = yes; then
2516-
2517-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
2518-
2519-fi
2520-
2521-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
2522-$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
2523-if ${ac_cv_header_sys_wait_h+:} false; then :
2524- $as_echo_n "(cached) " >&6
2525-else
2526- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2527-/* end confdefs.h. */
2528-#include <sys/types.h>
2529-#include <sys/wait.h>
2530-#ifndef WEXITSTATUS
2531-# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
2532-#endif
2533-#ifndef WIFEXITED
2534-# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2535-#endif
2536-
2537-int
2538-main ()
2539-{
2540- int s;
2541- wait (&s);
2542- s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2543- ;
2544- return 0;
2545-}
2546-_ACEOF
2547-if ac_fn_c_try_compile "$LINENO"; then :
2548- ac_cv_header_sys_wait_h=yes
2549-else
2550- ac_cv_header_sys_wait_h=no
2551-fi
2552-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2553-fi
2554-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
2555-$as_echo "$ac_cv_header_sys_wait_h" >&6; }
2556-if test $ac_cv_header_sys_wait_h = yes; then
2557-
2558-$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
2559-
2560-fi
2561-
2562-for ac_header in fcntl.h limits.h malloc.h stdlib.h string.h sys/ioctl.h sys/param.h termios.h unistd.h curses.h ncurses.h sys/cdefs.h
2563-do :
2564- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
2565-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
2566-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
2567- cat >>confdefs.h <<_ACEOF
2568-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
2569-_ACEOF
2570-
2571-fi
2572-
2573-done
2574-
2575-
2576-## include curses.h to prevent "Present But Cannot Be Compiled"
2577-for ac_header in term.h
2578-do :
2579- ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
2580-# include <curses.h>
2581-#elif HAVE_NCURSES_H
2582-# include <ncurses.h>
2583-#endif
2584-
2585-"
2586-if test "x$ac_cv_header_term_h" = xyes; then :
2587- cat >>confdefs.h <<_ACEOF
2588-#define HAVE_TERM_H 1
2589-_ACEOF
2590-
2591-fi
2592-
2593-done
2594-
2595-
2596-for ac_func in wresize vw_printw cfmakeraw
2597-do :
2598- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
2599-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
2600-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
2601- cat >>confdefs.h <<_ACEOF
2602-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
2603-_ACEOF
2604-
2605-fi
2606-done
2607-
2608-
2609-# Checks for typedefs, structures, and compiler characteristics.
2610-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
2611-$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
2612-if ${ac_cv_c_const+:} false; then :
2613- $as_echo_n "(cached) " >&6
2614-else
2615- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2616-/* end confdefs.h. */
2617-
2618-int
2619-main ()
2620-{
2621-
2622-#ifndef __cplusplus
2623- /* Ultrix mips cc rejects this sort of thing. */
2624- typedef int charset[2];
2625- const charset cs = { 0, 0 };
2626- /* SunOS 4.1.1 cc rejects this. */
2627- char const *const *pcpcc;
2628- char **ppc;
2629- /* NEC SVR4.0.2 mips cc rejects this. */
2630- struct point {int x, y;};
2631- static struct point const zero = {0,0};
2632- /* AIX XL C 1.02.0.0 rejects this.
2633- It does not let you subtract one const X* pointer from another in
2634- an arm of an if-expression whose if-part is not a constant
2635- expression */
2636- const char *g = "string";
2637- pcpcc = &g + (g ? g-g : 0);
2638- /* HPUX 7.0 cc rejects these. */
2639- ++pcpcc;
2640- ppc = (char**) pcpcc;
2641- pcpcc = (char const *const *) ppc;
2642- { /* SCO 3.2v4 cc rejects this sort of thing. */
2643- char tx;
2644- char *t = &tx;
2645- char const *s = 0 ? (char *) 0 : (char const *) 0;
2646-
2647- *t++ = 0;
2648- if (s) return 0;
2649- }
2650- { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
2651- int x[] = {25, 17};
2652- const int *foo = &x[0];
2653- ++foo;
2654- }
2655- { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2656- typedef const int *iptr;
2657- iptr p = 0;
2658- ++p;
2659- }
2660- { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
2661- "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2662- struct s { int j; const int *ap[3]; } bx;
2663- struct s *b = &bx; b->j = 5;
2664- }
2665- { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2666- const int foo = 10;
2667- if (!foo) return 0;
2668- }
2669- return !cs[0] && !zero.x;
2670-#endif
2671-
2672- ;
2673- return 0;
2674-}
2675-_ACEOF
2676-if ac_fn_c_try_compile "$LINENO"; then :
2677- ac_cv_c_const=yes
2678-else
2679- ac_cv_c_const=no
2680-fi
2681-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2682-fi
2683-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
2684-$as_echo "$ac_cv_c_const" >&6; }
2685-if test $ac_cv_c_const = no; then
2686-
2687-$as_echo "#define const /**/" >>confdefs.h
2688-
2689-fi
2690-
2691-ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
2692-if test "x$ac_cv_type_pid_t" = xyes; then :
2693-
2694-else
2695-
2696-cat >>confdefs.h <<_ACEOF
2697-#define pid_t int
2698-_ACEOF
2699-
2700-fi
2701-
2702-ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
2703-if test "x$ac_cv_type_size_t" = xyes; then :
2704-
2705-else
2706-
2707-cat >>confdefs.h <<_ACEOF
2708-#define size_t unsigned int
2709-_ACEOF
2710-
2711-fi
2712-
2713-ac_fn_c_check_type "$LINENO" "u_int32_t" "ac_cv_type_u_int32_t" "$ac_includes_default"
2714-if test "x$ac_cv_type_u_int32_t" = xyes; then :
2715-
2716-cat >>confdefs.h <<_ACEOF
2717-#define HAVE_U_INT32_T 1
2718-_ACEOF
2719-
2720-
2721-fi
2722-
2723-
2724-# Checks for library functions.
2725-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether closedir returns void" >&5
2726-$as_echo_n "checking whether closedir returns void... " >&6; }
2727-if ${ac_cv_func_closedir_void+:} false; then :
2728- $as_echo_n "(cached) " >&6
2729-else
2730- if test "$cross_compiling" = yes; then :
2731- ac_cv_func_closedir_void=yes
2732-else
2733- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2734-/* end confdefs.h. */
2735-$ac_includes_default
2736-#include <$ac_header_dirent>
2737-#ifndef __cplusplus
2738-int closedir ();
2739-#endif
2740-
2741-int
2742-main ()
2743-{
2744-return closedir (opendir (".")) != 0;
2745- ;
2746- return 0;
2747-}
2748-_ACEOF
2749-if ac_fn_c_try_run "$LINENO"; then :
2750- ac_cv_func_closedir_void=no
2751-else
2752- ac_cv_func_closedir_void=yes
2753-fi
2754-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2755- conftest.$ac_objext conftest.beam conftest.$ac_ext
2756-fi
2757-
2758-fi
2759-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_closedir_void" >&5
2760-$as_echo "$ac_cv_func_closedir_void" >&6; }
2761-if test $ac_cv_func_closedir_void = yes; then
2762-
2763-$as_echo "#define CLOSEDIR_VOID 1" >>confdefs.h
2764-
2765-fi
2766-
2767-for ac_header in vfork.h
2768-do :
2769- ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
2770-if test "x$ac_cv_header_vfork_h" = xyes; then :
2771- cat >>confdefs.h <<_ACEOF
2772-#define HAVE_VFORK_H 1
2773-_ACEOF
2774-
2775-fi
2776-
2777 done
2778
2779-for ac_func in fork vfork
2780-do :
2781- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
2782-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
2783-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
2784- cat >>confdefs.h <<_ACEOF
2785-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
2786-_ACEOF
2787-
2788-fi
2789-done
2790-
2791-if test "x$ac_cv_func_fork" = xyes; then
2792- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
2793-$as_echo_n "checking for working fork... " >&6; }
2794-if ${ac_cv_func_fork_works+:} false; then :
2795- $as_echo_n "(cached) " >&6
2796-else
2797- if test "$cross_compiling" = yes; then :
2798- ac_cv_func_fork_works=cross
2799-else
2800- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2801-/* end confdefs.h. */
2802-$ac_includes_default
2803-int
2804-main ()
2805-{
2806-
2807- /* By Ruediger Kuhlmann. */
2808- return fork () < 0;
2809-
2810- ;
2811- return 0;
2812-}
2813-_ACEOF
2814-if ac_fn_c_try_run "$LINENO"; then :
2815- ac_cv_func_fork_works=yes
2816-else
2817- ac_cv_func_fork_works=no
2818-fi
2819-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2820- conftest.$ac_objext conftest.beam conftest.$ac_ext
2821-fi
2822-
2823-fi
2824-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
2825-$as_echo "$ac_cv_func_fork_works" >&6; }
2826-
2827-else
2828- ac_cv_func_fork_works=$ac_cv_func_fork
2829-fi
2830-if test "x$ac_cv_func_fork_works" = xcross; then
2831- case $host in
2832- *-*-amigaos* | *-*-msdosdjgpp*)
2833- # Override, as these systems have only a dummy fork() stub
2834- ac_cv_func_fork_works=no
2835- ;;
2836- *)
2837- ac_cv_func_fork_works=yes
2838- ;;
2839- esac
2840- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
2841-$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
2842-fi
2843-ac_cv_func_vfork_works=$ac_cv_func_vfork
2844-if test "x$ac_cv_func_vfork" = xyes; then
2845- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
2846-$as_echo_n "checking for working vfork... " >&6; }
2847-if ${ac_cv_func_vfork_works+:} false; then :
2848- $as_echo_n "(cached) " >&6
2849-else
2850- if test "$cross_compiling" = yes; then :
2851- ac_cv_func_vfork_works=cross
2852-else
2853- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2854-/* end confdefs.h. */
2855-/* Thanks to Paul Eggert for this test. */
2856-$ac_includes_default
2857-#include <sys/wait.h>
2858-#ifdef HAVE_VFORK_H
2859-# include <vfork.h>
2860-#endif
2861-/* On some sparc systems, changes by the child to local and incoming
2862- argument registers are propagated back to the parent. The compiler
2863- is told about this with #include <vfork.h>, but some compilers
2864- (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
2865- static variable whose address is put into a register that is
2866- clobbered by the vfork. */
2867-static void
2868-#ifdef __cplusplus
2869-sparc_address_test (int arg)
2870-# else
2871-sparc_address_test (arg) int arg;
2872-#endif
2873-{
2874- static pid_t child;
2875- if (!child) {
2876- child = vfork ();
2877- if (child < 0) {
2878- perror ("vfork");
2879- _exit(2);
2880- }
2881- if (!child) {
2882- arg = getpid();
2883- write(-1, "", 0);
2884- _exit (arg);
2885- }
2886- }
2887-}
2888-
2889-int
2890-main ()
2891-{
2892- pid_t parent = getpid ();
2893- pid_t child;
2894-
2895- sparc_address_test (0);
2896-
2897- child = vfork ();
2898-
2899- if (child == 0) {
2900- /* Here is another test for sparc vfork register problems. This
2901- test uses lots of local variables, at least as many local
2902- variables as main has allocated so far including compiler
2903- temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
2904- 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
2905- reuse the register of parent for one of the local variables,
2906- since it will think that parent can't possibly be used any more
2907- in this routine. Assigning to the local variable will thus
2908- munge parent in the parent process. */
2909- pid_t
2910- p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
2911- p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
2912- /* Convince the compiler that p..p7 are live; otherwise, it might
2913- use the same hardware register for all 8 local variables. */
2914- if (p != p1 || p != p2 || p != p3 || p != p4
2915- || p != p5 || p != p6 || p != p7)
2916- _exit(1);
2917-
2918- /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
2919- from child file descriptors. If the child closes a descriptor
2920- before it execs or exits, this munges the parent's descriptor
2921- as well. Test for this by closing stdout in the child. */
2922- _exit(close(fileno(stdout)) != 0);
2923- } else {
2924- int status;
2925- struct stat st;
2926-
2927- while (wait(&status) != child)
2928- ;
2929- return (
2930- /* Was there some problem with vforking? */
2931- child < 0
2932-
2933- /* Did the child fail? (This shouldn't happen.) */
2934- || status
2935-
2936- /* Did the vfork/compiler bug occur? */
2937- || parent != getpid()
2938-
2939- /* Did the file descriptor bug occur? */
2940- || fstat(fileno(stdout), &st) != 0
2941- );
2942- }
2943-}
2944-_ACEOF
2945-if ac_fn_c_try_run "$LINENO"; then :
2946- ac_cv_func_vfork_works=yes
2947-else
2948- ac_cv_func_vfork_works=no
2949-fi
2950-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2951- conftest.$ac_objext conftest.beam conftest.$ac_ext
2952-fi
2953-
2954-fi
2955-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
2956-$as_echo "$ac_cv_func_vfork_works" >&6; }
2957-
2958-fi;
2959-if test "x$ac_cv_func_fork_works" = xcross; then
2960- ac_cv_func_vfork_works=$ac_cv_func_vfork
2961- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
2962-$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
2963-fi
2964-
2965-if test "x$ac_cv_func_vfork_works" = xyes; then
2966-
2967-$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
2968-
2969-else
2970-
2971-$as_echo "#define vfork fork" >>confdefs.h
2972-
2973-fi
2974-if test "x$ac_cv_func_fork_works" = xyes; then
2975-
2976-$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
2977-
2978-fi
2979-
2980-for ac_func in strlcpy strlcat fgetln
2981-do :
2982- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
2983-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
2984-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
2985- cat >>confdefs.h <<_ACEOF
2986-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
2987-_ACEOF
2988-
2989-fi
2990-done
2991-
2992-if test $ac_cv_c_compiler_gnu = yes; then
2993- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
2994-$as_echo_n "checking whether $CC needs -traditional... " >&6; }
2995-if ${ac_cv_prog_gcc_traditional+:} false; then :
2996- $as_echo_n "(cached) " >&6
2997-else
2998- ac_pattern="Autoconf.*'x'"
2999- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3000-/* end confdefs.h. */
3001-#include <sgtty.h>
3002-Autoconf TIOCGETP
3003-_ACEOF
3004-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3005- $EGREP "$ac_pattern" >/dev/null 2>&1; then :
3006- ac_cv_prog_gcc_traditional=yes
3007-else
3008- ac_cv_prog_gcc_traditional=no
3009-fi
3010-rm -f conftest*
3011-
3012-
3013- if test $ac_cv_prog_gcc_traditional = no; then
3014- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3015-/* end confdefs.h. */
3016-#include <termio.h>
3017-Autoconf TCGETA
3018-_ACEOF
3019-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3020- $EGREP "$ac_pattern" >/dev/null 2>&1; then :
3021- ac_cv_prog_gcc_traditional=yes
3022-fi
3023-rm -f conftest*
3024-
3025- fi
3026-fi
3027-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
3028-$as_echo "$ac_cv_prog_gcc_traditional" >&6; }
3029- if test $ac_cv_prog_gcc_traditional = yes; then
3030- CC="$CC -traditional"
3031- fi
3032-fi
3033-
3034-## _AIX is offended by rpl_malloc and rpl_realloc
3035-#AC_FUNC_MALLOC
3036-#AC_FUNC_REALLOC
3037-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
3038-$as_echo_n "checking return type of signal handlers... " >&6; }
3039-if ${ac_cv_type_signal+:} false; then :
3040- $as_echo_n "(cached) " >&6
3041-else
3042- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3043-/* end confdefs.h. */
3044-#include <sys/types.h>
3045-#include <signal.h>
3046-
3047-int
3048-main ()
3049-{
3050-return *(signal (0, 0)) (0) == 1;
3051- ;
3052- return 0;
3053-}
3054-_ACEOF
3055-if ac_fn_c_try_compile "$LINENO"; then :
3056- ac_cv_type_signal=int
3057-else
3058- ac_cv_type_signal=void
3059-fi
3060-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3061-fi
3062-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
3063-$as_echo "$ac_cv_type_signal" >&6; }
3064-
3065-cat >>confdefs.h <<_ACEOF
3066-#define RETSIGTYPE $ac_cv_type_signal
3067-_ACEOF
3068-
3069-
3070-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
3071-$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
3072-if ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
3073- $as_echo_n "(cached) " >&6
3074-else
3075- rm -f conftest.sym conftest.file
3076-echo >conftest.file
3077-if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
3078- if test "$cross_compiling" = yes; then :
3079- ac_cv_func_lstat_dereferences_slashed_symlink=no
3080-else
3081- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3082-/* end confdefs.h. */
3083-$ac_includes_default
3084-int
3085-main ()
3086-{
3087-struct stat sbuf;
3088- /* Linux will dereference the symlink and fail, as required by POSIX.
3089- That is better in the sense that it means we will not
3090- have to compile and use the lstat wrapper. */
3091- return lstat ("conftest.sym/", &sbuf) == 0;
3092- ;
3093- return 0;
3094-}
3095-_ACEOF
3096-if ac_fn_c_try_run "$LINENO"; then :
3097- ac_cv_func_lstat_dereferences_slashed_symlink=yes
3098-else
3099- ac_cv_func_lstat_dereferences_slashed_symlink=no
3100-fi
3101-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3102- conftest.$ac_objext conftest.beam conftest.$ac_ext
3103-fi
3104-
3105-else
3106- # If the `ln -s' command failed, then we probably don't even
3107- # have an lstat function.
3108- ac_cv_func_lstat_dereferences_slashed_symlink=no
3109-fi
3110-rm -f conftest.sym conftest.file
3111-
3112-fi
3113-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5
3114-$as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; }
3115-
3116-test $ac_cv_func_lstat_dereferences_slashed_symlink = yes &&
3117-
3118-cat >>confdefs.h <<_ACEOF
3119-#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
3120-_ACEOF
3121-
3122-
3123-if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then
3124- case " $LIBOBJS " in
3125- *" lstat.$ac_objext "* ) ;;
3126- *) LIBOBJS="$LIBOBJS lstat.$ac_objext"
3127- ;;
3128-esac
3129-
3130-fi
3131-
3132-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5
3133-$as_echo_n "checking whether stat accepts an empty string... " >&6; }
3134-if ${ac_cv_func_stat_empty_string_bug+:} false; then :
3135- $as_echo_n "(cached) " >&6
3136-else
3137- if test "$cross_compiling" = yes; then :
3138- ac_cv_func_stat_empty_string_bug=yes
3139-else
3140- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3141-/* end confdefs.h. */
3142-$ac_includes_default
3143-int
3144-main ()
3145-{
3146-struct stat sbuf;
3147- return stat ("", &sbuf) == 0;
3148- ;
3149- return 0;
3150-}
3151-_ACEOF
3152-if ac_fn_c_try_run "$LINENO"; then :
3153- ac_cv_func_stat_empty_string_bug=no
3154-else
3155- ac_cv_func_stat_empty_string_bug=yes
3156-fi
3157-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3158- conftest.$ac_objext conftest.beam conftest.$ac_ext
3159-fi
3160-
3161-fi
3162-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5
3163-$as_echo "$ac_cv_func_stat_empty_string_bug" >&6; }
3164-if test $ac_cv_func_stat_empty_string_bug = yes; then
3165- case " $LIBOBJS " in
3166- *" stat.$ac_objext "* ) ;;
3167- *) LIBOBJS="$LIBOBJS stat.$ac_objext"
3168- ;;
3169-esac
3170-
3171-
3172-cat >>confdefs.h <<_ACEOF
3173-#define HAVE_STAT_EMPTY_STRING_BUG 1
3174-_ACEOF
3175-
3176-fi
3177-
3178-for ac_func in endpwent isascii memchr memset re_comp regcomp strcasecmp strchr strcspn strdup strerror strrchr strstr strtol issetugid
3179-do :
3180- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
3181-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
3182-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
3183- cat >>confdefs.h <<_ACEOF
3184-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
3185-_ACEOF
3186-
3187-fi
3188-done
3189-
3190-
3191- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpwnam_r and getpwuid_r are posix like" >&5
3192-$as_echo_n "checking whether getpwnam_r and getpwuid_r are posix like... " >&6; }
3193- # The prototype for the POSIX version is:
3194- # int getpwnam_r(char *, struct passwd *, char *, size_t, struct passwd **)
3195- # int getpwuid_r(uid_t, struct passwd *, char *, size_t, struct passwd **);
3196- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3197-/* end confdefs.h. */
3198-#include <stdlib.h>
3199- #include <sys/types.h>
3200- #include <pwd.h>
3201-int
3202-main ()
3203-{
3204-getpwnam_r(NULL, NULL, NULL, (size_t)0, NULL);
3205- getpwuid_r((uid_t)0, NULL, NULL, (size_t)0, NULL);
3206- ;
3207- return 0;
3208-}
3209-_ACEOF
3210-if ac_fn_c_try_link "$LINENO"; then :
3211-
3212-$as_echo "#define HAVE_GETPW_R_POSIX 1" >>confdefs.h
3213-
3214- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3215-$as_echo "yes" >&6; }
3216-else
3217- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3218-$as_echo "no" >&6; }
3219-fi
3220-rm -f core conftest.err conftest.$ac_objext \
3221- conftest$ac_exeext conftest.$ac_ext
3222-
3223-
3224- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpwnam_r and getpwuid_r are posix _draft_ like" >&5
3225-$as_echo_n "checking whether getpwnam_r and getpwuid_r are posix _draft_ like... " >&6; }
3226- # The prototype for the POSIX draft version is:
3227- # struct passwd *getpwuid_r(uid_t, struct passwd *, char *, int);
3228- # struct passwd *getpwnam_r(char *, struct passwd *, char *, int);
3229- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3230-/* end confdefs.h. */
3231-#include <stdlib.h>
3232- #include <sys/types.h>
3233- #include <pwd.h>
3234-int
3235-main ()
3236-{
3237-getpwnam_r(NULL, NULL, NULL, (size_t)0);
3238- getpwuid_r((uid_t)0, NULL, NULL, (size_t)0);
3239- ;
3240- return 0;
3241-}
3242-_ACEOF
3243-if ac_fn_c_try_link "$LINENO"; then :
3244-
3245-$as_echo "#define HAVE_GETPW_R_DRAFT 1" >>confdefs.h
3246-
3247- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3248-$as_echo "yes" >&6; }
3249-else
3250- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3251-$as_echo "no" >&6; }
3252-fi
3253-rm -f core conftest.err conftest.$ac_objext \
3254- conftest$ac_exeext conftest.$ac_ext
3255-
3256-
3257-
3258-# End of libedit inclusions
3259
3260 if test "${build}" != "${host}" ; then
3261 for ac_prog in ${build_alias}-gcc ${build}-gcc gcc
3262@@ -15719,7 +14891,7 @@ else
3263 fi
3264
3265
3266-ac_config_files="$ac_config_files Makefile utils/Makefile lib/Makefile unix/Makefile glib/Makefile tcl/Makefile ui/Makefile lanserv/Makefile lanserv/OpenIPMI/Makefile lanserv/sdrcomp/Makefile lanserv/marvell-bmc/Makefile sample/Makefile doc/Makefile man/Makefile swig/Makefile swig/perl/Makefile swig/python/Makefile swig/python/openipmigui/Makefile libedit/Makefile cmdlang/Makefile include/Makefile include/OpenIPMI/Makefile include/OpenIPMI/ipmiif.h include/OpenIPMI/internal/Makefile OpenIPMI.spec OpenIPMIutils.pc OpenIPMI.pc OpenIPMIpthread.pc OpenIPMIposix.pc OpenIPMIglib.pc OpenIPMItcl.pc OpenIPMIcmdlang.pc OpenIPMIui.pc"
3267+ac_config_files="$ac_config_files Makefile utils/Makefile lib/Makefile unix/Makefile glib/Makefile tcl/Makefile ui/Makefile lanserv/Makefile lanserv/OpenIPMI/Makefile lanserv/sdrcomp/Makefile lanserv/marvell-bmc/Makefile sample/Makefile doc/Makefile man/Makefile swig/Makefile swig/perl/Makefile swig/python/Makefile swig/python/openipmigui/Makefile cmdlang/Makefile include/Makefile include/OpenIPMI/Makefile include/OpenIPMI/ipmiif.h include/OpenIPMI/internal/Makefile OpenIPMI.spec OpenIPMIutils.pc OpenIPMI.pc OpenIPMIpthread.pc OpenIPMIposix.pc OpenIPMIglib.pc OpenIPMItcl.pc OpenIPMIcmdlang.pc OpenIPMIui.pc"
3268
3269 cat >confcache <<\_ACEOF
3270 # This file is a shell script that caches the results of configure
3271@@ -16255,7 +15427,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
3272 # report actual input values of CONFIG_FILES etc. instead of their
3273 # values after options handling.
3274 ac_log="
3275-This file was extended by OpenIPMI $as_me 2.0.25, which was
3276+This file was extended by OpenIPMI $as_me 2.0.27, which was
3277 generated by GNU Autoconf 2.69. Invocation command line was
3278
3279 CONFIG_FILES = $CONFIG_FILES
3280@@ -16321,7 +15493,7 @@ _ACEOF
3281 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
3282 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
3283 ac_cs_version="\\
3284-OpenIPMI config.status 2.0.25
3285+OpenIPMI config.status 2.0.27
3286 configured by $0, generated by GNU Autoconf 2.69,
3287 with options \\"\$ac_cs_config\\"
3288
3289@@ -16754,7 +15926,6 @@ do
3290 "swig/perl/Makefile") CONFIG_FILES="$CONFIG_FILES swig/perl/Makefile" ;;
3291 "swig/python/Makefile") CONFIG_FILES="$CONFIG_FILES swig/python/Makefile" ;;
3292 "swig/python/openipmigui/Makefile") CONFIG_FILES="$CONFIG_FILES swig/python/openipmigui/Makefile" ;;
3293- "libedit/Makefile") CONFIG_FILES="$CONFIG_FILES libedit/Makefile" ;;
3294 "cmdlang/Makefile") CONFIG_FILES="$CONFIG_FILES cmdlang/Makefile" ;;
3295 "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
3296 "include/OpenIPMI/Makefile") CONFIG_FILES="$CONFIG_FILES include/OpenIPMI/Makefile" ;;
3297@@ -17472,7 +16643,6 @@ $as_echo X"$file" |
3298 cat <<_LT_EOF >> "$cfgfile"
3299 #! $SHELL
3300 # Generated automatically by $as_me ($PACKAGE) $VERSION
3301-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3302 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
3303
3304 # Provide generalized library-building support services.
3305diff --git a/configure.ac b/configure.ac
3306index f8bb95f..0461041 100644
3307--- a/configure.ac
3308+++ b/configure.ac
3309@@ -1,5 +1,5 @@
3310 OPENIPMI_PKG_NAME=OpenIPMI
3311-AC_INIT([OpenIPMI], [2.0.25], [minyard@acm.org], [OpenIPMI])
3312+AC_INIT([OpenIPMI], [2.0.27], [minyard@acm.org], [OpenIPMI])
3313 AC_CANONICAL_TARGET
3314 AM_INIT_AUTOMAKE([-Wall])
3315 AC_CONFIG_HEADER([config.h])
3316@@ -9,7 +9,7 @@ AC_CONFIG_MACRO_DIR([m4])
3317
3318 AC_SUBST(OPENIPMI_VERSION_MAJOR, 2)
3319 AC_SUBST(OPENIPMI_VERSION_MINOR, 0)
3320-AC_SUBST(OPENIPMI_VERSION_RELEASE, 25)
3321+AC_SUBST(OPENIPMI_VERSION_RELEASE, 27)
3322 AC_SUBST(OPENIPMI_VERSION_EXTRA, )
3323
3324
3325@@ -187,14 +187,18 @@ AC_ARG_WITH(perlusepthreads,
3326 fi,
3327 )
3328
3329+pythonprog=
3330 trypython=yes
3331 AC_ARG_WITH(python,
3332 [ --with-python[[=yes|no|PATH]] Look for python, with the optional path.],
3333- if test "x$withval" = "xyes"; then
3334+ if test "x$withval" = "x"; then
3335+ trypython=yes
3336+ elif test "x$withval" = "xyes"; then
3337 trypython=yes
3338 elif test "x$withval" = "xno"; then
3339 trypython=no
3340- elif test -d "$withval"; then
3341+ else
3342+ pythonprog="$withval"
3343 trypython=yes
3344 fi,
3345 )
3346@@ -340,33 +344,22 @@ if test "x$haveglib" = "xyes"; then
3347 GLIB_SO='$(top_builddir)/glib/.libs/libOpenIPMIglib.so'
3348 GLIB_PKGCONF=OpenIPMIglib.pc
3349 GLIB_TARGET=libOpenIPMIglib.la
3350+ GLIB_DIR=glib
3351 else
3352 GLIB_LIB=
3353 GLIB_SO=
3354 GLIB_PKGCONF=
3355 GLIB_TARGET=
3356+ GLIB_DIR=
3357 fi
3358 AC_SUBST(GLIB_VERSION)
3359 AC_SUBST(GLIB_CFLAGS)
3360 AC_SUBST(GLIB_LIBS)
3361-
3362 AC_SUBST(GLIB_LIB)
3363 AC_SUBST(GLIB_SO)
3364 AC_SUBST(GLIB_PKGCONF)
3365 AC_SUBST(GLIB_TARGET)
3366-
3367-if test "x$haveglib" = "xyes"; then
3368- GLIB_DIR=glib
3369- GLIB_SINGLE_LIB=$GLIB_LIB
3370- GLIB_SINGLE_SO=$GLIB_SO
3371-else
3372- GLIB_DIR=
3373- GLIB_SINGLE_LIB=
3374- GLIB_SINGLE_SO=
3375-fi
3376 AC_SUBST(GLIB_DIR)
3377-AC_SUBST(GLIB_SINGLE_LIB)
3378-AC_SUBST(GLIB_SINGLE_SO)
3379
3380 # Handle TCL support
3381 TCL_LIBS=
3382@@ -376,17 +369,16 @@ if test "x$trytcl" != "xno"; then
3383 FOUND_TCL_HEADER=no
3384 ver=`echo 'puts \$tcl_version' | tclsh`
3385 if test "x$tclcflags" = "x"; then
3386- AC_CHECK_HEADER(tcl.h, FOUND_TCL_HEADER=yes; )
3387+ AC_CHECK_HEADER(tcl/tcl.h, FOUND_TCL_HEADER=yes; )
3388 if test "x$FOUND_TCL_HEADER" != "xyes"; then
3389- echo -n "checking for /usr/include/tcl$ver... "
3390- if test 'x$ver' != 'x' -a -d "/usr/include/tcl$ver"; then
3391- echo "yes"
3392+ AC_CHECK_HEADER(tcl/tcl.h, FOUND_TCL_HEADER=yes; )
3393+ if test "x$FOUND_TCL_HEADER" == "xyes"; then
3394 tclcflags="-I /usr/include/tcl$ver"
3395 TCL_CFLAGS="$tclcflags"
3396- FOUND_TCL_HEADER=yes
3397- else
3398- echo "no"
3399 fi
3400+ else
3401+ tclcflags="-I /usr/include/tcl"
3402+ TCL_CFLAGS="$tclcflags"
3403 fi
3404 else
3405 TCL_CFLAGS="$tclcflags"
3406@@ -523,87 +515,65 @@ AC_SUBST(PERL_POSIX_LIB)
3407 AC_SUBST(PERL_POSIX_SO)
3408
3409 # Handle PYTHON support
3410-if test "x$pythoncflags" = "x" -o "x$pythoninstalldir" = "x"; then
3411- pythonprog=
3412- if test "x$trypython" != "xno"; then
3413- AC_PATH_PROG(pythonprog, python)
3414- fi
3415+PYTHON_DIR=
3416+PYTHON_INSTALL_DIR=
3417+PYTHON_INSTALL_LIB_DIR=
3418+PYTHON_SWIG_FLAGS=
3419+if test "x$trypython" = "xyes"; then
3420 if test "x$pythonprog" != "x"; then
3421- # Now find a proper installation location.
3422- if test "x$pythoninstalldir" = "x"; then
3423- pythoninstalldir=`$pythonprog -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_lib());'`
3424- if test "x$pythoninstalldir" = "x" -o ! -d "$pythoninstalldir"; then
3425- pythoninstalldir=
3426- fi
3427- fi
3428+ PYTHON="$pythonprog"
3429 fi
3430-
3431- if test "x$pythoncflags" = "x"; then
3432- pythoninc=`$pythonprog -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_inc());'`
3433- if test "x$pythoninc" != "x"; then
3434- pythoncflags="-I$pythoninc"
3435- else
3436- pythoncflags=""
3437- fi
3438- else
3439- PYTHON_CFLAGS="$pythoncflags"
3440+ if test "x$pythoncflags" != "x"; then
3441+ PYTHON_CPPFLAGS="$pythoncflags"
3442 fi
3443-
3444- if test "x$pythoninstalldir" != "x"; then
3445- if test "x$pythoninstalllibdir" = "x"; then
3446- pythoninstalllibdir=$pythoninstalldir
3447- fi
3448- AC_DEFINE([HAVE_PYTHON], [], [Have Python installed])
3449- PYTHON_DIR=python
3450- PYTHON_CFLAGS="$pythoncflags"
3451- PYTHON_INSTALL_DIR="$pythoninstalldir"
3452- PYTHON_INSTALL_LIB_DIR="$pythoninstalllibdir"
3453+ AX_PYTHON_DEVEL
3454+fi
3455+if test "x$PYTHON" != "x"; then
3456+ AX_PROG_PYTHON_VERSION([3.0.0], [PYTHON_SWIG_FLAGS=-py3], [])
3457+ AC_DEFINE([HAVE_PYTHON], [], [Have Python installed])
3458+ PYTHON_DIR=python
3459+ if test "x$pythoninstalldir" = "x"; then
3460+ PYTHON_INSTALL_DIR="$PYTHON_SITE_PKG"
3461 else
3462- PYTHON_DIR=
3463- PYTHON_CFLAGS=
3464- PYTHON_INSTALL_DIR=
3465- PYTHON_INSTALL_LIB_DIR=
3466+ PYTHON_INSTALL_DIR="$pythoninstalldir"
3467 fi
3468-else
3469 if test "x$pythoninstalllibdir" = "x"; then
3470- pythoninstalllibdir=$pythoninstalldir
3471+ PYTHON_INSTALL_LIB_DIR="$PYTHON_INSTALL_DIR"
3472+ else
3473+ PYTHON_INSTALL_LIB_DIR="$pythoninstalllibdir"
3474 fi
3475- AC_DEFINE([HAVE_PYTHON], [], [Have Python installed])
3476- PYTHON_DIR=python
3477- PYTHON_CFLAGS="$pythoncflags"
3478- PYTHON_INSTALL_DIR="$pythoninstalldir"
3479- PYTHON_INSTALL_LIB_DIR="$pythoninstalllibdir"
3480-fi
3481-if test "x$pythonprog" != "x"; then
3482+
3483 if test "x$pythonusepthreads" = "x"; then
3484 cat - <<_ACEOF >conftest.py
3485 try:
3486- import thread
3487+ import threading
3488 print('yes')
3489 except:
3490 print('no')
3491 _ACEOF
3492- pythonusepthreads=`python conftest.py`
3493+ pythonusepthreads=`$PYTHON conftest.py`
3494 rm -f conftest.py
3495 fi
3496 echo "checking for python threads... $pythonusepthreads"
3497+
3498+ if test "x$pythonusepthreads" = "xyes"; then
3499+ PYTHON_HAS_POSIX_THREADS=1
3500+ PYTHON_POSIX_LIB='$(top_builddir)/unix/libOpenIPMIpthread.la'
3501+ PYTHON_POSIX_SO='$(top_builddir)/unix/.libs/libOpenIPMIpthread.so'
3502+ else
3503+ PYTHON_HAS_POSIX_THREADS=0
3504+ PYTHON_POSIX_LIB='$(top_builddir)/unix/libOpenIPMIposix.la'
3505+ PYTHON_POSIX_SO='$(top_builddir)/unix/.libs/libOpenIPMIposix.so'
3506+ fi
3507 fi
3508-if test "x$pythonusepthreads" = "xyes"; then
3509- PYTHON_HAS_POSIX_THREADS=1
3510- PYTHON_POSIX_LIB='$(top_builddir)/unix/libOpenIPMIpthread.la'
3511- PYTHON_POSIX_SO='$(top_builddir)/unix/.libs/libOpenIPMIpthread.so'
3512-else
3513- PYTHON_HAS_POSIX_THREADS=0
3514- PYTHON_POSIX_LIB='$(top_builddir)/unix/libOpenIPMIposix.la'
3515- PYTHON_POSIX_SO='$(top_builddir)/unix/.libs/libOpenIPMIposix.so'
3516-fi
3517+
3518 AC_SUBST(PYTHON_DIR)
3519-AC_SUBST(PYTHON_CFLAGS)
3520 AC_SUBST(PYTHON_INSTALL_DIR)
3521 AC_SUBST(PYTHON_INSTALL_LIB_DIR)
3522 AC_SUBST(PYTHON_HAS_POSIX_THREADS)
3523 AC_SUBST(PYTHON_POSIX_LIB)
3524 AC_SUBST(PYTHON_POSIX_SO)
3525+AC_SUBST(PYTHON_SWIG_FLAGS)
3526
3527 # Check for Tkinter/Tix
3528 if test "x$tkinter" = "x"; then
3529@@ -628,25 +598,17 @@ fi
3530 AC_SUBST(PYTHON_GUI_DIR)
3531
3532 # Now check for swig
3533-if test "x$swigprog" = "x" -a "x$tryswig" = "xyes"; then
3534- AC_PATH_PROG(swigprog, swig)
3535-fi
3536-if test "x$swigprog" != "x"; then
3537- swigver=`$swigprog -version 2>&1 | grep 'SWIG Version' | sed 's/SWIG Version //'`
3538- swigmajor=`echo $swigver | sed 's/\.[[0-9]]*\.[[0-9]]*$//'`
3539- swigminor=`echo $swigver | sed 's/^[[0-9]]*\.\([[0-9]]*\)\.[[0-9]]*$/\1/'`
3540- swigrel=`echo $swigver | sed 's/^[[0-9]]*\.[[0-9]]*\.//'`
3541- if test '(' "$swigmajor" -lt 1 ')' -o '(' '(' "$swigmajor" -eq 1 ')' -a '(' "$swigminor" -lt 3 ')' ')' -o '(' '(' "$swigmajor" -eq 1 ')' -a '(' "$swigminor" -eq 3 ')' -a '(' "$swigrel" -lt 21 ')' ')'; then
3542- echo "***swig must be version 1.3.21 or greater, disabling swig and perl/python"
3543- else
3544- echo "swig version $swigver"
3545+SWIG_DIR=
3546+SWIG=
3547+if test "x$tryswig" = "xyes"; then
3548+ if test "x$swigprog" != "x"; then
3549+ SWIG="$swigprog"
3550+ fi
3551+ AX_PKG_SWIG([1.3.21])
3552+ if test "x$SWIG" != "x"; then
3553 AC_DEFINE([HAVE_SWIG], [], [Have swig installed])
3554 SWIG_DIR=swig
3555- SWIG=$swigprog
3556 fi
3557-else
3558- SWIG_DIR=
3559- SWIG=
3560 fi
3561 AC_SUBST(SWIG_DIR)
3562 AC_SUBST(SWIG)
3563@@ -753,11 +715,12 @@ AC_HAVE_FUNCS(syslog)
3564 DIA=
3565 AC_PATH_PROG(diaprog, dia)
3566 if test "x$diaprog" != "x"; then
3567- diaver=`$diaprog --version 2>&1 | sed 's/Dia version \([[^,]]*\), .*$/\1/'`
3568+ diaver=`$diaprog --version 2>&1 | grep 'Dia version' | sed 's/Dia version \([[^,]]*\), .*$/\1/' | sed 's/^\([[0-9.]]\+\)+.*$/\1/'`
3569 tmp=`echo $diaver | sed 's/^[[0-9.]]\+$//'`
3570 if test "x$diaver" = "x" -o "x$tmp" != 'x'; then
3571 # Couldn't get the dia version, give up.
3572 echo "Couldn't determine the dia version from '$diaver'"
3573+ exit 1
3574 else
3575 DIA="$diaprog"
3576 diaver_major=`echo $diaver | sed 's/\.[[0-9.]]\+$//'`
3577@@ -788,8 +751,8 @@ AC_SUBST(LATEX)
3578 AC_SUBST(BIBTEX)
3579 AC_SUBST(DVIPDF)
3580
3581-OPENIPMI_SWIG_LIBS="${PYTHON_POSIX_LIB} \$(top_builddir)/lib/libOpenIPMI.la \$(top_builddir)/utils/libOpenIPMIutils.la \$(top_builddir)/cmdlang/libOpenIPMIcmdlang.la ${GLIB_SINGLE_LIB} ${TCL_LIB}"
3582-OPENIPMI_SWIG_SO="${PYTHON_POSIX_SO}:\$(top_builddir)/lib/.libs/libOpenIPMI.so:\$(top_builddir)/utils/.libs/libOpenIPMIutils.so:\$(top_builddir)/cmdlang/.libs/libOpenIPMIcmdlang.so:${GLIB_SINGLE_SO}:${TCL_SO}"
3583+OPENIPMI_SWIG_LIBS="${PYTHON_POSIX_LIB} \$(top_builddir)/lib/libOpenIPMI.la \$(top_builddir)/utils/libOpenIPMIutils.la \$(top_builddir)/cmdlang/libOpenIPMIcmdlang.la ${GLIB_LIB} ${TCL_LIB}"
3584+OPENIPMI_SWIG_SO="${PYTHON_POSIX_SO}:\$(top_builddir)/lib/.libs/libOpenIPMI.so:\$(top_builddir)/utils/.libs/libOpenIPMIutils.so:\$(top_builddir)/cmdlang/.libs/libOpenIPMIcmdlang.so:${GLIB_SO}:${TCL_SO}"
3585 AC_SUBST(OPENIPMI_SWIG_LIBS)
3586 AC_SUBST(OPENIPMI_SWIG_SO)
3587
3588@@ -800,58 +763,13 @@ AX_CONFIG_FEATURE(
3589 [epoll_pwait], [This platform supports epoll(7) with epoll_pwait(2)],
3590 [HAVE_EPOLL_PWAIT], [This platform supports epoll(7) with epoll_pwait(2).])
3591
3592-# Everything from here to AC_OUTPUT is for libedit
3593-
3594-# AC_PROG_LIBTOOL runs AC_CANONICAL_HOST
3595-case $host in
3596- *-sun-*) AC_DEFINE([_SUNOS], [], [Solaris's term.h does horrid things.]);;
3597-esac
3598-
3599 AC_CHECK_LIB(curses, tgetent, TERM_LIBS=-lcurses,
3600 [AC_CHECK_LIB(ncursesw, tgetent, TERM_LIBS=-lncursesw,
3601 [AC_CHECK_LIB(ncurses, tgetent, TERM_LIBS=-lncurses,
3602 [AC_MSG_ERROR([libtermcap, libcurses or libncurses are required!])])] )] )
3603-
3604-# Checks for header files.
3605-AC_FUNC_ALLOCA
3606-AC_HEADER_DIRENT
3607-AC_HEADER_STDC
3608-AC_HEADER_SYS_WAIT
3609-AC_CHECK_HEADERS([fcntl.h limits.h malloc.h stdlib.h string.h sys/ioctl.h sys/param.h termios.h unistd.h curses.h ncurses.h sys/cdefs.h])
3610-
3611-## include curses.h to prevent "Present But Cannot Be Compiled"
3612-AC_CHECK_HEADERS([term.h],,,
3613-[[#if HAVE_CURSES_H
3614-# include <curses.h>
3615-#elif HAVE_NCURSES_H
3616-# include <ncurses.h>
3617-#endif
3618-]])
3619-
3620-AC_CHECK_FUNCS(wresize vw_printw cfmakeraw)
3621-
3622-# Checks for typedefs, structures, and compiler characteristics.
3623-AC_C_CONST
3624-AC_TYPE_PID_T
3625-AC_TYPE_SIZE_T
3626-AC_CHECK_TYPES([u_int32_t])
3627-
3628-# Checks for library functions.
3629-AC_FUNC_CLOSEDIR_VOID
3630-AC_FUNC_FORK
3631-AC_CHECK_FUNCS(strlcpy strlcat fgetln)
3632-AC_PROG_GCC_TRADITIONAL
3633-## _AIX is offended by rpl_malloc and rpl_realloc
3634-#AC_FUNC_MALLOC
3635-#AC_FUNC_REALLOC
3636-AC_TYPE_SIGNAL
3637-AC_FUNC_STAT
3638-AC_CHECK_FUNCS([endpwent isascii memchr memset re_comp regcomp strcasecmp strchr strcspn strdup strerror strrchr strstr strtol issetugid])
3639-EL_GETPW_R_POSIX
3640-EL_GETPW_R_DRAFT
3641 AC_SUBST(TERM_LIBS)
3642
3643-# End of libedit inclusions
3644+AC_CHECK_FUNCS(cfmakeraw)
3645
3646 if test "${build}" != "${host}" ; then
3647 AC_CHECK_PROGS(BUILD_CC, [${build_alias}-gcc ${build}-gcc gcc])
3648@@ -878,7 +796,6 @@ AC_OUTPUT(Makefile
3649 swig/perl/Makefile
3650 swig/python/Makefile
3651 swig/python/openipmigui/Makefile
3652- libedit/Makefile
3653 cmdlang/Makefile
3654 include/Makefile
3655 include/OpenIPMI/Makefile
3656diff --git a/debian/changelog b/debian/changelog
3657index 10621bc..7eaf73b 100644
3658--- a/debian/changelog
3659+++ b/debian/changelog
3660@@ -1,3 +1,14 @@
3661+openipmi (2.0.27-0ubuntu1) focal; urgency=medium
3662+
3663+ * New upstream release 2.0.27
3664+ - d/rules: disable the now default-on python support
3665+ - d/control: now needs libreadline-dev as build-depends
3666+ - d/p/sample-fix-readline-include-in-ipmi_serial_bmc_emu.c.patch: fix
3667+ FTBFS due to readline include in ipmi_serial_bmc_emu.c
3668+ * d/openipmi.init: fix various issues identified upstream (LP: #1844448)
3669+
3670+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Thu, 28 Nov 2019 14:12:35 +0100
3671+
3672 openipmi (2.0.25-2.1ubuntu1) disco; urgency=low
3673
3674 * Merge from Debian unstable. Remaining changes:
3675diff --git a/debian/control b/debian/control
3676index 2eecdfe..ccc7526 100644
3677--- a/debian/control
3678+++ b/debian/control
3679@@ -3,7 +3,7 @@ Section: admin
3680 Priority: optional
3681 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
3682 XSBC-Original-Maintainer: Noël Köthe <noel@debian.org>
3683-Build-Depends: debhelper (>> 11.0.0), libsnmp-dev, libpopt-dev, libncurses5-dev, chrpath, libssl-dev
3684+Build-Depends: debhelper (>> 11.0.0), libsnmp-dev, libpopt-dev, libncurses5-dev, chrpath, libssl-dev, libreadline-dev
3685 Standards-Version: 4.1.4
3686 Homepage: http://openipmi.sourceforge.net/
3687
3688diff --git a/debian/openipmi.init b/debian/openipmi.init
3689index 2eac8e3..3e452a1 100644
3690--- a/debian/openipmi.init
3691+++ b/debian/openipmi.init
3692@@ -11,8 +11,8 @@
3693 #
3694 ### BEGIN INIT INFO
3695 # Provides: ipmidrv
3696-# Required-Start: $local_fs $remote_fs $syslog
3697-# Required-Stop: $local_fs $remote_fs $syslog
3698+# Required-Start: $local_fs $remote_fs
3699+# Required-Stop: $local_fs $remote_fs
3700 # Default-Start: 2 3 4 5
3701 # Default-Stop: 0 1 6
3702 # Short-Description: OpenIPMI Driver init script
3703@@ -52,7 +52,7 @@ case $(uname -m) in
3704 IPMI_SI_MODULE_NAME="ipmi_si" ;;
3705 esac
3706 kernel=`uname -r | cut -d. -f1-2`
3707-if [ "${kernel}" == "2.4" ]; then
3708+if [ "${kernel}" = "2.4" ]; then
3709 IPMI_SMB_MODULE_NAME="ipmi_smb_intf"
3710 IPMI_SI_MODULE_NAME="ipmi_si_drv"
3711 fi
3712@@ -77,7 +77,7 @@ LOCKFILE=/run/lock/ipmi
3713 DEV_IPMI_TIMEOUT=15
3714
3715 UDEV_EXISTS=0
3716-if [ -e /sbin/udev -o -e /sbin/udevd ]; then
3717+if [ -e /sbin/udev -o -e /sbin/udevd -o -e /bin/udevadm ]; then
3718 UDEV_EXISTS=1
3719 fi
3720
3721@@ -173,6 +173,16 @@ load_hw_modules()
3722
3723 start_watchdog_common()
3724 {
3725+ modules_loaded ipmi_watchdog
3726+ if [ ${OnePlusUnloaded} -eq 0 ]; then
3727+ log_success_msg &&
3728+ return
3729+ fi
3730+ if [ -e /dev/watchdog ]; then
3731+ log_failure_msg "/dev/watchdog already exists "
3732+ RETVAL=$((RETVAL | 8))
3733+ return
3734+ fi
3735 load_hw_modules
3736 modprobe ipmi_watchdog ${IPMI_WATCHDOG_OPTIONS} > /dev/null 2>&1
3737 modules_loaded ipmi_watchdog
3738@@ -242,7 +252,7 @@ start_powercontrol_common()
3739 {
3740 local poweroff_opts=""
3741 load_hw_modules
3742- if [ "${IPMI_POWERCYCLE}" == "yes" ]; then
3743+ if [ "${IPMI_POWERCYCLE}" = "yes" ]; then
3744 modinfo ipmi_poweroff 2>/dev/null | grep poweroff_control > /dev/null 2>&1 && \
3745 poweroff_opts="poweroff_control=2"
3746 modinfo ipmi_poweroff 2>/dev/null | grep poweroff_powercycle > /dev/null 2>&1 && \
3747diff --git a/debian/patches/sample-fix-readline-include-in-ipmi_serial_bmc_emu.c.patch b/debian/patches/sample-fix-readline-include-in-ipmi_serial_bmc_emu.c.patch
3748new file mode 100644
3749index 0000000..e5f1e0d
3750--- /dev/null
3751+++ b/debian/patches/sample-fix-readline-include-in-ipmi_serial_bmc_emu.c.patch
3752@@ -0,0 +1,36 @@
3753+From d1dd570cf77cb2c63bc32bef12d5353e3a197146 Mon Sep 17 00:00:00 2001
3754+From: Baruch Siach <baruch@tkos.co.il>
3755+Date: Fri, 16 Aug 2019 09:54:57 +0300
3756+Subject: [PATCH] sample: fix readline include in ipmi_serial_bmc_emu.c
3757+
3758+Bundled editline has been removed. Use the readline headers instead. Fix
3759+the build when editline is not installed on host.
3760+
3761+Signed-off-by: Baruch Siach <baruch@tkos.co.il>
3762+Message-Id: <6a051666b50ae1df24b24312a7a56a03e343c15d.1565938497.git.baruch@tkos.co.il>
3763+Signed-off-by: Corey Minyard <cminyard@mvista.com>
3764+
3765+Origin: upstream, https://sourceforge.net/p/openipmi/code/ci/d1dd570cf77cb2c63bc32bef12d5353e3a197146
3766+Applied-upstream: 2.0.28
3767+Last-Update: 2019-11-28
3768+
3769+---
3770+ sample/ipmi_serial_bmc_emu.c | 2 +-
3771+ 1 file changed, 1 insertion(+), 1 deletion(-)
3772+
3773+diff --git a/sample/ipmi_serial_bmc_emu.c b/sample/ipmi_serial_bmc_emu.c
3774+index e0ae0197..1b8bb9ac 100644
3775+--- a/sample/ipmi_serial_bmc_emu.c
3776++++ b/sample/ipmi_serial_bmc_emu.c
3777+@@ -42,7 +42,7 @@
3778+ #include <unistd.h>
3779+ #include <stdlib.h>
3780+ #include <sys/select.h>
3781+-#include <editline/readline.h>
3782++#include <readline/readline.h>
3783+
3784+ #define _GNU_SOURCE
3785+ #include <getopt.h>
3786+--
3787+2.24.0
3788+
3789diff --git a/debian/patches/series b/debian/patches/series
3790index 7112540..4580f42 100644
3791--- a/debian/patches/series
3792+++ b/debian/patches/series
3793@@ -1,2 +1,3 @@
3794 increase-MAX_CONFIG_LINE.patch
3795 fix_pthread_pkg_config.patch
3796+sample-fix-readline-include-in-ipmi_serial_bmc_emu.c.patch
3797diff --git a/debian/rules b/debian/rules
3798index 230262a..72b33b6 100755
3799--- a/debian/rules
3800+++ b/debian/rules
3801@@ -26,7 +26,8 @@ config.status:
3802 --with-openssl \
3803 --mandir=\$${prefix}/share/man \
3804 --infodir=\$${prefix}/share/info \
3805- --disable-rpath
3806+ --disable-rpath \
3807+ --with-python=no
3808
3809 build: build-arch build-indep
3810
3811diff --git a/doc/IPMI.pdf b/doc/IPMI.pdf
3812index 15aedf1..e5fba7b 100644
3813Binary files a/doc/IPMI.pdf and b/doc/IPMI.pdf differ
3814diff --git a/doc/Makefile.in b/doc/Makefile.in
3815index ac0b060..6a43798 100644
3816--- a/doc/Makefile.in
3817+++ b/doc/Makefile.in
3818@@ -1,7 +1,7 @@
3819-# Makefile.in generated by automake 1.15 from Makefile.am.
3820+# Makefile.in generated by automake 1.15.1 from Makefile.am.
3821 # @configure_input@
3822
3823-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
3824+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
3825
3826 # This Makefile.in is free software; the Free Software Foundation
3827 # gives unlimited permission to copy and/or distribute it,
3828@@ -90,11 +90,16 @@ host_triplet = @host@
3829 target_triplet = @target@
3830 subdir = doc
3831 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
3832-am__aclocal_m4_deps = $(top_srcdir)/m4/ax_config_feature.m4 \
3833- $(top_srcdir)/m4/ax_have_epoll.m4 $(top_srcdir)/m4/libtool.m4 \
3834- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
3835- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
3836- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
3837+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \
3838+ $(top_srcdir)/m4/ax_config_feature.m4 \
3839+ $(top_srcdir)/m4/ax_have_epoll.m4 \
3840+ $(top_srcdir)/m4/ax_pkg_swig.m4 \
3841+ $(top_srcdir)/m4/ax_prog_python_version.m4 \
3842+ $(top_srcdir)/m4/ax_python_devel.m4 \
3843+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
3844+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
3845+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
3846+ $(top_srcdir)/configure.ac
3847 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
3848 $(ACLOCAL_M4)
3849 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
3850@@ -125,7 +130,6 @@ am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
3851 am__DIST_COMMON = $(srcdir)/Makefile.in
3852 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
3853 ACLOCAL = @ACLOCAL@
3854-ALLOCA = @ALLOCA@
3855 AMTAR = @AMTAR@
3856 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
3857 AR = @AR@
3858@@ -161,8 +165,6 @@ GLIB_DIR = @GLIB_DIR@
3859 GLIB_LIB = @GLIB_LIB@
3860 GLIB_LIBS = @GLIB_LIBS@
3861 GLIB_PKGCONF = @GLIB_PKGCONF@
3862-GLIB_SINGLE_LIB = @GLIB_SINGLE_LIB@
3863-GLIB_SINGLE_SO = @GLIB_SINGLE_SO@
3864 GLIB_SO = @GLIB_SO@
3865 GLIB_TARGET = @GLIB_TARGET@
3866 GLIB_VERSION = @GLIB_VERSION@
3867@@ -215,14 +217,21 @@ PERL_INSTALL_DIR = @PERL_INSTALL_DIR@
3868 PERL_POSIX_LIB = @PERL_POSIX_LIB@
3869 PERL_POSIX_SO = @PERL_POSIX_SO@
3870 POPTLIBS = @POPTLIBS@
3871-PYTHON_CFLAGS = @PYTHON_CFLAGS@
3872+PYTHON = @PYTHON@
3873+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
3874 PYTHON_DIR = @PYTHON_DIR@
3875+PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@
3876+PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@
3877 PYTHON_GUI_DIR = @PYTHON_GUI_DIR@
3878 PYTHON_HAS_POSIX_THREADS = @PYTHON_HAS_POSIX_THREADS@
3879 PYTHON_INSTALL_DIR = @PYTHON_INSTALL_DIR@
3880 PYTHON_INSTALL_LIB_DIR = @PYTHON_INSTALL_LIB_DIR@
3881+PYTHON_LIBS = @PYTHON_LIBS@
3882 PYTHON_POSIX_LIB = @PYTHON_POSIX_LIB@
3883 PYTHON_POSIX_SO = @PYTHON_POSIX_SO@
3884+PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
3885+PYTHON_SWIG_FLAGS = @PYTHON_SWIG_FLAGS@
3886+PYTHON_VERSION = @PYTHON_VERSION@
3887 RANLIB = @RANLIB@
3888 RT_LIB = @RT_LIB@
3889 SED = @SED@
3890@@ -233,6 +242,7 @@ SOCKETLIB = @SOCKETLIB@
3891 STRIP = @STRIP@
3892 SWIG = @SWIG@
3893 SWIG_DIR = @SWIG_DIR@
3894+SWIG_LIB = @SWIG_LIB@
3895 TCL_CFLAGS = @TCL_CFLAGS@
3896 TCL_DIR = @TCL_DIR@
3897 TCL_LIB = @TCL_LIB@
3898@@ -289,12 +299,10 @@ pkgprog = @pkgprog@
3899 prefix = @prefix@
3900 program_transform_name = @program_transform_name@
3901 psdir = @psdir@
3902-pythonprog = @pythonprog@
3903 runstatedir = @runstatedir@
3904 sbindir = @sbindir@
3905 sharedstatedir = @sharedstatedir@
3906 srcdir = @srcdir@
3907-swigprog = @swigprog@
3908 sysconfdir = @sysconfdir@
3909 target = @target@
3910 target_alias = @target_alias@
3911diff --git a/glib/Makefile.in b/glib/Makefile.in
3912index dbd9e3c..728b01d 100644
3913--- a/glib/Makefile.in
3914+++ b/glib/Makefile.in
3915@@ -1,7 +1,7 @@
3916-# Makefile.in generated by automake 1.15 from Makefile.am.
3917+# Makefile.in generated by automake 1.15.1 from Makefile.am.
3918 # @configure_input@
3919
3920-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
3921+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
3922
3923 # This Makefile.in is free software; the Free Software Foundation
3924 # gives unlimited permission to copy and/or distribute it,
3925@@ -91,11 +91,16 @@ host_triplet = @host@
3926 target_triplet = @target@
3927 subdir = glib
3928 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
3929-am__aclocal_m4_deps = $(top_srcdir)/m4/ax_config_feature.m4 \
3930- $(top_srcdir)/m4/ax_have_epoll.m4 $(top_srcdir)/m4/libtool.m4 \
3931- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
3932- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
3933- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
3934+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \
3935+ $(top_srcdir)/m4/ax_config_feature.m4 \
3936+ $(top_srcdir)/m4/ax_have_epoll.m4 \
3937+ $(top_srcdir)/m4/ax_pkg_swig.m4 \
3938+ $(top_srcdir)/m4/ax_prog_python_version.m4 \
3939+ $(top_srcdir)/m4/ax_python_devel.m4 \
3940+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
3941+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
3942+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
3943+ $(top_srcdir)/configure.ac
3944 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
3945 $(ACLOCAL_M4)
3946 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
3947@@ -207,7 +212,6 @@ CTAGS = ctags
3948 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
3949 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
3950 ACLOCAL = @ACLOCAL@
3951-ALLOCA = @ALLOCA@
3952 AMTAR = @AMTAR@
3953 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
3954 AR = @AR@
3955@@ -243,8 +247,6 @@ GLIB_DIR = @GLIB_DIR@
3956 GLIB_LIB = @GLIB_LIB@
3957 GLIB_LIBS = @GLIB_LIBS@
3958 GLIB_PKGCONF = @GLIB_PKGCONF@
3959-GLIB_SINGLE_LIB = @GLIB_SINGLE_LIB@
3960-GLIB_SINGLE_SO = @GLIB_SINGLE_SO@
3961 GLIB_SO = @GLIB_SO@
3962 GLIB_TARGET = @GLIB_TARGET@
3963 GLIB_VERSION = @GLIB_VERSION@
3964@@ -297,14 +299,21 @@ PERL_INSTALL_DIR = @PERL_INSTALL_DIR@
3965 PERL_POSIX_LIB = @PERL_POSIX_LIB@
3966 PERL_POSIX_SO = @PERL_POSIX_SO@
3967 POPTLIBS = @POPTLIBS@
3968-PYTHON_CFLAGS = @PYTHON_CFLAGS@
3969+PYTHON = @PYTHON@
3970+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
3971 PYTHON_DIR = @PYTHON_DIR@
3972+PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@
3973+PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@
3974 PYTHON_GUI_DIR = @PYTHON_GUI_DIR@
3975 PYTHON_HAS_POSIX_THREADS = @PYTHON_HAS_POSIX_THREADS@
3976 PYTHON_INSTALL_DIR = @PYTHON_INSTALL_DIR@
3977 PYTHON_INSTALL_LIB_DIR = @PYTHON_INSTALL_LIB_DIR@
3978+PYTHON_LIBS = @PYTHON_LIBS@
3979 PYTHON_POSIX_LIB = @PYTHON_POSIX_LIB@
3980 PYTHON_POSIX_SO = @PYTHON_POSIX_SO@
3981+PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
3982+PYTHON_SWIG_FLAGS = @PYTHON_SWIG_FLAGS@
3983+PYTHON_VERSION = @PYTHON_VERSION@
3984 RANLIB = @RANLIB@
3985 RT_LIB = @RT_LIB@
3986 SED = @SED@
3987@@ -315,6 +324,7 @@ SOCKETLIB = @SOCKETLIB@
3988 STRIP = @STRIP@
3989 SWIG = @SWIG@
3990 SWIG_DIR = @SWIG_DIR@
3991+SWIG_LIB = @SWIG_LIB@
3992 TCL_CFLAGS = @TCL_CFLAGS@
3993 TCL_DIR = @TCL_DIR@
3994 TCL_LIB = @TCL_LIB@
3995@@ -371,12 +381,10 @@ pkgprog = @pkgprog@
3996 prefix = @prefix@
3997 program_transform_name = @program_transform_name@
3998 psdir = @psdir@
3999-pythonprog = @pythonprog@
4000 runstatedir = @runstatedir@
4001 sbindir = @sbindir@
4002 sharedstatedir = @sharedstatedir@
4003 srcdir = @srcdir@
4004-swigprog = @swigprog@
4005 sysconfdir = @sysconfdir@
4006 target = @target@
4007 target_alias = @target_alias@
4008diff --git a/include/Makefile.in b/include/Makefile.in
4009index 7a19e22..6c1b3cc 100644
4010--- a/include/Makefile.in
4011+++ b/include/Makefile.in
4012@@ -1,7 +1,7 @@
4013-# Makefile.in generated by automake 1.15 from Makefile.am.
4014+# Makefile.in generated by automake 1.15.1 from Makefile.am.
4015 # @configure_input@
4016
4017-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
4018+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
4019
4020 # This Makefile.in is free software; the Free Software Foundation
4021 # gives unlimited permission to copy and/or distribute it,
4022@@ -90,11 +90,16 @@ host_triplet = @host@
4023 target_triplet = @target@
4024 subdir = include
4025 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
4026-am__aclocal_m4_deps = $(top_srcdir)/m4/ax_config_feature.m4 \
4027- $(top_srcdir)/m4/ax_have_epoll.m4 $(top_srcdir)/m4/libtool.m4 \
4028- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
4029- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
4030- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
4031+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \
4032+ $(top_srcdir)/m4/ax_config_feature.m4 \
4033+ $(top_srcdir)/m4/ax_have_epoll.m4 \
4034+ $(top_srcdir)/m4/ax_pkg_swig.m4 \
4035+ $(top_srcdir)/m4/ax_prog_python_version.m4 \
4036+ $(top_srcdir)/m4/ax_python_devel.m4 \
4037+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
4038+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
4039+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
4040+ $(top_srcdir)/configure.ac
4041 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
4042 $(ACLOCAL_M4)
4043 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
4044@@ -185,7 +190,6 @@ am__relativize = \
4045 done; \
4046 reldir="$$dir2"
4047 ACLOCAL = @ACLOCAL@
4048-ALLOCA = @ALLOCA@
4049 AMTAR = @AMTAR@
4050 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
4051 AR = @AR@
4052@@ -221,8 +225,6 @@ GLIB_DIR = @GLIB_DIR@
4053 GLIB_LIB = @GLIB_LIB@
4054 GLIB_LIBS = @GLIB_LIBS@
4055 GLIB_PKGCONF = @GLIB_PKGCONF@
4056-GLIB_SINGLE_LIB = @GLIB_SINGLE_LIB@
4057-GLIB_SINGLE_SO = @GLIB_SINGLE_SO@
4058 GLIB_SO = @GLIB_SO@
4059 GLIB_TARGET = @GLIB_TARGET@
4060 GLIB_VERSION = @GLIB_VERSION@
4061@@ -275,14 +277,21 @@ PERL_INSTALL_DIR = @PERL_INSTALL_DIR@
4062 PERL_POSIX_LIB = @PERL_POSIX_LIB@
4063 PERL_POSIX_SO = @PERL_POSIX_SO@
4064 POPTLIBS = @POPTLIBS@
4065-PYTHON_CFLAGS = @PYTHON_CFLAGS@
4066+PYTHON = @PYTHON@
4067+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
4068 PYTHON_DIR = @PYTHON_DIR@
4069+PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@
4070+PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@
4071 PYTHON_GUI_DIR = @PYTHON_GUI_DIR@
4072 PYTHON_HAS_POSIX_THREADS = @PYTHON_HAS_POSIX_THREADS@
4073 PYTHON_INSTALL_DIR = @PYTHON_INSTALL_DIR@
4074 PYTHON_INSTALL_LIB_DIR = @PYTHON_INSTALL_LIB_DIR@
4075+PYTHON_LIBS = @PYTHON_LIBS@
4076 PYTHON_POSIX_LIB = @PYTHON_POSIX_LIB@
4077 PYTHON_POSIX_SO = @PYTHON_POSIX_SO@
4078+PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
4079+PYTHON_SWIG_FLAGS = @PYTHON_SWIG_FLAGS@
4080+PYTHON_VERSION = @PYTHON_VERSION@
4081 RANLIB = @RANLIB@
4082 RT_LIB = @RT_LIB@
4083 SED = @SED@
4084@@ -293,6 +302,7 @@ SOCKETLIB = @SOCKETLIB@
4085 STRIP = @STRIP@
4086 SWIG = @SWIG@
4087 SWIG_DIR = @SWIG_DIR@
4088+SWIG_LIB = @SWIG_LIB@
4089 TCL_CFLAGS = @TCL_CFLAGS@
4090 TCL_DIR = @TCL_DIR@
4091 TCL_LIB = @TCL_LIB@
4092@@ -349,12 +359,10 @@ pkgprog = @pkgprog@
4093 prefix = @prefix@
4094 program_transform_name = @program_transform_name@
4095 psdir = @psdir@
4096-pythonprog = @pythonprog@
4097 runstatedir = @runstatedir@
4098 sbindir = @sbindir@
4099 sharedstatedir = @sharedstatedir@
4100 srcdir = @srcdir@
4101-swigprog = @swigprog@
4102 sysconfdir = @sysconfdir@
4103 target = @target@
4104 target_alias = @target_alias@
4105diff --git a/include/OpenIPMI/Makefile.in b/include/OpenIPMI/Makefile.in
4106index a3a7a1d..8ed120d 100644
4107--- a/include/OpenIPMI/Makefile.in
4108+++ b/include/OpenIPMI/Makefile.in
4109@@ -1,7 +1,7 @@
4110-# Makefile.in generated by automake 1.15 from Makefile.am.
4111+# Makefile.in generated by automake 1.15.1 from Makefile.am.
4112 # @configure_input@
4113
4114-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
4115+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
4116
4117 # This Makefile.in is free software; the Free Software Foundation
4118 # gives unlimited permission to copy and/or distribute it,
4119@@ -91,11 +91,16 @@ host_triplet = @host@
4120 target_triplet = @target@
4121 subdir = include/OpenIPMI
4122 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
4123-am__aclocal_m4_deps = $(top_srcdir)/m4/ax_config_feature.m4 \
4124- $(top_srcdir)/m4/ax_have_epoll.m4 $(top_srcdir)/m4/libtool.m4 \
4125- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
4126- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
4127- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
4128+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \
4129+ $(top_srcdir)/m4/ax_config_feature.m4 \
4130+ $(top_srcdir)/m4/ax_have_epoll.m4 \
4131+ $(top_srcdir)/m4/ax_pkg_swig.m4 \
4132+ $(top_srcdir)/m4/ax_prog_python_version.m4 \
4133+ $(top_srcdir)/m4/ax_python_devel.m4 \
4134+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
4135+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
4136+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
4137+ $(top_srcdir)/configure.ac
4138 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
4139 $(ACLOCAL_M4)
4140 DIST_COMMON = $(srcdir)/Makefile.am $(pkginclude_HEADERS) \
4141@@ -216,7 +221,6 @@ am__relativize = \
4142 done; \
4143 reldir="$$dir2"
4144 ACLOCAL = @ACLOCAL@
4145-ALLOCA = @ALLOCA@
4146 AMTAR = @AMTAR@
4147 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
4148 AR = @AR@
4149@@ -252,8 +256,6 @@ GLIB_DIR = @GLIB_DIR@
4150 GLIB_LIB = @GLIB_LIB@
4151 GLIB_LIBS = @GLIB_LIBS@
4152 GLIB_PKGCONF = @GLIB_PKGCONF@
4153-GLIB_SINGLE_LIB = @GLIB_SINGLE_LIB@
4154-GLIB_SINGLE_SO = @GLIB_SINGLE_SO@
4155 GLIB_SO = @GLIB_SO@
4156 GLIB_TARGET = @GLIB_TARGET@
4157 GLIB_VERSION = @GLIB_VERSION@
4158@@ -306,14 +308,21 @@ PERL_INSTALL_DIR = @PERL_INSTALL_DIR@
4159 PERL_POSIX_LIB = @PERL_POSIX_LIB@
4160 PERL_POSIX_SO = @PERL_POSIX_SO@
4161 POPTLIBS = @POPTLIBS@
4162-PYTHON_CFLAGS = @PYTHON_CFLAGS@
4163+PYTHON = @PYTHON@
4164+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
4165 PYTHON_DIR = @PYTHON_DIR@
4166+PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@
4167+PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@
4168 PYTHON_GUI_DIR = @PYTHON_GUI_DIR@
4169 PYTHON_HAS_POSIX_THREADS = @PYTHON_HAS_POSIX_THREADS@
4170 PYTHON_INSTALL_DIR = @PYTHON_INSTALL_DIR@
4171 PYTHON_INSTALL_LIB_DIR = @PYTHON_INSTALL_LIB_DIR@
4172+PYTHON_LIBS = @PYTHON_LIBS@
4173 PYTHON_POSIX_LIB = @PYTHON_POSIX_LIB@
4174 PYTHON_POSIX_SO = @PYTHON_POSIX_SO@
4175+PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
4176+PYTHON_SWIG_FLAGS = @PYTHON_SWIG_FLAGS@
4177+PYTHON_VERSION = @PYTHON_VERSION@
4178 RANLIB = @RANLIB@
4179 RT_LIB = @RT_LIB@
4180 SED = @SED@
4181@@ -324,6 +333,7 @@ SOCKETLIB = @SOCKETLIB@
4182 STRIP = @STRIP@
4183 SWIG = @SWIG@
4184 SWIG_DIR = @SWIG_DIR@
4185+SWIG_LIB = @SWIG_LIB@
4186 TCL_CFLAGS = @TCL_CFLAGS@
4187 TCL_DIR = @TCL_DIR@
4188 TCL_LIB = @TCL_LIB@
4189@@ -380,12 +390,10 @@ pkgprog = @pkgprog@
4190 prefix = @prefix@
4191 program_transform_name = @program_transform_name@
4192 psdir = @psdir@
4193-pythonprog = @pythonprog@
4194 runstatedir = @runstatedir@
4195 sbindir = @sbindir@
4196 sharedstatedir = @sharedstatedir@
4197 srcdir = @srcdir@
4198-swigprog = @swigprog@
4199 sysconfdir = @sysconfdir@
4200 target = @target@
4201 target_alias = @target_alias@
4202diff --git a/include/OpenIPMI/internal/Makefile.in b/include/OpenIPMI/internal/Makefile.in
4203index 92199cb..58c8d5e 100644
4204--- a/include/OpenIPMI/internal/Makefile.in
4205+++ b/include/OpenIPMI/internal/Makefile.in
4206@@ -1,7 +1,7 @@
4207-# Makefile.in generated by automake 1.15 from Makefile.am.
4208+# Makefile.in generated by automake 1.15.1 from Makefile.am.
4209 # @configure_input@
4210
4211-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
4212+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
4213
4214 # This Makefile.in is free software; the Free Software Foundation
4215 # gives unlimited permission to copy and/or distribute it,
4216@@ -91,11 +91,16 @@ host_triplet = @host@
4217 target_triplet = @target@
4218 subdir = include/OpenIPMI/internal
4219 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
4220-am__aclocal_m4_deps = $(top_srcdir)/m4/ax_config_feature.m4 \
4221- $(top_srcdir)/m4/ax_have_epoll.m4 $(top_srcdir)/m4/libtool.m4 \
4222- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
4223- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
4224- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
4225+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \
4226+ $(top_srcdir)/m4/ax_config_feature.m4 \
4227+ $(top_srcdir)/m4/ax_have_epoll.m4 \
4228+ $(top_srcdir)/m4/ax_pkg_swig.m4 \
4229+ $(top_srcdir)/m4/ax_prog_python_version.m4 \
4230+ $(top_srcdir)/m4/ax_python_devel.m4 \
4231+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
4232+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
4233+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
4234+ $(top_srcdir)/configure.ac
4235 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
4236 $(ACLOCAL_M4)
4237 DIST_COMMON = $(srcdir)/Makefile.am $(internalinclude_HEADERS) \
4238@@ -174,7 +179,6 @@ CTAGS = ctags
4239 am__DIST_COMMON = $(srcdir)/Makefile.in
4240 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
4241 ACLOCAL = @ACLOCAL@
4242-ALLOCA = @ALLOCA@
4243 AMTAR = @AMTAR@
4244 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
4245 AR = @AR@
4246@@ -210,8 +214,6 @@ GLIB_DIR = @GLIB_DIR@
4247 GLIB_LIB = @GLIB_LIB@
4248 GLIB_LIBS = @GLIB_LIBS@
4249 GLIB_PKGCONF = @GLIB_PKGCONF@
4250-GLIB_SINGLE_LIB = @GLIB_SINGLE_LIB@
4251-GLIB_SINGLE_SO = @GLIB_SINGLE_SO@
4252 GLIB_SO = @GLIB_SO@
4253 GLIB_TARGET = @GLIB_TARGET@
4254 GLIB_VERSION = @GLIB_VERSION@
4255@@ -264,14 +266,21 @@ PERL_INSTALL_DIR = @PERL_INSTALL_DIR@
4256 PERL_POSIX_LIB = @PERL_POSIX_LIB@
4257 PERL_POSIX_SO = @PERL_POSIX_SO@
4258 POPTLIBS = @POPTLIBS@
4259-PYTHON_CFLAGS = @PYTHON_CFLAGS@
4260+PYTHON = @PYTHON@
4261+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
4262 PYTHON_DIR = @PYTHON_DIR@
4263+PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@
4264+PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@
4265 PYTHON_GUI_DIR = @PYTHON_GUI_DIR@
4266 PYTHON_HAS_POSIX_THREADS = @PYTHON_HAS_POSIX_THREADS@
4267 PYTHON_INSTALL_DIR = @PYTHON_INSTALL_DIR@
4268 PYTHON_INSTALL_LIB_DIR = @PYTHON_INSTALL_LIB_DIR@
4269+PYTHON_LIBS = @PYTHON_LIBS@
4270 PYTHON_POSIX_LIB = @PYTHON_POSIX_LIB@
4271 PYTHON_POSIX_SO = @PYTHON_POSIX_SO@
4272+PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
4273+PYTHON_SWIG_FLAGS = @PYTHON_SWIG_FLAGS@
4274+PYTHON_VERSION = @PYTHON_VERSION@
4275 RANLIB = @RANLIB@
4276 RT_LIB = @RT_LIB@
4277 SED = @SED@
4278@@ -282,6 +291,7 @@ SOCKETLIB = @SOCKETLIB@
4279 STRIP = @STRIP@
4280 SWIG = @SWIG@
4281 SWIG_DIR = @SWIG_DIR@
4282+SWIG_LIB = @SWIG_LIB@
4283 TCL_CFLAGS = @TCL_CFLAGS@
4284 TCL_DIR = @TCL_DIR@
4285 TCL_LIB = @TCL_LIB@
4286@@ -338,12 +348,10 @@ pkgprog = @pkgprog@
4287 prefix = @prefix@
4288 program_transform_name = @program_transform_name@
4289 psdir = @psdir@
4290-pythonprog = @pythonprog@
4291 runstatedir = @runstatedir@
4292 sbindir = @sbindir@
4293 sharedstatedir = @sharedstatedir@
4294 srcdir = @srcdir@
4295-swigprog = @swigprog@
4296 sysconfdir = @sysconfdir@
4297 target = @target@
4298 target_alias = @target_alias@
4299diff --git a/include/OpenIPMI/ipmi_conn.h b/include/OpenIPMI/ipmi_conn.h
4300index e5d8294..94ade34 100644
4301--- a/include/OpenIPMI/ipmi_conn.h
4302+++ b/include/OpenIPMI/ipmi_conn.h
4303@@ -414,6 +414,13 @@ struct ipmi_con_s
4304 not long enough to hold it. */
4305 int (*get_port_info)(ipmi_con_t *ipmi, unsigned int port,
4306 char *info, int *info_len);
4307+
4308+ /* Disable the connection. This is primarily for handling a fork,
4309+ make sure nothing happens on the connection after this is
4310+ called. To call this, you should make sure that no thread is
4311+ in any event loop (before the fork) and there are no calls into
4312+ the library. After calling this you should call close. */
4313+ void (*disable)(ipmi_con_t *ipmi);
4314 };
4315
4316 #define IPMI_CONN_NAME(c) (c->name ? c->name : "")
4317diff --git a/include/OpenIPMI/ipmi_sol.h b/include/OpenIPMI/ipmi_sol.h
4318index 57682f1..c136b06 100644
4319--- a/include/OpenIPMI/ipmi_sol.h
4320+++ b/include/OpenIPMI/ipmi_sol.h
4321@@ -519,13 +519,6 @@ int ipmi_sol_open(ipmi_sol_conn_t *conn);
4322 * initial state.
4323 *
4324 * @param [in] conn The IPMI SoL connection to close.
4325- * @param [in] force Nonzero if the connection should be forced to close.
4326- * Forcing the connection to close will be a synchronous
4327- * operation. All outstanding transmits will be cancelled
4328- * and the transmit_complete callbacks will be called
4329- * indicating that the transmit failed. The connection_
4330- * state callback will also be called before this function
4331- * returns.
4332 * @return Zero on success.
4333 * EINVAL if this handle was already closing or closed. If the
4334 * handle is closing, consider using ipmi_sol_force_close
4335@@ -534,6 +527,23 @@ int ipmi_sol_open(ipmi_sol_conn_t *conn);
4336 */
4337 int ipmi_sol_close(ipmi_sol_conn_t *conn);
4338
4339+/**
4340+ * Requests the closure of the SoL session.
4341+ *
4342+ * Closing the SoL session also restores the baseboard serial mux to its
4343+ * initial state.
4344+ *
4345+ * @param [in] conn The IPMI SoL connection to close.
4346+ * @param [in] rem_close Nonzero if the connection should send a close to
4347+ * the remote end. If false, don't inform the remote
4348+ * end of the close.
4349+ * @return Zero on success.
4350+ * EINVAL if this handle was already closing or closed. If the
4351+ * handle is closing, consider using ipmi_sol_force_close
4352+ * to hurry it along.
4353+ * A nonzero error code on other failure.
4354+ */
4355+int ipmi_sol_force_close_wsend(ipmi_sol_conn_t *conn, int rem_close);
4356
4357 /**
4358 * Forces the closure of the SoL session.
4359diff --git a/include/OpenIPMI/ipmiif.h b/include/OpenIPMI/ipmiif.h
4360index cb04a1b..9665940 100644
4361--- a/include/OpenIPMI/ipmiif.h
4362+++ b/include/OpenIPMI/ipmiif.h
4363@@ -47,7 +47,7 @@ extern "C" {
4364 /* For version detection */
4365 #define OPENIPMI_VERSION_MAJOR 2
4366 #define OPENIPMI_VERSION_MINOR 0
4367-#define OPENIPMI_VERSION_RELEASE 25
4368+#define OPENIPMI_VERSION_RELEASE 27
4369 #define OPENIPMI_VERSION_EXTRA
4370 #define OPENIPMI_STRINGX(x) #x
4371 #define OPENIPMI_XSTRING(x) OPENIPMI_STRINGX(x)
4372diff --git a/include/OpenIPMI/os_handler.h b/include/OpenIPMI/os_handler.h
4373index 86df24f..8a8495c 100644
4374--- a/include/OpenIPMI/os_handler.h
4375+++ b/include/OpenIPMI/os_handler.h
4376@@ -158,12 +158,12 @@ struct os_handler_s
4377 stop it first. */
4378 int (*free_timer)(os_handler_t *handler,
4379 os_hnd_timer_id_t *id);
4380- /* This is called to register a callback handler to be called at
4381- the given time or after (absolute time, as seen by
4382- gettimeofday). After the given time has passed, the
4383- "timed_out" will be called with the given cb_data. The
4384- identifier in "id" just be one previously allocated with
4385- alloc_timer(). Note that timed_out may NOT block. */
4386+ /* This is called to register a callback handler to be called
4387+ after the given amount of time (relative). After the given
4388+ time has passed, the "timed_out" will be called with the given
4389+ cb_data. The identifier in "id" just be one previously
4390+ allocated with alloc_timer(). Note that timed_out may NOT
4391+ block. */
4392 int (*start_timer)(os_handler_t *handler,
4393 os_hnd_timer_id_t *id,
4394 struct timeval *timeout,
4395diff --git a/include/OpenIPMI/selector.h b/include/OpenIPMI/selector.h
4396index 29c0f18..1e87b61 100644
4397--- a/include/OpenIPMI/selector.h
4398+++ b/include/OpenIPMI/selector.h
4399@@ -95,6 +95,11 @@ int sel_set_fd_handlers(struct selector_s *sel,
4400 sure to not be called again. */
4401 void sel_clear_fd_handlers(struct selector_s *sel,
4402 int fd);
4403+/* Like above, but can only be called if no handlers are active.
4404+ If it detects a handler is active, it will assert. This should
4405+ only be used at startup to clear the fd handler after an error
4406+ before any handlers are enabled. */
4407+void sel_clear_fd_handlers_imm(struct selector_s *sel, int fd);
4408
4409 /* Turn on and off handling for I/O from a file descriptor. */
4410 #define SEL_FD_HANDLER_ENABLED 0
4411@@ -121,6 +126,11 @@ int sel_start_timer(sel_timer_t *timer,
4412 struct timeval *timeout);
4413
4414 int sel_stop_timer(sel_timer_t *timer);
4415+
4416+/* Stops the timer and calls the done handler when the stop is
4417+ complete. This will return an error if the timer is not
4418+ running or if another done handler is pending running, and
4419+ the done handler will not be called. */
4420 int sel_stop_timer_with_done(sel_timer_t *timer,
4421 sel_timeout_handler_t done_handler,
4422 void *cb_data);
4423@@ -157,6 +167,15 @@ int sel_select(struct selector_s *sel,
4424 void *cb_data,
4425 struct timeval *timeout);
4426
4427+/*
4428+ * Like the above call, but it will return EINTR if interrupted.
4429+ */
4430+int sel_select_intr(struct selector_s *sel,
4431+ sel_send_sig_cb send_sig,
4432+ long thread_id,
4433+ void *cb_data,
4434+ struct timeval *timeout);
4435+
4436 /* This is the main loop for the program. If NULL is passed in to
4437 send_sig, then the signal sender is not used. If this encounters
4438 an unrecoverable problem with select(), it will return the errno.
4439@@ -166,6 +185,9 @@ int sel_select_loop(struct selector_s *sel,
4440 long thread_id,
4441 void *cb_data);
4442
4443+/* Wake all threads in all select loops. */
4444+void sel_wake_all(struct selector_s *sel);
4445+
4446 typedef void (*ipmi_sel_add_read_fds_cb)(struct selector_s *sel,
4447 int *num_fds,
4448 fd_set *fdset,
4449diff --git a/lanserv/Makefile.in b/lanserv/Makefile.in
4450index 3712baf..a909695 100644
4451--- a/lanserv/Makefile.in
4452+++ b/lanserv/Makefile.in
4453@@ -1,7 +1,7 @@
4454-# Makefile.in generated by automake 1.15 from Makefile.am.
4455+# Makefile.in generated by automake 1.15.1 from Makefile.am.
4456 # @configure_input@
4457
4458-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
4459+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
4460
4461 # This Makefile.in is free software; the Free Software Foundation
4462 # gives unlimited permission to copy and/or distribute it,
4463@@ -96,11 +96,16 @@ bin_PROGRAMS = ipmi_sim$(EXEEXT) $(am__EXEEXT_1)
4464 noinst_PROGRAMS = ipmi_checksum$(EXEEXT)
4465 subdir = lanserv
4466 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
4467-am__aclocal_m4_deps = $(top_srcdir)/m4/ax_config_feature.m4 \
4468- $(top_srcdir)/m4/ax_have_epoll.m4 $(top_srcdir)/m4/libtool.m4 \
4469- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
4470- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
4471- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
4472+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \
4473+ $(top_srcdir)/m4/ax_config_feature.m4 \
4474+ $(top_srcdir)/m4/ax_have_epoll.m4 \
4475+ $(top_srcdir)/m4/ax_pkg_swig.m4 \
4476+ $(top_srcdir)/m4/ax_prog_python_version.m4 \
4477+ $(top_srcdir)/m4/ax_python_devel.m4 \
4478+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
4479+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
4480+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
4481+ $(top_srcdir)/configure.ac
4482 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
4483 $(ACLOCAL_M4)
4484 DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
4485@@ -293,7 +298,6 @@ am__relativize = \
4486 done; \
4487 reldir="$$dir2"
4488 ACLOCAL = @ACLOCAL@
4489-ALLOCA = @ALLOCA@
4490 AMTAR = @AMTAR@
4491 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
4492 AR = @AR@
4493@@ -329,8 +333,6 @@ GLIB_DIR = @GLIB_DIR@
4494 GLIB_LIB = @GLIB_LIB@
4495 GLIB_LIBS = @GLIB_LIBS@
4496 GLIB_PKGCONF = @GLIB_PKGCONF@
4497-GLIB_SINGLE_LIB = @GLIB_SINGLE_LIB@
4498-GLIB_SINGLE_SO = @GLIB_SINGLE_SO@
4499 GLIB_SO = @GLIB_SO@
4500 GLIB_TARGET = @GLIB_TARGET@
4501 GLIB_VERSION = @GLIB_VERSION@
4502@@ -383,14 +385,21 @@ PERL_INSTALL_DIR = @PERL_INSTALL_DIR@
4503 PERL_POSIX_LIB = @PERL_POSIX_LIB@
4504 PERL_POSIX_SO = @PERL_POSIX_SO@
4505 POPTLIBS = @POPTLIBS@
4506-PYTHON_CFLAGS = @PYTHON_CFLAGS@
4507+PYTHON = @PYTHON@
4508+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
4509 PYTHON_DIR = @PYTHON_DIR@
4510+PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@
4511+PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@
4512 PYTHON_GUI_DIR = @PYTHON_GUI_DIR@
4513 PYTHON_HAS_POSIX_THREADS = @PYTHON_HAS_POSIX_THREADS@
4514 PYTHON_INSTALL_DIR = @PYTHON_INSTALL_DIR@
4515 PYTHON_INSTALL_LIB_DIR = @PYTHON_INSTALL_LIB_DIR@
4516+PYTHON_LIBS = @PYTHON_LIBS@
4517 PYTHON_POSIX_LIB = @PYTHON_POSIX_LIB@
4518 PYTHON_POSIX_SO = @PYTHON_POSIX_SO@
4519+PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
4520+PYTHON_SWIG_FLAGS = @PYTHON_SWIG_FLAGS@
4521+PYTHON_VERSION = @PYTHON_VERSION@
4522 RANLIB = @RANLIB@
4523 RT_LIB = @RT_LIB@
4524 SED = @SED@
4525@@ -401,6 +410,7 @@ SOCKETLIB = @SOCKETLIB@
4526 STRIP = @STRIP@
4527 SWIG = @SWIG@
4528 SWIG_DIR = @SWIG_DIR@
4529+SWIG_LIB = @SWIG_LIB@
4530 TCL_CFLAGS = @TCL_CFLAGS@
4531 TCL_DIR = @TCL_DIR@
4532 TCL_LIB = @TCL_LIB@
4533@@ -457,12 +467,10 @@ pkgprog = @pkgprog@
4534 prefix = @prefix@
4535 program_transform_name = @program_transform_name@
4536 psdir = @psdir@
4537-pythonprog = @pythonprog@
4538 runstatedir = @runstatedir@
4539 sbindir = @sbindir@
4540 sharedstatedir = @sharedstatedir@
4541 srcdir = @srcdir@
4542-swigprog = @swigprog@
4543 sysconfdir = @sysconfdir@
4544 target = @target@
4545 target_alias = @target_alias@
4546diff --git a/lanserv/OpenIPMI/Makefile.in b/lanserv/OpenIPMI/Makefile.in
4547index 59dbdf7..fda5cb2 100644
4548--- a/lanserv/OpenIPMI/Makefile.in
4549+++ b/lanserv/OpenIPMI/Makefile.in
4550@@ -1,7 +1,7 @@
4551-# Makefile.in generated by automake 1.15 from Makefile.am.
4552+# Makefile.in generated by automake 1.15.1 from Makefile.am.
4553 # @configure_input@
4554
4555-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
4556+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
4557
4558 # This Makefile.in is free software; the Free Software Foundation
4559 # gives unlimited permission to copy and/or distribute it,
4560@@ -91,11 +91,16 @@ host_triplet = @host@
4561 target_triplet = @target@
4562 subdir = lanserv/OpenIPMI
4563 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
4564-am__aclocal_m4_deps = $(top_srcdir)/m4/ax_config_feature.m4 \
4565- $(top_srcdir)/m4/ax_have_epoll.m4 $(top_srcdir)/m4/libtool.m4 \
4566- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
4567- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
4568- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
4569+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \
4570+ $(top_srcdir)/m4/ax_config_feature.m4 \
4571+ $(top_srcdir)/m4/ax_have_epoll.m4 \
4572+ $(top_srcdir)/m4/ax_pkg_swig.m4 \
4573+ $(top_srcdir)/m4/ax_prog_python_version.m4 \
4574+ $(top_srcdir)/m4/ax_python_devel.m4 \
4575+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
4576+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
4577+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
4578+ $(top_srcdir)/configure.ac
4579 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
4580 $(ACLOCAL_M4)
4581 DIST_COMMON = $(srcdir)/Makefile.am $(pkginclude_HEADERS) \
4582@@ -174,7 +179,6 @@ CTAGS = ctags
4583 am__DIST_COMMON = $(srcdir)/Makefile.in
4584 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
4585 ACLOCAL = @ACLOCAL@
4586-ALLOCA = @ALLOCA@
4587 AMTAR = @AMTAR@
4588 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
4589 AR = @AR@
4590@@ -210,8 +214,6 @@ GLIB_DIR = @GLIB_DIR@
4591 GLIB_LIB = @GLIB_LIB@
4592 GLIB_LIBS = @GLIB_LIBS@
4593 GLIB_PKGCONF = @GLIB_PKGCONF@
4594-GLIB_SINGLE_LIB = @GLIB_SINGLE_LIB@
4595-GLIB_SINGLE_SO = @GLIB_SINGLE_SO@
4596 GLIB_SO = @GLIB_SO@
4597 GLIB_TARGET = @GLIB_TARGET@
4598 GLIB_VERSION = @GLIB_VERSION@
4599@@ -264,14 +266,21 @@ PERL_INSTALL_DIR = @PERL_INSTALL_DIR@
4600 PERL_POSIX_LIB = @PERL_POSIX_LIB@
4601 PERL_POSIX_SO = @PERL_POSIX_SO@
4602 POPTLIBS = @POPTLIBS@
4603-PYTHON_CFLAGS = @PYTHON_CFLAGS@
4604+PYTHON = @PYTHON@
4605+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
4606 PYTHON_DIR = @PYTHON_DIR@
4607+PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@
4608+PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@
4609 PYTHON_GUI_DIR = @PYTHON_GUI_DIR@
4610 PYTHON_HAS_POSIX_THREADS = @PYTHON_HAS_POSIX_THREADS@
4611 PYTHON_INSTALL_DIR = @PYTHON_INSTALL_DIR@
4612 PYTHON_INSTALL_LIB_DIR = @PYTHON_INSTALL_LIB_DIR@
4613+PYTHON_LIBS = @PYTHON_LIBS@
4614 PYTHON_POSIX_LIB = @PYTHON_POSIX_LIB@
4615 PYTHON_POSIX_SO = @PYTHON_POSIX_SO@
4616+PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
4617+PYTHON_SWIG_FLAGS = @PYTHON_SWIG_FLAGS@
4618+PYTHON_VERSION = @PYTHON_VERSION@
4619 RANLIB = @RANLIB@
4620 RT_LIB = @RT_LIB@
4621 SED = @SED@
4622@@ -282,6 +291,7 @@ SOCKETLIB = @SOCKETLIB@
4623 STRIP = @STRIP@
4624 SWIG = @SWIG@
4625 SWIG_DIR = @SWIG_DIR@
4626+SWIG_LIB = @SWIG_LIB@
4627 TCL_CFLAGS = @TCL_CFLAGS@
4628 TCL_DIR = @TCL_DIR@
4629 TCL_LIB = @TCL_LIB@
4630@@ -338,12 +348,10 @@ pkgprog = @pkgprog@
4631 prefix = @prefix@
4632 program_transform_name = @program_transform_name@
4633 psdir = @psdir@
4634-pythonprog = @pythonprog@
4635 runstatedir = @runstatedir@
4636 sbindir = @sbindir@
4637 sharedstatedir = @sharedstatedir@
4638 srcdir = @srcdir@
4639-swigprog = @swigprog@
4640 sysconfdir = @sysconfdir@
4641 target = @target@
4642 target_alias = @target_alias@
4643diff --git a/lanserv/OpenIPMI/msg.h b/lanserv/OpenIPMI/msg.h
4644index cd68d79..5927d85 100644
4645--- a/lanserv/OpenIPMI/msg.h
4646+++ b/lanserv/OpenIPMI/msg.h
4647@@ -111,7 +111,7 @@ typedef struct msg_s
4648 struct msg_s *next;
4649 } msg_t;
4650
4651-#define IPMI_SIM_MAX_MSG_LENGTH 36
4652+#define IPMI_SIM_MAX_MSG_LENGTH 255
4653
4654 typedef struct rsp_msg
4655 {
4656diff --git a/lanserv/bmc_storage.c b/lanserv/bmc_storage.c
4657index 17c0e51..528bbfe 100644
4658--- a/lanserv/bmc_storage.c
4659+++ b/lanserv/bmc_storage.c
4660@@ -233,8 +233,10 @@ ipmi_mc_add_to_sel(lmc_data_t *mc,
4661 || find_sel_event_by_recid(mc, e->record_id, NULL))
4662 {
4663 e->record_id++;
4664- if (e->record_id == start_record_id)
4665+ if (e->record_id == start_record_id) {
4666+ free(e);
4667 return EAGAIN;
4668+ }
4669 mc->sel.next_entry++;
4670 }
4671
4672@@ -714,8 +716,10 @@ new_sdr_entry(sdrs_t *sdrs, unsigned char length)
4673 return NULL;
4674
4675 entry->data = malloc(length + 6);
4676- if (!entry->data)
4677+ if (!entry->data) {
4678+ free(entry);
4679 return NULL;
4680+ }
4681
4682 entry->record_id = sdrs->next_entry;
4683
4684diff --git a/lanserv/config.c b/lanserv/config.c
4685index 6b969f3..f0dda9f 100644
4686--- a/lanserv/config.c
4687+++ b/lanserv/config.c
4688@@ -314,6 +314,8 @@ get_delim_str(char **rtokptr, char **rval, const char **err)
4689 val = tokptr;
4690 while (*tokptr != endc) {
4691 if (*tokptr == '\0') {
4692+ if (rv)
4693+ free(rv);
4694 *err = "End of line in string";
4695 return -1;
4696 }
4697diff --git a/lanserv/emu_cmd.c b/lanserv/emu_cmd.c
4698index abdd98f..c6cc9d5 100644
4699--- a/lanserv/emu_cmd.c
4700+++ b/lanserv/emu_cmd.c
4701@@ -936,7 +936,7 @@ mc_add_fru_data(emu_out_t *out, emu_data_t *emu, lmc_data_t *mc, char **toks)
4702 (void *) frufn);
4703 if (rv)
4704 out->eprintf(out, "**Unable to add FRU file, error 0x%x\n", rv);
4705-
4706+ free(frufn);
4707 } else if (strcmp(tok, "data") == 0) {
4708 for (i=0; i<length; i++) {
4709 rv = emu_get_uchar(out, toks, &data[i], "data byte", 1);
4710diff --git a/lanserv/ipmi_sim.c b/lanserv/ipmi_sim.c
4711index 30c4f27..c4e5b18 100644
4712--- a/lanserv/ipmi_sim.c
4713+++ b/lanserv/ipmi_sim.c
4714@@ -715,6 +715,15 @@ static struct poptOption poptOpts[]=
4715 "nostdio",
4716 ""
4717 },
4718+ {
4719+ "nopersist",
4720+ 'p',
4721+ POPT_ARG_NONE,
4722+ NULL,
4723+ 'p',
4724+ "nopersist",
4725+ ""
4726+ },
4727 POPT_AUTOHELP
4728 {
4729 NULL,
4730@@ -1376,6 +1385,9 @@ main(int argc, const char *argv[])
4731 case 'v':
4732 print_version = 1;
4733 break;
4734+ case 'p':
4735+ persist_enable = 0;
4736+ break;
4737 }
4738 }
4739 poptFreeContext(poptCtx);
4740diff --git a/lanserv/lan.conf b/lanserv/lan.conf
4741index 13ba71e..37732d4 100644
4742--- a/lanserv/lan.conf
4743+++ b/lanserv/lan.conf
4744@@ -51,9 +51,7 @@ set_working_mc 0x20
4745 # startcmd is what to execute to start a VM associated with the
4746 # codec above (localhost 9002). It also starts a console serial port
4747 # on port 9003 that is also used as the monitor interface.
4748- startcmd "~/git/qemu/Z/x86_64-softmmu/qemu-system-x86_64 --machine q35 -enable-kvm -drive file=$HOME/userlands/complete-image.ext2,format=raw -nographic -kernel ~/git/linux-ipmi/Ox86_64/arch/x86/boot/bzImage -append 'root=/dev/sda console=ttyS0,115200' -chardev socket,id=ipmi0,host=localhost,port=9002,reconnect=10 -device ipmi-bmc-extern,id=bmc0,chardev=ipmi0 -device isa-ipmi-kcs,bmc=bmc0 -net nic,model=e1000,macaddr=52:54:00:12:34:61 -net user,hostfwd=tcp::5556-10.0.2.15:22 -device isa-irq,id=irq5 -serial mon:telnet::9003,server,telnet,nowait"
4749-
4750- # qemu-system-x86_64 --enable-kvm -drive file=/opt/qemu/cge-complete-image-x86-generic-64-1.ext2,format=raw -nographic -kernel /opt/qemu/bzImage-1 -append 'root=/dev/sdb console=ttyS0,115200' -net nic,model=e1000,macaddr=52:54:00:12:34:59 -net user,hostfwd=tcp::5556-10.0.2.15:22 -chardev socket,id=ipmi0,host=localhost,port=9002,reconnect=10 -device ipmi-bmc-extern,id=bmc0,chardev=ipmi0 -device isa-ipmi-bt,bmc=bmc0 -serial mon:telnet::9003,server,telnet,nowait"
4751+ startcmd "qemu-system-x86_64 --enable-kvm -drive file=/opt/qemu/cge-complete-image-x86-generic-64-1.ext2,format=raw -nographic -kernel /opt/qemu/bzImage-1 -append 'root=/dev/sdb console=ttyS0,115200' -net nic,model=e1000,macaddr=52:54:00:12:34:59 -net user,hostfwd=tcp::5556-10.0.2.15:22 -chardev socket,id=ipmi0,host=localhost,port=9002,reconnect=10 -device ipmi-bmc-extern,id=bmc0,chardev=ipmi0 -device isa-ipmi-bt,bmc=bmc0 -serial mon:telnet::9003,server,telnet,nowait"
4752
4753 sol "telnet:localhost:9003" 115200
4754
4755diff --git a/lanserv/lanserv_ipmi.c b/lanserv/lanserv_ipmi.c
4756index e0f4687..dc77eb4 100644
4757--- a/lanserv/lanserv_ipmi.c
4758+++ b/lanserv/lanserv_ipmi.c
4759@@ -310,6 +310,7 @@ return_rmcpp_rsp(lanserv_data_t *lan, session_t *session, msg_t *msg,
4760 pos[5] = msg->cmd;
4761 pos[len] = -ipmb_checksum(pos+3, len-3, 0);
4762 len++;
4763+ dlen++;
4764 }
4765
4766 if (session && !session->in_startup) {
4767diff --git a/lanserv/marvell-bmc/Makefile.in b/lanserv/marvell-bmc/Makefile.in
4768index ffc9c4e..b4f83b6 100644
4769--- a/lanserv/marvell-bmc/Makefile.in
4770+++ b/lanserv/marvell-bmc/Makefile.in
4771@@ -1,7 +1,7 @@
4772-# Makefile.in generated by automake 1.15 from Makefile.am.
4773+# Makefile.in generated by automake 1.15.1 from Makefile.am.
4774 # @configure_input@
4775
4776-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
4777+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
4778
4779 # This Makefile.in is free software; the Free Software Foundation
4780 # gives unlimited permission to copy and/or distribute it,
4781@@ -93,11 +93,16 @@ host_triplet = @host@
4782 target_triplet = @target@
4783 subdir = lanserv/marvell-bmc
4784 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
4785-am__aclocal_m4_deps = $(top_srcdir)/m4/ax_config_feature.m4 \
4786- $(top_srcdir)/m4/ax_have_epoll.m4 $(top_srcdir)/m4/libtool.m4 \
4787- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
4788- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
4789- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
4790+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \
4791+ $(top_srcdir)/m4/ax_config_feature.m4 \
4792+ $(top_srcdir)/m4/ax_have_epoll.m4 \
4793+ $(top_srcdir)/m4/ax_pkg_swig.m4 \
4794+ $(top_srcdir)/m4/ax_prog_python_version.m4 \
4795+ $(top_srcdir)/m4/ax_python_devel.m4 \
4796+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
4797+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
4798+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
4799+ $(top_srcdir)/configure.ac
4800 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
4801 $(ACLOCAL_M4)
4802 DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
4803@@ -211,7 +216,6 @@ CTAGS = ctags
4804 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp TODO
4805 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
4806 ACLOCAL = @ACLOCAL@
4807-ALLOCA = @ALLOCA@
4808 AMTAR = @AMTAR@
4809 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
4810 AR = @AR@
4811@@ -247,8 +251,6 @@ GLIB_DIR = @GLIB_DIR@
4812 GLIB_LIB = @GLIB_LIB@
4813 GLIB_LIBS = @GLIB_LIBS@
4814 GLIB_PKGCONF = @GLIB_PKGCONF@
4815-GLIB_SINGLE_LIB = @GLIB_SINGLE_LIB@
4816-GLIB_SINGLE_SO = @GLIB_SINGLE_SO@
4817 GLIB_SO = @GLIB_SO@
4818 GLIB_TARGET = @GLIB_TARGET@
4819 GLIB_VERSION = @GLIB_VERSION@
4820@@ -301,14 +303,21 @@ PERL_INSTALL_DIR = @PERL_INSTALL_DIR@
4821 PERL_POSIX_LIB = @PERL_POSIX_LIB@
4822 PERL_POSIX_SO = @PERL_POSIX_SO@
4823 POPTLIBS = @POPTLIBS@
4824-PYTHON_CFLAGS = @PYTHON_CFLAGS@
4825+PYTHON = @PYTHON@
4826+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
4827 PYTHON_DIR = @PYTHON_DIR@
4828+PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@
4829+PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@
4830 PYTHON_GUI_DIR = @PYTHON_GUI_DIR@
4831 PYTHON_HAS_POSIX_THREADS = @PYTHON_HAS_POSIX_THREADS@
4832 PYTHON_INSTALL_DIR = @PYTHON_INSTALL_DIR@
4833 PYTHON_INSTALL_LIB_DIR = @PYTHON_INSTALL_LIB_DIR@
4834+PYTHON_LIBS = @PYTHON_LIBS@
4835 PYTHON_POSIX_LIB = @PYTHON_POSIX_LIB@
4836 PYTHON_POSIX_SO = @PYTHON_POSIX_SO@
4837+PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
4838+PYTHON_SWIG_FLAGS = @PYTHON_SWIG_FLAGS@
4839+PYTHON_VERSION = @PYTHON_VERSION@
4840 RANLIB = @RANLIB@
4841 RT_LIB = @RT_LIB@
4842 SED = @SED@
4843@@ -319,6 +328,7 @@ SOCKETLIB = @SOCKETLIB@
4844 STRIP = @STRIP@
4845 SWIG = @SWIG@
4846 SWIG_DIR = @SWIG_DIR@
4847+SWIG_LIB = @SWIG_LIB@
4848 TCL_CFLAGS = @TCL_CFLAGS@
4849 TCL_DIR = @TCL_DIR@
4850 TCL_LIB = @TCL_LIB@
4851@@ -375,12 +385,10 @@ pkgprog = @pkgprog@
4852 prefix = @prefix@
4853 program_transform_name = @program_transform_name@
4854 psdir = @psdir@
4855-pythonprog = @pythonprog@
4856 runstatedir = @runstatedir@
4857 sbindir = @sbindir@
4858 sharedstatedir = @sharedstatedir@
4859 srcdir = @srcdir@
4860-swigprog = @swigprog@
4861 sysconfdir = @sysconfdir@
4862 target = @target@
4863 target_alias = @target_alias@
4864diff --git a/lanserv/persist.c b/lanserv/persist.c
4865index e15beab..5951fc2 100644
4866--- a/lanserv/persist.c
4867+++ b/lanserv/persist.c
4868@@ -97,6 +97,9 @@ persist_init(const char *papp, const char *instance, const char *ibasedir)
4869 char *n;
4870 int rv = 0;
4871
4872+ if (!persist_enable)
4873+ return 0;
4874+
4875 if (app)
4876 return EBUSY;
4877
4878diff --git a/lanserv/sdrcomp/Makefile.in b/lanserv/sdrcomp/Makefile.in
4879index 71fabf4..83592f4 100644
4880--- a/lanserv/sdrcomp/Makefile.in
4881+++ b/lanserv/sdrcomp/Makefile.in
4882@@ -1,7 +1,7 @@
4883-# Makefile.in generated by automake 1.15 from Makefile.am.
4884+# Makefile.in generated by automake 1.15.1 from Makefile.am.
4885 # @configure_input@
4886
4887-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
4888+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
4889
4890 # This Makefile.in is free software; the Free Software Foundation
4891 # gives unlimited permission to copy and/or distribute it,
4892@@ -93,11 +93,16 @@ bin_PROGRAMS = sdrcomp$(EXEEXT)
4893 noinst_PROGRAMS = sdrcomp_build$(EXEEXT)
4894 subdir = lanserv/sdrcomp
4895 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
4896-am__aclocal_m4_deps = $(top_srcdir)/m4/ax_config_feature.m4 \
4897- $(top_srcdir)/m4/ax_have_epoll.m4 $(top_srcdir)/m4/libtool.m4 \
4898- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
4899- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
4900- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
4901+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \
4902+ $(top_srcdir)/m4/ax_config_feature.m4 \
4903+ $(top_srcdir)/m4/ax_have_epoll.m4 \
4904+ $(top_srcdir)/m4/ax_pkg_swig.m4 \
4905+ $(top_srcdir)/m4/ax_prog_python_version.m4 \
4906+ $(top_srcdir)/m4/ax_python_devel.m4 \
4907+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
4908+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
4909+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
4910+ $(top_srcdir)/configure.ac
4911 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
4912 $(ACLOCAL_M4)
4913 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
4914@@ -183,7 +188,6 @@ CTAGS = ctags
4915 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
4916 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
4917 ACLOCAL = @ACLOCAL@
4918-ALLOCA = @ALLOCA@
4919 AMTAR = @AMTAR@
4920 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
4921 AR = @AR@
4922@@ -219,8 +223,6 @@ GLIB_DIR = @GLIB_DIR@
4923 GLIB_LIB = @GLIB_LIB@
4924 GLIB_LIBS = @GLIB_LIBS@
4925 GLIB_PKGCONF = @GLIB_PKGCONF@
4926-GLIB_SINGLE_LIB = @GLIB_SINGLE_LIB@
4927-GLIB_SINGLE_SO = @GLIB_SINGLE_SO@
4928 GLIB_SO = @GLIB_SO@
4929 GLIB_TARGET = @GLIB_TARGET@
4930 GLIB_VERSION = @GLIB_VERSION@
4931@@ -273,14 +275,21 @@ PERL_INSTALL_DIR = @PERL_INSTALL_DIR@
4932 PERL_POSIX_LIB = @PERL_POSIX_LIB@
4933 PERL_POSIX_SO = @PERL_POSIX_SO@
4934 POPTLIBS = @POPTLIBS@
4935-PYTHON_CFLAGS = @PYTHON_CFLAGS@
4936+PYTHON = @PYTHON@
4937+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
4938 PYTHON_DIR = @PYTHON_DIR@
4939+PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@
4940+PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@
4941 PYTHON_GUI_DIR = @PYTHON_GUI_DIR@
4942 PYTHON_HAS_POSIX_THREADS = @PYTHON_HAS_POSIX_THREADS@
4943 PYTHON_INSTALL_DIR = @PYTHON_INSTALL_DIR@
4944 PYTHON_INSTALL_LIB_DIR = @PYTHON_INSTALL_LIB_DIR@
4945+PYTHON_LIBS = @PYTHON_LIBS@
4946 PYTHON_POSIX_LIB = @PYTHON_POSIX_LIB@
4947 PYTHON_POSIX_SO = @PYTHON_POSIX_SO@
4948+PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
4949+PYTHON_SWIG_FLAGS = @PYTHON_SWIG_FLAGS@
4950+PYTHON_VERSION = @PYTHON_VERSION@
4951 RANLIB = @RANLIB@
4952 RT_LIB = @RT_LIB@
4953 SED = @SED@
4954@@ -291,6 +300,7 @@ SOCKETLIB = @SOCKETLIB@
4955 STRIP = @STRIP@
4956 SWIG = @SWIG@
4957 SWIG_DIR = @SWIG_DIR@
4958+SWIG_LIB = @SWIG_LIB@
4959 TCL_CFLAGS = @TCL_CFLAGS@
4960 TCL_DIR = @TCL_DIR@
4961 TCL_LIB = @TCL_LIB@
4962@@ -347,12 +357,10 @@ pkgprog = @pkgprog@
4963 prefix = @prefix@
4964 program_transform_name = @program_transform_name@
4965 psdir = @psdir@
4966-pythonprog = @pythonprog@
4967 runstatedir = @runstatedir@
4968 sbindir = @sbindir@
4969 sharedstatedir = @sharedstatedir@
4970 srcdir = @srcdir@
4971-swigprog = @swigprog@
4972 sysconfdir = @sysconfdir@
4973 target = @target@
4974 target_alias = @target_alias@
4975diff --git a/lanserv/serv.c b/lanserv/serv.c
4976index a26b376..0aa6b9b 100644
4977--- a/lanserv/serv.c
4978+++ b/lanserv/serv.c
4979@@ -247,9 +247,12 @@ debug_log_raw_msg(sys_data_t *sys,
4980 int pos;
4981 char dummy;
4982 unsigned int i;
4983+ struct timeval tv;
4984
4985+ gettimeofday(&tv, NULL);
4986 va_start(ap, format);
4987 slen = vsnprintf(&dummy, 1, format, ap);
4988+ slen += snprintf(&dummy, 1, " %ld.%6.6ld", tv.tv_sec, tv.tv_usec);
4989 va_end(ap);
4990 slen += len * 3 + 2;
4991 str = malloc(slen);
4992@@ -258,6 +261,7 @@ debug_log_raw_msg(sys_data_t *sys,
4993 va_start(ap, format);
4994 pos = vsprintf(str, format, ap);
4995 va_end(ap);
4996+ pos += sprintf(str + pos, " %ld.%6.6ld", tv.tv_sec, tv.tv_usec);
4997 str[pos++] = '\n';
4998 str[pos] = '\0';
4999 for (i = 0; i < len; i++)
5000diff --git a/lanserv/sol.c b/lanserv/sol.c
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: