X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=configure.in;h=f8491479d7398180346d9e4cea8b78eea19a171d;hb=56bb16e3c5714fc0ccb558d90eb927e3f80a3974;hp=10468715f7f0ecd7e72310f2772cb21f5748ce9f;hpb=4dd885245b0ce82b18609ab4a05d0d5868ff1391;p=yaz-moved-to-github.git diff --git a/configure.in b/configure.in index 1046871..f849147 100644 --- a/configure.in +++ b/configure.in @@ -1,6 +1,6 @@ dnl YAZ Toolkit, Index Data 1994-2002 dnl See the file LICENSE for details. -dnl $Id: configure.in,v 1.87 2002-09-11 21:25:56 adam Exp $ +dnl $Id: configure.in,v 1.90 2002-09-18 20:55:54 adam Exp $ AC_INIT(include/yaz/yaz-version.h) AM_INIT_AUTOMAKE(yaz, 1.9.1) dnl @@ -140,22 +140,44 @@ if test "$ac_cv_lib_readline_readline" = "yes"; then ],AC_DEFINE(HAVE_READLINE_RL_COMPLETION_MATCHES)) LIBS=$xLIBS fi +dnl ------ iconv +AC_ARG_WITH(iconv, [ --with-iconv[=DIR] iconv library in DIR]) +if test "$with_iconv" != "no"; then + AC_MSG_CHECKING(for iconv) + oldLIBS="$LIBS" + oldCPPFLAGS="${CPPFLAGS}" + if test "$with_iconv" != "yes" -a "$with_iconv" != ""; then + LIBS="$LIBS -L${with_iconv}/lib" + CPPFLAGS="${CPPFLAGS} -I${with_iconv}/include" + fi + AC_TRY_LINK([ + #include + ],[ + static void f() {iconv_t t = iconv_open("", ""); } + ],[ + AC_DEFINE(HAVE_ICONV_H) + AC_MSG_RESULT(yes) + ],[ + LIBS="$LIBS -liconv" + AC_TRY_LINK([ + #include + ],[ + static void f() {iconv_t t = iconv_open("", ""); } + ],[ + AC_DEFINE(HAVE_ICONV_H) + AC_MSG_RESULT(yes) + ],[ + LIBS="$oldLIBS" + CPPFLAGS="$oldCPPFLAGS" + AC_MSG_RESULT(no) + ]) + ]) +fi dnl ------ various functions -AC_CHECK_FUNCS(vsnprintf gettimeofday poll iconv_open) +AC_CHECK_FUNCS(vsnprintf gettimeofday poll) if test "$ac_cv_func_poll" = "yes"; then AC_CHECK_HEADERS(sys/poll.h) fi -if test "$ac_cv_func_iconv_open" = "no"; then - oldLibs=$LIBS - LIBS="$LIBS -liconv" - AC_CHECK_FUNCS(iconv_open) - if test "$ac_cv_func_iconv_open" = "no"; then - LIBS=$oldLibs - fi -fi -if test "$ac_cv_func_iconv_open" = "yes"; then - AC_CHECK_HEADERS(iconv.h) -fi dnl ------ socklen_t dnl AC_CHECK_TYPES(socklen_t) AC_MSG_CHECKING(for socklen_t) @@ -183,7 +205,7 @@ else #include #include ], - [getpeername(0, (struct sockaddr *)NULL, (size_t *)0);], + [size_t mylen; getpeername(0, (struct sockaddr *)NULL, &mylen);], ac_cv_check_getpeername_accepts_size_t=yes, ac_cv_check_getpeername_accepts_size_t=no)]) AC_MSG_RESULT($ac_cv_check_getpeername_accepts_size_t) @@ -328,9 +350,9 @@ server/Makefile include/Makefile include/yaz/Makefile lib/Makefile -zoom/Makefile client/Makefile ztest/Makefile +zoom/Makefile doc/Makefile doc/yaz.xml doc/yazhtml.dsl