Ticket #140 (closed)

Opened 11 years ago

Last modified 10 years ago

automake + libtool + AIX patch

Reported by: anonymous Owned by:
Priority: normal Milestone:
Component: Version:
Keywords: Cc: bagder
Blocked By: Blocks:

Description

Hi Sara,

attached is a (large) patch to enable the use of
libtool and automake. I needed to compile & install
libssh2 on AIX, HP-UX and Solaris, all of them as
shared libraries. Automake + libtool made that
relatively easy. It now compiles and runs on all of
these - ssh2_sample.c (with a valid username and
password obviously) runs through successfull completion
on all of them.

I've updated the README as follows:

Version 0.13.??



Fix bug on AIX 5.3 where including sys/poll.h after

the definition of struct LIBSSH2_POLLFD causes compile
errors because events and revents are redefined by
sys/poll.h

Converted to automake and libtool - libssh2 now

builds static and shared libraries HP-UX (32+64bit),
AIX 5.3 (32+64bit), Sun Solaris 8.0. Linux builds
tested on Suse ES 9.2, Gentoo, Debian 3.1.

I've also added a small note in INSTALL on the versions
and commands used to generate configure & the various
Makefile.in's

We use libssh2 in our product, Symantec PureDisk? Remote
Office Edition, a backup product. You might want to add
it to your list of projects using libssh2 :-)

You can apply the patch on a checked out source tree
using zcat <patch> | -p1 (if you're in the root of the
source tree), or zcat <patch> | -p0 if you're one level up.

I hope you find the patch usefull.

Kind regards & thanks for a neat piece of software!

Koen D'Hondt

koen_d'hondt@… (work)
belgje@… (private)

Attachments

libssh2-0.13-configure.patch.bz2 (187.2 KB) - added by nobody 11 years ago.
automake + libtool + AIX patch

Download all attachments as: .zip

Change History

Changed 11 years ago by nobody

automake + libtool + AIX patch

comment:1 Changed 11 years ago by anonymous

Logged In: NO

That should read: bzcat instead of zcat - the .gz patch was
too big to be posted :-(

comment:2 Changed 11 years ago by anonymous

Logged In: NO

Also builds properly on Darwin (MacOS X 10.4.6) and RedHat? ES3.

Koen.

comment:3 Changed 11 years ago by anonymous

Logged In: NO

patch for the patch - I forgot to install the header files...

--snip--
diff -r -c libssh2-0.13a/Makefile.am
libssh2-0.13a.new/Makefile.am
* libssh2-0.13a/Makefile.am Sun Apr 30 01:16:23 2006
--- libssh2-0.13a.new/Makefile.am Tue May 2 19:21:30 2006
*
* 14,19
--- 14,21 ----

EXTRA_DIST = LICENSE win32 include


+ include_HEADERS= include/libssh2.h include/libssh2_sftp.h
include/libssh2_publickey.h
+

# but do not distribute a generated libssh2_config.h
dist-hook:

@( if [ -f include/libssh2_config.h ] ; then \

diff -r -c libssh2-0.13a/Makefile.in
libssh2-0.13a.new/Makefile.in
* libssh2-0.13a/Makefile.in Sun Apr 30 01:16:45 2006
--- libssh2-0.13a.new/Makefile.in Tue May 2 19:23:03 2006
*
* 14,19
--- 14,20 ----

@SET_MAKE@


+

srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@

*
* 37,44

build_triplet = @build@
host_triplet = @host@
noinst_PROGRAMS = ssh2_sample$(EXEEXT)

! DIST_COMMON = README $(amconfigure_deps)
$(srcdir)/Makefile.am \
! $(srcdir)/Makefile.in $(top_srcdir)/configure \

$(top_srcdir)/include/libssh2_config.h.in INSTALL

config.guess \

config.sub depcomp install-sh ltmain.sh missing

subdir = .

--- 38,46 ----

build_triplet = @build@
host_triplet = @host@
noinst_PROGRAMS = ssh2_sample$(EXEEXT)

! DIST_COMMON = README $(amconfigure_deps)
$(include_HEADERS) \
! $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
! $(top_srcdir)/configure \

$(top_srcdir)/include/libssh2_config.h.in INSTALL

config.guess \

config.sub depcomp install-sh ltmain.sh missing

subdir = .

*
* 74,79
--- 76,90 ----

install-recursive installcheck-recursive

installdirs-recursive \

pdf-recursive ps-recursive uninstall-info-recursive \
uninstall-recursive

+ amvpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed
's|.|.|g'`;
+ amvpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed

"s|$$srcdirstrip/
"`;; \

+ *) f=$$p;; \
+ esac;
+ amstrip_dir = echo $$p | sed -e 's|^.*/||';
+ am
installdirs = "$(DESTDIR)$(includedir)"
+ includeHEADERS_INSTALL = $(INSTALL_HEADER)
+ HEADERS = $(include_HEADERS)

ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)

