BugFix#1436593: Apply build options for HPUX targets

This commit is contained in:
Sara Golemon 2006-02-23 23:14:35 +00:00
parent a4e61c265b
commit 1d7522bc06
5 changed files with 19 additions and 1 deletions

View File

@ -18,6 +18,7 @@ all:
(cd $$dir && $(MAKE) all) \
|| case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"
sample:
$(CC) -o ssh2_sample.o ssh2_sample.c $(CFLAGS)
$(CC) -o ssh2_sample ssh2_sample.o $(LIBS)
install: all

2
README
View File

@ -12,6 +12,8 @@ Version 0.13
Add terminating NULL character to readlink()/realpath() results.
BugFix#1436593: Apply build options for HPUX targets.
Version 0.12
------------

View File

@ -3,6 +3,9 @@ AC_INIT(libssh2,0.12,sarag@libssh2.org)
AC_CONFIG_SRCDIR([src])
AC_CONFIG_HEADER([include/libssh2_config.h])
# Default to the same as CC
LDCC="\$(CC)"
# Check for the OS.
AC_CANONICAL_HOST
case "$host" in
@ -16,6 +19,11 @@ case "$host" in
SHLIB_LDFLAGS="-dynamiclib -flat_namespace"
CFLAGS="$CFLAGS -DLIBSSH2_DARWIN"
;;
*hpux*)
SHLIB_SUFFIX_NAME="sl"
SHLIB_LDFLAGS="-b +vnocompatwarnings -L/lib/pa20_64"
LDCC="ld"
;;
*)
SHLIB_SUFFIX_NAME="so"
SHLIB_LDFLAGS="-shared"
@ -31,6 +39,7 @@ AC_CHECK_LIB(m, ceil, [ SHLIB_LDFLAGS="$SHLIB_LDFLAGS -lm" ])
AC_SUBST(SHLIB_SUFFIX_NAME)
AC_SUBST(SHLIB_LDFLAGS)
AC_SUBST(LDCC)
AC_SUBST(LIBS)
AC_PROG_CC

View File

@ -53,6 +53,10 @@
#include <openssl/md5.h>
#endif
#ifdef __hpux
# define inline
#endif
#define LIBSSH2_ALLOC(session, count) session->alloc((count), &(session)->abstract)
#define LIBSSH2_REALLOC(session, ptr, count) ((ptr) ? session->realloc((ptr), (count), &(session)->abstract) : session->alloc((count), &(session)->abstract))
#define LIBSSH2_FREE(session, ptr) session->free((ptr), &(session)->abstract)

View File

@ -7,8 +7,10 @@ libdir = @exec_prefix@/lib
incldir = @prefix@/include
CC = @CC@
LDCC = @LDCC@
CFLAGS = -c @CFLAGS@ -Wall -g -I../include/ -fPIC
LDFLAGS = @LDFLAGS@
SHLIB_LDFLAGS = @SHLIB_LDFLAGS@
LIBS = @LIBS@
INSTALL = @INSTALL@
@ -54,7 +56,7 @@ userauth.o: userauth.c
all: libssh2.@SHLIB_SUFFIX_NAME@
libssh2.@SHLIB_SUFFIX_NAME@: $(OBJECTS)
$(CC) -o libssh2.@SHLIB_SUFFIX_NAME@ $(SHLIB_LDFLAGS) $(OBJECTS) $(LIBS) $(LDFLAGS) @SHLIB_LDFLAGS@
$(LDCC) -o libssh2.@SHLIB_SUFFIX_NAME@ $(SHLIB_LDFLAGS) $(OBJECTS) $(LIBS) $(LDFLAGS)
libssh2.a: $(OBJECTS)
rm -f libssh2.a
ar q libssh2.a $(OBJECTS)