X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=configure.in;h=f6d105fac2eb5c08d4c9fdb5da0da824bce7f24a;hp=084c528b4dd5da6157e5774cce8443860f380ac3;hb=0016aef97122936cb847026f5a70e03dd0542ab9;hpb=e72e394106dd25d6a8a8c7c2fa677f40ef5e7eb6 diff --git a/configure.in b/configure.in index 084c528..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.137 2004-04-28 22:44:58 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.19) +AM_INIT_AUTOMAKE(yaz, 2.0.23) AM_MAINTAINER_MODE dnl AC_SUBST(READLINE_LIBS) @@ -15,76 +15,9 @@ 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 -dnl ----- DOCBOOK DTD -AC_SUBST(DTD_DIR) -AC_ARG_WITH(dtd, [ --with-dtd[=DIR] use docbookx.dtd in DIR], -[ - if test -f "$withval/docbookx.dtd"; then - DTD_DIR=$withval - fi -],[ - AC_MSG_CHECKING(for docbookx.dtd) - for d in /usr/share/sgml/docbook/dtd/xml/4.1.2 \ - /usr/share/sgml/docbook/xml-dtd-4.1.2* \ - /usr/share/sgml/docbook/xml-dtd-4.1 \ - /usr/share/sgml/docbook/dtd/xml/4.0 \ - /usr/lib/sgml/dtd/docbook-xml - do - if test -f $d/docbookx.dtd; then - AC_MSG_RESULT($d) - DTD_DIR=$d - break - fi - done - if test -z "$DTD_DIR"; then - AC_MSG_RESULT(Not found) - fi -]) -AC_SUBST(DSSSL_DIR) -AC_ARG_WITH(dsssl,[ --with-dsssl[=DIR] use Docbook DSSSL in DIR/{html,print}/docbook.dsl], -[ - if test -f "$withval/html/docbook.dsl"; then - DSSSL_DIR=$withval - fi -],[ - AC_MSG_CHECKING(for docbook.dsl) - for d in /usr/share/sgml/docbook/stylesheet/dsssl/modular \ - /usr/share/sgml/docbook/dsssl-stylesheets-1.* \ - /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh - do - if test -f $d/html/docbook.dsl; then - AC_MSG_RESULT($d) - DSSSL_DIR=$d - break - fi - done - if test -z "$DSSSL_DIR"; then - AC_MSG_RESULT(Not found) - fi -]) -AC_SUBST(XSL_DIR) -AC_ARG_WITH(xsl,[ --with-xsl[=DIR] use Docbook XSL in DIR/{htmlhelp,xhtml}], -[ - if test -f "$withval/htmlhelp/htmlhelp.xsl"; then - XSL_DIR=$withval - fi -],[ - AC_MSG_CHECKING(for htmlhelp.xsl) - for d in /usr/share/sgml/docbook/stylesheet/xsl/nwalsh \ - /usr/share/sgml/docbook/xsl-stylesheets-1.* - do - if test -f $d/htmlhelp/htmlhelp.xsl; then - AC_MSG_RESULT($d) - XSL_DIR=$d - break - fi - done - if test -z "$XSL_DIR"; then - AC_MSG_RESULT(Not found) - fi -]) +YAZ_DOC dnl dnl ----- Sockets checkBoth=0 @@ -102,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 -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" - 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 "$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 - 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