X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=configure.in;h=f6d105fac2eb5c08d4c9fdb5da0da824bce7f24a;hb=0016aef97122936cb847026f5a70e03dd0542ab9;hp=3c6bb56dd5d37d87c3f34d4098b64fdd7f99bdca;hpb=bbd68e685f0eaab7bae461e04903a71a380605ca;p=yaz-moved-to-github.git diff --git a/configure.in b/configure.in index 3c6bb56..f6d105f 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.142 2004-05-13 10:07:14 adam Exp $ +dnl $Id: configure.in,v 1.149 2004-08-11 09:05:56 adam Exp $ AC_INIT(include/yaz/yaz-version.h) -AM_INIT_AUTOMAKE(yaz, 2.0.20) +AM_INIT_AUTOMAKE(yaz, 2.0.23) AM_MAINTAINER_MODE dnl AC_SUBST(READLINE_LIBS) @@ -15,7 +15,7 @@ test -z "$YACC" && AC_MSG_WARN([GNU bison not found]) AC_PROG_INSTALL AM_DISABLE_SHARED AM_PROG_LIBTOOL -AC_PATH_PROG(pkgconfig, pkg-config, NONE) +AC_PATH_PROG(pkgconfigpath, pkg-config, NONE) dnl YAZ_DOC dnl @@ -37,45 +37,47 @@ openssl=no AC_ARG_WITH(openssl, [ --with-openssl[=PREFIX] OpenSSL library in PREFIX], [openssl=$withval]) USE_SSL=0 SSL_CFLAGS="" -SSL_PATH="" +SSL_LIBPATH="" if test "$openssl" != "no"; then sslver=no if test "$openssl" != "yes"; 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` - else + if test -x $openssl/bin/pkg-config; 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_LIBPATH="-L$openssl/lib" fi else - if test "$pkgconfig" != "NONE"; then - if $pkgconfig --exists openssl; then - SSL_CFLAGS=`$pkgconfig --cflags openssl` - LIBS="$LIBS `$pkgconfig --libs openssl`" - sslver=`$pkgconfig --modversion openssl` + if test "$pkgconfigpath" != "NONE"; then + if $pkgconfigpath --exists openssl; then + SSL_CFLAGS=`$pkgconfigpath --cflags openssl` + LIBS="$LIBS `$pkgconfigpath --libs openssl`" + sslver=`$pkgconfigpath --modversion openssl` fi fi if test "$sslver" = "no"; then SSL_CFLAGS="-I/usr/include/openssl" - SSL_LIBPATH="" fi fi if test "$sslver" = "no"; then xLIBS="$LIBS"; - xCFLAGS="$CFLAGS"; - CFLAGS="$CFLAGS $SSL_CFLAGS" - LIBS="$SSL_LIBPATH $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 LIBS="$xLIBS" fi - CFLAGS="$xCFLAGS" + CPPFLAGS="$xCPPFLAGS" fi if test "$sslver" != "no"; then CFLAGS="$CFLAGS -DHAVE_OPENSSL_SSL_H=1 $SSL_CFLAGS"