X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=configure.in;h=b6b9925424e5ed09cd70152de6ede51d94494daa;hb=8797798afa88b715781dcbd55fae8a2fabeb5c79;hp=d1e04746a5f80f6d1c6e0fe230c9c4a114ba6740;hpb=cc6dad5cffd577eed9d001a82f08a552c2740525;p=yaz-moved-to-github.git diff --git a/configure.in b/configure.in index d1e0474..b6b9925 100644 --- a/configure.in +++ b/configure.in @@ -1,8 +1,8 @@ dnl YAZ Toolkit, Index Data 1994-2004 dnl See the file LICENSE for details. -dnl $Id: configure.in,v 1.138 2004-04-30 19:34:05 adam Exp $ +dnl $Id: configure.in,v 1.144 2004-05-14 08:19:16 adam Exp $ AC_INIT(include/yaz/yaz-version.h) -AM_INIT_AUTOMAKE(yaz, 2.0.19) +AM_INIT_AUTOMAKE(yaz, 2.0.21) AM_MAINTAINER_MODE dnl AC_SUBST(READLINE_LIBS) @@ -35,54 +35,56 @@ dnl dnl ------ OpenSSL openssl=no AC_ARG_WITH(openssl, [ --with-openssl[=PREFIX] OpenSSL library in PREFIX], [openssl=$withval]) -AC_SUBST(SSL_CFLAGS) -AC_SUBST(SSL_LIBS) -AC_SUBST(SSL_DEFS) USE_SSL=0 SSL_CFLAGS="" -SSL_LIBS="" -SSL_DEFS="" +SSL_LIBPATH="" if test "$openssl" != "no"; then sslver=no - xLIBS="$LIBS"; - xCFLAGS="$CFLAGS"; if test "$openssl" != "yes"; then - if $openssl/bin/pkg-config --exists openssl; then - SSL_CFLAGS=`$openssl/bin/pkg-config --cflags openssl` - SSL_LIBS=`$openssl/bin/pkg-config --libs openssl` - sslver=`$openssl/bin/pkg-config --modversion openssl` - else + if test "$pkgconfig" != "NONE"; then + if $openssl/bin/pkg-config --exists openssl; then + SSL_CFLAGS=`$openssl/bin/pkg-config --cflags openssl` + LIBS="$LIBS `$openssl/bin/pkg-config --libs openssl`" + sslver=`$openssl/bin/pkg-config --modversion openssl` + fi + fi + if test "$sslver" = "no"; then SSL_CFLAGS="-I$openssl/include -I$openssl/include/openssl" - SSL_LIBS="-L$openssl/lib" - CFLAGS="$SSL_CFLAGS $CFLAGS" - LIBS="$SSL_LIBS $LIBS" + SSL_LIBPATH="-L$openssl/lib" fi else - if $pkgconfig --exists openssl; then - SSL_CFLAGS=`$pkgconfig --cflags openssl` - SSL_LIBS=`$pkgconfig --libs openssl` - sslver=`$pkgconfig --modversion openssl` - fi + if test "$pkgconfig" != "NONE"; then + if $pkgconfig --exists openssl; then + SSL_CFLAGS=`$pkgconfig --cflags openssl` + LIBS="$LIBS `$pkgconfig --libs openssl`" + sslver=`$pkgconfig --modversion openssl` + fi + fi + if test "$sslver" = "no"; then + SSL_CFLAGS="-I/usr/include/openssl" + fi fi if test "$sslver" = "no"; then - AC_CHECK_LIB(crypto, main,[SSL_LIBS="$SSL_LIBS -lcrypto"]) - LIBS="$LIBS $SSL_LIBS" + xLIBS="$LIBS"; + xCPPFLAGS="$CPPFLAGS"; + CPPFLAGS="$CPPFLAGS $SSL_CFLAGS $SSL_LIBPATH" + AC_CHECK_LIB(crypto, main) AC_CHECK_LIB(ssl, SSL_new) if test "$ac_cv_lib_ssl_SSL_new" = "yes"; then AC_CHECK_HEADER(openssl/ssl.h,[sslver=yes]) + LIBS="$SSL_LIBPATH $LIBS" fi - if test "$sslver" = "yes"; then - SSL_LIBS="-lssl $SSL_LIBS" + if test "$sslver" != "yes"; then + LIBS="$xLIBS" fi + CPPFLAGS="$xCPPFLAGS" fi if test "$sslver" != "no"; then - SSL_DEFS="-DHAVE_OPENSSL_SSL_H=1" + CFLAGS="$CFLAGS -DHAVE_OPENSSL_SSL_H=1 $SSL_CFLAGS" USE_SSL=1 fi AC_MSG_CHECKING([for SSL]) AC_MSG_RESULT($sslver) - LIBS="$xLIBS" - CFLAGS="$xCFLAGS" fi dnl dnl ------ GNU Readline