*
* 201,206
--- 212,218 ----

ssh2_sample_SOURCES = ssh2_sample.c
ssh2_sample_LDADD = src/libssh2.la
EXTRA_DIST = LICENSE win32 include

+ include_HEADERS = include/libssh2.h include/libssh2_sftp.h
include/libssh2_publickey.h

all: all-recursive


.SUFFIXES:

*
* 304,309
--- 316,338 ----

distclean-libtool:

-rm -f libtool

uninstall-info-am:

+ install-includeHEADERS: $(include_HEADERS)
+ @$(NORMAL_INSTALL)

+ test -z "$(includedir)"
$(mkdir_p)

"$(DESTDIR)$(includedir)"
+ @list='$(include_HEADERS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(amstrip_dir) \
+ echo " $(includeHEADERS_INSTALL) '$$d$$p'
'$(DESTDIR)$(includedir)/$$f'"; \
+ $(includeHEADERS_INSTALL) "$$d$$p"
"$(DESTDIR)$(includedir)/$$f"; \
+ done
+
+ uninstall-includeHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(include_HEADERS)'; for p in $$list; do \
+ f=$(am
strip_dir) \
+ echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \
+ rm -f "$(DESTDIR)$(includedir)/$$f"; \
+ done

# This directory's subdirectories are mostly independent;

you can cd

# into them and run `make' without going through this

Makefile.
*
* 584,592

exit 1; } >&2

check-am: all-am
check: check-recursive

! all-am: Makefile $(PROGRAMS)

installdirs: installdirs-recursive
installdirs-am:
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive

--- 613,624 ----

exit 1; } >&2

check-am: all-am
check: check-recursive

! all-am: Makefile $(PROGRAMS) $(HEADERS)

installdirs: installdirs-recursive
installdirs-am:

+ for dir in "$(DESTDIR)$(includedir)"; do \

+ test -z "$$dir"
$(mkdir_p) "$$dir"; \

+ done

install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive

*
* 633,639

info-am:


! install-data-am:

install-exec-am:


--- 665,671 ----

info-am:


! install-data-am: install-includeHEADERS

install-exec-am:


*
* 663,669

ps-am:


! uninstall-am: uninstall-info-am

uninstall-info: uninstall-info-recursive


--- 695,701 ----

ps-am:


! uninstall-am: uninstall-includeHEADERS uninstall-info-am

uninstall-info: uninstall-info-recursive


*
* 676,688

distclean-recursive distclean-tags distcleancheck distdir \
distuninstallcheck dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am

install-exec \
! install-exec-am install-info install-info-am install-man \
! install-strip installcheck installcheck-am installdirs \
! installdirs-am maintainer-clean maintainer-clean-generic \
! maintainer-clean-recursive mostlyclean mostlyclean-compile \
! mostlyclean-generic mostlyclean-libtool
mostlyclean-recursive \
! pdf pdf-am ps ps-am tags tags-recursive uninstall
uninstall-am \
! uninstall-info-am


# but do not distribute a generated libssh2_config.h

--- 708,721 ----

distclean-recursive distclean-tags distcleancheck distdir \
distuninstallcheck dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am

install-exec \
! install-exec-am install-includeHEADERS install-info \
! install-info-am install-man install-strip installcheck \
! installcheck-am installdirs installdirs-am maintainer-clean \
! maintainer-clean-generic maintainer-clean-recursive \
! mostlyclean mostlyclean-compile mostlyclean-generic \
! mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps
ps-am \
! tags tags-recursive uninstall uninstall-am \
! uninstall-includeHEADERS uninstall-info-am


# but do not distribute a generated libssh2_config.h

--snip--

comment:4 Changed 10 years ago by bagder

we now have automake and libtool usage added and it builds for AIX...

Note: See TracTickets for help on using tickets.