diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 50 |
1 files changed, 39 insertions, 11 deletions
diff --git a/configure.in b/configure.in index af9729dd..e071c153 100644 --- a/configure.in +++ b/configure.in @@ -6,21 +6,49 @@ AC_INIT(libssh, 0.2-dev , aris@0xbadc0de.be) AC_CONFIG_SRCDIR([sample.c]) AC_CONFIG_HEADER([config.h]) +# LT Version numbers, remember to change them just *before* a release. +# (Interfaces removed: CURRENT++, AGE=0, REVISION=0) +# (Interfaces added: CURRENT++, AGE++, REVISION=0) +# (No interfaces changed: REVISION++) +LIBSSH_CURRENT=0 +LIBSSH_AGE=0 +LIBSSH_REVISION=0 +AC_SUBST(LIBSSH_CURRENT) +AC_SUBST(LIBSSH_AGE) +AC_SUBST(LIBSSH_REVISION) + # Check for the OS. AC_CANONICAL_HOST case "$host" in *-apple*) - DYLIB_EXTENSION="dylib" - LIBSSH_LDFLAGS="-dynamiclib -prebind -seg1addr 0x3a000000 -install_name \"${libdir}/libssh.dylib\" -headerpad_max_install_names -current_version 0.1" + LIBSSH_LDFLAGS="-prebind -seg1addr 0x3a000000 -headerpad_max_install_names" ;; *) - DYLIB_EXTENSION="so" - LIBSSH_LDFLAGS="-shared" + LIBSSH_LDFLAGS="" ;; esac -AC_SUBST(DYLIB_EXTENSION) AC_SUBST(LIBSSH_LDFLAGS) +AC_MSG_CHECKING([version script options]) +case "$host" in + *-*-linux*) + LIBSSH_VERS="$LIBSSH_LDFLAGS -Wl,--version-script,libssh.vers -Wl,-01" + ;; + *-*-gnu*) + LIBSSH_VERS="$LIBSSH_LDFLAGS -Wl,--version-script,libssh.vers-Wl,-01" + ;; +esac +AC_ARG_WITH([versioned-symbol], + AC_HELP_STRING([--with-versioned-symbol],[Use versioned symbols]), + [echo $withval > plop + if test $withval = "yes"; then + LIBSSH_VERS="$LIBSSH_LDFLAGS -Wl,--version-script,libssh.vers-Wl,-01" + else + LIBSSH_VERS="" + fi], [ : ]) + +AC_SUBST(LIBSSH_VERS) + enable_ssh1=${enable_ssh1:-"no"} AC_ARG_ENABLE(ssh1, [ --enable-ssh1 support SSH1]) AC_MSG_CHECKING([for SSH1 support]) @@ -34,15 +62,15 @@ AC_PROG_CC AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_MAKE_SET -AC_PROG_RANLIB +AC_PROG_LIBTOOL AC_C_BIGENDIAN # Checks for libraries. -# AC_CHECK_LIB([gcrypt], [gcry_md_open]) -# if test "$ac_cv_lib_gcrypt_gcry_md_open" != yes; then -# AC_CHECK_LIB([crypto], [BN_init]) -# fi -AC_CHECK_LIB([crypto],[BN_init]) +AC_CHECK_LIB([gcrypt], [gcry_md_open]) +if test "$ac_cv_lib_gcrypt_gcry_md_open" != yes; then + AC_CHECK_LIB([crypto], [BN_init]) +fi +#AC_CHECK_LIB([crypto],[BN_init]) AC_CHECK_LIB([z], [deflateInit_]) AC_SEARCH_LIBS([hstrerror],[nsl resolv]) AC_SEARCH_LIBS([gethostbyname],[nsl resolv]) |