X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=configure.in;h=2d54f3f1503f8edeeefc6aa84ef917c909e069bd;hp=5f5648b6262ffde5d167cfdefe8fb3ac74c7fb5e;hb=a87770ed51d988ce5a0b2f5f886dd4211c4055d6;hpb=e23eae6ada71a70849bcdab7ee179579aad248e1 diff --git a/configure.in b/configure.in index 5f5648b..2d54f3f 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.139 2004-05-01 23:32:20 adam Exp $ +dnl $Id: configure.in,v 1.150 2004-09-09 09:53:08 adam Exp $ AC_INIT(include/yaz/yaz-version.h) -AM_INIT_AUTOMAKE(yaz, 2.0.19) +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 @@ -34,47 +34,52 @@ AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, main, [LIBS="$LIBS -lnsl"])) dnl dnl ------ OpenSSL openssl=no -AC_ARG_WITH(openssl, [ --with-openssl[=PREFIX] OpenSSL library in PREFIX], [openssl=$withval]) +AC_ARG_WITH(openssl, [ --with-openssl[=PREFIX] OpenSSL library in PREFIX], [openssl=$withval]) USE_SSL=0 SSL_CFLAGS="" -SSL_LIBS="" +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` - SSL_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_LIBS="-L$openssl/lib" + 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 "$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" + fi fi if test "$sslver" = "no"; then xLIBS="$LIBS"; - xCFLAGS="$CFLAGS"; - CFLAGS="$CFLAGS $SSL_CFLAGS" - LIBS="$SSL_LIBS $LIBS" - AC_CHECK_LIB(crypto, main,[SSL_LIBS="$SSL_LIBS -lcrypto"]) - LIBS="$LIBS $SSL_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 - LIBS="$xLIBS" - CFLAGS="$xCFLAGS" + CPPFLAGS="$xCPPFLAGS" fi if test "$sslver" != "no"; then - LIBS="$SSL_LIBS $LIBS" CFLAGS="$CFLAGS -DHAVE_OPENSSL_SSL_H=1 $SSL_CFLAGS" USE_SSL=1 fi @@ -115,7 +120,7 @@ if test "$ac_cv_lib_readline_readline" = "yes"; then LIBS=$xLIBS fi dnl ------ iconv -AC_ARG_WITH(iconv, [ --with-iconv[=PREFIX] iconv library in PREFIX]) +AC_ARG_WITH(iconv, [ --with-iconv[=PREFIX] iconv library in PREFIX]) if test "$with_iconv" != "no"; then AC_MSG_CHECKING(for iconv) oldLIBS="$LIBS" @@ -305,7 +310,7 @@ dnl ----- libXML2 AC_SUBST(XML2_LIBS) AC_SUBST(XML2_CFLAGS) xml2dir=yes -AC_ARG_WITH(xml2, [ --with-xml2[=PREFIX] use libxml2 in PREFIX],[xml2dir=$withval]) +AC_ARG_WITH(xml2, [ --with-xml2[=PREFIX] use libxml2 in PREFIX],[xml2dir=$withval]) if test "$xml2dir" = "yes"; then for d in /usr /usr/local; do if test -x $d/bin/xml2-config; then